@chili-publish/studio-sdk 1.47.0 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const version = "1.47.0";
1
+ const version = "1.48.0";
2
2
  const packageInfo = {
3
3
  version
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FrameTypes.cjs.js","sources":["../../../src/types/FrameTypes.ts"],"sourcesContent":["// FramePropertiesDto\nimport { BarcodeCharacterSet, BarcodeErrorCorrectionLevel, BarcodeType, QuietZone } from './BarcodeTypes';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { HasOverrideState, Id, PropertyState } from './CommonTypes';\nimport { GradientUsage } from './GradientStyleTypes';\nimport { ComponentGridSettings } from '../types/ComponentGridTypes';\nimport {\n CornerRadiusAll,\n CornerRadiusNone,\n CornerRadiusOnly,\n ShapeFrameSource,\n ShapeType,\n ShapeContainerProperties,\n} from './ShapeTypes';\n\nexport type FrameLayoutType = {\n id: Id;\n layoutId: Id;\n horizontal: FrameAnchor;\n vertical: FrameAnchor;\n x: PropertyState<number>;\n y: PropertyState<number>;\n width: PropertyState<number>;\n height: PropertyState<number>;\n rotationDegrees: PropertyState<number>;\n scaleX: PropertyState<number>;\n scaleY: PropertyState<number>;\n isVisible: PropertyState<boolean>;\n fitMode: PropertyState<FitMode>;\n fitModePosition: PropertyState<FitModePosition>;\n smartCropSettings: PropertyState<SmartCropSettings>;\n hasImageCrop: PropertyState<boolean>;\n hasFrameSubjectArea: PropertyState<boolean>;\n minCopyfitting: PropertyState<number>;\n maxCopyfitting: PropertyState<number>;\n enableCopyfitting: PropertyState<boolean>;\n autoGrow: AutoGrowSettings;\n isShowingCustomCroppedAsset: boolean;\n customCroppedAssetCount: number;\n subjectId: PropertyState<Id | null>;\n componentGridSettings: PropertyState<ComponentGridSettings>;\n componentFit: PropertyState<ComponentFitEnum>;\n} | null;\n\n//Frame.image\nexport type FrameType = {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n // `imageUrl` is not generic: should be removed from model\n imageUrl: string;\n blendMode: string;\n opacity: number;\n};\n\nexport type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame | ComponentFrame | ComponentGridFrame;\n\nexport type ImageFrameVariableSource = {\n type: ImageSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type ImageFrameUrlSource = {\n type: ImageSourceTypeEnum.url;\n url: string;\n};\n\nexport type ImageFrameConnectorSource = {\n type: ImageSourceTypeEnum.connector;\n assetId: Id;\n id: Id;\n};\n\nexport type ImageFrameBrandkitMediaSource = {\n type: ImageSourceTypeEnum.brandKitMedia;\n name: string;\n};\n\nexport type ImageFrameSource =\n ImageFrameConnectorSource | ImageFrameVariableSource | ImageFrameUrlSource | ImageFrameBrandkitMediaSource;\n\n// used by new getter methods\nexport type ImageFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.image;\n src?: ImageFrameSource;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n container: {\n source: ShapeFrameSource;\n properties: ShapeContainerProperties;\n };\n};\n\nexport type ShapeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.shape;\n blendMode: BlendMode;\n shapeProperties: {\n enableFill: boolean;\n fillColor: ColorUsage;\n enableStroke: boolean;\n strokeWeight: number;\n strokeColor: ColorUsage;\n allCornersSame: boolean;\n fillOverprint: boolean;\n strokeOverprint: boolean;\n };\n src: {\n type: ShapeType;\n cornerRadius: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n sides?: number;\n };\n dropShadowSettings?: DropShadowSettings;\n gradient?: GradientUsage;\n};\n\nexport type TextFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.text;\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: TextDirection;\n flowDirection: FlowDirection;\n verticalAlign: VerticalAlign;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n hasVariable?: boolean;\n};\n\nexport type BarcodeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.barcode;\n blendMode: BlendMode;\n barcodeProperties: {\n enableBars: boolean;\n enableBackground: boolean;\n backgroundColor: ColorUsage;\n enableBarColor: boolean;\n barColor: ColorUsage;\n enableText: boolean;\n barHeight: number;\n magnification: number;\n quietZone: QuietZone;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars: boolean;\n barcodeOverprint: boolean;\n backgroundOverprint: boolean;\n };\n src?: BarcodeSource;\n barcodeType: BarcodeType;\n dropShadowSettings?: DropShadowSettings;\n};\n\nexport type BarcodeSource = BarcodeVariableSource | BarcodeTextSource;\n\nexport type BarcodeVariableSource = {\n type: BarcodeSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type BarcodeTextSource = {\n type: BarcodeSourceTypeEnum.text;\n text: string;\n};\n\nexport type ComponentFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.component;\n blendMode: BlendMode;\n src: ComponentSource;\n variableMappings: VariableMapping[];\n\n /**\n * @deprecated Use `componentFit` on frame properties instead. This property is deprecated and will be removed in a future version.\n * How the component fits within the frame.\n */\n fitMode: ComponentFitEnum;\n};\n\nexport type ComponentGridFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.componentGrid;\n blendMode: BlendMode;\n dataSourceVariableId?: Id | null;\n src?: ComponentSource | null;\n variableMappings: GridVariableMapping;\n};\n\nexport type GridVariableMapping = {\n mappings: Record<string, VariableMapping[] | null>;\n};\n\nexport type ComponentSource = ConnectorComponentSource;\n\nexport type ConnectorComponentSource = {\n type: ComponentSourceTypeEnum.connector;\n id: Id;\n assetId: Id | null;\n};\n\nexport type VariableMapping = {\n source: Id;\n target: Id;\n sourceField?: string;\n};\n\nexport enum ComponentFitEnum {\n /**\n * The component resizes to fit the frame size.\n */\n resize = 'resize',\n\n /**\n * The component scales to fit the frame size while maintaining its aspect ratio.\n */\n scale = 'scale',\n\n /**\n * The component first scales to fit the frame size while maintaining its aspect ratio,\n * then resizes to fill the remaining space.\n */\n scaleAndResize = 'scaleAndResize',\n}\n\nexport type CropSettings = {\n left: number;\n top: number;\n width: number;\n height: number;\n rotationDegrees: number;\n type: 'default';\n};\n\nexport type NoCropSettings = {\n type: 'noCrop';\n};\n\nexport type AutoGrowSettings = {\n enabled: PropertyState<boolean>;\n minWidth: PropertyState<number>;\n maxWidth: PropertyState<number>;\n minHeight: PropertyState<number>;\n maxHeight: PropertyState<number>;\n directions: PropertyState<Array<AutoGrowDirection>>;\n};\n\nexport interface AutoGrowDeltaUpdate {\n enabled?: {\n value: boolean;\n };\n minWidth?: {\n value: string | null;\n };\n maxWidth?: {\n value: string | null;\n };\n minHeight?: {\n value: string | null;\n };\n maxHeight?: {\n value: string | null;\n };\n directions?: {\n value: Array<AutoGrowDirection>;\n };\n}\n\nexport type DropShadowSettings = {\n enabled: boolean;\n distance: number;\n angleDegrees: number;\n blurRadius: number;\n color: ColorUsage;\n};\n\nexport interface ShadowSettingsDeltaUpdate {\n distance?: {\n value: string;\n };\n angleDegrees?: {\n value: number;\n };\n blurRadius?: {\n value: number;\n };\n enabled?: {\n value: boolean;\n };\n color?: {\n value: ColorUsage;\n };\n}\n\nexport enum AutoGrowDirection {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum ImageSourceTypeEnum {\n url = 'url',\n variable = 'variable',\n connector = 'connector',\n brandKitMedia = 'brandKitMedia',\n}\n\nexport enum ComponentSourceTypeEnum {\n connector = 'connector',\n}\n\nexport enum FrameTypeEnum {\n text = 'text',\n image = 'image',\n shape = 'shape',\n barcode = 'barcode',\n component = 'component',\n componentGrid = 'componentGrid',\n}\n\nexport enum BarcodeSourceTypeEnum {\n variable = 'variable',\n text = 'text',\n}\n\nexport enum TextDirection {\n leftToRight = 'leftToRight',\n rightToLeft = 'rightToLeft',\n weak = 'weak',\n}\n\nexport enum FlowDirection {\n horizontal = 'horizontal',\n vertical = 'vertical',\n onPath = 'onPath',\n}\n\nexport enum VerticalAlign {\n top = 'top',\n bottom = 'bottom',\n middle = 'middle',\n justify = 'justify',\n}\n\nexport enum BlendMode {\n normal = 'normal',\n screen = 'screen',\n overlay = 'overlay',\n darken = 'darken',\n lighten = 'lighten',\n colorDodge = 'colorDodge',\n colorBurn = 'colorBurn',\n hardLight = 'hardLight',\n softLight = 'softLight',\n difference = 'difference',\n exclusion = 'exclusion',\n multiply = 'multiply',\n hue = 'hue',\n saturation = 'saturation',\n color = 'color',\n luminosity = 'luminosity',\n}\n\nexport enum FitMode {\n fill = 'fill',\n fit = 'fit',\n smartCrop = 'smartCrop',\n manualCrop = 'manualCrop',\n}\n\nexport enum FitModePosition {\n topLeft = 'topLeft',\n topCenter = 'topCenter',\n topRight = 'topRight',\n centerLeft = 'centerLeft',\n center = 'center',\n centerRight = 'centerRight',\n bottomLeft = 'bottomLeft',\n bottomCenter = 'bottomCenter',\n bottomRight = 'bottomRight',\n}\n\nexport enum UpdateZIndexMethod {\n bringToFront = 'bringToFront',\n sendToBack = 'sendToBack',\n bringForward = 'bringForward',\n sendBackward = 'sendBackward',\n}\n\nexport enum FrameAnchorType {\n relative = 'relative',\n start = 'start',\n end = 'end',\n startAndEnd = 'startAndEnd',\n center = 'center',\n}\n\nexport enum AnchorTargetType {\n page = 'page',\n frame = 'frame',\n}\n\nexport enum AnchorTargetEdgeType {\n start = 'start',\n end = 'end',\n center = 'center',\n}\n\nexport class PageAnchorTarget {\n type = AnchorTargetType.page;\n}\n\nexport class FrameAnchorTarget {\n frameId: Id;\n edge: AnchorTargetEdgeType;\n type = AnchorTargetType.frame;\n\n constructor(id: Id, edge: AnchorTargetEdgeType) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n ((this.frameId = id), (this.edge = edge));\n }\n}\n\nexport type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;\n\nexport type RelativeFrameAnchor = {\n start: PropertyState<number>;\n end: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.relative;\n} & HasOverrideState;\n\nexport type StartFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.start;\n} & HasOverrideState;\n\nexport type EndFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.end;\n} & HasOverrideState;\n\nexport type StartAndEndFrameAnchor = {\n start: PropertyState<number>;\n startTarget: AnchorTarget;\n end: PropertyState<number>;\n endTarget: AnchorTarget;\n type: FrameAnchorType.startAndEnd;\n} & HasOverrideState;\n\nexport type CenterFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.center;\n} & HasOverrideState;\n\nexport type FrameAnchor =\n RelativeFrameAnchor | StartFrameAnchor | EndFrameAnchor | StartAndEndFrameAnchor | CenterFrameAnchor;\n\nexport type FrameAnchorProperties = {\n horizontal: boolean;\n type: FrameAnchorType;\n target: AnchorTarget;\n endTarget?: AnchorTarget | null;\n};\n\nexport type AnchorConfiguration = {\n allowedTypes: Set<FrameAnchorType>;\n allowedFrameIds: Set<Id>;\n};\n\nexport type FrameConfiguration = {\n horizontal: AnchorConfiguration;\n vertical: AnchorConfiguration;\n};\n\nexport enum CropType {\n frameCrop = 'frameCrop',\n assetCrop = 'assetCrop',\n}\n\n/**\n * Image-specific editing constraints.\n */\nexport type ImageFrameConstraints = {\n cropAllowed: PropertyState<boolean>;\n};\n\n/**\n * Text-specific editing constraints.\n */\nexport type TextFrameConstraints = {\n editingAllowed: PropertyState<boolean>;\n paragraphStyles: PropertyState<IdSetManagedConstraint>;\n characterStyles: PropertyState<IdSetManagedConstraint>;\n colors: PropertyState<IdSetManagedConstraint>;\n fontSizes: PropertyState<FontSizeRangeManagedConstraint>;\n};\n\nexport interface ManagedConstraint {\n allowed: boolean;\n}\n\n/**\n * A managed constraint represented by a set of allowed Id identifiers.\n *\n * Example: used to allow only a specific set of paragraph or character styles.\n * - `allowed`: If true, only the provided `ids` may be used.\n * - `ids`: The set of allowed Id values.\n */\nexport interface IdSetManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n ids: Id[];\n}\n\n/**\n * A managed constraint that restricts allowed font sizes to a continuous range.\n *\n * - `allowed`: If true, restricts allowed font sizes to [min, max] (inclusive).\n * - `min`: The minimum allowed font size (nullable).\n * - `max`: The maximum allowed font size (nullable).\n */\nexport interface FontSizeRangeManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n min: number | null;\n max: number | null;\n}\n\n/**\n * Frame editing constraints with optional frame-type-specific sub-properties.\n */\nexport type FrameConstraints = {\n selectionAllowed: PropertyState<boolean>;\n horizontalMovementAllowed: PropertyState<boolean>;\n verticalMovementAllowed: PropertyState<boolean>;\n rotationAllowed: PropertyState<boolean>;\n resizeAllowed: PropertyState<boolean>;\n proportionLocked: PropertyState<boolean>;\n /** Image-specific constraints. */\n image?: ImageFrameConstraints;\n /** Text-specific constraints. */\n text?: TextFrameConstraints;\n};\n\n/**\n * Image-specific constraints delta update.\n */\nexport interface ImageFrameConstraintsDeltaUpdate {\n cropAllowed?: {\n value: boolean;\n };\n}\n\n/**\n * Text-specific constraints delta update.\n */\nexport interface TextFrameConstraintsDeltaUpdate {\n editingAllowed?: {\n value: boolean;\n };\n paragraphStyles?: {\n value: IdSetManagedConstraint;\n };\n characterStyles?: {\n value: IdSetManagedConstraint;\n };\n colors?: {\n value: IdSetManagedConstraint;\n };\n fontSizes?: {\n value: FontSizeRangeManagedConstraint;\n };\n}\n\n/**\n * Frame constraints delta update with optional frame-type-specific sub-properties.\n */\nexport interface FrameConstraintsDeltaUpdate {\n selectionAllowed?: {\n value: boolean;\n };\n horizontalMovementAllowed?: {\n value: boolean;\n };\n verticalMovementAllowed?: {\n value: boolean;\n };\n rotationAllowed?: {\n value: boolean;\n };\n resizeAllowed?: {\n value: boolean;\n };\n proportionLocked?: {\n value: boolean;\n };\n /** Image-specific constraints update. */\n image?: ImageFrameConstraintsDeltaUpdate;\n /** Text-specific constraints update. */\n text?: TextFrameConstraintsDeltaUpdate;\n}\n\nexport type SmartCropSettings = SmartCropSettingsV1 | SmartCropSettingsV2;\n\nexport type SmartCropSettingsV1 = {\n version: SmartCropVersion.v1;\n};\n\nexport type SmartCropSettingsV2 = {\n version: SmartCropVersion.v2;\n horizontalBias: SmartCropAxisBias;\n verticalBias: SmartCropAxisBias;\n};\n\nexport enum SmartCropVersion {\n v1 = 'v1',\n v2 = 'v2',\n}\n\n/**\n * Latest version of the smart crop algorithm.\n * Keep in sync with @SmartCropVersion enum.\n */\nexport const LATEST_SMART_CROP_VERSION = SmartCropVersion.v2;\n\nexport enum SmartCropAxisBias {\n start = 'start',\n center = 'center',\n end = 'end',\n}\n"],"names":["ComponentFitEnum","AutoGrowDirection","ImageSourceTypeEnum","ComponentSourceTypeEnum","FrameTypeEnum","BarcodeSourceTypeEnum","TextDirection","FlowDirection","VerticalAlign","BlendMode","FitMode","FitModePosition","UpdateZIndexMethod","FrameAnchorType","AnchorTargetType","AnchorTargetEdgeType","CropType","SmartCropVersion","SmartCropAxisBias"],"mappings":";;AAqOO,IAAK,qCAAAA,sBAAL;AAIHA,oBAAA,QAAA,IAAS;AAKTA,oBAAA,OAAA,IAAQ;AAMRA,oBAAA,gBAAA,IAAiB;AAfT,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAuFL,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,KAAA,IAAM;AACNA,qBAAA,QAAA,IAAS;AACTA,qBAAA,MAAA,IAAO;AACPA,qBAAA,OAAA,IAAQ;AAJA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAOL,IAAK,wCAAAC,yBAAL;AACHA,uBAAA,KAAA,IAAM;AACNA,uBAAA,UAAA,IAAW;AACXA,uBAAA,WAAA,IAAY;AACZ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,KAAA,IAAM;AACNA,wBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;AAML,MAAM,iBAAiB;AAAA,EAAvB,cAAA;AACH,SAAA,OAAO;AAAA,EAAA;AACX;AAEO,MAAM,kBAAkB;AAAA,EAK3B,YAAY,IAAQ,MAA4B;AAFhD,SAAA,OAAO;AAID,SAAK,UAAU,IAAM,KAAK,OAAO;AAAA,EACvC;AACJ;AAyDO,IAAK,6BAAAC,cAAL;AACHA,YAAA,WAAA,IAAY;AACZA,YAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AA0IL,IAAK,qCAAAC,sBAAL;AACHA,oBAAA,IAAA,IAAK;AACLA,oBAAA,IAAA,IAAK;AAFG,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AASL,MAAM,4BAA4B;AAElC,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,OAAA,IAAQ;AACRA,qBAAA,QAAA,IAAS;AACTA,qBAAA,KAAA,IAAM;AAHE,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FrameTypes.cjs.js","sources":["../../../src/types/FrameTypes.ts"],"sourcesContent":["// FramePropertiesDto\nimport { BarcodeCharacterSet, BarcodeErrorCorrectionLevel, BarcodeType, QuietZone } from './BarcodeTypes';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { HasOverrideState, Id, PropertyState } from './CommonTypes';\nimport { GradientUsage } from './GradientStyleTypes';\nimport { ComponentGridSettings } from '../types/ComponentGridTypes';\nimport {\n CornerRadiusAll,\n CornerRadiusNone,\n CornerRadiusOnly,\n ShapeFrameSource,\n ShapeType,\n ShapeContainerProperties,\n} from './ShapeTypes';\n\nexport type FrameLayoutType = {\n id: Id;\n layoutId: Id;\n horizontal: FrameAnchor;\n vertical: FrameAnchor;\n x: PropertyState<number>;\n y: PropertyState<number>;\n width: PropertyState<number>;\n height: PropertyState<number>;\n rotationDegrees: PropertyState<number>;\n scaleX: PropertyState<number>;\n scaleY: PropertyState<number>;\n isVisible: PropertyState<boolean>;\n fitMode: PropertyState<FitMode>;\n fitModePosition: PropertyState<FitModePosition>;\n smartCropSettings: PropertyState<SmartCropSettings>;\n hasImageCrop: PropertyState<boolean>;\n hasFrameSubjectArea: PropertyState<boolean>;\n minCopyfitting: PropertyState<number>;\n maxCopyfitting: PropertyState<number>;\n enableCopyfitting: PropertyState<boolean>;\n autoGrow: AutoGrowSettings;\n isShowingCustomCroppedAsset: boolean;\n customCroppedAssetCount: number;\n subjectId: PropertyState<Id | null>;\n componentGridSettings: PropertyState<ComponentGridSettings>;\n componentFit: PropertyState<ComponentFitEnum>;\n} | null;\n\n//Frame.image\nexport type FrameType = {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n // `imageUrl` is not generic: should be removed from model\n imageUrl: string;\n blendMode: string;\n opacity: number;\n};\n\nexport type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame | ComponentFrame | ComponentGridFrame;\n\nexport type ImageFrameVariableSource = {\n type: ImageSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type ImageFrameUrlSource = {\n type: ImageSourceTypeEnum.url;\n url: string;\n};\n\nexport type ImageFrameConnectorSource = {\n type: ImageSourceTypeEnum.connector;\n assetId: Id;\n id: Id;\n};\n\nexport type ImageFrameBrandkitMediaSource = {\n type: ImageSourceTypeEnum.brandKitMedia;\n name: string;\n};\n\nexport type ImageFrameSource =\n ImageFrameConnectorSource | ImageFrameVariableSource | ImageFrameUrlSource | ImageFrameBrandkitMediaSource;\n\n// used by new getter methods\nexport type ImageFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.image;\n src?: ImageFrameSource;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n container: {\n source: ShapeFrameSource;\n properties: ShapeContainerProperties;\n };\n};\n\nexport type ShapeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.shape;\n blendMode: BlendMode;\n shapeProperties: {\n enableFill: boolean;\n fillColor: ColorUsage;\n enableStroke: boolean;\n strokeWeight: number;\n strokeColor: ColorUsage;\n allCornersSame: boolean;\n fillOverprint: boolean;\n strokeOverprint: boolean;\n };\n src: {\n type: ShapeType;\n // present for `rectangle` and `polygon`, absent for `ellipse` and `custom`\n cornerRadius?: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n // present for `polygon` only\n sides?: number;\n // present for `custom` only; an SVG-style path string (`M`/`L`/`C`/`Z` commands only)\n // in coordinates relative to the frame (`0` to `1`), not absolute units\n path?: string;\n };\n dropShadowSettings?: DropShadowSettings;\n gradient?: GradientUsage;\n};\n\nexport type TextFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.text;\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: TextDirection;\n flowDirection: FlowDirection;\n verticalAlign: VerticalAlign;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n hasVariable?: boolean;\n};\n\nexport type BarcodeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.barcode;\n blendMode: BlendMode;\n barcodeProperties: {\n enableBars: boolean;\n enableBackground: boolean;\n backgroundColor: ColorUsage;\n enableBarColor: boolean;\n barColor: ColorUsage;\n enableText: boolean;\n barHeight: number;\n magnification: number;\n quietZone: QuietZone;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars: boolean;\n barcodeOverprint: boolean;\n backgroundOverprint: boolean;\n };\n src?: BarcodeSource;\n barcodeType: BarcodeType;\n dropShadowSettings?: DropShadowSettings;\n};\n\nexport type BarcodeSource = BarcodeVariableSource | BarcodeTextSource;\n\nexport type BarcodeVariableSource = {\n type: BarcodeSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type BarcodeTextSource = {\n type: BarcodeSourceTypeEnum.text;\n text: string;\n};\n\nexport type ComponentFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.component;\n blendMode: BlendMode;\n src: ComponentSource;\n variableMappings: VariableMapping[];\n\n /**\n * @deprecated Use `componentFit` on frame properties instead. This property is deprecated and will be removed in a future version.\n * How the component fits within the frame.\n */\n fitMode: ComponentFitEnum;\n};\n\nexport type ComponentGridFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.componentGrid;\n blendMode: BlendMode;\n dataSourceVariableId?: Id | null;\n src?: ComponentSource | null;\n variableMappings: GridVariableMapping;\n};\n\nexport type GridVariableMapping = {\n mappings: Record<string, VariableMapping[] | null>;\n};\n\nexport type ComponentSource = ConnectorComponentSource;\n\nexport type ConnectorComponentSource = {\n type: ComponentSourceTypeEnum.connector;\n id: Id;\n assetId: Id | null;\n};\n\nexport type VariableMapping = {\n source: Id;\n target: Id;\n sourceField?: string;\n};\n\nexport enum ComponentFitEnum {\n /**\n * The component resizes to fit the frame size.\n */\n resize = 'resize',\n\n /**\n * The component scales to fit the frame size while maintaining its aspect ratio.\n */\n scale = 'scale',\n\n /**\n * The component first scales to fit the frame size while maintaining its aspect ratio,\n * then resizes to fill the remaining space.\n */\n scaleAndResize = 'scaleAndResize',\n}\n\nexport type CropSettings = {\n left: number;\n top: number;\n width: number;\n height: number;\n rotationDegrees: number;\n type: 'default';\n};\n\nexport type NoCropSettings = {\n type: 'noCrop';\n};\n\nexport type AutoGrowSettings = {\n enabled: PropertyState<boolean>;\n minWidth: PropertyState<number>;\n maxWidth: PropertyState<number>;\n minHeight: PropertyState<number>;\n maxHeight: PropertyState<number>;\n directions: PropertyState<Array<AutoGrowDirection>>;\n};\n\nexport interface AutoGrowDeltaUpdate {\n enabled?: {\n value: boolean;\n };\n minWidth?: {\n value: string | null;\n };\n maxWidth?: {\n value: string | null;\n };\n minHeight?: {\n value: string | null;\n };\n maxHeight?: {\n value: string | null;\n };\n directions?: {\n value: Array<AutoGrowDirection>;\n };\n}\n\nexport type DropShadowSettings = {\n enabled: boolean;\n distance: number;\n angleDegrees: number;\n blurRadius: number;\n color: ColorUsage;\n};\n\nexport interface ShadowSettingsDeltaUpdate {\n distance?: {\n value: string;\n };\n angleDegrees?: {\n value: number;\n };\n blurRadius?: {\n value: number;\n };\n enabled?: {\n value: boolean;\n };\n color?: {\n value: ColorUsage;\n };\n}\n\nexport enum AutoGrowDirection {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum ImageSourceTypeEnum {\n url = 'url',\n variable = 'variable',\n connector = 'connector',\n brandKitMedia = 'brandKitMedia',\n}\n\nexport enum ComponentSourceTypeEnum {\n connector = 'connector',\n}\n\nexport enum FrameTypeEnum {\n text = 'text',\n image = 'image',\n shape = 'shape',\n barcode = 'barcode',\n component = 'component',\n componentGrid = 'componentGrid',\n}\n\nexport enum BarcodeSourceTypeEnum {\n variable = 'variable',\n text = 'text',\n}\n\nexport enum TextDirection {\n leftToRight = 'leftToRight',\n rightToLeft = 'rightToLeft',\n weak = 'weak',\n}\n\nexport enum FlowDirection {\n horizontal = 'horizontal',\n vertical = 'vertical',\n onPath = 'onPath',\n}\n\nexport enum VerticalAlign {\n top = 'top',\n bottom = 'bottom',\n middle = 'middle',\n justify = 'justify',\n}\n\nexport enum BlendMode {\n normal = 'normal',\n screen = 'screen',\n overlay = 'overlay',\n darken = 'darken',\n lighten = 'lighten',\n colorDodge = 'colorDodge',\n colorBurn = 'colorBurn',\n hardLight = 'hardLight',\n softLight = 'softLight',\n difference = 'difference',\n exclusion = 'exclusion',\n multiply = 'multiply',\n hue = 'hue',\n saturation = 'saturation',\n color = 'color',\n luminosity = 'luminosity',\n}\n\nexport enum FitMode {\n fill = 'fill',\n fit = 'fit',\n smartCrop = 'smartCrop',\n manualCrop = 'manualCrop',\n}\n\nexport enum FitModePosition {\n topLeft = 'topLeft',\n topCenter = 'topCenter',\n topRight = 'topRight',\n centerLeft = 'centerLeft',\n center = 'center',\n centerRight = 'centerRight',\n bottomLeft = 'bottomLeft',\n bottomCenter = 'bottomCenter',\n bottomRight = 'bottomRight',\n}\n\nexport enum UpdateZIndexMethod {\n bringToFront = 'bringToFront',\n sendToBack = 'sendToBack',\n bringForward = 'bringForward',\n sendBackward = 'sendBackward',\n}\n\nexport enum FrameAnchorType {\n relative = 'relative',\n start = 'start',\n end = 'end',\n startAndEnd = 'startAndEnd',\n center = 'center',\n}\n\nexport enum AnchorTargetType {\n page = 'page',\n frame = 'frame',\n}\n\nexport enum AnchorTargetEdgeType {\n start = 'start',\n end = 'end',\n center = 'center',\n}\n\nexport class PageAnchorTarget {\n type = AnchorTargetType.page;\n}\n\nexport class FrameAnchorTarget {\n frameId: Id;\n edge: AnchorTargetEdgeType;\n type = AnchorTargetType.frame;\n\n constructor(id: Id, edge: AnchorTargetEdgeType) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n ((this.frameId = id), (this.edge = edge));\n }\n}\n\nexport type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;\n\nexport type RelativeFrameAnchor = {\n start: PropertyState<number>;\n end: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.relative;\n} & HasOverrideState;\n\nexport type StartFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.start;\n} & HasOverrideState;\n\nexport type EndFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.end;\n} & HasOverrideState;\n\nexport type StartAndEndFrameAnchor = {\n start: PropertyState<number>;\n startTarget: AnchorTarget;\n end: PropertyState<number>;\n endTarget: AnchorTarget;\n type: FrameAnchorType.startAndEnd;\n} & HasOverrideState;\n\nexport type CenterFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.center;\n} & HasOverrideState;\n\nexport type FrameAnchor =\n RelativeFrameAnchor | StartFrameAnchor | EndFrameAnchor | StartAndEndFrameAnchor | CenterFrameAnchor;\n\nexport type FrameAnchorProperties = {\n horizontal: boolean;\n type: FrameAnchorType;\n target: AnchorTarget;\n endTarget?: AnchorTarget | null;\n};\n\nexport type AnchorConfiguration = {\n allowedTypes: Set<FrameAnchorType>;\n allowedFrameIds: Set<Id>;\n};\n\nexport type FrameConfiguration = {\n horizontal: AnchorConfiguration;\n vertical: AnchorConfiguration;\n};\n\nexport enum CropType {\n frameCrop = 'frameCrop',\n assetCrop = 'assetCrop',\n}\n\n/**\n * Image-specific editing constraints.\n */\nexport type ImageFrameConstraints = {\n cropAllowed: PropertyState<boolean>;\n};\n\n/**\n * Text-specific editing constraints.\n */\nexport type TextFrameConstraints = {\n editingAllowed: PropertyState<boolean>;\n paragraphStyles: PropertyState<IdSetManagedConstraint>;\n characterStyles: PropertyState<IdSetManagedConstraint>;\n colors: PropertyState<IdSetManagedConstraint>;\n fontSizes: PropertyState<FontSizeRangeManagedConstraint>;\n};\n\nexport interface ManagedConstraint {\n allowed: boolean;\n}\n\n/**\n * A managed constraint represented by a set of allowed Id identifiers.\n *\n * Example: used to allow only a specific set of paragraph or character styles.\n * - `allowed`: If true, only the provided `ids` may be used.\n * - `ids`: The set of allowed Id values.\n */\nexport interface IdSetManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n ids: Id[];\n}\n\n/**\n * A managed constraint that restricts allowed font sizes to a continuous range.\n *\n * - `allowed`: If true, restricts allowed font sizes to [min, max] (inclusive).\n * - `min`: The minimum allowed font size (nullable).\n * - `max`: The maximum allowed font size (nullable).\n */\nexport interface FontSizeRangeManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n min: number | null;\n max: number | null;\n}\n\n/**\n * Frame editing constraints with optional frame-type-specific sub-properties.\n */\nexport type FrameConstraints = {\n selectionAllowed: PropertyState<boolean>;\n horizontalMovementAllowed: PropertyState<boolean>;\n verticalMovementAllowed: PropertyState<boolean>;\n rotationAllowed: PropertyState<boolean>;\n resizeAllowed: PropertyState<boolean>;\n proportionLocked: PropertyState<boolean>;\n /** Image-specific constraints. */\n image?: ImageFrameConstraints;\n /** Text-specific constraints. */\n text?: TextFrameConstraints;\n};\n\n/**\n * Image-specific constraints delta update.\n */\nexport interface ImageFrameConstraintsDeltaUpdate {\n cropAllowed?: {\n value: boolean;\n };\n}\n\n/**\n * Text-specific constraints delta update.\n */\nexport interface TextFrameConstraintsDeltaUpdate {\n editingAllowed?: {\n value: boolean;\n };\n paragraphStyles?: {\n value: IdSetManagedConstraint;\n };\n characterStyles?: {\n value: IdSetManagedConstraint;\n };\n colors?: {\n value: IdSetManagedConstraint;\n };\n fontSizes?: {\n value: FontSizeRangeManagedConstraint;\n };\n}\n\n/**\n * Frame constraints delta update with optional frame-type-specific sub-properties.\n */\nexport interface FrameConstraintsDeltaUpdate {\n selectionAllowed?: {\n value: boolean;\n };\n horizontalMovementAllowed?: {\n value: boolean;\n };\n verticalMovementAllowed?: {\n value: boolean;\n };\n rotationAllowed?: {\n value: boolean;\n };\n resizeAllowed?: {\n value: boolean;\n };\n proportionLocked?: {\n value: boolean;\n };\n /** Image-specific constraints update. */\n image?: ImageFrameConstraintsDeltaUpdate;\n /** Text-specific constraints update. */\n text?: TextFrameConstraintsDeltaUpdate;\n}\n\nexport type SmartCropSettings = SmartCropSettingsV1 | SmartCropSettingsV2;\n\nexport type SmartCropSettingsV1 = {\n version: SmartCropVersion.v1;\n};\n\nexport type SmartCropSettingsV2 = {\n version: SmartCropVersion.v2;\n horizontalBias: SmartCropAxisBias;\n verticalBias: SmartCropAxisBias;\n};\n\nexport enum SmartCropVersion {\n v1 = 'v1',\n v2 = 'v2',\n}\n\n/**\n * Latest version of the smart crop algorithm.\n * Keep in sync with @SmartCropVersion enum.\n */\nexport const LATEST_SMART_CROP_VERSION = SmartCropVersion.v2;\n\nexport enum SmartCropAxisBias {\n start = 'start',\n center = 'center',\n end = 'end',\n}\n"],"names":["ComponentFitEnum","AutoGrowDirection","ImageSourceTypeEnum","ComponentSourceTypeEnum","FrameTypeEnum","BarcodeSourceTypeEnum","TextDirection","FlowDirection","VerticalAlign","BlendMode","FitMode","FitModePosition","UpdateZIndexMethod","FrameAnchorType","AnchorTargetType","AnchorTargetEdgeType","CropType","SmartCropVersion","SmartCropAxisBias"],"mappings":";;AA0OO,IAAK,qCAAAA,sBAAL;AAIHA,oBAAA,QAAA,IAAS;AAKTA,oBAAA,OAAA,IAAQ;AAMRA,oBAAA,gBAAA,IAAiB;AAfT,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAuFL,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,KAAA,IAAM;AACNA,qBAAA,QAAA,IAAS;AACTA,qBAAA,MAAA,IAAO;AACPA,qBAAA,OAAA,IAAQ;AAJA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAOL,IAAK,wCAAAC,yBAAL;AACHA,uBAAA,KAAA,IAAM;AACNA,uBAAA,UAAA,IAAW;AACXA,uBAAA,WAAA,IAAY;AACZA,uBAAA,eAAA,IAAgB;AAJR,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAOL,IAAK,4CAAAC,6BAAL;AACHA,2BAAA,WAAA,IAAY;AADJ,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAIL,IAAK,kCAAAC,mBAAL;AACHA,iBAAA,MAAA,IAAO;AACPA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,SAAA,IAAU;AACVA,iBAAA,WAAA,IAAY;AACZA,iBAAA,eAAA,IAAgB;AANR,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AASL,IAAK,0CAAAC,2BAAL;AACHA,yBAAA,UAAA,IAAW;AACXA,yBAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAKL,IAAK,kCAAAC,mBAAL;AACHA,iBAAA,aAAA,IAAc;AACdA,iBAAA,aAA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AA,OAAA,IAAQ;AACRA,qBAAA,QAAA,IAAS;AACTA,qBAAA,KAAA,IAAM;AAHE,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -90,8 +90,9 @@ export type ShapeFrame = {
90
90
  };
