diff --git a/README.md b/README.md index 3d2cb192..20e341bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # editor-sdk -![Coverage](https://img.shields.io/badge/coverage-95.52%25-brightgreen.svg) +![Coverage](https://img.shields.io/badge/coverage-95.48%25-brightgreen.svg) [![Build PR](https://github.com/chili-publish/editor-sdk/actions/workflows/pr-build.yml/badge.svg)](https://github.com/chili-publish/editor-sdk/actions/workflows/pr-build.yml) [![Publish Package](https://github.com/chili-publish/editor-sdk/actions/workflows/publish-package.yml/badge.svg)](https://github.com/chili-publish/editor-sdk/actions/workflows/publish-package.yml) diff --git a/src/index.ts b/src/index.ts index f2ceaa3b..ff1e2512 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'; 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',