diff --git a/src/index.ts b/src/index.ts index 1728836d..426bfa21 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,6 +45,7 @@ export { FlowDirection, FitMode, UpdateZIndexMethod, + ImageSourceTypeEnum } from '../types/FrameTypes'; export { VariableType, ImageVariableSourceType } from '../types/VariableTypes'; @@ -54,7 +55,7 @@ export type { LayoutWithFrameProperties, LayoutListItemType, } from '../types/LayoutTypes'; -export type { FrameLayoutType, FrameType, Frame, TextFrame, ImageFrame, ShapeType } from '../types/FrameTypes'; +export type { FrameLayoutType, FrameType, Frame, TextFrame, ImageFrame, ImageFrameSource, ShapeType } from '../types/FrameTypes'; export type { Variable, VariableMoves, diff --git a/types/FrameTypes.ts b/types/FrameTypes.ts index 01ccbc4e..78b221aa 100644 --- a/types/FrameTypes.ts +++ b/types/FrameTypes.ts @@ -28,18 +28,19 @@ export type FrameType = { }; export type Frame = TextFrame | ImageFrame; + export type ImageUrlVariableSource = { - sourceType: ImageSourceType.urlVariable; + sourceType: ImageSourceTypeEnum.urlVariable; variableId: string; } export type ImageUrlSource = { - sourceType: ImageSourceType.url; + sourceType: ImageSourceTypeEnum.url; url: string; } export type ImageConnectorVariableSource = { assetId: string; connectorId: string; - sourceType: ImageSourceType.connectorVariable; + sourceType: ImageSourceTypeEnum.connectorVariable; url: string; } // used by new getter methods @@ -72,7 +73,7 @@ export type TextFrame = { blendMode: BlendMode; }; -export enum ImageSourceType { +export enum ImageSourceTypeEnum { url = 'url', urlVariable = 'urlVariable', connectorVariable = 'connectorVariable',