91
91
  src: {
92
92
  type: ShapeType;
93
- cornerRadius: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;
93
+ cornerRadius?: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;
94
94
  sides?: number;
95
+ path?: string;
95
96
  };
96
97
  dropShadowSettings?: DropShadowSettings;
97
98
  gradient?: GradientUsage;
@@ -1 +1 @@
1
- {"version":3,"file":"FrameTypes.es.js","sources":["../../../src/types/FrameTypes.ts"],"sourcesContent":["// FramePropertiesDto\nimport { BarcodeCharacterSet, BarcodeErrorCorrectionLevel, BarcodeType, QuietZone } from './BarcodeTypes';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { HasOverrideState, Id, PropertyState } from './CommonTypes';\nimport { GradientUsage } from './GradientStyleTypes';\nimport { ComponentGridSettings } from '../types/ComponentGridTypes';\nimport {\n CornerRadiusAll,\n CornerRadiusNone,\n CornerRadiusOnly,\n ShapeFrameSource,\n ShapeType,\n ShapeContainerProperties,\n} from './ShapeTypes';\n\nexport type FrameLayoutType = {\n id: Id;\n layoutId: Id;\n horizontal: FrameAnchor;\n vertical: FrameAnchor;\n x: PropertyState<number>;\n y: PropertyState<number>;\n width: PropertyState<number>;\n height: PropertyState<number>;\n rotationDegrees: PropertyState<number>;\n scaleX: PropertyState<number>;\n scaleY: PropertyState<number>;\n isVisible: PropertyState<boolean>;\n fitMode: PropertyState<FitMode>;\n fitModePosition: PropertyState<FitModePosition>;\n smartCropSettings: PropertyState<SmartCropSettings>;\n hasImageCrop: PropertyState<boolean>;\n hasFrameSubjectArea: PropertyState<boolean>;\n minCopyfitting: PropertyState<number>;\n maxCopyfitting: PropertyState<number>;\n enableCopyfitting: PropertyState<boolean>;\n autoGrow: AutoGrowSettings;\n isShowingCustomCroppedAsset: boolean;\n customCroppedAssetCount: number;\n subjectId: PropertyState<Id | null>;\n componentGridSettings: PropertyState<ComponentGridSettings>;\n componentFit: PropertyState<ComponentFitEnum>;\n} | null;\n\n//Frame.image\nexport type FrameType = {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n // `imageUrl` is not generic: should be removed from model\n imageUrl: string;\n blendMode: string;\n opacity: number;\n};\n\nexport type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame | ComponentFrame | ComponentGridFrame;\n\nexport type ImageFrameVariableSource = {\n type: ImageSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type ImageFrameUrlSource = {\n type: ImageSourceTypeEnum.url;\n url: string;\n};\n\nexport type ImageFrameConnectorSource = {\n type: ImageSourceTypeEnum.connector;\n assetId: Id;\n id: Id;\n};\n\nexport type ImageFrameBrandkitMediaSource = {\n type: ImageSourceTypeEnum.brandKitMedia;\n name: string;\n};\n\nexport type ImageFrameSource =\n ImageFrameConnectorSource | ImageFrameVariableSource | ImageFrameUrlSource | ImageFrameBrandkitMediaSource;\n\n// used by new getter methods\nexport type ImageFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.image;\n src?: ImageFrameSource;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n container: {\n source: ShapeFrameSource;\n properties: ShapeContainerProperties;\n };\n};\n\nexport type ShapeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.shape;\n blendMode: BlendMode;\n shapeProperties: {\n enableFill: boolean;\n fillColor: ColorUsage;\n enableStroke: boolean;\n strokeWeight: number;\n strokeColor: ColorUsage;\n allCornersSame: boolean;\n fillOverprint: boolean;\n strokeOverprint: boolean;\n };\n src: {\n type: ShapeType;\n cornerRadius: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n sides?: number;\n };\n dropShadowSettings?: DropShadowSettings;\n gradient?: GradientUsage;\n};\n\nexport type TextFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.text;\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: TextDirection;\n flowDirection: FlowDirection;\n verticalAlign: VerticalAlign;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n hasVariable?: boolean;\n};\n\nexport type BarcodeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.barcode;\n blendMode: BlendMode;\n barcodeProperties: {\n enableBars: boolean;\n enableBackground: boolean;\n backgroundColor: ColorUsage;\n enableBarColor: boolean;\n barColor: ColorUsage;\n enableText: boolean;\n barHeight: number;\n magnification: number;\n quietZone: QuietZone;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars: boolean;\n barcodeOverprint: boolean;\n backgroundOverprint: boolean;\n };\n src?: BarcodeSource;\n barcodeType: BarcodeType;\n dropShadowSettings?: DropShadowSettings;\n};\n\nexport type BarcodeSource = BarcodeVariableSource | BarcodeTextSource;\n\nexport type BarcodeVariableSource = {\n type: BarcodeSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type BarcodeTextSource = {\n type: BarcodeSourceTypeEnum.text;\n text: string;\n};\n\nexport type ComponentFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.component;\n blendMode: BlendMode;\n src: ComponentSource;\n variableMappings: VariableMapping[];\n\n /**\n * @deprecated Use `componentFit` on frame properties instead. This property is deprecated and will be removed in a future version.\n * How the component fits within the frame.\n */\n fitMode: ComponentFitEnum;\n};\n\nexport type ComponentGridFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.componentGrid;\n blendMode: BlendMode;\n dataSourceVariableId?: Id | null;\n src?: ComponentSource | null;\n variableMappings: GridVariableMapping;\n};\n\nexport type GridVariableMapping = {\n mappings: Record<string, VariableMapping[] | null>;\n};\n\nexport type ComponentSource = ConnectorComponentSource;\n\nexport type ConnectorComponentSource = {\n type: ComponentSourceTypeEnum.connector;\n id: Id;\n assetId: Id | null;\n};\n\nexport type VariableMapping = {\n source: Id;\n target: Id;\n sourceField?: string;\n};\n\nexport enum ComponentFitEnum {\n /**\n * The component resizes to fit the frame size.\n */\n resize = 'resize',\n\n /**\n * The component scales to fit the frame size while maintaining its aspect ratio.\n */\n scale = 'scale',\n\n /**\n * The component first scales to fit the frame size while maintaining its aspect ratio,\n * then resizes to fill the remaining space.\n */\n scaleAndResize = 'scaleAndResize',\n}\n\nexport type CropSettings = {\n left: number;\n top: number;\n width: number;\n height: number;\n rotationDegrees: number;\n type: 'default';\n};\n\nexport type NoCropSettings = {\n type: 'noCrop';\n};\n\nexport type AutoGrowSettings = {\n enabled: PropertyState<boolean>;\n minWidth: PropertyState<number>;\n maxWidth: PropertyState<number>;\n minHeight: PropertyState<number>;\n maxHeight: PropertyState<number>;\n directions: PropertyState<Array<AutoGrowDirection>>;\n};\n\nexport interface AutoGrowDeltaUpdate {\n enabled?: {\n value: boolean;\n };\n minWidth?: {\n value: string | null;\n };\n maxWidth?: {\n value: string | null;\n };\n minHeight?: {\n value: string | null;\n };\n maxHeight?: {\n value: string | null;\n };\n directions?: {\n value: Array<AutoGrowDirection>;\n };\n}\n\nexport type DropShadowSettings = {\n enabled: boolean;\n distance: number;\n angleDegrees: number;\n blurRadius: number;\n color: ColorUsage;\n};\n\nexport interface ShadowSettingsDeltaUpdate {\n distance?: {\n value: string;\n };\n angleDegrees?: {\n value: number;\n };\n blurRadius?: {\n value: number;\n };\n enabled?: {\n value: boolean;\n };\n color?: {\n value: ColorUsage;\n };\n}\n\nexport enum AutoGrowDirection {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum ImageSourceTypeEnum {\n url = 'url',\n variable = 'variable',\n connector = 'connector',\n brandKitMedia = 'brandKitMedia',\n}\n\nexport enum ComponentSourceTypeEnum {\n connector = 'connector',\n}\n\nexport enum FrameTypeEnum {\n text = 'text',\n image = 'image',\n shape = 'shape',\n barcode = 'barcode',\n component = 'component',\n componentGrid = 'componentGrid',\n}\n\nexport enum BarcodeSourceTypeEnum {\n variable = 'variable',\n text = 'text',\n}\n\nexport enum TextDirection {\n leftToRight = 'leftToRight',\n rightToLeft = 'rightToLeft',\n weak = 'weak',\n}\n\nexport enum FlowDirection {\n horizontal = 'horizontal',\n vertical = 'vertical',\n onPath = 'onPath',\n}\n\nexport enum VerticalAlign {\n top = 'top',\n bottom = 'bottom',\n middle = 'middle',\n justify = 'justify',\n}\n\nexport enum BlendMode {\n normal = 'normal',\n screen = 'screen',\n overlay = 'overlay',\n darken = 'darken',\n lighten = 'lighten',\n colorDodge = 'colorDodge',\n colorBurn = 'colorBurn',\n hardLight = 'hardLight',\n softLight = 'softLight',\n difference = 'difference',\n exclusion = 'exclusion',\n multiply = 'multiply',\n hue = 'hue',\n saturation = 'saturation',\n color = 'color',\n luminosity = 'luminosity',\n}\n\nexport enum FitMode {\n fill = 'fill',\n fit = 'fit',\n smartCrop = 'smartCrop',\n manualCrop = 'manualCrop',\n}\n\nexport enum FitModePosition {\n topLeft = 'topLeft',\n topCenter = 'topCenter',\n topRight = 'topRight',\n centerLeft = 'centerLeft',\n center = 'center',\n centerRight = 'centerRight',\n bottomLeft = 'bottomLeft',\n bottomCenter = 'bottomCenter',\n bottomRight = 'bottomRight',\n}\n\nexport enum UpdateZIndexMethod {\n bringToFront = 'bringToFront',\n sendToBack = 'sendToBack',\n bringForward = 'bringForward',\n sendBackward = 'sendBackward',\n}\n\nexport enum FrameAnchorType {\n relative = 'relative',\n start = 'start',\n end = 'end',\n startAndEnd = 'startAndEnd',\n center = 'center',\n}\n\nexport enum AnchorTargetType {\n page = 'page',\n frame = 'frame',\n}\n\nexport enum AnchorTargetEdgeType {\n start = 'start',\n end = 'end',\n center = 'center',\n}\n\nexport class PageAnchorTarget {\n type = AnchorTargetType.page;\n}\n\nexport class FrameAnchorTarget {\n frameId: Id;\n edge: AnchorTargetEdgeType;\n type = AnchorTargetType.frame;\n\n constructor(id: Id, edge: AnchorTargetEdgeType) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n ((this.frameId = id), (this.edge = edge));\n }\n}\n\nexport type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;\n\nexport type RelativeFrameAnchor = {\n start: PropertyState<number>;\n end: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.relative;\n} & HasOverrideState;\n\nexport type StartFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.start;\n} & HasOverrideState;\n\nexport type EndFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.end;\n} & HasOverrideState;\n\nexport type StartAndEndFrameAnchor = {\n start: PropertyState<number>;\n startTarget: AnchorTarget;\n end: PropertyState<number>;\n endTarget: AnchorTarget;\n type: FrameAnchorType.startAndEnd;\n} & HasOverrideState;\n\nexport type CenterFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.center;\n} & HasOverrideState;\n\nexport type FrameAnchor =\n RelativeFrameAnchor | StartFrameAnchor | EndFrameAnchor | StartAndEndFrameAnchor | CenterFrameAnchor;\n\nexport type FrameAnchorProperties = {\n horizontal: boolean;\n type: FrameAnchorType;\n target: AnchorTarget;\n endTarget?: AnchorTarget | null;\n};\n\nexport type AnchorConfiguration = {\n allowedTypes: Set<FrameAnchorType>;\n allowedFrameIds: Set<Id>;\n};\n\nexport type FrameConfiguration = {\n horizontal: AnchorConfiguration;\n vertical: AnchorConfiguration;\n};\n\nexport enum CropType {\n frameCrop = 'frameCrop',\n assetCrop = 'assetCrop',\n}\n\n/**\n * Image-specific editing constraints.\n */\nexport type ImageFrameConstraints = {\n cropAllowed: PropertyState<boolean>;\n};\n\n/**\n * Text-specific editing constraints.\n */\nexport type TextFrameConstraints = {\n editingAllowed: PropertyState<boolean>;\n paragraphStyles: PropertyState<IdSetManagedConstraint>;\n characterStyles: PropertyState<IdSetManagedConstraint>;\n colors: PropertyState<IdSetManagedConstraint>;\n fontSizes: PropertyState<FontSizeRangeManagedConstraint>;\n};\n\nexport interface ManagedConstraint {\n allowed: boolean;\n}\n\n/**\n * A managed constraint represented by a set of allowed Id identifiers.\n *\n * Example: used to allow only a specific set of paragraph or character styles.\n * - `allowed`: If true, only the provided `ids` may be used.\n * - `ids`: The set of allowed Id values.\n */\nexport interface IdSetManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n ids: Id[];\n}\n\n/**\n * A managed constraint that restricts allowed font sizes to a continuous range.\n *\n * - `allowed`: If true, restricts allowed font sizes to [min, max] (inclusive).\n * - `min`: The minimum allowed font size (nullable).\n * - `max`: The maximum allowed font size (nullable).\n */\nexport interface FontSizeRangeManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n min: number | null;\n max: number | null;\n}\n\n/**\n * Frame editing constraints with optional frame-type-specific sub-properties.\n */\nexport type FrameConstraints = {\n selectionAllowed: PropertyState<boolean>;\n horizontalMovementAllowed: PropertyState<boolean>;\n verticalMovementAllowed: PropertyState<boolean>;\n rotationAllowed: PropertyState<boolean>;\n resizeAllowed: PropertyState<boolean>;\n proportionLocked: PropertyState<boolean>;\n /** Image-specific constraints. */\n image?: ImageFrameConstraints;\n /** Text-specific constraints. */\n text?: TextFrameConstraints;\n};\n\n/**\n * Image-specific constraints delta update.\n */\nexport interface ImageFrameConstraintsDeltaUpdate {\n cropAllowed?: {\n value: boolean;\n };\n}\n\n/**\n * Text-specific constraints delta update.\n */\nexport interface TextFrameConstraintsDeltaUpdate {\n editingAllowed?: {\n value: boolean;\n };\n paragraphStyles?: {\n value: IdSetManagedConstraint;\n };\n characterStyles?: {\n value: IdSetManagedConstraint;\n };\n colors?: {\n value: IdSetManagedConstraint;\n };\n fontSizes?: {\n value: FontSizeRangeManagedConstraint;\n };\n}\n\n/**\n * Frame constraints delta update with optional frame-type-specific sub-properties.\n */\nexport interface FrameConstraintsDeltaUpdate {\n selectionAllowed?: {\n value: boolean;\n };\n horizontalMovementAllowed?: {\n value: boolean;\n };\n verticalMovementAllowed?: {\n value: boolean;\n };\n rotationAllowed?: {\n value: boolean;\n };\n resizeAllowed?: {\n value: boolean;\n };\n proportionLocked?: {\n value: boolean;\n };\n /** Image-specific constraints update. */\n image?: ImageFrameConstraintsDeltaUpdate;\n /** Text-specific constraints update. */\n text?: TextFrameConstraintsDeltaUpdate;\n}\n\nexport type SmartCropSettings = SmartCropSettingsV1 | SmartCropSettingsV2;\n\nexport type SmartCropSettingsV1 = {\n version: SmartCropVersion.v1;\n};\n\nexport type SmartCropSettingsV2 = {\n version: SmartCropVersion.v2;\n horizontalBias: SmartCropAxisBias;\n verticalBias: SmartCropAxisBias;\n};\n\nexport enum SmartCropVersion {\n v1 = 'v1',\n v2 = 'v2',\n}\n\n/**\n * Latest version of the smart crop algorithm.\n * Keep in sync with @SmartCropVersion enum.\n */\nexport const LATEST_SMART_CROP_VERSION = SmartCropVersion.v2;\n\nexport enum SmartCropAxisBias {\n start = 'start',\n center = 'center',\n end = 'end',\n}\n"],"names":["ComponentFitEnum","AutoGrowDirection","ImageSourceTypeEnum","ComponentSourceTypeEnum","FrameTypeEnum","BarcodeSourceTypeEnum","TextDirection","FlowDirection","VerticalAlign","BlendMode","FitMode","FitModePosition","UpdateZIndexMethod","FrameAnchorType","AnchorTargetType","AnchorTargetEdgeType","CropType","SmartCropVersion","SmartCropAxisBias"],"mappings":"AAqOO,IAAK,qCAAAA,sBAAL;AAIHA,oBAAA,QAAA,IAAS;AAKTA,oBAAA,OAAA,IAAQ;AAMRA,oBAAA,gBAAA,IAAiB;AAfT,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAuFL,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,KAAA,IAAM;AACNA,qBAAA,QAAA,IAAS;AACTA,qBA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AA;AAQL,IAAK,qCAAAC,sBAAL;AACHA,oBAAA,MAAA,IAAO;AACPA,oBAAA,OAAA,IAAQ;AAFA,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAKL,IAAK,yCAAAC,0BAAL;AACHA,wBAAA,OAAA,IAAQ;AACRA,wBAAA,KAAA,IAAM;AACNA,wBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;AAML,MAAM,iBAAiB;AAAA,EAAvB,cAAA;AACH,SAAA,OAAO;AAAA,EAAA;AACX;AAEO,MAAM,kBAAkB;AAAA,EAK3B,YAAY,IAAQ,MAA4B;AAFhD,SAAA,OAAO;AAID,SAAK,UAAU,IAAM,KAAK,OAAO;AAAA,EACvC;AACJ;AAyDO,IAAK,6BAAAC,cAAL;AACHA,YAAA,WAAA,IAAY;AACZA,YAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,YAAA,CAAA,CAAA;AA0IL,IAAK,qCAAAC,sBAAL;AACHA,oBAAA,IAAA,IAAK;AACLA,oBAAA,IAAA,IAAK;AAFG,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AASL,MAAM,4BAA4B;AAElC,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,OAAA,IAAQ;AACRA,qBAAA,QAAA,IAAS;AACTA,qBAAA,KAAA,IAAM;AAHE,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"FrameTypes.es.js","sources":["../../../src/types/FrameTypes.ts"],"sourcesContent":["// FramePropertiesDto\nimport { BarcodeCharacterSet, BarcodeErrorCorrectionLevel, BarcodeType, QuietZone } from './BarcodeTypes';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { HasOverrideState, Id, PropertyState } from './CommonTypes';\nimport { GradientUsage } from './GradientStyleTypes';\nimport { ComponentGridSettings } from '../types/ComponentGridTypes';\nimport {\n CornerRadiusAll,\n CornerRadiusNone,\n CornerRadiusOnly,\n ShapeFrameSource,\n ShapeType,\n ShapeContainerProperties,\n} from './ShapeTypes';\n\nexport type FrameLayoutType = {\n id: Id;\n layoutId: Id;\n horizontal: FrameAnchor;\n vertical: FrameAnchor;\n x: PropertyState<number>;\n y: PropertyState<number>;\n width: PropertyState<number>;\n height: PropertyState<number>;\n rotationDegrees: PropertyState<number>;\n scaleX: PropertyState<number>;\n scaleY: PropertyState<number>;\n isVisible: PropertyState<boolean>;\n fitMode: PropertyState<FitMode>;\n fitModePosition: PropertyState<FitModePosition>;\n smartCropSettings: PropertyState<SmartCropSettings>;\n hasImageCrop: PropertyState<boolean>;\n hasFrameSubjectArea: PropertyState<boolean>;\n minCopyfitting: PropertyState<number>;\n maxCopyfitting: PropertyState<number>;\n enableCopyfitting: PropertyState<boolean>;\n autoGrow: AutoGrowSettings;\n isShowingCustomCroppedAsset: boolean;\n customCroppedAssetCount: number;\n subjectId: PropertyState<Id | null>;\n componentGridSettings: PropertyState<ComponentGridSettings>;\n componentFit: PropertyState<ComponentFitEnum>;\n} | null;\n\n//Frame.image\nexport type FrameType = {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n // `imageUrl` is not generic: should be removed from model\n imageUrl: string;\n blendMode: string;\n opacity: number;\n};\n\nexport type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame | ComponentFrame | ComponentGridFrame;\n\nexport type ImageFrameVariableSource = {\n type: ImageSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type ImageFrameUrlSource = {\n type: ImageSourceTypeEnum.url;\n url: string;\n};\n\nexport type ImageFrameConnectorSource = {\n type: ImageSourceTypeEnum.connector;\n assetId: Id;\n id: Id;\n};\n\nexport type ImageFrameBrandkitMediaSource = {\n type: ImageSourceTypeEnum.brandKitMedia;\n name: string;\n};\n\nexport type ImageFrameSource =\n ImageFrameConnectorSource | ImageFrameVariableSource | ImageFrameUrlSource | ImageFrameBrandkitMediaSource;\n\n// used by new getter methods\nexport type ImageFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.image;\n src?: ImageFrameSource;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n container: {\n source: ShapeFrameSource;\n properties: ShapeContainerProperties;\n };\n};\n\nexport type ShapeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.shape;\n blendMode: BlendMode;\n shapeProperties: {\n enableFill: boolean;\n fillColor: ColorUsage;\n enableStroke: boolean;\n strokeWeight: number;\n strokeColor: ColorUsage;\n allCornersSame: boolean;\n fillOverprint: boolean;\n strokeOverprint: boolean;\n };\n src: {\n type: ShapeType;\n // present for `rectangle` and `polygon`, absent for `ellipse` and `custom`\n cornerRadius?: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n // present for `polygon` only\n sides?: number;\n // present for `custom` only; an SVG-style path string (`M`/`L`/`C`/`Z` commands only)\n // in coordinates relative to the frame (`0` to `1`), not absolute units\n path?: string;\n };\n dropShadowSettings?: DropShadowSettings;\n gradient?: GradientUsage;\n};\n\nexport type TextFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.text;\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: TextDirection;\n flowDirection: FlowDirection;\n verticalAlign: VerticalAlign;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n hasVariable?: boolean;\n};\n\nexport type BarcodeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.barcode;\n blendMode: BlendMode;\n barcodeProperties: {\n enableBars: boolean;\n enableBackground: boolean;\n backgroundColor: ColorUsage;\n enableBarColor: boolean;\n barColor: ColorUsage;\n enableText: boolean;\n barHeight: number;\n magnification: number;\n quietZone: QuietZone;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars: boolean;\n barcodeOverprint: boolean;\n backgroundOverprint: boolean;\n };\n src?: BarcodeSource;\n barcodeType: BarcodeType;\n dropShadowSettings?: DropShadowSettings;\n};\n\nexport type BarcodeSource = BarcodeVariableSource | BarcodeTextSource;\n\nexport type BarcodeVariableSource = {\n type: BarcodeSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type BarcodeTextSource = {\n type: BarcodeSourceTypeEnum.text;\n text: string;\n};\n\nexport type ComponentFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.component;\n blendMode: BlendMode;\n src: ComponentSource;\n variableMappings: VariableMapping[];\n\n /**\n * @deprecated Use `componentFit` on frame properties instead. This property is deprecated and will be removed in a future version.\n * How the component fits within the frame.\n */\n fitMode: ComponentFitEnum;\n};\n\nexport type ComponentGridFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.componentGrid;\n blendMode: BlendMode;\n dataSourceVariableId?: Id | null;\n src?: ComponentSource | null;\n variableMappings: GridVariableMapping;\n};\n\nexport type GridVariableMapping = {\n mappings: Record<string, VariableMapping[] | null>;\n};\n\nexport type ComponentSource = ConnectorComponentSource;\n\nexport type ConnectorComponentSource = {\n type: ComponentSourceTypeEnum.connector;\n id: Id;\n assetId: Id | null;\n};\n\nexport type VariableMapping = {\n source: Id;\n target: Id;\n sourceField?: string;\n};\n\nexport enum ComponentFitEnum {\n /**\n * The component resizes to fit the frame size.\n */\n resize = 'resize',\n\n /**\n * The component scales to fit the frame size while maintaining its aspect ratio.\n */\n scale = 'scale',\n\n /**\n * The component first scales to fit the frame size while maintaining its aspect ratio,\n * then resizes to fill the remaining space.\n */\n scaleAndResize = 'scaleAndResize',\n}\n\nexport type CropSettings = {\n left: number;\n top: number;\n width: number;\n height: number;\n rotationDegrees: number;\n type: 'default';\n};\n\nexport type NoCropSettings = {\n type: 'noCrop';\n};\n\nexport type AutoGrowSettings = {\n enabled: PropertyState<boolean>;\n minWidth: PropertyState<number>;\n maxWidth: PropertyState<number>;\n minHeight: PropertyState<number>;\n maxHeight: PropertyState<number>;\n directions: PropertyState<Array<AutoGrowDirection>>;\n};\n\nexport interface AutoGrowDeltaUpdate {\n enabled?: {\n value: boolean;\n };\n minWidth?: {\n value: string | null;\n };\n maxWidth?: {\n value: string | null;\n };\n minHeight?: {\n value: string | null;\n };\n maxHeight?: {\n value: string | null;\n };\n directions?: {\n value: Array<AutoGrowDirection>;\n };\n}\n\nexport type DropShadowSettings = {\n enabled: boolean;\n distance: number;\n angleDegrees: number;\n blurRadius: number;\n color: ColorUsage;\n};\n\nexport interface ShadowSettingsDeltaUpdate {\n distance?: {\n value: string;\n };\n angleDegrees?: {\n value: number;\n };\n blurRadius?: {\n value: number;\n };\n enabled?: {\n value: boolean;\n };\n color?: {\n value: ColorUsage;\n };\n}\n\nexport enum AutoGrowDirection {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum ImageSourceTypeEnum {\n url = 'url',\n variable = 'variable',\n connector = 'connector',\n brandKitMedia = 'brandKitMedia',\n}\n\nexport enum ComponentSourceTypeEnum {\n connector = 'connector',\n}\n\nexport enum FrameTypeEnum {\n text = 'text',\n image = 'image',\n shape = 'shape',\n barcode = 'barcode',\n component = 'component',\n componentGrid = 'componentGrid',\n}\n\nexport enum BarcodeSourceTypeEnum {\n variable = 'variable',\n text = 'text',\n}\n\nexport enum TextDirection {\n leftToRight = 'leftToRight',\n rightToLeft = 'rightToLeft',\n weak = 'weak',\n}\n\nexport enum FlowDirection {\n horizontal = 'horizontal',\n vertical = 'vertical',\n onPath = 'onPath',\n}\n\nexport enum VerticalAlign {\n top = 'top',\n bottom = 'bottom',\n middle = 'middle',\n justify = 'justify',\n}\n\nexport enum BlendMode {\n normal = 'normal',\n screen = 'screen',\n overlay = 'overlay',\n darken = 'darken',\n lighten = 'lighten',\n colorDodge = 'colorDodge',\n colorBurn = 'colorBurn',\n hardLight = 'hardLight',\n softLight = 'softLight',\n difference = 'difference',\n exclusion = 'exclusion',\n multiply = 'multiply',\n hue = 'hue',\n saturation = 'saturation',\n color = 'color',\n luminosity = 'luminosity',\n}\n\nexport enum FitMode {\n fill = 'fill',\n fit = 'fit',\n smartCrop = 'smartCrop',\n manualCrop = 'manualCrop',\n}\n\nexport enum FitModePosition {\n topLeft = 'topLeft',\n topCenter = 'topCenter',\n topRight = 'topRight',\n centerLeft = 'centerLeft',\n center = 'center',\n centerRight = 'centerRight',\n bottomLeft = 'bottomLeft',\n bottomCenter = 'bottomCenter',\n bottomRight = 'bottomRight',\n}\n\nexport enum UpdateZIndexMethod {\n bringToFront = 'bringToFront',\n sendToBack = 'sendToBack',\n bringForward = 'bringForward',\n sendBackward = 'sendBackward',\n}\n\nexport enum FrameAnchorType {\n relative = 'relative',\n start = 'start',\n end = 'end',\n startAndEnd = 'startAndEnd',\n center = 'center',\n}\n\nexport enum AnchorTargetType {\n page = 'page',\n frame = 'frame',\n}\n\nexport enum AnchorTargetEdgeType {\n start = 'start',\n end = 'end',\n center = 'center',\n}\n\nexport class PageAnchorTarget {\n type = AnchorTargetType.page;\n}\n\nexport class FrameAnchorTarget {\n frameId: Id;\n edge: AnchorTargetEdgeType;\n type = AnchorTargetType.frame;\n\n constructor(id: Id, edge: AnchorTargetEdgeType) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n ((this.frameId = id), (this.edge = edge));\n }\n}\n\nexport type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;\n\nexport type RelativeFrameAnchor = {\n start: PropertyState<number>;\n end: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.relative;\n} & HasOverrideState;\n\nexport type StartFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.start;\n} & HasOverrideState;\n\nexport type EndFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.end;\n} & HasOverrideState;\n\nexport type StartAndEndFrameAnchor = {\n start: PropertyState<number>;\n startTarget: AnchorTarget;\n end: PropertyState<number>;\n endTarget: AnchorTarget;\n type: FrameAnchorType.startAndEnd;\n} & HasOverrideState;\n\nexport type CenterFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.center;\n} & HasOverrideState;\n\nexport type FrameAnchor =\n RelativeFrameAnchor | StartFrameAnchor | EndFrameAnchor | StartAndEndFrameAnchor | CenterFrameAnchor;\n\nexport type FrameAnchorProperties = {\n horizontal: boolean;\n type: FrameAnchorType;\n target: AnchorTarget;\n endTarget?: AnchorTarget | null;\n};\n\nexport type AnchorConfiguration = {\n allowedTypes: Set<FrameAnchorType>;\n allowedFrameIds: Set<Id>;\n};\n\nexport type FrameConfiguration = {\n horizontal: AnchorConfiguration;\n vertical: AnchorConfiguration;\n};\n\nexport enum CropType {\n frameCrop = 'frameCrop',\n assetCrop = 'assetCrop',\n}\n\n/**\n * Image-specific editing constraints.\n */\nexport type ImageFrameConstraints = {\n cropAllowed: PropertyState<boolean>;\n};\n\n/**\n * Text-specific editing constraints.\n */\nexport type TextFrameConstraints = {\n editingAllowed: PropertyState<boolean>;\n paragraphStyles: PropertyState<IdSetManagedConstraint>;\n characterStyles: PropertyState<IdSetManagedConstraint>;\n colors: PropertyState<IdSetManagedConstraint>;\n fontSizes: PropertyState<FontSizeRangeManagedConstraint>;\n};\n\nexport interface ManagedConstraint {\n allowed: boolean;\n}\n\n/**\n * A managed constraint represented by a set of allowed Id identifiers.\n *\n * Example: used to allow only a specific set of paragraph or character styles.\n * - `allowed`: If true, only the provided `ids` may be used.\n * - `ids`: The set of allowed Id values.\n */\nexport interface IdSetManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n ids: Id[];\n}\n\n/**\n * A managed constraint that restricts allowed font sizes to a continuous range.\n *\n * - `allowed`: If true, restricts allowed font sizes to [min, max] (inclusive).\n * - `min`: The minimum allowed font size (nullable).\n * - `max`: The maximum allowed font size (nullable).\n */\nexport interface FontSizeRangeManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n min: number | null;\n max: number | null;\n}\n\n/**\n * Frame editing constraints with optional frame-type-specific sub-properties.\n */\nexport type FrameConstraints = {\n selectionAllowed: PropertyState<boolean>;\n horizontalMovementAllowed: PropertyState<boolean>;\n verticalMovementAllowed: PropertyState<boolean>;\n rotationAllowed: PropertyState<boolean>;\n resizeAllowed: PropertyState<boolean>;\n proportionLocked: PropertyState<boolean>;\n /** Image-specific constraints. */\n image?: ImageFrameConstraints;\n /** Text-specific constraints. */\n text?: TextFrameConstraints;\n};\n\n/**\n * Image-specific constraints delta update.\n */\nexport interface ImageFrameConstraintsDeltaUpdate {\n cropAllowed?: {\n value: boolean;\n };\n}\n\n/**\n * Text-specific constraints delta update.\n */\nexport interface TextFrameConstraintsDeltaUpdate {\n editingAllowed?: {\n value: boolean;\n };\n paragraphStyles?: {\n value: IdSetManagedConstraint;\n };\n characterStyles?: {\n value: IdSetManagedConstraint;\n };\n colors?: {\n value: IdSetManagedConstraint;\n };\n fontSizes?: {\n value: FontSizeRangeManagedConstraint;\n };\n}\n\n/**\n * Frame constraints delta update with optional frame-type-specific sub-properties.\n */\nexport interface FrameConstraintsDeltaUpdate {\n selectionAllowed?: {\n value: boolean;\n };\n horizontalMovementAllowed?: {\n value: boolean;\n };\n verticalMovementAllowed?: {\n value: boolean;\n };\n rotationAllowed?: {\n value: boolean;\n };\n resizeAllowed?: {\n value: boolean;\n };\n proportionLocked?: {\n value: boolean;\n };\n /** Image-specific constraints update. */\n image?: ImageFrameConstraintsDeltaUpdate;\n /** Text-specific constraints update. */\n text?: TextFrameConstraintsDeltaUpdate;\n}\n\nexport type SmartCropSettings = SmartCropSettingsV1 | SmartCropSettingsV2;\n\nexport type SmartCropSettingsV1 = {\n version: SmartCropVersion.v1;\n};\n\nexport type SmartCropSettingsV2 = {\n version: SmartCropVersion.v2;\n horizontalBias: SmartCropAxisBias;\n verticalBias: SmartCropAxisBias;\n};\n\nexport enum SmartCropVersion {\n v1 = 'v1',\n v2 = 'v2',\n}\n\n/**\n * Latest version of the smart crop algorithm.\n * Keep in sync with @SmartCropVersion enum.\n */\nexport const LATEST_SMART_CROP_VERSION = SmartCropVersion.v2;\n\nexport enum SmartCropAxisBias {\n start = 'start',\n center = 'center',\n end = 'end',\n}\n"],"names":["ComponentFitEnum","AutoGrowDirection","ImageSourceTypeEnum","ComponentSourceTypeEnum","FrameTypeEnum","BarcodeSourceTypeEnum","TextDirection","FlowDirection","VerticalAlign","BlendMode","FitMode","FitModePosition","UpdateZIndexMethod","FrameAnchorType","AnchorTargetType","AnchorTargetEdgeType","CropType","SmartCropVersion","SmartCropAxisBias"],"mappings":"AA0OO,IAAK,qCAAAA,sBAAL;AAIHA,oBAAA,QAAA,IAAS;AAKTA,oBAAA,OAAA,IAAQ;AAMRA,oBAAA,gBAAA,IAAiB;AAfT,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAuFL,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,KAAA,IAAM;AACNA,qBAAA,QAAA,IAAS;AACTA,qBAAA,MAAA,IAAO;AACPA,qBAAA,OAAA,IAAQ;AAJA,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;AAOL,IAAK,wCAAAC,yBAAL;AACHA,uBAAA,KAAA,IAAM;AACNA,uBAAA,UAAA,IAAW;AACXA,uBAAA,WAAA,IAAY;AACZA,uBAAA,eAAA,IAAgB;AAJR,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AAOL,IAAK,4CAAAC,6BAAL;AACHA,2BAAA,WAAA,IAAY;AADJ,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAIL,IAAK,kCAAAC,mBAAL;AACHA,iBAAA,MAAA,IAAO;AACPA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,SAAA,IAAU;AACVA,iBAAA,WAAA,IAAY;AACZA,iBAAA,eAAA,IAAgB;AANR,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AASL,IAAK,0CAAAC,2BAAL;A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AAC,sBAAL;AACHA,oBAAA,IAAA,IAAK;AACLA,oBAAA,IAAA,IAAK;AAFG,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AASL,MAAM,4BAA4B;AAElC,IAAK,sCAAAC,uBAAL;AACHA,qBAAA,OAAA,IAAQ;AACRA,qBAAA,QAAA,IAAS;AACTA,qBAAA,KAAA,IAAM;AAHE,SAAAA;AAAA,GAAA,qBAAA,CAAA,CAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"VariableTypes.cjs.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":";;AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gB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gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AA8EL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"VariableTypes.cjs.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n description?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":";;AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAyHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AA8EL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;;;;;;;;;"}
@@ -51,6 +51,7 @@ export interface Variable {
51
51
  occurrences: number;
52
52
  placeholder?: string | null;
53
53
  helpText?: string | null;
54
+ description?: string | null;
54
55
  privateData: PrivateData;
55
56
  }
56
57
  export interface ImageVariable extends Variable {
@@ -1 +1 @@
1
- {"version":3,"file":"VariableTypes.es.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":"AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAwHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AA8EL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"VariableTypes.es.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n description?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":"AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAyHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CA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dk",
3
3
  "private": false,
4
- "version": "1.47.0",
4
+ "version": "1.48.0",
5
5
  "description": "The sdk for the chili editor",
6
6
  "repository": {
7
7
  "type": "git",