/// import { AddImageOptions } from '@cesdk/engine'; import { AddVideoOptions } from '@cesdk/engine'; import { AnimationEasing } from '@cesdk/engine'; import { AnimationEntry } from '@cesdk/engine'; import { AnimationOptions } from '@cesdk/engine'; import { AnimationType } from '@cesdk/engine'; import { AnimationTypeLonghand } from '@cesdk/engine'; import { AnimationTypeShorthand } from '@cesdk/engine'; import { ApplicationMimeType } from '@cesdk/engine'; import { ApplyAssetOptions } from '@cesdk/engine'; import { Asset } from '@cesdk/engine'; import { AssetAPI } from '@cesdk/engine'; import { AssetBooleanProperty } from '@cesdk/engine'; import { AssetCMYKColor } from '@cesdk/engine'; import { AssetColor } from '@cesdk/engine'; import { AssetColorProperty } from '@cesdk/engine'; import { AssetContentAspectRatio } from '@cesdk/engine'; import { AssetDefinition } from '@cesdk/engine'; import { AssetEnumProperty } from '@cesdk/engine'; import { AssetFixedAspectRatio } from '@cesdk/engine'; import { AssetFixedSize } from '@cesdk/engine'; import { AssetFreeAspectRatio } from '@cesdk/engine'; import { AssetGroups } from '@cesdk/engine'; import { AssetMetaData } from '@cesdk/engine'; import { AssetNumberProperty } from '@cesdk/engine'; import { AssetPayload } from '@cesdk/engine'; import { AssetProperty } from '@cesdk/engine'; import { AssetQueryData } from '@cesdk/engine'; import { AssetResult } from '@cesdk/engine'; import { AssetRGBColor } from '@cesdk/engine'; import { AssetSource } from '@cesdk/engine'; import { AssetSpotColor } from '@cesdk/engine'; import { AssetsQueryResult } from '@cesdk/engine'; import { AssetStringProperty } from '@cesdk/engine'; import { AssetTransformPreset } from '@cesdk/engine'; import { AudioExportOptions } from '@cesdk/engine'; import { AudioMimeType } from '@cesdk/engine'; import { BlendMode } from '@cesdk/engine'; import { BlockAPI } from '@cesdk/engine'; import { BlockEvent } from '@cesdk/engine'; import { BlockState } from '@cesdk/engine'; import { BlurType } from '@cesdk/engine'; import { BlurTypeLonghand } from '@cesdk/engine'; import { BlurTypeShorthand } from '@cesdk/engine'; import { BooleanOperation } from '@cesdk/engine'; import { Buffer } from '@cesdk/engine'; import { Canvas } from '@cesdk/engine'; import { checkVideoExportSupport } from '@cesdk/engine'; import { checkVideoSupport } from '@cesdk/engine'; import { CMYK } from '@cesdk/engine'; import { CMYKColor } from '@cesdk/engine'; import type { Color } from '@cesdk/engine'; import { ColorSpace } from '@cesdk/engine'; import { CompleteAssetResult } from '@cesdk/engine'; import { CompressionFormat as CompressionFormat_2 } from '@cesdk/engine'; import { CompressionLevel } from '@cesdk/engine'; import { ContentFillMode } from '@cesdk/engine'; import { CreateSceneOptions } from '@cesdk/engine'; import { default as CreativeEngine } from '@cesdk/engine'; import { default as CreativeEngine_2 } from '@cesdk/engine'; import { CutoutOperation } from '@cesdk/engine'; import { CutoutType } from '@cesdk/engine'; import { DefaultAssetSourceId } from '@cesdk/engine'; import { DemoAssetSourceId } from '@cesdk/engine'; import { DesignBlockId } from '@cesdk/engine'; import { DesignBlockType } from '@cesdk/engine'; import { DesignBlockTypeLonghand } from '@cesdk/engine'; import { DesignBlockTypeShorthand } from '@cesdk/engine'; import { DesignUnit } from '@cesdk/engine'; import { DominantColor } from '@cesdk/engine'; import { DominantColorsOptions } from '@cesdk/engine'; import { DropShadowOptions } from '@cesdk/engine'; import { EditMode } from '@cesdk/engine'; import { EditorAPI } from '@cesdk/engine'; import { EffectType } from '@cesdk/engine'; import { EffectTypeLonghand } from '@cesdk/engine'; import { EffectTypeShorthand } from '@cesdk/engine'; import { Configuration as _EngineConfiguration } from '@cesdk/engine'; import { ExportOptions as EngineExportOptions } from '@cesdk/engine'; import { EnginePlugin } from '@cesdk/engine'; import { EnginePluginContext } from '@cesdk/engine'; import { EventAPI } from '@cesdk/engine'; import { ExtendedKeyboardEvent } from 'mousetrap'; import { FillType } from '@cesdk/engine'; import { FillTypeLonghand } from '@cesdk/engine'; import { FillTypeShorthand } from '@cesdk/engine'; import { Font } from '@cesdk/engine'; import { FontMetrics } from '@cesdk/engine'; import { FontStyle } from '@cesdk/engine'; import { FontWeight } from '@cesdk/engine'; import { GradientColorStop } from '@cesdk/engine'; import { GradientstopRGBA } from '@cesdk/engine'; import { HexColorString } from '@cesdk/engine'; import { HistoryId } from '@cesdk/engine'; import { HorizontalBlockAlignment } from '@cesdk/engine'; import { HTMLCreativeEngineCanvasElement } from '@cesdk/engine'; import type { i18n } from 'i18next'; import { ImageMimeType } from '@cesdk/engine'; import { Logger } from '@cesdk/engine'; import { LogLevel } from '@cesdk/engine'; import { MimeType as MimeType_2 } from '@cesdk/engine'; import { ObjectType } from '@cesdk/engine'; import { ObjectTypeLonghand } from '@cesdk/engine'; import { ObjectTypeShorthand } from '@cesdk/engine'; import { OffscreenCanvas as OffscreenCanvas_2 } from '@cesdk/engine'; import { PageGuidesSource } from '@cesdk/engine'; import { PaletteColor } from '@cesdk/engine'; import { PositionMode } from '@cesdk/engine'; import { PropertyType } from '@cesdk/engine'; import { Range as Range_2 } from '@cesdk/engine'; import { RGBA } from '@cesdk/engine'; import { RGBAColor } from '@cesdk/engine'; import { RGBColor } from '@cesdk/engine'; import { RoleString } from '@cesdk/engine'; import { Root } from 'react-dom/client'; import { SceneAPI } from '@cesdk/engine'; import { SceneLayout } from '@cesdk/engine'; import { SceneMode } from '@cesdk/engine'; import { Scope } from '@cesdk/engine'; import { SettingsBool } from '@cesdk/engine'; import { SettingsColor } from '@cesdk/engine'; import { SettingsColorRGBA } from '@cesdk/engine'; import { SettingsEnum } from '@cesdk/engine'; import { SettingsFloat } from '@cesdk/engine'; import { SettingsString } from '@cesdk/engine'; import { SettingType } from '@cesdk/engine'; import { ShapeType } from '@cesdk/engine'; import { ShapeTypeLonghand } from '@cesdk/engine'; import { ShapeTypeShorthand } from '@cesdk/engine'; import { Size2 } from '@cesdk/engine'; import { SizeMode } from '@cesdk/engine'; import { SortingOrder } from '@cesdk/engine'; import { Source } from '@cesdk/engine'; import { SplitOptions } from '@cesdk/engine'; import { SpotColor } from '@cesdk/engine'; import { StrokeCornerGeometry } from '@cesdk/engine'; import { StrokePosition } from '@cesdk/engine'; import { StrokeStyle } from '@cesdk/engine'; import { supportsBrowser } from '@cesdk/engine'; import { supportsVideo } from '@cesdk/engine'; import { supportsVideoExport } from '@cesdk/engine'; import { supportsWasm } from '@cesdk/engine'; import { TextCase } from '@cesdk/engine'; import { TextDecorationConfig } from '@cesdk/engine'; import { TextDecorationLine } from '@cesdk/engine'; import { TextDecorationStyle } from '@cesdk/engine'; import { TransientResource } from '@cesdk/engine'; import { Typeface } from '@cesdk/engine'; import { TypefaceDefinition } from '@cesdk/engine'; import { VariableAPI } from '@cesdk/engine'; import { VerticalBlockAlignment } from '@cesdk/engine'; import { VideoExportOptions } from '@cesdk/engine'; import { VideoMimeType } from '@cesdk/engine'; import { XYWH } from '@cesdk/engine'; import { ZoomAutoFitAxis } from '@cesdk/engine'; import { ZoomOptions } from '@cesdk/engine'; /** * Represents the accessibility settings for the Creative Editor SDK. * This type defines the heading hierarchy start level, which can be a number between 1 and 6. * * @public */ declare type A11y = { /** * The option define a level of heading to start from (in a range 1-6) */ headingsHierarchyStart: 1 | 2 | 3 | 4 | 5 | 6; }; /** * Type helper for retrieving the correct action function type based on the action ID. * Returns the strongly-typed action for known actions, or a custom action type for unknown IDs. * * @typeParam T - The action ID type * @typeParam C - The custom action function type (defaults to CustomActionFunction) * @public */ export declare type ActionFunction = T extends keyof RegisteredActions ? RegisteredActions[T] : C; /** * Available action event types that can be registered with the ActionsAPI. * These correspond to different UI actions that can be customized. * Supports both predefined action types from the Actions interface and custom string identifiers. * * @public */ export declare type ActionId = keyof RegisteredActions | (string & {}); /** * ActionsAPI provides a centralized way to manage and customize actions * for various user interactions in the Creative Engine SDK. * * This API allows you to: * - Register custom actions for events (export, load, download, etc.) * - Use default implementations when no custom action is registered * - Maintain consistent behavior across different UI components * @public */ export declare class ActionsAPI { #private; /** * Registers a custom action for a specific event type. * * @param actionId - The event type to register an action for * @param action - The custom action function * * @example * ```typescript * actionsAPI.register('downloadFile', async (blob, mimeType) => { * // Custom download logic * await customDownloadAction(blob, mimeType); * }); * ``` * @public */ register(actionId: T, action: ActionFunction): void; /** * Returns the custom export video action if registered, otherwise returns the default. * * @param actionId - The event type to get an action for * * @example * ```typescript * const exportAction = actionsAPI.get('export'); * if (exportAction) { * const result = await exportAction(options); * } * ``` * @public */ get(actionId: T): ActionFunction | undefined; /** * Executes a registered action with the provided parameters. * Throws an error if the action is not registered. * * @param actionId - The event type to execute * @param args - The arguments to pass to the action * @returns The result of the action execution * @throws Error if the action is not registered * * @example * ```typescript * try { * const result = await actionsAPI.run('exportDesign', exportOptions); * console.log('Export completed', result); * } catch (error) { * console.error('Export action not registered'); * } * ``` * @public */ run(actionId: T, ...args: ActionFunction extends CustomActionFunction ? Parameters> : never[]): Promise extends (...args: any[]) => infer R ? R : never>; /** * Returns all registered action IDs. * * This method retrieves a list of all action identifiers that are * available. * * @param options - Optional configuration object with the following properties: * - `matcher`: Optional pattern to match against. Use `*` for wildcard matching. * @returns An array of action IDs currently registered in the store * * @example * ```typescript * const registeredActions = actionsAPI.list(); * console.log('Available actions:', registeredActions); * // Output: ['saveScene', 'exportDesign', 'customAction1', ...] * * // Find all export-related actions using wildcard * const exportActions = actionsAPI.list({ matcher: 'export*' }); * console.log('Export actions:', exportActions); * // Output: ['exportDesign', 'exportScene', ...] * ``` * @public */ list(options?: { matcher?: string; }): ActionId[]; } export { AddImageOptions } export { AddVideoOptions } export { AnimationEasing } export { AnimationEntry } export { AnimationOptions } export { AnimationType } export { AnimationTypeLonghand } export { AnimationTypeShorthand } /** * Union type for location options. Resolves to the appropriate options type based on area-specific requirements. * * @public */ export declare type AnyUILocationOptions = A extends 'ly.img.canvas.bar' ? CanvasBarLocationOptions : A extends 'ly.img.dock' ? DockLocationOptions : UILocationOptions; export { ApplicationMimeType } export { ApplyAssetOptions } export { Asset } export { AssetAPI } export { AssetBooleanProperty } export { AssetCMYKColor } export { AssetColor } export { AssetColorProperty } export { AssetContentAspectRatio } export { AssetDefinition } /** * @public * Asset library entry IDs that can be used with asset library APIs. * Includes built-in entry IDs registered by the SDK, and allows custom entry IDs. */ export declare type AssetEntryId = 'ly.img.templates' | 'ly.img.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio' | 'ly.img.text' | 'ly.img.vector.shape' | 'ly.img.sticker' | 'ly.img.colors' | 'ly.img.typefaces' | 'ly.img.pagePresets' | 'ly.img.cropPresets' | 'ly.img.library.captionPresets' | 'ly.img.animations' | 'ly.img.textAnimations' | (string & {}); /** * @public * Context provided to the sourceIds callback function. * - `cesdk`: The CreativeEditorSDK instance. * - `engine`: The CreativeEngine instance. */ declare interface AssetEntrySourceIdsContext { cesdk: CreativeEditorSDK; engine: CreativeEngine_2; } export { AssetEnumProperty } export { AssetFixedAspectRatio } export { AssetFixedSize } export { AssetFreeAspectRatio } export { AssetGroups } /** * Represents an asset library dock component. * * The AssetLibraryDockComponent interface defines the structure of an asset library dock component. * It includes properties for the ID, key, label, icon, entries, and optional button styling/behavior. * * @public */ export declare type AssetLibraryDockComponent = { id: 'ly.img.assetLibrary.dock'; /** * Individual and optional key for the component. */ key?: string; /** * Label to display on the button. */ label?: string; /** * Icon to display on the button. */ icon?: string; /** * Determines with what entries the asset library is opened. */ entries: string[]; /** * Custom onClick handler. If provided, overrides the default asset library toggle behavior. */ onClick?: () => void; /** * Controls the selected state of the button. If provided, overrides the automatic detection. * Can be a boolean or a function that returns a boolean for reactive updates. */ isSelected?: boolean | (() => boolean); /** * Controls the disabled state of the button. If provided, overrides the automatic detection. * Can be a boolean or a function that returns a boolean for reactive updates. */ isDisabled?: boolean | (() => boolean); /** * Size of the button. Defaults to 'normal'. */ size?: 'normal' | 'large'; /** * Visual variant of the button. Defaults to 'regular'. */ variant?: 'regular' | 'plain'; /** * Color scheme of the button. */ color?: 'accent' | 'danger'; }; /** * @public * Represents a collection of asset library entries, which can be either a static array or a dynamic function. */ declare type AssetLibraryEntries = AssetLibraryEntry[] | ((currentAssetLibraryEntries: AssetLibraryEntry[], context: { selectedBlocks: { id: DesignBlockId; blockType: DesignBlockTypeLonghand; fillType?: FillTypeLonghand; }[]; }) => AssetLibraryEntry[]); /** * @public * Represents an entry in the asset library, combining data and view configurations. */ export declare interface AssetLibraryEntry extends AssetLibraryEntryData, AssetLibraryEntryView { } /** * @public * Interface representing the data configuration for an asset library entry. * - `id`: The unique identifier for the asset library entry. * - `sourceIds`: An array of source IDs associated with the asset library entry, or a function that returns an array of source IDs. * - `sceneMode`: @deprecated Since v1.72. Optional configuration for the scene mode. Not needed for new scenes. * - `excludeGroups`: Optional array of group IDs to exclude from the asset library entry. * - `includeGroups`: Optional array of group IDs to include in the asset library entry. * - `title`: Optional title for the asset library entry, which can be a string or a function returning a string or undefined. * - `canAdd`: Optional boolean or function indicating whether the asset can be added to the source. * - `canRemove`: Optional boolean or function indicating whether the asset can be removed from the source. */ declare interface AssetLibraryEntryData { id: string; sourceIds: string[] | ((context: AssetEntrySourceIdsContext) => string[]); /** * @deprecated Since v1.72. Scene mode no longer affects engine behavior. * Not setting this will make the entry available for all scenes. */ sceneMode?: SceneMode | 'All' | ((context: { sourceId: string; }) => SceneMode | 'All'); excludeGroups?: string[]; includeGroups?: string[]; title?: string | ((options: { group?: string; sourceId?: string; }) => string | undefined); /** * If `true` an upload button will be shown and the uploaded file will be * added to the source. * * If a function is used it will be called with the current asset source id. * * The asset source needs to support `addAsset`. */ canAdd?: boolean | ((sourceId: string) => boolean); /** * If `true` the asset can be removed from the asset source. * * If a function is used it will be called with the current asset source id. * * The asset source needs to support `removeAsset`. */ canRemove?: boolean | ((sourceId: string) => boolean); } /** * @public * Interface representing the view configuration for an asset library entry. * - `showGroupOverview`: Optional boolean indicating whether to show the group overview. * - `promptBeforeApply`: Optional configuration for showing a confirmation dialog before applying an asset. * - `icon`: Optional custom icon for the asset. * - `previewLength`: Optional number determining how many asset results will be shown in an overview or section overview. * - `previewBackgroundType`: Optional type determining if the thumbUri is set as a background that will be contained or covered by the card in an overview or section overview. * - `gridBackgroundType`: Optional type determining if the thumbUri is set as a background that will be contained or covered by the card in the grid view. * - `gridColumns`: Optional number of columns in the grid view. * - `gridItemHeight`: Optional height of an item in the grid view, either 'auto' or 'square'. * - `cardBackgroundPreferences`: Optional configuration for determining what will be used as the card background from the asset and in which priorities. * - `cardBorder`: Optional boolean indicating whether to draw a border around the card. * - `cardLabel`: Optional function to overwrite the label of a card for a specific asset result. * - `cardStyle`: Optional function to add custom styles to a card for a specific asset result. * - `cardLabelStyle`: Optional function to add custom styles to a label for a specific asset result. * - `cardLabelPosition`: Optional function to position the label inside or below the card. * - `cardLabelTruncateLines`: Optional function to control label truncation to occur at end of first line ('single') or at end of second line ('multi'). * - `sortBy`: Optional configuration for sorting the asset results. */ declare interface AssetLibraryEntryView { showGroupOverview?: boolean; /** * Indicates whether this asset library entry supports searching. * When set to false, this entry's assets cannot be searched. * The search field in the panel will only be shown if at least one visible entry is searchable. * Defaults to true (entry is searchable). */ isSearchable?: boolean; /** * Wether or not we need to show a confirmation dialog when an asset is selected. * * accepted values: * - `true`: Show a confirmation dialog for all assets * - `false`: Never show a confirmation dialog * - `{ show: true, sourceIds: ['sourceId1', 'sourceId2'] }`: Show a confirmation dialog for the given sourceIds * * The content of the dialog should be defined in the translation files using the following keys: * - Headline: `libraries.[your_source_id].confirmation.headline` * - Body: `libraries.[your_source_id].confirmation.body` * - Confirm: `libraries.[your_source_id].confirmation.confirm` * - Abort: `libraries.[your_source_id].confirmation.abort` */ promptBeforeApply?: boolean | { show: boolean; sourceIds?: string[]; }; icon?: CustomIcon; /** * Determines how many asset results will be show in an overview or * section overview. */ previewLength?: number; /** * Determines if the thumbUri is set as a background that will be * contained or covered by the card in an overview or section overview. */ previewBackgroundType?: 'cover' | 'contain'; /** * Determines if the thumbUri is set as a background that will be * contained or covered by the card in the grid view */ gridBackgroundType?: 'cover' | 'contain'; /** * Number of columns in the grid view */ gridColumns?: number; /** * Determines the height of an item in the grid view. * * - `auto` automatically determine height yielding a masonry-like grid view * - `square` every card will have the same square size */ gridItemHeight?: 'auto' | 'square'; /** * Determines what will be used as the card background from the asset and in * which priorities. * * The first preference for which the `path` returns a value will be used to * decide what and how the background will be rendered. * * E.g. a path of `meta.thumbUri` will look inside the asset for a value * `asset.meta.thumbUri`. This non-null value will be used. * * The type of the preference decides how the card will render the background. * * - `svgVectorPath` - creates a element with the given vector path. * Adapts the color depending on the theme * - `image` - use a CSS background image * * Example of the default: * * ``` * [ * { path: 'meta.vectorPath', type: 'svgVectorPath' }, * { path: 'meta.thumbUri', type: 'image' } * ] * ``` * * This will look if the asset has a value in `meta.vectorPath` and will use * this value to render a SVG as background. If `meta.vectorPath` has no * value, it will use `meta.thumbUri` instead as a background image. * Otherwise it will render nothing */ cardBackgroundPreferences?: CardBackground[] | ((asset: AssetResult) => CustomCardBackground); /** * Draws a border around the card if set to true */ cardBorder?: boolean; /** * Overwrite the label of a card for a specific asset result */ cardLabel?: (assetResult: AssetResult) => string | undefined; /** * When true, suppresses the card label rendered in section previews * (the rows shown above each section's "More" button) while keeping * the label visible inside the full asset section view (opened via the * "More" button). Use this when the preview rows render very compactly * and labels would not fit. */ hideCardLabelInPreview?: boolean; /** * Add custom styles to a card for a specific asset result */ cardStyle?: (assetResult: AssetResult) => Record; /** * Add custom styles to a label for a specific asset result */ cardLabelStyle?: (assetResult: AssetResult) => Record; /** * Position the label inside or below the card. * Defaults to 'inside'. */ cardLabelPosition?: (assetResult: AssetResult) => 'inside' | 'below'; /** * Control label truncation to occur at end of first line ('single'), or at end of second line ('multi'). * Defaults to 'multi'. */ cardLabelTruncateLines?: (assetResult: AssetResult) => 'single' | 'multi'; /** * Control whether tooltips should be disabled for asset library cards. * When set to true, tooltips will not be shown on cards. * Defaults to false (tooltips are shown). */ disableTooltips?: boolean; sortBy?: SortingOrder | { sortKey?: string; sortingOrder?: SortingOrder; } | { sourceId: string; sortKey?: string; sortingOrder?: SortingOrder; }[]; } /** * Represents the payload for the asset library panel in the Creative Editor SDK. * This interface defines the title, entries, and placement options for the asset library panel. * * @public */ export declare type AssetLibraryPanelPayload = { title?: string | string[]; entries?: string[]; /** * Context for asset application. * Passed directly to engine.asset.apply() when an asset is selected. */ applyAssetContext?: ApplyAssetOptions; }; export { AssetMetaData } export { AssetNumberProperty } export { AssetPayload } export { AssetProperty } export { AssetQueryData } export { AssetResult } export { AssetRGBColor } export { AssetSource } export { AssetSpotColor } export { AssetsQueryResult } export { AssetStringProperty } export { AssetTransformPreset } export { AudioExportOptions } export { AudioMimeType } /** * Options for inserting components into a UI area. * @public */ export declare interface BaseInsertOptions = Exclude> { /** The UI area to insert into. */ in: A; /** Optional context for conditional ordering. */ when?: OrderContextFor; /** Dock position: `'left'`, `'right'`, or `'bottom'`. Defaults to `'left'`. Only available for `'ly.img.dock'`. */ at?: A extends 'ly.img.dock' ? DockPosition : never; } /** * Options for inserting components into a positional UI area (e.g., canvas bar). * @public */ export declare interface BasePositionalInsertOptions { /** The UI area to insert into. */ in: A; /** Which slot within the area (e.g., 'top' or 'bottom' for canvas bar). */ at: PositionFor; /** Optional context for conditional ordering. */ when?: OrderContextFor; } /** * Represents the bleed margin configuration options for a single design unit type in the Creative Editor SDK. * This interface defines the dropdown options and the default bleed margin value. * * @public */ declare interface BleedMarginOptions { /** * The bleed margin options that can be selected from a dropdown in the UI. * Other bleed margin values can be entered directly using the input field. */ dropdownOptions: number[]; /** * The default bleed margin value. */ defaultBleedMargin: number; } export { BlendMode } export { BlockAPI } export { BlockEvent } export { BlockState } export { BlurType } export { BlurTypeLonghand } export { BlurTypeShorthand } export { BooleanOperation } export { Buffer } /** * Interface for all available builder. Depending on the context different * implementation might be used. A "Button" in the canvas menu might render * different component than a button in the topbar or a panel. * @public */ export declare interface Builder { Button: (id: string, options: ButtonOptions) => void; ButtonGroup: (id: string, options: ButtonGroupOptions) => void; Checkbox: (id: string, options: CheckboxOptions) => void; Dropdown: (id: string, options: DropdownOptions) => void; MediaPreview: (id: string, options: MediaPreviewOptions) => void; Section: (id: string, options: SectionOptions) => void; Separator: (id: string) => void; Spinner: (id: string, options?: SpinnerOptions) => void; TextArea: (id: string, options: TextAreaOptions) => void; TextInput: (id: string, options: TextInputOptions) => void; NumberInput: (id: string, options: NumberInputOptions) => void; ColorInput: (id: string, options: ColorInputOptions) => void; Slider: (id: string, options: SliderOptions) => void; Library: (id: string, options: LibraryOptions) => void; Heading: (id: string, options: HeadingOptions) => void; Text: (id: string, options: TextOptions) => void; Select: (id: string, options: SelectOptions) => void; Component: (id: string, options: ComponentOptions) => void; } declare interface BuilderRenderComponent { id: string; type: 'builder'; render: BuilderRenderFunction; } /** * Function that defines a component with the help of the passed builder object. * * @public */ export declare type BuilderRenderFunction = (context: BuilderRenderFunctionContext) => void; /** * Represents the context for rendering a builder function. * * The `BuilderRenderFunctionContext` interface provides a set of properties that * describe the context for rendering a builder function. These options include * settings for the builder, engine, state, payload, render optimized small viewport, * and experimental APIs. * * @public */ export declare interface BuilderRenderFunctionContext { builder: Builder; cesdk: CreativeEditorSDK; engine: CreativeEngine_2; /** * State object that can be used to store and retrieve local values. * * It will take a unique identifier for this state that can be used * to access this store later. * * ``` * const { value, setValue } = state('unique-id', 'default-value'); * ``` * * If no default value is set, the `value` property may be undefined * if no value was set before: * * ``` * const { value, setValue } = state('unique-id', 'default-value'); * ``` * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ state: { /** * State object that can be used to store and retrieve a value. If * no values are stored, the default value will be returned. * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ (id: string, defaultValue: T): { /** * The current value of this state. If no value was set, the default * value will be returned. * * @returns The new value or the default value. */ value: T; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; /** * State object that can be used to store and retrieve a value. * If no value was set, the value will be `undefined`. * * @param id - The unique identifier for the state. */ (id: string): { value: T | undefined; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; }; payload?: P; renderOptimizedSmallViewport: boolean; /** * PLEASE NOTE: This contains experimental APIs. * * Use them with caution since they might change without warning and might be replaced * with a completely different concept or maybe not at all. * * @public */ experimental: ExperimentalBuilder.BuilderRenderContext; } /** * Represents a set of translations for the Creative Editor SDK. * * The `Translations` interface provides a structure for defining translations * for the editor interface. Translations are organized by key and can include * nested objects for more complex translation structures. * * @public */ /** * Built-in translation keys provided by the Creative Editor SDK. * @public */ export declare interface BuiltinTranslations { 'action.align': string; 'action.align.bottom': string; 'action.align.bottom.description': string; 'action.align.elements': string; 'action.align.horizontalCenter': string; 'action.align.horizontalCenter.description': string; 'action.align.left': string; 'action.align.left.description': string; 'action.align.right': string; 'action.align.right.description': string; 'action.align.toPage': string; 'action.align.top': string; 'action.align.top.description': string; 'action.align.verticalCenter': string; 'action.align.verticalCenter.description': string; 'action.arrange': string; 'action.arrange.alwaysOnBottom': string; 'action.arrange.alwaysOnTop': string; 'action.arrange.bringForward': string; 'action.arrange.moveLeft': string; 'action.arrange.moveRight': string; 'action.arrange.sendBackward': string; 'action.arrange.toBack': string; 'action.arrange.toFront': string; 'action.audio.delete': string; 'action.audio.duplicate': string; 'action.audio.replace': string; 'action.backgroundClip.add': string; 'action.block.add': string; 'action.block.copy': string; 'action.block.delete': string; 'action.block.delete_plural': string; 'action.block.duplicate': string; 'action.block.flipX': string; 'action.block.flipY': string; 'action.block.lock': string; 'action.block.lock.description': string; 'action.block.move': string; 'action.block.paste': string; 'action.block.rename': string; 'action.block.resize': string; 'action.block.rotate': string; 'action.block.toggleVisibility': string; 'action.block.unlock': string; 'action.block.unlock.description': string; 'action.clip.add': string; 'action.closeInspector': string; 'action.continue': string; 'action.crop.contentFillMode': string; 'action.crop.exit': string; 'action.crop.mirrorX': string; 'action.crop.mirrorY': string; 'action.crop.reset': string; 'action.crop.turn': string; 'action.crop.turnAndMirror': string; 'action.cutoutOffset.change': string; 'action.cutoutSmoothing.change': string; 'action.cutoutType.change': string; 'action.distribute': string; 'action.distribute.horizontally': string; 'action.distribute.horizontally.description': string; 'action.distribute.vertically': string; 'action.distribute.vertically.description': string; 'action.editText': string; 'action.effect.add': string; 'action.effect.remove': string; 'action.enterGroup': string; 'action.fillType.change': string; 'action.filter.add': string; 'action.filter.remove': string; 'action.gradient.addStop': string; 'action.gradient.removeStop': string; 'action.group': string; 'action.image.blur': string; 'action.image.crop': string; 'action.image.effect': string; 'action.image.filter': string; 'action.image.inpainting': string; 'action.image.matting': string; 'action.image.matting.staging': string; 'action.image.replace': string; 'action.image.smartCrop': string; 'action.image.smartImage': string; 'action.image.smartImage.description': string; 'action.image.superResolution': string; 'action.loop.disable': string; 'action.loop.enable': string; 'action.mute': string; 'action.page.add': string; 'action.page.changeFormat': string; 'action.page.delete': string; 'action.pageMove.down': string; 'action.pageMove.down.description': string; 'action.pageMove.left': string; 'action.pageMove.left.description': string; 'action.pageMove.right': string; 'action.pageMove.right.description': string; 'action.pageMove.up': string; 'action.pageMove.up.description': string; 'action.placeholder.change': string; 'action.placeholder.create': string; 'action.placeholder.remove': string; 'action.position': string; 'action.property.reset': string; 'action.property.update': string; 'action.resize': string; 'action.scene.load': string; 'action.scene.new': string; 'action.selectGroup': string; 'action.setAsClip': string; 'action.setAsOverlay': string; 'action.shadow.angle.change': string; 'action.shadow.angle.rotate': string; 'action.shadow.blur.change': string; 'action.shadow.color.change': string; 'action.shadow.distance.change': string; 'action.shape.replace': string; 'action.showInspector': string; 'action.splitClip': string; 'action.splitClip.description': string; 'action.strokeCornerGeometry.change': string; 'action.strokePosition.change': string; 'action.strokeStyle.change': string; 'action.text.autoHeight': string; 'action.text.autoHeight.automatic': string; 'action.text.autoHeight.notification': string; 'action.text.autoSize': string; 'action.text.autoSize.automatic': string; 'action.text.autoSize.notification': string; 'action.text.change': string; 'action.text.changeCase': string; 'action.text.fixedFrame': string; 'action.text.fixedFrame.automatic': string; 'action.text.fixedFrame.notification': string; 'action.ungroup': string; 'action.unmute': string; 'action.vectorEdit.editPath': string; 'action.vectorEdit.exit': string; 'action.vectorPath.addMode': string; 'action.vectorPath.addNode': string; 'action.vectorPath.bendMode': string; 'action.vectorPath.deleteMode': string; 'action.vectorPath.deleteNode': string; 'action.vectorPath.moveMode': string; 'action.video.replace': string; 'block.audio': string; 'block.caption': string; 'block.cutout': string; 'block.ellipse': string; 'block.graphic': string; 'block.group': string; 'block.image': string; 'block.line': string; 'block.page': string; 'block.polygon': string; 'block.rect': string; 'block.scene': string; 'block.star': string; 'block.sticker': string; 'block.text': string; 'block.vector_path': string; 'block.video': string; 'color.aqua': string; 'color.black': string; 'color.blue': string; 'color.cyan': string; 'color.green': string; 'color.magenta': string; 'color.orange': string; 'color.purple': string; 'color.red': string; 'color.transparent': string; 'color.yellow': string; 'common.add': string; 'common.advanced': string; 'common.altKey': string; 'common.arrange': string; 'common.axis.x': string; 'common.axis.y': string; 'common.back': string; 'common.cancel': string; 'common.close': string; 'common.cmyk': string; 'common.color': string; 'common.colorValue': string; 'common.confirm': string; 'common.controlKey': string; 'common.custom': string; 'common.defaultDuration': string; 'common.defaultDuration.inUnit': string; 'common.delete': string; 'common.done': string; 'common.download': string; 'common.duplicate': string; 'common.edit': string; 'common.editColor': string; 'common.export': string; 'common.fill': string; 'common.formats': string; 'common.height': string; 'common.height.inUnit': string; 'common.hue': string; 'common.image': string; 'common.inch': string; 'common.load': string; 'common.lock': string; 'common.millimeter': string; 'common.mixed': string; 'common.mode.design': string; 'common.mode.preview': string; 'common.mode.template': string; 'common.more': string; 'common.nearestColorName': string; 'common.off': string; 'common.on': string; 'common.opacity': string; 'common.page': string; 'common.pause': string; 'common.pixel': string; 'common.pixelScale': string; 'common.placeholder': string; 'common.play': string; 'common.position': string; 'common.presets': string; 'common.properties': string; 'common.property': string; 'common.redo': string; 'common.reloadPage': string; 'common.replace': string; 'common.reset': string; 'common.resolution': string; 'common.role': string; 'common.role.adopter': string; 'common.role.creator': string; 'common.role.presenter': string; 'common.role.viewer': string; 'common.rotateAndFlip': string; 'common.rotation': string; 'common.rotation.inUnit': string; 'common.save': string; 'common.select': string; 'common.shiftKey': string; 'common.size': string; 'common.spotColor': string; 'common.srgb': string; 'common.style': string; 'common.tint': string; 'common.transform': string; 'common.trim': string; 'common.undo': string; 'common.unit': string; 'common.unit.description': string; 'common.unlock': string; 'common.video': string; 'common.width': string; 'common.width.inUnit': string; 'component.alignAndArrange': string; 'component.assetPanelAutoCloseSettings': string; 'component.assetPanelAutoCloseSettings.false': string; 'component.assetPanelAutoCloseSettings.false.description': string; 'component.assetPanelAutoCloseSettings.true': string; 'component.assetPanelAutoCloseSettings.true.description': string; 'component.assetPanelFloatingSettings': string; 'component.assetPanelFloatingSettings.fixed': string; 'component.assetPanelFloatingSettings.fixed.description': string; 'component.assetPanelFloatingSettings.floating': string; 'component.assetPanelFloatingSettings.floating.description': string; 'component.assetSettings': string; 'component.assetSettings.adjustments': string; 'component.assetSettings.blur': string; 'component.assetSettings.crop': string; 'component.assetSettings.effects': string; 'component.assetSettings.filters': string; 'component.assetSettings.opacity': string; 'component.assetSettings.text.advanced': string; 'component.assetSettings.text.color': string; 'component.assetSettings.transform': string; 'component.audio.properties': string; 'component.audio.source': string; 'component.audio.trim': string; 'component.audio.trim.description': string; 'component.audio.trim.duration': string; 'component.audio.trim.duration.description': string; 'component.audio.trim.play': string; 'component.audio.trim.play.description': string; 'component.canvas': string; 'component.canvas.openLibrary': string; 'component.canvas.state.error': string; 'component.canvas.state.unsupported': string; 'component.caption': string; 'component.caption.more': string; 'component.colorPicker.colorItem': string; 'component.colorPicker.colorItem.description': string; 'component.colorPicker.colorItem.hexInput': string; 'component.colorPicker.colorItem.transparent': string; 'component.colorPicker.description': string; 'component.colorPicker.hsl.description': string; 'component.colorPicker.hueGradient': string; 'component.colorSchemeSelect.accent': string; 'component.colorSchemeSelect.accent.description': string; 'component.colorSchemeSelect.active': string; 'component.colorSchemeSelect.active.description': string; 'component.colorSchemeSelect.background': string; 'component.colorSchemeSelect.background.description': string; 'component.contentFill': string; 'component.contentFill.color': string; 'component.contentFill.color.description': string; 'component.contentFill.description': string; 'component.contentFill.image': string; 'component.contentFill.options': string; 'component.contentFill.options.description': string; 'component.contentFill.video': string; 'component.cutout': string; 'component.dockIconSizeSelect': string; 'component.dockIconSizeSelect.large': string; 'component.dockIconSizeSelect.large.description': string; 'component.dockIconSizeSelect.normal': string; 'component.dockIconSizeSelect.normal.description': string; 'component.dockLabelVisibilityToggle': string; 'component.dockLabelVisibilityToggle.hide': string; 'component.dockLabelVisibilityToggle.hide.description': string; 'component.dockLabelVisibilityToggle.show': string; 'component.dockLabelVisibilityToggle.show.description': string; 'component.fileOperation.archiveScene': string; 'component.fileOperation.exportImage': string; 'component.fileOperation.exportPDF': string; 'component.fileOperation.exportScene': string; 'component.fileOperation.exportVideo': string; 'component.fileOperation.importArchive': string; 'component.fileOperation.importScene': string; 'component.fileOperation.more': string; 'component.fileOperation.save': string; 'component.fileOperation.share': string; 'component.inspectorBar': string; 'component.inspectorPanelFloatingSettings': string; 'component.inspectorPanelFloatingSettings.fixed': string; 'component.inspectorPanelFloatingSettings.fixed.description': string; 'component.inspectorPanelFloatingSettings.floating': string; 'component.inspectorPanelFloatingSettings.floating.description': string; 'component.inspectorPositionSelect': string; 'component.inspectorPositionSelect.left': string; 'component.inspectorPositionSelect.left.description': string; 'component.inspectorPositionSelect.right': string; 'component.inspectorPositionSelect.right.description': string; 'component.languageSelect': string; 'component.languageSelect.description': string; 'component.library': string; 'component.library.addFile': string; 'component.library.breadcrumbRoot': string; 'component.library.clearSearch': string; 'component.library.elements': string; 'component.library.enterSection': string; 'component.library.error': string; 'component.library.loading': string; 'component.library.noItems': string; 'component.library.noMoreItems': string; 'component.library.removeAssetConfirmation': string; 'component.library.removeAssetConfirmation.description': string; 'component.library.searchPlaceholder': string; 'component.librarySettings': string; 'component.librarySettings.elementLibrary': string; 'component.librarySettings.imageLibrary': string; 'component.librarySettings.templateLibrary': string; 'component.librarySettings.textLibrary': string; 'component.librarySettings.uploadLibrary': string; 'component.pageResize.label': string; 'component.pageResizePanel.apply': string; 'component.pageResizePanel.label': string; 'component.pageSettings': string; 'component.pageSettings.format': string; 'component.pageSettings.manage': string; 'component.pageTitleAppendPageNameToggle': string; 'component.pageTitleAppendPageNameToggle.hide': string; 'component.pageTitleAppendPageNameToggle.hide.description': string; 'component.pageTitleAppendPageNameToggle.show': string; 'component.pageTitleAppendPageNameToggle.show.description': string; 'component.pageTitleDefaultTitleVisibilityToggle': string; 'component.pageTitleDefaultTitleVisibilityToggle.hide': string; 'component.pageTitleDefaultTitleVisibilityToggle.hide.description': string; 'component.pageTitleDefaultTitleVisibilityToggle.show': string; 'component.pageTitleDefaultTitleVisibilityToggle.show.description': string; 'component.pageTitleShowOnSinglePageToggle': string; 'component.pageTitleShowOnSinglePageToggle.hide': string; 'component.pageTitleShowOnSinglePageToggle.hide.description': string; 'component.pageTitleShowOnSinglePageToggle.show': string; 'component.pageTitleShowOnSinglePageToggle.show.description': string; 'component.pageTitleVisibilityToggle': string; 'component.pageTitleVisibilityToggle.hide': string; 'component.pageTitleVisibilityToggle.hide.description': string; 'component.pageTitleVisibilityToggle.show': string; 'component.pageTitleVisibilityToggle.show.description': string; 'component.placeholder.appearance': string; 'component.placeholder.appearance.description': string; 'component.placeholder.arrange': string; 'component.placeholder.arrange.description': string; 'component.placeholder.audio': string; 'component.placeholder.audio.description': string; 'component.placeholder.create': string; 'component.placeholder.disableAll': string; 'component.placeholder.enableAll': string; 'component.placeholder.fill': string; 'component.placeholder.fill.description': string; 'component.placeholder.general': string; 'component.placeholder.general.description': string; 'component.placeholder.settings': string; 'component.placeholder.settingsMenu': string; 'component.placeholder.shape': string; 'component.placeholder.shape.description': string; 'component.placeholder.stroke': string; 'component.placeholder.stroke.description': string; 'component.placeholder.text': string; 'component.placeholder.text.description': string; 'component.propertyPopover.header': string; 'component.replacePanelAutoCloseSettings': string; 'component.replacePanelAutoCloseSettings.false': string; 'component.replacePanelAutoCloseSettings.false.description': string; 'component.replacePanelAutoCloseSettings.true': string; 'component.replacePanelAutoCloseSettings.true.description': string; 'component.replacePanelFloatingSettings': string; 'component.replacePanelFloatingSettings.fixed': string; 'component.replacePanelFloatingSettings.fixed.description': string; 'component.replacePanelFloatingSettings.floating': string; 'component.replacePanelFloatingSettings.floating.description': string; 'component.roleSelect': string; 'component.roleSelect.description': string; 'component.scalingSelect': string; 'component.scalingSelect.large': string; 'component.scalingSelect.large.description': string; 'component.scalingSelect.normal': string; 'component.scalingSelect.normal.description': string; 'component.settings.toggle': string; 'component.settings.toggle.description': string; 'component.settingsPanel.appearance': string; 'component.settingsPanel.assetPanel': string; 'component.settingsPanel.dock': string; 'component.settingsPanel.documentation': string; 'component.settingsPanel.general': string; 'component.settingsPanel.header': string; 'component.settingsPanel.inspectorPanel': string; 'component.settingsPanel.page': string; 'component.settingsPanel.pageLabel': string; 'component.settingsPanel.replacePanel': string; 'component.settingsPanel.singlePageMode': string; 'component.settingsPanel.singlePageVisibilitySelect': string; 'component.themeSelect': string; 'component.themeSelect.dark': string; 'component.themeSelect.dark.description': string; 'component.themeSelect.dialog': string; 'component.themeSelect.dialog.description': string; 'component.themeSelect.generate': string; 'component.themeSelect.light': string; 'component.themeSelect.light.description': string; 'component.themeSelect.system': string; 'component.themeSelect.system.description': string; 'component.timeline.audio.options.description': string; 'component.timeline.collapse': string; 'component.timeline.expand': string; 'component.timeline.label': string; 'component.timeline.pause.description': string; 'component.timeline.play.description': string; 'component.timeline.scale.down': string; 'component.timeline.scale.down.description': string; 'component.timeline.scale.fit': string; 'component.timeline.scale.fit.description': string; 'component.timeline.scale.label': string; 'component.timeline.scale.up': string; 'component.timeline.scale.up.description': string; 'component.timeline.video.options.description': string; 'component.topbar.back': string; 'component.topbar.close': string; 'component.undo.redo': string; 'component.undo.undo': string; 'component.video.properties': string; 'component.video.source': string; 'component.video.trim': string; 'component.video.trim.description': string; 'component.video.trim.duration': string; 'component.video.trim.duration.description': string; 'component.video.trim.play': string; 'component.video.trim.play.description': string; 'component.video.unsupported': string; 'component.video.unsupported.description': string; 'component.viewSelect': string; 'component.viewSelect.advanced': string; 'component.viewSelect.advanced.description': string; 'component.viewSelect.default': string; 'component.viewSelect.default.description': string; 'component.welcome.text': string; 'component.zoom.autoFit': string; 'component.zoom.fitPage': string; 'component.zoom.fitSelection': string; 'component.zoom.in': string; 'component.zoom.label.auto': string; 'component.zoom.options': string; 'component.zoom.out': string; 'component.zoom.shortcut': string; 'component.zoom.to': string; 'dialog.export.abort.message': string; 'dialog.export.abort.title': string; 'dialog.export.action': string; 'dialog.export.error.message.1': string; 'dialog.export.error.message.2': string; 'dialog.export.error.title': string; 'dialog.export.message': string; 'dialog.export.success.message': string; 'dialog.export.success.title': string; 'dialog.export.title': string; 'editor.scope.canvas': string; 'editor.scope.global': string; 'editor.scope.videoTimeline': string; 'element.transform.resize': string; 'element.transform.rotate': string; 'error.applyAsset': string; 'error.applyAsset.description': string; 'error.booleanOperation.effectlessDifference': string; 'error.booleanOperation.effectlessDifference.description': string; 'error.booleanOperation.effectlessUnion': string; 'error.booleanOperation.effectlessUnion.description': string; 'error.booleanOperation.emptyShape': string; 'error.booleanOperation.emptyShape.description': string; 'error.cta.generic': string; 'error.cta.generic.description': string; 'error.generic': string; 'error.generic.description': string; 'error.replaceAsset': string; 'error.replaceAsset.description': string; 'error.upload': string; 'error.upload.description': string; 'error.upload.sizeExceeded': string; 'input.adjustments': string; 'input.adjustments.basic': string; 'input.adjustments.refinements': string; 'input.adjustments.tooltip': string; 'input.alwaysOnBottom': string; 'input.alwaysOnTop': string; 'input.animations': string; 'input.animations.description': string; 'input.appearance': string; 'input.aspectLock': string; 'input.aspectLock.description': string; 'input.audio.duration.description': string; 'input.audio.duration.reset': string; 'input.audio.mute': string; 'input.bleedMargin.select': string; 'input.blur': string; 'input.blur.tooltip': string; 'input.booleanoperations': string; 'input.booleanoperations.exclude': string; 'input.booleanoperations.intersect': string; 'input.booleanoperations.subtract': string; 'input.booleanoperations.union': string; 'input.canvas': string; 'input.caption': string; 'input.caption.add': string; 'input.caption.addAfter': string; 'input.caption.content': string; 'input.caption.create': string; 'input.caption.delete': string; 'input.caption.deleteAll': string; 'input.caption.edit': string; 'input.caption.file': string; 'input.caption.hideTimings': string; 'input.caption.import': string; 'input.caption.import.description': string; 'input.caption.import.error.message': string; 'input.caption.import.error.title': string; 'input.caption.in': string; 'input.caption.inputLabel': string; 'input.caption.mergePrevious': string; 'input.caption.more': string; 'input.caption.out': string; 'input.caption.showTimings': string; 'input.caption.style': string; 'input.character': string; 'input.clipContent': string; 'input.clipContent.off.description': string; 'input.clipContent.on.description': string; 'input.clipLines': string; 'input.clipLines.off.description': string; 'input.clipLines.on.description': string; 'input.colorMode': string; 'input.colorMode.description': string; 'input.cutoutOffset': string; 'input.cutoutSmoothing': string; 'input.cutoutType': string; 'input.cutoutType.dashed': string; 'input.cutoutType.solid': string; 'input.duration': string; 'input.duration.description': string; 'input.effect': string; 'input.effect.tooltip': string; 'input.export': string; 'input.filter': string; 'input.filter.tooltip': string; 'input.fontSelect': string; 'input.fontSelect.fallback': string; 'input.fontSize.select': string; 'input.fontSize.selectMax': string; 'input.fontSize.selectMin': string; 'input.fontStyle.toggle': string; 'input.gradient.activateColorStop': string; 'input.gradient.addStop': string; 'input.gradient.colorPosition': string; 'input.gradient.colorStop': string; 'input.gradient.colorStop.active': string; 'input.gradient.colorStop.description': string; 'input.gradient.deleteStop': string; 'input.gradient.flip': string; 'input.gradient.gradientAngle': string; 'input.gradient.rotate': string; 'input.insertVariable': string; 'input.keyShortcut': string; 'input.layer': string; 'input.multiSelection.notice': string; 'input.multiSelection.title': string; 'input.opacity': string; 'input.opacity.options': string; 'input.options': string; 'input.options.description': string; 'input.page.titleTemplate': string; 'input.pages': string; 'input.preset': string; 'input.preset.description': string; 'input.preset.tooltip': string; 'input.propertyToggle.disable': string; 'input.propertyToggle.enable': string; 'input.propertyToggle.hidden': string; 'input.propertyToggle.visible': string; 'input.rename': string; 'input.resolution.select': string; 'input.selection': string; 'input.shadow.angle': string; 'input.shadow.angle.description': string; 'input.shadow.blur': string; 'input.shadow.blur.description': string; 'input.shadow.description': string; 'input.shadow.distance': string; 'input.shadow.distance.description': string; 'input.shadow.label': string; 'input.shadow.valueLabel': string; 'input.shape': string; 'input.shape.options': string; 'input.showInExport': string; 'input.sliderInput.toggleNumberInput': string; 'input.stroke': string; 'input.text.advanced': string; 'input.text.advanced.description': string; 'input.text.placeholder': string; 'input.time.end': string; 'input.time.start': string; 'input.transform': string; 'input.transform.description': string; 'input.typefaceSelect.description': string; 'input.typefaceSelect.noResults': string; 'input.typefaceSelect.search': string; 'input.typefaceSelect.tooltip': string; 'input.unit.tooltip': string; 'input.uploadAudio': string; 'input.uploadFiles': string; 'input.uploadImage': string; 'input.uploadVideo': string; 'input.video': string; 'input.video.duration.description': string; 'input.video.duration.reset': string; 'libraries.ly.img.animations.ly.img.animations.in.label': string; 'libraries.ly.img.animations.ly.img.animations.label': string; 'libraries.ly.img.animations.ly.img.animations.loop.label': string; 'libraries.ly.img.animations.ly.img.animations.out.label': string; 'libraries.ly.img.audio.label': string; 'libraries.ly.img.audio.upload.label': string; 'libraries.ly.img.color.palette.label': string; 'libraries.ly.img.colors.imageColors.label': string; 'libraries.ly.img.colors.documentColors.label': string; 'libraries.ly.img.crop.presets.label': string; 'libraries.ly.img.image.label': string; 'libraries.ly.img.image.upload.label': string; 'libraries.ly.img.local.label': string; 'libraries.ly.img.page.presets.facebook.label': string; 'libraries.ly.img.page.presets.hd-video.label': string; 'libraries.ly.img.page.presets.instagram.label': string; 'libraries.ly.img.page.presets.iso-standard-print.label': string; 'libraries.ly.img.page.presets.label': string; 'libraries.ly.img.page.presets.linkedIn.label': string; 'libraries.ly.img.page.presets.north-american-print.label': string; 'libraries.ly.img.page.presets.other-print.label': string; 'libraries.ly.img.page.presets.pinterest.label': string; 'libraries.ly.img.page.presets.tiktok.label': string; 'libraries.ly.img.page.presets.x.label': string; 'libraries.ly.img.page.presets.youtube.label': string; 'libraries.ly.img.sticker.3Dstickers.label': string; 'libraries.ly.img.sticker.craft.label': string; 'libraries.ly.img.sticker.doodle.label': string; 'libraries.ly.img.sticker.emoji.label': string; 'libraries.ly.img.sticker.emoticons.label': string; 'libraries.ly.img.sticker.florals.label': string; 'libraries.ly.img.sticker.hand.label': string; 'libraries.ly.img.sticker.label': string; 'libraries.ly.img.sticker.marker.label': string; 'libraries.ly.img.sticker.sketches.label': string; 'libraries.ly.img.templates.confirmation.abort': string; 'libraries.ly.img.templates.confirmation.body': string; 'libraries.ly.img.templates.confirmation.confirm': string; 'libraries.ly.img.templates.confirmation.headline': string; 'libraries.ly.img.templates.label': string; 'libraries.ly.img.templates.premium.confirmation.abort': string; 'libraries.ly.img.templates.premium.confirmation.body': string; 'libraries.ly.img.templates.premium.confirmation.confirm': string; 'libraries.ly.img.templates.premium.confirmation.headline': string; 'libraries.ly.img.templates.premium.e-commerce.label': string; 'libraries.ly.img.templates.premium.event.label': string; 'libraries.ly.img.templates.premium.label': string; 'libraries.ly.img.templates.premium.personal.label': string; 'libraries.ly.img.templates.premium.professional.label': string; 'libraries.ly.img.templates.premium.socials.label': string; 'libraries.ly.img.text.components.label': string; 'libraries.ly.img.text.headline.label': string; 'libraries.ly.img.text.label': string; 'libraries.ly.img.text.paragraph.label': string; 'libraries.ly.img.text.title.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.in.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.loop.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.out.label': string; 'libraries.ly.img.upload.label': string; 'libraries.ly.img.vector.shape.abstract-filled.label': string; 'libraries.ly.img.vector.shape.abstract-gradient.label': string; 'libraries.ly.img.vector.shape.abstract-image.label': string; 'libraries.ly.img.vector.shape.abstract-outline.label': string; 'libraries.ly.img.vector.shape.filled.label': string; 'libraries.ly.img.vector.shape.gradient.label': string; 'libraries.ly.img.vector.shape.image.label': string; 'libraries.ly.img.vector.shape.label': string; 'libraries.ly.img.vector.shape.outline.label': string; 'libraries.ly.img.video.label': string; 'libraries.ly.img.video.upload.label': string; 'libraries.unsplash.label': string; 'meta.currentLanguage': string; 'notification.redo': string; 'notification.undo': string; 'preset.document.american-legal': string; 'preset.document.american-letter': string; 'preset.document.business-card': string; 'preset.document.custom': string; 'preset.document.din-a0': string; 'preset.document.din-a1': string; 'preset.document.din-a2': string; 'preset.document.din-a3': string; 'preset.document.din-a4': string; 'preset.document.din-a5': string; 'preset.document.din-a6': string; 'preset.document.din-a65': string; 'preset.document.din-b5': string; 'preset.document.format2k': string; 'preset.document.format4k': string; 'preset.document.fullhd': string; 'preset.document.hd': string; 'preset.document.instagram-photo': string; 'preset.document.instagram-profile': string; 'preset.document.instagram-story': string; 'preset.document.qhd': string; 'preset.document.social-feed': string; 'preset.document.social-story': string; 'preset.document.square': string; 'preset.document.twitter-header': string; 'preset.document.twitter-image': string; 'preset.document.twitter-profile': string; 'preset.template.blank_1': string; 'preset.template.business_card_1': string; 'preset.template.collage_1': string; 'preset.template.instagram_photo_1': string; 'preset.template.instagram_story_1': string; 'preset.template.postcard_1': string; 'preset.template.postcard_2': string; 'preset.template.poster_1': string; 'preset.template.presentation_4': string; 'property.adjustments.blacks': string; 'property.adjustments.brightness': string; 'property.adjustments.clarity': string; 'property.adjustments.contrast': string; 'property.adjustments.exposure': string; 'property.adjustments.gamma': string; 'property.adjustments.highlights': string; 'property.adjustments.saturation': string; 'property.adjustments.shadows': string; 'property.adjustments.sharpness': string; 'property.adjustments.temperature': string; 'property.adjustments.whites': string; 'property.animation.baseline': string; 'property.animation.baseline.direction': string; 'property.animation.baseline.direction.Down': string; 'property.animation.baseline.direction.Left': string; 'property.animation.baseline.direction.Right': string; 'property.animation.baseline.direction.Up': string; 'property.animation.block_swipe_text': string; 'property.animation.block_swipe_text.direction': string; 'property.animation.block_swipe_text.direction.Down': string; 'property.animation.block_swipe_text.direction.Left': string; 'property.animation.block_swipe_text.direction.Right': string; 'property.animation.block_swipe_text.direction.Up': string; 'property.animation.block_swipe_text.useTextColor': string; 'property.animation.blur': string; 'property.animation.blur.fade': string; 'property.animation.blur.intensity': string; 'property.animation.blur_loop': string; 'property.animation.blur_loop.intensity': string; 'property.animation.breathing_loop': string; 'property.animation.breathing_loop.intensity': string; 'property.animation.crop_zoom': string; 'property.animation.crop_zoom.fade': string; 'property.animation.crop_zoom.scale': string; 'property.animation.fade': string; 'property.animation.fade_loop': string; 'property.animation.grow': string; 'property.animation.grow.direction': string; 'property.animation.grow.direction.All': string; 'property.animation.grow.direction.Horizontal': string; 'property.animation.grow.direction.Vertical': string; 'property.animation.jump_loop': string; 'property.animation.jump_loop.direction': string; 'property.animation.jump_loop.direction.Down': string; 'property.animation.jump_loop.direction.Left': string; 'property.animation.jump_loop.direction.Right': string; 'property.animation.jump_loop.direction.Up': string; 'property.animation.jump_loop.intensity': string; 'property.animation.ken_burns': string; 'property.animation.ken_burns.cropScale': string; 'property.animation.ken_burns.direction': string; 'property.animation.ken_burns.direction.Down': string; 'property.animation.ken_burns.direction.Left': string; 'property.animation.ken_burns.direction.Right': string; 'property.animation.ken_burns.direction.Up': string; 'property.animation.ken_burns.fade': string; 'property.animation.ken_burns.travelDistanceRatio': string; 'property.animation.ken_burns.zoomIntensity': string; 'property.animation.merge_text': string; 'property.animation.merge_text.direction': string; 'property.animation.merge_text.direction.Left': string; 'property.animation.merge_text.direction.Right': string; 'property.animation.merge_text.intensity': string; 'property.animation.none': string; 'property.animation.pan': string; 'property.animation.pan.direction': string; 'property.animation.pan.direction.Down': string; 'property.animation.pan.direction.Left': string; 'property.animation.pan.direction.Right': string; 'property.animation.pan.direction.Up': string; 'property.animation.pan.distance': string; 'property.animation.pan.fade': string; 'property.animation.pop': string; 'property.animation.pulsating_loop': string; 'property.animation.pulsating_loop.intensity': string; 'property.animation.scale_loop': string; 'property.animation.scale_loop.direction': string; 'property.animation.scale_loop.direction.All': string; 'property.animation.scale_loop.direction.BottomLeft': string; 'property.animation.scale_loop.direction.BottomRight': string; 'property.animation.scale_loop.direction.Horizontal': string; 'property.animation.scale_loop.direction.TopLeft': string; 'property.animation.scale_loop.direction.TopRight': string; 'property.animation.scale_loop.direction.Vertical': string; 'property.animation.scale_loop.easingDuration': string; 'property.animation.scale_loop.endScale': string; 'property.animation.scale_loop.holdDuration': string; 'property.animation.scale_loop.startDelay': string; 'property.animation.scale_loop.startScale': string; 'property.animation.slide': string; 'property.animation.slide.direction': string; 'property.animation.slide.direction.Down': string; 'property.animation.slide.direction.Left': string; 'property.animation.slide.direction.Right': string; 'property.animation.slide.direction.Up': string; 'property.animation.slide.distance': string; 'property.animation.slide.fade': string; 'property.animation.spin': string; 'property.animation.spin.direction': string; 'property.animation.spin.direction.Clockwise': string; 'property.animation.spin.direction.CounterClockwise': string; 'property.animation.spin.fade': string; 'property.animation.spin.intensity': string; 'property.animation.spin_loop': string; 'property.animation.spin_loop.direction': string; 'property.animation.spin_loop.direction.Clockwise': string; 'property.animation.spin_loop.direction.CounterClockwise': string; 'property.animation.spread_text': string; 'property.animation.spread_text.fade': string; 'property.animation.spread_text.intensity': string; 'property.animation.squeeze_loop': string; 'property.animation.sway_loop': string; 'property.animation.sway_loop.intensity': string; 'property.animation.typewriter_text': string; 'property.animation.typewriter_text.writingStyle': string; 'property.animation.typewriter_text.writingStyle.Character': string; 'property.animation.typewriter_text.writingStyle.Word': string; 'property.animation.wipe': string; 'property.animation.wipe.direction': string; 'property.animation.wipe.direction.Down': string; 'property.animation.wipe.direction.Left': string; 'property.animation.wipe.direction.Right': string; 'property.animation.wipe.direction.Up': string; 'property.animation.zoom': string; 'property.animation.zoom.fade': string; 'property.animationEasing': string; 'property.animationEasing.EaseInBack': string; 'property.animationEasing.EaseInOutBack': string; 'property.animationEasing.EaseInOutQuint': string; 'property.animationEasing.EaseInOutSpring': string; 'property.animationEasing.EaseInQuint': string; 'property.animationEasing.EaseInSpring': string; 'property.animationEasing.EaseOutBack': string; 'property.animationEasing.EaseOutQuint': string; 'property.animationEasing.EaseOutSpring': string; 'property.animationEasing.Linear': string; 'property.autoSize': string; 'property.autoSize.autoHeight.description': string; 'property.autoSize.autoSize.description': string; 'property.autoSize.fixedFrame.description': string; 'property.backgroundColor.color': string; 'property.backgroundColor.description': string; 'property.bleedMargin': string; 'property.blendMode': string; 'property.blendMode.Color': string; 'property.blendMode.ColorBurn': string; 'property.blendMode.ColorDodge': string; 'property.blendMode.Darken': string; 'property.blendMode.DarkenColor': string; 'property.blendMode.Difference': string; 'property.blendMode.Divide': string; 'property.blendMode.Exclusion': string; 'property.blendMode.HardLight': string; 'property.blendMode.HardMix': string; 'property.blendMode.Hue': string; 'property.blendMode.Lighten': string; 'property.blendMode.LightenColor': string; 'property.blendMode.LinearBurn': string; 'property.blendMode.LinearDodge': string; 'property.blendMode.LinearLight': string; 'property.blendMode.Luminosity': string; 'property.blendMode.Multiply': string; 'property.blendMode.Normal': string; 'property.blendMode.Overlay': string; 'property.blendMode.PassThrough': string; 'property.blendMode.PinLight': string; 'property.blendMode.Saturation': string; 'property.blendMode.Screen': string; 'property.blendMode.SoftLight': string; 'property.blendMode.Subtract': string; 'property.blendMode.VividLight': string; 'property.blendMode.description': string; 'property.blendMode.tooltip': string; 'property.blur.extrudeBlur': string; 'property.blur.extrudeBlur.amount': string; 'property.blur.linearBlur': string; 'property.blur.linearBlur.blurRadius': string; 'property.blur.linearBlur.x1': string; 'property.blur.linearBlur.x2': string; 'property.blur.linearBlur.y1': string; 'property.blur.linearBlur.y2': string; 'property.blur.mirroredBlur': string; 'property.blur.mirroredBlur.blurRadius': string; 'property.blur.mirroredBlur.gradientSize': string; 'property.blur.mirroredBlur.size': string; 'property.blur.mirroredBlur.x1': string; 'property.blur.mirroredBlur.x2': string; 'property.blur.mirroredBlur.y1': string; 'property.blur.mirroredBlur.y2': string; 'property.blur.radialBlur': string; 'property.blur.radialBlur.blurRadius': string; 'property.blur.radialBlur.gradientRadius': string; 'property.blur.radialBlur.radius': string; 'property.blur.radialBlur.x': string; 'property.blur.radialBlur.y': string; 'property.blur.uniformBlur': string; 'property.blur.uniformBlur.intensity': string; 'property.caption.scale': string; 'property.color': string; 'property.color.description': string; 'property.cornerRadius': string; 'property.crop': string; 'property.crop.contentFillMode': string; 'property.crop.contentFillMode.contain': string; 'property.crop.contentFillMode.cover': string; 'property.crop.contentFillMode.crop': string; 'property.crop.contentFillMode.description': string; 'property.crop.offset': string; 'property.crop.offset.description': string; 'property.crop.scale': string; 'property.crop.scale.description': string; 'property.crop.size': string; 'property.crop.size.description': string; 'property.crop.straighten': string; 'property.crop.tooltip': string; 'property.crop.transform': string; 'property.dropShadow.color': string; 'property.duoToneFilterIntensity': string; 'property.duotoneFilter.breezy': string; 'property.duotoneFilter.clash': string; 'property.duotoneFilter.deepblue': string; 'property.duotoneFilter.desert': string; 'property.duotoneFilter.frog': string; 'property.duotoneFilter.peach': string; 'property.duotoneFilter.plum': string; 'property.duotoneFilter.sunset': string; 'property.effect.crossCut': string; 'property.effect.crossCut.offset': string; 'property.effect.crossCut.slices': string; 'property.effect.crossCut.speedV': string; 'property.effect.crossCut.time': string; 'property.effect.dotPattern': string; 'property.effect.dotPattern.blur': string; 'property.effect.dotPattern.dots': string; 'property.effect.dotPattern.size': string; 'property.effect.extrudeBlur': string; 'property.effect.extrudeBlur.amount': string; 'property.effect.glow': string; 'property.effect.glow.amount': string; 'property.effect.glow.darkness': string; 'property.effect.glow.size': string; 'property.effect.greenScreen': string; 'property.effect.greenScreen.colorMatch': string; 'property.effect.greenScreen.fromColor': string; 'property.effect.greenScreen.fromColor.description': string; 'property.effect.greenScreen.smoothness': string; 'property.effect.greenScreen.spill': string; 'property.effect.halfTone': string; 'property.effect.halfTone.angle': string; 'property.effect.halfTone.scale': string; 'property.effect.joggle.amount': string; 'property.effect.joggle.time': string; 'property.effect.linocut': string; 'property.effect.linocut.scale': string; 'property.effect.liquid': string; 'property.effect.liquid.amount': string; 'property.effect.liquid.scale': string; 'property.effect.liquid.speed': string; 'property.effect.liquid.time': string; 'property.effect.mirror': string; 'property.effect.mirror.side': string; 'property.effect.outliner': string; 'property.effect.outliner.amount': string; 'property.effect.outliner.passthrough': string; 'property.effect.pixelize': string; 'property.effect.pixelize.horizontalPixelSize': string; 'property.effect.pixelize.verticalPixelSize': string; 'property.effect.posterize': string; 'property.effect.posterize.levels': string; 'property.effect.psychedelic.amount': string; 'property.effect.psychedelic.offset': string; 'property.effect.psychedelic.time': string; 'property.effect.radialPixel': string; 'property.effect.radialPixel.radius': string; 'property.effect.radialPixel.segments': string; 'property.effect.radiate.centerBrightness': string; 'property.effect.radiate.colorize': string; 'property.effect.radiate.powerCurve': string; 'property.effect.recolor': string; 'property.effect.recolor.brightnessMatch': string; 'property.effect.recolor.colorMatch': string; 'property.effect.recolor.fromColor': string; 'property.effect.recolor.fromColor.description': string; 'property.effect.recolor.smoothness': string; 'property.effect.recolor.toColor': string; 'property.effect.recolor.toColor.description': string; 'property.effect.scanlines.count': string; 'property.effect.scanlines.linesAmount': string; 'property.effect.scanlines.noiseAmount': string; 'property.effect.scanlines.time': string; 'property.effect.separate.amount': string; 'property.effect.separate.time': string; 'property.effect.sharpie': string; 'property.effect.shifter': string; 'property.effect.shifter.amount': string; 'property.effect.shifter.angle': string; 'property.effect.tiltShift': string; 'property.effect.tiltShift.amount': string; 'property.effect.tiltShift.position': string; 'property.effect.tvGlitch': string; 'property.effect.tvGlitch.distortion': string; 'property.effect.tvGlitch.distortion2': string; 'property.effect.tvGlitch.rollSpeed': string; 'property.effect.tvGlitch.speed': string; 'property.effect.tvGlitch.time': string; 'property.effect.vignette': string; 'property.effect.vignette.darkness': string; 'property.effect.vignette.offset': string; 'property.effect.waves.size': string; 'property.effect.waves.speed': string; 'property.effect.waves.strength': string; 'property.effect.waves.time': string; 'property.fill': string; 'property.fill.description': string; 'property.fill.solid.color': string; 'property.fillType': string; 'property.fillType.gradient': string; 'property.fillType.gradient.description': string; 'property.fillType.solid': string; 'property.fillType.solid.description': string; 'property.flip': string; 'property.flip.x': string; 'property.flip.y': string; 'property.gradientType.conical': string; 'property.gradientType.conical.description': string; 'property.gradientType.linear': string; 'property.gradientType.radial': string; 'property.gradientType.radial.description': string; 'property.innerDiameter': string; 'property.layout': string; 'property.layout.free': string; 'property.layout.horizontal': string; 'property.layout.vertical': string; 'property.letterSpacing': string; 'property.lineHeight': string; 'property.lineWidth': string; 'property.lineWidth.description': string; 'property.lutFilter.ad1920': string; 'property.lutFilter.ancient': string; 'property.lutFilter.bleached': string; 'property.lutFilter.bleachedblue': string; 'property.lutFilter.blues': string; 'property.lutFilter.blueshadows': string; 'property.lutFilter.breeze': string; 'property.lutFilter.celsius': string; 'property.lutFilter.chest': string; 'property.lutFilter.classic': string; 'property.lutFilter.colorful': string; 'property.lutFilter.cool': string; 'property.lutFilter.cottoncandy': string; 'property.lutFilter.creamy': string; 'property.lutFilter.eighties': string; 'property.lutFilter.elder': string; 'property.lutFilter.evening': string; 'property.lutFilter.fall': string; 'property.lutFilter.fixie': string; 'property.lutFilter.food': string; 'property.lutFilter.fridge': string; 'property.lutFilter.front': string; 'property.lutFilter.glam': string; 'property.lutFilter.gobblin': string; 'property.lutFilter.greyed': string; 'property.lutFilter.highcarb': string; 'property.lutFilter.highcontrast': string; 'property.lutFilter.k1': string; 'property.lutFilter.k2': string; 'property.lutFilter.k6': string; 'property.lutFilter.kdynamic': string; 'property.lutFilter.keen': string; 'property.lutFilter.lenin': string; 'property.lutFilter.litho': string; 'property.lutFilter.lomo': string; 'property.lutFilter.lomo100': string; 'property.lutFilter.lucid': string; 'property.lutFilter.mellow': string; 'property.lutFilter.neat': string; 'property.lutFilter.nogreen': string; 'property.lutFilter.orchid': string; 'property.lutFilter.pale': string; 'property.lutFilter.pitched': string; 'property.lutFilter.plate': string; 'property.lutFilter.pola669': string; 'property.lutFilter.polasx': string; 'property.lutFilter.pro400': string; 'property.lutFilter.quozi': string; 'property.lutFilter.sepiahigh': string; 'property.lutFilter.settled': string; 'property.lutFilter.seventies': string; 'property.lutFilter.sin': string; 'property.lutFilter.soft': string; 'property.lutFilter.steel': string; 'property.lutFilter.summer': string; 'property.lutFilter.sunset': string; 'property.lutFilter.tender': string; 'property.lutFilter.texas': string; 'property.lutFilter.twilight': string; 'property.lutFilter.winter': string; 'property.lutFilter.x400': string; 'property.lutFilterIntensity': string; 'property.opacity': string; 'property.orientation': string; 'property.orientation.description': string; 'property.orientation.flip': string; 'property.orientation.landscape': string; 'property.orientation.portrait': string; 'property.orientation.select.label': string; 'property.orientation.square': string; 'property.outlineColor': string; 'property.outlineWidth': string; 'property.paragraphSpacing': string; 'property.placeholderBehavior.description': string; 'property.placeholderBehavior.graphic.tooltip': string; 'property.placeholderBehavior.text.tooltip': string; 'property.playback.duration': string; 'property.points': string; 'property.position': string; 'property.position.description': string; 'property.sides': string; 'property.strokeColor': string; 'property.strokeColor.description': string; 'property.strokeCornerGeometry': string; 'property.strokeCornerGeometry.bevel': string; 'property.strokeCornerGeometry.description': string; 'property.strokeCornerGeometry.miter': string; 'property.strokeCornerGeometry.round': string; 'property.strokePosition': string; 'property.strokePosition.center': string; 'property.strokePosition.description': string; 'property.strokePosition.inner': string; 'property.strokePosition.outer': string; 'property.strokePositionAndCornerGeometry': string; 'property.strokePositionAndCornerGeometry.description': string; 'property.strokeStyle': string; 'property.strokeStyle.dashed': string; 'property.strokeStyle.dashedRound': string; 'property.strokeStyle.description': string; 'property.strokeStyle.dotted': string; 'property.strokeStyle.longDashed': string; 'property.strokeStyle.longDashedRound': string; 'property.strokeStyle.solid': string; 'property.strokeWidth': string; 'property.strokeWidth.description': string; 'property.textAlignment.horizontal': string; 'property.textAlignment.horizontal.autoDetect': string; 'property.textAlignment.horizontal.center': string; 'property.textAlignment.horizontal.description': string; 'property.textAlignment.horizontal.left': string; 'property.textAlignment.horizontal.right': string; 'property.textAlignment.vertical': string; 'property.textAlignment.vertical.bottom': string; 'property.textAlignment.vertical.center': string; 'property.textAlignment.vertical.top': string; 'property.textBackground': string; 'property.textBackground.cornerRadius': string; 'property.textBackground.description': string; 'property.textBackground.horizontalPadding': string; 'property.textBackground.horizontalPadding.description': string; 'property.textBackground.options.description': string; 'property.textBackground.padding': string; 'property.textBackground.padding.description': string; 'property.textBackground.verticalPadding': string; 'property.textBackground.verticalPadding.description': string; 'property.textCase': string; 'property.textCase.lowercase': string; 'property.textCase.normal': string; 'property.textCase.titlecase': string; 'property.textCase.uppercase': string; 'property.textWritingStyle': string; 'property.textWritingStyle.Block': string; 'property.textWritingStyle.Character': string; 'property.textWritingStyle.Line': string; 'property.textWritingStyle.Word': string; 'property.vector': string; 'property.volume': string; 'scope.appearance.adjustments': string; 'scope.appearance.adjustments.tooltip': string; 'scope.appearance.animations': string; 'scope.appearance.animations.tooltip': string; 'scope.appearance.blur': string; 'scope.appearance.blur.tooltip': string; 'scope.appearance.effect': string; 'scope.appearance.effect.tooltip': string; 'scope.appearance.filter': string; 'scope.appearance.filter.tooltip': string; 'scope.appearance.shadow': string; 'scope.appearance.shadow.tooltip': string; 'scope.audio.change': string; 'scope.audio.change.tooltip': string; 'scope.editor.select': string; 'scope.fill.change': string; 'scope.fill.change.graphic': string; 'scope.fill.change.graphic.tooltip': string; 'scope.fill.change.text': string; 'scope.fill.change.text.tooltip': string; 'scope.fill.change.tooltip': string; 'scope.fill.changeType': string; 'scope.fill.changeType.tooltip': string; 'scope.layer.blendMode': string; 'scope.layer.blendMode.tooltip': string; 'scope.layer.crop': string; 'scope.layer.crop.tooltip': string; 'scope.layer.flip': string; 'scope.layer.flip.tooltip': string; 'scope.layer.move': string; 'scope.layer.move.tooltip': string; 'scope.layer.opacity': string; 'scope.layer.opacity.tooltip': string; 'scope.layer.resize': string; 'scope.layer.resize.page': string; 'scope.layer.resize.tooltip': string; 'scope.layer.rotate': string; 'scope.layer.rotate.tooltip': string; 'scope.lifecycle.destroy': string; 'scope.lifecycle.destroy.tooltip': string; 'scope.lifecycle.duplicate': string; 'scope.lifecycle.duplicate.tooltip': string; 'scope.shape.change': string; 'scope.shape.change.tooltip': string; 'scope.stroke.change': string; 'scope.stroke.change.tooltip': string; 'scope.text.character': string; 'scope.text.character.tooltip': string; 'scope.text.edit': string; 'scope.text.edit.placeholder.tooltip': string; 'scope.text.edit.tooltip': string; 'settings.feature.combine': string; 'settings.feature.combine.exclude': string; 'settings.feature.combine.intersect': string; 'settings.feature.combine.subtract': string; 'settings.feature.combine.union': string; 'settings.feature.crop': string; 'settings.feature.crop.fillMode': string; 'settings.feature.crop.flip': string; 'settings.feature.crop.panel.autoOpen': string; 'settings.feature.crop.position': string; 'settings.feature.crop.rotation': string; 'settings.feature.crop.scale': string; 'settings.feature.crop.size': string; 'settings.feature.effects.adjustments': string; 'settings.feature.effects.blur': string; 'settings.feature.effects.cutout': string; 'settings.feature.effects.effects': string; 'settings.feature.effects.filters': string; 'settings.feature.fill': string; 'settings.feature.fill.color': string; 'settings.feature.fill.image': string; 'settings.feature.fill.video': string; 'settings.feature.general.animations': string; 'settings.feature.general.blendMode': string; 'settings.feature.general.delete': string; 'settings.feature.general.duplicate': string; 'settings.feature.general.opacity': string; 'settings.feature.general.preview': string; 'settings.feature.group.combine': string; 'settings.feature.group.crop': string; 'settings.feature.group.effects': string; 'settings.feature.group.fill': string; 'settings.feature.group.general': string; 'settings.feature.group.group': string; 'settings.feature.group.media': string; 'settings.feature.group.navigation': string; 'settings.feature.group.notifications': string; 'settings.feature.group.page': string; 'settings.feature.group.panels': string; 'settings.feature.group.placeholder': string; 'settings.feature.group.position': string; 'settings.feature.group.replace': string; 'settings.feature.group.scene': string; 'settings.feature.group.shadow': string; 'settings.feature.group.shape': string; 'settings.feature.group.stroke': string; 'settings.feature.group.text': string; 'settings.feature.group.transform': string; 'settings.feature.group.vectorEdit': string; 'settings.feature.group.video': string; 'settings.feature.group_feature': string; 'settings.feature.group_feature.create': string; 'settings.feature.group_feature.enter': string; 'settings.feature.group_feature.select': string; 'settings.feature.group_feature.ungroup': string; 'settings.feature.header': string; 'settings.feature.manage': string; 'settings.feature.search': string; 'settings.feature.media.playbackSpeed': string; 'settings.feature.media.trim': string; 'settings.feature.media.volume': string; 'settings.feature.navigation': string; 'settings.feature.navigation.actions': string; 'settings.feature.navigation.back': string; 'settings.feature.navigation.bar': string; 'settings.feature.navigation.close': string; 'settings.feature.navigation.undoRedo': string; 'settings.feature.navigation.zoom': string; 'settings.feature.notifications': string; 'settings.feature.notifications.redo': string; 'settings.feature.notifications.undo': string; 'settings.feature.page': string; 'settings.feature.page.add': string; 'settings.feature.page.bleedMargin': string; 'settings.feature.page.clipContent': string; 'settings.feature.page.move': string; 'settings.feature.page.resize': string; 'settings.feature.page.settings': string; 'settings.feature.panels.canvas': string; 'settings.feature.panels.canvasBar': string; 'settings.feature.panels.canvasMenu': string; 'settings.feature.panels.dock': string; 'settings.feature.panels.inspector': string; 'settings.feature.panels.inspectorBar': string; 'settings.feature.panels.inspectorToggle': string; 'settings.feature.panels.library': string; 'settings.feature.panels.rulers': string; 'settings.feature.panels.settings': string; 'settings.feature.placeholder': string; 'settings.feature.placeholder.appearance': string; 'settings.feature.placeholder.appearance.adjustments': string; 'settings.feature.placeholder.appearance.animations': string; 'settings.feature.placeholder.appearance.blur': string; 'settings.feature.placeholder.appearance.effect': string; 'settings.feature.placeholder.appearance.filter': string; 'settings.feature.placeholder.appearance.shadow': string; 'settings.feature.placeholder.arrange': string; 'settings.feature.placeholder.arrange.flip': string; 'settings.feature.placeholder.arrange.move': string; 'settings.feature.placeholder.arrange.resize': string; 'settings.feature.placeholder.arrange.rotate': string; 'settings.feature.placeholder.audio': string; 'settings.feature.placeholder.audio.change': string; 'settings.feature.placeholder.fill': string; 'settings.feature.placeholder.fill.actAsPlaceholder': string; 'settings.feature.placeholder.fill.change': string; 'settings.feature.placeholder.fill.changeType': string; 'settings.feature.placeholder.fill.crop': string; 'settings.feature.placeholder.general': string; 'settings.feature.placeholder.general.blendMode': string; 'settings.feature.placeholder.general.delete': string; 'settings.feature.placeholder.general.duplicate': string; 'settings.feature.placeholder.general.opacity': string; 'settings.feature.placeholder.shape': string; 'settings.feature.placeholder.shape.change': string; 'settings.feature.placeholder.stroke': string; 'settings.feature.placeholder.stroke.change': string; 'settings.feature.placeholder.text': string; 'settings.feature.placeholder.text.actAsPlaceholder': string; 'settings.feature.placeholder.text.character': string; 'settings.feature.placeholder.text.edit': string; 'settings.feature.position': string; 'settings.feature.position.align': string; 'settings.feature.position.arrange': string; 'settings.feature.position.distribute': string; 'settings.feature.replace': string; 'settings.feature.replace.audio': string; 'settings.feature.replace.fill': string; 'settings.feature.replace.shape': string; 'settings.feature.scene.layout': string; 'settings.feature.scene.layout.free': string; 'settings.feature.scene.layout.horizontal': string; 'settings.feature.scene.layout.vertical': string; 'settings.feature.shadow': string; 'settings.feature.shadow.blur': string; 'settings.feature.shadow.color': string; 'settings.feature.shadow.offset': string; 'settings.feature.shape.edit': string; 'settings.feature.shape.options': string; 'settings.feature.shape.options.cornerRadius': string; 'settings.feature.shape.options.innerDiameter': string; 'settings.feature.shape.options.lineWidth': string; 'settings.feature.shape.options.points': string; 'settings.feature.shape.options.sides': string; 'settings.feature.stroke': string; 'settings.feature.stroke.color': string; 'settings.feature.stroke.cornerGeometry': string; 'settings.feature.stroke.position': string; 'settings.feature.stroke.style': string; 'settings.feature.stroke.width': string; 'settings.feature.text': string; 'settings.feature.text.advanced': string; 'settings.feature.text.alignment': string; 'settings.feature.text.background': string; 'settings.feature.text.decoration': string; 'settings.feature.text.edit': string; 'settings.feature.text.fontSize': string; 'settings.feature.text.fontStyle': string; 'settings.feature.text.list': string; 'settings.feature.text.list.ordered': string; 'settings.feature.text.list.unordered': string; 'settings.feature.text.typeface': string; 'settings.feature.transform': string; 'settings.feature.transform.flip': string; 'settings.feature.transform.position': string; 'settings.feature.transform.rotation': string; 'settings.feature.transform.size': string; 'settings.feature.vectorEdit': string; 'settings.feature.vectorEdit.addMode': string; 'settings.feature.vectorEdit.bendMode': string; 'settings.feature.vectorEdit.deleteMode': string; 'settings.feature.vectorEdit.done': string; 'settings.feature.vectorEdit.mirrorMode': string; 'settings.feature.vectorEdit.moveMode': string; 'settings.feature.video': string; 'settings.feature.video.addClip': string; 'settings.feature.video.audio': string; 'settings.feature.video.caption': string; 'settings.feature.video.clips': string; 'settings.feature.video.controls': string; 'settings.feature.video.controls.background': string; 'settings.feature.video.controls.loop': string; 'settings.feature.video.controls.playback': string; 'settings.feature.video.controls.split': string; 'settings.feature.video.controls.timelineZoom': string; 'settings.feature.video.controls.toggle': string; 'settings.feature.video.overlays': string; 'settings.feature.video.timeline': string; 'settings.feature.video.timeline.ruler': string; 'typography.autoSize': string; 'typography.autoSize.abbreviation': string; 'typography.bold': string; 'typography.italic': string; 'typography.normal': string; 'typography.size': string; 'typography.sizeRange': string; 'typography.style': string; 'typography.typeface': string; 'typography.typeface.mixed.description': string; 'typography.weight.100': string; 'typography.weight.200': string; 'typography.weight.300': string; 'typography.weight.400': string; 'typography.weight.500': string; 'typography.weight.600': string; 'typography.weight.700': string; 'typography.weight.800': string; 'typography.weight.900': string; 'variables.address.label': string; 'variables.city.label': string; 'variables.company_name.label': string; 'variables.first_name.label': string; 'variables.last_name.label': string; 'warning.invalidType': string; } /** * Represents options for a button group. * * The `ButtonGroupOptions` interface provides a set of properties that control the * behavior and appearance of a button group. These options include settings for the * input label, input label position, children, and suffix. * * @public */ export declare interface ButtonGroupOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; children?: () => void; suffix?: Suffix; } /** * Represents options for a button. * * The `ButtonOptions` interface provides a set of properties that control the * behavior and appearance of a button. These options include settings for the * input label, input label position, label, label alignment, tooltip, click * handler, variant, color, size, icon, trailing icon, active state, selected state, * disabled state, loading state, loading progress, suffix, and keyboard shortcut. * * @public */ export declare interface ButtonOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; labelAlignment?: 'left' | 'center'; tooltip?: string | string[]; onClick?: () => void; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; trailingIcon?: CustomIcon; isActive?: boolean; isSelected?: boolean; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; suffix?: Suffix; /** * Keyboard shortcut to display (e.g., 'Meta+C', 'Meta+V', 'Alt+D'). * Automatically renders OS-appropriate modifiers (⌘ on macOS, Ctrl on Windows/Linux). * Hidden on small viewports. */ shortcut?: string; } /** * Represents the callback functions for various events in the Creative Editor SDK. * This interface defines functions for handling back, close, share, save, load, load archive, download, export, * upload, and unsupported browser events. * * @public * @deprecated Use the `cesdk.actions` API and the Order API instead. */ declare type Callbacks = { /** * @deprecated Use the onClick on `'ly.img.back.navigationBar'` and the Order API instead. */ onBack?: () => void | Promise; /** * @deprecated Use the onClick on `'ly.img.close.navigationBar'` and the Order API instead. */ onClose?: () => void | Promise; /** * @deprecated Use the onClick on `'ly.img.shareScene.navigationBar'` and the Order API instead. */ onShare?: (s: string) => void | Promise; /** * @deprecated Use the onClick on `'ly.img.saveScene.navigationBar'` and the Order API instead. */ onSave?: (s: string) => void | Promise; /** * @deprecated Use the onClick on `'ly.img.importScene.navigationBar'` and the Order API instead. */ onLoad?: (() => Promise) | 'upload'; /** * @deprecated Use the onClick on `'ly.img.importArchive.navigationBar'` and the Order API instead. */ onLoadArchive?: (() => Promise) | 'uploadArchive'; /** * @deprecated Use the onClick on `'ly.img.exportScene.navigationBar'` and the Order API instead. */ onDownload?: ((s: string) => void | Promise) | 'download'; /** * @deprecated Use the onClick on `'ly.img.export.navigationBar'` and the Order API instead. */ onExport?: ((blobs: Blob[], options: ExportOptions) => void | Promise) | 'download'; /** * @deprecated Use the `cesdk.actions.register('uploadFile', action)` and `engine.editor.setSetting('upload/supportedMimeTypes', ',')` instead. * Note: If you are using `addDemoAssetSources`, now you will have to explicitly enable upload sources by setting `withUploadAssetSources: true`. */ onUpload?: OnUploadCallback | 'local' | (Partial & { callback: OnUploadCallback; }); /** * @deprecated Use the `cesdk.actions.register('onUnsupportedBrowser', action)` instead. */ onUnsupportedBrowser?: () => void; }; export { Canvas } /** * Represents the ID of a canvas bar component. * * The CanvasBarComponentId type defines the possible IDs for components that can be used in the canvas bar. * It includes predefined IDs for separators, spacers, and various canvas items, as well as a catch-all type for custom IDs. * * @public */ export declare type CanvasBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.settings.canvasBar' | 'ly.img.page.add.canvasBar' | (string & {}); /** * Location options specifically for the canvas bar, which requires a position. * * @public */ export declare interface CanvasBarLocationOptions { /** Target the canvas bar. */ in: 'ly.img.canvas.bar'; /** Position within the canvas bar. Required for canvas bar operations. */ at: 'top' | 'bottom'; /** Optional context for conditional ordering. */ when?: OrderContext; } /** * Valid positions for the canvas bar: `'top'` or `'bottom'`. * @public */ declare type CanvasBarPosition = 'top' | 'bottom'; /** * @public * Base interface for action buttons in the canvas menu. * Contains common properties shared across all canvas menu button types. * * - `onClick`: Handler invoked when the button is clicked. * - `label`: Optional label for the button. * - `icon`: Optional icon name to display on the button. * - `variant`: Optional style variant of the button, either 'regular' or 'plain'. * - `isDisabled`: Optional disabled property. * - `shortcut`: Optional keyboard shortcut displayed alongside the action. */ export declare interface CanvasMenuActionButton extends OrderComponent { id: 'ly.img.flipX.canvasMenu' | 'ly.img.flipY.canvasMenu' | 'ly.img.copy.canvasMenu' | 'ly.img.paste.canvasMenu'; onClick?: () => void | Promise; label?: string; icon?: string; variant?: 'regular' | 'plain'; isDisabled?: boolean; shortcut?: string; } /** * A list of the component IDs that can be used in the canvas menu. * @public */ export declare type CanvasMenuComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.group.enter.canvasMenu' | 'ly.img.group.select.canvasMenu' | 'ly.img.page.moveUp.canvasMenu' | 'ly.img.page.moveDown.canvasMenu' | 'ly.img.text.edit.canvasMenu' | 'ly.img.replace.canvasMenu' | 'ly.img.placeholder.canvasMenu' | 'ly.img.bringForward.canvasMenu' | 'ly.img.sendBackward.canvasMenu' | 'ly.img.duplicate.canvasMenu' | 'ly.img.delete.canvasMenu' | 'ly.img.options.canvasMenu' | 'ly.img.flipX.canvasMenu' | 'ly.img.flipY.canvasMenu' | 'ly.img.copy.canvasMenu' | 'ly.img.paste.canvasMenu' | 'ly.img.text.color.canvasMenu' | 'ly.img.text.bold.canvasMenu' | 'ly.img.text.italic.canvasMenu' | 'ly.img.text.underline.canvasMenu' | 'ly.img.text.strikethrough.canvasMenu' | 'ly.img.text.variables.canvasMenu' | (string & {}); /** * @public */ export declare type CanvasMenuComponents = CanvasMenuActionButton | CanvasMenuOptionsComponent | CanvasMenuCustomActionButton; /** * @public * Interface representing a custom canvas menu action button. * Note: This component requires a key and has a required label, unlike other action buttons. */ export declare interface CanvasMenuCustomActionButton extends OrderComponent { id: 'ly.img.action.canvasMenu'; key: string; onClick: () => void | Promise; label: string; icon?: string; variant?: 'regular' | 'plain'; isDisabled?: boolean; shortcut?: string; } /** * @public * Interface representing the canvas menu options dropdown component. * This component can contain children components that are rendered in a dropdown menu. * * - `children`: Optional array of child component IDs or components to render in the dropdown. * - `icon`: Optional icon name to display on the dropdown button. * - `variant`: Optional style variant of the dropdown button, either 'regular' or 'plain'. * - `tooltip`: Optional tooltip text to display when hovering over the dropdown button. */ export declare interface CanvasMenuOptionsComponent extends OrderComponentWithChildren { id: 'ly.img.options.canvasMenu'; icon?: string; variant?: 'regular' | 'plain'; tooltip?: string; } /** * @public */ export declare type CanvasMenuOrderComponent = CanvasMenuComponents | OrderComponentWithChildren; /** * Represents the ID of a caption panel component. * * The CaptionPanelComponentId type defines the possible IDs for components that can be used in the caption panel. * It includes predefined IDs for sections, separators, spacers, and various caption panel items, as well as a catch-all type for custom IDs. * * @public */ export declare type CaptionPanelComponentId = 'ly.img.section' | 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.caption.panel.create' | 'ly.img.caption.panel.import' | 'ly.img.caption.panel.tabs' | 'ly.img.caption.panel.captions' | 'ly.img.caption.panel.add' | 'ly.img.caption.panel.presets' | (string & {}); /** * Context for the caption panel which adds view-based filtering. * * @public */ export declare interface CaptionPanelOrderContext extends OrderContext { view?: 'create' | 'edit' | 'style' | (string & {}); /** Whether to show timing information for each caption in edit view. */ showTimings?: boolean; } /** * @public * Type representing the background of a card. * - `path`: The path to the background resource. * - `type`: The type of the background resource, either 'svgVectorPath' or 'image'. */ declare type CardBackground = { path: string; type: 'svgVectorPath' | 'image'; }; /** * Represents the configuration settings for the Creative Editor SDK. * This interface defines various settings such as locale, theme, development mode, user interface, internationalization, * accessibility, callbacks, feature flags, and logger. * * @public */ export declare interface CESDKConfiguration { /** * @deprecated The `locale` property is deprecated. Please use the `setLocale()` property to configure localization. */ locale: string; /** * @deprecated The `theme` property is deprecated. Please use `ui.setTheme()` to configure theming. */ theme: ThemeConfig; devMode: boolean; ui: UserInterface; /** * @deprecated The `i18n` property is deprecated. Please use the `setTranslations()` method to configure internationalization. */ i18n: I18n; a11y: A11y; /** * @deprecated The `callbacks` property is deprecated in favor of the `cesdk.actions` API and navigation bar order APIs. */ callbacks: Callbacks; featureFlags?: _EngineConfiguration['featureFlags']; logger: _EngineConfiguration['logger']; } /** * Represents options for a checkbox. * * The `CheckboxOptions` interface provides a set of properties that control the * behavior and appearance of a checkbox. These options include settings for the * input label, input label position, value, value setter, disabled state, icon, * and suffix. * * @public */ export declare interface CheckboxOptions extends InputOptions { icon?: CustomIcon; truncateLabel?: boolean; } export { checkVideoExportSupport } export { checkVideoSupport } /** * Represents the order of children components in a dropdown. * * The `ChildrenOrder` type provides a set of values that control the order of children * components in a dropdown. These options include settings for the component ID or * order component. * * @categoryDescription ChildrenOrder * Methods for configuring the order of children components in a dropdown. * * @public */ export declare type ChildrenOrder = (ComponentId | OrderComponent)[]; /** * Represents the ID of a video clip menu component. * * The ClipContextMenuComponentId type defines the possible IDs for components that can be used in the video clip context menu. * It includes predefined IDs for separators and various clip menu items, as well as a catch-all type for custom IDs. * * @public */ export declare type ClipContextMenuComponentId = 'ly.img.separator' | 'ly.img.video.clip.menu.moveLeft' | 'ly.img.video.clip.menu.moveRight' | 'ly.img.video.clip.menu.bringForward' | 'ly.img.video.clip.menu.sendBackward' | 'ly.img.video.clip.menu.setAsOverlay' | 'ly.img.video.clip.menu.setAsClip' | 'ly.img.video.clip.menu.mute' | 'ly.img.video.clip.menu.trim' | 'ly.img.video.clip.menu.caption.merge' | 'ly.img.video.clip.menu.caption.add' | 'ly.img.video.clip.menu.replace' | 'ly.img.video.clip.menu.placeholder' | 'ly.img.video.clip.menu.duplicate' | 'ly.img.video.clip.menu.delete' | 'ly.img.video.clip.menu.action' | (string & {}); /** * Interface representing a generic custom action in the clip context menu. * Requires a `key` to uniquely identify the action and a `label` for display. * * @public */ export declare interface ClipContextMenuCustomAction extends OrderComponent { id: 'ly.img.video.clip.menu.action'; key: string; onClick: () => void | Promise; label: string; icon?: string; isDisabled?: boolean; } export { CMYK } export { CMYKColor } /** * Represents options for a color input. * * The `ColorInputOptions` interface provides a set of properties that control the * behavior and appearance of a color input. These options include settings for the * input label, input label position, value, value setter, disabled state, label, and suffix. * * @public */ export declare interface ColorInputOptions extends InputOptions { label?: string | string[]; } export { ColorSpace } /** * Represents the combined configuration for the Creative Editor SDK. * This type combines the `CESDKConfiguration` with the `EngineConfiguration` while omitting the `presets` key. * * @public */ declare type CombinedConfiguration = CESDKConfiguration & Omit<_EngineConfiguration, 'presets'>; export { CompleteAssetResult } /** * A glob pattern for matching component IDs. * * Examples: * - `'ly.img.*'` matches all ly.img components * - `'*.separator'` matches all separator components * * @public */ export declare type ComponentGlobPattern = `${string}*` | `*${string}` | `*${string}*`; /** * Represents the ID of a component. * * The ComponentId type defines the possible IDs for components that can be used in the editor. * It includes predefined IDs for separators, spacers and various component types. * * @public */ export declare type ComponentId = DockOrderComponentId | CanvasMenuComponentId | NavigationBarComponentId | CanvasBarComponentId | InspectorBarComponentId | CaptionPanelComponentId | ClipContextMenuComponentId; /** * Maps UI areas to their component ID types. * * @public */ export declare type ComponentIdFor = { 'ly.img.dock': DockOrderComponentId; 'ly.img.inspector.bar': InspectorBarComponentId; 'ly.img.canvas.menu': CanvasMenuComponentId; 'ly.img.navigation.bar': NavigationBarComponentId; 'ly.img.canvas.bar': CanvasBarComponentId; 'ly.img.caption.panel': CaptionPanelComponentId; 'ly.img.video.clip.menu': ClipContextMenuComponentId; }[A]; /** * Unified component matcher type supporting all matching strategies. * * - `'first'` / `'last'` - Match first or last component * - `number` - Match by index (0, 1, -1, etc.) * - `C['id']` - Match by exact ID (with autocomplete for known IDs) * - `ComponentGlobPattern` - Match by glob pattern (e.g., `'ly.img.*'`) * - `Partial` - Match by partial properties (e.g., `{ id: 'x', key: 'y' }`) * - `(component, index) => boolean` - Custom predicate function * * @public */ export declare type ComponentMatcher = 'first' | 'last' | number | C['id'] | ComponentGlobPattern | Partial | ((component: C, index: number) => boolean); /** * Options for update and remove operations. * Supports multi-area operations via arrays or glob patterns. * * @public */ export declare interface ComponentMatchOptions { /** The UI area(s) to operate on. Can be a single area, array, or glob pattern. */ in: A; /** The matcher to find components. Autocomplete is area-specific when targeting a single area. */ match: ComponentMatcher>; /** Optional context filter. */ when?: InferOrderContext; /** * Position filter. For canvas bar: `'top'` or `'bottom'`. For dock: `'left'`, `'right'`, or `'bottom'`. * If omitted, the operation applies to all positions. */ at?: A extends 'ly.img.canvas.bar' ? 'top' | 'bottom' : A extends 'ly.img.dock' ? DockPosition : A extends UIArea ? never : 'top' | 'bottom' | DockPosition; } /** * Represents options for a component. * * The `ComponentOptions` interface provides a set of properties that control the * behavior and appearance of a component. These options include settings for the * component ID, payload, and focusable state. * * @public */ export declare interface ComponentOptions { /** * The unique identifier for the registered component. */ componentId: string; /** * Optional payload to pass to the component. */ payload?: any; /** * Whether the component should be focusable (default: true) */ focusable?: boolean; } /** * Represents the payload of a component. * * The ComponentPayload interface defines the structure of the payload that can be associated with a component. * It includes a catch-all type for custom payloads. * * @public */ export declare interface ComponentPayload { [key: string]: unknown; } /** * Specifies a component either by ID or as a full component object. * * @public */ export declare type ComponentSpec = ComponentIdFor | OrderComponentFor; /** * Specifies one or more components for insertion. * * @public */ export declare type ComponentSpecOrArray = ComponentSpec | ComponentSpec[]; export { CompressionFormat_2 as CompressionFormat } export { CompressionLevel } declare namespace ConfigTypes { export { CombinedConfiguration, CESDKConfiguration, Theme, ThemeFn, ThemeConfig, Scale, ScaleFn, ScaleConfig, I18n, A11y, UploadCallbackContext, OnUploadCallback, OnUploadOptions, Callbacks, PageFormatDefinition, BleedMarginOptions, FontSizeOptions, UIOptionsForSingleDesignUnit, UIOptionsPerDesignUnit, ViewStyle } } export { ConfigTypes } /** * Represents the user-provided configuration for the Creative Editor SDK. * This type allows for partial configuration settings, making all properties optional. * * @public * * @privateRemarks * The config provided by the user has different types regarding what is * optional and what mandatory. This is Configuration, but `ui` is recursively * optional, and all other props are non-recursively optional */ export declare type Configuration = Partial; export { ContentFillMode } /** * Action function for copying selected blocks to the clipboard * @public */ export declare type CopyAction = () => void | Promise; export { CreateSceneOptions } /** * The main entry point for the Creative Editor SDK. * * This class provides a comprehensive interface for creating, configuring, and managing * creative editing experiences using our ready-made editor. The SDK can be configured to * serve a multitude of use cases, offering a wide range of features such as asset management, * scene creation, export operations, and plugin management. * * ## Categories * @categoryDescription Members * Instance members that allow access to the underlying engine, user interface, and configuration APIs. * @categoryDescription Asset Management * Methods for registering, managing, and refreshing asset sources including default assets, * demo assets, and custom asset libraries. * @categoryDescription Scene Creation * Methods for creating new scenes from scratch, including design scenes, video scenes, * and scenes from existing images. * @categoryDescription Scene Loading * Methods for loading existing scenes from various sources including strings, URLs, * and encoded scene data. * @categoryDescription Scene Saving * Methods for persisting and exporting scene data as strings or files. * @categoryDescription Export Operations * Methods for exporting scenes and pages as files in various formats and mimeTypes. * @categoryDescription Configuration * Methods for configuring SDK behavior, translations, and runtime settings. * @categoryDescription Plugin Management * Methods for extending SDK functionality through plugins and custom integrations. * @categoryDescription Upload Operations * Methods for handling file uploads and asset creation from user-provided files. * @categoryDescription Lifecycle Management * Methods for SDK initialization, cleanup, and resource management. * * @public */ declare class CreativeEditorSDK { #private; /** * The version of the CE.SDK package. * @category Members */ static readonly version: string; static ui: { addIconSet(id: string, svgSprite: string): void; setComponentOrder(_options: { in: 'ly.img.loading'; }, order: LoadingOrder): void; setTheme(theme: ThemeConfig): void; }; static i18n: { setTranslations(definition: Partial>>): void; }; /** * Access to the CreativeEngine instance that powers the editor. * @category Members */ engine: CreativeEngine_2; /** * Access to the {@link UserInterfaceAPI} for controlling the editor's user interface * @category Members */ ui: UserInterfaceAPI; /** * Access to the {@link InternationalizationAPI} to control locale and translations * @category Members */ i18n: InternationalizationAPI; /** * Access to the {@link FeatureAPI} to control feature availability * @category Members * */ feature: FeatureAPI; /** * Access to the {@link ActionsAPI} to control event actions * @category Members */ actions: ActionsAPI; /** * Access to the {@link UtilsAPI} for utility functions * @category Members */ utils: UtilsAPI; /** * The version of the Creative Editor SDK * @category Members */ version: string; /** * Registers a callback function to be executed when resetEditor is called. * * @param callback - Function to be called with the cesdk instance when reset occurs * @returns Function to remove the callback from the registry * * @example * ```typescript * const removeCallback = cesdk.onReset((cesdk) => { * console.log('Editor is being reset'); * // Custom cleanup/reinitialization logic * }); * * // Later, to remove the callback: * removeCallback(); * ``` * * @category Configuration * @public */ onReset(callback: (cesdk: CreativeEditorSDK) => void): () => void; /** * Convenience function to register a set of our default asset sources. * * The sources contain our example assets. These are: * * - `'ly.img.sticker'` - Various stickers * - `'ly.img.vector.shape'` - Shapes and arrows * - `'ly.img.filter'` - Filter effects (LUT and duotone) * * These assets are parsed at `\{\{base_url\}\}//content.json`, where * `baseURL` defaults to the IMG.LY CDN. * Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available * assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation. * * @deprecated This method uses legacy v4 asset source IDs and will be removed in a future version. * Please migrate to v5 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). * @category Asset Management * @param options - Configuration options for asset sources. Contains `baseURL` (defaults to IMG.LY CDN) and `excludeAssetSourceIds` (IDs to ignore during load). */ addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: { baseURL?: string; excludeAssetSourceIds?: DefaultAssetSourceId[]; }): Promise; /** * Convenience function that registers a set of demo asset sources * * These contain our example assets. These are not to meant to be used in your production code. * * These are * * - `'ly.img.image'` - Sample images * - `'ly.img.image.upload'` - Demo source to upload image assets * - `'ly.img.audio'` - Sample audios * - `'ly.img.audio.upload'` - Demo source to upload audio assets * - `'ly.img.video'` - Sample videos * - `'ly.img.video.upload'` - Demo source to upload video assets * * @deprecated This method uses legacy v3 demo asset source IDs and will be removed in a future version. * Please migrate to v4 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). * @category Asset Management * @param options - Configuration options for asset sources. Contains `baseURL` (defaults to IMG.LY CDN), `excludeAssetSourceIds` (IDs to ignore during load), and `sceneMode` (loads video-specific sources if 'Video'). */ addDemoAssetSources({ baseURL, excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: { baseURL?: string; excludeAssetSourceIds?: DemoAssetSourceId[]; sceneMode?: SceneMode; withUploadAssetSources?: boolean; }): Promise; /** * Exports one or multiple page(s) as an file in the given mimeType * * Please note: the `onExport` callback provided in the configuration will be * not called. This callback is for exports triggered by an user interaction. * * @category Export Operations * @param options - options for the export * * @returns a promise with an object holding `blobs` of the export pages and the provided `options`. */ export(options: ExportOptions): Promise<{ blobs: Blob[]; options: ExportOptions; }>; /** * Create a scene with a single empty page with the given format. * @deprecated Use `cesdk.actions.run('scene.create', { mode: 'Design' })` instead. * @category Scene Creation * @param format - A `PageFormatDefinition` object specifying the page format to use. */ createDesignScene(format?: PageFormatDefinition): Promise; /** * Create a scene with a single empty page with the given format. * @deprecated Use `cesdk.actions.run('scene.create', { mode: 'Video' })` instead. * @category Scene Creation * @param format - The page format to use. Can be either a string, identifying * a page format that has been configured or a `PageFormatDefinition` object. */ createVideoScene(format?: PageFormatDefinition): Promise; /** * Load an encoded scene from the provided string. * @deprecated Use `loadFromString` instead. * @category Scene Loading * @param scene - A string starting with UBQ1 and containing the encoded scene. */ load(scene: string): Promise; /** * Load an encoded scene from the provided string. * @category Scene Loading * @param scene - A string starting with UBQ1 and containing the encoded scene. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromString(scene: string, overrideEditorConfig?: boolean): Promise; /** * Load the scene stored in the file at the given URL. * @category Scene Loading * @param url - The url to fetch to acquire the scene string. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromURL(url: string, overrideEditorConfig?: boolean): Promise; /** * Load a previously archived scene from the URL to the scene file. * @category Scene Loading * @param url - The URL of the scene archive file. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise; /** * Loads the given image and creates a scene with a single page showing the image. * * Fetching the image may take an arbitrary amount of time, so the scene isn't immediately available. * * @category Scene Creation * @param url - The image URL. * @param dpi - The scene's DPI. Defaults to 300. * @param pixelScaleFactor - The display's pixel scale factor. Defaults to 1. * @param sceneLayout - The layout of the scene. Defaults to 'Free'. * @param spacing - Spacing between pages. Defaults to 0. * @param spacingInScreenSpace - Whether spacing is in screen space. Defaults to false. * @returns a promise which resolves if the scene was successfully created. */ createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean): Promise; /** * Create a scene from the provided video. * @category Scene Creation * @param url - The url of the video * @returns a promise which resolves if the scene was successfully created. */ createFromVideo(url: string): Promise; /** * Disable the warning logged when no scene is available. * * If no scene is available, 2 seconds after `CreativeEditorSDK.create()`, * a warning is shown on the console. This method disables this warning. * That can be useful in situation where you are waiting for long running * async processes to finish before creating the scene. * @category Configuration */ disableNoSceneWarning(): void; /** * Returns the baseURL that was provided in the configuration during editor initialization. * * @returns The original baseURL from the top-level configuration * * @example * ```typescript * const cesdk = await CreativeEditorSDK.create('#editor', { * baseURL: 'https://my-cdn.example.com/assets/' * }); * * console.log(cesdk.getBaseURL()); // 'https://my-cdn.example.com/assets/' * ``` */ getBaseURL(): string; /** * Resets the editor to a clean state by disabling all features, clearing UI configurations, * and removing asset sources. * * @example * ```typescript * // Reset the editor to clean state * cesdk.resetEditor(); * * // Reconfigure as needed * cesdk.feature.enable('ly.img.navigation.bar'); * cesdk.addPlugin(new TypefaceAssetSource()); * ``` * * @category Configuration */ resetEditor(): void; /** * Re-applies the user's initial deprecated configuration that was passed to * `CreativeEditorSDK.create()`. This restores deprecated configuration * values that may have been cleared by `resetEditor()`. * * Config plugins should call this as the last step of their `initialize()` * method, after all features, UI, actions, and settings have been set up. * * @deprecated This method is an intermediate measure to preserve backward * compatibility while users migrate away from deprecated configuration * options. It will be removed once the deprecated configuration paths * are fully dropped. * * @category Configuration */ reapplyLegacyUserConfiguration(): void; /** * Save and return a scene as a base64 encoded string. * * @category Scene Saving * @returns a promise with the scene as a string */ save(): Promise; /** * Adds translations to be used by the editor. * * @deprecated Use `cesdk.i18n.setTranslations()` instead. This method will be removed in a future version. * @category Configuration * @param definition - locale to a translation object * * @example * ``` * // Deprecated - do not use * cesdk.setTranslations({...}); * * // Use this instead * cesdk.i18n.setTranslations({ * en: { * presets: { * scene: ... * } * } * }) * ``` */ setTranslations(definition: Partial>>): void; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_switchPage(pageId: number): Promise; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_getPages(): Promise; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_onActivePageChanged(callback: (id: number) => void): () => void; /** * Focus on a specific page and zoom to fit it in the viewport. * @param pageId - The ID of the page to focus on * @returns A promise that resolves when the focus operation is complete * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_focusPage(pageId: number): Promise; /** * Adds and initializes a plugin to the editor. * @category Plugin Management */ addPlugin(plugin: EditorPlugin): Promise; /** * Returns true if a upload handler was configured. If mime types are given * as an argument, it will return true if the upload handler supports all of * the given mime types. * @category Upload Operations * @experimental This API is experimental and may change or be removed in future versions. * @deprecated This API will be removed in future versions. Please use the `engine.editor.getSetting('upload/supportedMimeTypes')` to check for supported mime types instead. */ unstable_supportsUpload(mimeTypes?: string | string[]): boolean; /** * Uses the configured upload handler to upload the given file. * * @category Upload Operations * @param file - The file to upload * @param onProgress - A callback to track the progress of the upload * @experimental This API is experimental and may change or be removed in future versions. * @deprecated This API will be removed in future versions. Please use the `uploadFile` action instead. */ unstable_upload(file: File, onProgress: (progress: number) => void): Promise; /** * Trigger a refetch of the asset source and update the asset library panel with the new items accordingly. * * @param sourceId - The ID or IDs of the asset sources to refetch. If not provided, all asset sources will be refetched. * * @deprecated Please use `cesdk.engine.asset.assetSourceContentsChanged` instead. * @category Asset Management */ refetchAssetSources(sourceId?: string | string[]): void; /** * Disposes the editor and engine if no longer needed. * @category Lifecycle Management */ dispose(): void; /** * @deprecated After being deprecated for over a year, the `init()` method has been removed. * Please use `CreativeEditorSDK.create()` instead. For more information see https://img.ly/docs/cesdk/introduction/migration_1_13/. * CreativeEditorSDK will now attempt to pass the configuration to `CreativeEditorSDK.create()` and continue the initialization process. */ private static init; /** * Creates an editor and renders it for the given container. * * This method gives you more control over the initialization process of the * editor. After the returned Promise resolves, you can execute configuration * commands on the CreativeEditorSDK instance. Once that is done, you can * load or create an initial scene. Until then the CreativeEditorSDK will * display a loading spinner * * @category Lifecycle Management * @param container - the container to mount the editor as a HTML element or selector * @param config - the initial configuration to create the editor * * @returns a promise which resolves after the engine is ready to receive further commands on the CreativeEditorSDK instance */ static create(container: HTMLDivElement | string, config?: Configuration): Promise; } export default CreativeEditorSDK; export { CreativeEngine } /** * A generic action function type for custom actions. * Supports both synchronous and asynchronous implementations with flexible parameters. * * @param args - Variable number of arguments of any type * @returns Any value or a promise that resolves to any value * @public */ export declare type CustomActionFunction = (...args: any[]) => any | Promise; /** * @public * Type representing the background of a custom card, which can be either an image or an SVG vector path. */ declare type CustomCardBackground = CustomCardImageBackground | CustomCardSvgVectorPathBackground; /** * @public * Type representing an image background for a custom card. * - `url`: The URL of the image. * - `type`: The type of the background, which is 'image'. */ declare type CustomCardImageBackground = { url: string; type: 'image'; }; /** * @public * Type representing an SVG vector path background for a custom card. * - `type`: The type of the background, which is 'svgVectorPath'. * - `viewBox`: The viewBox attribute for the SVG. * - `width`: Optional width of the SVG. * - `height`: Optional height of the SVG. * - `d`: The path data for the SVG. * - `stroke`: Optional stroke color for the SVG. * - `strokeWidth`: Optional stroke width for the SVG. * - `strokeLinecap`: Optional stroke line cap for the SVG. * - `strokeLinejoin`: Optional stroke line join for the SVG. * - `strokeDasharray`: Optional stroke dash array for the SVG. * - `strokeDashoffset`: Optional stroke dash offset for the SVG. * - `opacity`: Optional opacity for the SVG. * - `clipPath`: Optional clip path for the SVG. * - `fill`: Optional fill color for the SVG. * - `fillRule`: Optional fill rule for the SVG. * - `clipRule`: Optional clip rule for the SVG. */ declare type CustomCardSvgVectorPathBackground = { type: 'svgVectorPath'; viewBox: string; width?: string | number; height?: string | number; d: string; stroke?: string; strokeWidth?: number | string; strokeLinecap?: 'butt' | 'round' | 'square'; strokeLinejoin?: 'miter' | 'round' | 'bevel'; strokeDasharray?: string; strokeDashoffset?: number | string; opacity?: number | string; clipPath?: string; fill?: string; fillRule?: 'nonzero' | 'evenodd'; clipRule?: 'nonzero' | 'evenodd'; }; /** * Represents a custom dock component. * * The CustomDockComponent interface defines the structure of a custom dock component. * It includes properties for the ID and payload. * * @public */ export declare interface CustomDockComponent extends ComponentPayload { id: DockOrderComponentId; } /** * @public * Type representing a custom icon, which can be a string or a function. * - If a string, it represents the name of the icon. * - If a function, it takes an object with `theme` and `iconSize` properties and returns a string representing the icon. */ declare type CustomIcon = string | (({ theme, iconSize }: { theme: 'light' | 'dark'; iconSize: 'normal' | 'large'; }) => string); declare interface CustomPanel { id: string; onMount: CustomPanelMountFunction; } /** * Represents a function that mounts a custom panel. * * The `CustomPanelMountFunction` type provides a function that mounts a custom panel to a * specified HTMLDivElement. The function returns a `PanelDisposer` function that disposes * of the panel when called. * * @categoryDescription CustomPanelMountFunction * Methods for mounting and disposing of custom panels. * * @public */ export declare type CustomPanelMountFunction = (domElement: HTMLDivElement) => PanelDisposer; export { CutoutOperation } export { CutoutType } export { DefaultAssetSourceId } declare type DefaultFeaturePredicate = boolean | ((context: Omit) => boolean); /** * Action function for deleting an asset from an asset source. * * The default implementation opens a confirmation dialog and, on confirm, * calls `engine.asset.removeAssetFromSource(sourceId, asset.id)` followed by * `engine.asset.assetSourceContentsChanged(sourceId)`. Register a custom * implementation to replace the dialog content, swap in a custom dialog, or * change the deletion behavior entirely. The asset and its source id are * provided so handlers can derive per-asset context (e.g. metadata, page * number) for their custom UI. * * @param params - The asset to delete and the id of its source * @returns A promise that resolves when the delete operation is complete, or void for synchronous operations * @public */ export declare type DeleteAssetAction = (params: { sourceId: string; asset: AssetResult; }) => void | Promise; export { DemoAssetSourceId } export { DesignBlockId } export { DesignBlockType } export { DesignBlockTypeLonghand } export { DesignBlockTypeShorthand } export { DesignUnit } /** * Represents a dialog configuration. * * The Dialog interface defines the structure of a dialog configuration within the Creative Editor SDK. * It includes properties for the type, size, content, progress, actions, cancel action, onClose callback, * and whether clicking outside the dialog should close it. This interface provides a comprehensive way to * define and manage dialogs, allowing for flexibility in how they are presented and interacted with by users. * * @public */ export declare interface Dialog { type?: DialogType; size?: DialogSize; backdrop?: DialogBackdrop; content: DialogContent; progress?: DialogProgress; actions?: DialogAction | DialogAction[]; cancel?: DialogAction; onClose?: () => void; clickOutsideToClose?: boolean; } /** * Represents an action in the dialog. * * The DialogAction type defines the structure of an action that can be performed within a dialog. * It includes properties for the variant, color, label, and a callback function to handle the action * when clicked, providing flexibility in how user interactions are managed. * * @public */ export declare type DialogAction = { variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; label: string; onClick: (context: { id: string; }) => void; }; /** * Represents the backdrop style for the dialog. * * The DialogBackdrop type defines how the background overlay is rendered when a dialog is shown. * - 'transparent': A semi-transparent overlay that allows content behind to be partially visible (default behavior) * - 'opaque': A fully opaque overlay that completely blocks the view of content behind the dialog * * @public */ export declare type DialogBackdrop = 'transparent' | 'opaque'; /** * Represents the content of the dialog. * * The DialogContent type defines the structure of the content that can be displayed within a dialog. * It can be a simple string or an object containing a title and a message, providing flexibility in * how information is presented to users. * * @public */ export declare type DialogContent = string | { title?: string; message: string | string[]; }; /** * Represents the progress of the dialog. * * The DialogProgress type defines the structure of the progress indicator that can be displayed within a dialog. * It can be a number, 'indeterminate', or an object containing a value and a max, providing flexibility in * how progress is indicated to users. * * @public */ export declare type DialogProgress = number | 'indeterminate' | { value: number; max: number; }; /** * Represents the size of the dialog. * * The DialogSize enum defines the possible sizes for dialogs within the Creative Editor SDK. * Each size corresponds to a different dimension, allowing for flexibility in how dialogs are * displayed to users. * * @public */ export declare type DialogSize = 'regular' | 'large'; /** * Represents the type of dialog. * * The DialogType enum defines the various types of dialogs that can be created * within the Creative Editor SDK. Each type corresponds to a different visual * style and behavior, allowing for flexibility in how dialogs are presented to * users. * * @public */ export declare type DialogType = 'regular' | 'success' | 'error' | 'info' | 'warning' | 'loading'; declare type DialogWithId = Dialog & { id: string; }; /** * Location options specifically for the dock, which supports an optional position. * * @public */ export declare interface DockLocationOptions { /** Target the dock. */ in: 'ly.img.dock'; /** Position of the dock. For set/insert, defaults to `'left'`. For get, omitting returns all positions. */ at?: DockPosition; /** Optional context for conditional ordering. */ when?: OrderContext; } /** * Represents a dock order component. * * The DockOrderComponent type defines the possible structures for a dock order component. * It includes predefined structures for custom dock components and asset library dock components. * * @public */ export declare type DockOrderComponent = CustomDockComponent | AssetLibraryDockComponent; /** * Represents the ID of a dock order component. * * The DockOrderComponentId type defines the possible IDs for components that can be used in the dock order. * It includes predefined IDs for separators and spacers, as well as a catch-all type for custom IDs. * * @public */ export declare type DockOrderComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.assetLibrary.dock' | (string & {}); /** * Valid positions for the dock: `'left'`, `'right'`, or `'bottom'`. * @public */ export declare type DockPosition = 'left' | 'right' | 'bottom'; export { DominantColor } export { DominantColorsOptions } /** * Represents the context for the children of a dropdown. * * The `DropdownChildrenContext` interface provides a set of properties that describe * the context for the children of a dropdown. These options include settings for the * close function. * * @public */ export declare interface DropdownChildrenContext { close: () => void; } /** * Represents options for a dropdown. * * The `DropdownOptions` interface provides a set of properties that control the * behavior and appearance of a dropdown. These options include settings for the * input label, input label position, label, tooltip, variant, color, size, icon, * disabled state, loading state, loading progress, children, and suffix. * * @public */ export declare interface DropdownOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; tooltip?: string | string[]; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; isActive?: boolean; activeStateStyle?: 'outline' | 'pill' | 'none'; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; children?: ((context: DropdownChildrenContext) => void) | ChildrenOrder; suffix?: Suffix; /** * Whether to show the expand indicator icons (triangle up/down). * @default true */ showIndicator?: boolean; } export { DropShadowOptions } export { EditMode } export { EditorAPI } /** * Action for checking browser capabilities at editor startup. * Idempotent: only runs checks once per editor lifetime. * * When called with explicit params, uses them directly (no scene needed). * When called without params, reads scene mode for defaults. * * @public */ export declare type EditorCheckBrowserSupportAction = (params?: { videoDecode?: UnsupportedCapabilityBehavior; videoEncode?: UnsupportedCapabilityBehavior; }) => Promise; /** * Represents an editor plugin. * This interface defines the structure of an editor plugin, including its name, version, and initialization function. * * @public */ export declare interface EditorPlugin { name: string; version: string; initialize: (context: EditorPluginContext) => void | Promise; } /** * Represents the context for an editor plugin. * This type extends the `EnginePluginContext` with an optional `cesdk` property. * * @public */ export declare type EditorPluginContext = EnginePluginContext & { cesdk?: CreativeEditorSDK; }; export { EffectType } export { EffectTypeLonghand } export { EffectTypeShorthand } export { _EngineConfiguration } export { EngineExportOptions } export { EnginePlugin } export { EnginePluginContext } export { EventAPI } /** * Namespace containing experimental features for the builder. * These features are subject to change and may not be stable for production use. * @public */ export declare namespace ExperimentalBuilder { /** * @public */ export interface BuilderRenderContext { builder: Builder; /** * Global state object that can be used to store and retrieve values. * * It will take a unique identifier for this state that can be used * to access this store later. * * ``` * const { value, setValue } = global('unique-id', 'default-value'); * ``` * * If no default value is set, the `value` property may be undefined * if no value was set before: * * ``` * const { value, setValue } = global('unique-id', 'default-value'); * ``` * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ global: { /** * State object that can be used to store and retrieve a value. If * no values are stored, the default value will be returned. * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ (id: string, defaultValue: T): { /** * The current value of this state. If no value was set, the default * value will be returned. * * @returns The new value or the default value. */ value: T; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; /** * State object that can be used to store and retrieve a value. * If no value was set, the value will be `undefined`. * * @param id - The unique identifier for the state. */ (id: string): { value: T | undefined; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; }; } /** * @public */ export interface PopoverChildrenContext { close: () => void; } /** * @public */ export type Placement = 'top' | 'bottom' | 'right' | 'left' | 'auto' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end'; /** * @public */ export interface PopoverOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; labelAlignment?: 'left' | 'center'; tooltip?: string | string[]; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; trailingIcon?: CustomIcon | null; isActive?: boolean; isSelected?: boolean; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; placement?: Placement; children?: ((context: PopoverChildrenContext) => void) | ChildrenOrder; suffix?: Suffix; } export interface MenuOptions { children?: () => void; } export interface ButtonRowOptions { children?: () => void; justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'; } /** * @public */ export type PreviewTypeImage = { type: 'image'; uri: string; checkeredBackground?: boolean; fillType?: 'cover' | 'contain'; fillPosition?: 'center' | 'top' | 'right' | 'bottom' | 'left'; }; /** * @public */ export type PreviewTypeColor = { type: 'color'; color: string; }; /** * @public */ export type PreviewType = PreviewTypeImage | PreviewTypeColor; /** * @public */ export interface MediaPreviewOptions { size?: 'small' | 'medium' | 'square'; preview?: PreviewType; action?: ButtonOptions; } /** * Interface for all available builder. Depending on the context different * implementation might be used. A "Button" in the canvas menu might render * different component than a button in the topbar or a panel. * @public */ export interface Builder { Menu: (id: string, options: MenuOptions) => void; Popover: (id: string, options: PopoverOptions) => void; ButtonRow: (id: string, options: ButtonRowOptions) => void; MediaPreview: (id: string, options: MediaPreviewOptions) => void; } } /** * Provides experimental methods for controlling the UI of the Creative Editor SDK. * * The `Experimental` namespace contains classes and methods that are subject to change * and are not guaranteed to be stable across different versions of the SDK. These methods * offer advanced functionality that may not be suitable for all use cases but can be * useful for developers who need more control over the editor's behavior. * * @public */ export declare namespace ExperimentalUserInterfaceAPI { /** * A public interface for controlling the UI of the Creative Editor SDK * * @public */ export class UserInterfaceAPI { #private; /** * @public */ setGlobalStateValue(id: string, value: T): void; /** * @public */ getGlobalStateValue(id: string, defaultValue?: T): T; /** * @public */ hasGlobalStateValue(id: string): boolean; /** * @public */ onGlobalStateChanged(id: string, callback: (value: T) => void): () => void; } } /** * Action function for handling export operations. * Can be called with or without options to customize the export behavior. * Supports both standard and video export workflows through a generic type parameter. * The return type is automatically inferred based on the input options type. * * @param options - Optional export configuration for standard or video exports * @returns A promise that resolves when the export operation is complete, or void for synchronous operations * @public */ export declare type ExportAction = (options?: EngineExportOptions | VideoExportOptions) => void | Promise; /** * @public * Type representing the export format. * - `image/png`: PNG image format. * - `video/mp4`: MP4 video format. * - `application/pdf`: PDF document format. */ declare type ExportFormat = 'image/png' | 'video/mp4' | 'application/pdf'; /** * Specifies options for exporting design blocks to various formats. * * The `ExportOptions` interface provides a set of properties that control the * behavior and quality of the exported content. These options include settings * for JPEG, WebP, PNG, and PDF exports, as well as options for resizing and * adding underlayers. * * @public */ export declare interface ExportOptions extends Pick { /** The mime type of the exported blob */ mimeType: MimeType_2; /** The pages to export with the selected page as the default */ pages?: number[]; } /** * Action function for handling scene export operations. * * @param options - Options for configuring the export operation * - options.format: The format of the exported scene data. * - options.scene: The scene data to export. * @returns A promise that resolves when the export operation is complete, or void for synchronous operations * @public */ export declare type ExportSceneAction = (options: { format: 'scene' | 'archive'; }) => void | Promise; /** * Controls the availability of features within the Creative Editor SDK. * * The FeatureAPI allows you to enable or disable specific functionality * within the editor based on custom conditions or user permissions. * * ## Understanding the Feature System * * The feature system uses a **predicate chain** to determine if a feature is enabled. * There are two types of predicates: * * 1. **Boolean predicates** (e.g., `true` or `false`) - These are **always terminal** and immediately return their value. * 2. **Function predicates** - The implementation decides whether to call `isPreviousEnable()` (continue chain) or return directly (end chain). * * ### Evaluation Order * * Predicates are evaluated in this order: * 1. **`set()` predicates** (most recent first) - Evaluated **FIRST** * 2. **`enable()`/`disable()` state** - Evaluated **LAST** * * This means **`set()` can override `enable()` and `disable()`**. * * ## Common Use Cases and Expected Outcomes * * ### Use Case 1: Simple Enable/Disable * * **Use `enable()` and `disable()` for simple on/off control:** * * ```typescript * // Enable a feature with its default behavior * cesdk.feature.enable('ly.img.delete'); * // isEnabled: true * * // Disable it * cesdk.feature.disable('ly.img.delete'); * // isEnabled: false * * // Re-enable it * cesdk.feature.enable('ly.img.delete'); * // isEnabled: true * ``` * * **Expected outcome:** `enable()` and `disable()` work together to toggle features on/off. * * ### Use Case 2: Custom Conditions with `set()` * * **Use `set()` when you need custom logic:** * * ```typescript * // Enable delete only when something is selected * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * // isEnabled: depends on selection * * // Now calling disable() won't work because set() is evaluated first! * cesdk.feature.disable('ly.img.delete'); * // isEnabled: still depends on selection (disable is ignored) * ``` * * **Expected outcome:** `set()` function predicates are evaluated before `disable()`, * so `disable()` has no effect when a `set()` predicate exists. * * ### Use Case 3: Terminal Boolean Predicates * * **Boolean predicates are terminal - they stop the chain:** * * ```typescript * cesdk.feature.enable('ly.img.delete'); // Default predicate: true * cesdk.feature.set('ly.img.delete', false); // Adds false to front * // Chain: [set(false), enable(true)] * // Evaluation: false (stops here, never reaches enable) * // isEnabled: false * * cesdk.feature.set('ly.img.delete', true); // Adds true to front * // Chain: [set(true), set(false), enable(true)] * // Evaluation: true (stops here, never reaches the rest) * // isEnabled: true * ``` * * **Expected outcome:** The most recent `set()` call with a boolean wins because * boolean predicates are terminal. * * ### Use Case 4: Layering Conditions with Functions * * **Function predicates can check previous conditions:** * * ```typescript * // Base: Feature enabled by default * cesdk.feature.enable('ly.img.delete'); * * // Layer 1: Add selection requirement * cesdk.feature.set('ly.img.delete', ({ isPreviousEnable, engine }) => { * const baseEnabled = isPreviousEnable(); // Checks enable(true) * const hasSelection = engine.block.findAllSelected().length > 0; * return baseEnabled && hasSelection; * }); * // isEnabled: true only if enabled AND has selection * * // Layer 2: Add block type requirement * cesdk.feature.set('ly.img.delete', ({ isPreviousEnable, engine }) => { * const previousEnabled = isPreviousEnable(); // Checks Layer 1 * const [selected] = engine.block.findAllSelected(); * const isText = selected != null && engine.block.getType(selected) === '//ly.img.ubq/text'; * return previousEnabled && isText; * }); * // isEnabled: true only if all conditions met (block type + selection + enabled) * ``` * * **Expected outcome:** Each `set()` call with a function can build on previous * conditions by calling `isPreviousEnable()`. * * ### Use Case 5: Overriding with `set()` * * **`set()` can completely override enable/disable:** * * ```typescript * cesdk.feature.enable('ly.img.delete'); * cesdk.feature.disable('ly.img.delete'); * // isEnabled: false (disable overrides enable) * * // But set() overrides both: * cesdk.feature.set('ly.img.delete', true); * // Chain: [set(true), disable(false)] * // isEnabled: true (set is terminal, disable never evaluated) * ``` * * **Expected outcome:** `set()` with a boolean always wins because it's evaluated * first and is terminal. * * ### Use Case 6: Glob Patterns for Bulk Operations * * **Use wildcards to affect multiple features:** * * ```typescript * // Enable all video features at once * cesdk.feature.enable('ly.img.video.*'); * * // Disable all crop features * cesdk.feature.disable('ly.img.crop.*'); * * // Set custom predicate for all navigation features * cesdk.feature.set('ly.img.navigation.*', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * * // Check if all video features are enabled * const allVideoEnabled = cesdk.feature.isEnabled('ly.img.video.*'); * // Returns true only if ALL matching features are enabled * ``` * * **Expected outcome:** Glob patterns match multiple features. `isEnabled()` with * a glob returns `true` only if **all** matching features are enabled. * * ### Use Case 7: Role-Based Access Control * * **Implement permissions using predicates:** * * ```typescript * const userRole = 'editor'; // Could be 'viewer', 'editor', 'admin' * * cesdk.feature.set('ly.img.delete', () => { * return userRole === 'editor' || userRole === 'admin'; * }); * * cesdk.feature.set('ly.img.settings', () => { * return userRole === 'admin'; * }); * ``` * * **Expected outcome:** Features are enabled based on user roles, with predicates * evaluated on every check. * * ### Use Case 8: Enable/Disable Propagation to Children * * **Enabling a parent feature also enables all child features that have default predicates:** * * ```typescript * // Enable the parent feature - also enables children * cesdk.feature.enable('ly.img.replace'); * // Equivalent to also calling: cesdk.feature.enable('ly.img.replace.*') * * // All children with default predicates are now enabled: * cesdk.feature.isEnabled('ly.img.replace.fill'); // true (if default predicate passes) * cesdk.feature.isEnabled('ly.img.replace.shape'); // true (if default predicate passes) * cesdk.feature.isEnabled('ly.img.replace.audio'); // true (if default predicate passes) * * // Disable a specific child after propagation: * cesdk.feature.disable('ly.img.replace.fill'); * cesdk.feature.isEnabled('ly.img.replace.fill'); // false * * // Disable propagates to children too: * cesdk.feature.disable('ly.img.replace'); * // Equivalent to also calling: cesdk.feature.disable('ly.img.replace.*') * ``` * * **Expected outcome:** `enable()` and `disable()` propagate to all child features * that have registered default predicates. Each child uses its own default predicate, * so context-dependent conditions (e.g., block type checks) still apply. * Children can be individually overridden after propagation. * * ## Key Principles * * 1. **Use `enable()` for simple on/off** - Works with default predicates * 2. **Use `disable()` to turn off enabled features** - Only works if no `set()` predicates exist * 3. **Use `set()` for custom logic** - Overrides `enable()`/`disable()` * 4. **Boolean predicates are terminal** - Stop evaluation immediately * 5. **Function predicates can chain** - Call `isPreviousEnable()` to continue * 6. **Most recent `set()` wins** - Evaluated in LIFO order (most recent first) * 7. **Glob patterns affect multiple features** - Use `*` as wildcard * 8. **Enable/disable propagates to children** - `enable()` and `disable()` also affect all child features with default predicates * * @categoryDescription Feature Control * Methods for enabling and checking the status of editor features based on custom predicates. * * @public */ export declare class FeatureAPI { #private; /** * Enables one or more features using their default predicates. * * This is the recommended way to enable features. Each feature has a sensible * default predicate that determines when it should be available in the UI. * To customize the behavior, use the `set()` method instead. * * Supports glob patterns (e.g., 'ly.img.video.*') to enable multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Enable single feature with its default predicate: * ```typescript * cesdk.feature.enable('ly.img.delete'); * ``` * * @example * Enable multiple features at once: * ```typescript * cesdk.feature.enable(['ly.img.delete', 'ly.img.duplicate']); * ``` * * @example * Enable all video features using a glob pattern: * ```typescript * cesdk.feature.enable('ly.img.video.*'); * ``` * * @example * Enable all navigation features: * ```typescript * cesdk.feature.enable('ly.img.navigation.*'); * ``` * * @category Feature Control * @param featureId - The feature ID, glob pattern, or array of feature IDs to enable. */ enable(featureId: FeatureId | FeatureId[]): void; /** * @deprecated Use `cesdk.feature.set(featureId, predicate)` instead. * This overload will be removed in a future version. * * Enables one or more features based on the provided predicate. * * @category Feature Control * @param featureId - The feature ID or array of feature IDs to enable. * @param predicate - The condition that determines if the feature is enabled. */ enable(featureId: FeatureId | FeatureId[], predicate: FeaturePredicate): void; /** * Disables one or more features. * * This is a convenience method that adds a `false` predicate to the feature's * predicate chain, effectively disabling the feature. Disabled features will * not be shown in the UI. * * Supports glob patterns (e.g., 'ly.img.video.*') to disable multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Disable a single feature: * ```typescript * cesdk.feature.disable('ly.img.delete'); * ``` * * @example * Disable multiple features at once: * ```typescript * cesdk.feature.disable([ * 'ly.img.delete', * 'ly.img.duplicate', * 'ly.img.group' * ]); * ``` * * @example * Disable all video features using a glob pattern: * ```typescript * cesdk.feature.disable('ly.img.video.*'); * ``` * * @example * Disable all crop features: * ```typescript * cesdk.feature.disable('ly.img.crop.*'); * ``` * * @category Feature Control * @param featureId - The feature ID, glob pattern, or array of feature IDs to disable. */ disable(featureId: FeatureId | FeatureId[]): void; /** * Sets a feature's enabled state, replacing any existing predicates. * * This method provides a unified way to enable or disable features. When setting * to `true`, the feature's default predicate is used. When setting to `false`, * the feature is explicitly disabled. You can also provide a custom predicate * function for advanced control. * * Supports glob patterns (e.g., 'ly.img.video.*') to set multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Enable a feature using its default predicate: * ```typescript * cesdk.feature.set('ly.img.delete', true); * ``` * * @example * Disable a feature: * ```typescript * cesdk.feature.set('ly.img.delete', false); * ``` * * @example * Set a feature with a custom predicate: * ```typescript * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * ``` * * @example * Disable all video features using a glob pattern: * ```typescript * cesdk.feature.set('ly.img.video.*', false); * ``` * * @example * Enable all filter features with a custom predicate: * ```typescript * cesdk.feature.set('ly.img.filter.*', ({ engine }) => { * // Only enable filters for images * const selected = engine.block.findAllSelected(); * return selected.some(id => engine.block.getType(id) === '//ly.img.ubq/graphic'); * }); * ``` * * @category Feature Control * @param featureId - The feature ID or glob pattern to set. * @param enabled - Boolean to enable/disable, or a predicate function for custom logic. */ set(featureId: FeatureId, enabled: boolean | FeaturePredicate): void; /** * Lists all registered feature IDs, optionally filtered by a pattern. * * This method is useful for debugging and discovering which features are currently * registered in the editor. You can provide a glob-style pattern to filter the results. * * @example * List all registered features: * ```typescript * const allFeatures = cesdk.feature.list(); * console.log(allFeatures); // ['ly.img.delete', 'ly.img.duplicate', ...] * ``` * * @example * List features matching a pattern: * ```typescript * const videoFeatures = cesdk.feature.list({ matcher: 'ly.img.video.*' }); * console.log(videoFeatures); // ['ly.img.video.timeline', 'ly.img.video.timeline.clips', ...] * ``` * * @example * List navigation features: * ```typescript * const navFeatures = cesdk.feature.list({ matcher: 'ly.img.navigation.*' }); * ``` * * @category Feature Control * @param options - Optional configuration object with a `matcher` property for glob-style pattern filtering (e.g., 'ly.img.video.*'). * @returns An array of feature IDs sorted alphabetically. */ list(options?: { matcher?: string; }): FeatureId[]; /** * Gets the predicate chain for a specific feature. * * This method returns the array of predicates currently registered for a feature, * allowing you to inspect the feature's configuration. Returns `undefined` if the * feature is not registered. * * @example * Get predicates for a feature: * ```typescript * const predicates = cesdk.feature.get('ly.img.delete'); * if (predicates) { * console.log(`Feature has ${predicates.length} predicates`); * } * ``` * * @example * Check if a feature is registered: * ```typescript * const isRegistered = cesdk.feature.get('ly.img.delete') !== undefined; * ``` * * @category Feature Control * @param featureId - The feature ID to query. * @returns The array of predicates for the feature, or undefined if not registered. */ get(featureId: FeatureId): FeaturePredicate[] | undefined; /** * Checks if one or more features are currently enabled. * * Supports glob patterns (e.g., 'ly.img.video.*') to check multiple features at once. * When a glob pattern is used, returns `true` only if **all** matching features are enabled. * * @example * Check if a single feature is enabled: * ```typescript * const isDeleteEnabled = cesdk.feature.isEnabled('ly.img.delete'); * ``` * * @example * Check if all video features are enabled: * ```typescript * const allVideoFeaturesEnabled = cesdk.feature.isEnabled('ly.img.video.*'); * ``` * * @example * Check with custom context (useful in predicates): * ```typescript * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return cesdk.feature.isEnabled('ly.img.duplicate', { engine }); * }); * ``` * * @category Feature Control * @param featureId - The feature ID or glob pattern to check. * @param context - The context object containing a reference to the underlying engine. * @returns True if the feature (or all matching features for glob patterns) is enabled, false otherwise. */ isEnabled(featureId: FeatureId, context?: IsEnabledFeatureContext): boolean; /** * Checks if a feature has registered predicates. * * Returns `true` if the feature has any predicates (boolean or function) in its chain. * Returns `false` if the feature is unknown or has no predicates. * * @category Feature Control * @param featureId - The feature ID to check. * @returns True if the feature has registered predicates. */ has(featureId: FeatureId): boolean; } /** * All built-in CE.SDK Feature Ids. * * @public */ export declare type FeatureId = 'ly.img.navigation' | 'ly.img.navigation.bar' | 'ly.img.navigation.back' | 'ly.img.navigation.close' | 'ly.img.navigation.undoRedo' | 'ly.img.navigation.zoom' | 'ly.img.navigation.actions' | 'ly.img.navigation.documentSettings' | 'ly.img.delete' | 'ly.img.duplicate' | 'ly.img.placeholder' | 'ly.img.placeholder.general' | 'ly.img.placeholder.arrange' | 'ly.img.placeholder.fill' | 'ly.img.placeholder.shape' | 'ly.img.placeholder.stroke' | 'ly.img.placeholder.text' | 'ly.img.placeholder.appearance' | 'ly.img.placeholder.audio' | 'ly.img.placeholder.audio.change' | 'ly.img.placeholder.general.opacity' | 'ly.img.placeholder.general.blendMode' | 'ly.img.placeholder.general.duplicate' | 'ly.img.placeholder.general.delete' | 'ly.img.placeholder.arrange.move' | 'ly.img.placeholder.arrange.resize' | 'ly.img.placeholder.arrange.rotate' | 'ly.img.placeholder.arrange.flip' | 'ly.img.placeholder.fill.change' | 'ly.img.placeholder.fill.changeType' | 'ly.img.placeholder.fill.actAsPlaceholder' | 'ly.img.placeholder.fill.crop' | 'ly.img.placeholder.shape.change' | 'ly.img.placeholder.stroke.change' | 'ly.img.placeholder.text.edit' | 'ly.img.placeholder.text.actAsPlaceholder' | 'ly.img.placeholder.text.character' | 'ly.img.placeholder.appearance.adjustments' | 'ly.img.placeholder.appearance.filter' | 'ly.img.placeholder.appearance.effect' | 'ly.img.placeholder.appearance.blur' | 'ly.img.placeholder.appearance.shadow' | 'ly.img.placeholder.appearance.animations' | 'ly.img.preview' | 'ly.img.page' | 'ly.img.page.move' | 'ly.img.page.add' | 'ly.img.page.resize' | 'ly.img.page.settings' | 'ly.img.page.bleedMargin' | 'ly.img.page.clipContent' | 'ly.img.scene.layout' | 'ly.img.scene.layout.horizontal' | 'ly.img.scene.layout.vertical' | 'ly.img.scene.layout.free' | 'ly.img.group' | 'ly.img.group.create' | 'ly.img.group.ungroup' | 'ly.img.group.enter' | 'ly.img.group.select' | 'ly.img.replace' | 'ly.img.replace.fill' | 'ly.img.replace.shape' | 'ly.img.replace.audio' | 'ly.img.text' | 'ly.img.text.edit' | 'ly.img.text.typeface' | 'ly.img.text.fontSize' | 'ly.img.text.fontStyle' | 'ly.img.text.decoration' | 'ly.img.text.alignment' | 'ly.img.text.list' | 'ly.img.text.list.unordered' | 'ly.img.text.list.ordered' | 'ly.img.text.advanced' | 'ly.img.text.background' | 'ly.img.text.background.picker' | 'ly.img.text.background.picker.opacity' | 'ly.img.text.background.library' | 'ly.img.adjustment' | 'ly.img.filter' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.shadow' | 'ly.img.shadow.color' | 'ly.img.shadow.color.picker' | 'ly.img.shadow.color.picker.opacity' | 'ly.img.shadow.color.library' | 'ly.img.shadow.offset' | 'ly.img.shadow.blur' | 'ly.img.cutout' | 'ly.img.fill' | 'ly.img.fill.color' | 'ly.img.fill.color.picker' | 'ly.img.fill.color.picker.opacity' | 'ly.img.fill.color.picker.gradient' | 'ly.img.fill.color.library' | 'ly.img.fill.image' | 'ly.img.fill.video' | 'ly.img.shape.options' | 'ly.img.shape.options.cornerRadius' | 'ly.img.shape.options.points' | 'ly.img.shape.options.innerDiameter' | 'ly.img.shape.options.sides' | 'ly.img.shape.options.lineWidth' | 'ly.img.shape.edit' | 'ly.img.vectorEdit' | 'ly.img.vectorEdit.moveMode' | 'ly.img.vectorEdit.addMode' | 'ly.img.vectorEdit.deleteMode' | 'ly.img.vectorEdit.bendMode' | 'ly.img.vectorEdit.mirrorMode' | 'ly.img.vectorEdit.done' | 'ly.img.combine' | 'ly.img.combine.union' | 'ly.img.combine.subtract' | 'ly.img.combine.intersect' | 'ly.img.combine.exclude' | 'ly.img.trim' | 'ly.img.crop' | 'ly.img.crop.size' | 'ly.img.crop.rotation' | 'ly.img.crop.flip' | 'ly.img.crop.fillMode' | 'ly.img.crop.scale' | 'ly.img.crop.position' | 'ly.img.crop.panel.autoOpen' | 'ly.img.volume' | 'ly.img.playbackSpeed' | 'ly.img.stroke' | 'ly.img.stroke.color' | 'ly.img.stroke.color.picker' | 'ly.img.stroke.color.picker.opacity' | 'ly.img.stroke.color.library' | 'ly.img.stroke.width' | 'ly.img.stroke.style' | 'ly.img.stroke.position' | 'ly.img.stroke.cornerGeometry' | 'ly.img.position' | 'ly.img.position.arrange' | 'ly.img.position.align' | 'ly.img.position.distribute' | 'ly.img.animations' | 'ly.img.opacity' | 'ly.img.blendMode' | 'ly.img.video' | 'ly.img.video.timeline' | 'ly.img.video.timeline.ruler' | 'ly.img.video.timeline.clips' | 'ly.img.video.timeline.overlays' | 'ly.img.video.timeline.audio' | 'ly.img.video.timeline.addClip' | 'ly.img.video.timeline.controls' | 'ly.img.video.timeline.controls.toggle' | 'ly.img.video.timeline.controls.background' | 'ly.img.video.timeline.controls.playback' | 'ly.img.video.timeline.controls.loop' | 'ly.img.video.timeline.controls.split' | 'ly.img.video.timeline.controls.timelineZoom' | 'ly.img.video.caption' | 'ly.img.transform' | 'ly.img.transform.position' | 'ly.img.transform.size' | 'ly.img.transform.rotation' | 'ly.img.transform.flip' | 'ly.img.inspector.bar' | 'ly.img.inspector.toggle' | 'ly.img.dock' | 'ly.img.rulers' | 'ly.img.canvas' | 'ly.img.canvas.bar' | 'ly.img.canvas.menu' | 'ly.img.inspector' | 'ly.img.settings' | 'ly.img.library.panel' | 'ly.img.notifications' | 'ly.img.notifications.undo' | 'ly.img.notifications.redo' | (string & {}); /** * The feature predicate is used to enable or disable a feature * based on the boolean or the return value of the function. * * @public */ export declare type FeaturePredicate = boolean | ((context: FeaturePredicateContext) => boolean); /** * Represents the context for enabling a feature. * This type extends `IsEnabledFeatureContext` and includes a function to check the previous enable state * and a function to get the default predicate. * * @public */ export declare type FeaturePredicateContext = IsEnabledFeatureContext & { isPreviousEnable: () => boolean; defaultPredicate: () => boolean; }; /** * Represents the MIME types for files supported by the file operations in UtilsAPI. * @public */ export declare type FileMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/x-tga' | 'image/svg+xml' | 'audio/wav' | 'video/mp4' | 'video/quicktime' | 'video/webm' | 'video/matroska' | 'application/octet-stream' | 'application/pdf' | 'application/zip' | 'text/plain;charset=UTF-8'; export { FillType } export { FillTypeLonghand } export { FillTypeShorthand } export { Font } export { FontMetrics } /** * Represents the font size configuration options in the Creative Editor SDK. * This interface defines the dropdown options for font sizes. * * @public */ declare interface FontSizeOptions { /** * The font size options that can be selected from a dropdown in the UI. * Other font size values can be entered directly using the input field. */ dropdownOptions: number[]; } export { FontStyle } export { FontWeight } /** * Options for getting component order. * Only single area queries are supported to ensure type-safe returns. * * @public */ export declare type GetOrderOptions = AnyUILocationOptions; /** * A glob pattern string for matching UI areas or component IDs. * Supports `*` as a wildcard. * * Examples: * - `'ly.img.canvas.*'` matches 'ly.img.canvas.bar' and 'ly.img.canvas.menu' * - `'ly.img.*.bar'` matches 'ly.img.canvas.bar', 'ly.img.inspector.bar', 'ly.img.navigation.bar' * - `'*'` matches all areas * * @public */ export declare type GlobPattern = `${string}*` | `*${string}` | `*${string}*` | '*'; export { GradientColorStop } export { GradientstopRGBA } /** * Represents options for a heading. * * The `HeadingOptions` interface provides a set of properties that control the * behavior and appearance of a heading. These options include settings for the * content. * * @public */ export declare interface HeadingOptions { content: string; } export { HexColorString } export { HistoryId } export { HorizontalBlockAlignment } export { HTMLCreativeEngineCanvasElement } /** * Represents the internationalization settings for the Creative Editor SDK. * This type defines a record of locale strings to translation objects. * Note: this will append keys and not override keys. * * @public */ declare type I18n = Record>; export { ImageMimeType } /** * Action function for handling scene import operations. * * @param options - Options for configuring the import operation * - options.format: The format of the imported scene data. * @returns A promise that resolves with the imported scene data as a string, or the scene data directly * @public */ export declare type ImportSceneAction = (options: { format?: 'scene' | 'archive'; }) => void | Promise; /** * Infers the component type from a UI area specifier. * - Single area: returns area-specific component type * - Array of areas: returns union of component types * - Glob pattern: returns base OrderComponent (all IDs) * * @public */ export declare type InferComponentType = A extends UIArea ? OrderComponentFor : A extends UIArea[] ? OrderComponentFor : OrderComponent; /** * Infers the order context type from a UI area specifier. * - Single area: returns area-specific context type * - Array of areas: returns union of context types * - Glob pattern: returns base OrderContext (all areas) * * @public */ export declare type InferOrderContext = A extends UIArea ? OrderContextFor : A extends UIArea[] ? OrderContextFor : OrderContext; /** * Represents options for an input. * * The `InputOptions` interface provides a set of properties that control the * behavior and appearance of an input. These options include settings for the * input label, input label position, value, value setter, disabled state, and suffix. * * @public */ export declare interface InputOptions { inputLabel?: string | string[]; inputLabelPosition?: P; value: T; setValue: (value: T) => void; isDisabled?: boolean; suffix?: Suffix; } /** * Insert after a matched component. * @public */ export declare interface InsertAfterOptions = Exclude> extends BaseInsertOptions { /** Insert after this component. */ after: ComponentMatcher; before?: never; position?: never; } /** * Append to end (default behavior). * @public */ export declare interface InsertAppendOptions = Exclude> extends BaseInsertOptions { before?: never; after?: never; position?: never; } /** * Insert at a specific position. * @public */ export declare interface InsertAtPositionOptions = Exclude> extends BaseInsertOptions { /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */ position: 'start' | 'end' | number; before?: never; after?: never; } /** * Insert before a matched component. * @public */ export declare interface InsertBeforeOptions = Exclude> extends BaseInsertOptions { /** Insert before this component. */ before: ComponentMatcher; after?: never; position?: never; } /** * Options for inserting a component into a UI area. * Supports mutual exclusion: only one of `before`, `after`, or `position` can be specified. * Positional areas (like canvas bar) require the `at` property to specify which slot. * * @public */ export declare type InsertComponentOptions = A extends PositionalUIArea ? PositionalInsertBeforeOptions | PositionalInsertAfterOptions | PositionalInsertAtPositionOptions | PositionalInsertAppendOptions : A extends Exclude ? InsertBeforeOptions | InsertAfterOptions | InsertAtPositionOptions | InsertAppendOptions : never; /** * Represents the location for inserting an order component. * * The `InsertOrderComponentLocation` type provides a set of values that control the * location where a new component should be inserted relative to an existing component. * These options include settings for inserting the component before, after, replacing, * or as a child of the matched component. * * @categoryDescription InsertOrderComponentLocation * Methods for configuring the location for inserting an order component. * * @public */ export declare type InsertOrderComponentLocation = 'before' | 'after' | 'replace' | 'asChild'; /** * Result of an insert operation. * * @public */ export declare interface InsertResult { /** Whether at least one component was successfully inserted. False if target not found. */ inserted: boolean; /** Number of components that were inserted. */ insertedCount: number; /** The new order after the insert. */ order: OrderComponentFor[]; } /** * Represents the ID of an inspector bar component. * * The InspectorBarComponentId type defines the possible IDs for components that can be used in the inspector bar. * It includes predefined IDs for separators, spacers, and various inspector items, as well as a catch-all type for custom IDs. * * @public */ export declare type InspectorBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.spacer' | 'ly.img.video.caption.inspectorBar' | 'ly.img.shape.options.inspectorBar' | 'ly.img.cutout.type.inspectorBar' | 'ly.img.cutout.offset.inspectorBar' | 'ly.img.cutout.smoothing.inspectorBar' | 'ly.img.group.create.inspectorBar' | 'ly.img.group.ungroup.inspectorBar' | 'ly.img.audio.replace.inspectorBar' | 'ly.img.separator' | 'ly.img.text.typeFace.inspectorBar' | 'ly.img.text.style.inspectorBar' | 'ly.img.text.bold.inspectorBar' | 'ly.img.text.italic.inspectorBar' | 'ly.img.text.fontSize.inspectorBar' | 'ly.img.text.alignHorizontal.inspectorBar' | 'ly.img.text.advanced.inspectorBar' | 'ly.img.combine.inspectorBar' | 'ly.img.separator' | 'ly.img.fill.inspectorBar' | 'ly.img.trim.inspectorBar' | 'ly.img.volume.inspectorBar' | 'ly.img.crop.inspectorBar' | 'ly.img.separator' | 'ly.img.stroke.inspectorBar' | 'ly.img.separator' | 'ly.img.text.background.inspectorBar' | 'ly.img.separator' | 'ly.img.animations.inspectorBar' | 'ly.img.separator' | 'ly.img.appearance.inspectorBar' | 'ly.img.adjustment.inspectorBar' | 'ly.img.filter.inspectorBar' | 'ly.img.effect.inspectorBar' | 'ly.img.blur.inspectorBar' | 'ly.img.separator' | 'ly.img.shadow.inspectorBar' | 'ly.img.separator' | 'ly.img.opacityOptions.inspectorBar' | 'ly.img.separator' | 'ly.img.position.inspectorBar' | 'ly.img.spacer' | 'ly.img.separator' | 'ly.img.inspectorToggle.inspectorBar' | 'ly.img.trimControls.inspectorBar' | 'ly.img.cropControls.inspectorBar' | 'ly.img.vectorEdit.moveMode.inspectorBar' | 'ly.img.vectorEdit.addMode.inspectorBar' | 'ly.img.vectorEdit.deleteMode.inspectorBar' | 'ly.img.vectorEdit.bendMode.inspectorBar' | 'ly.img.vectorEdit.mirrorMode.inspectorBar' | 'ly.img.vectorEdit.done.inspectorBar' | (string & {}); /** * Manages localization and internationalization settings for the Creative Editor SDK. * * The InternationalisationAPI provides methods to get and set the current locale, * as well as add custom translations for the editor interface. * * @categoryDescription Localization * Methods for managing locale settings and custom translations within the editor. * * @public */ export declare class InternationalizationAPI { #private; /** * Gets the currently active locale. * * @category Localization * @returns The currently set locale as a string, or the fallback locale if none is set. */ getLocale(): LocaleKey; /** * Returns all available locales that have been loaded. * * @param options - Optional configuration object with the following properties: * - `matcher`: Optional pattern to match against. Use `*` for wildcard matching. * @category Localization * @returns An array of locale strings that have translations available. * * @example * ```typescript * const allLocales = cesdk.i18n.listLocales(); * console.log('Available locales:', allLocales); * // Output: ['en', 'de', 'fr', ...] * * // Find all English variants using wildcard * const englishLocales = cesdk.i18n.listLocales({ matcher: 'en*' }); * console.log('English locales:', englishLocales); * // Output: ['en', 'en-US', 'en-GB', ...] * ``` */ listLocales(options?: { matcher?: string; }): LocaleKey[]; /** * Sets the active locale for the editor interface. * * This will **not check** whether translations for the given locale are available. * * @category Localization * @param locale - The locale string to set as active (e.g., 'en', 'de', 'fr'). */ setLocale: (locale: LocaleKey) => void; /** * Adds custom translations for the editor interface. * * This method allows you to provide custom translations that will be used * by the editor interface. Translations are organized by locale and can * override or extend the default editor translations. * * @category Localization * @param definition - An object mapping locale strings to translation objects. * * @example * ``` * setTranslations({ * en: { * presets: { * scene: ... * } * } * }) * ``` */ setTranslations(definition: Partial>>): void; /** * Retrieves the translations for the specified locales. * * This method returns the translations for the given locales, or all available * translations if no specific locales are provided. * * @category Localization * @param locales - An optional array of locale strings to retrieve translations for. * @returns An object mapping locale strings to their respective translations. */ getTranslations(locales?: LocaleKey[]): Partial>>; /** * Translates a key or array of keys to the current locale. * * This method retrieves the translation for the given key(s) in the currently * active locale. When an array of keys is provided, the first key that has a * translation will be used. If no translation is found for any of the provided * keys, the last key in the array (or the single key if a string is provided) * will be returned as the fallback value. * * @category Localization * @param key - A translation key string or an array of translation keys to try in order. * @returns The translated string for the key in the current locale, or the key itself if no translation is found. * * @example * ``` * // Single key * const translation = cesdk.i18n.translate('common.save'); * // Returns: "Save" (if translation exists) or "common.save" (if not found) * * // Array of keys (fallback) * const translation = cesdk.i18n.translate(['specific.save', 'common.save']); * // Tries 'specific.save' first, then 'common.save' * // Returns the first found translation or "common.save" if neither exists * ``` */ translate(key: string | string[]): string; } /** * Represents the context for determining if a feature is enabled. * This type includes the `CreativeEngine` instance. * * @public */ export declare type IsEnabledFeatureContext = { engine: CreativeEngine_2; }; /** * Checks if a string is a glob pattern (contains `*`). * * @param str - The string to check * @returns True if the string contains a wildcard * * @public */ export declare function isGlobPattern(str: string): str is GlobPattern; /** * Represents options for a library. * * The `LibraryOptions` interface provides a set of properties that control the * behavior and appearance of a library. These options include settings for the * entries, select handler, and searchable state. * * @public */ export declare interface LibraryOptions { /** * `AssetLibraryEntry[]` is deprecated and will be removed in the future; * use `string[]` instead to pass a list of the asset library entries. * Read more about adding asset library entries in the (documentation)[https://img.ly/docs/cesdk/ui/customization/api/assetLibraryEntry/]. */ entries: /** * @deprecated Use `string[]` instead. */ AssetLibraryEntry[] | string[]; onSelect?: (asset: CompleteAssetResult) => Promise; searchable?: boolean; } /** * Represents a loading indicator component. * * @public */ export declare type LoadingComponent = { id: 'ly.img.loading.spinner'; key?: string; } | { id: 'ly.img.loading.heading'; key?: string; content: string; } | { id: 'ly.img.loading.text'; key?: string; content: string; }; /** * Order type for loading indicator components. * @public */ export declare type LoadingOrder = (LoadingComponent['id'] | LoadingComponent)[]; /** * Represents the supported locale keys for the Creative Editor SDK. * * @public */ export declare type LocaleKey = 'en' | 'de' | string; export { Logger } declare type Logger_2 = (message: string, level: 'Warning' | 'Error') => void; export { LogLevel } /** * Matches a value against a glob pattern. * * @param pattern - The glob pattern (e.g., 'ly.img.*', '*.separator') * @param value - The value to match against * @returns True if the value matches the pattern * * @public */ export declare function matchGlob(pattern: string, value: string): boolean; /** * Represents options for a media preview. * * The `MediaPreviewOptions` interface provides a set of properties that control the * behavior and appearance of a media preview. These options include settings for the * size, preview, and action. * * @public */ export declare interface MediaPreviewOptions { size?: 'small' | 'medium'; preview?: PreviewType; action?: ButtonOptions; } export { MimeType_2 as MimeType } /** * Result of a multi-area remove operation. * * @public */ export declare type MultiAreaRemoveResult = { [K in UIArea]?: RemoveResult; }; /** * Result of a multi-area update operation. * * @public */ export declare type MultiAreaUpdateResult = { [K in UIArea]?: UpdateResult; }; /** * @public * Base interface for action buttons in the navigation bar. * Contains common properties shared across all action button types. * * - `onClick`: Handler invoked when the button is clicked. * - `label`: Optional label for the button. * - `icon`: Optional icon name to display on the button. * - `variant`: Optional style variant of the button, either 'regular' or 'plain'. * - `color`: Optional color which can be either 'accent' or 'danger'. * - `isDisabled`: Optional disabled property. * - `isLoading`: Optional loading property. */ export declare interface NavigationBarActionButton extends OrderComponent { id: 'ly.img.saveScene.navigationBar' | 'ly.img.exportArchive.navigationBar' | 'ly.img.exportScene.navigationBar' | 'ly.img.exportImage.navigationBar' | 'ly.img.exportPDF.navigationBar' | 'ly.img.exportVideo.navigationBar' | 'ly.img.importScene.navigationBar' | 'ly.img.importArchive.navigationBar' | 'ly.img.shareScene.navigationBar' | 'ly.img.back.navigationBar' | 'ly.img.close.navigationBar'; onClick: () => void | Promise; label?: string; icon?: string; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; isDisabled?: boolean; isLoading?: boolean; } /** * A list of the component IDs that can be used in the navigation bar. * @public */ export declare type NavigationBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.back.navigationBar' | 'ly.img.undoRedo.navigationBar' | 'ly.img.documentSettings.navigationBar' | 'ly.img.pageResize.navigationBar' | 'ly.img.title.navigationBar' | 'ly.img.zoom.navigationBar' | 'ly.img.preview.navigationBar' | 'ly.img.actions.navigationBar' | 'ly.img.close.navigationBar' | 'ly.img.saveScene.navigationBar' | 'ly.img.exportImage.navigationBar' | 'ly.img.exportPDF.navigationBar' | 'ly.img.exportVideo.navigationBar' | 'ly.img.shareScene.navigationBar' | 'ly.img.exportScene.navigationBar' | 'ly.img.exportArchive.navigationBar' | 'ly.img.importScene.navigationBar' | 'ly.img.importArchive.navigationBar' | 'ly.img.action.navigationBar' | (string & {}); /** * @public */ export declare type NavigationBarComponents = NavigationBarActionButton | NavigationBarCustomActionButton; /** * @public * Interface representing a generic Action Button in the navigation bar component. * Note: This component requires a key and has a required label, unlike other action buttons. */ export declare interface NavigationBarCustomActionButton extends OrderComponent { id: 'ly.img.action.navigationBar'; key: string; onClick: () => void | Promise; label: string; icon?: string; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; isDisabled?: boolean; isLoading?: boolean; } /** * @public */ export declare type NavigationBarOrderComponent = NavigationBarComponents | OrderComponentWithChildren; /** * This enum is used to specify the position of the navigation bar within the user interface. * * By setting the position to `Top` or `Bottom`, you can control the layout and placement of the * navigation bar to better suit the user's workflow and preferences. * * @public */ declare enum NavigationPosition { Top = "top", Bottom = "bottom" } /** * Represents a notification configuration. * * The Notification interface defines the structure of a notification configuration within the Creative Editor SDK. * It includes properties for the type, message, duration, onDismiss callback, and action. This interface provides a * comprehensive way to define and manage notifications, allowing for flexibility in how they are presented and * interacted with by users. * * @public */ declare interface Notification_2 { type?: NotificationType; message: string; duration?: NotificationDuration; onDismiss?: () => void; action?: { label: string; onClick: (context: { id: string; }) => void; }; } export { Notification_2 as Notification } /** * Represents the duration of the notification. * * The NotificationDuration type defines the possible durations for notifications within the Creative Editor SDK. * Each duration corresponds to a different time span, allowing for flexibility in how long notifications are * displayed to users. * * @public */ export declare type NotificationDuration = number | 'infinite' | 'short' | 'medium' | 'long'; declare interface NotificationEvent { type: 'Information' | 'Warning' | 'Error'; i18n: string; } /** * Represents the type of notification. * * The NotificationType enum defines the various types of notifications that can be displayed * within the Creative Editor SDK. Each type corresponds to a different visual style and behavior, * allowing for flexibility in how notifications are presented to users. * * @public */ export declare type NotificationType = 'success' | 'error' | 'info' | 'warning' | 'loading'; declare type NotificationWithId = Notification_2 & { id: string; }; /** * Represents options for a number input. * * The `NumberInputOptions` interface provides a set of properties that control the * behavior and appearance of a number input. These options include settings for the * input label, input label position, value, value setter, disabled state, minimum value, * maximum value, step value, suffix, and requireConfirm. * * @public */ export declare interface NumberInputOptions extends InputOptions { min?: number; max?: number; step?: number; /** * Whether to require explicit confirmation (Enter/Escape/blur) before applying changes. * When true, changes are only applied when user presses Enter/ESC or blurs the input. * When false, changes are applied immediately on every keystroke. * * @defaultValue true */ requireConfirm?: boolean; } export { ObjectType } export { ObjectTypeLonghand } export { ObjectTypeShorthand } export { OffscreenCanvas_2 as OffscreenCanvas } /** * This interface extends the base ExportOptions with additional information about the export, * including which design blocks were exported and the mimeType. * * @see ExportOptions For base export configuration options * @see DesignBlockId For design block identifier type * * @public */ export declare type OnExportOptions = EngineExportOptions & { mimeType: Required['mimeType']; exportedBlocks?: DesignBlockId[]; }; /** * This interface extends the base VideoExportOptions with additional information about the export, * including which design blocks were exported and the mimeType. * * @see VideoExportOptions For base export configuration options * @see DesignBlockId For design block identifier type * @public */ export declare type OnExportVideoOptions = VideoExportOptions & { mimeType: VideoMimeType; exportedBlocks?: DesignBlockId[]; }; /** * Action function that is invoked when an unsupported browser is detected. * This allows custom handling of unsupported browser scenarios. * * @public */ export declare type OnUnsupportedBrowserAction = () => void; /** * Represents the upload callback function for the Creative Editor SDK. * This type defines a function that handles file uploads, including progress updates and context. * * @public */ declare type OnUploadCallback = (file: File, onProgress: (progress: number) => void, context?: UploadCallbackContext) => Promise; /** * Represents the options for the upload callback in the Creative Editor SDK. * This type defines the supported MIME types for uploads. * * @public */ declare type OnUploadOptions = { supportedMimeTypes?: string[]; }; /** * Turn value at K of T into a Partial * @public */ export declare type Optional = Omit & Partial; /** * Represents an order component. * * The OrderComponent interface defines the structure of an order component. * It includes properties for the ID, key, and payload. * * @public */ export declare interface OrderComponent extends ComponentPayload { id: I; key?: string; } /** * Maps UI areas to their order component types. * * @public */ export declare type OrderComponentFor = { 'ly.img.dock': DockOrderComponent; 'ly.img.inspector.bar': OrderComponent; 'ly.img.canvas.menu': CanvasMenuOrderComponent; 'ly.img.navigation.bar': NavigationBarOrderComponent; 'ly.img.canvas.bar': OrderComponent; 'ly.img.caption.panel': OrderComponent; 'ly.img.video.clip.menu': OrderComponent; }[A]; /** * Represents a matcher for order components. * * The OrderComponentMatcher type defines the possible matchers for order components. * It includes predefined matchers for component IDs, partial components, and custom matchers. * * @public */ export declare type OrderComponentMatcher = 'first' | 'last' | number | C['id'] | Partial | ((component: C, index: number) => boolean); /** * Represents a custom dock component. * * The CustomDockComponent interface defines the structure of a custom dock component. * It includes properties for the ID and payload. * * @public */ export declare interface OrderComponentWithChildren> extends OrderComponent { /** A list of children as order components */ children?: (OrderComponentWithChildren | I | C)[]; } /** * Context for ordering components. * Contains editMode which is used by most UI areas. * * @public */ export declare interface OrderContext { editMode?: EditMode; } /** * Maps a UI area to its appropriate order context type for public API usage. * - Caption panel uses CaptionPanelOrderContext (adds view property) * - Video clip menu uses VideoClipMenuOrderContext (adds clipType) * - All other areas use OrderContext (editMode only) * * @public */ export declare type OrderContextFor = A extends 'ly.img.caption.panel' ? CaptionPanelOrderContext : A extends 'ly.img.video.clip.menu' ? VideoClipMenuOrderContext : OrderContext; /** * Reference to a page preset from an asset source. * @public */ export declare type PageAssetReference = { sourceId: string; assetId: string; }; /** * Direct page dimensions specification. * @public */ export declare type PageDimensions = { width: number; height: number; unit: DesignUnit; fixedOrientation?: boolean; }; /** * Represents the definition of a page format in the Creative Editor SDK. * This interface defines the width, height, unit, and optional fixed orientation for a page format. * * @public */ export declare type PageFormatDefinition = { default?: boolean; width: number; height: number; unit: DesignUnit; fixedOrientation?: boolean; }; export { PageGuidesSource } /** * Represents the payload for the page resize panel in the Creative Editor SDK. * * @public */ export declare type PageResizePanelPayload = { intent?: 'allPages' | 'selectedPages'; }; /** * A page can be specified as direct dimensions, an asset source reference, * or an asset object (e.g., from engine.asset.fetchAsset()). * All variants optionally accept a `color` to set the page fill color. * @public */ export declare type PageSpec = (PageDimensions | PageAssetReference | Asset) & { /** Fill color for the page. */ color?: Color; }; export { PaletteColor } /** * Represents a function that disposes of a panel. * * The `PanelDisposer` type provides a function that, when called, disposes of the panel. * * @categoryDescription PanelDisposer * Methods for disposing of a panel. * * @public */ export declare type PanelDisposer = () => void; declare type PanelFloatingFunctions = Record boolean>; declare type PanelFloatings = Record; /** * Represents a unique identifier for a panel in the Creative Editor SDK. * This type defines specific panel IDs and allows for custom panel IDs. * * @public */ export declare type PanelId = '//ly.img.panel/assetLibrary' | '//ly.img.panel/assetLibrary.replace' | '//ly.img.panel/settings' | '//ly.img.panel/inspector' | (string & {}); /** * Represents the options for a panel in the Creative Editor SDK. * This interface defines the options for a panel, including whether it is closable by the user, * its position, whether it is floating, and its payload. * * @public */ export declare type PanelOptions = { closableByUser?: boolean; position?: PanelPosition; floating?: boolean; payload?: PanelPayload; }; /** * Represents the payload for a panel in the Creative Editor SDK. * This type defines the payload based on the panel ID. * * @public */ export declare type PanelPayload = T extends '//ly.img.panel/assetLibrary' ? AssetLibraryPanelPayload : T extends '//ly.img.panel/inspector/pageResize' ? PageResizePanelPayload : UnknownPanelPayload; /** * This type is used to specify the position of various panels within the user interface, * such as the inspector, settings, and asset library panels. * * By setting the position to * `'left'` or `'right'`, you can control the layout and placement of these panels to better * suit the user's workflow and preferences. * * @public */ export declare type PanelPosition = 'left' | 'right' | 'bottom'; /** * @public * @deprecated Use the string literal type `PanelPosition` ('left' | 'right' | 'bottom') instead. */ export declare const PanelPosition: { Left: "left"; Right: "right"; Bottom: "bottom"; }; declare type PanelPositionFunctions = Record PanelPosition>; declare type PanelPositions = Record; declare interface PanelState { group?: string; open?: boolean; payload?: PanelPayload; sessionOptions?: { closableByUser?: boolean; position?: PanelPosition; floating?: boolean; }; } declare type PanelStates = { [key in T]?: PanelState; }; /** * Action function for pasting blocks from the clipboard * @public */ export declare type PasteAction = () => void | Promise; /** * Insert after a matched component (positional areas). * @public */ export declare interface PositionalInsertAfterOptions extends BasePositionalInsertOptions { /** Insert after this component. */ after: ComponentMatcher; before?: never; position?: never; } /** * Append to end (positional areas). * @public */ export declare interface PositionalInsertAppendOptions extends BasePositionalInsertOptions { before?: never; after?: never; position?: never; } /** * Insert at a specific position (positional areas). * @public */ export declare interface PositionalInsertAtPositionOptions extends BasePositionalInsertOptions { /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */ position: 'start' | 'end' | number; before?: never; after?: never; } /** * Insert before a matched component (positional areas). * @public */ export declare interface PositionalInsertBeforeOptions extends BasePositionalInsertOptions { /** Insert before this component. */ before: ComponentMatcher; after?: never; position?: never; } /** * UI areas where `at` is required to specify a slot. * @public */ export declare type PositionalUIArea = 'ly.img.canvas.bar'; /** * Maps positional UI areas to their valid `at` values. * @public */ export declare type PositionFor = A extends 'ly.img.canvas.bar' ? CanvasBarPosition : never; export { PositionMode } /** * Represents a preview, which can be either an image or a color. * * The `PreviewType` type provides a set of values that describe a preview. These * options include settings for the image or color preview. * * @categoryDescription PreviewType * Methods for configuring a preview. * * @public */ export declare type PreviewType = PreviewTypeImage | PreviewTypeColor; /** * Represents a color preview. * * The `PreviewTypeColor` type provides a set of properties that describe a color * preview. These options include settings for the type and color. * * @public */ export declare type PreviewTypeColor = { type: 'color'; color: string; }; /** * Represents an image preview. * * The `PreviewTypeImage` type provides a set of properties that describe an image * preview. These options include settings for the type and URI. * * @public */ export declare type PreviewTypeImage = { type: 'image'; uri: string; }; export { PropertyType } export { Range_2 as Range } /** * Represents a collection of action functions used throughout the application. * Each property corresponds to a specific UI action or event that can be customized. * * @public */ export declare interface RegisteredActions { /** Action invoked to handle scene saving. */ saveScene: SaveSceneAction; /** Action invoked to handle scene sharing. */ shareScene: ShareSceneAction; /** Action invoked to handle export actions. */ exportDesign: ExportAction; /** Action invoked to handle import actions. */ importScene: ImportSceneAction; /** Action invoked to handle scene export actions. */ exportScene: ExportSceneAction; /** Action invoked to handle file uploads. */ uploadFile: UploadAction; /** Action invoked when an unsupported browser is detected. */ onUnsupportedBrowser: OnUnsupportedBrowserAction; /** * Action invoked when the add clip button is pressed in the video timeline */ addClip: VoidFunction; /** * Zoom actions for explicit zoom control */ /** Action for zooming to a specific block */ 'zoom.toBlock': ZoomToBlockAction; /** Action for zooming to a page (current, first, last, or by index) with optional padding */ 'zoom.toPage': ZoomToPageAction; /** Action for zooming to the current selection */ 'zoom.toSelection': ZoomToSelectionAction; /** Action for zooming in by one step */ 'zoom.in': ZoomInAction; /** Action for zooming out by one step */ 'zoom.out': ZoomOutAction; /** Action for setting zoom to a specific level */ 'zoom.toLevel': ZoomToLevelAction; /** * Scroll actions */ /** Action for scrolling to a specific page */ 'scroll.toPage': ScrollToPageAction; /** Action for scrolling to a specific block */ 'scroll.toBlock': ScrollToBlockAction; /** * Video timeline zoom actions */ /** Action for zooming in the video timeline */ 'timeline.zoom.in': TimelineZoomInAction; /** Action for zooming out the video timeline */ 'timeline.zoom.out': TimelineZoomOutAction; /** Action for fitting the video timeline to show all content */ 'timeline.zoom.fit': TimelineZoomToFitAction; /** Action for setting the video timeline zoom to a specific level */ 'timeline.zoom.toLevel': TimelineZoomToLevelAction; /** Action for resetting the video timeline zoom to default */ 'timeline.zoom.reset': TimelineZoomResetAction; /** * Video timeline expand/collapse actions */ /** Action for expanding the video timeline */ 'timeline.expand': TimelineExpandAction; /** Action for collapsing the video timeline */ 'timeline.collapse': TimelineCollapseAction; /** * Clipboard actions */ /** Action for copying selected blocks to the clipboard */ copy: CopyAction; /** Action for pasting blocks from the clipboard */ paste: PasteAction; /** * Video support check actions */ /** Action for checking video decoding/playback support */ 'video.decode.checkSupport': VideoDecodeCheckSupportAction; /** Action for checking video encoding/export support */ 'video.encode.checkSupport': VideoEncodeCheckSupportAction; /** * Browser support check action */ /** Action for checking browser capabilities at editor startup */ 'editor.checkBrowserSupport': EditorCheckBrowserSupportAction; /** * Scene creation action */ /** Action for creating a new scene with configurable mode and page sizes */ 'scene.create': SceneCreateAction; /** * Asset library actions */ /** Action invoked when the user deletes an asset from an asset source via the asset library card. */ 'asset.delete': DeleteAssetAction; } /** * Result of a remove operation on a single area. * * @public */ export declare interface RemoveResult { /** Number of components that were removed. */ removed: number; /** The new order after the removal. */ order: OrderComponentFor[]; } /** * @public * Provides context for replacing asset library entries, including selected blocks and default entry IDs. */ export declare interface ReplaceAssetLibraryEntriesContext { selectedBlocks: { id: DesignBlockId; blockType: DesignBlockTypeLonghand; fillType?: FillTypeLonghand; supportsShape?: boolean; }[]; defaultEntryIds: string[]; /** * The intent of the replacement operation. * - `'shape'`: User explicitly wants to replace the shape (e.g., from shape options panel) * - `'fill'`: User wants to replace the fill content * - `undefined`: No explicit intent, system determines based on block properties */ replaceIntent?: 'shape' | 'fill'; } export { RGBA } export { RGBAColor } export { RGBColor } export { RoleString } /** * Action function for handling scene saving operations. * * @returns A promise that resolves when the save operation is complete, or void for synchronous operations * @public */ export declare type SaveSceneAction = () => void | Promise; /** * Represents the base scale values for the Creative Editor SDK. * This type defines the concrete scales that can be rendered. * * - `'normal'`: Standard UI scaling for desktop and larger screens * - `'large'`: Increased UI scaling for touch devices and accessibility * - `'modern'`: Modern theme with refined color palette and improved visual hierarchy * * @public */ declare type Scale = 'normal' | 'large' | 'modern'; /** * Represents the scale configuration for the Creative Editor SDK. * This can be a concrete scale or a function that returns a scale based on viewport properties. * * @public */ declare type ScaleConfig = Scale | ScaleFn; /** * A function that returns a scale value based on viewport properties. * This allows for dynamic scale selection based on runtime conditions. * * @public */ declare type ScaleFn = ({ containerWidth, isTouch }: { containerWidth?: number; isTouch?: boolean; }) => Scale; export { SceneAPI } /** * Action for creating a new scene with configurable mode and page sizes. * Returns the scene block ID. * @public */ export declare type SceneCreateAction = (options?: SceneCreateOptions) => Promise; /** * Options for creating a new scene. * @public */ export declare type SceneCreateOptions = { /** * Scene mode. Defaults to null (unified mode with all features enabled). * @deprecated Scene mode is deprecated. New scenes should use the default null mode. */ mode?: SceneMode; /** Scene layout. Defaults to 'VerticalStack' for Design, ignored for Video. */ layout?: SceneLayout; } & ({ /** A single page spec repeated `pageCount` times. */ page?: PageSpec; /** Number of pages to create. Defaults to 1. */ pageCount?: number; pages?: never; } | { /** An array of page specs, one page per entry. */ pages: PageSpec[]; page?: never; pageCount?: never; }); export { SceneLayout } export { SceneMode } export { Scope } /** * Action function for scrolling to a specific block * @public */ export declare type ScrollToBlockAction = (blockId: number, options?: { /** Whether to animate the scroll (default: false) */ animate?: boolean; }) => Promise; /** * Action function for scrolling to a specific page * @public */ export declare type ScrollToPageAction = (options?: { /** The page ID to scroll to (defaults to current page) */ pageId?: number; /** Whether to animate the scroll (default: false) */ animate?: boolean; }) => Promise; /** * Represents options for a section. * * The `SectionOptions` interface provides a set of properties that control the * behavior and appearance of a section. These options include settings for the * title, children, and scrollable behavior. * * @public */ export declare interface SectionOptions { title?: string; children?: (() => void) | ChildrenOrder; scrollable?: boolean; } /** * Options for a select input. * * @public */ export declare interface SelectOptions extends InputOptions { icon?: CustomIcon; inputLabel?: string | string[]; tooltip?: string | string[]; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; suffix?: Suffix; values: SelectValue[]; /** * When true, adds a search input that filters the dropdown options by label. */ searchable?: boolean; /** * Placeholder text for the search input. Only used when `searchable` is true. */ searchPlaceholder?: string | string[]; } /** * Represents a value for a select input. * * The `SelectValue` interface provides a set of properties that describe a value * for a select input. These options include settings for the ID, label, and icon. * * @public */ export declare interface SelectValue { id: string; label: string | string[]; icon?: CustomIcon; } /** * Options for setting component order. * Single area only for type safety with area-specific component types. * * @public */ export declare type SetOrderOptions = AnyUILocationOptions; export { SettingsBool } export { SettingsColor } export { SettingsColorRGBA } export { SettingsEnum } export { SettingsFloat } export { SettingsString } export { SettingType } export { ShapeType } export { ShapeTypeLonghand } export { ShapeTypeShorthand } /** * Action function for handling scene sharing operations. * * @returns A promise that resolves when the share operation is complete, or void for synchronous operations * @public */ export declare type ShareSceneAction = () => void | Promise; export { SizeMode } /** * Represents options for a slider. * * The `SliderOptions` interface provides a set of properties that control the * behavior and appearance of a slider. These options include settings for the * input label, input label position, value, value setter, disabled state, minimum value, * maximum value, step value, centered state, and suffix. * * @public */ export declare interface SliderOptions extends InputOptions { min: number; max: number; step?: number; centered?: boolean; } export { SortingOrder } export { Source } /** * Represents options for a loading spinner. * * The `SpinnerOptions` interface controls the appearance of an indeterminate * loading spinner. The optional `label` is rendered beneath the spinner. * * @public */ export declare interface SpinnerOptions { /** * An optional caption rendered beneath the spinner (e.g. `'Loading...'`). * Strings are passed through i18n and resolve to themselves when no * translation is available. */ label?: string | string[]; } export { SplitOptions } export { SpotColor } export { StrokeCornerGeometry } export { StrokePosition } export { StrokeStyle } /** * Represents additional options for a button, which can be used as a suffix. * * The `Suffix` type provides a set of properties that control the appearance * and behavior of a button suffix. These options include settings for the label, * tooltip, click handler, variant, color, size, icon, trailing icon, active state, * selected state, disabled state, loading state, and loading progress. * * @categoryDescription Suffix * Methods for configuring the suffix options for a button. * * @public */ export declare type Suffix = Partial>; export { supportsBrowser } export { supportsVideo } export { supportsVideoExport } export { supportsWasm } /** * Represents options for a text area. * * The `TextAreaOptions` interface provides a set of properties that control the * behavior and appearance of a text area. These options include settings for the * input label, input label position, value, value setter, disabled state, placeholder, * and suffix. * * @public */ export declare interface TextAreaOptions extends InputOptions { placeholder?: string; } export { TextCase } export { TextDecorationConfig } export { TextDecorationLine } export { TextDecorationStyle } /** * Represents options for a text input. * * The `TextInputOptions` interface provides a set of properties that control the * behavior and appearance of a text input. These options include settings for the * input label, input label position, value, value setter, disabled state, placeholder, * suffix, and requireConfirm. * * @public */ export declare interface TextInputOptions extends InputOptions { /** * Whether to require explicit confirmation (Enter/Escape/blur) before applying changes. * When true, changes are only applied when user presses Enter/ESC or blurs the input. * When false, changes are applied immediately on every keystroke. * * @defaultValue true */ requireConfirm?: boolean; } /** * Represents options for text. * * The `TextOptions` interface provides a set of properties that control the * behavior and appearance of text. These options include settings for the * content and alignment. * * @public */ export declare interface TextOptions { content: string; align?: 'left' | 'center' | 'right'; } /** * Represents the base theme values for the Creative Editor SDK. * This type defines the concrete themes that can be rendered. * * @public */ declare type Theme = 'light' | 'dark'; /** * Represents the theme configuration for the Creative Editor SDK. * This can be a concrete theme, a function that returns a theme, or 'system' to use OS preference. * * @public */ declare type ThemeConfig = Theme | ThemeFn | 'system'; /** * A function that returns a theme value. * This allows for dynamic theme selection based on runtime conditions. * The function is evaluated lazily whenever the theme is accessed. * * @public */ declare type ThemeFn = () => Theme; /** * Action function for collapsing the video timeline. * @public */ export declare type TimelineCollapseAction = () => void | Promise; /** * Action function for expanding the video timeline. * @public */ export declare type TimelineExpandAction = () => void | Promise; /** * Video timeline zoom action types */ /** * Action function for zooming in the video timeline by one step. * @public */ export declare type TimelineZoomInAction = () => void | Promise; /** * Action function for zooming out the video timeline by one step. * @public */ export declare type TimelineZoomOutAction = () => void | Promise; /** * Action function for resetting the video timeline zoom to default level (1.0). * @public */ export declare type TimelineZoomResetAction = () => void | Promise; /** * Action function for fitting the video timeline to show all content. * @public */ export declare type TimelineZoomToFitAction = () => void | Promise; /** * Action function for setting the video timeline zoom to a specific level. * @public */ export declare type TimelineZoomToLevelAction = (level: number) => void | Promise; export { TransientResource } /** * Complete translation type that includes both built-in and custom translations. * @public */ export declare interface Translations extends BuiltinTranslations, UnknownTranslations { } export { Typeface } export { TypefaceDefinition } /** * Represents a UI area where components can be ordered. * * Uses the `ly.img.*` naming convention consistent with Feature IDs. * * @public */ export declare type UIArea = 'ly.img.dock' | 'ly.img.inspector.bar' | 'ly.img.canvas.menu' | 'ly.img.navigation.bar' | 'ly.img.canvas.bar' | 'ly.img.caption.panel' | 'ly.img.video.clip.menu'; /** * UI area-specific context - excludes base OrderContext properties (like editMode) * that are read-only and derived from the engine. * * For 'ly.img.caption.panel': `\{ view?: 'create' | 'edit' | 'style' \}` * For 'ly.img.video.clip.menu': `\{ clipType?: 'clip' | 'overlay' | 'caption' \}` * For other areas: `\{\}` (nothing area-specific) * * @public */ export declare type UIAreaContext = Omit, keyof OrderContext>; /** * Specifies which UI area(s) to target. * Can be a single area, an array of areas, or a glob pattern. * * @public */ export declare type UIAreaSpecifier = UIArea | UIArea[] | GlobPattern; /** * Location options for non-positional UI areas. * * @public */ export declare interface UILocationOptions { /** The UI area to target. Cannot be 'ly.img.canvas.bar' or 'ly.img.dock' - use their specific location options instead. */ in: A extends 'ly.img.canvas.bar' | 'ly.img.dock' ? never : A; /** Optional context for conditional ordering. */ when?: OrderContextFor; } /** * Represents the UI options for a single design unit type in the Creative Editor SDK. * This interface defines the bleed margin options for a single design unit. * * @public */ declare interface UIOptionsForSingleDesignUnit { bleedMargin: BleedMarginOptions; } /** * Represents the UI options for different design units in the Creative Editor SDK. * This interface defines the UI options for millimeters, pixels, and inches. * * @public */ declare interface UIOptionsPerDesignUnit { mm: UIOptionsForSingleDesignUnit; px: UIOptionsForSingleDesignUnit; in: UIOptionsForSingleDesignUnit; } /** * Represents an unknown payload for a panel in the Creative Editor SDK. * This type defines a generic payload with unknown keys and values. * * @public */ export declare type UnknownPanelPayload = { [key: string]: unknown; }; /** * Allows for custom translation keys beyond the built-in ones. * @public */ export declare type UnknownTranslations = { [key: string]: string | {}; }; /** * Behavior for a browser capability check at editor startup. * - `'block'`: Show a blocking error dialog (no dismiss) * - `'warn'`: Show a dismissible warning dialog * - `'ignore'`: Skip the check entirely * * @public */ export declare type UnsupportedCapabilityBehavior = 'block' | 'warn' | 'ignore'; /** * Result of an update operation on a single area. * * @public */ export declare interface UpdateResult { /** Number of components that were updated. */ updated: number; /** The new order after the update. */ order: OrderComponentFor[]; } /** * Specifies an update either as a new ID, partial update, or updater function. * * @public */ export declare type UpdateSpec = ComponentIdFor | Partial> | ((component: OrderComponentFor) => Partial>); /** * Action function for uploading files to asset sources. * * @param file - The file to upload * @param onProgress - Progress action that receives upload progress (0-100) * @param context - Optional context information for the upload operation * @returns A promise that resolves with the uploaded asset definition * @public */ export declare type UploadAction = (file: File, onProgress: (progress: number) => void, context?: UploadCallbackContext) => Promise; /** * Represents the context for the upload callback in the Creative Editor SDK. * This interface defines the source ID and an optional group for the upload context. * * @public */ declare interface UploadCallbackContext { sourceId: string; group?: string; } /** * Hook for reading and setting order context for a UI area. * * Components wrapped with `observer` will automatically re-render when the context changes. * * @param area - The UI area to get/set context for * @returns Object with `context` and `setContext` * * @example * ```tsx * function MyCaptionStyleButton() { * const { context, setContext } = useOrderContext('ly.img.caption.panel'); * return setContext({ view: 'style' })}>Styles; * } * ``` * * @public */ export declare function useOrderContext(area: A): { context: UIAreaContext | undefined; setContext: (ctx: Partial>) => void; }; /** * Specifies the configuration for the user interface of the Creative Editor SDK. * * The `UserInterface` interface provides a set of properties that control the appearance * and behavior of the user interface. These options include settings for the base URL, * scale, elements, stylesheets, visibility, small viewport optimization, color palette, * color libraries, typeface libraries, page presets libraries, crop presets libraries, * and page formats. * * @public */ export declare interface UserInterface { baseURL?: string; /** * @deprecated The `scale` property is deprecated. Please use `cesdk.ui.setScale()` and `cesdk.ui.getScale()` methods instead for runtime scale management. */ scale?: ScaleConfig; elements?: UserInterfaceElements_2; stylesheets?: { disableShadowDOM?: boolean; }; hide?: boolean; smallViewportOptimization?: boolean; /** * @deprecated Add a local asset source using `cesdk.engine.asset.addLocalSource()` and populate it with color assets, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * colorPalette: ['#FF0000', '#00FF00', '#0000FF'] * } * }; * * // After (recommended): * // Add a local source for custom colors * engine.asset.addLocalSource('my.custom.colors'); * engine.asset.addAssetToSource('my.custom.colors', { * id: 'red', * label: { en: 'Red' }, * payload: { * color: { * colorSpace: 'sRGB', * r: 1.0, * g: 0.0, * b: 0.0, * a: 1.0 * } * } * }); * // ... add more colors * * // Update the asset library entry to use your custom source * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['ly.img.scene.colors', 'my.custom.colors'] * }); * ``` */ colorPalette?: PaletteColor[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * colorLibraries: ['ly.img.color.palette', 'my.custom.colors'] * } * }; * * // After (recommended): * // Add a local source for custom colors * engine.asset.addLocalSource('my.custom.colors'); * // Add color assets to the source * engine.asset.addAssetToSource('my.custom.colors', { * id: 'custom-color-1', * payload: { color: { colorSpace: 'sRGB', r: 1.0, g: 0.0, b: 0.0 } } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['ly.img.color.palette', 'my.custom.colors'] * }); * ``` */ colorLibraries?: string[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * typefaceLibraries: ['ly.img.typeface', 'my.custom.fonts'] * } * }; * * // After (recommended): * // Add a local source for custom typefaces * engine.asset.addLocalSource('my.custom.fonts'); * // Add typeface assets to the source * engine.asset.addAssetToSource('my.custom.fonts', { * id: 'custom-font-1', * meta: { uri: 'https://example.com/font.ttf' } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { * sourceIds: ['ly.img.typeface', 'my.custom.fonts'] * }); * ``` */ typefaceLibraries?: string[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { sourceIds: ... })` to configure which sources to display. * * For dynamic source IDs, use a callback function with the new API: `{ sourceIds: ({ engine }) => [...] }` * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * pagePresetsLibraries: ['ly.img.page.presets'] * } * }; * * // After (recommended): * // Add a local source for custom page presets * engine.asset.addLocalSource('my.custom.pagePresets'); * // Add page preset assets to the source * engine.asset.addAssetToSource('my.custom.pagePresets', { * id: 'custom-preset-1', * payload: { transformPreset: { type: 'FixedSize', width: 800, height: 600 } } * }); * * // Update the library entry with dynamic sourceIds * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { * sourceIds: ({ engine }) => { * return ['ly.img.page.presets', 'my.custom.pagePresets']; * } * }); * ``` */ pagePresetsLibraries?: string[] | ((engine: CreativeEngine_2) => string[]); /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.cropPresets', { sourceIds: ... })` to configure which sources to display. * * For dynamic source IDs, use a callback function with the new API: `{ sourceIds: ({ engine }) => [...] }` * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * cropPresetsLibraries: ['ly.img.crop.presets'] * } * }; * * // After (recommended): * // Add a local source for custom crop presets * engine.asset.addLocalSource('my.custom.cropPresets'); * // Add crop preset assets to the source * engine.asset.addAssetToSource('my.custom.cropPresets', { * id: 'custom-crop-1', * payload: { transformPreset: { type: 'FixedAspectRatio', width: 16, height: 9 } } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.cropPresets', { * sourceIds: ['ly.img.crop.presets', 'my.custom.cropPresets'] * }); * ``` */ cropPresetsLibraries?: string[] | ((engine: CreativeEngine_2) => string[]); /** * @deprecated Add a local asset source using `cesdk.engine.asset.addLocalSource()` and populate it with page format assets, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * pageFormats: { * 'custom-format': { * width: 800, * height: 600, * unit: 'Pixel' * } * } * } * }; * * // After (recommended): * // Add a local source for custom page formats * engine.asset.addLocalSource('my.custom.pageFormats'); * engine.asset.addAssetToSource('my.custom.pageFormats', { * id: 'custom-format', * label: { en: 'Custom Format' }, * payload: { * transformPreset: { * type: 'FixedSize', * width: 800, * height: 600, * designUnit: 'Pixel' * } * } * }); * * // Update the asset library entry to use your custom source * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { * sourceIds: ['my.custom.pageFormats'] * }); * ``` */ pageFormats?: { [id: string]: PageFormatDefinition; }; } /** * Control the user interface and behavior of the Creative Editor SDK. * * The UserInterfaceAPI provides comprehensive methods for managing panels, * notifications, dialogs, component registration, UI ordering, asset libraries, * and custom interface elements within the editor. * * @public */ export declare class UserInterfaceAPI { #private; /** * PLEASE NOTE: This contains experimental APIs. * * Use them with caution since they might change without warning and might be replaced * with a completely different concept or maybe not at all. * * @public */ experimental: ExperimentalUserInterfaceAPI.UserInterfaceAPI; /** * Gets the resolved theme that is currently being used. * If the theme configuration is 'system', returns the OS preference. * If the theme configuration is a function, it is evaluated lazily and the result is returned. * * @category Theme Management * @returns The resolved theme ('light' or 'dark'). * * @example * ```javascript * // Get the actual theme being used * const theme = cesdk.ui.getTheme(); // 'light' or 'dark' * * // Use for conditional styling * const iconColor = cesdk.ui.getTheme() === 'dark' ? 'white' : 'black'; * * // Theme function is evaluated each time getTheme() is called * cesdk.ui.setTheme(() => new Date().getHours() >= 18 ? 'dark' : 'light'); * const currentTheme = cesdk.ui.getTheme(); // Function is evaluated here * ``` */ getTheme(): Theme; /** * Sets the theme configuration. * * This will immediately update the UI to reflect the new theme. * Can be set to: * - 'light' or 'dark' for a specific theme * - 'system' to use the OS preference * - A function that returns 'light' or 'dark' for dynamic theming * * @category Theme Management * @param theme - The theme configuration to set. * * @example * ```javascript * // Set a specific theme * cesdk.ui.setTheme('dark'); * * // Use system preference * cesdk.ui.setTheme('system'); * * // Set theme based on custom logic * cesdk.ui.setTheme(() => { * const hour = new Date().getHours(); * return hour >= 18 || hour < 6 ? 'dark' : 'light'; * }); * * // Toggle between themes * const currentTheme = cesdk.ui.getTheme(); * const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; * cesdk.ui.setTheme(newTheme); * ``` */ setTheme: (theme: ThemeConfig) => void; /** * Gets the resolved scale that is currently being used. * If the scale configuration is a function, it is evaluated lazily and the result is returned. * * @category UI Scale Management * @returns The resolved scale ('normal' or 'large'). * * @example * ```javascript * // Get the actual scale being used * const scale = cesdk.ui.getScale(); // 'normal' or 'large' * * // Use for conditional sizing * const fontSize = cesdk.ui.getScale() === 'large' ? '16px' : '14px'; * * // Scale function is evaluated each time getScale() is called * cesdk.ui.setScale(({ containerWidth }) => containerWidth < 768 ? 'large' : 'normal'); * const currentScale = cesdk.ui.getScale(); // Function is evaluated here * ``` */ getScale(): Scale; /** * Sets the scale configuration. * * This will immediately update the UI to reflect the new scale. * Can be set to: * - 'normal' or 'large' for a specific scale * - A function that returns 'normal' or 'large' based on viewport properties * * @category UI Scale Management * @param scale - The scale configuration to set. * * @example * ```javascript * // Set a specific scale * cesdk.ui.setScale('large'); * * // Set scale based on viewport * cesdk.ui.setScale(({ containerWidth, isTouch }) => { * if (isTouch || containerWidth < 768) { * return 'large'; * } * return 'normal'; * }); * * // Toggle between scales * const currentScale = cesdk.ui.getScale(); * const newScale = currentScale === 'normal' ? 'large' : 'normal'; * cesdk.ui.setScale(newScale); * ``` */ setScale: (scale: ScaleConfig) => void; /** * Gets the current view style of the editor interface. * * The view style controls the complexity and feature set shown in the UI. * 'default' provides a simplified interface, while 'advanced' shows more * comprehensive editing tools and options. * * @returns The current view style ('default' or 'advanced'). * * @example * ```javascript * // Get the current view style * const viewStyle = cesdk.ui.getView(); // 'default' or 'advanced' * * // Use for conditional UI logic * const showAdvancedOptions = cesdk.ui.getView() === 'advanced'; * * // Switch to advanced mode if currently in default * if (cesdk.ui.getView() === 'default') { * cesdk.ui.setView('advanced'); * } * ``` */ getView(): ViewStyle; /** * Sets the view style of the editor interface. * * This immediately updates the UI to reflect the new view style. * The view style controls which UI elements and features are available. * * @param view - The view style to set ('default' or 'advanced'). * * @example * ```javascript * // Set view to advanced mode * cesdk.ui.setView('advanced'); * * // Set view to simplified mode * cesdk.ui.setView('default'); * * // Toggle between view styles * const currentView = cesdk.ui.getView(); * const newView = currentView === 'advanced' ? 'default' : 'advanced'; * cesdk.ui.setView(newView); * ``` */ setView: (view: ViewStyle) => void; /** * Opens a panel if it exists, is not already open, and is currently registered. * * If requirements are not met, this is a no-op. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Opens the inspector panel for the selected block * - `//ly.img.panel/assetLibrary.replace` - Opens the asset library for replacing the selected block. Beware that the library might show nothing depending on how it was configured. * * @category Panel Management * @param panelId - The ID of the panel to open. * @param options - Optional configuration for panel position and floating state. */ openPanel(panelId: T, options?: PanelOptions): void; /** * Closes panels that match the given pattern. Supports wildcard matching. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Inspector panel * - `//ly.img.panel/assetLibrary` - Asset library * - `//ly.img.panel/assetLibrary.replace` - Replacement asset library * * @category Panel Management * @param panelId - The panel ID or pattern to match panels for closing. * * @example * ```javascript * // Close a specific panel by exact ID * cesdk.ui.closePanel('//ly.img.panel/inspector'); * * // Close all ly.img panels using wildcard * cesdk.ui.closePanel('//ly.img.*'); * * // Close all panels with specific prefix * cesdk.ui.closePanel('//ly.img.panel/*'); * * // Close panels matching complex pattern * cesdk.ui.closePanel('//ly.img.panel/' + '*' + '/stroke/' + '*'); * * // Close any inspector panels regardless of namespace * cesdk.ui.closePanel('*' + '/inspector'); * * // Close all asset library panels * cesdk.ui.closePanel('*assetLibrary*'); * ``` */ closePanel(panelId: string): void; /** * Checks if a panel is currently open. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Inspector panel for the selected block * - `//ly.img.panel/assetLibrary` - Asset library panel * - `//ly.img.panel/assetLibrary.replace` - Replacement asset library panel * * @category Panel Management * @param panelId - The ID of the panel to check. * @param options - Optional criteria to match against the panel's current state. * @returns True if the panel is open and matches the specified options, false otherwise. */ isPanelOpen(panelId: T, options?: PanelOptions): boolean; /** * Gets all panel IDs, optionally filtered by state or position. * * @category Panel Management * @param options - Optional filter criteria for panel state and position. * @returns Array of panel IDs matching the specified criteria. * * @example * ``` * cesdk.ui.findAllPanels(); * cesdk.ui.findAllPanels({ open: true, position: 'left' }); * ``` */ findAllPanels(options?: PanelOptions & { open?: boolean; }): string[]; /** * Sets the position of a panel within the editor interface. * * @category Panel Management * @param panelId - The ID of the panel to position. * @param panelPosition - The position ('left' or 'right') or a function returning the position. */ setPanelPosition(panelId: string, panelPosition: PanelPosition | (() => PanelPosition)): void; /** * Gets the current position of a panel. * * @category Panel Management * @param panelId - The ID of the panel. * @returns The panel's position ('left' or 'right'). */ getPanelPosition(panelId: string): PanelPosition; /** * Sets whether a panel floats over the canvas. * * @category Panel Management * @param panelId - The ID of the panel to configure. * @param floating - True to make the panel float over the canvas, false to dock it. */ setPanelFloating(panelId: string, floating: boolean | (() => boolean)): void; /** * Checks if a panel is currently floating over the canvas. * * @category Panel Management * @param panelId - The ID of the panel to check. * @returns True if the panel is floating, false if it's docked. */ getPanelFloating(panelId: string): boolean; /** * Displays a non-blocking notification message to the user. * * Notifications appear temporarily and can be dismissed by the user. * They support different types (info, success, warning, error) and durations. * * @category Notifications * @param notification - The notification content as a string or notification object. * @returns The notification ID for programmatic updates or dismissal. */ showNotification(notification: string | Notification_2): string; /** * Dismisses a notification programmatically. * * @category Notifications * @param id - The ID of the notification to dismiss. */ dismissNotification(id: string): void; /** * Updates an existing notification with new content or properties. * * The notification object will be merged with the existing notification. * If the duration is updated, the timeout will be reset. Updates to * dismissed notifications are ignored. * * @category Notifications * @param id - The ID of the notification to update. * @param notification - Partial notification properties to merge. */ updateNotification(id: string, notification: Partial): void; /** * Displays a modal dialog with custom content and actions. * * Dialogs can have different types (info, success, warning, error, loading) * and support custom actions like OK, Cancel, or custom buttons. * * @category Dialogs * @param dialog - The dialog content as a string or dialog object. * @returns The dialog ID for programmatic updates or closure. */ showDialog(dialog: string | Dialog): string; /** * Updates an existing dialog with new content or properties. * * The dialog properties will be merged with the existing dialog configuration. * * @category Dialogs * @param id - The ID of the dialog to update. * @param dialog - Partial dialog properties to merge, or a function that receives the current dialog and returns updates. */ updateDialog(id: string, dialog: Partial | ((dialog: Dialog) => Partial)): void; /** * Closes a dialog programmatically. * * If the dialog has an onClose callback, it will be executed before removal. * Closing an already closed dialog has no effect. * * @category Dialogs * @param id - The ID of the dialog to close. */ closeDialog(id: string): void; /** * Registers a custom panel that hooks into a DOM element for custom UI rendering. * * The onMount function is called when the panel opens, and its return value * (if a function) is called when the panel closes for cleanup. * * @category Experimental Features * @param panelId - The unique ID for the custom panel. * @param onMount - Function called when the panel is mounted, should return a cleanup function. * @experimental This API may change or be removed in future versions. */ unstable_registerCustomPanel(panelId: string, onMount: CustomPanelMountFunction): void; /** * Registers a panel with builder-based rendering system. * * The builder render function will be called with a builder and the engine * as arguments. The builder object is used to defined what base components * should be rendered (such as a button). The engine can be used to get any * state from the engine. The render function will be re-called if anything * in the engine changes regarding the made engine calls. * * @category Component Registration * @param panelId - The panel ID for use with panel management APIs. * @param renderPanel - Function that renders the panel content using the builder system. */ registerPanel(panelId: string, renderPanel: BuilderRenderFunction): void; /** * Registers a panel with builder-based rendering system. * * @category Component Registration * @param panelId - The panel ID for use with panel management APIs. * @param renderComponent - Function that renders the panel content using the builder system. * @deprecated Use `registerPanel` instead. */ unstable_registerPanel(panelId: string, renderComponent: BuilderRenderFunction): void; /** * Registers a component that can be rendered at different UI locations. * * The builder render function will be called with a builder and the engine * as arguments. The builder object is used to defined what base components * should be rendered (such as a button). The engine can be used to get any * state from the engine. The render function will be re-called if anything * in the engine changes regarding the made engine calls. * * @category Component Registration * @param ids - The component ID or array of IDs for use in ordering APIs. * @param renderComponent - Function that renders the component using the builder system. */ registerComponent(ids: string | string[], renderComponent: BuilderRenderFunction): void; /** * Sets the rendering order of components in the dock area. * * The ids in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.dock' }, order)` instead. * @category UI Layout * @param dockOrder - Array of component IDs defining the dock order. * @param orderContext - Optional context specifying when this order applies. */ setDockOrder(dockOrder: (DockOrderComponentId | DockOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of dock components. * * The id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders could have been set depending on different contexts. * The context consists of the edit mode (e.g. `Transform` or `Text`) right now. * If no context is given, the default order (with `Transform` edit mode) is * returned. * * @deprecated Use `getComponentOrder({ in: 'ly.img.dock' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the dock order. */ getDockOrder(orderContext?: OrderContext): DockOrderComponent[]; /** * Updates a component in the render order of the dock area. * * This method finds a dock order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.dock', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ updateDockOrderComponent(matcher: OrderComponentMatcher>, update: DockOrderComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the dock area. * * This method finds a dock order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.dock', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ removeDockOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: DockOrderComponent[]; }; /** * Inserts a component into the render order of the dock area. * * This method inserts a new dock order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.dock', before/after }, component)` instead. * @category UI Layout * @param matcher - Function or object to match the component to insert relative to. * @param component - The component ID or configuration to insert. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ insertDockOrderComponent(matcher: OrderComponentMatcher>, component: DockOrderComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the inspector bar. * * The * id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.inspector.bar' }, order)` instead. * @category UI Layout * @param inspectorBarOrder - Array of component IDs defining the inspector bar order. * @param orderContext - Optional context specifying when this order applies. */ setInspectorBarOrder(inspectorBarOrder: (InspectorBarComponentId | OrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of inspector bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.inspector.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the inspector bar order. */ getInspectorBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.inspector.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ updateInspectorBarOrderComponent(matcher: OrderComponentMatcher>, update: InspectorBarComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.inspector.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ removeInspectorBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the inspector bar. * * This method inserts a new inspector bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.inspector.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ insertInspectorBarOrderComponent(matcher: OrderComponentMatcher>, component: InspectorBarComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the canvas menu. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.menu' }, order)` instead. * @category UI Layout * @param canvasMenuOrder - Array of component IDs defining the canvas menu order. * @param orderContext - Optional context specifying when this order applies. */ setCanvasMenuOrder(canvasMenuOrder: (CanvasMenuComponentId | CanvasMenuOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas menu components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.menu' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas menu order. */ getCanvasMenuOrder(orderContext?: OrderContext): CanvasMenuOrderComponent[]; /** * Updates a component in the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.menu', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated canvas menu order array. */ updateCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, update: CanvasMenuComponentId | Partial | ((component: CanvasMenuOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: CanvasMenuOrderComponent[]; }; /** * Removes a component from the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.menu', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated canvas menu order array. */ removeCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: CanvasMenuOrderComponent[]; }; /** * Inserts a component into the render order of the canvas menu. * * This method inserts a new canvas menu order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.menu', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas menu order array. */ insertCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, component: CanvasMenuComponentId | CanvasMenuOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the navigation bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.navigation.bar' }, order)` instead. * @category UI Layout * @param navigationBarOrder - Array of component IDs defining the navigation bar order. * @param orderContext - Optional context specifying when this order applies. */ setNavigationBarOrder(navigationBarOrder: (NavigationBarComponentId | NavigationBarOrderComponent)[], orderContext?: OrderContext): void; /** * Updates a component in the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.navigation.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated navigation bar order array. */ updateNavigationBarOrderComponent(matcher: OrderComponentMatcher>, update: NavigationBarComponentId | Partial | ((component: NavigationBarOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: NavigationBarOrderComponent[]; }; /** * Removes a component from the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.navigation.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated navigation bar order array. */ removeNavigationBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: NavigationBarOrderComponent[]; }; /** * Inserts a component into the render order of the navigation bar. * * This method inserts a new navigation bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.navigation.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated navigation bar order array. */ insertNavigationBarOrderComponent(matcher: OrderComponentMatcher>, component: NavigationBarComponentId | NavigationBarOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Gets the current rendering order of navigation bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.navigation.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the navigation bar order. */ getNavigationBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Sets the rendering order of components in the canvas bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Canvas bars can be positioned at the top or bottom * of the canvas. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.bar', at: position }, order)` instead. * @category UI Layout * @param canvasBarOrder - Array of component IDs defining the canvas bar order. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying when this order applies. */ setCanvasBarOrder(canvasBarOrder: (CanvasBarComponentId | OrderComponent)[], position: 'top' | 'bottom', orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas bar components at the specified position. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.bar', at: position })` instead. * @category UI Layout * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas bar order. */ getCanvasBarOrder(position: 'top' | 'bottom', orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.bar', at: position, match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ updateCanvasBarOrderComponent(matcher: OrderComponentMatcher>, update: CanvasBarComponentId | Partial> | ((component: OrderComponent) => Partial>), position: 'top' | 'bottom', orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.bar', at: position, match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ removeCanvasBarOrderComponent(matcher: OrderComponentMatcher>, position: 'top' | 'bottom', orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the canvas bar. * * This method inserts a new canvas bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.bar', at: position, before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param position - The canvas bar position ('top' or 'bottom'). * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ insertCanvasBarOrderComponent(matcher: OrderComponentMatcher>, component: CanvasBarComponentId | OrderComponent, position: 'top' | 'bottom', location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in a UI area. * * This unified method replaces area-specific methods like `setDockOrder`, * `setInspectorBarOrder`, etc. It provides a consistent API for all UI areas. * * @category Unified Component Order API * @param options - Location options specifying which area to set. For canvas bar, requires `at` position. For dock, `at` specifies position (`'left'`, `'right'`, or `'bottom'`); defaults to `'left'`. * @param order - Array of component IDs or component objects defining the order. * * @example * ```typescript * // Set dock order * cesdk.ui.setComponentOrder({ in: 'ly.img.dock' }, ['ly.img.spacer', 'my.button']); * * // Set canvas bar order (requires position) * cesdk.ui.setComponentOrder( * { in: 'ly.img.canvas.bar', at: 'top' }, * ['ly.img.settings.canvasBar'] * ); * * // Set order with edit mode context * cesdk.ui.setComponentOrder( * { in: 'ly.img.inspector.bar', when: { editMode: 'Text' } }, * ['ly.img.text.typeFace.inspectorBar', 'ly.img.text.bold.inspectorBar'] * ); * ``` */ setComponentOrder(options: SetOrderOptions, order: ComponentSpec[]): void; /** * Gets the current rendering order of components in a UI area. * * This unified method replaces area-specific methods like `getDockOrder`, * `getInspectorBarOrder`, etc. * * @category Unified Component Order API * @param options - Location options specifying which area to get. For canvas bar, `at` is required. For dock, omitting `at` returns components from all positions. * @returns Array of components in the specified area. * * @example * ```typescript * // Get all dock components across all positions * const allDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock' }); * * // Get dock order at a specific position * const rightDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock', at: 'right' }); * * // Get canvas bar order (requires position) * const canvasBarTop = cesdk.ui.getComponentOrder({ in: 'ly.img.canvas.bar', at: 'top' }); * ``` */ getComponentOrder(options: GetOrderOptions): OrderComponentFor[]; /** * Updates components matching a criteria in one or more UI areas. * * This unified method replaces area-specific update methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the update applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the update * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to update. * @param update - New ID, partial properties, or updater function. * @returns For single area: UpdateResult. For multi-area: MultiAreaUpdateResult. * * @example * ```typescript * // Update by exact ID * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.separator' }, * { key: 'my-separator' } * ); * * // Update by glob pattern * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.*' }, * { disabled: true } * ); * * // Update using function * cesdk.ui.updateOrderComponent( * { in: 'ly.img.inspector.bar', match: 'first' }, * (component) => ({ key: `${component.id}-modified` }) * ); * * // Update across multiple areas * const results = cesdk.ui.updateOrderComponent( * { in: '*', match: 'ly.img.separator' }, * { key: 'global-sep' } * ); * ``` */ updateOrderComponent(options: ComponentMatchOptions, update: UpdateSpec): A extends UIArea ? UpdateResult : MultiAreaUpdateResult; /** * Removes components matching a criteria from one or more UI areas. * * This unified method replaces area-specific remove methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the removal applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the removal * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to remove. * @returns For single area: RemoveResult. For multi-area: MultiAreaRemoveResult. * * @example * ```typescript * // Remove by exact ID * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.separator' }); * * // Remove by position * cesdk.ui.removeOrderComponent({ in: 'ly.img.inspector.bar', match: 'last' }); * * // Remove by glob pattern * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.*' }); * * // Remove from all areas * const results = cesdk.ui.removeOrderComponent({ * in: '*', * match: 'ly.img.separator' * }); * ``` */ removeOrderComponent(options: ComponentMatchOptions): A extends UIArea ? RemoveResult : MultiAreaRemoveResult; /** * Inserts one or more components into a UI area at a specified position. * * This unified method replaces area-specific insert methods. Supports * inserting before, after, or at a specific index. When inserting multiple * components, they are inserted in order at the specified position. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, `options.at` is required * and must specify either 'top' or 'bottom'. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the anchor * component is searched across all positions. For positional inserts * (start/end/index), defaults to `'left'`. * * @category Unified Component Order API * @param options - Insert options specifying where to insert. * @param components - The component ID(s) or object(s) to insert. Can be a single component or an array. * @returns InsertResult with success status, count, and new order. * * @example * ```typescript * // Append single component to end (default) * cesdk.ui.insertOrderComponent({ in: 'ly.img.dock' }, 'my.button'); * * // Insert multiple components at once * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', after: 'ly.img.spacer' }, * ['my.button.1', 'my.button.2', 'my.button.3'] * ); * * // Insert before a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', before: 'ly.img.separator' }, * 'my.button' * ); * * // Insert after a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.inspector.bar', after: 'ly.img.fill.inspectorBar' }, * 'my.fill.tool' * ); * * // Insert at specific position * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 'start' }, * ['first.button', 'second.button'] * ); * * // Insert at index * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 2 }, * 'my.third.button' * ); * * // Insert at negative index (from end) * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: -1 }, * 'my.before.last.button' * ); * ``` */ insertOrderComponent(options: InsertComponentOptions, components: ComponentSpec | ComponentSpec[]): InsertResult; /** * Gets the active order context for a UI area. * * Returns the full context including both settable properties (like `view` for * the caption panel) and engine-derived properties (like `editMode`). * * @category Unified Component Order API * @param options - Location options specifying which area to get context for. * @returns The full order context for the area, or undefined if no context has been set. * * @example * ```typescript * // Get caption panel context * const context = cesdk.ui.getOrderContext({ in: 'ly.img.caption.panel' }); * // → { view: 'edit', editMode: 'Transform' } | undefined * * // Get inspector bar context (editMode only, derived from engine) * const inspectorContext = cesdk.ui.getOrderContext({ in: 'ly.img.inspector.bar' }); * // → { editMode: 'Crop' } | undefined * ``` */ getOrderContext(options: { in: A; }): OrderContextFor | undefined; /** * Sets the active order context for a UI area. * * Only accepts settable properties (excludes base OrderContext properties like * `editMode` which are derived from the engine). For the caption panel, this * means you can set the `view` property. * * @category Unified Component Order API * @param options - Location options specifying which area to set context for. * @param context - The context properties to set. Only settable properties are accepted. * * @example * ```typescript * // Set caption panel to style view * cesdk.ui.setOrderContext( * { in: 'ly.img.caption.panel' }, * { view: 'style' } * ); * * // Note: editMode cannot be set via this API - it's engine-derived * // Use cesdk.engine.editor.setEditMode('Crop') instead * ``` */ setOrderContext(options: { in: A; }, context: UIAreaContext): void; /** * Adds a new asset library entry for display in asset libraries. * * If an entry with the same ID already exists, it will be replaced. * The method validates sorting configurations and warns about duplicates. * * @category Asset Library * @param AssetLibraryEntry - The asset library entry configuration to add. */ addAssetLibraryEntry(AssetLibraryEntry: AssetLibraryEntry): void; /** * Updates an existing asset library entry with new properties. * * The provided properties will be merged with the existing entry. * * @category Asset Library * @param id - The ID of the asset library entry to update. * @param assetLibraryEntry - Partial entry properties to merge with the existing entry, or a function that receives the current entry and returns the updated properties. * * @example * ```typescript * // Simple static update * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['my-custom-colors'] * }); * * // Update other properties using callback with entry * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', (entry) => ({ * title: entry?.title ? `${entry.title} (Custom)` : 'Page Formats', * icon: { name: 'format-icon' } * })); * * // Extend sourceIds with lazy resolution (preserves dynamic behavior) * cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { * sourceIds: ({ currentIds }) => [...currentIds, 'my-custom-fonts'] * }); * ``` */ updateAssetLibraryEntry(id: AssetEntryId, assetLibraryEntry: Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }> | ((entry: AssetLibraryEntry | undefined) => Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }>)): void; /** * Removes an asset library entry from the available entries. * * @category Asset Library * @param id - The ID of the asset library entry to remove. */ removeAssetLibraryEntry(id: AssetEntryId): void; /** * Gets a specific asset library entry by its ID. * * @category Asset Library * @param id - The ID of the asset library entry to retrieve. * @returns The asset library entry configuration, or undefined if not found. */ getAssetLibraryEntry(id: AssetEntryId): AssetLibraryEntry | undefined; /** * Gets all currently registered asset library entry IDs. * * @category Asset Library * @returns Array of asset library entry IDs. */ findAllAssetLibraryEntries(): AssetEntryId[]; /** * Sets the asset library entries to use for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @param backgroundTrackAssetLibraryEntries - Array of asset library entry IDs for the background track. * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * // Before * cesdk.ui.setBackgroundTrackAssetLibraryEntries(['ly.img.video', 'ly.img.image']); * // After * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ setBackgroundTrackAssetLibraryEntries(backgroundTrackAssetLibraryEntries: AssetEntryId[]): void; /** * Gets the asset library entries configured for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @returns Array of asset library entry IDs configured for the background track. * @deprecated The background track entries are now defined via the cesdk.actions API. */ getBackgroundTrackAssetLibraryEntries(): AssetEntryId[]; /** * Sets a function that determines which asset library entries to use for replacement operations. * * The function receives context information (like selected blocks or default entry IDs) * and returns the appropriate asset library entry IDs for replacement. * * @category Asset Library * @param replaceAssetLibraryEntries - Function that receives context and returns an array of asset library entry IDs for replacement. */ setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => AssetEntryId[]): void; /** * Gets the current view style of the editor interface. * * @category Experimental Features * @returns The current view style ('default' or 'advanced'). * @deprecated Use `getView()` instead. This experimental API will be removed in a future version. * @experimental This API may change or be removed in future versions. * * @example * ```javascript * // Before (deprecated) * const view = cesdk.ui.unstable_getView(); * * // After (preferred) * const view = cesdk.ui.getView(); * ``` */ unstable_getView(): ViewStyle; /** * Adds a custom icon set to the editor interface. * * The icon set should be an SVG sprite containing symbol elements. * Symbol IDs must start with '\@' to be recognized by the editor. * * **Security Warning**: The SVG sprite is injected into the DOM without * sanitization. Only use trusted sources to prevent XSS attacks. * Consider using libraries like DOMPurify for untrusted content. * * @category UI Layout * @param id - The unique identifier for the icon set. * @param svgSprite - The SVG sprite string containing symbol definitions. */ addIconSet(id: string, svgSprite: string): void; /** * programmatically applies a crop preset to a design block. * * This is useful in scenarios where you want to enforce a particular * format (e.g., fixed aspect ratio) and define how the editor should * respond after the preset is applied. * * @param id - The ID of the design block to apply the crop preset to. * @param options - Options for applying the crop preset: * - `sourceId`: The ID of the asset source containing the crop preset. * - `presetId`: The ID of the crop preset to apply. * - `mode`: The mode for applying the crop preset: * - `'silent'`: Apply the crop preset silently. * - `'always'`: Apply the crop preset and enter crop mode. * - `'ifNeeded'`: Apply the crop preset only if needed (i.e., if the preset is different from the current crop). */ applyForceCrop(id: DesignBlockId, { sourceId, presetId, mode }: { sourceId: string; presetId: string; mode: 'silent' | 'always' | 'ifNeeded'; }): Promise; } /** * @public * Interface representing the asset library in the user interface. * - `position`: Optional position of the asset library. */ declare interface UserInterfaceAssetLibrary extends UserInterfaceElement { position?: PanelPosition; } /** * @public * Interface representing a custom action in the user interface. * - `callback`: Function to be called when the action is triggered. * - `label`: Label for the action. * - `iconName`: Name of the icon for the action. */ declare interface UserInterfaceCustomAction { callback: () => void | Promise; label: string; iconName: UserInterfaceCustomActionIconName; } /** * @public * Type representing the name of a custom action icon. * - `default`: Default icon. * - `download`: Download icon. * - `upload`: Upload icon. * - `save`: Save icon. * - Any other string: Custom icon name. */ declare type UserInterfaceCustomActionIconName = 'default' | 'download' | 'upload' | 'save' | (string & {}); /** * @public * Interface representing an element in the user interface. * - `show`: Optional boolean indicating whether the element should be shown. */ declare interface UserInterfaceElement { show?: boolean; } declare namespace UserInterfaceElements { export { PanelPosition, NavigationPosition, CustomIcon, UserInterfaceElement, UserInterfaceInspectorBlocks, UserInterfaceInspectorBlock, UserInterfaceInspectorBlockPage, UserInterfaceInspectorBlockText, UserInterfaceInspectorBlockImage, UserInterfaceInspectorBlockVideoFill, UserInterfaceInspectorBlockRectShape, UserInterfaceInspectorBlockGraphic, UserInterfaceInspectorBlockShape, UserInterfaceInspector, UserInterfaceSettings, UserInterfaceAssetLibrary, ExportFormat, UserInterfaceExportAction, UserInterfaceCustomActionIconName, UserInterfaceCustomAction, UserInterfaceNavigation, CardBackground, CustomCardImageBackground, CustomCardSvgVectorPathBackground, CustomCardBackground, AssetLibraryEntryView, AssetEntrySourceIdsContext, AssetEntryId, AssetLibraryEntryData, AssetLibraryEntry, AssetLibraryEntries, ReplaceAssetLibraryEntriesContext, UserInterfaceElements_2 as UserInterfaceElements } } export { UserInterfaceElements } /** * @public * Defines the configuration for user interface elements, including panels, dock, libraries, blocks, navigation, and inspector bar. */ declare interface UserInterfaceElements_2 { /** * @deprecated * Please use `cesdk.ui.setView` and `cesdk.ui.getView` instead. * * @example * ```ts * // Before (deprecated): * const config = { * ui: { * elements: { * view: 'default' // or 'advanced' * } * } * }; * * // After (recommended): * const view = 'default'; // or 'advanced' * cesdk.ui.setView(view); * ``` */ view?: 'default' | 'advanced'; panels?: { /** @deprecated Plese use `cesdk.feature.enable('ly.img.inspector')`, `cesdk.ui.setPanelPosition('//ly.img.panel/inspector')` and `cesdk.ui.setPanelFloating('//ly.img.panel/inspector')` instead. */ inspector?: UserInterfaceInspector | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.settings')`, `cesdk.ui.setPanelPosition('//ly.img.panel/settings')` and `cesdk.ui.setPanelFloating('//ly.img.panel/settings')` instead. */ settings?: UserInterfaceSettings | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.library.panel')`, `cesdk.ui.setPanelPosition('//ly.img.panel/assetLibrary')` and `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ assetLibrary?: UserInterfaceAssetLibrary | boolean; }; dock?: { /** @deprecated Please use `cesdk.feature.enable('ly.img.dock')` instead. */ show?: boolean; iconSize?: 'normal' | 'large'; hideLabels?: boolean; }; libraries?: { insert?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ floating?: boolean; /** * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ backgroundTrackLibraryEntries?: string[] | ((entries: AssetLibraryEntry[]) => string[]); }; replace?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/replaceAssetLibrary')` instead. */ floating?: boolean; }; }; /** @deprecated Use `cesdk.feature.enable()` instead. */ blocks?: UserInterfaceInspectorBlocks; navigation?: UserInterfaceNavigation; inspectorBar?: UserInterfaceElement | boolean; } /** * @public * Interface representing an export action in the user interface. * - `format`: Optional array of export formats. */ declare interface UserInterfaceExportAction extends UserInterfaceElement { format?: ExportFormat[]; } /** * @public * Interface representing the inspector in the user interface. * - `position`: Optional position of the inspector. * - `floating`: Optional boolean indicating whether the inspector should be floating. */ declare interface UserInterfaceInspector extends UserInterfaceElement { position?: PanelPosition; floating?: boolean; } /** * @public * Interface representing a block in the user interface inspector. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlock { } /** * @public * Interface representing a graphic block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ declare interface UserInterfaceInspectorBlockGraphic extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing an image block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for image-related features instead. */ declare interface UserInterfaceInspectorBlockImage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a page block in the user interface inspector. * - `format`: Optional element or boolean indicating whether the format section should be shown. * - `manage`: Optional element or boolean indicating whether the manage section should be shown. * - `maxDuration`: Optional number controlling the maximum allowed duration of a page, if in video mode. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ declare interface UserInterfaceInspectorBlockPage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.page.resize')` instead. */ format?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.page.add')`, `cesdk.feature.enable('ly.img.page.move')`, or `cesdk.feature.enable('ly.img.duplicate')` instead. */ manage?: UserInterfaceElement | boolean; /** * @deprecated Use feature API instead. * Controls the maximum allowed duration of a page, if in video mode. */ maxDuration?: number; /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a rectangular shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockRectShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the blocks in the user interface inspector. * - `opacity`: Optional element or boolean indicating whether the opacity block should be shown. * - `transform`: Optional element or boolean indicating whether the transform block should be shown. * - `trim`: Optional element or boolean indicating whether the trim block should be shown. * - `//ly.img.ubq/text`: Optional text block configuration. * - `//ly.img.ubq/page`: Optional page block configuration. * - `//ly.img.ubq/graphic`: Optional graphic block configuration. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlocks { /** @deprecated Use `cesdk.feature.enable('ly.img.opacity')` instead. */ opacity?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.transform.position')`, `cesdk.feature.enable('ly.img.transform.size')`, `cesdk.feature.enable('ly.img.transform.rotation')`, or `cesdk.feature.enable('ly.img.transform.flip')` instead. */ transform?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.trim')` instead. */ trim?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ '//ly.img.ubq/text'?: UserInterfaceInspectorBlockText; /** @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ '//ly.img.ubq/page'?: UserInterfaceInspectorBlockPage; /** @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ '//ly.img.ubq/graphic'?: UserInterfaceInspectorBlockGraphic; } /** * @public * Interface representing a shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; } /** * @public * Interface representing a text block in the user interface inspector. * - `advanced`: Optional element or boolean indicating whether the advanced section should be shown. * - `color`: Optional element or boolean indicating whether the color section should be shown. * @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ declare interface UserInterfaceInspectorBlockText extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.text.advanced')` instead. */ advanced?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.fill')` instead. */ color?: UserInterfaceElement | boolean; } /** * @public * Interface representing a video fill block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for video-related features instead. */ declare interface UserInterfaceInspectorBlockVideoFill extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the navigation in the user interface. * - `position`: Optional position of the navigation. * - `title`: Optional title for the navigation. * - `action`: Optional object containing actions for the navigation. */ declare interface UserInterfaceNavigation extends UserInterfaceElement { position?: NavigationPosition; title?: string | null; /** * @deprecated Use the Order API to configure the actions instead. */ action?: { /** * @deprecated Use the Order API to configure the actions instead. */ close?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ back?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ save?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ export?: UserInterfaceExportAction | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ share?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ load?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ download?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ custom?: UserInterfaceCustomAction[]; }; } /** * @public * Interface representing the settings in the user interface. */ declare interface UserInterfaceSettings extends UserInterfaceElement { } /** * UtilsAPI provides utility functions for common operations in the Creative Engine SDK. * * This API includes utilities for: * - Creating and managing loading dialogs * - Exporting content (images, PDFs, videos) * - Loading and downloading files * - Local file uploads * @public */ export declare class UtilsAPI { #private; /** * Generates the automatic, localized fallback name for a design block. When * the block does not have an explicit name set, this mirrors the naming shown * in the UI panels. * * @param blockId - The block ID to generate a fallback name for * @returns The localized fallback name for the block * @public */ generateBlockName(blockId: number): string; /** * Shows and manages a loading dialog with progress tracking * * @param options - Options for configuring the loading dialog * @returns A controller object for managing the dialog * * @example * ```typescript * const controller = cesdk.utils.showLoadingDialog({ * title: 'Exporting', * message: 'Please wait...', * onAbort: () => console.log('Aborted') * }); * * // Update progress * controller.updateProgress({ value: 50, max: 100 }); * * // Show success * controller.showSuccess({ * title: 'Success', * message: 'Export completed!' * }); * ``` * @public */ showLoadingDialog(options?: { title?: string; message?: string | string[]; cancelLabel?: string; abortLabel?: string; abortTitle?: string; abortMessage?: string | string[]; size?: 'regular' | 'large'; clickOutsideToClose?: boolean; progress?: DialogProgress; onDone?: () => void; onAbort?: () => void; }): { dialogId: string; updateProgress(progress: DialogProgress): void; showSuccess(options: { title?: string; message: string | string[]; }): void; showError(options: { title?: string; message: string | string[]; }): void; close(): void; }; /** * Exports content with a loading dialog and progress tracking. * Automatically handles both static exports (images, PDFs) and video exports based on MIME type. * * @param options - Export options. Type inference based on mimeType. * @returns Export result - either blobs array for static or single blob for video * * @example * ```typescript * // Image export * const imageResult = await cesdk.utils.export({ * mimeType: 'image/png', * pngCompressionLevel: 7 * }); * * // Video export * const videoResult = await cesdk.utils.export({ * mimeType: 'video/mp4', * onProgress: (rendered, encoded, total) => console.log(`${rendered}/${total}`) * }); * ``` * @public */ export(options?: T): Promise<{ blobs: Blob[]; options: T extends VideoExportOptions ? OnExportVideoOptions : OnExportOptions; }>; /** * Opens a file picker dialog for the user to select a file * * @param options - Options for the file load operation * @returns The loaded file content in the requested format. For dataURL return type, * if the file is eligible for OPFS storage and the feature is enabled, returns the * OPFS URL (opfs://...) instead of a data URL. * * @example * ```typescript * // Load a text file * const text = await cesdk.utils.loadFile({ * accept: '.txt', * returnType: 'text' * }); * * // Load an image as blob * const blob = await cesdk.utils.loadFile({ * accept: 'image/*', * returnType: 'blob' * }); * * // Load a file with OPFS support (returns opfs:// URL for eligible files) * const url = await cesdk.utils.loadFile({ * accept: 'video/*', * returnType: 'dataURL' * }); * // For eligible files: "opfs://cesdk-1234567890-video.mp4" * // For non-eligible files: "data:video/mp4;base64,..." * // Load a file as object URL (blob URL) * const objectURL = await cesdk.utils.loadFile({ * accept: '.zip', * returnType: 'objectURL' * }); * // Remember to revoke the object URL when done * URL.revokeObjectURL(objectURL); * ``` * @public */ loadFile(opts: { accept: string; returnType: 'dataURL'; }): Promise; loadFile(opts: { accept: string; returnType: 'text'; }): Promise; loadFile(opts: { accept: string; returnType: 'blob'; }): Promise; loadFile(opts: { accept: string; returnType: 'arrayBuffer'; }): Promise; loadFile(opts: { accept: string; returnType: 'objectURL'; }): Promise; loadFile(opts: { accept: string; returnType?: 'File'; }): Promise; /** * Downloads a blob, string, or OPFS path as a file to the user's device * * @param file - The content to download (Blob, string content, or opfs:// path) * @param mimeType - The MIME type of the content * * @example * ```typescript * // Download a text file * await cesdk.utils.downloadFile('Hello World', 'text/plain'); * * // Download a blob * const blob = new Blob(['content'], { type: 'text/plain' }); * await cesdk.utils.downloadFile(blob, 'text/plain'); * * // Download from OPFS path * await cesdk.utils.downloadFile('opfs://cesdk/buffer/file.mp4', 'video/mp4'); * ``` * @public */ downloadFile(file: Blob | string, mimeType?: FileMimeType): Promise; /** * Performs a local upload of a file (development only) * * Note: This is meant for development testing only. In production, * you should implement a proper upload handler using the callbacks API. * * @param file - The file to upload * @param context - Optional context information for the upload operation * @returns The asset definition for the uploaded file * * @example * ```typescript * const file = new File(['content'], 'test.txt'); * const asset = await cesdk.utils.localUpload(file, { * context: { source: 'user-upload' } * }); * ``` * @public */ localUpload(file: File, context?: UploadCallbackContext): Promise; /** * Calculates the recommended viewport padding based on current viewport size and settings. * This utility matches the internal padding used by the SDK for zoom operations. * The calculation accounts for safe area insets to ensure content remains visible * in UI-safe regions (avoiding notches, rounded corners, system overlays, etc.). * * @param width - Optional viewport width to use instead of current camera width * @param height - Optional viewport height to use instead of current camera height * @returns An object containing paddingX and paddingY values * * @example * ```typescript * const padding = cesdk.utils.calculateViewportPadding(); * console.log(`Padding: ${padding.paddingX}x${padding.paddingY}`); * * // Use with custom zoom * await cesdk.engine.scene.zoomToBlock( * pageId, * padding.paddingX, * padding.paddingY, * padding.paddingX, * padding.paddingY * ); * ``` * @public */ calculateViewportPadding(width?: number, height?: number): { paddingX: number; paddingY: number; }; /** * Checks if the current browser supports video decoding/playback. * * Video decoding requires the WebCodecs API (VideoFrame, VideoDecoder, VideoEncoder, * AudioDecoder, AudioEncoder). These APIs are not available on all platforms. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * @returns true if the browser supports video decoding, false otherwise * * @example * ```typescript * if (cesdk.utils.supportsVideoDecode()) { * // Video features are available * await cesdk.engine.scene.loadFromURL('video-scene.scene'); * } else { * // Show fallback UI or message * console.log('Video features not available in this browser'); * } * ``` * @public */ supportsVideoDecode(): boolean; /** * Checks if the current browser supports video encoding/export. * * Video encoding requires the WebCodecs API with H.264 (AVC) video encoding * and AAC audio encoding support. These codecs are patent-encumbered and not * included in open-source browser builds. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * For server-side video rendering that works on all platforms, see CE.SDK Renderer: * https://img.ly/docs/cesdk/renderer/cesdk-renderer-overview-7f3e9a/ * * @returns A promise that resolves to true if the browser supports video encoding, false otherwise * * @example * ```typescript * if (await cesdk.utils.supportsVideoEncode()) { * // Video export is available * const blob = await cesdk.engine.block.exportVideo(page); * } else { * // Show fallback UI or suggest server-side rendering * console.log('Video export not available - consider using CE.SDK Renderer'); * } * ``` * @public */ supportsVideoEncode(): Promise; } export { VariableAPI } export { VerticalBlockAlignment } /** * Context for the clip context menu which adds clip type filtering. * * @public */ export declare interface VideoClipMenuOrderContext extends OrderContext { clipType?: VideoClipType; } /** * The type of clip in the video timeline. * - `'clip'` — clips on the main (background) track * - `'overlay'` — clips on overlay tracks above the main track * - `'caption'` — caption clips * * @public */ export declare type VideoClipType = 'clip' | 'overlay' | 'caption'; /** * Action function for checking video decoding/playback support. * Returns true if WebCodecs APIs are available for video decoding and playback. * Shows a blocking error dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns true if video decoding is supported, false otherwise * @public */ export declare type VideoDecodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => boolean; /** * Action function for checking video encoding/export support. * Returns true if H.264 video encoding and AAC audio encoding are supported. * Shows a warning dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns A promise that resolves to true if video encoding is supported, false otherwise * @public */ export declare type VideoEncodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => Promise; export { VideoExportOptions } export { VideoMimeType } /** * Dialog display options for video support check actions. * Allows configuring whether and how the dialog is displayed. * @public */ export declare type VideoSupportDialogOptions = { /** Whether to show the dialog */ show: boolean; /** Backdrop style for the dialog - 'transparent' allows interaction with the page, 'opaque' blocks it */ backdrop?: 'transparent' | 'opaque'; }; /** * Represents the view style options in the Creative Editor SDK. * This type defines the possible view styles, which are 'advanced' and 'default'. * * @public */ export declare type ViewStyle = 'advanced' | 'default'; export { XYWH } export { ZoomAutoFitAxis } /** * Action function for zooming in by one step * @public */ export declare type ZoomInAction = (options?: { /** Custom step size for zoom in (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; export { ZoomOptions } /** * Action function for zooming out by one step * @public */ export declare type ZoomOutAction = (options?: { /** Custom step size for zoom out (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; }) => void | Promise; /** * Zoom action types for explicit zoom control */ /** * Action function for zooming to a specific block * @public */ export declare type ZoomToBlockAction = (blockId: number, options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for setting zoom to a specific level * @public */ export declare type ZoomToLevelAction = (level: number, options?: { /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; /** * Action function for zooming to a page with optional padding * @public */ export declare type ZoomToPageAction = (options?: { /** The page to zoom to - 'current' (default), 'first', 'last', or a numeric page index (0-based) */ page?: 'current' | 'first' | 'last' | number; /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for zooming to the current selection * @public */ export declare type ZoomToSelectionAction = (options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; export { }
= (context: BuilderRenderFunctionContext
) => void; /** * Represents the context for rendering a builder function. * * The `BuilderRenderFunctionContext` interface provides a set of properties that * describe the context for rendering a builder function. These options include * settings for the builder, engine, state, payload, render optimized small viewport, * and experimental APIs. * * @public */ export declare interface BuilderRenderFunctionContext
{ builder: Builder; cesdk: CreativeEditorSDK; engine: CreativeEngine_2; /** * State object that can be used to store and retrieve local values. * * It will take a unique identifier for this state that can be used * to access this store later. * * ``` * const { value, setValue } = state('unique-id', 'default-value'); * ``` * * If no default value is set, the `value` property may be undefined * if no value was set before: * * ``` * const { value, setValue } = state('unique-id', 'default-value'); * ``` * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ state: { /** * State object that can be used to store and retrieve a value. If * no values are stored, the default value will be returned. * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ (id: string, defaultValue: T): { /** * The current value of this state. If no value was set, the default * value will be returned. * * @returns The new value or the default value. */ value: T; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; /** * State object that can be used to store and retrieve a value. * If no value was set, the value will be `undefined`. * * @param id - The unique identifier for the state. */ (id: string): { value: T | undefined; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; }; payload?: P; renderOptimizedSmallViewport: boolean; /** * PLEASE NOTE: This contains experimental APIs. * * Use them with caution since they might change without warning and might be replaced * with a completely different concept or maybe not at all. * * @public */ experimental: ExperimentalBuilder.BuilderRenderContext; } /** * Represents a set of translations for the Creative Editor SDK. * * The `Translations` interface provides a structure for defining translations * for the editor interface. Translations are organized by key and can include * nested objects for more complex translation structures. * * @public */ /** * Built-in translation keys provided by the Creative Editor SDK. * @public */ export declare interface BuiltinTranslations { 'action.align': string; 'action.align.bottom': string; 'action.align.bottom.description': string; 'action.align.elements': string; 'action.align.horizontalCenter': string; 'action.align.horizontalCenter.description': string; 'action.align.left': string; 'action.align.left.description': string; 'action.align.right': string; 'action.align.right.description': string; 'action.align.toPage': string; 'action.align.top': string; 'action.align.top.description': string; 'action.align.verticalCenter': string; 'action.align.verticalCenter.description': string; 'action.arrange': string; 'action.arrange.alwaysOnBottom': string; 'action.arrange.alwaysOnTop': string; 'action.arrange.bringForward': string; 'action.arrange.moveLeft': string; 'action.arrange.moveRight': string; 'action.arrange.sendBackward': string; 'action.arrange.toBack': string; 'action.arrange.toFront': string; 'action.audio.delete': string; 'action.audio.duplicate': string; 'action.audio.replace': string; 'action.backgroundClip.add': string; 'action.block.add': string; 'action.block.copy': string; 'action.block.delete': string; 'action.block.delete_plural': string; 'action.block.duplicate': string; 'action.block.flipX': string; 'action.block.flipY': string; 'action.block.lock': string; 'action.block.lock.description': string; 'action.block.move': string; 'action.block.paste': string; 'action.block.rename': string; 'action.block.resize': string; 'action.block.rotate': string; 'action.block.toggleVisibility': string; 'action.block.unlock': string; 'action.block.unlock.description': string; 'action.clip.add': string; 'action.closeInspector': string; 'action.continue': string; 'action.crop.contentFillMode': string; 'action.crop.exit': string; 'action.crop.mirrorX': string; 'action.crop.mirrorY': string; 'action.crop.reset': string; 'action.crop.turn': string; 'action.crop.turnAndMirror': string; 'action.cutoutOffset.change': string; 'action.cutoutSmoothing.change': string; 'action.cutoutType.change': string; 'action.distribute': string; 'action.distribute.horizontally': string; 'action.distribute.horizontally.description': string; 'action.distribute.vertically': string; 'action.distribute.vertically.description': string; 'action.editText': string; 'action.effect.add': string; 'action.effect.remove': string; 'action.enterGroup': string; 'action.fillType.change': string; 'action.filter.add': string; 'action.filter.remove': string; 'action.gradient.addStop': string; 'action.gradient.removeStop': string; 'action.group': string; 'action.image.blur': string; 'action.image.crop': string; 'action.image.effect': string; 'action.image.filter': string; 'action.image.inpainting': string; 'action.image.matting': string; 'action.image.matting.staging': string; 'action.image.replace': string; 'action.image.smartCrop': string; 'action.image.smartImage': string; 'action.image.smartImage.description': string; 'action.image.superResolution': string; 'action.loop.disable': string; 'action.loop.enable': string; 'action.mute': string; 'action.page.add': string; 'action.page.changeFormat': string; 'action.page.delete': string; 'action.pageMove.down': string; 'action.pageMove.down.description': string; 'action.pageMove.left': string; 'action.pageMove.left.description': string; 'action.pageMove.right': string; 'action.pageMove.right.description': string; 'action.pageMove.up': string; 'action.pageMove.up.description': string; 'action.placeholder.change': string; 'action.placeholder.create': string; 'action.placeholder.remove': string; 'action.position': string; 'action.property.reset': string; 'action.property.update': string; 'action.resize': string; 'action.scene.load': string; 'action.scene.new': string; 'action.selectGroup': string; 'action.setAsClip': string; 'action.setAsOverlay': string; 'action.shadow.angle.change': string; 'action.shadow.angle.rotate': string; 'action.shadow.blur.change': string; 'action.shadow.color.change': string; 'action.shadow.distance.change': string; 'action.shape.replace': string; 'action.showInspector': string; 'action.splitClip': string; 'action.splitClip.description': string; 'action.strokeCornerGeometry.change': string; 'action.strokePosition.change': string; 'action.strokeStyle.change': string; 'action.text.autoHeight': string; 'action.text.autoHeight.automatic': string; 'action.text.autoHeight.notification': string; 'action.text.autoSize': string; 'action.text.autoSize.automatic': string; 'action.text.autoSize.notification': string; 'action.text.change': string; 'action.text.changeCase': string; 'action.text.fixedFrame': string; 'action.text.fixedFrame.automatic': string; 'action.text.fixedFrame.notification': string; 'action.ungroup': string; 'action.unmute': string; 'action.vectorEdit.editPath': string; 'action.vectorEdit.exit': string; 'action.vectorPath.addMode': string; 'action.vectorPath.addNode': string; 'action.vectorPath.bendMode': string; 'action.vectorPath.deleteMode': string; 'action.vectorPath.deleteNode': string; 'action.vectorPath.moveMode': string; 'action.video.replace': string; 'block.audio': string; 'block.caption': string; 'block.cutout': string; 'block.ellipse': string; 'block.graphic': string; 'block.group': string; 'block.image': string; 'block.line': string; 'block.page': string; 'block.polygon': string; 'block.rect': string; 'block.scene': string; 'block.star': string; 'block.sticker': string; 'block.text': string; 'block.vector_path': string; 'block.video': string; 'color.aqua': string; 'color.black': string; 'color.blue': string; 'color.cyan': string; 'color.green': string; 'color.magenta': string; 'color.orange': string; 'color.purple': string; 'color.red': string; 'color.transparent': string; 'color.yellow': string; 'common.add': string; 'common.advanced': string; 'common.altKey': string; 'common.arrange': string; 'common.axis.x': string; 'common.axis.y': string; 'common.back': string; 'common.cancel': string; 'common.close': string; 'common.cmyk': string; 'common.color': string; 'common.colorValue': string; 'common.confirm': string; 'common.controlKey': string; 'common.custom': string; 'common.defaultDuration': string; 'common.defaultDuration.inUnit': string; 'common.delete': string; 'common.done': string; 'common.download': string; 'common.duplicate': string; 'common.edit': string; 'common.editColor': string; 'common.export': string; 'common.fill': string; 'common.formats': string; 'common.height': string; 'common.height.inUnit': string; 'common.hue': string; 'common.image': string; 'common.inch': string; 'common.load': string; 'common.lock': string; 'common.millimeter': string; 'common.mixed': string; 'common.mode.design': string; 'common.mode.preview': string; 'common.mode.template': string; 'common.more': string; 'common.nearestColorName': string; 'common.off': string; 'common.on': string; 'common.opacity': string; 'common.page': string; 'common.pause': string; 'common.pixel': string; 'common.pixelScale': string; 'common.placeholder': string; 'common.play': string; 'common.position': string; 'common.presets': string; 'common.properties': string; 'common.property': string; 'common.redo': string; 'common.reloadPage': string; 'common.replace': string; 'common.reset': string; 'common.resolution': string; 'common.role': string; 'common.role.adopter': string; 'common.role.creator': string; 'common.role.presenter': string; 'common.role.viewer': string; 'common.rotateAndFlip': string; 'common.rotation': string; 'common.rotation.inUnit': string; 'common.save': string; 'common.select': string; 'common.shiftKey': string; 'common.size': string; 'common.spotColor': string; 'common.srgb': string; 'common.style': string; 'common.tint': string; 'common.transform': string; 'common.trim': string; 'common.undo': string; 'common.unit': string; 'common.unit.description': string; 'common.unlock': string; 'common.video': string; 'common.width': string; 'common.width.inUnit': string; 'component.alignAndArrange': string; 'component.assetPanelAutoCloseSettings': string; 'component.assetPanelAutoCloseSettings.false': string; 'component.assetPanelAutoCloseSettings.false.description': string; 'component.assetPanelAutoCloseSettings.true': string; 'component.assetPanelAutoCloseSettings.true.description': string; 'component.assetPanelFloatingSettings': string; 'component.assetPanelFloatingSettings.fixed': string; 'component.assetPanelFloatingSettings.fixed.description': string; 'component.assetPanelFloatingSettings.floating': string; 'component.assetPanelFloatingSettings.floating.description': string; 'component.assetSettings': string; 'component.assetSettings.adjustments': string; 'component.assetSettings.blur': string; 'component.assetSettings.crop': string; 'component.assetSettings.effects': string; 'component.assetSettings.filters': string; 'component.assetSettings.opacity': string; 'component.assetSettings.text.advanced': string; 'component.assetSettings.text.color': string; 'component.assetSettings.transform': string; 'component.audio.properties': string; 'component.audio.source': string; 'component.audio.trim': string; 'component.audio.trim.description': string; 'component.audio.trim.duration': string; 'component.audio.trim.duration.description': string; 'component.audio.trim.play': string; 'component.audio.trim.play.description': string; 'component.canvas': string; 'component.canvas.openLibrary': string; 'component.canvas.state.error': string; 'component.canvas.state.unsupported': string; 'component.caption': string; 'component.caption.more': string; 'component.colorPicker.colorItem': string; 'component.colorPicker.colorItem.description': string; 'component.colorPicker.colorItem.hexInput': string; 'component.colorPicker.colorItem.transparent': string; 'component.colorPicker.description': string; 'component.colorPicker.hsl.description': string; 'component.colorPicker.hueGradient': string; 'component.colorSchemeSelect.accent': string; 'component.colorSchemeSelect.accent.description': string; 'component.colorSchemeSelect.active': string; 'component.colorSchemeSelect.active.description': string; 'component.colorSchemeSelect.background': string; 'component.colorSchemeSelect.background.description': string; 'component.contentFill': string; 'component.contentFill.color': string; 'component.contentFill.color.description': string; 'component.contentFill.description': string; 'component.contentFill.image': string; 'component.contentFill.options': string; 'component.contentFill.options.description': string; 'component.contentFill.video': string; 'component.cutout': string; 'component.dockIconSizeSelect': string; 'component.dockIconSizeSelect.large': string; 'component.dockIconSizeSelect.large.description': string; 'component.dockIconSizeSelect.normal': string; 'component.dockIconSizeSelect.normal.description': string; 'component.dockLabelVisibilityToggle': string; 'component.dockLabelVisibilityToggle.hide': string; 'component.dockLabelVisibilityToggle.hide.description': string; 'component.dockLabelVisibilityToggle.show': string; 'component.dockLabelVisibilityToggle.show.description': string; 'component.fileOperation.archiveScene': string; 'component.fileOperation.exportImage': string; 'component.fileOperation.exportPDF': string; 'component.fileOperation.exportScene': string; 'component.fileOperation.exportVideo': string; 'component.fileOperation.importArchive': string; 'component.fileOperation.importScene': string; 'component.fileOperation.more': string; 'component.fileOperation.save': string; 'component.fileOperation.share': string; 'component.inspectorBar': string; 'component.inspectorPanelFloatingSettings': string; 'component.inspectorPanelFloatingSettings.fixed': string; 'component.inspectorPanelFloatingSettings.fixed.description': string; 'component.inspectorPanelFloatingSettings.floating': string; 'component.inspectorPanelFloatingSettings.floating.description': string; 'component.inspectorPositionSelect': string; 'component.inspectorPositionSelect.left': string; 'component.inspectorPositionSelect.left.description': string; 'component.inspectorPositionSelect.right': string; 'component.inspectorPositionSelect.right.description': string; 'component.languageSelect': string; 'component.languageSelect.description': string; 'component.library': string; 'component.library.addFile': string; 'component.library.breadcrumbRoot': string; 'component.library.clearSearch': string; 'component.library.elements': string; 'component.library.enterSection': string; 'component.library.error': string; 'component.library.loading': string; 'component.library.noItems': string; 'component.library.noMoreItems': string; 'component.library.removeAssetConfirmation': string; 'component.library.removeAssetConfirmation.description': string; 'component.library.searchPlaceholder': string; 'component.librarySettings': string; 'component.librarySettings.elementLibrary': string; 'component.librarySettings.imageLibrary': string; 'component.librarySettings.templateLibrary': string; 'component.librarySettings.textLibrary': string; 'component.librarySettings.uploadLibrary': string; 'component.pageResize.label': string; 'component.pageResizePanel.apply': string; 'component.pageResizePanel.label': string; 'component.pageSettings': string; 'component.pageSettings.format': string; 'component.pageSettings.manage': string; 'component.pageTitleAppendPageNameToggle': string; 'component.pageTitleAppendPageNameToggle.hide': string; 'component.pageTitleAppendPageNameToggle.hide.description': string; 'component.pageTitleAppendPageNameToggle.show': string; 'component.pageTitleAppendPageNameToggle.show.description': string; 'component.pageTitleDefaultTitleVisibilityToggle': string; 'component.pageTitleDefaultTitleVisibilityToggle.hide': string; 'component.pageTitleDefaultTitleVisibilityToggle.hide.description': string; 'component.pageTitleDefaultTitleVisibilityToggle.show': string; 'component.pageTitleDefaultTitleVisibilityToggle.show.description': string; 'component.pageTitleShowOnSinglePageToggle': string; 'component.pageTitleShowOnSinglePageToggle.hide': string; 'component.pageTitleShowOnSinglePageToggle.hide.description': string; 'component.pageTitleShowOnSinglePageToggle.show': string; 'component.pageTitleShowOnSinglePageToggle.show.description': string; 'component.pageTitleVisibilityToggle': string; 'component.pageTitleVisibilityToggle.hide': string; 'component.pageTitleVisibilityToggle.hide.description': string; 'component.pageTitleVisibilityToggle.show': string; 'component.pageTitleVisibilityToggle.show.description': string; 'component.placeholder.appearance': string; 'component.placeholder.appearance.description': string; 'component.placeholder.arrange': string; 'component.placeholder.arrange.description': string; 'component.placeholder.audio': string; 'component.placeholder.audio.description': string; 'component.placeholder.create': string; 'component.placeholder.disableAll': string; 'component.placeholder.enableAll': string; 'component.placeholder.fill': string; 'component.placeholder.fill.description': string; 'component.placeholder.general': string; 'component.placeholder.general.description': string; 'component.placeholder.settings': string; 'component.placeholder.settingsMenu': string; 'component.placeholder.shape': string; 'component.placeholder.shape.description': string; 'component.placeholder.stroke': string; 'component.placeholder.stroke.description': string; 'component.placeholder.text': string; 'component.placeholder.text.description': string; 'component.propertyPopover.header': string; 'component.replacePanelAutoCloseSettings': string; 'component.replacePanelAutoCloseSettings.false': string; 'component.replacePanelAutoCloseSettings.false.description': string; 'component.replacePanelAutoCloseSettings.true': string; 'component.replacePanelAutoCloseSettings.true.description': string; 'component.replacePanelFloatingSettings': string; 'component.replacePanelFloatingSettings.fixed': string; 'component.replacePanelFloatingSettings.fixed.description': string; 'component.replacePanelFloatingSettings.floating': string; 'component.replacePanelFloatingSettings.floating.description': string; 'component.roleSelect': string; 'component.roleSelect.description': string; 'component.scalingSelect': string; 'component.scalingSelect.large': string; 'component.scalingSelect.large.description': string; 'component.scalingSelect.normal': string; 'component.scalingSelect.normal.description': string; 'component.settings.toggle': string; 'component.settings.toggle.description': string; 'component.settingsPanel.appearance': string; 'component.settingsPanel.assetPanel': string; 'component.settingsPanel.dock': string; 'component.settingsPanel.documentation': string; 'component.settingsPanel.general': string; 'component.settingsPanel.header': string; 'component.settingsPanel.inspectorPanel': string; 'component.settingsPanel.page': string; 'component.settingsPanel.pageLabel': string; 'component.settingsPanel.replacePanel': string; 'component.settingsPanel.singlePageMode': string; 'component.settingsPanel.singlePageVisibilitySelect': string; 'component.themeSelect': string; 'component.themeSelect.dark': string; 'component.themeSelect.dark.description': string; 'component.themeSelect.dialog': string; 'component.themeSelect.dialog.description': string; 'component.themeSelect.generate': string; 'component.themeSelect.light': string; 'component.themeSelect.light.description': string; 'component.themeSelect.system': string; 'component.themeSelect.system.description': string; 'component.timeline.audio.options.description': string; 'component.timeline.collapse': string; 'component.timeline.expand': string; 'component.timeline.label': string; 'component.timeline.pause.description': string; 'component.timeline.play.description': string; 'component.timeline.scale.down': string; 'component.timeline.scale.down.description': string; 'component.timeline.scale.fit': string; 'component.timeline.scale.fit.description': string; 'component.timeline.scale.label': string; 'component.timeline.scale.up': string; 'component.timeline.scale.up.description': string; 'component.timeline.video.options.description': string; 'component.topbar.back': string; 'component.topbar.close': string; 'component.undo.redo': string; 'component.undo.undo': string; 'component.video.properties': string; 'component.video.source': string; 'component.video.trim': string; 'component.video.trim.description': string; 'component.video.trim.duration': string; 'component.video.trim.duration.description': string; 'component.video.trim.play': string; 'component.video.trim.play.description': string; 'component.video.unsupported': string; 'component.video.unsupported.description': string; 'component.viewSelect': string; 'component.viewSelect.advanced': string; 'component.viewSelect.advanced.description': string; 'component.viewSelect.default': string; 'component.viewSelect.default.description': string; 'component.welcome.text': string; 'component.zoom.autoFit': string; 'component.zoom.fitPage': string; 'component.zoom.fitSelection': string; 'component.zoom.in': string; 'component.zoom.label.auto': string; 'component.zoom.options': string; 'component.zoom.out': string; 'component.zoom.shortcut': string; 'component.zoom.to': string; 'dialog.export.abort.message': string; 'dialog.export.abort.title': string; 'dialog.export.action': string; 'dialog.export.error.message.1': string; 'dialog.export.error.message.2': string; 'dialog.export.error.title': string; 'dialog.export.message': string; 'dialog.export.success.message': string; 'dialog.export.success.title': string; 'dialog.export.title': string; 'editor.scope.canvas': string; 'editor.scope.global': string; 'editor.scope.videoTimeline': string; 'element.transform.resize': string; 'element.transform.rotate': string; 'error.applyAsset': string; 'error.applyAsset.description': string; 'error.booleanOperation.effectlessDifference': string; 'error.booleanOperation.effectlessDifference.description': string; 'error.booleanOperation.effectlessUnion': string; 'error.booleanOperation.effectlessUnion.description': string; 'error.booleanOperation.emptyShape': string; 'error.booleanOperation.emptyShape.description': string; 'error.cta.generic': string; 'error.cta.generic.description': string; 'error.generic': string; 'error.generic.description': string; 'error.replaceAsset': string; 'error.replaceAsset.description': string; 'error.upload': string; 'error.upload.description': string; 'error.upload.sizeExceeded': string; 'input.adjustments': string; 'input.adjustments.basic': string; 'input.adjustments.refinements': string; 'input.adjustments.tooltip': string; 'input.alwaysOnBottom': string; 'input.alwaysOnTop': string; 'input.animations': string; 'input.animations.description': string; 'input.appearance': string; 'input.aspectLock': string; 'input.aspectLock.description': string; 'input.audio.duration.description': string; 'input.audio.duration.reset': string; 'input.audio.mute': string; 'input.bleedMargin.select': string; 'input.blur': string; 'input.blur.tooltip': string; 'input.booleanoperations': string; 'input.booleanoperations.exclude': string; 'input.booleanoperations.intersect': string; 'input.booleanoperations.subtract': string; 'input.booleanoperations.union': string; 'input.canvas': string; 'input.caption': string; 'input.caption.add': string; 'input.caption.addAfter': string; 'input.caption.content': string; 'input.caption.create': string; 'input.caption.delete': string; 'input.caption.deleteAll': string; 'input.caption.edit': string; 'input.caption.file': string; 'input.caption.hideTimings': string; 'input.caption.import': string; 'input.caption.import.description': string; 'input.caption.import.error.message': string; 'input.caption.import.error.title': string; 'input.caption.in': string; 'input.caption.inputLabel': string; 'input.caption.mergePrevious': string; 'input.caption.more': string; 'input.caption.out': string; 'input.caption.showTimings': string; 'input.caption.style': string; 'input.character': string; 'input.clipContent': string; 'input.clipContent.off.description': string; 'input.clipContent.on.description': string; 'input.clipLines': string; 'input.clipLines.off.description': string; 'input.clipLines.on.description': string; 'input.colorMode': string; 'input.colorMode.description': string; 'input.cutoutOffset': string; 'input.cutoutSmoothing': string; 'input.cutoutType': string; 'input.cutoutType.dashed': string; 'input.cutoutType.solid': string; 'input.duration': string; 'input.duration.description': string; 'input.effect': string; 'input.effect.tooltip': string; 'input.export': string; 'input.filter': string; 'input.filter.tooltip': string; 'input.fontSelect': string; 'input.fontSelect.fallback': string; 'input.fontSize.select': string; 'input.fontSize.selectMax': string; 'input.fontSize.selectMin': string; 'input.fontStyle.toggle': string; 'input.gradient.activateColorStop': string; 'input.gradient.addStop': string; 'input.gradient.colorPosition': string; 'input.gradient.colorStop': string; 'input.gradient.colorStop.active': string; 'input.gradient.colorStop.description': string; 'input.gradient.deleteStop': string; 'input.gradient.flip': string; 'input.gradient.gradientAngle': string; 'input.gradient.rotate': string; 'input.insertVariable': string; 'input.keyShortcut': string; 'input.layer': string; 'input.multiSelection.notice': string; 'input.multiSelection.title': string; 'input.opacity': string; 'input.opacity.options': string; 'input.options': string; 'input.options.description': string; 'input.page.titleTemplate': string; 'input.pages': string; 'input.preset': string; 'input.preset.description': string; 'input.preset.tooltip': string; 'input.propertyToggle.disable': string; 'input.propertyToggle.enable': string; 'input.propertyToggle.hidden': string; 'input.propertyToggle.visible': string; 'input.rename': string; 'input.resolution.select': string; 'input.selection': string; 'input.shadow.angle': string; 'input.shadow.angle.description': string; 'input.shadow.blur': string; 'input.shadow.blur.description': string; 'input.shadow.description': string; 'input.shadow.distance': string; 'input.shadow.distance.description': string; 'input.shadow.label': string; 'input.shadow.valueLabel': string; 'input.shape': string; 'input.shape.options': string; 'input.showInExport': string; 'input.sliderInput.toggleNumberInput': string; 'input.stroke': string; 'input.text.advanced': string; 'input.text.advanced.description': string; 'input.text.placeholder': string; 'input.time.end': string; 'input.time.start': string; 'input.transform': string; 'input.transform.description': string; 'input.typefaceSelect.description': string; 'input.typefaceSelect.noResults': string; 'input.typefaceSelect.search': string; 'input.typefaceSelect.tooltip': string; 'input.unit.tooltip': string; 'input.uploadAudio': string; 'input.uploadFiles': string; 'input.uploadImage': string; 'input.uploadVideo': string; 'input.video': string; 'input.video.duration.description': string; 'input.video.duration.reset': string; 'libraries.ly.img.animations.ly.img.animations.in.label': string; 'libraries.ly.img.animations.ly.img.animations.label': string; 'libraries.ly.img.animations.ly.img.animations.loop.label': string; 'libraries.ly.img.animations.ly.img.animations.out.label': string; 'libraries.ly.img.audio.label': string; 'libraries.ly.img.audio.upload.label': string; 'libraries.ly.img.color.palette.label': string; 'libraries.ly.img.colors.imageColors.label': string; 'libraries.ly.img.colors.documentColors.label': string; 'libraries.ly.img.crop.presets.label': string; 'libraries.ly.img.image.label': string; 'libraries.ly.img.image.upload.label': string; 'libraries.ly.img.local.label': string; 'libraries.ly.img.page.presets.facebook.label': string; 'libraries.ly.img.page.presets.hd-video.label': string; 'libraries.ly.img.page.presets.instagram.label': string; 'libraries.ly.img.page.presets.iso-standard-print.label': string; 'libraries.ly.img.page.presets.label': string; 'libraries.ly.img.page.presets.linkedIn.label': string; 'libraries.ly.img.page.presets.north-american-print.label': string; 'libraries.ly.img.page.presets.other-print.label': string; 'libraries.ly.img.page.presets.pinterest.label': string; 'libraries.ly.img.page.presets.tiktok.label': string; 'libraries.ly.img.page.presets.x.label': string; 'libraries.ly.img.page.presets.youtube.label': string; 'libraries.ly.img.sticker.3Dstickers.label': string; 'libraries.ly.img.sticker.craft.label': string; 'libraries.ly.img.sticker.doodle.label': string; 'libraries.ly.img.sticker.emoji.label': string; 'libraries.ly.img.sticker.emoticons.label': string; 'libraries.ly.img.sticker.florals.label': string; 'libraries.ly.img.sticker.hand.label': string; 'libraries.ly.img.sticker.label': string; 'libraries.ly.img.sticker.marker.label': string; 'libraries.ly.img.sticker.sketches.label': string; 'libraries.ly.img.templates.confirmation.abort': string; 'libraries.ly.img.templates.confirmation.body': string; 'libraries.ly.img.templates.confirmation.confirm': string; 'libraries.ly.img.templates.confirmation.headline': string; 'libraries.ly.img.templates.label': string; 'libraries.ly.img.templates.premium.confirmation.abort': string; 'libraries.ly.img.templates.premium.confirmation.body': string; 'libraries.ly.img.templates.premium.confirmation.confirm': string; 'libraries.ly.img.templates.premium.confirmation.headline': string; 'libraries.ly.img.templates.premium.e-commerce.label': string; 'libraries.ly.img.templates.premium.event.label': string; 'libraries.ly.img.templates.premium.label': string; 'libraries.ly.img.templates.premium.personal.label': string; 'libraries.ly.img.templates.premium.professional.label': string; 'libraries.ly.img.templates.premium.socials.label': string; 'libraries.ly.img.text.components.label': string; 'libraries.ly.img.text.headline.label': string; 'libraries.ly.img.text.label': string; 'libraries.ly.img.text.paragraph.label': string; 'libraries.ly.img.text.title.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.in.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.loop.label': string; 'libraries.ly.img.textAnimations.ly.img.animations.out.label': string; 'libraries.ly.img.upload.label': string; 'libraries.ly.img.vector.shape.abstract-filled.label': string; 'libraries.ly.img.vector.shape.abstract-gradient.label': string; 'libraries.ly.img.vector.shape.abstract-image.label': string; 'libraries.ly.img.vector.shape.abstract-outline.label': string; 'libraries.ly.img.vector.shape.filled.label': string; 'libraries.ly.img.vector.shape.gradient.label': string; 'libraries.ly.img.vector.shape.image.label': string; 'libraries.ly.img.vector.shape.label': string; 'libraries.ly.img.vector.shape.outline.label': string; 'libraries.ly.img.video.label': string; 'libraries.ly.img.video.upload.label': string; 'libraries.unsplash.label': string; 'meta.currentLanguage': string; 'notification.redo': string; 'notification.undo': string; 'preset.document.american-legal': string; 'preset.document.american-letter': string; 'preset.document.business-card': string; 'preset.document.custom': string; 'preset.document.din-a0': string; 'preset.document.din-a1': string; 'preset.document.din-a2': string; 'preset.document.din-a3': string; 'preset.document.din-a4': string; 'preset.document.din-a5': string; 'preset.document.din-a6': string; 'preset.document.din-a65': string; 'preset.document.din-b5': string; 'preset.document.format2k': string; 'preset.document.format4k': string; 'preset.document.fullhd': string; 'preset.document.hd': string; 'preset.document.instagram-photo': string; 'preset.document.instagram-profile': string; 'preset.document.instagram-story': string; 'preset.document.qhd': string; 'preset.document.social-feed': string; 'preset.document.social-story': string; 'preset.document.square': string; 'preset.document.twitter-header': string; 'preset.document.twitter-image': string; 'preset.document.twitter-profile': string; 'preset.template.blank_1': string; 'preset.template.business_card_1': string; 'preset.template.collage_1': string; 'preset.template.instagram_photo_1': string; 'preset.template.instagram_story_1': string; 'preset.template.postcard_1': string; 'preset.template.postcard_2': string; 'preset.template.poster_1': string; 'preset.template.presentation_4': string; 'property.adjustments.blacks': string; 'property.adjustments.brightness': string; 'property.adjustments.clarity': string; 'property.adjustments.contrast': string; 'property.adjustments.exposure': string; 'property.adjustments.gamma': string; 'property.adjustments.highlights': string; 'property.adjustments.saturation': string; 'property.adjustments.shadows': string; 'property.adjustments.sharpness': string; 'property.adjustments.temperature': string; 'property.adjustments.whites': string; 'property.animation.baseline': string; 'property.animation.baseline.direction': string; 'property.animation.baseline.direction.Down': string; 'property.animation.baseline.direction.Left': string; 'property.animation.baseline.direction.Right': string; 'property.animation.baseline.direction.Up': string; 'property.animation.block_swipe_text': string; 'property.animation.block_swipe_text.direction': string; 'property.animation.block_swipe_text.direction.Down': string; 'property.animation.block_swipe_text.direction.Left': string; 'property.animation.block_swipe_text.direction.Right': string; 'property.animation.block_swipe_text.direction.Up': string; 'property.animation.block_swipe_text.useTextColor': string; 'property.animation.blur': string; 'property.animation.blur.fade': string; 'property.animation.blur.intensity': string; 'property.animation.blur_loop': string; 'property.animation.blur_loop.intensity': string; 'property.animation.breathing_loop': string; 'property.animation.breathing_loop.intensity': string; 'property.animation.crop_zoom': string; 'property.animation.crop_zoom.fade': string; 'property.animation.crop_zoom.scale': string; 'property.animation.fade': string; 'property.animation.fade_loop': string; 'property.animation.grow': string; 'property.animation.grow.direction': string; 'property.animation.grow.direction.All': string; 'property.animation.grow.direction.Horizontal': string; 'property.animation.grow.direction.Vertical': string; 'property.animation.jump_loop': string; 'property.animation.jump_loop.direction': string; 'property.animation.jump_loop.direction.Down': string; 'property.animation.jump_loop.direction.Left': string; 'property.animation.jump_loop.direction.Right': string; 'property.animation.jump_loop.direction.Up': string; 'property.animation.jump_loop.intensity': string; 'property.animation.ken_burns': string; 'property.animation.ken_burns.cropScale': string; 'property.animation.ken_burns.direction': string; 'property.animation.ken_burns.direction.Down': string; 'property.animation.ken_burns.direction.Left': string; 'property.animation.ken_burns.direction.Right': string; 'property.animation.ken_burns.direction.Up': string; 'property.animation.ken_burns.fade': string; 'property.animation.ken_burns.travelDistanceRatio': string; 'property.animation.ken_burns.zoomIntensity': string; 'property.animation.merge_text': string; 'property.animation.merge_text.direction': string; 'property.animation.merge_text.direction.Left': string; 'property.animation.merge_text.direction.Right': string; 'property.animation.merge_text.intensity': string; 'property.animation.none': string; 'property.animation.pan': string; 'property.animation.pan.direction': string; 'property.animation.pan.direction.Down': string; 'property.animation.pan.direction.Left': string; 'property.animation.pan.direction.Right': string; 'property.animation.pan.direction.Up': string; 'property.animation.pan.distance': string; 'property.animation.pan.fade': string; 'property.animation.pop': string; 'property.animation.pulsating_loop': string; 'property.animation.pulsating_loop.intensity': string; 'property.animation.scale_loop': string; 'property.animation.scale_loop.direction': string; 'property.animation.scale_loop.direction.All': string; 'property.animation.scale_loop.direction.BottomLeft': string; 'property.animation.scale_loop.direction.BottomRight': string; 'property.animation.scale_loop.direction.Horizontal': string; 'property.animation.scale_loop.direction.TopLeft': string; 'property.animation.scale_loop.direction.TopRight': string; 'property.animation.scale_loop.direction.Vertical': string; 'property.animation.scale_loop.easingDuration': string; 'property.animation.scale_loop.endScale': string; 'property.animation.scale_loop.holdDuration': string; 'property.animation.scale_loop.startDelay': string; 'property.animation.scale_loop.startScale': string; 'property.animation.slide': string; 'property.animation.slide.direction': string; 'property.animation.slide.direction.Down': string; 'property.animation.slide.direction.Left': string; 'property.animation.slide.direction.Right': string; 'property.animation.slide.direction.Up': string; 'property.animation.slide.distance': string; 'property.animation.slide.fade': string; 'property.animation.spin': string; 'property.animation.spin.direction': string; 'property.animation.spin.direction.Clockwise': string; 'property.animation.spin.direction.CounterClockwise': string; 'property.animation.spin.fade': string; 'property.animation.spin.intensity': string; 'property.animation.spin_loop': string; 'property.animation.spin_loop.direction': string; 'property.animation.spin_loop.direction.Clockwise': string; 'property.animation.spin_loop.direction.CounterClockwise': string; 'property.animation.spread_text': string; 'property.animation.spread_text.fade': string; 'property.animation.spread_text.intensity': string; 'property.animation.squeeze_loop': string; 'property.animation.sway_loop': string; 'property.animation.sway_loop.intensity': string; 'property.animation.typewriter_text': string; 'property.animation.typewriter_text.writingStyle': string; 'property.animation.typewriter_text.writingStyle.Character': string; 'property.animation.typewriter_text.writingStyle.Word': string; 'property.animation.wipe': string; 'property.animation.wipe.direction': string; 'property.animation.wipe.direction.Down': string; 'property.animation.wipe.direction.Left': string; 'property.animation.wipe.direction.Right': string; 'property.animation.wipe.direction.Up': string; 'property.animation.zoom': string; 'property.animation.zoom.fade': string; 'property.animationEasing': string; 'property.animationEasing.EaseInBack': string; 'property.animationEasing.EaseInOutBack': string; 'property.animationEasing.EaseInOutQuint': string; 'property.animationEasing.EaseInOutSpring': string; 'property.animationEasing.EaseInQuint': string; 'property.animationEasing.EaseInSpring': string; 'property.animationEasing.EaseOutBack': string; 'property.animationEasing.EaseOutQuint': string; 'property.animationEasing.EaseOutSpring': string; 'property.animationEasing.Linear': string; 'property.autoSize': string; 'property.autoSize.autoHeight.description': string; 'property.autoSize.autoSize.description': string; 'property.autoSize.fixedFrame.description': string; 'property.backgroundColor.color': string; 'property.backgroundColor.description': string; 'property.bleedMargin': string; 'property.blendMode': string; 'property.blendMode.Color': string; 'property.blendMode.ColorBurn': string; 'property.blendMode.ColorDodge': string; 'property.blendMode.Darken': string; 'property.blendMode.DarkenColor': string; 'property.blendMode.Difference': string; 'property.blendMode.Divide': string; 'property.blendMode.Exclusion': string; 'property.blendMode.HardLight': string; 'property.blendMode.HardMix': string; 'property.blendMode.Hue': string; 'property.blendMode.Lighten': string; 'property.blendMode.LightenColor': string; 'property.blendMode.LinearBurn': string; 'property.blendMode.LinearDodge': string; 'property.blendMode.LinearLight': string; 'property.blendMode.Luminosity': string; 'property.blendMode.Multiply': string; 'property.blendMode.Normal': string; 'property.blendMode.Overlay': string; 'property.blendMode.PassThrough': string; 'property.blendMode.PinLight': string; 'property.blendMode.Saturation': string; 'property.blendMode.Screen': string; 'property.blendMode.SoftLight': string; 'property.blendMode.Subtract': string; 'property.blendMode.VividLight': string; 'property.blendMode.description': string; 'property.blendMode.tooltip': string; 'property.blur.extrudeBlur': string; 'property.blur.extrudeBlur.amount': string; 'property.blur.linearBlur': string; 'property.blur.linearBlur.blurRadius': string; 'property.blur.linearBlur.x1': string; 'property.blur.linearBlur.x2': string; 'property.blur.linearBlur.y1': string; 'property.blur.linearBlur.y2': string; 'property.blur.mirroredBlur': string; 'property.blur.mirroredBlur.blurRadius': string; 'property.blur.mirroredBlur.gradientSize': string; 'property.blur.mirroredBlur.size': string; 'property.blur.mirroredBlur.x1': string; 'property.blur.mirroredBlur.x2': string; 'property.blur.mirroredBlur.y1': string; 'property.blur.mirroredBlur.y2': string; 'property.blur.radialBlur': string; 'property.blur.radialBlur.blurRadius': string; 'property.blur.radialBlur.gradientRadius': string; 'property.blur.radialBlur.radius': string; 'property.blur.radialBlur.x': string; 'property.blur.radialBlur.y': string; 'property.blur.uniformBlur': string; 'property.blur.uniformBlur.intensity': string; 'property.caption.scale': string; 'property.color': string; 'property.color.description': string; 'property.cornerRadius': string; 'property.crop': string; 'property.crop.contentFillMode': string; 'property.crop.contentFillMode.contain': string; 'property.crop.contentFillMode.cover': string; 'property.crop.contentFillMode.crop': string; 'property.crop.contentFillMode.description': string; 'property.crop.offset': string; 'property.crop.offset.description': string; 'property.crop.scale': string; 'property.crop.scale.description': string; 'property.crop.size': string; 'property.crop.size.description': string; 'property.crop.straighten': string; 'property.crop.tooltip': string; 'property.crop.transform': string; 'property.dropShadow.color': string; 'property.duoToneFilterIntensity': string; 'property.duotoneFilter.breezy': string; 'property.duotoneFilter.clash': string; 'property.duotoneFilter.deepblue': string; 'property.duotoneFilter.desert': string; 'property.duotoneFilter.frog': string; 'property.duotoneFilter.peach': string; 'property.duotoneFilter.plum': string; 'property.duotoneFilter.sunset': string; 'property.effect.crossCut': string; 'property.effect.crossCut.offset': string; 'property.effect.crossCut.slices': string; 'property.effect.crossCut.speedV': string; 'property.effect.crossCut.time': string; 'property.effect.dotPattern': string; 'property.effect.dotPattern.blur': string; 'property.effect.dotPattern.dots': string; 'property.effect.dotPattern.size': string; 'property.effect.extrudeBlur': string; 'property.effect.extrudeBlur.amount': string; 'property.effect.glow': string; 'property.effect.glow.amount': string; 'property.effect.glow.darkness': string; 'property.effect.glow.size': string; 'property.effect.greenScreen': string; 'property.effect.greenScreen.colorMatch': string; 'property.effect.greenScreen.fromColor': string; 'property.effect.greenScreen.fromColor.description': string; 'property.effect.greenScreen.smoothness': string; 'property.effect.greenScreen.spill': string; 'property.effect.halfTone': string; 'property.effect.halfTone.angle': string; 'property.effect.halfTone.scale': string; 'property.effect.joggle.amount': string; 'property.effect.joggle.time': string; 'property.effect.linocut': string; 'property.effect.linocut.scale': string; 'property.effect.liquid': string; 'property.effect.liquid.amount': string; 'property.effect.liquid.scale': string; 'property.effect.liquid.speed': string; 'property.effect.liquid.time': string; 'property.effect.mirror': string; 'property.effect.mirror.side': string; 'property.effect.outliner': string; 'property.effect.outliner.amount': string; 'property.effect.outliner.passthrough': string; 'property.effect.pixelize': string; 'property.effect.pixelize.horizontalPixelSize': string; 'property.effect.pixelize.verticalPixelSize': string; 'property.effect.posterize': string; 'property.effect.posterize.levels': string; 'property.effect.psychedelic.amount': string; 'property.effect.psychedelic.offset': string; 'property.effect.psychedelic.time': string; 'property.effect.radialPixel': string; 'property.effect.radialPixel.radius': string; 'property.effect.radialPixel.segments': string; 'property.effect.radiate.centerBrightness': string; 'property.effect.radiate.colorize': string; 'property.effect.radiate.powerCurve': string; 'property.effect.recolor': string; 'property.effect.recolor.brightnessMatch': string; 'property.effect.recolor.colorMatch': string; 'property.effect.recolor.fromColor': string; 'property.effect.recolor.fromColor.description': string; 'property.effect.recolor.smoothness': string; 'property.effect.recolor.toColor': string; 'property.effect.recolor.toColor.description': string; 'property.effect.scanlines.count': string; 'property.effect.scanlines.linesAmount': string; 'property.effect.scanlines.noiseAmount': string; 'property.effect.scanlines.time': string; 'property.effect.separate.amount': string; 'property.effect.separate.time': string; 'property.effect.sharpie': string; 'property.effect.shifter': string; 'property.effect.shifter.amount': string; 'property.effect.shifter.angle': string; 'property.effect.tiltShift': string; 'property.effect.tiltShift.amount': string; 'property.effect.tiltShift.position': string; 'property.effect.tvGlitch': string; 'property.effect.tvGlitch.distortion': string; 'property.effect.tvGlitch.distortion2': string; 'property.effect.tvGlitch.rollSpeed': string; 'property.effect.tvGlitch.speed': string; 'property.effect.tvGlitch.time': string; 'property.effect.vignette': string; 'property.effect.vignette.darkness': string; 'property.effect.vignette.offset': string; 'property.effect.waves.size': string; 'property.effect.waves.speed': string; 'property.effect.waves.strength': string; 'property.effect.waves.time': string; 'property.fill': string; 'property.fill.description': string; 'property.fill.solid.color': string; 'property.fillType': string; 'property.fillType.gradient': string; 'property.fillType.gradient.description': string; 'property.fillType.solid': string; 'property.fillType.solid.description': string; 'property.flip': string; 'property.flip.x': string; 'property.flip.y': string; 'property.gradientType.conical': string; 'property.gradientType.conical.description': string; 'property.gradientType.linear': string; 'property.gradientType.radial': string; 'property.gradientType.radial.description': string; 'property.innerDiameter': string; 'property.layout': string; 'property.layout.free': string; 'property.layout.horizontal': string; 'property.layout.vertical': string; 'property.letterSpacing': string; 'property.lineHeight': string; 'property.lineWidth': string; 'property.lineWidth.description': string; 'property.lutFilter.ad1920': string; 'property.lutFilter.ancient': string; 'property.lutFilter.bleached': string; 'property.lutFilter.bleachedblue': string; 'property.lutFilter.blues': string; 'property.lutFilter.blueshadows': string; 'property.lutFilter.breeze': string; 'property.lutFilter.celsius': string; 'property.lutFilter.chest': string; 'property.lutFilter.classic': string; 'property.lutFilter.colorful': string; 'property.lutFilter.cool': string; 'property.lutFilter.cottoncandy': string; 'property.lutFilter.creamy': string; 'property.lutFilter.eighties': string; 'property.lutFilter.elder': string; 'property.lutFilter.evening': string; 'property.lutFilter.fall': string; 'property.lutFilter.fixie': string; 'property.lutFilter.food': string; 'property.lutFilter.fridge': string; 'property.lutFilter.front': string; 'property.lutFilter.glam': string; 'property.lutFilter.gobblin': string; 'property.lutFilter.greyed': string; 'property.lutFilter.highcarb': string; 'property.lutFilter.highcontrast': string; 'property.lutFilter.k1': string; 'property.lutFilter.k2': string; 'property.lutFilter.k6': string; 'property.lutFilter.kdynamic': string; 'property.lutFilter.keen': string; 'property.lutFilter.lenin': string; 'property.lutFilter.litho': string; 'property.lutFilter.lomo': string; 'property.lutFilter.lomo100': string; 'property.lutFilter.lucid': string; 'property.lutFilter.mellow': string; 'property.lutFilter.neat': string; 'property.lutFilter.nogreen': string; 'property.lutFilter.orchid': string; 'property.lutFilter.pale': string; 'property.lutFilter.pitched': string; 'property.lutFilter.plate': string; 'property.lutFilter.pola669': string; 'property.lutFilter.polasx': string; 'property.lutFilter.pro400': string; 'property.lutFilter.quozi': string; 'property.lutFilter.sepiahigh': string; 'property.lutFilter.settled': string; 'property.lutFilter.seventies': string; 'property.lutFilter.sin': string; 'property.lutFilter.soft': string; 'property.lutFilter.steel': string; 'property.lutFilter.summer': string; 'property.lutFilter.sunset': string; 'property.lutFilter.tender': string; 'property.lutFilter.texas': string; 'property.lutFilter.twilight': string; 'property.lutFilter.winter': string; 'property.lutFilter.x400': string; 'property.lutFilterIntensity': string; 'property.opacity': string; 'property.orientation': string; 'property.orientation.description': string; 'property.orientation.flip': string; 'property.orientation.landscape': string; 'property.orientation.portrait': string; 'property.orientation.select.label': string; 'property.orientation.square': string; 'property.outlineColor': string; 'property.outlineWidth': string; 'property.paragraphSpacing': string; 'property.placeholderBehavior.description': string; 'property.placeholderBehavior.graphic.tooltip': string; 'property.placeholderBehavior.text.tooltip': string; 'property.playback.duration': string; 'property.points': string; 'property.position': string; 'property.position.description': string; 'property.sides': string; 'property.strokeColor': string; 'property.strokeColor.description': string; 'property.strokeCornerGeometry': string; 'property.strokeCornerGeometry.bevel': string; 'property.strokeCornerGeometry.description': string; 'property.strokeCornerGeometry.miter': string; 'property.strokeCornerGeometry.round': string; 'property.strokePosition': string; 'property.strokePosition.center': string; 'property.strokePosition.description': string; 'property.strokePosition.inner': string; 'property.strokePosition.outer': string; 'property.strokePositionAndCornerGeometry': string; 'property.strokePositionAndCornerGeometry.description': string; 'property.strokeStyle': string; 'property.strokeStyle.dashed': string; 'property.strokeStyle.dashedRound': string; 'property.strokeStyle.description': string; 'property.strokeStyle.dotted': string; 'property.strokeStyle.longDashed': string; 'property.strokeStyle.longDashedRound': string; 'property.strokeStyle.solid': string; 'property.strokeWidth': string; 'property.strokeWidth.description': string; 'property.textAlignment.horizontal': string; 'property.textAlignment.horizontal.autoDetect': string; 'property.textAlignment.horizontal.center': string; 'property.textAlignment.horizontal.description': string; 'property.textAlignment.horizontal.left': string; 'property.textAlignment.horizontal.right': string; 'property.textAlignment.vertical': string; 'property.textAlignment.vertical.bottom': string; 'property.textAlignment.vertical.center': string; 'property.textAlignment.vertical.top': string; 'property.textBackground': string; 'property.textBackground.cornerRadius': string; 'property.textBackground.description': string; 'property.textBackground.horizontalPadding': string; 'property.textBackground.horizontalPadding.description': string; 'property.textBackground.options.description': string; 'property.textBackground.padding': string; 'property.textBackground.padding.description': string; 'property.textBackground.verticalPadding': string; 'property.textBackground.verticalPadding.description': string; 'property.textCase': string; 'property.textCase.lowercase': string; 'property.textCase.normal': string; 'property.textCase.titlecase': string; 'property.textCase.uppercase': string; 'property.textWritingStyle': string; 'property.textWritingStyle.Block': string; 'property.textWritingStyle.Character': string; 'property.textWritingStyle.Line': string; 'property.textWritingStyle.Word': string; 'property.vector': string; 'property.volume': string; 'scope.appearance.adjustments': string; 'scope.appearance.adjustments.tooltip': string; 'scope.appearance.animations': string; 'scope.appearance.animations.tooltip': string; 'scope.appearance.blur': string; 'scope.appearance.blur.tooltip': string; 'scope.appearance.effect': string; 'scope.appearance.effect.tooltip': string; 'scope.appearance.filter': string; 'scope.appearance.filter.tooltip': string; 'scope.appearance.shadow': string; 'scope.appearance.shadow.tooltip': string; 'scope.audio.change': string; 'scope.audio.change.tooltip': string; 'scope.editor.select': string; 'scope.fill.change': string; 'scope.fill.change.graphic': string; 'scope.fill.change.graphic.tooltip': string; 'scope.fill.change.text': string; 'scope.fill.change.text.tooltip': string; 'scope.fill.change.tooltip': string; 'scope.fill.changeType': string; 'scope.fill.changeType.tooltip': string; 'scope.layer.blendMode': string; 'scope.layer.blendMode.tooltip': string; 'scope.layer.crop': string; 'scope.layer.crop.tooltip': string; 'scope.layer.flip': string; 'scope.layer.flip.tooltip': string; 'scope.layer.move': string; 'scope.layer.move.tooltip': string; 'scope.layer.opacity': string; 'scope.layer.opacity.tooltip': string; 'scope.layer.resize': string; 'scope.layer.resize.page': string; 'scope.layer.resize.tooltip': string; 'scope.layer.rotate': string; 'scope.layer.rotate.tooltip': string; 'scope.lifecycle.destroy': string; 'scope.lifecycle.destroy.tooltip': string; 'scope.lifecycle.duplicate': string; 'scope.lifecycle.duplicate.tooltip': string; 'scope.shape.change': string; 'scope.shape.change.tooltip': string; 'scope.stroke.change': string; 'scope.stroke.change.tooltip': string; 'scope.text.character': string; 'scope.text.character.tooltip': string; 'scope.text.edit': string; 'scope.text.edit.placeholder.tooltip': string; 'scope.text.edit.tooltip': string; 'settings.feature.combine': string; 'settings.feature.combine.exclude': string; 'settings.feature.combine.intersect': string; 'settings.feature.combine.subtract': string; 'settings.feature.combine.union': string; 'settings.feature.crop': string; 'settings.feature.crop.fillMode': string; 'settings.feature.crop.flip': string; 'settings.feature.crop.panel.autoOpen': string; 'settings.feature.crop.position': string; 'settings.feature.crop.rotation': string; 'settings.feature.crop.scale': string; 'settings.feature.crop.size': string; 'settings.feature.effects.adjustments': string; 'settings.feature.effects.blur': string; 'settings.feature.effects.cutout': string; 'settings.feature.effects.effects': string; 'settings.feature.effects.filters': string; 'settings.feature.fill': string; 'settings.feature.fill.color': string; 'settings.feature.fill.image': string; 'settings.feature.fill.video': string; 'settings.feature.general.animations': string; 'settings.feature.general.blendMode': string; 'settings.feature.general.delete': string; 'settings.feature.general.duplicate': string; 'settings.feature.general.opacity': string; 'settings.feature.general.preview': string; 'settings.feature.group.combine': string; 'settings.feature.group.crop': string; 'settings.feature.group.effects': string; 'settings.feature.group.fill': string; 'settings.feature.group.general': string; 'settings.feature.group.group': string; 'settings.feature.group.media': string; 'settings.feature.group.navigation': string; 'settings.feature.group.notifications': string; 'settings.feature.group.page': string; 'settings.feature.group.panels': string; 'settings.feature.group.placeholder': string; 'settings.feature.group.position': string; 'settings.feature.group.replace': string; 'settings.feature.group.scene': string; 'settings.feature.group.shadow': string; 'settings.feature.group.shape': string; 'settings.feature.group.stroke': string; 'settings.feature.group.text': string; 'settings.feature.group.transform': string; 'settings.feature.group.vectorEdit': string; 'settings.feature.group.video': string; 'settings.feature.group_feature': string; 'settings.feature.group_feature.create': string; 'settings.feature.group_feature.enter': string; 'settings.feature.group_feature.select': string; 'settings.feature.group_feature.ungroup': string; 'settings.feature.header': string; 'settings.feature.manage': string; 'settings.feature.search': string; 'settings.feature.media.playbackSpeed': string; 'settings.feature.media.trim': string; 'settings.feature.media.volume': string; 'settings.feature.navigation': string; 'settings.feature.navigation.actions': string; 'settings.feature.navigation.back': string; 'settings.feature.navigation.bar': string; 'settings.feature.navigation.close': string; 'settings.feature.navigation.undoRedo': string; 'settings.feature.navigation.zoom': string; 'settings.feature.notifications': string; 'settings.feature.notifications.redo': string; 'settings.feature.notifications.undo': string; 'settings.feature.page': string; 'settings.feature.page.add': string; 'settings.feature.page.bleedMargin': string; 'settings.feature.page.clipContent': string; 'settings.feature.page.move': string; 'settings.feature.page.resize': string; 'settings.feature.page.settings': string; 'settings.feature.panels.canvas': string; 'settings.feature.panels.canvasBar': string; 'settings.feature.panels.canvasMenu': string; 'settings.feature.panels.dock': string; 'settings.feature.panels.inspector': string; 'settings.feature.panels.inspectorBar': string; 'settings.feature.panels.inspectorToggle': string; 'settings.feature.panels.library': string; 'settings.feature.panels.rulers': string; 'settings.feature.panels.settings': string; 'settings.feature.placeholder': string; 'settings.feature.placeholder.appearance': string; 'settings.feature.placeholder.appearance.adjustments': string; 'settings.feature.placeholder.appearance.animations': string; 'settings.feature.placeholder.appearance.blur': string; 'settings.feature.placeholder.appearance.effect': string; 'settings.feature.placeholder.appearance.filter': string; 'settings.feature.placeholder.appearance.shadow': string; 'settings.feature.placeholder.arrange': string; 'settings.feature.placeholder.arrange.flip': string; 'settings.feature.placeholder.arrange.move': string; 'settings.feature.placeholder.arrange.resize': string; 'settings.feature.placeholder.arrange.rotate': string; 'settings.feature.placeholder.audio': string; 'settings.feature.placeholder.audio.change': string; 'settings.feature.placeholder.fill': string; 'settings.feature.placeholder.fill.actAsPlaceholder': string; 'settings.feature.placeholder.fill.change': string; 'settings.feature.placeholder.fill.changeType': string; 'settings.feature.placeholder.fill.crop': string; 'settings.feature.placeholder.general': string; 'settings.feature.placeholder.general.blendMode': string; 'settings.feature.placeholder.general.delete': string; 'settings.feature.placeholder.general.duplicate': string; 'settings.feature.placeholder.general.opacity': string; 'settings.feature.placeholder.shape': string; 'settings.feature.placeholder.shape.change': string; 'settings.feature.placeholder.stroke': string; 'settings.feature.placeholder.stroke.change': string; 'settings.feature.placeholder.text': string; 'settings.feature.placeholder.text.actAsPlaceholder': string; 'settings.feature.placeholder.text.character': string; 'settings.feature.placeholder.text.edit': string; 'settings.feature.position': string; 'settings.feature.position.align': string; 'settings.feature.position.arrange': string; 'settings.feature.position.distribute': string; 'settings.feature.replace': string; 'settings.feature.replace.audio': string; 'settings.feature.replace.fill': string; 'settings.feature.replace.shape': string; 'settings.feature.scene.layout': string; 'settings.feature.scene.layout.free': string; 'settings.feature.scene.layout.horizontal': string; 'settings.feature.scene.layout.vertical': string; 'settings.feature.shadow': string; 'settings.feature.shadow.blur': string; 'settings.feature.shadow.color': string; 'settings.feature.shadow.offset': string; 'settings.feature.shape.edit': string; 'settings.feature.shape.options': string; 'settings.feature.shape.options.cornerRadius': string; 'settings.feature.shape.options.innerDiameter': string; 'settings.feature.shape.options.lineWidth': string; 'settings.feature.shape.options.points': string; 'settings.feature.shape.options.sides': string; 'settings.feature.stroke': string; 'settings.feature.stroke.color': string; 'settings.feature.stroke.cornerGeometry': string; 'settings.feature.stroke.position': string; 'settings.feature.stroke.style': string; 'settings.feature.stroke.width': string; 'settings.feature.text': string; 'settings.feature.text.advanced': string; 'settings.feature.text.alignment': string; 'settings.feature.text.background': string; 'settings.feature.text.decoration': string; 'settings.feature.text.edit': string; 'settings.feature.text.fontSize': string; 'settings.feature.text.fontStyle': string; 'settings.feature.text.list': string; 'settings.feature.text.list.ordered': string; 'settings.feature.text.list.unordered': string; 'settings.feature.text.typeface': string; 'settings.feature.transform': string; 'settings.feature.transform.flip': string; 'settings.feature.transform.position': string; 'settings.feature.transform.rotation': string; 'settings.feature.transform.size': string; 'settings.feature.vectorEdit': string; 'settings.feature.vectorEdit.addMode': string; 'settings.feature.vectorEdit.bendMode': string; 'settings.feature.vectorEdit.deleteMode': string; 'settings.feature.vectorEdit.done': string; 'settings.feature.vectorEdit.mirrorMode': string; 'settings.feature.vectorEdit.moveMode': string; 'settings.feature.video': string; 'settings.feature.video.addClip': string; 'settings.feature.video.audio': string; 'settings.feature.video.caption': string; 'settings.feature.video.clips': string; 'settings.feature.video.controls': string; 'settings.feature.video.controls.background': string; 'settings.feature.video.controls.loop': string; 'settings.feature.video.controls.playback': string; 'settings.feature.video.controls.split': string; 'settings.feature.video.controls.timelineZoom': string; 'settings.feature.video.controls.toggle': string; 'settings.feature.video.overlays': string; 'settings.feature.video.timeline': string; 'settings.feature.video.timeline.ruler': string; 'typography.autoSize': string; 'typography.autoSize.abbreviation': string; 'typography.bold': string; 'typography.italic': string; 'typography.normal': string; 'typography.size': string; 'typography.sizeRange': string; 'typography.style': string; 'typography.typeface': string; 'typography.typeface.mixed.description': string; 'typography.weight.100': string; 'typography.weight.200': string; 'typography.weight.300': string; 'typography.weight.400': string; 'typography.weight.500': string; 'typography.weight.600': string; 'typography.weight.700': string; 'typography.weight.800': string; 'typography.weight.900': string; 'variables.address.label': string; 'variables.city.label': string; 'variables.company_name.label': string; 'variables.first_name.label': string; 'variables.last_name.label': string; 'warning.invalidType': string; } /** * Represents options for a button group. * * The `ButtonGroupOptions` interface provides a set of properties that control the * behavior and appearance of a button group. These options include settings for the * input label, input label position, children, and suffix. * * @public */ export declare interface ButtonGroupOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; children?: () => void; suffix?: Suffix; } /** * Represents options for a button. * * The `ButtonOptions` interface provides a set of properties that control the * behavior and appearance of a button. These options include settings for the * input label, input label position, label, label alignment, tooltip, click * handler, variant, color, size, icon, trailing icon, active state, selected state, * disabled state, loading state, loading progress, suffix, and keyboard shortcut. * * @public */ export declare interface ButtonOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; labelAlignment?: 'left' | 'center'; tooltip?: string | string[]; onClick?: () => void; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; trailingIcon?: CustomIcon; isActive?: boolean; isSelected?: boolean; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; suffix?: Suffix; /** * Keyboard shortcut to display (e.g., 'Meta+C', 'Meta+V', 'Alt+D'). * Automatically renders OS-appropriate modifiers (⌘ on macOS, Ctrl on Windows/Linux). * Hidden on small viewports. */ shortcut?: string; } /** * Represents the callback functions for various events in the Creative Editor SDK. * This interface defines functions for handling back, close, share, save, load, load archive, download, export, * upload, and unsupported browser events. * * @public * @deprecated Use the `cesdk.actions` API and the Order API instead. */ declare type Callbacks = { /** * @deprecated Use the onClick on `'ly.img.back.navigationBar'` and the Order API instead. */ onBack?: () => void | Promise; /** * @deprecated Use the onClick on `'ly.img.close.navigationBar'` and the Order API instead. */ onClose?: () => void | Promise; /** * @deprecated Use the onClick on `'ly.img.shareScene.navigationBar'` and the Order API instead. */ onShare?: (s: string) => void | Promise; /** * @deprecated Use the onClick on `'ly.img.saveScene.navigationBar'` and the Order API instead. */ onSave?: (s: string) => void | Promise; /** * @deprecated Use the onClick on `'ly.img.importScene.navigationBar'` and the Order API instead. */ onLoad?: (() => Promise) | 'upload'; /** * @deprecated Use the onClick on `'ly.img.importArchive.navigationBar'` and the Order API instead. */ onLoadArchive?: (() => Promise) | 'uploadArchive'; /** * @deprecated Use the onClick on `'ly.img.exportScene.navigationBar'` and the Order API instead. */ onDownload?: ((s: string) => void | Promise) | 'download'; /** * @deprecated Use the onClick on `'ly.img.export.navigationBar'` and the Order API instead. */ onExport?: ((blobs: Blob[], options: ExportOptions) => void | Promise) | 'download'; /** * @deprecated Use the `cesdk.actions.register('uploadFile', action)` and `engine.editor.setSetting('upload/supportedMimeTypes', ',')` instead. * Note: If you are using `addDemoAssetSources`, now you will have to explicitly enable upload sources by setting `withUploadAssetSources: true`. */ onUpload?: OnUploadCallback | 'local' | (Partial & { callback: OnUploadCallback; }); /** * @deprecated Use the `cesdk.actions.register('onUnsupportedBrowser', action)` instead. */ onUnsupportedBrowser?: () => void; }; export { Canvas } /** * Represents the ID of a canvas bar component. * * The CanvasBarComponentId type defines the possible IDs for components that can be used in the canvas bar. * It includes predefined IDs for separators, spacers, and various canvas items, as well as a catch-all type for custom IDs. * * @public */ export declare type CanvasBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.settings.canvasBar' | 'ly.img.page.add.canvasBar' | (string & {}); /** * Location options specifically for the canvas bar, which requires a position. * * @public */ export declare interface CanvasBarLocationOptions { /** Target the canvas bar. */ in: 'ly.img.canvas.bar'; /** Position within the canvas bar. Required for canvas bar operations. */ at: 'top' | 'bottom'; /** Optional context for conditional ordering. */ when?: OrderContext; } /** * Valid positions for the canvas bar: `'top'` or `'bottom'`. * @public */ declare type CanvasBarPosition = 'top' | 'bottom'; /** * @public * Base interface for action buttons in the canvas menu. * Contains common properties shared across all canvas menu button types. * * - `onClick`: Handler invoked when the button is clicked. * - `label`: Optional label for the button. * - `icon`: Optional icon name to display on the button. * - `variant`: Optional style variant of the button, either 'regular' or 'plain'. * - `isDisabled`: Optional disabled property. * - `shortcut`: Optional keyboard shortcut displayed alongside the action. */ export declare interface CanvasMenuActionButton extends OrderComponent { id: 'ly.img.flipX.canvasMenu' | 'ly.img.flipY.canvasMenu' | 'ly.img.copy.canvasMenu' | 'ly.img.paste.canvasMenu'; onClick?: () => void | Promise; label?: string; icon?: string; variant?: 'regular' | 'plain'; isDisabled?: boolean; shortcut?: string; } /** * A list of the component IDs that can be used in the canvas menu. * @public */ export declare type CanvasMenuComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.group.enter.canvasMenu' | 'ly.img.group.select.canvasMenu' | 'ly.img.page.moveUp.canvasMenu' | 'ly.img.page.moveDown.canvasMenu' | 'ly.img.text.edit.canvasMenu' | 'ly.img.replace.canvasMenu' | 'ly.img.placeholder.canvasMenu' | 'ly.img.bringForward.canvasMenu' | 'ly.img.sendBackward.canvasMenu' | 'ly.img.duplicate.canvasMenu' | 'ly.img.delete.canvasMenu' | 'ly.img.options.canvasMenu' | 'ly.img.flipX.canvasMenu' | 'ly.img.flipY.canvasMenu' | 'ly.img.copy.canvasMenu' | 'ly.img.paste.canvasMenu' | 'ly.img.text.color.canvasMenu' | 'ly.img.text.bold.canvasMenu' | 'ly.img.text.italic.canvasMenu' | 'ly.img.text.underline.canvasMenu' | 'ly.img.text.strikethrough.canvasMenu' | 'ly.img.text.variables.canvasMenu' | (string & {}); /** * @public */ export declare type CanvasMenuComponents = CanvasMenuActionButton | CanvasMenuOptionsComponent | CanvasMenuCustomActionButton; /** * @public * Interface representing a custom canvas menu action button. * Note: This component requires a key and has a required label, unlike other action buttons. */ export declare interface CanvasMenuCustomActionButton extends OrderComponent { id: 'ly.img.action.canvasMenu'; key: string; onClick: () => void | Promise; label: string; icon?: string; variant?: 'regular' | 'plain'; isDisabled?: boolean; shortcut?: string; } /** * @public * Interface representing the canvas menu options dropdown component. * This component can contain children components that are rendered in a dropdown menu. * * - `children`: Optional array of child component IDs or components to render in the dropdown. * - `icon`: Optional icon name to display on the dropdown button. * - `variant`: Optional style variant of the dropdown button, either 'regular' or 'plain'. * - `tooltip`: Optional tooltip text to display when hovering over the dropdown button. */ export declare interface CanvasMenuOptionsComponent extends OrderComponentWithChildren { id: 'ly.img.options.canvasMenu'; icon?: string; variant?: 'regular' | 'plain'; tooltip?: string; } /** * @public */ export declare type CanvasMenuOrderComponent = CanvasMenuComponents | OrderComponentWithChildren; /** * Represents the ID of a caption panel component. * * The CaptionPanelComponentId type defines the possible IDs for components that can be used in the caption panel. * It includes predefined IDs for sections, separators, spacers, and various caption panel items, as well as a catch-all type for custom IDs. * * @public */ export declare type CaptionPanelComponentId = 'ly.img.section' | 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.caption.panel.create' | 'ly.img.caption.panel.import' | 'ly.img.caption.panel.tabs' | 'ly.img.caption.panel.captions' | 'ly.img.caption.panel.add' | 'ly.img.caption.panel.presets' | (string & {}); /** * Context for the caption panel which adds view-based filtering. * * @public */ export declare interface CaptionPanelOrderContext extends OrderContext { view?: 'create' | 'edit' | 'style' | (string & {}); /** Whether to show timing information for each caption in edit view. */ showTimings?: boolean; } /** * @public * Type representing the background of a card. * - `path`: The path to the background resource. * - `type`: The type of the background resource, either 'svgVectorPath' or 'image'. */ declare type CardBackground = { path: string; type: 'svgVectorPath' | 'image'; }; /** * Represents the configuration settings for the Creative Editor SDK. * This interface defines various settings such as locale, theme, development mode, user interface, internationalization, * accessibility, callbacks, feature flags, and logger. * * @public */ export declare interface CESDKConfiguration { /** * @deprecated The `locale` property is deprecated. Please use the `setLocale()` property to configure localization. */ locale: string; /** * @deprecated The `theme` property is deprecated. Please use `ui.setTheme()` to configure theming. */ theme: ThemeConfig; devMode: boolean; ui: UserInterface; /** * @deprecated The `i18n` property is deprecated. Please use the `setTranslations()` method to configure internationalization. */ i18n: I18n; a11y: A11y; /** * @deprecated The `callbacks` property is deprecated in favor of the `cesdk.actions` API and navigation bar order APIs. */ callbacks: Callbacks; featureFlags?: _EngineConfiguration['featureFlags']; logger: _EngineConfiguration['logger']; } /** * Represents options for a checkbox. * * The `CheckboxOptions` interface provides a set of properties that control the * behavior and appearance of a checkbox. These options include settings for the * input label, input label position, value, value setter, disabled state, icon, * and suffix. * * @public */ export declare interface CheckboxOptions extends InputOptions { icon?: CustomIcon; truncateLabel?: boolean; } export { checkVideoExportSupport } export { checkVideoSupport } /** * Represents the order of children components in a dropdown. * * The `ChildrenOrder` type provides a set of values that control the order of children * components in a dropdown. These options include settings for the component ID or * order component. * * @categoryDescription ChildrenOrder * Methods for configuring the order of children components in a dropdown. * * @public */ export declare type ChildrenOrder = (ComponentId | OrderComponent)[]; /** * Represents the ID of a video clip menu component. * * The ClipContextMenuComponentId type defines the possible IDs for components that can be used in the video clip context menu. * It includes predefined IDs for separators and various clip menu items, as well as a catch-all type for custom IDs. * * @public */ export declare type ClipContextMenuComponentId = 'ly.img.separator' | 'ly.img.video.clip.menu.moveLeft' | 'ly.img.video.clip.menu.moveRight' | 'ly.img.video.clip.menu.bringForward' | 'ly.img.video.clip.menu.sendBackward' | 'ly.img.video.clip.menu.setAsOverlay' | 'ly.img.video.clip.menu.setAsClip' | 'ly.img.video.clip.menu.mute' | 'ly.img.video.clip.menu.trim' | 'ly.img.video.clip.menu.caption.merge' | 'ly.img.video.clip.menu.caption.add' | 'ly.img.video.clip.menu.replace' | 'ly.img.video.clip.menu.placeholder' | 'ly.img.video.clip.menu.duplicate' | 'ly.img.video.clip.menu.delete' | 'ly.img.video.clip.menu.action' | (string & {}); /** * Interface representing a generic custom action in the clip context menu. * Requires a `key` to uniquely identify the action and a `label` for display. * * @public */ export declare interface ClipContextMenuCustomAction extends OrderComponent { id: 'ly.img.video.clip.menu.action'; key: string; onClick: () => void | Promise; label: string; icon?: string; isDisabled?: boolean; } export { CMYK } export { CMYKColor } /** * Represents options for a color input. * * The `ColorInputOptions` interface provides a set of properties that control the * behavior and appearance of a color input. These options include settings for the * input label, input label position, value, value setter, disabled state, label, and suffix. * * @public */ export declare interface ColorInputOptions extends InputOptions { label?: string | string[]; } export { ColorSpace } /** * Represents the combined configuration for the Creative Editor SDK. * This type combines the `CESDKConfiguration` with the `EngineConfiguration` while omitting the `presets` key. * * @public */ declare type CombinedConfiguration = CESDKConfiguration & Omit<_EngineConfiguration, 'presets'>; export { CompleteAssetResult } /** * A glob pattern for matching component IDs. * * Examples: * - `'ly.img.*'` matches all ly.img components * - `'*.separator'` matches all separator components * * @public */ export declare type ComponentGlobPattern = `${string}*` | `*${string}` | `*${string}*`; /** * Represents the ID of a component. * * The ComponentId type defines the possible IDs for components that can be used in the editor. * It includes predefined IDs for separators, spacers and various component types. * * @public */ export declare type ComponentId = DockOrderComponentId | CanvasMenuComponentId | NavigationBarComponentId | CanvasBarComponentId | InspectorBarComponentId | CaptionPanelComponentId | ClipContextMenuComponentId; /** * Maps UI areas to their component ID types. * * @public */ export declare type ComponentIdFor = { 'ly.img.dock': DockOrderComponentId; 'ly.img.inspector.bar': InspectorBarComponentId; 'ly.img.canvas.menu': CanvasMenuComponentId; 'ly.img.navigation.bar': NavigationBarComponentId; 'ly.img.canvas.bar': CanvasBarComponentId; 'ly.img.caption.panel': CaptionPanelComponentId; 'ly.img.video.clip.menu': ClipContextMenuComponentId; }[A]; /** * Unified component matcher type supporting all matching strategies. * * - `'first'` / `'last'` - Match first or last component * - `number` - Match by index (0, 1, -1, etc.) * - `C['id']` - Match by exact ID (with autocomplete for known IDs) * - `ComponentGlobPattern` - Match by glob pattern (e.g., `'ly.img.*'`) * - `Partial` - Match by partial properties (e.g., `{ id: 'x', key: 'y' }`) * - `(component, index) => boolean` - Custom predicate function * * @public */ export declare type ComponentMatcher = 'first' | 'last' | number | C['id'] | ComponentGlobPattern | Partial | ((component: C, index: number) => boolean); /** * Options for update and remove operations. * Supports multi-area operations via arrays or glob patterns. * * @public */ export declare interface ComponentMatchOptions { /** The UI area(s) to operate on. Can be a single area, array, or glob pattern. */ in: A; /** The matcher to find components. Autocomplete is area-specific when targeting a single area. */ match: ComponentMatcher>; /** Optional context filter. */ when?: InferOrderContext; /** * Position filter. For canvas bar: `'top'` or `'bottom'`. For dock: `'left'`, `'right'`, or `'bottom'`. * If omitted, the operation applies to all positions. */ at?: A extends 'ly.img.canvas.bar' ? 'top' | 'bottom' : A extends 'ly.img.dock' ? DockPosition : A extends UIArea ? never : 'top' | 'bottom' | DockPosition; } /** * Represents options for a component. * * The `ComponentOptions` interface provides a set of properties that control the * behavior and appearance of a component. These options include settings for the * component ID, payload, and focusable state. * * @public */ export declare interface ComponentOptions { /** * The unique identifier for the registered component. */ componentId: string; /** * Optional payload to pass to the component. */ payload?: any; /** * Whether the component should be focusable (default: true) */ focusable?: boolean; } /** * Represents the payload of a component. * * The ComponentPayload interface defines the structure of the payload that can be associated with a component. * It includes a catch-all type for custom payloads. * * @public */ export declare interface ComponentPayload { [key: string]: unknown; } /** * Specifies a component either by ID or as a full component object. * * @public */ export declare type ComponentSpec = ComponentIdFor | OrderComponentFor; /** * Specifies one or more components for insertion. * * @public */ export declare type ComponentSpecOrArray = ComponentSpec | ComponentSpec[]; export { CompressionFormat_2 as CompressionFormat } export { CompressionLevel } declare namespace ConfigTypes { export { CombinedConfiguration, CESDKConfiguration, Theme, ThemeFn, ThemeConfig, Scale, ScaleFn, ScaleConfig, I18n, A11y, UploadCallbackContext, OnUploadCallback, OnUploadOptions, Callbacks, PageFormatDefinition, BleedMarginOptions, FontSizeOptions, UIOptionsForSingleDesignUnit, UIOptionsPerDesignUnit, ViewStyle } } export { ConfigTypes } /** * Represents the user-provided configuration for the Creative Editor SDK. * This type allows for partial configuration settings, making all properties optional. * * @public * * @privateRemarks * The config provided by the user has different types regarding what is * optional and what mandatory. This is Configuration, but `ui` is recursively * optional, and all other props are non-recursively optional */ export declare type Configuration = Partial; export { ContentFillMode } /** * Action function for copying selected blocks to the clipboard * @public */ export declare type CopyAction = () => void | Promise; export { CreateSceneOptions } /** * The main entry point for the Creative Editor SDK. * * This class provides a comprehensive interface for creating, configuring, and managing * creative editing experiences using our ready-made editor. The SDK can be configured to * serve a multitude of use cases, offering a wide range of features such as asset management, * scene creation, export operations, and plugin management. * * ## Categories * @categoryDescription Members * Instance members that allow access to the underlying engine, user interface, and configuration APIs. * @categoryDescription Asset Management * Methods for registering, managing, and refreshing asset sources including default assets, * demo assets, and custom asset libraries. * @categoryDescription Scene Creation * Methods for creating new scenes from scratch, including design scenes, video scenes, * and scenes from existing images. * @categoryDescription Scene Loading * Methods for loading existing scenes from various sources including strings, URLs, * and encoded scene data. * @categoryDescription Scene Saving * Methods for persisting and exporting scene data as strings or files. * @categoryDescription Export Operations * Methods for exporting scenes and pages as files in various formats and mimeTypes. * @categoryDescription Configuration * Methods for configuring SDK behavior, translations, and runtime settings. * @categoryDescription Plugin Management * Methods for extending SDK functionality through plugins and custom integrations. * @categoryDescription Upload Operations * Methods for handling file uploads and asset creation from user-provided files. * @categoryDescription Lifecycle Management * Methods for SDK initialization, cleanup, and resource management. * * @public */ declare class CreativeEditorSDK { #private; /** * The version of the CE.SDK package. * @category Members */ static readonly version: string; static ui: { addIconSet(id: string, svgSprite: string): void; setComponentOrder(_options: { in: 'ly.img.loading'; }, order: LoadingOrder): void; setTheme(theme: ThemeConfig): void; }; static i18n: { setTranslations(definition: Partial>>): void; }; /** * Access to the CreativeEngine instance that powers the editor. * @category Members */ engine: CreativeEngine_2; /** * Access to the {@link UserInterfaceAPI} for controlling the editor's user interface * @category Members */ ui: UserInterfaceAPI; /** * Access to the {@link InternationalizationAPI} to control locale and translations * @category Members */ i18n: InternationalizationAPI; /** * Access to the {@link FeatureAPI} to control feature availability * @category Members * */ feature: FeatureAPI; /** * Access to the {@link ActionsAPI} to control event actions * @category Members */ actions: ActionsAPI; /** * Access to the {@link UtilsAPI} for utility functions * @category Members */ utils: UtilsAPI; /** * The version of the Creative Editor SDK * @category Members */ version: string; /** * Registers a callback function to be executed when resetEditor is called. * * @param callback - Function to be called with the cesdk instance when reset occurs * @returns Function to remove the callback from the registry * * @example * ```typescript * const removeCallback = cesdk.onReset((cesdk) => { * console.log('Editor is being reset'); * // Custom cleanup/reinitialization logic * }); * * // Later, to remove the callback: * removeCallback(); * ``` * * @category Configuration * @public */ onReset(callback: (cesdk: CreativeEditorSDK) => void): () => void; /** * Convenience function to register a set of our default asset sources. * * The sources contain our example assets. These are: * * - `'ly.img.sticker'` - Various stickers * - `'ly.img.vector.shape'` - Shapes and arrows * - `'ly.img.filter'` - Filter effects (LUT and duotone) * * These assets are parsed at `\{\{base_url\}\}//content.json`, where * `baseURL` defaults to the IMG.LY CDN. * Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available * assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation. * * @deprecated This method uses legacy v4 asset source IDs and will be removed in a future version. * Please migrate to v5 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). * @category Asset Management * @param options - Configuration options for asset sources. Contains `baseURL` (defaults to IMG.LY CDN) and `excludeAssetSourceIds` (IDs to ignore during load). */ addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: { baseURL?: string; excludeAssetSourceIds?: DefaultAssetSourceId[]; }): Promise; /** * Convenience function that registers a set of demo asset sources * * These contain our example assets. These are not to meant to be used in your production code. * * These are * * - `'ly.img.image'` - Sample images * - `'ly.img.image.upload'` - Demo source to upload image assets * - `'ly.img.audio'` - Sample audios * - `'ly.img.audio.upload'` - Demo source to upload audio assets * - `'ly.img.video'` - Sample videos * - `'ly.img.video.upload'` - Demo source to upload video assets * * @deprecated This method uses legacy v3 demo asset source IDs and will be removed in a future version. * Please migrate to v4 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). * @category Asset Management * @param options - Configuration options for asset sources. Contains `baseURL` (defaults to IMG.LY CDN), `excludeAssetSourceIds` (IDs to ignore during load), and `sceneMode` (loads video-specific sources if 'Video'). */ addDemoAssetSources({ baseURL, excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: { baseURL?: string; excludeAssetSourceIds?: DemoAssetSourceId[]; sceneMode?: SceneMode; withUploadAssetSources?: boolean; }): Promise; /** * Exports one or multiple page(s) as an file in the given mimeType * * Please note: the `onExport` callback provided in the configuration will be * not called. This callback is for exports triggered by an user interaction. * * @category Export Operations * @param options - options for the export * * @returns a promise with an object holding `blobs` of the export pages and the provided `options`. */ export(options: ExportOptions): Promise<{ blobs: Blob[]; options: ExportOptions; }>; /** * Create a scene with a single empty page with the given format. * @deprecated Use `cesdk.actions.run('scene.create', { mode: 'Design' })` instead. * @category Scene Creation * @param format - A `PageFormatDefinition` object specifying the page format to use. */ createDesignScene(format?: PageFormatDefinition): Promise; /** * Create a scene with a single empty page with the given format. * @deprecated Use `cesdk.actions.run('scene.create', { mode: 'Video' })` instead. * @category Scene Creation * @param format - The page format to use. Can be either a string, identifying * a page format that has been configured or a `PageFormatDefinition` object. */ createVideoScene(format?: PageFormatDefinition): Promise; /** * Load an encoded scene from the provided string. * @deprecated Use `loadFromString` instead. * @category Scene Loading * @param scene - A string starting with UBQ1 and containing the encoded scene. */ load(scene: string): Promise; /** * Load an encoded scene from the provided string. * @category Scene Loading * @param scene - A string starting with UBQ1 and containing the encoded scene. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromString(scene: string, overrideEditorConfig?: boolean): Promise; /** * Load the scene stored in the file at the given URL. * @category Scene Loading * @param url - The url to fetch to acquire the scene string. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromURL(url: string, overrideEditorConfig?: boolean): Promise; /** * Load a previously archived scene from the URL to the scene file. * @category Scene Loading * @param url - The URL of the scene archive file. * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false. * @returns a promise which resolves if the scene was successfully loaded. */ loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise; /** * Loads the given image and creates a scene with a single page showing the image. * * Fetching the image may take an arbitrary amount of time, so the scene isn't immediately available. * * @category Scene Creation * @param url - The image URL. * @param dpi - The scene's DPI. Defaults to 300. * @param pixelScaleFactor - The display's pixel scale factor. Defaults to 1. * @param sceneLayout - The layout of the scene. Defaults to 'Free'. * @param spacing - Spacing between pages. Defaults to 0. * @param spacingInScreenSpace - Whether spacing is in screen space. Defaults to false. * @returns a promise which resolves if the scene was successfully created. */ createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean): Promise; /** * Create a scene from the provided video. * @category Scene Creation * @param url - The url of the video * @returns a promise which resolves if the scene was successfully created. */ createFromVideo(url: string): Promise; /** * Disable the warning logged when no scene is available. * * If no scene is available, 2 seconds after `CreativeEditorSDK.create()`, * a warning is shown on the console. This method disables this warning. * That can be useful in situation where you are waiting for long running * async processes to finish before creating the scene. * @category Configuration */ disableNoSceneWarning(): void; /** * Returns the baseURL that was provided in the configuration during editor initialization. * * @returns The original baseURL from the top-level configuration * * @example * ```typescript * const cesdk = await CreativeEditorSDK.create('#editor', { * baseURL: 'https://my-cdn.example.com/assets/' * }); * * console.log(cesdk.getBaseURL()); // 'https://my-cdn.example.com/assets/' * ``` */ getBaseURL(): string; /** * Resets the editor to a clean state by disabling all features, clearing UI configurations, * and removing asset sources. * * @example * ```typescript * // Reset the editor to clean state * cesdk.resetEditor(); * * // Reconfigure as needed * cesdk.feature.enable('ly.img.navigation.bar'); * cesdk.addPlugin(new TypefaceAssetSource()); * ``` * * @category Configuration */ resetEditor(): void; /** * Re-applies the user's initial deprecated configuration that was passed to * `CreativeEditorSDK.create()`. This restores deprecated configuration * values that may have been cleared by `resetEditor()`. * * Config plugins should call this as the last step of their `initialize()` * method, after all features, UI, actions, and settings have been set up. * * @deprecated This method is an intermediate measure to preserve backward * compatibility while users migrate away from deprecated configuration * options. It will be removed once the deprecated configuration paths * are fully dropped. * * @category Configuration */ reapplyLegacyUserConfiguration(): void; /** * Save and return a scene as a base64 encoded string. * * @category Scene Saving * @returns a promise with the scene as a string */ save(): Promise; /** * Adds translations to be used by the editor. * * @deprecated Use `cesdk.i18n.setTranslations()` instead. This method will be removed in a future version. * @category Configuration * @param definition - locale to a translation object * * @example * ``` * // Deprecated - do not use * cesdk.setTranslations({...}); * * // Use this instead * cesdk.i18n.setTranslations({ * en: { * presets: { * scene: ... * } * } * }) * ``` */ setTranslations(definition: Partial>>): void; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_switchPage(pageId: number): Promise; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_getPages(): Promise; /** * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_onActivePageChanged(callback: (id: number) => void): () => void; /** * Focus on a specific page and zoom to fit it in the viewport. * @param pageId - The ID of the page to focus on * @returns A promise that resolves when the focus operation is complete * @category Page Management * @experimental This API is experimental and may change or be removed in future versions. */ unstable_focusPage(pageId: number): Promise; /** * Adds and initializes a plugin to the editor. * @category Plugin Management */ addPlugin(plugin: EditorPlugin): Promise; /** * Returns true if a upload handler was configured. If mime types are given * as an argument, it will return true if the upload handler supports all of * the given mime types. * @category Upload Operations * @experimental This API is experimental and may change or be removed in future versions. * @deprecated This API will be removed in future versions. Please use the `engine.editor.getSetting('upload/supportedMimeTypes')` to check for supported mime types instead. */ unstable_supportsUpload(mimeTypes?: string | string[]): boolean; /** * Uses the configured upload handler to upload the given file. * * @category Upload Operations * @param file - The file to upload * @param onProgress - A callback to track the progress of the upload * @experimental This API is experimental and may change or be removed in future versions. * @deprecated This API will be removed in future versions. Please use the `uploadFile` action instead. */ unstable_upload(file: File, onProgress: (progress: number) => void): Promise; /** * Trigger a refetch of the asset source and update the asset library panel with the new items accordingly. * * @param sourceId - The ID or IDs of the asset sources to refetch. If not provided, all asset sources will be refetched. * * @deprecated Please use `cesdk.engine.asset.assetSourceContentsChanged` instead. * @category Asset Management */ refetchAssetSources(sourceId?: string | string[]): void; /** * Disposes the editor and engine if no longer needed. * @category Lifecycle Management */ dispose(): void; /** * @deprecated After being deprecated for over a year, the `init()` method has been removed. * Please use `CreativeEditorSDK.create()` instead. For more information see https://img.ly/docs/cesdk/introduction/migration_1_13/. * CreativeEditorSDK will now attempt to pass the configuration to `CreativeEditorSDK.create()` and continue the initialization process. */ private static init; /** * Creates an editor and renders it for the given container. * * This method gives you more control over the initialization process of the * editor. After the returned Promise resolves, you can execute configuration * commands on the CreativeEditorSDK instance. Once that is done, you can * load or create an initial scene. Until then the CreativeEditorSDK will * display a loading spinner * * @category Lifecycle Management * @param container - the container to mount the editor as a HTML element or selector * @param config - the initial configuration to create the editor * * @returns a promise which resolves after the engine is ready to receive further commands on the CreativeEditorSDK instance */ static create(container: HTMLDivElement | string, config?: Configuration): Promise; } export default CreativeEditorSDK; export { CreativeEngine } /** * A generic action function type for custom actions. * Supports both synchronous and asynchronous implementations with flexible parameters. * * @param args - Variable number of arguments of any type * @returns Any value or a promise that resolves to any value * @public */ export declare type CustomActionFunction = (...args: any[]) => any | Promise; /** * @public * Type representing the background of a custom card, which can be either an image or an SVG vector path. */ declare type CustomCardBackground = CustomCardImageBackground | CustomCardSvgVectorPathBackground; /** * @public * Type representing an image background for a custom card. * - `url`: The URL of the image. * - `type`: The type of the background, which is 'image'. */ declare type CustomCardImageBackground = { url: string; type: 'image'; }; /** * @public * Type representing an SVG vector path background for a custom card. * - `type`: The type of the background, which is 'svgVectorPath'. * - `viewBox`: The viewBox attribute for the SVG. * - `width`: Optional width of the SVG. * - `height`: Optional height of the SVG. * - `d`: The path data for the SVG. * - `stroke`: Optional stroke color for the SVG. * - `strokeWidth`: Optional stroke width for the SVG. * - `strokeLinecap`: Optional stroke line cap for the SVG. * - `strokeLinejoin`: Optional stroke line join for the SVG. * - `strokeDasharray`: Optional stroke dash array for the SVG. * - `strokeDashoffset`: Optional stroke dash offset for the SVG. * - `opacity`: Optional opacity for the SVG. * - `clipPath`: Optional clip path for the SVG. * - `fill`: Optional fill color for the SVG. * - `fillRule`: Optional fill rule for the SVG. * - `clipRule`: Optional clip rule for the SVG. */ declare type CustomCardSvgVectorPathBackground = { type: 'svgVectorPath'; viewBox: string; width?: string | number; height?: string | number; d: string; stroke?: string; strokeWidth?: number | string; strokeLinecap?: 'butt' | 'round' | 'square'; strokeLinejoin?: 'miter' | 'round' | 'bevel'; strokeDasharray?: string; strokeDashoffset?: number | string; opacity?: number | string; clipPath?: string; fill?: string; fillRule?: 'nonzero' | 'evenodd'; clipRule?: 'nonzero' | 'evenodd'; }; /** * Represents a custom dock component. * * The CustomDockComponent interface defines the structure of a custom dock component. * It includes properties for the ID and payload. * * @public */ export declare interface CustomDockComponent extends ComponentPayload { id: DockOrderComponentId; } /** * @public * Type representing a custom icon, which can be a string or a function. * - If a string, it represents the name of the icon. * - If a function, it takes an object with `theme` and `iconSize` properties and returns a string representing the icon. */ declare type CustomIcon = string | (({ theme, iconSize }: { theme: 'light' | 'dark'; iconSize: 'normal' | 'large'; }) => string); declare interface CustomPanel { id: string; onMount: CustomPanelMountFunction; } /** * Represents a function that mounts a custom panel. * * The `CustomPanelMountFunction` type provides a function that mounts a custom panel to a * specified HTMLDivElement. The function returns a `PanelDisposer` function that disposes * of the panel when called. * * @categoryDescription CustomPanelMountFunction * Methods for mounting and disposing of custom panels. * * @public */ export declare type CustomPanelMountFunction = (domElement: HTMLDivElement) => PanelDisposer; export { CutoutOperation } export { CutoutType } export { DefaultAssetSourceId } declare type DefaultFeaturePredicate = boolean | ((context: Omit) => boolean); /** * Action function for deleting an asset from an asset source. * * The default implementation opens a confirmation dialog and, on confirm, * calls `engine.asset.removeAssetFromSource(sourceId, asset.id)` followed by * `engine.asset.assetSourceContentsChanged(sourceId)`. Register a custom * implementation to replace the dialog content, swap in a custom dialog, or * change the deletion behavior entirely. The asset and its source id are * provided so handlers can derive per-asset context (e.g. metadata, page * number) for their custom UI. * * @param params - The asset to delete and the id of its source * @returns A promise that resolves when the delete operation is complete, or void for synchronous operations * @public */ export declare type DeleteAssetAction = (params: { sourceId: string; asset: AssetResult; }) => void | Promise; export { DemoAssetSourceId } export { DesignBlockId } export { DesignBlockType } export { DesignBlockTypeLonghand } export { DesignBlockTypeShorthand } export { DesignUnit } /** * Represents a dialog configuration. * * The Dialog interface defines the structure of a dialog configuration within the Creative Editor SDK. * It includes properties for the type, size, content, progress, actions, cancel action, onClose callback, * and whether clicking outside the dialog should close it. This interface provides a comprehensive way to * define and manage dialogs, allowing for flexibility in how they are presented and interacted with by users. * * @public */ export declare interface Dialog { type?: DialogType; size?: DialogSize; backdrop?: DialogBackdrop; content: DialogContent; progress?: DialogProgress; actions?: DialogAction | DialogAction[]; cancel?: DialogAction; onClose?: () => void; clickOutsideToClose?: boolean; } /** * Represents an action in the dialog. * * The DialogAction type defines the structure of an action that can be performed within a dialog. * It includes properties for the variant, color, label, and a callback function to handle the action * when clicked, providing flexibility in how user interactions are managed. * * @public */ export declare type DialogAction = { variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; label: string; onClick: (context: { id: string; }) => void; }; /** * Represents the backdrop style for the dialog. * * The DialogBackdrop type defines how the background overlay is rendered when a dialog is shown. * - 'transparent': A semi-transparent overlay that allows content behind to be partially visible (default behavior) * - 'opaque': A fully opaque overlay that completely blocks the view of content behind the dialog * * @public */ export declare type DialogBackdrop = 'transparent' | 'opaque'; /** * Represents the content of the dialog. * * The DialogContent type defines the structure of the content that can be displayed within a dialog. * It can be a simple string or an object containing a title and a message, providing flexibility in * how information is presented to users. * * @public */ export declare type DialogContent = string | { title?: string; message: string | string[]; }; /** * Represents the progress of the dialog. * * The DialogProgress type defines the structure of the progress indicator that can be displayed within a dialog. * It can be a number, 'indeterminate', or an object containing a value and a max, providing flexibility in * how progress is indicated to users. * * @public */ export declare type DialogProgress = number | 'indeterminate' | { value: number; max: number; }; /** * Represents the size of the dialog. * * The DialogSize enum defines the possible sizes for dialogs within the Creative Editor SDK. * Each size corresponds to a different dimension, allowing for flexibility in how dialogs are * displayed to users. * * @public */ export declare type DialogSize = 'regular' | 'large'; /** * Represents the type of dialog. * * The DialogType enum defines the various types of dialogs that can be created * within the Creative Editor SDK. Each type corresponds to a different visual * style and behavior, allowing for flexibility in how dialogs are presented to * users. * * @public */ export declare type DialogType = 'regular' | 'success' | 'error' | 'info' | 'warning' | 'loading'; declare type DialogWithId = Dialog & { id: string; }; /** * Location options specifically for the dock, which supports an optional position. * * @public */ export declare interface DockLocationOptions { /** Target the dock. */ in: 'ly.img.dock'; /** Position of the dock. For set/insert, defaults to `'left'`. For get, omitting returns all positions. */ at?: DockPosition; /** Optional context for conditional ordering. */ when?: OrderContext; } /** * Represents a dock order component. * * The DockOrderComponent type defines the possible structures for a dock order component. * It includes predefined structures for custom dock components and asset library dock components. * * @public */ export declare type DockOrderComponent = CustomDockComponent | AssetLibraryDockComponent; /** * Represents the ID of a dock order component. * * The DockOrderComponentId type defines the possible IDs for components that can be used in the dock order. * It includes predefined IDs for separators and spacers, as well as a catch-all type for custom IDs. * * @public */ export declare type DockOrderComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.assetLibrary.dock' | (string & {}); /** * Valid positions for the dock: `'left'`, `'right'`, or `'bottom'`. * @public */ export declare type DockPosition = 'left' | 'right' | 'bottom'; export { DominantColor } export { DominantColorsOptions } /** * Represents the context for the children of a dropdown. * * The `DropdownChildrenContext` interface provides a set of properties that describe * the context for the children of a dropdown. These options include settings for the * close function. * * @public */ export declare interface DropdownChildrenContext { close: () => void; } /** * Represents options for a dropdown. * * The `DropdownOptions` interface provides a set of properties that control the * behavior and appearance of a dropdown. These options include settings for the * input label, input label position, label, tooltip, variant, color, size, icon, * disabled state, loading state, loading progress, children, and suffix. * * @public */ export declare interface DropdownOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; tooltip?: string | string[]; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; isActive?: boolean; activeStateStyle?: 'outline' | 'pill' | 'none'; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; children?: ((context: DropdownChildrenContext) => void) | ChildrenOrder; suffix?: Suffix; /** * Whether to show the expand indicator icons (triangle up/down). * @default true */ showIndicator?: boolean; } export { DropShadowOptions } export { EditMode } export { EditorAPI } /** * Action for checking browser capabilities at editor startup. * Idempotent: only runs checks once per editor lifetime. * * When called with explicit params, uses them directly (no scene needed). * When called without params, reads scene mode for defaults. * * @public */ export declare type EditorCheckBrowserSupportAction = (params?: { videoDecode?: UnsupportedCapabilityBehavior; videoEncode?: UnsupportedCapabilityBehavior; }) => Promise; /** * Represents an editor plugin. * This interface defines the structure of an editor plugin, including its name, version, and initialization function. * * @public */ export declare interface EditorPlugin { name: string; version: string; initialize: (context: EditorPluginContext) => void | Promise; } /** * Represents the context for an editor plugin. * This type extends the `EnginePluginContext` with an optional `cesdk` property. * * @public */ export declare type EditorPluginContext = EnginePluginContext & { cesdk?: CreativeEditorSDK; }; export { EffectType } export { EffectTypeLonghand } export { EffectTypeShorthand } export { _EngineConfiguration } export { EngineExportOptions } export { EnginePlugin } export { EnginePluginContext } export { EventAPI } /** * Namespace containing experimental features for the builder. * These features are subject to change and may not be stable for production use. * @public */ export declare namespace ExperimentalBuilder { /** * @public */ export interface BuilderRenderContext { builder: Builder; /** * Global state object that can be used to store and retrieve values. * * It will take a unique identifier for this state that can be used * to access this store later. * * ``` * const { value, setValue } = global('unique-id', 'default-value'); * ``` * * If no default value is set, the `value` property may be undefined * if no value was set before: * * ``` * const { value, setValue } = global('unique-id', 'default-value'); * ``` * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ global: { /** * State object that can be used to store and retrieve a value. If * no values are stored, the default value will be returned. * * @param id - The unique identifier for the state. * @param defaultValue - The default value for the state. */ (id: string, defaultValue: T): { /** * The current value of this state. If no value was set, the default * value will be returned. * * @returns The new value or the default value. */ value: T; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; /** * State object that can be used to store and retrieve a value. * If no value was set, the value will be `undefined`. * * @param id - The unique identifier for the state. */ (id: string): { value: T | undefined; /** * Setting the value of this state. Subsequent calls to `value` will return * this value. This will also cause the render function to rerender if the * `value` was used. * * @param value - The new value to set. */ setValue: (value: T) => void; }; }; } /** * @public */ export interface PopoverChildrenContext { close: () => void; } /** * @public */ export type Placement = 'top' | 'bottom' | 'right' | 'left' | 'auto' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end'; /** * @public */ export interface PopoverOptions { inputLabel?: string | string[]; inputLabelPosition?: 'top' | 'left'; label?: string | string[]; labelAlignment?: 'left' | 'center'; tooltip?: string | string[]; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; size?: 'normal' | 'large'; icon?: CustomIcon; trailingIcon?: CustomIcon | null; isActive?: boolean; isSelected?: boolean; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; placement?: Placement; children?: ((context: PopoverChildrenContext) => void) | ChildrenOrder; suffix?: Suffix; } export interface MenuOptions { children?: () => void; } export interface ButtonRowOptions { children?: () => void; justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'; } /** * @public */ export type PreviewTypeImage = { type: 'image'; uri: string; checkeredBackground?: boolean; fillType?: 'cover' | 'contain'; fillPosition?: 'center' | 'top' | 'right' | 'bottom' | 'left'; }; /** * @public */ export type PreviewTypeColor = { type: 'color'; color: string; }; /** * @public */ export type PreviewType = PreviewTypeImage | PreviewTypeColor; /** * @public */ export interface MediaPreviewOptions { size?: 'small' | 'medium' | 'square'; preview?: PreviewType; action?: ButtonOptions; } /** * Interface for all available builder. Depending on the context different * implementation might be used. A "Button" in the canvas menu might render * different component than a button in the topbar or a panel. * @public */ export interface Builder { Menu: (id: string, options: MenuOptions) => void; Popover: (id: string, options: PopoverOptions) => void; ButtonRow: (id: string, options: ButtonRowOptions) => void; MediaPreview: (id: string, options: MediaPreviewOptions) => void; } } /** * Provides experimental methods for controlling the UI of the Creative Editor SDK. * * The `Experimental` namespace contains classes and methods that are subject to change * and are not guaranteed to be stable across different versions of the SDK. These methods * offer advanced functionality that may not be suitable for all use cases but can be * useful for developers who need more control over the editor's behavior. * * @public */ export declare namespace ExperimentalUserInterfaceAPI { /** * A public interface for controlling the UI of the Creative Editor SDK * * @public */ export class UserInterfaceAPI { #private; /** * @public */ setGlobalStateValue(id: string, value: T): void; /** * @public */ getGlobalStateValue(id: string, defaultValue?: T): T; /** * @public */ hasGlobalStateValue(id: string): boolean; /** * @public */ onGlobalStateChanged(id: string, callback: (value: T) => void): () => void; } } /** * Action function for handling export operations. * Can be called with or without options to customize the export behavior. * Supports both standard and video export workflows through a generic type parameter. * The return type is automatically inferred based on the input options type. * * @param options - Optional export configuration for standard or video exports * @returns A promise that resolves when the export operation is complete, or void for synchronous operations * @public */ export declare type ExportAction = (options?: EngineExportOptions | VideoExportOptions) => void | Promise; /** * @public * Type representing the export format. * - `image/png`: PNG image format. * - `video/mp4`: MP4 video format. * - `application/pdf`: PDF document format. */ declare type ExportFormat = 'image/png' | 'video/mp4' | 'application/pdf'; /** * Specifies options for exporting design blocks to various formats. * * The `ExportOptions` interface provides a set of properties that control the * behavior and quality of the exported content. These options include settings * for JPEG, WebP, PNG, and PDF exports, as well as options for resizing and * adding underlayers. * * @public */ export declare interface ExportOptions extends Pick { /** The mime type of the exported blob */ mimeType: MimeType_2; /** The pages to export with the selected page as the default */ pages?: number[]; } /** * Action function for handling scene export operations. * * @param options - Options for configuring the export operation * - options.format: The format of the exported scene data. * - options.scene: The scene data to export. * @returns A promise that resolves when the export operation is complete, or void for synchronous operations * @public */ export declare type ExportSceneAction = (options: { format: 'scene' | 'archive'; }) => void | Promise; /** * Controls the availability of features within the Creative Editor SDK. * * The FeatureAPI allows you to enable or disable specific functionality * within the editor based on custom conditions or user permissions. * * ## Understanding the Feature System * * The feature system uses a **predicate chain** to determine if a feature is enabled. * There are two types of predicates: * * 1. **Boolean predicates** (e.g., `true` or `false`) - These are **always terminal** and immediately return their value. * 2. **Function predicates** - The implementation decides whether to call `isPreviousEnable()` (continue chain) or return directly (end chain). * * ### Evaluation Order * * Predicates are evaluated in this order: * 1. **`set()` predicates** (most recent first) - Evaluated **FIRST** * 2. **`enable()`/`disable()` state** - Evaluated **LAST** * * This means **`set()` can override `enable()` and `disable()`**. * * ## Common Use Cases and Expected Outcomes * * ### Use Case 1: Simple Enable/Disable * * **Use `enable()` and `disable()` for simple on/off control:** * * ```typescript * // Enable a feature with its default behavior * cesdk.feature.enable('ly.img.delete'); * // isEnabled: true * * // Disable it * cesdk.feature.disable('ly.img.delete'); * // isEnabled: false * * // Re-enable it * cesdk.feature.enable('ly.img.delete'); * // isEnabled: true * ``` * * **Expected outcome:** `enable()` and `disable()` work together to toggle features on/off. * * ### Use Case 2: Custom Conditions with `set()` * * **Use `set()` when you need custom logic:** * * ```typescript * // Enable delete only when something is selected * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * // isEnabled: depends on selection * * // Now calling disable() won't work because set() is evaluated first! * cesdk.feature.disable('ly.img.delete'); * // isEnabled: still depends on selection (disable is ignored) * ``` * * **Expected outcome:** `set()` function predicates are evaluated before `disable()`, * so `disable()` has no effect when a `set()` predicate exists. * * ### Use Case 3: Terminal Boolean Predicates * * **Boolean predicates are terminal - they stop the chain:** * * ```typescript * cesdk.feature.enable('ly.img.delete'); // Default predicate: true * cesdk.feature.set('ly.img.delete', false); // Adds false to front * // Chain: [set(false), enable(true)] * // Evaluation: false (stops here, never reaches enable) * // isEnabled: false * * cesdk.feature.set('ly.img.delete', true); // Adds true to front * // Chain: [set(true), set(false), enable(true)] * // Evaluation: true (stops here, never reaches the rest) * // isEnabled: true * ``` * * **Expected outcome:** The most recent `set()` call with a boolean wins because * boolean predicates are terminal. * * ### Use Case 4: Layering Conditions with Functions * * **Function predicates can check previous conditions:** * * ```typescript * // Base: Feature enabled by default * cesdk.feature.enable('ly.img.delete'); * * // Layer 1: Add selection requirement * cesdk.feature.set('ly.img.delete', ({ isPreviousEnable, engine }) => { * const baseEnabled = isPreviousEnable(); // Checks enable(true) * const hasSelection = engine.block.findAllSelected().length > 0; * return baseEnabled && hasSelection; * }); * // isEnabled: true only if enabled AND has selection * * // Layer 2: Add block type requirement * cesdk.feature.set('ly.img.delete', ({ isPreviousEnable, engine }) => { * const previousEnabled = isPreviousEnable(); // Checks Layer 1 * const [selected] = engine.block.findAllSelected(); * const isText = selected != null && engine.block.getType(selected) === '//ly.img.ubq/text'; * return previousEnabled && isText; * }); * // isEnabled: true only if all conditions met (block type + selection + enabled) * ``` * * **Expected outcome:** Each `set()` call with a function can build on previous * conditions by calling `isPreviousEnable()`. * * ### Use Case 5: Overriding with `set()` * * **`set()` can completely override enable/disable:** * * ```typescript * cesdk.feature.enable('ly.img.delete'); * cesdk.feature.disable('ly.img.delete'); * // isEnabled: false (disable overrides enable) * * // But set() overrides both: * cesdk.feature.set('ly.img.delete', true); * // Chain: [set(true), disable(false)] * // isEnabled: true (set is terminal, disable never evaluated) * ``` * * **Expected outcome:** `set()` with a boolean always wins because it's evaluated * first and is terminal. * * ### Use Case 6: Glob Patterns for Bulk Operations * * **Use wildcards to affect multiple features:** * * ```typescript * // Enable all video features at once * cesdk.feature.enable('ly.img.video.*'); * * // Disable all crop features * cesdk.feature.disable('ly.img.crop.*'); * * // Set custom predicate for all navigation features * cesdk.feature.set('ly.img.navigation.*', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * * // Check if all video features are enabled * const allVideoEnabled = cesdk.feature.isEnabled('ly.img.video.*'); * // Returns true only if ALL matching features are enabled * ``` * * **Expected outcome:** Glob patterns match multiple features. `isEnabled()` with * a glob returns `true` only if **all** matching features are enabled. * * ### Use Case 7: Role-Based Access Control * * **Implement permissions using predicates:** * * ```typescript * const userRole = 'editor'; // Could be 'viewer', 'editor', 'admin' * * cesdk.feature.set('ly.img.delete', () => { * return userRole === 'editor' || userRole === 'admin'; * }); * * cesdk.feature.set('ly.img.settings', () => { * return userRole === 'admin'; * }); * ``` * * **Expected outcome:** Features are enabled based on user roles, with predicates * evaluated on every check. * * ### Use Case 8: Enable/Disable Propagation to Children * * **Enabling a parent feature also enables all child features that have default predicates:** * * ```typescript * // Enable the parent feature - also enables children * cesdk.feature.enable('ly.img.replace'); * // Equivalent to also calling: cesdk.feature.enable('ly.img.replace.*') * * // All children with default predicates are now enabled: * cesdk.feature.isEnabled('ly.img.replace.fill'); // true (if default predicate passes) * cesdk.feature.isEnabled('ly.img.replace.shape'); // true (if default predicate passes) * cesdk.feature.isEnabled('ly.img.replace.audio'); // true (if default predicate passes) * * // Disable a specific child after propagation: * cesdk.feature.disable('ly.img.replace.fill'); * cesdk.feature.isEnabled('ly.img.replace.fill'); // false * * // Disable propagates to children too: * cesdk.feature.disable('ly.img.replace'); * // Equivalent to also calling: cesdk.feature.disable('ly.img.replace.*') * ``` * * **Expected outcome:** `enable()` and `disable()` propagate to all child features * that have registered default predicates. Each child uses its own default predicate, * so context-dependent conditions (e.g., block type checks) still apply. * Children can be individually overridden after propagation. * * ## Key Principles * * 1. **Use `enable()` for simple on/off** - Works with default predicates * 2. **Use `disable()` to turn off enabled features** - Only works if no `set()` predicates exist * 3. **Use `set()` for custom logic** - Overrides `enable()`/`disable()` * 4. **Boolean predicates are terminal** - Stop evaluation immediately * 5. **Function predicates can chain** - Call `isPreviousEnable()` to continue * 6. **Most recent `set()` wins** - Evaluated in LIFO order (most recent first) * 7. **Glob patterns affect multiple features** - Use `*` as wildcard * 8. **Enable/disable propagates to children** - `enable()` and `disable()` also affect all child features with default predicates * * @categoryDescription Feature Control * Methods for enabling and checking the status of editor features based on custom predicates. * * @public */ export declare class FeatureAPI { #private; /** * Enables one or more features using their default predicates. * * This is the recommended way to enable features. Each feature has a sensible * default predicate that determines when it should be available in the UI. * To customize the behavior, use the `set()` method instead. * * Supports glob patterns (e.g., 'ly.img.video.*') to enable multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Enable single feature with its default predicate: * ```typescript * cesdk.feature.enable('ly.img.delete'); * ``` * * @example * Enable multiple features at once: * ```typescript * cesdk.feature.enable(['ly.img.delete', 'ly.img.duplicate']); * ``` * * @example * Enable all video features using a glob pattern: * ```typescript * cesdk.feature.enable('ly.img.video.*'); * ``` * * @example * Enable all navigation features: * ```typescript * cesdk.feature.enable('ly.img.navigation.*'); * ``` * * @category Feature Control * @param featureId - The feature ID, glob pattern, or array of feature IDs to enable. */ enable(featureId: FeatureId | FeatureId[]): void; /** * @deprecated Use `cesdk.feature.set(featureId, predicate)` instead. * This overload will be removed in a future version. * * Enables one or more features based on the provided predicate. * * @category Feature Control * @param featureId - The feature ID or array of feature IDs to enable. * @param predicate - The condition that determines if the feature is enabled. */ enable(featureId: FeatureId | FeatureId[], predicate: FeaturePredicate): void; /** * Disables one or more features. * * This is a convenience method that adds a `false` predicate to the feature's * predicate chain, effectively disabling the feature. Disabled features will * not be shown in the UI. * * Supports glob patterns (e.g., 'ly.img.video.*') to disable multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Disable a single feature: * ```typescript * cesdk.feature.disable('ly.img.delete'); * ``` * * @example * Disable multiple features at once: * ```typescript * cesdk.feature.disable([ * 'ly.img.delete', * 'ly.img.duplicate', * 'ly.img.group' * ]); * ``` * * @example * Disable all video features using a glob pattern: * ```typescript * cesdk.feature.disable('ly.img.video.*'); * ``` * * @example * Disable all crop features: * ```typescript * cesdk.feature.disable('ly.img.crop.*'); * ``` * * @category Feature Control * @param featureId - The feature ID, glob pattern, or array of feature IDs to disable. */ disable(featureId: FeatureId | FeatureId[]): void; /** * Sets a feature's enabled state, replacing any existing predicates. * * This method provides a unified way to enable or disable features. When setting * to `true`, the feature's default predicate is used. When setting to `false`, * the feature is explicitly disabled. You can also provide a custom predicate * function for advanced control. * * Supports glob patterns (e.g., 'ly.img.video.*') to set multiple features at once. * Use `*` as a wildcard to match any sequence of characters. * * @example * Enable a feature using its default predicate: * ```typescript * cesdk.feature.set('ly.img.delete', true); * ``` * * @example * Disable a feature: * ```typescript * cesdk.feature.set('ly.img.delete', false); * ``` * * @example * Set a feature with a custom predicate: * ```typescript * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return engine.block.findAllSelected().length > 0; * }); * ``` * * @example * Disable all video features using a glob pattern: * ```typescript * cesdk.feature.set('ly.img.video.*', false); * ``` * * @example * Enable all filter features with a custom predicate: * ```typescript * cesdk.feature.set('ly.img.filter.*', ({ engine }) => { * // Only enable filters for images * const selected = engine.block.findAllSelected(); * return selected.some(id => engine.block.getType(id) === '//ly.img.ubq/graphic'); * }); * ``` * * @category Feature Control * @param featureId - The feature ID or glob pattern to set. * @param enabled - Boolean to enable/disable, or a predicate function for custom logic. */ set(featureId: FeatureId, enabled: boolean | FeaturePredicate): void; /** * Lists all registered feature IDs, optionally filtered by a pattern. * * This method is useful for debugging and discovering which features are currently * registered in the editor. You can provide a glob-style pattern to filter the results. * * @example * List all registered features: * ```typescript * const allFeatures = cesdk.feature.list(); * console.log(allFeatures); // ['ly.img.delete', 'ly.img.duplicate', ...] * ``` * * @example * List features matching a pattern: * ```typescript * const videoFeatures = cesdk.feature.list({ matcher: 'ly.img.video.*' }); * console.log(videoFeatures); // ['ly.img.video.timeline', 'ly.img.video.timeline.clips', ...] * ``` * * @example * List navigation features: * ```typescript * const navFeatures = cesdk.feature.list({ matcher: 'ly.img.navigation.*' }); * ``` * * @category Feature Control * @param options - Optional configuration object with a `matcher` property for glob-style pattern filtering (e.g., 'ly.img.video.*'). * @returns An array of feature IDs sorted alphabetically. */ list(options?: { matcher?: string; }): FeatureId[]; /** * Gets the predicate chain for a specific feature. * * This method returns the array of predicates currently registered for a feature, * allowing you to inspect the feature's configuration. Returns `undefined` if the * feature is not registered. * * @example * Get predicates for a feature: * ```typescript * const predicates = cesdk.feature.get('ly.img.delete'); * if (predicates) { * console.log(`Feature has ${predicates.length} predicates`); * } * ``` * * @example * Check if a feature is registered: * ```typescript * const isRegistered = cesdk.feature.get('ly.img.delete') !== undefined; * ``` * * @category Feature Control * @param featureId - The feature ID to query. * @returns The array of predicates for the feature, or undefined if not registered. */ get(featureId: FeatureId): FeaturePredicate[] | undefined; /** * Checks if one or more features are currently enabled. * * Supports glob patterns (e.g., 'ly.img.video.*') to check multiple features at once. * When a glob pattern is used, returns `true` only if **all** matching features are enabled. * * @example * Check if a single feature is enabled: * ```typescript * const isDeleteEnabled = cesdk.feature.isEnabled('ly.img.delete'); * ``` * * @example * Check if all video features are enabled: * ```typescript * const allVideoFeaturesEnabled = cesdk.feature.isEnabled('ly.img.video.*'); * ``` * * @example * Check with custom context (useful in predicates): * ```typescript * cesdk.feature.set('ly.img.delete', ({ engine }) => { * return cesdk.feature.isEnabled('ly.img.duplicate', { engine }); * }); * ``` * * @category Feature Control * @param featureId - The feature ID or glob pattern to check. * @param context - The context object containing a reference to the underlying engine. * @returns True if the feature (or all matching features for glob patterns) is enabled, false otherwise. */ isEnabled(featureId: FeatureId, context?: IsEnabledFeatureContext): boolean; /** * Checks if a feature has registered predicates. * * Returns `true` if the feature has any predicates (boolean or function) in its chain. * Returns `false` if the feature is unknown or has no predicates. * * @category Feature Control * @param featureId - The feature ID to check. * @returns True if the feature has registered predicates. */ has(featureId: FeatureId): boolean; } /** * All built-in CE.SDK Feature Ids. * * @public */ export declare type FeatureId = 'ly.img.navigation' | 'ly.img.navigation.bar' | 'ly.img.navigation.back' | 'ly.img.navigation.close' | 'ly.img.navigation.undoRedo' | 'ly.img.navigation.zoom' | 'ly.img.navigation.actions' | 'ly.img.navigation.documentSettings' | 'ly.img.delete' | 'ly.img.duplicate' | 'ly.img.placeholder' | 'ly.img.placeholder.general' | 'ly.img.placeholder.arrange' | 'ly.img.placeholder.fill' | 'ly.img.placeholder.shape' | 'ly.img.placeholder.stroke' | 'ly.img.placeholder.text' | 'ly.img.placeholder.appearance' | 'ly.img.placeholder.audio' | 'ly.img.placeholder.audio.change' | 'ly.img.placeholder.general.opacity' | 'ly.img.placeholder.general.blendMode' | 'ly.img.placeholder.general.duplicate' | 'ly.img.placeholder.general.delete' | 'ly.img.placeholder.arrange.move' | 'ly.img.placeholder.arrange.resize' | 'ly.img.placeholder.arrange.rotate' | 'ly.img.placeholder.arrange.flip' | 'ly.img.placeholder.fill.change' | 'ly.img.placeholder.fill.changeType' | 'ly.img.placeholder.fill.actAsPlaceholder' | 'ly.img.placeholder.fill.crop' | 'ly.img.placeholder.shape.change' | 'ly.img.placeholder.stroke.change' | 'ly.img.placeholder.text.edit' | 'ly.img.placeholder.text.actAsPlaceholder' | 'ly.img.placeholder.text.character' | 'ly.img.placeholder.appearance.adjustments' | 'ly.img.placeholder.appearance.filter' | 'ly.img.placeholder.appearance.effect' | 'ly.img.placeholder.appearance.blur' | 'ly.img.placeholder.appearance.shadow' | 'ly.img.placeholder.appearance.animations' | 'ly.img.preview' | 'ly.img.page' | 'ly.img.page.move' | 'ly.img.page.add' | 'ly.img.page.resize' | 'ly.img.page.settings' | 'ly.img.page.bleedMargin' | 'ly.img.page.clipContent' | 'ly.img.scene.layout' | 'ly.img.scene.layout.horizontal' | 'ly.img.scene.layout.vertical' | 'ly.img.scene.layout.free' | 'ly.img.group' | 'ly.img.group.create' | 'ly.img.group.ungroup' | 'ly.img.group.enter' | 'ly.img.group.select' | 'ly.img.replace' | 'ly.img.replace.fill' | 'ly.img.replace.shape' | 'ly.img.replace.audio' | 'ly.img.text' | 'ly.img.text.edit' | 'ly.img.text.typeface' | 'ly.img.text.fontSize' | 'ly.img.text.fontStyle' | 'ly.img.text.decoration' | 'ly.img.text.alignment' | 'ly.img.text.list' | 'ly.img.text.list.unordered' | 'ly.img.text.list.ordered' | 'ly.img.text.advanced' | 'ly.img.text.background' | 'ly.img.text.background.picker' | 'ly.img.text.background.picker.opacity' | 'ly.img.text.background.library' | 'ly.img.adjustment' | 'ly.img.filter' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.shadow' | 'ly.img.shadow.color' | 'ly.img.shadow.color.picker' | 'ly.img.shadow.color.picker.opacity' | 'ly.img.shadow.color.library' | 'ly.img.shadow.offset' | 'ly.img.shadow.blur' | 'ly.img.cutout' | 'ly.img.fill' | 'ly.img.fill.color' | 'ly.img.fill.color.picker' | 'ly.img.fill.color.picker.opacity' | 'ly.img.fill.color.picker.gradient' | 'ly.img.fill.color.library' | 'ly.img.fill.image' | 'ly.img.fill.video' | 'ly.img.shape.options' | 'ly.img.shape.options.cornerRadius' | 'ly.img.shape.options.points' | 'ly.img.shape.options.innerDiameter' | 'ly.img.shape.options.sides' | 'ly.img.shape.options.lineWidth' | 'ly.img.shape.edit' | 'ly.img.vectorEdit' | 'ly.img.vectorEdit.moveMode' | 'ly.img.vectorEdit.addMode' | 'ly.img.vectorEdit.deleteMode' | 'ly.img.vectorEdit.bendMode' | 'ly.img.vectorEdit.mirrorMode' | 'ly.img.vectorEdit.done' | 'ly.img.combine' | 'ly.img.combine.union' | 'ly.img.combine.subtract' | 'ly.img.combine.intersect' | 'ly.img.combine.exclude' | 'ly.img.trim' | 'ly.img.crop' | 'ly.img.crop.size' | 'ly.img.crop.rotation' | 'ly.img.crop.flip' | 'ly.img.crop.fillMode' | 'ly.img.crop.scale' | 'ly.img.crop.position' | 'ly.img.crop.panel.autoOpen' | 'ly.img.volume' | 'ly.img.playbackSpeed' | 'ly.img.stroke' | 'ly.img.stroke.color' | 'ly.img.stroke.color.picker' | 'ly.img.stroke.color.picker.opacity' | 'ly.img.stroke.color.library' | 'ly.img.stroke.width' | 'ly.img.stroke.style' | 'ly.img.stroke.position' | 'ly.img.stroke.cornerGeometry' | 'ly.img.position' | 'ly.img.position.arrange' | 'ly.img.position.align' | 'ly.img.position.distribute' | 'ly.img.animations' | 'ly.img.opacity' | 'ly.img.blendMode' | 'ly.img.video' | 'ly.img.video.timeline' | 'ly.img.video.timeline.ruler' | 'ly.img.video.timeline.clips' | 'ly.img.video.timeline.overlays' | 'ly.img.video.timeline.audio' | 'ly.img.video.timeline.addClip' | 'ly.img.video.timeline.controls' | 'ly.img.video.timeline.controls.toggle' | 'ly.img.video.timeline.controls.background' | 'ly.img.video.timeline.controls.playback' | 'ly.img.video.timeline.controls.loop' | 'ly.img.video.timeline.controls.split' | 'ly.img.video.timeline.controls.timelineZoom' | 'ly.img.video.caption' | 'ly.img.transform' | 'ly.img.transform.position' | 'ly.img.transform.size' | 'ly.img.transform.rotation' | 'ly.img.transform.flip' | 'ly.img.inspector.bar' | 'ly.img.inspector.toggle' | 'ly.img.dock' | 'ly.img.rulers' | 'ly.img.canvas' | 'ly.img.canvas.bar' | 'ly.img.canvas.menu' | 'ly.img.inspector' | 'ly.img.settings' | 'ly.img.library.panel' | 'ly.img.notifications' | 'ly.img.notifications.undo' | 'ly.img.notifications.redo' | (string & {}); /** * The feature predicate is used to enable or disable a feature * based on the boolean or the return value of the function. * * @public */ export declare type FeaturePredicate = boolean | ((context: FeaturePredicateContext) => boolean); /** * Represents the context for enabling a feature. * This type extends `IsEnabledFeatureContext` and includes a function to check the previous enable state * and a function to get the default predicate. * * @public */ export declare type FeaturePredicateContext = IsEnabledFeatureContext & { isPreviousEnable: () => boolean; defaultPredicate: () => boolean; }; /** * Represents the MIME types for files supported by the file operations in UtilsAPI. * @public */ export declare type FileMimeType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/x-tga' | 'image/svg+xml' | 'audio/wav' | 'video/mp4' | 'video/quicktime' | 'video/webm' | 'video/matroska' | 'application/octet-stream' | 'application/pdf' | 'application/zip' | 'text/plain;charset=UTF-8'; export { FillType } export { FillTypeLonghand } export { FillTypeShorthand } export { Font } export { FontMetrics } /** * Represents the font size configuration options in the Creative Editor SDK. * This interface defines the dropdown options for font sizes. * * @public */ declare interface FontSizeOptions { /** * The font size options that can be selected from a dropdown in the UI. * Other font size values can be entered directly using the input field. */ dropdownOptions: number[]; } export { FontStyle } export { FontWeight } /** * Options for getting component order. * Only single area queries are supported to ensure type-safe returns. * * @public */ export declare type GetOrderOptions = AnyUILocationOptions; /** * A glob pattern string for matching UI areas or component IDs. * Supports `*` as a wildcard. * * Examples: * - `'ly.img.canvas.*'` matches 'ly.img.canvas.bar' and 'ly.img.canvas.menu' * - `'ly.img.*.bar'` matches 'ly.img.canvas.bar', 'ly.img.inspector.bar', 'ly.img.navigation.bar' * - `'*'` matches all areas * * @public */ export declare type GlobPattern = `${string}*` | `*${string}` | `*${string}*` | '*'; export { GradientColorStop } export { GradientstopRGBA } /** * Represents options for a heading. * * The `HeadingOptions` interface provides a set of properties that control the * behavior and appearance of a heading. These options include settings for the * content. * * @public */ export declare interface HeadingOptions { content: string; } export { HexColorString } export { HistoryId } export { HorizontalBlockAlignment } export { HTMLCreativeEngineCanvasElement } /** * Represents the internationalization settings for the Creative Editor SDK. * This type defines a record of locale strings to translation objects. * Note: this will append keys and not override keys. * * @public */ declare type I18n = Record>; export { ImageMimeType } /** * Action function for handling scene import operations. * * @param options - Options for configuring the import operation * - options.format: The format of the imported scene data. * @returns A promise that resolves with the imported scene data as a string, or the scene data directly * @public */ export declare type ImportSceneAction = (options: { format?: 'scene' | 'archive'; }) => void | Promise; /** * Infers the component type from a UI area specifier. * - Single area: returns area-specific component type * - Array of areas: returns union of component types * - Glob pattern: returns base OrderComponent (all IDs) * * @public */ export declare type InferComponentType = A extends UIArea ? OrderComponentFor : A extends UIArea[] ? OrderComponentFor : OrderComponent; /** * Infers the order context type from a UI area specifier. * - Single area: returns area-specific context type * - Array of areas: returns union of context types * - Glob pattern: returns base OrderContext (all areas) * * @public */ export declare type InferOrderContext = A extends UIArea ? OrderContextFor : A extends UIArea[] ? OrderContextFor : OrderContext; /** * Represents options for an input. * * The `InputOptions` interface provides a set of properties that control the * behavior and appearance of an input. These options include settings for the * input label, input label position, value, value setter, disabled state, and suffix. * * @public */ export declare interface InputOptions { inputLabel?: string | string[]; inputLabelPosition?: P; value: T; setValue: (value: T) => void; isDisabled?: boolean; suffix?: Suffix; } /** * Insert after a matched component. * @public */ export declare interface InsertAfterOptions = Exclude> extends BaseInsertOptions { /** Insert after this component. */ after: ComponentMatcher; before?: never; position?: never; } /** * Append to end (default behavior). * @public */ export declare interface InsertAppendOptions = Exclude> extends BaseInsertOptions { before?: never; after?: never; position?: never; } /** * Insert at a specific position. * @public */ export declare interface InsertAtPositionOptions = Exclude> extends BaseInsertOptions { /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */ position: 'start' | 'end' | number; before?: never; after?: never; } /** * Insert before a matched component. * @public */ export declare interface InsertBeforeOptions = Exclude> extends BaseInsertOptions { /** Insert before this component. */ before: ComponentMatcher; after?: never; position?: never; } /** * Options for inserting a component into a UI area. * Supports mutual exclusion: only one of `before`, `after`, or `position` can be specified. * Positional areas (like canvas bar) require the `at` property to specify which slot. * * @public */ export declare type InsertComponentOptions = A extends PositionalUIArea ? PositionalInsertBeforeOptions | PositionalInsertAfterOptions | PositionalInsertAtPositionOptions | PositionalInsertAppendOptions : A extends Exclude ? InsertBeforeOptions | InsertAfterOptions | InsertAtPositionOptions | InsertAppendOptions : never; /** * Represents the location for inserting an order component. * * The `InsertOrderComponentLocation` type provides a set of values that control the * location where a new component should be inserted relative to an existing component. * These options include settings for inserting the component before, after, replacing, * or as a child of the matched component. * * @categoryDescription InsertOrderComponentLocation * Methods for configuring the location for inserting an order component. * * @public */ export declare type InsertOrderComponentLocation = 'before' | 'after' | 'replace' | 'asChild'; /** * Result of an insert operation. * * @public */ export declare interface InsertResult { /** Whether at least one component was successfully inserted. False if target not found. */ inserted: boolean; /** Number of components that were inserted. */ insertedCount: number; /** The new order after the insert. */ order: OrderComponentFor[]; } /** * Represents the ID of an inspector bar component. * * The InspectorBarComponentId type defines the possible IDs for components that can be used in the inspector bar. * It includes predefined IDs for separators, spacers, and various inspector items, as well as a catch-all type for custom IDs. * * @public */ export declare type InspectorBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.spacer' | 'ly.img.video.caption.inspectorBar' | 'ly.img.shape.options.inspectorBar' | 'ly.img.cutout.type.inspectorBar' | 'ly.img.cutout.offset.inspectorBar' | 'ly.img.cutout.smoothing.inspectorBar' | 'ly.img.group.create.inspectorBar' | 'ly.img.group.ungroup.inspectorBar' | 'ly.img.audio.replace.inspectorBar' | 'ly.img.separator' | 'ly.img.text.typeFace.inspectorBar' | 'ly.img.text.style.inspectorBar' | 'ly.img.text.bold.inspectorBar' | 'ly.img.text.italic.inspectorBar' | 'ly.img.text.fontSize.inspectorBar' | 'ly.img.text.alignHorizontal.inspectorBar' | 'ly.img.text.advanced.inspectorBar' | 'ly.img.combine.inspectorBar' | 'ly.img.separator' | 'ly.img.fill.inspectorBar' | 'ly.img.trim.inspectorBar' | 'ly.img.volume.inspectorBar' | 'ly.img.crop.inspectorBar' | 'ly.img.separator' | 'ly.img.stroke.inspectorBar' | 'ly.img.separator' | 'ly.img.text.background.inspectorBar' | 'ly.img.separator' | 'ly.img.animations.inspectorBar' | 'ly.img.separator' | 'ly.img.appearance.inspectorBar' | 'ly.img.adjustment.inspectorBar' | 'ly.img.filter.inspectorBar' | 'ly.img.effect.inspectorBar' | 'ly.img.blur.inspectorBar' | 'ly.img.separator' | 'ly.img.shadow.inspectorBar' | 'ly.img.separator' | 'ly.img.opacityOptions.inspectorBar' | 'ly.img.separator' | 'ly.img.position.inspectorBar' | 'ly.img.spacer' | 'ly.img.separator' | 'ly.img.inspectorToggle.inspectorBar' | 'ly.img.trimControls.inspectorBar' | 'ly.img.cropControls.inspectorBar' | 'ly.img.vectorEdit.moveMode.inspectorBar' | 'ly.img.vectorEdit.addMode.inspectorBar' | 'ly.img.vectorEdit.deleteMode.inspectorBar' | 'ly.img.vectorEdit.bendMode.inspectorBar' | 'ly.img.vectorEdit.mirrorMode.inspectorBar' | 'ly.img.vectorEdit.done.inspectorBar' | (string & {}); /** * Manages localization and internationalization settings for the Creative Editor SDK. * * The InternationalisationAPI provides methods to get and set the current locale, * as well as add custom translations for the editor interface. * * @categoryDescription Localization * Methods for managing locale settings and custom translations within the editor. * * @public */ export declare class InternationalizationAPI { #private; /** * Gets the currently active locale. * * @category Localization * @returns The currently set locale as a string, or the fallback locale if none is set. */ getLocale(): LocaleKey; /** * Returns all available locales that have been loaded. * * @param options - Optional configuration object with the following properties: * - `matcher`: Optional pattern to match against. Use `*` for wildcard matching. * @category Localization * @returns An array of locale strings that have translations available. * * @example * ```typescript * const allLocales = cesdk.i18n.listLocales(); * console.log('Available locales:', allLocales); * // Output: ['en', 'de', 'fr', ...] * * // Find all English variants using wildcard * const englishLocales = cesdk.i18n.listLocales({ matcher: 'en*' }); * console.log('English locales:', englishLocales); * // Output: ['en', 'en-US', 'en-GB', ...] * ``` */ listLocales(options?: { matcher?: string; }): LocaleKey[]; /** * Sets the active locale for the editor interface. * * This will **not check** whether translations for the given locale are available. * * @category Localization * @param locale - The locale string to set as active (e.g., 'en', 'de', 'fr'). */ setLocale: (locale: LocaleKey) => void; /** * Adds custom translations for the editor interface. * * This method allows you to provide custom translations that will be used * by the editor interface. Translations are organized by locale and can * override or extend the default editor translations. * * @category Localization * @param definition - An object mapping locale strings to translation objects. * * @example * ``` * setTranslations({ * en: { * presets: { * scene: ... * } * } * }) * ``` */ setTranslations(definition: Partial>>): void; /** * Retrieves the translations for the specified locales. * * This method returns the translations for the given locales, or all available * translations if no specific locales are provided. * * @category Localization * @param locales - An optional array of locale strings to retrieve translations for. * @returns An object mapping locale strings to their respective translations. */ getTranslations(locales?: LocaleKey[]): Partial>>; /** * Translates a key or array of keys to the current locale. * * This method retrieves the translation for the given key(s) in the currently * active locale. When an array of keys is provided, the first key that has a * translation will be used. If no translation is found for any of the provided * keys, the last key in the array (or the single key if a string is provided) * will be returned as the fallback value. * * @category Localization * @param key - A translation key string or an array of translation keys to try in order. * @returns The translated string for the key in the current locale, or the key itself if no translation is found. * * @example * ``` * // Single key * const translation = cesdk.i18n.translate('common.save'); * // Returns: "Save" (if translation exists) or "common.save" (if not found) * * // Array of keys (fallback) * const translation = cesdk.i18n.translate(['specific.save', 'common.save']); * // Tries 'specific.save' first, then 'common.save' * // Returns the first found translation or "common.save" if neither exists * ``` */ translate(key: string | string[]): string; } /** * Represents the context for determining if a feature is enabled. * This type includes the `CreativeEngine` instance. * * @public */ export declare type IsEnabledFeatureContext = { engine: CreativeEngine_2; }; /** * Checks if a string is a glob pattern (contains `*`). * * @param str - The string to check * @returns True if the string contains a wildcard * * @public */ export declare function isGlobPattern(str: string): str is GlobPattern; /** * Represents options for a library. * * The `LibraryOptions` interface provides a set of properties that control the * behavior and appearance of a library. These options include settings for the * entries, select handler, and searchable state. * * @public */ export declare interface LibraryOptions { /** * `AssetLibraryEntry[]` is deprecated and will be removed in the future; * use `string[]` instead to pass a list of the asset library entries. * Read more about adding asset library entries in the (documentation)[https://img.ly/docs/cesdk/ui/customization/api/assetLibraryEntry/]. */ entries: /** * @deprecated Use `string[]` instead. */ AssetLibraryEntry[] | string[]; onSelect?: (asset: CompleteAssetResult) => Promise; searchable?: boolean; } /** * Represents a loading indicator component. * * @public */ export declare type LoadingComponent = { id: 'ly.img.loading.spinner'; key?: string; } | { id: 'ly.img.loading.heading'; key?: string; content: string; } | { id: 'ly.img.loading.text'; key?: string; content: string; }; /** * Order type for loading indicator components. * @public */ export declare type LoadingOrder = (LoadingComponent['id'] | LoadingComponent)[]; /** * Represents the supported locale keys for the Creative Editor SDK. * * @public */ export declare type LocaleKey = 'en' | 'de' | string; export { Logger } declare type Logger_2 = (message: string, level: 'Warning' | 'Error') => void; export { LogLevel } /** * Matches a value against a glob pattern. * * @param pattern - The glob pattern (e.g., 'ly.img.*', '*.separator') * @param value - The value to match against * @returns True if the value matches the pattern * * @public */ export declare function matchGlob(pattern: string, value: string): boolean; /** * Represents options for a media preview. * * The `MediaPreviewOptions` interface provides a set of properties that control the * behavior and appearance of a media preview. These options include settings for the * size, preview, and action. * * @public */ export declare interface MediaPreviewOptions { size?: 'small' | 'medium'; preview?: PreviewType; action?: ButtonOptions; } export { MimeType_2 as MimeType } /** * Result of a multi-area remove operation. * * @public */ export declare type MultiAreaRemoveResult = { [K in UIArea]?: RemoveResult; }; /** * Result of a multi-area update operation. * * @public */ export declare type MultiAreaUpdateResult = { [K in UIArea]?: UpdateResult; }; /** * @public * Base interface for action buttons in the navigation bar. * Contains common properties shared across all action button types. * * - `onClick`: Handler invoked when the button is clicked. * - `label`: Optional label for the button. * - `icon`: Optional icon name to display on the button. * - `variant`: Optional style variant of the button, either 'regular' or 'plain'. * - `color`: Optional color which can be either 'accent' or 'danger'. * - `isDisabled`: Optional disabled property. * - `isLoading`: Optional loading property. */ export declare interface NavigationBarActionButton extends OrderComponent { id: 'ly.img.saveScene.navigationBar' | 'ly.img.exportArchive.navigationBar' | 'ly.img.exportScene.navigationBar' | 'ly.img.exportImage.navigationBar' | 'ly.img.exportPDF.navigationBar' | 'ly.img.exportVideo.navigationBar' | 'ly.img.importScene.navigationBar' | 'ly.img.importArchive.navigationBar' | 'ly.img.shareScene.navigationBar' | 'ly.img.back.navigationBar' | 'ly.img.close.navigationBar'; onClick: () => void | Promise; label?: string; icon?: string; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; isDisabled?: boolean; isLoading?: boolean; } /** * A list of the component IDs that can be used in the navigation bar. * @public */ export declare type NavigationBarComponentId = 'ly.img.separator' | 'ly.img.spacer' | 'ly.img.back.navigationBar' | 'ly.img.undoRedo.navigationBar' | 'ly.img.documentSettings.navigationBar' | 'ly.img.pageResize.navigationBar' | 'ly.img.title.navigationBar' | 'ly.img.zoom.navigationBar' | 'ly.img.preview.navigationBar' | 'ly.img.actions.navigationBar' | 'ly.img.close.navigationBar' | 'ly.img.saveScene.navigationBar' | 'ly.img.exportImage.navigationBar' | 'ly.img.exportPDF.navigationBar' | 'ly.img.exportVideo.navigationBar' | 'ly.img.shareScene.navigationBar' | 'ly.img.exportScene.navigationBar' | 'ly.img.exportArchive.navigationBar' | 'ly.img.importScene.navigationBar' | 'ly.img.importArchive.navigationBar' | 'ly.img.action.navigationBar' | (string & {}); /** * @public */ export declare type NavigationBarComponents = NavigationBarActionButton | NavigationBarCustomActionButton; /** * @public * Interface representing a generic Action Button in the navigation bar component. * Note: This component requires a key and has a required label, unlike other action buttons. */ export declare interface NavigationBarCustomActionButton extends OrderComponent { id: 'ly.img.action.navigationBar'; key: string; onClick: () => void | Promise; label: string; icon?: string; variant?: 'regular' | 'plain'; color?: 'accent' | 'danger'; isDisabled?: boolean; isLoading?: boolean; } /** * @public */ export declare type NavigationBarOrderComponent = NavigationBarComponents | OrderComponentWithChildren; /** * This enum is used to specify the position of the navigation bar within the user interface. * * By setting the position to `Top` or `Bottom`, you can control the layout and placement of the * navigation bar to better suit the user's workflow and preferences. * * @public */ declare enum NavigationPosition { Top = "top", Bottom = "bottom" } /** * Represents a notification configuration. * * The Notification interface defines the structure of a notification configuration within the Creative Editor SDK. * It includes properties for the type, message, duration, onDismiss callback, and action. This interface provides a * comprehensive way to define and manage notifications, allowing for flexibility in how they are presented and * interacted with by users. * * @public */ declare interface Notification_2 { type?: NotificationType; message: string; duration?: NotificationDuration; onDismiss?: () => void; action?: { label: string; onClick: (context: { id: string; }) => void; }; } export { Notification_2 as Notification } /** * Represents the duration of the notification. * * The NotificationDuration type defines the possible durations for notifications within the Creative Editor SDK. * Each duration corresponds to a different time span, allowing for flexibility in how long notifications are * displayed to users. * * @public */ export declare type NotificationDuration = number | 'infinite' | 'short' | 'medium' | 'long'; declare interface NotificationEvent { type: 'Information' | 'Warning' | 'Error'; i18n: string; } /** * Represents the type of notification. * * The NotificationType enum defines the various types of notifications that can be displayed * within the Creative Editor SDK. Each type corresponds to a different visual style and behavior, * allowing for flexibility in how notifications are presented to users. * * @public */ export declare type NotificationType = 'success' | 'error' | 'info' | 'warning' | 'loading'; declare type NotificationWithId = Notification_2 & { id: string; }; /** * Represents options for a number input. * * The `NumberInputOptions` interface provides a set of properties that control the * behavior and appearance of a number input. These options include settings for the * input label, input label position, value, value setter, disabled state, minimum value, * maximum value, step value, suffix, and requireConfirm. * * @public */ export declare interface NumberInputOptions extends InputOptions { min?: number; max?: number; step?: number; /** * Whether to require explicit confirmation (Enter/Escape/blur) before applying changes. * When true, changes are only applied when user presses Enter/ESC or blurs the input. * When false, changes are applied immediately on every keystroke. * * @defaultValue true */ requireConfirm?: boolean; } export { ObjectType } export { ObjectTypeLonghand } export { ObjectTypeShorthand } export { OffscreenCanvas_2 as OffscreenCanvas } /** * This interface extends the base ExportOptions with additional information about the export, * including which design blocks were exported and the mimeType. * * @see ExportOptions For base export configuration options * @see DesignBlockId For design block identifier type * * @public */ export declare type OnExportOptions = EngineExportOptions & { mimeType: Required['mimeType']; exportedBlocks?: DesignBlockId[]; }; /** * This interface extends the base VideoExportOptions with additional information about the export, * including which design blocks were exported and the mimeType. * * @see VideoExportOptions For base export configuration options * @see DesignBlockId For design block identifier type * @public */ export declare type OnExportVideoOptions = VideoExportOptions & { mimeType: VideoMimeType; exportedBlocks?: DesignBlockId[]; }; /** * Action function that is invoked when an unsupported browser is detected. * This allows custom handling of unsupported browser scenarios. * * @public */ export declare type OnUnsupportedBrowserAction = () => void; /** * Represents the upload callback function for the Creative Editor SDK. * This type defines a function that handles file uploads, including progress updates and context. * * @public */ declare type OnUploadCallback = (file: File, onProgress: (progress: number) => void, context?: UploadCallbackContext) => Promise; /** * Represents the options for the upload callback in the Creative Editor SDK. * This type defines the supported MIME types for uploads. * * @public */ declare type OnUploadOptions = { supportedMimeTypes?: string[]; }; /** * Turn value at K of T into a Partial * @public */ export declare type Optional = Omit & Partial; /** * Represents an order component. * * The OrderComponent interface defines the structure of an order component. * It includes properties for the ID, key, and payload. * * @public */ export declare interface OrderComponent extends ComponentPayload { id: I; key?: string; } /** * Maps UI areas to their order component types. * * @public */ export declare type OrderComponentFor = { 'ly.img.dock': DockOrderComponent; 'ly.img.inspector.bar': OrderComponent; 'ly.img.canvas.menu': CanvasMenuOrderComponent; 'ly.img.navigation.bar': NavigationBarOrderComponent; 'ly.img.canvas.bar': OrderComponent; 'ly.img.caption.panel': OrderComponent; 'ly.img.video.clip.menu': OrderComponent; }[A]; /** * Represents a matcher for order components. * * The OrderComponentMatcher type defines the possible matchers for order components. * It includes predefined matchers for component IDs, partial components, and custom matchers. * * @public */ export declare type OrderComponentMatcher = 'first' | 'last' | number | C['id'] | Partial | ((component: C, index: number) => boolean); /** * Represents a custom dock component. * * The CustomDockComponent interface defines the structure of a custom dock component. * It includes properties for the ID and payload. * * @public */ export declare interface OrderComponentWithChildren> extends OrderComponent { /** A list of children as order components */ children?: (OrderComponentWithChildren | I | C)[]; } /** * Context for ordering components. * Contains editMode which is used by most UI areas. * * @public */ export declare interface OrderContext { editMode?: EditMode; } /** * Maps a UI area to its appropriate order context type for public API usage. * - Caption panel uses CaptionPanelOrderContext (adds view property) * - Video clip menu uses VideoClipMenuOrderContext (adds clipType) * - All other areas use OrderContext (editMode only) * * @public */ export declare type OrderContextFor = A extends 'ly.img.caption.panel' ? CaptionPanelOrderContext : A extends 'ly.img.video.clip.menu' ? VideoClipMenuOrderContext : OrderContext; /** * Reference to a page preset from an asset source. * @public */ export declare type PageAssetReference = { sourceId: string; assetId: string; }; /** * Direct page dimensions specification. * @public */ export declare type PageDimensions = { width: number; height: number; unit: DesignUnit; fixedOrientation?: boolean; }; /** * Represents the definition of a page format in the Creative Editor SDK. * This interface defines the width, height, unit, and optional fixed orientation for a page format. * * @public */ export declare type PageFormatDefinition = { default?: boolean; width: number; height: number; unit: DesignUnit; fixedOrientation?: boolean; }; export { PageGuidesSource } /** * Represents the payload for the page resize panel in the Creative Editor SDK. * * @public */ export declare type PageResizePanelPayload = { intent?: 'allPages' | 'selectedPages'; }; /** * A page can be specified as direct dimensions, an asset source reference, * or an asset object (e.g., from engine.asset.fetchAsset()). * All variants optionally accept a `color` to set the page fill color. * @public */ export declare type PageSpec = (PageDimensions | PageAssetReference | Asset) & { /** Fill color for the page. */ color?: Color; }; export { PaletteColor } /** * Represents a function that disposes of a panel. * * The `PanelDisposer` type provides a function that, when called, disposes of the panel. * * @categoryDescription PanelDisposer * Methods for disposing of a panel. * * @public */ export declare type PanelDisposer = () => void; declare type PanelFloatingFunctions = Record boolean>; declare type PanelFloatings = Record; /** * Represents a unique identifier for a panel in the Creative Editor SDK. * This type defines specific panel IDs and allows for custom panel IDs. * * @public */ export declare type PanelId = '//ly.img.panel/assetLibrary' | '//ly.img.panel/assetLibrary.replace' | '//ly.img.panel/settings' | '//ly.img.panel/inspector' | (string & {}); /** * Represents the options for a panel in the Creative Editor SDK. * This interface defines the options for a panel, including whether it is closable by the user, * its position, whether it is floating, and its payload. * * @public */ export declare type PanelOptions = { closableByUser?: boolean; position?: PanelPosition; floating?: boolean; payload?: PanelPayload; }; /** * Represents the payload for a panel in the Creative Editor SDK. * This type defines the payload based on the panel ID. * * @public */ export declare type PanelPayload = T extends '//ly.img.panel/assetLibrary' ? AssetLibraryPanelPayload : T extends '//ly.img.panel/inspector/pageResize' ? PageResizePanelPayload : UnknownPanelPayload; /** * This type is used to specify the position of various panels within the user interface, * such as the inspector, settings, and asset library panels. * * By setting the position to * `'left'` or `'right'`, you can control the layout and placement of these panels to better * suit the user's workflow and preferences. * * @public */ export declare type PanelPosition = 'left' | 'right' | 'bottom'; /** * @public * @deprecated Use the string literal type `PanelPosition` ('left' | 'right' | 'bottom') instead. */ export declare const PanelPosition: { Left: "left"; Right: "right"; Bottom: "bottom"; }; declare type PanelPositionFunctions = Record PanelPosition>; declare type PanelPositions = Record; declare interface PanelState { group?: string; open?: boolean; payload?: PanelPayload; sessionOptions?: { closableByUser?: boolean; position?: PanelPosition; floating?: boolean; }; } declare type PanelStates = { [key in T]?: PanelState; }; /** * Action function for pasting blocks from the clipboard * @public */ export declare type PasteAction = () => void | Promise; /** * Insert after a matched component (positional areas). * @public */ export declare interface PositionalInsertAfterOptions extends BasePositionalInsertOptions { /** Insert after this component. */ after: ComponentMatcher; before?: never; position?: never; } /** * Append to end (positional areas). * @public */ export declare interface PositionalInsertAppendOptions extends BasePositionalInsertOptions { before?: never; after?: never; position?: never; } /** * Insert at a specific position (positional areas). * @public */ export declare interface PositionalInsertAtPositionOptions extends BasePositionalInsertOptions { /** Insert at 'start', 'end', or a specific index. Negative indexes count from end. */ position: 'start' | 'end' | number; before?: never; after?: never; } /** * Insert before a matched component (positional areas). * @public */ export declare interface PositionalInsertBeforeOptions extends BasePositionalInsertOptions { /** Insert before this component. */ before: ComponentMatcher; after?: never; position?: never; } /** * UI areas where `at` is required to specify a slot. * @public */ export declare type PositionalUIArea = 'ly.img.canvas.bar'; /** * Maps positional UI areas to their valid `at` values. * @public */ export declare type PositionFor = A extends 'ly.img.canvas.bar' ? CanvasBarPosition : never; export { PositionMode } /** * Represents a preview, which can be either an image or a color. * * The `PreviewType` type provides a set of values that describe a preview. These * options include settings for the image or color preview. * * @categoryDescription PreviewType * Methods for configuring a preview. * * @public */ export declare type PreviewType = PreviewTypeImage | PreviewTypeColor; /** * Represents a color preview. * * The `PreviewTypeColor` type provides a set of properties that describe a color * preview. These options include settings for the type and color. * * @public */ export declare type PreviewTypeColor = { type: 'color'; color: string; }; /** * Represents an image preview. * * The `PreviewTypeImage` type provides a set of properties that describe an image * preview. These options include settings for the type and URI. * * @public */ export declare type PreviewTypeImage = { type: 'image'; uri: string; }; export { PropertyType } export { Range_2 as Range } /** * Represents a collection of action functions used throughout the application. * Each property corresponds to a specific UI action or event that can be customized. * * @public */ export declare interface RegisteredActions { /** Action invoked to handle scene saving. */ saveScene: SaveSceneAction; /** Action invoked to handle scene sharing. */ shareScene: ShareSceneAction; /** Action invoked to handle export actions. */ exportDesign: ExportAction; /** Action invoked to handle import actions. */ importScene: ImportSceneAction; /** Action invoked to handle scene export actions. */ exportScene: ExportSceneAction; /** Action invoked to handle file uploads. */ uploadFile: UploadAction; /** Action invoked when an unsupported browser is detected. */ onUnsupportedBrowser: OnUnsupportedBrowserAction; /** * Action invoked when the add clip button is pressed in the video timeline */ addClip: VoidFunction; /** * Zoom actions for explicit zoom control */ /** Action for zooming to a specific block */ 'zoom.toBlock': ZoomToBlockAction; /** Action for zooming to a page (current, first, last, or by index) with optional padding */ 'zoom.toPage': ZoomToPageAction; /** Action for zooming to the current selection */ 'zoom.toSelection': ZoomToSelectionAction; /** Action for zooming in by one step */ 'zoom.in': ZoomInAction; /** Action for zooming out by one step */ 'zoom.out': ZoomOutAction; /** Action for setting zoom to a specific level */ 'zoom.toLevel': ZoomToLevelAction; /** * Scroll actions */ /** Action for scrolling to a specific page */ 'scroll.toPage': ScrollToPageAction; /** Action for scrolling to a specific block */ 'scroll.toBlock': ScrollToBlockAction; /** * Video timeline zoom actions */ /** Action for zooming in the video timeline */ 'timeline.zoom.in': TimelineZoomInAction; /** Action for zooming out the video timeline */ 'timeline.zoom.out': TimelineZoomOutAction; /** Action for fitting the video timeline to show all content */ 'timeline.zoom.fit': TimelineZoomToFitAction; /** Action for setting the video timeline zoom to a specific level */ 'timeline.zoom.toLevel': TimelineZoomToLevelAction; /** Action for resetting the video timeline zoom to default */ 'timeline.zoom.reset': TimelineZoomResetAction; /** * Video timeline expand/collapse actions */ /** Action for expanding the video timeline */ 'timeline.expand': TimelineExpandAction; /** Action for collapsing the video timeline */ 'timeline.collapse': TimelineCollapseAction; /** * Clipboard actions */ /** Action for copying selected blocks to the clipboard */ copy: CopyAction; /** Action for pasting blocks from the clipboard */ paste: PasteAction; /** * Video support check actions */ /** Action for checking video decoding/playback support */ 'video.decode.checkSupport': VideoDecodeCheckSupportAction; /** Action for checking video encoding/export support */ 'video.encode.checkSupport': VideoEncodeCheckSupportAction; /** * Browser support check action */ /** Action for checking browser capabilities at editor startup */ 'editor.checkBrowserSupport': EditorCheckBrowserSupportAction; /** * Scene creation action */ /** Action for creating a new scene with configurable mode and page sizes */ 'scene.create': SceneCreateAction; /** * Asset library actions */ /** Action invoked when the user deletes an asset from an asset source via the asset library card. */ 'asset.delete': DeleteAssetAction; } /** * Result of a remove operation on a single area. * * @public */ export declare interface RemoveResult { /** Number of components that were removed. */ removed: number; /** The new order after the removal. */ order: OrderComponentFor[]; } /** * @public * Provides context for replacing asset library entries, including selected blocks and default entry IDs. */ export declare interface ReplaceAssetLibraryEntriesContext { selectedBlocks: { id: DesignBlockId; blockType: DesignBlockTypeLonghand; fillType?: FillTypeLonghand; supportsShape?: boolean; }[]; defaultEntryIds: string[]; /** * The intent of the replacement operation. * - `'shape'`: User explicitly wants to replace the shape (e.g., from shape options panel) * - `'fill'`: User wants to replace the fill content * - `undefined`: No explicit intent, system determines based on block properties */ replaceIntent?: 'shape' | 'fill'; } export { RGBA } export { RGBAColor } export { RGBColor } export { RoleString } /** * Action function for handling scene saving operations. * * @returns A promise that resolves when the save operation is complete, or void for synchronous operations * @public */ export declare type SaveSceneAction = () => void | Promise; /** * Represents the base scale values for the Creative Editor SDK. * This type defines the concrete scales that can be rendered. * * - `'normal'`: Standard UI scaling for desktop and larger screens * - `'large'`: Increased UI scaling for touch devices and accessibility * - `'modern'`: Modern theme with refined color palette and improved visual hierarchy * * @public */ declare type Scale = 'normal' | 'large' | 'modern'; /** * Represents the scale configuration for the Creative Editor SDK. * This can be a concrete scale or a function that returns a scale based on viewport properties. * * @public */ declare type ScaleConfig = Scale | ScaleFn; /** * A function that returns a scale value based on viewport properties. * This allows for dynamic scale selection based on runtime conditions. * * @public */ declare type ScaleFn = ({ containerWidth, isTouch }: { containerWidth?: number; isTouch?: boolean; }) => Scale; export { SceneAPI } /** * Action for creating a new scene with configurable mode and page sizes. * Returns the scene block ID. * @public */ export declare type SceneCreateAction = (options?: SceneCreateOptions) => Promise; /** * Options for creating a new scene. * @public */ export declare type SceneCreateOptions = { /** * Scene mode. Defaults to null (unified mode with all features enabled). * @deprecated Scene mode is deprecated. New scenes should use the default null mode. */ mode?: SceneMode; /** Scene layout. Defaults to 'VerticalStack' for Design, ignored for Video. */ layout?: SceneLayout; } & ({ /** A single page spec repeated `pageCount` times. */ page?: PageSpec; /** Number of pages to create. Defaults to 1. */ pageCount?: number; pages?: never; } | { /** An array of page specs, one page per entry. */ pages: PageSpec[]; page?: never; pageCount?: never; }); export { SceneLayout } export { SceneMode } export { Scope } /** * Action function for scrolling to a specific block * @public */ export declare type ScrollToBlockAction = (blockId: number, options?: { /** Whether to animate the scroll (default: false) */ animate?: boolean; }) => Promise; /** * Action function for scrolling to a specific page * @public */ export declare type ScrollToPageAction = (options?: { /** The page ID to scroll to (defaults to current page) */ pageId?: number; /** Whether to animate the scroll (default: false) */ animate?: boolean; }) => Promise; /** * Represents options for a section. * * The `SectionOptions` interface provides a set of properties that control the * behavior and appearance of a section. These options include settings for the * title, children, and scrollable behavior. * * @public */ export declare interface SectionOptions { title?: string; children?: (() => void) | ChildrenOrder; scrollable?: boolean; } /** * Options for a select input. * * @public */ export declare interface SelectOptions extends InputOptions { icon?: CustomIcon; inputLabel?: string | string[]; tooltip?: string | string[]; isDisabled?: boolean; isLoading?: boolean; loadingProgress?: number; suffix?: Suffix; values: SelectValue[]; /** * When true, adds a search input that filters the dropdown options by label. */ searchable?: boolean; /** * Placeholder text for the search input. Only used when `searchable` is true. */ searchPlaceholder?: string | string[]; } /** * Represents a value for a select input. * * The `SelectValue` interface provides a set of properties that describe a value * for a select input. These options include settings for the ID, label, and icon. * * @public */ export declare interface SelectValue { id: string; label: string | string[]; icon?: CustomIcon; } /** * Options for setting component order. * Single area only for type safety with area-specific component types. * * @public */ export declare type SetOrderOptions = AnyUILocationOptions; export { SettingsBool } export { SettingsColor } export { SettingsColorRGBA } export { SettingsEnum } export { SettingsFloat } export { SettingsString } export { SettingType } export { ShapeType } export { ShapeTypeLonghand } export { ShapeTypeShorthand } /** * Action function for handling scene sharing operations. * * @returns A promise that resolves when the share operation is complete, or void for synchronous operations * @public */ export declare type ShareSceneAction = () => void | Promise; export { SizeMode } /** * Represents options for a slider. * * The `SliderOptions` interface provides a set of properties that control the * behavior and appearance of a slider. These options include settings for the * input label, input label position, value, value setter, disabled state, minimum value, * maximum value, step value, centered state, and suffix. * * @public */ export declare interface SliderOptions extends InputOptions { min: number; max: number; step?: number; centered?: boolean; } export { SortingOrder } export { Source } /** * Represents options for a loading spinner. * * The `SpinnerOptions` interface controls the appearance of an indeterminate * loading spinner. The optional `label` is rendered beneath the spinner. * * @public */ export declare interface SpinnerOptions { /** * An optional caption rendered beneath the spinner (e.g. `'Loading...'`). * Strings are passed through i18n and resolve to themselves when no * translation is available. */ label?: string | string[]; } export { SplitOptions } export { SpotColor } export { StrokeCornerGeometry } export { StrokePosition } export { StrokeStyle } /** * Represents additional options for a button, which can be used as a suffix. * * The `Suffix` type provides a set of properties that control the appearance * and behavior of a button suffix. These options include settings for the label, * tooltip, click handler, variant, color, size, icon, trailing icon, active state, * selected state, disabled state, loading state, and loading progress. * * @categoryDescription Suffix * Methods for configuring the suffix options for a button. * * @public */ export declare type Suffix = Partial>; export { supportsBrowser } export { supportsVideo } export { supportsVideoExport } export { supportsWasm } /** * Represents options for a text area. * * The `TextAreaOptions` interface provides a set of properties that control the * behavior and appearance of a text area. These options include settings for the * input label, input label position, value, value setter, disabled state, placeholder, * and suffix. * * @public */ export declare interface TextAreaOptions extends InputOptions { placeholder?: string; } export { TextCase } export { TextDecorationConfig } export { TextDecorationLine } export { TextDecorationStyle } /** * Represents options for a text input. * * The `TextInputOptions` interface provides a set of properties that control the * behavior and appearance of a text input. These options include settings for the * input label, input label position, value, value setter, disabled state, placeholder, * suffix, and requireConfirm. * * @public */ export declare interface TextInputOptions extends InputOptions { /** * Whether to require explicit confirmation (Enter/Escape/blur) before applying changes. * When true, changes are only applied when user presses Enter/ESC or blurs the input. * When false, changes are applied immediately on every keystroke. * * @defaultValue true */ requireConfirm?: boolean; } /** * Represents options for text. * * The `TextOptions` interface provides a set of properties that control the * behavior and appearance of text. These options include settings for the * content and alignment. * * @public */ export declare interface TextOptions { content: string; align?: 'left' | 'center' | 'right'; } /** * Represents the base theme values for the Creative Editor SDK. * This type defines the concrete themes that can be rendered. * * @public */ declare type Theme = 'light' | 'dark'; /** * Represents the theme configuration for the Creative Editor SDK. * This can be a concrete theme, a function that returns a theme, or 'system' to use OS preference. * * @public */ declare type ThemeConfig = Theme | ThemeFn | 'system'; /** * A function that returns a theme value. * This allows for dynamic theme selection based on runtime conditions. * The function is evaluated lazily whenever the theme is accessed. * * @public */ declare type ThemeFn = () => Theme; /** * Action function for collapsing the video timeline. * @public */ export declare type TimelineCollapseAction = () => void | Promise; /** * Action function for expanding the video timeline. * @public */ export declare type TimelineExpandAction = () => void | Promise; /** * Video timeline zoom action types */ /** * Action function for zooming in the video timeline by one step. * @public */ export declare type TimelineZoomInAction = () => void | Promise; /** * Action function for zooming out the video timeline by one step. * @public */ export declare type TimelineZoomOutAction = () => void | Promise; /** * Action function for resetting the video timeline zoom to default level (1.0). * @public */ export declare type TimelineZoomResetAction = () => void | Promise; /** * Action function for fitting the video timeline to show all content. * @public */ export declare type TimelineZoomToFitAction = () => void | Promise; /** * Action function for setting the video timeline zoom to a specific level. * @public */ export declare type TimelineZoomToLevelAction = (level: number) => void | Promise; export { TransientResource } /** * Complete translation type that includes both built-in and custom translations. * @public */ export declare interface Translations extends BuiltinTranslations, UnknownTranslations { } export { Typeface } export { TypefaceDefinition } /** * Represents a UI area where components can be ordered. * * Uses the `ly.img.*` naming convention consistent with Feature IDs. * * @public */ export declare type UIArea = 'ly.img.dock' | 'ly.img.inspector.bar' | 'ly.img.canvas.menu' | 'ly.img.navigation.bar' | 'ly.img.canvas.bar' | 'ly.img.caption.panel' | 'ly.img.video.clip.menu'; /** * UI area-specific context - excludes base OrderContext properties (like editMode) * that are read-only and derived from the engine. * * For 'ly.img.caption.panel': `\{ view?: 'create' | 'edit' | 'style' \}` * For 'ly.img.video.clip.menu': `\{ clipType?: 'clip' | 'overlay' | 'caption' \}` * For other areas: `\{\}` (nothing area-specific) * * @public */ export declare type UIAreaContext = Omit, keyof OrderContext>; /** * Specifies which UI area(s) to target. * Can be a single area, an array of areas, or a glob pattern. * * @public */ export declare type UIAreaSpecifier = UIArea | UIArea[] | GlobPattern; /** * Location options for non-positional UI areas. * * @public */ export declare interface UILocationOptions { /** The UI area to target. Cannot be 'ly.img.canvas.bar' or 'ly.img.dock' - use their specific location options instead. */ in: A extends 'ly.img.canvas.bar' | 'ly.img.dock' ? never : A; /** Optional context for conditional ordering. */ when?: OrderContextFor; } /** * Represents the UI options for a single design unit type in the Creative Editor SDK. * This interface defines the bleed margin options for a single design unit. * * @public */ declare interface UIOptionsForSingleDesignUnit { bleedMargin: BleedMarginOptions; } /** * Represents the UI options for different design units in the Creative Editor SDK. * This interface defines the UI options for millimeters, pixels, and inches. * * @public */ declare interface UIOptionsPerDesignUnit { mm: UIOptionsForSingleDesignUnit; px: UIOptionsForSingleDesignUnit; in: UIOptionsForSingleDesignUnit; } /** * Represents an unknown payload for a panel in the Creative Editor SDK. * This type defines a generic payload with unknown keys and values. * * @public */ export declare type UnknownPanelPayload = { [key: string]: unknown; }; /** * Allows for custom translation keys beyond the built-in ones. * @public */ export declare type UnknownTranslations = { [key: string]: string | {}; }; /** * Behavior for a browser capability check at editor startup. * - `'block'`: Show a blocking error dialog (no dismiss) * - `'warn'`: Show a dismissible warning dialog * - `'ignore'`: Skip the check entirely * * @public */ export declare type UnsupportedCapabilityBehavior = 'block' | 'warn' | 'ignore'; /** * Result of an update operation on a single area. * * @public */ export declare interface UpdateResult { /** Number of components that were updated. */ updated: number; /** The new order after the update. */ order: OrderComponentFor[]; } /** * Specifies an update either as a new ID, partial update, or updater function. * * @public */ export declare type UpdateSpec = ComponentIdFor | Partial> | ((component: OrderComponentFor) => Partial>); /** * Action function for uploading files to asset sources. * * @param file - The file to upload * @param onProgress - Progress action that receives upload progress (0-100) * @param context - Optional context information for the upload operation * @returns A promise that resolves with the uploaded asset definition * @public */ export declare type UploadAction = (file: File, onProgress: (progress: number) => void, context?: UploadCallbackContext) => Promise; /** * Represents the context for the upload callback in the Creative Editor SDK. * This interface defines the source ID and an optional group for the upload context. * * @public */ declare interface UploadCallbackContext { sourceId: string; group?: string; } /** * Hook for reading and setting order context for a UI area. * * Components wrapped with `observer` will automatically re-render when the context changes. * * @param area - The UI area to get/set context for * @returns Object with `context` and `setContext` * * @example * ```tsx * function MyCaptionStyleButton() { * const { context, setContext } = useOrderContext('ly.img.caption.panel'); * return setContext({ view: 'style' })}>Styles; * } * ``` * * @public */ export declare function useOrderContext(area: A): { context: UIAreaContext | undefined; setContext: (ctx: Partial>) => void; }; /** * Specifies the configuration for the user interface of the Creative Editor SDK. * * The `UserInterface` interface provides a set of properties that control the appearance * and behavior of the user interface. These options include settings for the base URL, * scale, elements, stylesheets, visibility, small viewport optimization, color palette, * color libraries, typeface libraries, page presets libraries, crop presets libraries, * and page formats. * * @public */ export declare interface UserInterface { baseURL?: string; /** * @deprecated The `scale` property is deprecated. Please use `cesdk.ui.setScale()` and `cesdk.ui.getScale()` methods instead for runtime scale management. */ scale?: ScaleConfig; elements?: UserInterfaceElements_2; stylesheets?: { disableShadowDOM?: boolean; }; hide?: boolean; smallViewportOptimization?: boolean; /** * @deprecated Add a local asset source using `cesdk.engine.asset.addLocalSource()` and populate it with color assets, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * colorPalette: ['#FF0000', '#00FF00', '#0000FF'] * } * }; * * // After (recommended): * // Add a local source for custom colors * engine.asset.addLocalSource('my.custom.colors'); * engine.asset.addAssetToSource('my.custom.colors', { * id: 'red', * label: { en: 'Red' }, * payload: { * color: { * colorSpace: 'sRGB', * r: 1.0, * g: 0.0, * b: 0.0, * a: 1.0 * } * } * }); * // ... add more colors * * // Update the asset library entry to use your custom source * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['ly.img.scene.colors', 'my.custom.colors'] * }); * ``` */ colorPalette?: PaletteColor[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * colorLibraries: ['ly.img.color.palette', 'my.custom.colors'] * } * }; * * // After (recommended): * // Add a local source for custom colors * engine.asset.addLocalSource('my.custom.colors'); * // Add color assets to the source * engine.asset.addAssetToSource('my.custom.colors', { * id: 'custom-color-1', * payload: { color: { colorSpace: 'sRGB', r: 1.0, g: 0.0, b: 0.0 } } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['ly.img.color.palette', 'my.custom.colors'] * }); * ``` */ colorLibraries?: string[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * typefaceLibraries: ['ly.img.typeface', 'my.custom.fonts'] * } * }; * * // After (recommended): * // Add a local source for custom typefaces * engine.asset.addLocalSource('my.custom.fonts'); * // Add typeface assets to the source * engine.asset.addAssetToSource('my.custom.fonts', { * id: 'custom-font-1', * meta: { uri: 'https://example.com/font.ttf' } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { * sourceIds: ['ly.img.typeface', 'my.custom.fonts'] * }); * ``` */ typefaceLibraries?: string[]; /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { sourceIds: ... })` to configure which sources to display. * * For dynamic source IDs, use a callback function with the new API: `{ sourceIds: ({ engine }) => [...] }` * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * pagePresetsLibraries: ['ly.img.page.presets'] * } * }; * * // After (recommended): * // Add a local source for custom page presets * engine.asset.addLocalSource('my.custom.pagePresets'); * // Add page preset assets to the source * engine.asset.addAssetToSource('my.custom.pagePresets', { * id: 'custom-preset-1', * payload: { transformPreset: { type: 'FixedSize', width: 800, height: 600 } } * }); * * // Update the library entry with dynamic sourceIds * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { * sourceIds: ({ engine }) => { * return ['ly.img.page.presets', 'my.custom.pagePresets']; * } * }); * ``` */ pagePresetsLibraries?: string[] | ((engine: CreativeEngine_2) => string[]); /** * @deprecated Add asset sources using `cesdk.engine.asset.addAssetSource()` or `cesdk.engine.asset.addLocalSource()`, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.cropPresets', { sourceIds: ... })` to configure which sources to display. * * For dynamic source IDs, use a callback function with the new API: `{ sourceIds: ({ engine }) => [...] }` * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * cropPresetsLibraries: ['ly.img.crop.presets'] * } * }; * * // After (recommended): * // Add a local source for custom crop presets * engine.asset.addLocalSource('my.custom.cropPresets'); * // Add crop preset assets to the source * engine.asset.addAssetToSource('my.custom.cropPresets', { * id: 'custom-crop-1', * payload: { transformPreset: { type: 'FixedAspectRatio', width: 16, height: 9 } } * }); * * // Update the library entry to use your sources * cesdk.ui.updateAssetLibraryEntry('ly.img.cropPresets', { * sourceIds: ['ly.img.crop.presets', 'my.custom.cropPresets'] * }); * ``` */ cropPresetsLibraries?: string[] | ((engine: CreativeEngine_2) => string[]); /** * @deprecated Add a local asset source using `cesdk.engine.asset.addLocalSource()` and populate it with page format assets, * then use `cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { sourceIds: [...] })` to configure which sources to display. * * @example * ```typescript * // Before (deprecated): * const config = { * ui: { * pageFormats: { * 'custom-format': { * width: 800, * height: 600, * unit: 'Pixel' * } * } * } * }; * * // After (recommended): * // Add a local source for custom page formats * engine.asset.addLocalSource('my.custom.pageFormats'); * engine.asset.addAssetToSource('my.custom.pageFormats', { * id: 'custom-format', * label: { en: 'Custom Format' }, * payload: { * transformPreset: { * type: 'FixedSize', * width: 800, * height: 600, * designUnit: 'Pixel' * } * } * }); * * // Update the asset library entry to use your custom source * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', { * sourceIds: ['my.custom.pageFormats'] * }); * ``` */ pageFormats?: { [id: string]: PageFormatDefinition; }; } /** * Control the user interface and behavior of the Creative Editor SDK. * * The UserInterfaceAPI provides comprehensive methods for managing panels, * notifications, dialogs, component registration, UI ordering, asset libraries, * and custom interface elements within the editor. * * @public */ export declare class UserInterfaceAPI { #private; /** * PLEASE NOTE: This contains experimental APIs. * * Use them with caution since they might change without warning and might be replaced * with a completely different concept or maybe not at all. * * @public */ experimental: ExperimentalUserInterfaceAPI.UserInterfaceAPI; /** * Gets the resolved theme that is currently being used. * If the theme configuration is 'system', returns the OS preference. * If the theme configuration is a function, it is evaluated lazily and the result is returned. * * @category Theme Management * @returns The resolved theme ('light' or 'dark'). * * @example * ```javascript * // Get the actual theme being used * const theme = cesdk.ui.getTheme(); // 'light' or 'dark' * * // Use for conditional styling * const iconColor = cesdk.ui.getTheme() === 'dark' ? 'white' : 'black'; * * // Theme function is evaluated each time getTheme() is called * cesdk.ui.setTheme(() => new Date().getHours() >= 18 ? 'dark' : 'light'); * const currentTheme = cesdk.ui.getTheme(); // Function is evaluated here * ``` */ getTheme(): Theme; /** * Sets the theme configuration. * * This will immediately update the UI to reflect the new theme. * Can be set to: * - 'light' or 'dark' for a specific theme * - 'system' to use the OS preference * - A function that returns 'light' or 'dark' for dynamic theming * * @category Theme Management * @param theme - The theme configuration to set. * * @example * ```javascript * // Set a specific theme * cesdk.ui.setTheme('dark'); * * // Use system preference * cesdk.ui.setTheme('system'); * * // Set theme based on custom logic * cesdk.ui.setTheme(() => { * const hour = new Date().getHours(); * return hour >= 18 || hour < 6 ? 'dark' : 'light'; * }); * * // Toggle between themes * const currentTheme = cesdk.ui.getTheme(); * const newTheme = currentTheme === 'dark' ? 'light' : 'dark'; * cesdk.ui.setTheme(newTheme); * ``` */ setTheme: (theme: ThemeConfig) => void; /** * Gets the resolved scale that is currently being used. * If the scale configuration is a function, it is evaluated lazily and the result is returned. * * @category UI Scale Management * @returns The resolved scale ('normal' or 'large'). * * @example * ```javascript * // Get the actual scale being used * const scale = cesdk.ui.getScale(); // 'normal' or 'large' * * // Use for conditional sizing * const fontSize = cesdk.ui.getScale() === 'large' ? '16px' : '14px'; * * // Scale function is evaluated each time getScale() is called * cesdk.ui.setScale(({ containerWidth }) => containerWidth < 768 ? 'large' : 'normal'); * const currentScale = cesdk.ui.getScale(); // Function is evaluated here * ``` */ getScale(): Scale; /** * Sets the scale configuration. * * This will immediately update the UI to reflect the new scale. * Can be set to: * - 'normal' or 'large' for a specific scale * - A function that returns 'normal' or 'large' based on viewport properties * * @category UI Scale Management * @param scale - The scale configuration to set. * * @example * ```javascript * // Set a specific scale * cesdk.ui.setScale('large'); * * // Set scale based on viewport * cesdk.ui.setScale(({ containerWidth, isTouch }) => { * if (isTouch || containerWidth < 768) { * return 'large'; * } * return 'normal'; * }); * * // Toggle between scales * const currentScale = cesdk.ui.getScale(); * const newScale = currentScale === 'normal' ? 'large' : 'normal'; * cesdk.ui.setScale(newScale); * ``` */ setScale: (scale: ScaleConfig) => void; /** * Gets the current view style of the editor interface. * * The view style controls the complexity and feature set shown in the UI. * 'default' provides a simplified interface, while 'advanced' shows more * comprehensive editing tools and options. * * @returns The current view style ('default' or 'advanced'). * * @example * ```javascript * // Get the current view style * const viewStyle = cesdk.ui.getView(); // 'default' or 'advanced' * * // Use for conditional UI logic * const showAdvancedOptions = cesdk.ui.getView() === 'advanced'; * * // Switch to advanced mode if currently in default * if (cesdk.ui.getView() === 'default') { * cesdk.ui.setView('advanced'); * } * ``` */ getView(): ViewStyle; /** * Sets the view style of the editor interface. * * This immediately updates the UI to reflect the new view style. * The view style controls which UI elements and features are available. * * @param view - The view style to set ('default' or 'advanced'). * * @example * ```javascript * // Set view to advanced mode * cesdk.ui.setView('advanced'); * * // Set view to simplified mode * cesdk.ui.setView('default'); * * // Toggle between view styles * const currentView = cesdk.ui.getView(); * const newView = currentView === 'advanced' ? 'default' : 'advanced'; * cesdk.ui.setView(newView); * ``` */ setView: (view: ViewStyle) => void; /** * Opens a panel if it exists, is not already open, and is currently registered. * * If requirements are not met, this is a no-op. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Opens the inspector panel for the selected block * - `//ly.img.panel/assetLibrary.replace` - Opens the asset library for replacing the selected block. Beware that the library might show nothing depending on how it was configured. * * @category Panel Management * @param panelId - The ID of the panel to open. * @param options - Optional configuration for panel position and floating state. */ openPanel(panelId: T, options?: PanelOptions): void; /** * Closes panels that match the given pattern. Supports wildcard matching. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Inspector panel * - `//ly.img.panel/assetLibrary` - Asset library * - `//ly.img.panel/assetLibrary.replace` - Replacement asset library * * @category Panel Management * @param panelId - The panel ID or pattern to match panels for closing. * * @example * ```javascript * // Close a specific panel by exact ID * cesdk.ui.closePanel('//ly.img.panel/inspector'); * * // Close all ly.img panels using wildcard * cesdk.ui.closePanel('//ly.img.*'); * * // Close all panels with specific prefix * cesdk.ui.closePanel('//ly.img.panel/*'); * * // Close panels matching complex pattern * cesdk.ui.closePanel('//ly.img.panel/' + '*' + '/stroke/' + '*'); * * // Close any inspector panels regardless of namespace * cesdk.ui.closePanel('*' + '/inspector'); * * // Close all asset library panels * cesdk.ui.closePanel('*assetLibrary*'); * ``` */ closePanel(panelId: string): void; /** * Checks if a panel is currently open. * * Available built-in panel IDs: * - `//ly.img.panel/inspector` - Inspector panel for the selected block * - `//ly.img.panel/assetLibrary` - Asset library panel * - `//ly.img.panel/assetLibrary.replace` - Replacement asset library panel * * @category Panel Management * @param panelId - The ID of the panel to check. * @param options - Optional criteria to match against the panel's current state. * @returns True if the panel is open and matches the specified options, false otherwise. */ isPanelOpen(panelId: T, options?: PanelOptions): boolean; /** * Gets all panel IDs, optionally filtered by state or position. * * @category Panel Management * @param options - Optional filter criteria for panel state and position. * @returns Array of panel IDs matching the specified criteria. * * @example * ``` * cesdk.ui.findAllPanels(); * cesdk.ui.findAllPanels({ open: true, position: 'left' }); * ``` */ findAllPanels(options?: PanelOptions & { open?: boolean; }): string[]; /** * Sets the position of a panel within the editor interface. * * @category Panel Management * @param panelId - The ID of the panel to position. * @param panelPosition - The position ('left' or 'right') or a function returning the position. */ setPanelPosition(panelId: string, panelPosition: PanelPosition | (() => PanelPosition)): void; /** * Gets the current position of a panel. * * @category Panel Management * @param panelId - The ID of the panel. * @returns The panel's position ('left' or 'right'). */ getPanelPosition(panelId: string): PanelPosition; /** * Sets whether a panel floats over the canvas. * * @category Panel Management * @param panelId - The ID of the panel to configure. * @param floating - True to make the panel float over the canvas, false to dock it. */ setPanelFloating(panelId: string, floating: boolean | (() => boolean)): void; /** * Checks if a panel is currently floating over the canvas. * * @category Panel Management * @param panelId - The ID of the panel to check. * @returns True if the panel is floating, false if it's docked. */ getPanelFloating(panelId: string): boolean; /** * Displays a non-blocking notification message to the user. * * Notifications appear temporarily and can be dismissed by the user. * They support different types (info, success, warning, error) and durations. * * @category Notifications * @param notification - The notification content as a string or notification object. * @returns The notification ID for programmatic updates or dismissal. */ showNotification(notification: string | Notification_2): string; /** * Dismisses a notification programmatically. * * @category Notifications * @param id - The ID of the notification to dismiss. */ dismissNotification(id: string): void; /** * Updates an existing notification with new content or properties. * * The notification object will be merged with the existing notification. * If the duration is updated, the timeout will be reset. Updates to * dismissed notifications are ignored. * * @category Notifications * @param id - The ID of the notification to update. * @param notification - Partial notification properties to merge. */ updateNotification(id: string, notification: Partial): void; /** * Displays a modal dialog with custom content and actions. * * Dialogs can have different types (info, success, warning, error, loading) * and support custom actions like OK, Cancel, or custom buttons. * * @category Dialogs * @param dialog - The dialog content as a string or dialog object. * @returns The dialog ID for programmatic updates or closure. */ showDialog(dialog: string | Dialog): string; /** * Updates an existing dialog with new content or properties. * * The dialog properties will be merged with the existing dialog configuration. * * @category Dialogs * @param id - The ID of the dialog to update. * @param dialog - Partial dialog properties to merge, or a function that receives the current dialog and returns updates. */ updateDialog(id: string, dialog: Partial | ((dialog: Dialog) => Partial)): void; /** * Closes a dialog programmatically. * * If the dialog has an onClose callback, it will be executed before removal. * Closing an already closed dialog has no effect. * * @category Dialogs * @param id - The ID of the dialog to close. */ closeDialog(id: string): void; /** * Registers a custom panel that hooks into a DOM element for custom UI rendering. * * The onMount function is called when the panel opens, and its return value * (if a function) is called when the panel closes for cleanup. * * @category Experimental Features * @param panelId - The unique ID for the custom panel. * @param onMount - Function called when the panel is mounted, should return a cleanup function. * @experimental This API may change or be removed in future versions. */ unstable_registerCustomPanel(panelId: string, onMount: CustomPanelMountFunction): void; /** * Registers a panel with builder-based rendering system. * * The builder render function will be called with a builder and the engine * as arguments. The builder object is used to defined what base components * should be rendered (such as a button). The engine can be used to get any * state from the engine. The render function will be re-called if anything * in the engine changes regarding the made engine calls. * * @category Component Registration * @param panelId - The panel ID for use with panel management APIs. * @param renderPanel - Function that renders the panel content using the builder system. */ registerPanel(panelId: string, renderPanel: BuilderRenderFunction): void; /** * Registers a panel with builder-based rendering system. * * @category Component Registration * @param panelId - The panel ID for use with panel management APIs. * @param renderComponent - Function that renders the panel content using the builder system. * @deprecated Use `registerPanel` instead. */ unstable_registerPanel(panelId: string, renderComponent: BuilderRenderFunction): void; /** * Registers a component that can be rendered at different UI locations. * * The builder render function will be called with a builder and the engine * as arguments. The builder object is used to defined what base components * should be rendered (such as a button). The engine can be used to get any * state from the engine. The render function will be re-called if anything * in the engine changes regarding the made engine calls. * * @category Component Registration * @param ids - The component ID or array of IDs for use in ordering APIs. * @param renderComponent - Function that renders the component using the builder system. */ registerComponent(ids: string | string[], renderComponent: BuilderRenderFunction): void; /** * Sets the rendering order of components in the dock area. * * The ids in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.dock' }, order)` instead. * @category UI Layout * @param dockOrder - Array of component IDs defining the dock order. * @param orderContext - Optional context specifying when this order applies. */ setDockOrder(dockOrder: (DockOrderComponentId | DockOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of dock components. * * The id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders could have been set depending on different contexts. * The context consists of the edit mode (e.g. `Transform` or `Text`) right now. * If no context is given, the default order (with `Transform` edit mode) is * returned. * * @deprecated Use `getComponentOrder({ in: 'ly.img.dock' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the dock order. */ getDockOrder(orderContext?: OrderContext): DockOrderComponent[]; /** * Updates a component in the render order of the dock area. * * This method finds a dock order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.dock', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ updateDockOrderComponent(matcher: OrderComponentMatcher>, update: DockOrderComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the dock area. * * This method finds a dock order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.dock', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ removeDockOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: DockOrderComponent[]; }; /** * Inserts a component into the render order of the dock area. * * This method inserts a new dock order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.dock', before/after }, component)` instead. * @category UI Layout * @param matcher - Function or object to match the component to insert relative to. * @param component - The component ID or configuration to insert. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ insertDockOrderComponent(matcher: OrderComponentMatcher>, component: DockOrderComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the inspector bar. * * The * id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.inspector.bar' }, order)` instead. * @category UI Layout * @param inspectorBarOrder - Array of component IDs defining the inspector bar order. * @param orderContext - Optional context specifying when this order applies. */ setInspectorBarOrder(inspectorBarOrder: (InspectorBarComponentId | OrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of inspector bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.inspector.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the inspector bar order. */ getInspectorBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.inspector.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ updateInspectorBarOrderComponent(matcher: OrderComponentMatcher>, update: InspectorBarComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.inspector.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ removeInspectorBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the inspector bar. * * This method inserts a new inspector bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.inspector.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ insertInspectorBarOrderComponent(matcher: OrderComponentMatcher>, component: InspectorBarComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the canvas menu. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.menu' }, order)` instead. * @category UI Layout * @param canvasMenuOrder - Array of component IDs defining the canvas menu order. * @param orderContext - Optional context specifying when this order applies. */ setCanvasMenuOrder(canvasMenuOrder: (CanvasMenuComponentId | CanvasMenuOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas menu components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.menu' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas menu order. */ getCanvasMenuOrder(orderContext?: OrderContext): CanvasMenuOrderComponent[]; /** * Updates a component in the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.menu', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated canvas menu order array. */ updateCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, update: CanvasMenuComponentId | Partial | ((component: CanvasMenuOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: CanvasMenuOrderComponent[]; }; /** * Removes a component from the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.menu', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated canvas menu order array. */ removeCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: CanvasMenuOrderComponent[]; }; /** * Inserts a component into the render order of the canvas menu. * * This method inserts a new canvas menu order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.menu', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas menu order array. */ insertCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, component: CanvasMenuComponentId | CanvasMenuOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the navigation bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.navigation.bar' }, order)` instead. * @category UI Layout * @param navigationBarOrder - Array of component IDs defining the navigation bar order. * @param orderContext - Optional context specifying when this order applies. */ setNavigationBarOrder(navigationBarOrder: (NavigationBarComponentId | NavigationBarOrderComponent)[], orderContext?: OrderContext): void; /** * Updates a component in the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.navigation.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated navigation bar order array. */ updateNavigationBarOrderComponent(matcher: OrderComponentMatcher>, update: NavigationBarComponentId | Partial | ((component: NavigationBarOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: NavigationBarOrderComponent[]; }; /** * Removes a component from the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.navigation.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated navigation bar order array. */ removeNavigationBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: NavigationBarOrderComponent[]; }; /** * Inserts a component into the render order of the navigation bar. * * This method inserts a new navigation bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.navigation.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated navigation bar order array. */ insertNavigationBarOrderComponent(matcher: OrderComponentMatcher>, component: NavigationBarComponentId | NavigationBarOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Gets the current rendering order of navigation bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.navigation.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the navigation bar order. */ getNavigationBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Sets the rendering order of components in the canvas bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Canvas bars can be positioned at the top or bottom * of the canvas. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.bar', at: position }, order)` instead. * @category UI Layout * @param canvasBarOrder - Array of component IDs defining the canvas bar order. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying when this order applies. */ setCanvasBarOrder(canvasBarOrder: (CanvasBarComponentId | OrderComponent)[], position: 'top' | 'bottom', orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas bar components at the specified position. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.bar', at: position })` instead. * @category UI Layout * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas bar order. */ getCanvasBarOrder(position: 'top' | 'bottom', orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.bar', at: position, match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ updateCanvasBarOrderComponent(matcher: OrderComponentMatcher>, update: CanvasBarComponentId | Partial> | ((component: OrderComponent) => Partial>), position: 'top' | 'bottom', orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.bar', at: position, match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ removeCanvasBarOrderComponent(matcher: OrderComponentMatcher>, position: 'top' | 'bottom', orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the canvas bar. * * This method inserts a new canvas bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.bar', at: position, before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param position - The canvas bar position ('top' or 'bottom'). * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ insertCanvasBarOrderComponent(matcher: OrderComponentMatcher>, component: CanvasBarComponentId | OrderComponent, position: 'top' | 'bottom', location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in a UI area. * * This unified method replaces area-specific methods like `setDockOrder`, * `setInspectorBarOrder`, etc. It provides a consistent API for all UI areas. * * @category Unified Component Order API * @param options - Location options specifying which area to set. For canvas bar, requires `at` position. For dock, `at` specifies position (`'left'`, `'right'`, or `'bottom'`); defaults to `'left'`. * @param order - Array of component IDs or component objects defining the order. * * @example * ```typescript * // Set dock order * cesdk.ui.setComponentOrder({ in: 'ly.img.dock' }, ['ly.img.spacer', 'my.button']); * * // Set canvas bar order (requires position) * cesdk.ui.setComponentOrder( * { in: 'ly.img.canvas.bar', at: 'top' }, * ['ly.img.settings.canvasBar'] * ); * * // Set order with edit mode context * cesdk.ui.setComponentOrder( * { in: 'ly.img.inspector.bar', when: { editMode: 'Text' } }, * ['ly.img.text.typeFace.inspectorBar', 'ly.img.text.bold.inspectorBar'] * ); * ``` */ setComponentOrder(options: SetOrderOptions, order: ComponentSpec[]): void; /** * Gets the current rendering order of components in a UI area. * * This unified method replaces area-specific methods like `getDockOrder`, * `getInspectorBarOrder`, etc. * * @category Unified Component Order API * @param options - Location options specifying which area to get. For canvas bar, `at` is required. For dock, omitting `at` returns components from all positions. * @returns Array of components in the specified area. * * @example * ```typescript * // Get all dock components across all positions * const allDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock' }); * * // Get dock order at a specific position * const rightDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock', at: 'right' }); * * // Get canvas bar order (requires position) * const canvasBarTop = cesdk.ui.getComponentOrder({ in: 'ly.img.canvas.bar', at: 'top' }); * ``` */ getComponentOrder(options: GetOrderOptions): OrderComponentFor[]; /** * Updates components matching a criteria in one or more UI areas. * * This unified method replaces area-specific update methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the update applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the update * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to update. * @param update - New ID, partial properties, or updater function. * @returns For single area: UpdateResult. For multi-area: MultiAreaUpdateResult. * * @example * ```typescript * // Update by exact ID * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.separator' }, * { key: 'my-separator' } * ); * * // Update by glob pattern * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.*' }, * { disabled: true } * ); * * // Update using function * cesdk.ui.updateOrderComponent( * { in: 'ly.img.inspector.bar', match: 'first' }, * (component) => ({ key: `${component.id}-modified` }) * ); * * // Update across multiple areas * const results = cesdk.ui.updateOrderComponent( * { in: '*', match: 'ly.img.separator' }, * { key: 'global-sep' } * ); * ``` */ updateOrderComponent(options: ComponentMatchOptions, update: UpdateSpec): A extends UIArea ? UpdateResult : MultiAreaUpdateResult; /** * Removes components matching a criteria from one or more UI areas. * * This unified method replaces area-specific remove methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the removal applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the removal * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to remove. * @returns For single area: RemoveResult. For multi-area: MultiAreaRemoveResult. * * @example * ```typescript * // Remove by exact ID * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.separator' }); * * // Remove by position * cesdk.ui.removeOrderComponent({ in: 'ly.img.inspector.bar', match: 'last' }); * * // Remove by glob pattern * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.*' }); * * // Remove from all areas * const results = cesdk.ui.removeOrderComponent({ * in: '*', * match: 'ly.img.separator' * }); * ``` */ removeOrderComponent(options: ComponentMatchOptions): A extends UIArea ? RemoveResult : MultiAreaRemoveResult; /** * Inserts one or more components into a UI area at a specified position. * * This unified method replaces area-specific insert methods. Supports * inserting before, after, or at a specific index. When inserting multiple * components, they are inserted in order at the specified position. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, `options.at` is required * and must specify either 'top' or 'bottom'. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the anchor * component is searched across all positions. For positional inserts * (start/end/index), defaults to `'left'`. * * @category Unified Component Order API * @param options - Insert options specifying where to insert. * @param components - The component ID(s) or object(s) to insert. Can be a single component or an array. * @returns InsertResult with success status, count, and new order. * * @example * ```typescript * // Append single component to end (default) * cesdk.ui.insertOrderComponent({ in: 'ly.img.dock' }, 'my.button'); * * // Insert multiple components at once * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', after: 'ly.img.spacer' }, * ['my.button.1', 'my.button.2', 'my.button.3'] * ); * * // Insert before a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', before: 'ly.img.separator' }, * 'my.button' * ); * * // Insert after a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.inspector.bar', after: 'ly.img.fill.inspectorBar' }, * 'my.fill.tool' * ); * * // Insert at specific position * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 'start' }, * ['first.button', 'second.button'] * ); * * // Insert at index * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 2 }, * 'my.third.button' * ); * * // Insert at negative index (from end) * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: -1 }, * 'my.before.last.button' * ); * ``` */ insertOrderComponent(options: InsertComponentOptions, components: ComponentSpec | ComponentSpec[]): InsertResult; /** * Gets the active order context for a UI area. * * Returns the full context including both settable properties (like `view` for * the caption panel) and engine-derived properties (like `editMode`). * * @category Unified Component Order API * @param options - Location options specifying which area to get context for. * @returns The full order context for the area, or undefined if no context has been set. * * @example * ```typescript * // Get caption panel context * const context = cesdk.ui.getOrderContext({ in: 'ly.img.caption.panel' }); * // → { view: 'edit', editMode: 'Transform' } | undefined * * // Get inspector bar context (editMode only, derived from engine) * const inspectorContext = cesdk.ui.getOrderContext({ in: 'ly.img.inspector.bar' }); * // → { editMode: 'Crop' } | undefined * ``` */ getOrderContext(options: { in: A; }): OrderContextFor | undefined; /** * Sets the active order context for a UI area. * * Only accepts settable properties (excludes base OrderContext properties like * `editMode` which are derived from the engine). For the caption panel, this * means you can set the `view` property. * * @category Unified Component Order API * @param options - Location options specifying which area to set context for. * @param context - The context properties to set. Only settable properties are accepted. * * @example * ```typescript * // Set caption panel to style view * cesdk.ui.setOrderContext( * { in: 'ly.img.caption.panel' }, * { view: 'style' } * ); * * // Note: editMode cannot be set via this API - it's engine-derived * // Use cesdk.engine.editor.setEditMode('Crop') instead * ``` */ setOrderContext(options: { in: A; }, context: UIAreaContext): void; /** * Adds a new asset library entry for display in asset libraries. * * If an entry with the same ID already exists, it will be replaced. * The method validates sorting configurations and warns about duplicates. * * @category Asset Library * @param AssetLibraryEntry - The asset library entry configuration to add. */ addAssetLibraryEntry(AssetLibraryEntry: AssetLibraryEntry): void; /** * Updates an existing asset library entry with new properties. * * The provided properties will be merged with the existing entry. * * @category Asset Library * @param id - The ID of the asset library entry to update. * @param assetLibraryEntry - Partial entry properties to merge with the existing entry, or a function that receives the current entry and returns the updated properties. * * @example * ```typescript * // Simple static update * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['my-custom-colors'] * }); * * // Update other properties using callback with entry * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', (entry) => ({ * title: entry?.title ? `${entry.title} (Custom)` : 'Page Formats', * icon: { name: 'format-icon' } * })); * * // Extend sourceIds with lazy resolution (preserves dynamic behavior) * cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { * sourceIds: ({ currentIds }) => [...currentIds, 'my-custom-fonts'] * }); * ``` */ updateAssetLibraryEntry(id: AssetEntryId, assetLibraryEntry: Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }> | ((entry: AssetLibraryEntry | undefined) => Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }>)): void; /** * Removes an asset library entry from the available entries. * * @category Asset Library * @param id - The ID of the asset library entry to remove. */ removeAssetLibraryEntry(id: AssetEntryId): void; /** * Gets a specific asset library entry by its ID. * * @category Asset Library * @param id - The ID of the asset library entry to retrieve. * @returns The asset library entry configuration, or undefined if not found. */ getAssetLibraryEntry(id: AssetEntryId): AssetLibraryEntry | undefined; /** * Gets all currently registered asset library entry IDs. * * @category Asset Library * @returns Array of asset library entry IDs. */ findAllAssetLibraryEntries(): AssetEntryId[]; /** * Sets the asset library entries to use for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @param backgroundTrackAssetLibraryEntries - Array of asset library entry IDs for the background track. * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * // Before * cesdk.ui.setBackgroundTrackAssetLibraryEntries(['ly.img.video', 'ly.img.image']); * // After * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ setBackgroundTrackAssetLibraryEntries(backgroundTrackAssetLibraryEntries: AssetEntryId[]): void; /** * Gets the asset library entries configured for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @returns Array of asset library entry IDs configured for the background track. * @deprecated The background track entries are now defined via the cesdk.actions API. */ getBackgroundTrackAssetLibraryEntries(): AssetEntryId[]; /** * Sets a function that determines which asset library entries to use for replacement operations. * * The function receives context information (like selected blocks or default entry IDs) * and returns the appropriate asset library entry IDs for replacement. * * @category Asset Library * @param replaceAssetLibraryEntries - Function that receives context and returns an array of asset library entry IDs for replacement. */ setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => AssetEntryId[]): void; /** * Gets the current view style of the editor interface. * * @category Experimental Features * @returns The current view style ('default' or 'advanced'). * @deprecated Use `getView()` instead. This experimental API will be removed in a future version. * @experimental This API may change or be removed in future versions. * * @example * ```javascript * // Before (deprecated) * const view = cesdk.ui.unstable_getView(); * * // After (preferred) * const view = cesdk.ui.getView(); * ``` */ unstable_getView(): ViewStyle; /** * Adds a custom icon set to the editor interface. * * The icon set should be an SVG sprite containing symbol elements. * Symbol IDs must start with '\@' to be recognized by the editor. * * **Security Warning**: The SVG sprite is injected into the DOM without * sanitization. Only use trusted sources to prevent XSS attacks. * Consider using libraries like DOMPurify for untrusted content. * * @category UI Layout * @param id - The unique identifier for the icon set. * @param svgSprite - The SVG sprite string containing symbol definitions. */ addIconSet(id: string, svgSprite: string): void; /** * programmatically applies a crop preset to a design block. * * This is useful in scenarios where you want to enforce a particular * format (e.g., fixed aspect ratio) and define how the editor should * respond after the preset is applied. * * @param id - The ID of the design block to apply the crop preset to. * @param options - Options for applying the crop preset: * - `sourceId`: The ID of the asset source containing the crop preset. * - `presetId`: The ID of the crop preset to apply. * - `mode`: The mode for applying the crop preset: * - `'silent'`: Apply the crop preset silently. * - `'always'`: Apply the crop preset and enter crop mode. * - `'ifNeeded'`: Apply the crop preset only if needed (i.e., if the preset is different from the current crop). */ applyForceCrop(id: DesignBlockId, { sourceId, presetId, mode }: { sourceId: string; presetId: string; mode: 'silent' | 'always' | 'ifNeeded'; }): Promise; } /** * @public * Interface representing the asset library in the user interface. * - `position`: Optional position of the asset library. */ declare interface UserInterfaceAssetLibrary extends UserInterfaceElement { position?: PanelPosition; } /** * @public * Interface representing a custom action in the user interface. * - `callback`: Function to be called when the action is triggered. * - `label`: Label for the action. * - `iconName`: Name of the icon for the action. */ declare interface UserInterfaceCustomAction { callback: () => void | Promise; label: string; iconName: UserInterfaceCustomActionIconName; } /** * @public * Type representing the name of a custom action icon. * - `default`: Default icon. * - `download`: Download icon. * - `upload`: Upload icon. * - `save`: Save icon. * - Any other string: Custom icon name. */ declare type UserInterfaceCustomActionIconName = 'default' | 'download' | 'upload' | 'save' | (string & {}); /** * @public * Interface representing an element in the user interface. * - `show`: Optional boolean indicating whether the element should be shown. */ declare interface UserInterfaceElement { show?: boolean; } declare namespace UserInterfaceElements { export { PanelPosition, NavigationPosition, CustomIcon, UserInterfaceElement, UserInterfaceInspectorBlocks, UserInterfaceInspectorBlock, UserInterfaceInspectorBlockPage, UserInterfaceInspectorBlockText, UserInterfaceInspectorBlockImage, UserInterfaceInspectorBlockVideoFill, UserInterfaceInspectorBlockRectShape, UserInterfaceInspectorBlockGraphic, UserInterfaceInspectorBlockShape, UserInterfaceInspector, UserInterfaceSettings, UserInterfaceAssetLibrary, ExportFormat, UserInterfaceExportAction, UserInterfaceCustomActionIconName, UserInterfaceCustomAction, UserInterfaceNavigation, CardBackground, CustomCardImageBackground, CustomCardSvgVectorPathBackground, CustomCardBackground, AssetLibraryEntryView, AssetEntrySourceIdsContext, AssetEntryId, AssetLibraryEntryData, AssetLibraryEntry, AssetLibraryEntries, ReplaceAssetLibraryEntriesContext, UserInterfaceElements_2 as UserInterfaceElements } } export { UserInterfaceElements } /** * @public * Defines the configuration for user interface elements, including panels, dock, libraries, blocks, navigation, and inspector bar. */ declare interface UserInterfaceElements_2 { /** * @deprecated * Please use `cesdk.ui.setView` and `cesdk.ui.getView` instead. * * @example * ```ts * // Before (deprecated): * const config = { * ui: { * elements: { * view: 'default' // or 'advanced' * } * } * }; * * // After (recommended): * const view = 'default'; // or 'advanced' * cesdk.ui.setView(view); * ``` */ view?: 'default' | 'advanced'; panels?: { /** @deprecated Plese use `cesdk.feature.enable('ly.img.inspector')`, `cesdk.ui.setPanelPosition('//ly.img.panel/inspector')` and `cesdk.ui.setPanelFloating('//ly.img.panel/inspector')` instead. */ inspector?: UserInterfaceInspector | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.settings')`, `cesdk.ui.setPanelPosition('//ly.img.panel/settings')` and `cesdk.ui.setPanelFloating('//ly.img.panel/settings')` instead. */ settings?: UserInterfaceSettings | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.library.panel')`, `cesdk.ui.setPanelPosition('//ly.img.panel/assetLibrary')` and `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ assetLibrary?: UserInterfaceAssetLibrary | boolean; }; dock?: { /** @deprecated Please use `cesdk.feature.enable('ly.img.dock')` instead. */ show?: boolean; iconSize?: 'normal' | 'large'; hideLabels?: boolean; }; libraries?: { insert?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ floating?: boolean; /** * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ backgroundTrackLibraryEntries?: string[] | ((entries: AssetLibraryEntry[]) => string[]); }; replace?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/replaceAssetLibrary')` instead. */ floating?: boolean; }; }; /** @deprecated Use `cesdk.feature.enable()` instead. */ blocks?: UserInterfaceInspectorBlocks; navigation?: UserInterfaceNavigation; inspectorBar?: UserInterfaceElement | boolean; } /** * @public * Interface representing an export action in the user interface. * - `format`: Optional array of export formats. */ declare interface UserInterfaceExportAction extends UserInterfaceElement { format?: ExportFormat[]; } /** * @public * Interface representing the inspector in the user interface. * - `position`: Optional position of the inspector. * - `floating`: Optional boolean indicating whether the inspector should be floating. */ declare interface UserInterfaceInspector extends UserInterfaceElement { position?: PanelPosition; floating?: boolean; } /** * @public * Interface representing a block in the user interface inspector. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlock { } /** * @public * Interface representing a graphic block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ declare interface UserInterfaceInspectorBlockGraphic extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing an image block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for image-related features instead. */ declare interface UserInterfaceInspectorBlockImage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a page block in the user interface inspector. * - `format`: Optional element or boolean indicating whether the format section should be shown. * - `manage`: Optional element or boolean indicating whether the manage section should be shown. * - `maxDuration`: Optional number controlling the maximum allowed duration of a page, if in video mode. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ declare interface UserInterfaceInspectorBlockPage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.page.resize')` instead. */ format?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.page.add')`, `cesdk.feature.enable('ly.img.page.move')`, or `cesdk.feature.enable('ly.img.duplicate')` instead. */ manage?: UserInterfaceElement | boolean; /** * @deprecated Use feature API instead. * Controls the maximum allowed duration of a page, if in video mode. */ maxDuration?: number; /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a rectangular shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockRectShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the blocks in the user interface inspector. * - `opacity`: Optional element or boolean indicating whether the opacity block should be shown. * - `transform`: Optional element or boolean indicating whether the transform block should be shown. * - `trim`: Optional element or boolean indicating whether the trim block should be shown. * - `//ly.img.ubq/text`: Optional text block configuration. * - `//ly.img.ubq/page`: Optional page block configuration. * - `//ly.img.ubq/graphic`: Optional graphic block configuration. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlocks { /** @deprecated Use `cesdk.feature.enable('ly.img.opacity')` instead. */ opacity?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.transform.position')`, `cesdk.feature.enable('ly.img.transform.size')`, `cesdk.feature.enable('ly.img.transform.rotation')`, or `cesdk.feature.enable('ly.img.transform.flip')` instead. */ transform?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.trim')` instead. */ trim?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ '//ly.img.ubq/text'?: UserInterfaceInspectorBlockText; /** @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ '//ly.img.ubq/page'?: UserInterfaceInspectorBlockPage; /** @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ '//ly.img.ubq/graphic'?: UserInterfaceInspectorBlockGraphic; } /** * @public * Interface representing a shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; } /** * @public * Interface representing a text block in the user interface inspector. * - `advanced`: Optional element or boolean indicating whether the advanced section should be shown. * - `color`: Optional element or boolean indicating whether the color section should be shown. * @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ declare interface UserInterfaceInspectorBlockText extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.text.advanced')` instead. */ advanced?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.fill')` instead. */ color?: UserInterfaceElement | boolean; } /** * @public * Interface representing a video fill block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for video-related features instead. */ declare interface UserInterfaceInspectorBlockVideoFill extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the navigation in the user interface. * - `position`: Optional position of the navigation. * - `title`: Optional title for the navigation. * - `action`: Optional object containing actions for the navigation. */ declare interface UserInterfaceNavigation extends UserInterfaceElement { position?: NavigationPosition; title?: string | null; /** * @deprecated Use the Order API to configure the actions instead. */ action?: { /** * @deprecated Use the Order API to configure the actions instead. */ close?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ back?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ save?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ export?: UserInterfaceExportAction | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ share?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ load?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ download?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ custom?: UserInterfaceCustomAction[]; }; } /** * @public * Interface representing the settings in the user interface. */ declare interface UserInterfaceSettings extends UserInterfaceElement { } /** * UtilsAPI provides utility functions for common operations in the Creative Engine SDK. * * This API includes utilities for: * - Creating and managing loading dialogs * - Exporting content (images, PDFs, videos) * - Loading and downloading files * - Local file uploads * @public */ export declare class UtilsAPI { #private; /** * Generates the automatic, localized fallback name for a design block. When * the block does not have an explicit name set, this mirrors the naming shown * in the UI panels. * * @param blockId - The block ID to generate a fallback name for * @returns The localized fallback name for the block * @public */ generateBlockName(blockId: number): string; /** * Shows and manages a loading dialog with progress tracking * * @param options - Options for configuring the loading dialog * @returns A controller object for managing the dialog * * @example * ```typescript * const controller = cesdk.utils.showLoadingDialog({ * title: 'Exporting', * message: 'Please wait...', * onAbort: () => console.log('Aborted') * }); * * // Update progress * controller.updateProgress({ value: 50, max: 100 }); * * // Show success * controller.showSuccess({ * title: 'Success', * message: 'Export completed!' * }); * ``` * @public */ showLoadingDialog(options?: { title?: string; message?: string | string[]; cancelLabel?: string; abortLabel?: string; abortTitle?: string; abortMessage?: string | string[]; size?: 'regular' | 'large'; clickOutsideToClose?: boolean; progress?: DialogProgress; onDone?: () => void; onAbort?: () => void; }): { dialogId: string; updateProgress(progress: DialogProgress): void; showSuccess(options: { title?: string; message: string | string[]; }): void; showError(options: { title?: string; message: string | string[]; }): void; close(): void; }; /** * Exports content with a loading dialog and progress tracking. * Automatically handles both static exports (images, PDFs) and video exports based on MIME type. * * @param options - Export options. Type inference based on mimeType. * @returns Export result - either blobs array for static or single blob for video * * @example * ```typescript * // Image export * const imageResult = await cesdk.utils.export({ * mimeType: 'image/png', * pngCompressionLevel: 7 * }); * * // Video export * const videoResult = await cesdk.utils.export({ * mimeType: 'video/mp4', * onProgress: (rendered, encoded, total) => console.log(`${rendered}/${total}`) * }); * ``` * @public */ export(options?: T): Promise<{ blobs: Blob[]; options: T extends VideoExportOptions ? OnExportVideoOptions : OnExportOptions; }>; /** * Opens a file picker dialog for the user to select a file * * @param options - Options for the file load operation * @returns The loaded file content in the requested format. For dataURL return type, * if the file is eligible for OPFS storage and the feature is enabled, returns the * OPFS URL (opfs://...) instead of a data URL. * * @example * ```typescript * // Load a text file * const text = await cesdk.utils.loadFile({ * accept: '.txt', * returnType: 'text' * }); * * // Load an image as blob * const blob = await cesdk.utils.loadFile({ * accept: 'image/*', * returnType: 'blob' * }); * * // Load a file with OPFS support (returns opfs:// URL for eligible files) * const url = await cesdk.utils.loadFile({ * accept: 'video/*', * returnType: 'dataURL' * }); * // For eligible files: "opfs://cesdk-1234567890-video.mp4" * // For non-eligible files: "data:video/mp4;base64,..." * // Load a file as object URL (blob URL) * const objectURL = await cesdk.utils.loadFile({ * accept: '.zip', * returnType: 'objectURL' * }); * // Remember to revoke the object URL when done * URL.revokeObjectURL(objectURL); * ``` * @public */ loadFile(opts: { accept: string; returnType: 'dataURL'; }): Promise; loadFile(opts: { accept: string; returnType: 'text'; }): Promise; loadFile(opts: { accept: string; returnType: 'blob'; }): Promise; loadFile(opts: { accept: string; returnType: 'arrayBuffer'; }): Promise; loadFile(opts: { accept: string; returnType: 'objectURL'; }): Promise; loadFile(opts: { accept: string; returnType?: 'File'; }): Promise; /** * Downloads a blob, string, or OPFS path as a file to the user's device * * @param file - The content to download (Blob, string content, or opfs:// path) * @param mimeType - The MIME type of the content * * @example * ```typescript * // Download a text file * await cesdk.utils.downloadFile('Hello World', 'text/plain'); * * // Download a blob * const blob = new Blob(['content'], { type: 'text/plain' }); * await cesdk.utils.downloadFile(blob, 'text/plain'); * * // Download from OPFS path * await cesdk.utils.downloadFile('opfs://cesdk/buffer/file.mp4', 'video/mp4'); * ``` * @public */ downloadFile(file: Blob | string, mimeType?: FileMimeType): Promise; /** * Performs a local upload of a file (development only) * * Note: This is meant for development testing only. In production, * you should implement a proper upload handler using the callbacks API. * * @param file - The file to upload * @param context - Optional context information for the upload operation * @returns The asset definition for the uploaded file * * @example * ```typescript * const file = new File(['content'], 'test.txt'); * const asset = await cesdk.utils.localUpload(file, { * context: { source: 'user-upload' } * }); * ``` * @public */ localUpload(file: File, context?: UploadCallbackContext): Promise; /** * Calculates the recommended viewport padding based on current viewport size and settings. * This utility matches the internal padding used by the SDK for zoom operations. * The calculation accounts for safe area insets to ensure content remains visible * in UI-safe regions (avoiding notches, rounded corners, system overlays, etc.). * * @param width - Optional viewport width to use instead of current camera width * @param height - Optional viewport height to use instead of current camera height * @returns An object containing paddingX and paddingY values * * @example * ```typescript * const padding = cesdk.utils.calculateViewportPadding(); * console.log(`Padding: ${padding.paddingX}x${padding.paddingY}`); * * // Use with custom zoom * await cesdk.engine.scene.zoomToBlock( * pageId, * padding.paddingX, * padding.paddingY, * padding.paddingX, * padding.paddingY * ); * ``` * @public */ calculateViewportPadding(width?: number, height?: number): { paddingX: number; paddingY: number; }; /** * Checks if the current browser supports video decoding/playback. * * Video decoding requires the WebCodecs API (VideoFrame, VideoDecoder, VideoEncoder, * AudioDecoder, AudioEncoder). These APIs are not available on all platforms. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * @returns true if the browser supports video decoding, false otherwise * * @example * ```typescript * if (cesdk.utils.supportsVideoDecode()) { * // Video features are available * await cesdk.engine.scene.loadFromURL('video-scene.scene'); * } else { * // Show fallback UI or message * console.log('Video features not available in this browser'); * } * ``` * @public */ supportsVideoDecode(): boolean; /** * Checks if the current browser supports video encoding/export. * * Video encoding requires the WebCodecs API with H.264 (AVC) video encoding * and AAC audio encoding support. These codecs are patent-encumbered and not * included in open-source browser builds. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * For server-side video rendering that works on all platforms, see CE.SDK Renderer: * https://img.ly/docs/cesdk/renderer/cesdk-renderer-overview-7f3e9a/ * * @returns A promise that resolves to true if the browser supports video encoding, false otherwise * * @example * ```typescript * if (await cesdk.utils.supportsVideoEncode()) { * // Video export is available * const blob = await cesdk.engine.block.exportVideo(page); * } else { * // Show fallback UI or suggest server-side rendering * console.log('Video export not available - consider using CE.SDK Renderer'); * } * ``` * @public */ supportsVideoEncode(): Promise; } export { VariableAPI } export { VerticalBlockAlignment } /** * Context for the clip context menu which adds clip type filtering. * * @public */ export declare interface VideoClipMenuOrderContext extends OrderContext { clipType?: VideoClipType; } /** * The type of clip in the video timeline. * - `'clip'` — clips on the main (background) track * - `'overlay'` — clips on overlay tracks above the main track * - `'caption'` — caption clips * * @public */ export declare type VideoClipType = 'clip' | 'overlay' | 'caption'; /** * Action function for checking video decoding/playback support. * Returns true if WebCodecs APIs are available for video decoding and playback. * Shows a blocking error dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns true if video decoding is supported, false otherwise * @public */ export declare type VideoDecodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => boolean; /** * Action function for checking video encoding/export support. * Returns true if H.264 video encoding and AAC audio encoding are supported. * Shows a warning dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns A promise that resolves to true if video encoding is supported, false otherwise * @public */ export declare type VideoEncodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => Promise; export { VideoExportOptions } export { VideoMimeType } /** * Dialog display options for video support check actions. * Allows configuring whether and how the dialog is displayed. * @public */ export declare type VideoSupportDialogOptions = { /** Whether to show the dialog */ show: boolean; /** Backdrop style for the dialog - 'transparent' allows interaction with the page, 'opaque' blocks it */ backdrop?: 'transparent' | 'opaque'; }; /** * Represents the view style options in the Creative Editor SDK. * This type defines the possible view styles, which are 'advanced' and 'default'. * * @public */ export declare type ViewStyle = 'advanced' | 'default'; export { XYWH } export { ZoomAutoFitAxis } /** * Action function for zooming in by one step * @public */ export declare type ZoomInAction = (options?: { /** Custom step size for zoom in (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; export { ZoomOptions } /** * Action function for zooming out by one step * @public */ export declare type ZoomOutAction = (options?: { /** Custom step size for zoom out (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; }) => void | Promise; /** * Zoom action types for explicit zoom control */ /** * Action function for zooming to a specific block * @public */ export declare type ZoomToBlockAction = (blockId: number, options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for setting zoom to a specific level * @public */ export declare type ZoomToLevelAction = (level: number, options?: { /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; /** * Action function for zooming to a page with optional padding * @public */ export declare type ZoomToPageAction = (options?: { /** The page to zoom to - 'current' (default), 'first', 'last', or a numeric page index (0-based) */ page?: 'current' | 'first' | 'last' | number; /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for zooming to the current selection * @public */ export declare type ZoomToSelectionAction = (options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; export { }
(panelId: string, renderPanel: BuilderRenderFunction
): void; /** * Registers a panel with builder-based rendering system. * * @category Component Registration * @param panelId - The panel ID for use with panel management APIs. * @param renderComponent - Function that renders the panel content using the builder system. * @deprecated Use `registerPanel` instead. */ unstable_registerPanel
(panelId: string, renderComponent: BuilderRenderFunction
): void; /** * Registers a component that can be rendered at different UI locations. * * The builder render function will be called with a builder and the engine * as arguments. The builder object is used to defined what base components * should be rendered (such as a button). The engine can be used to get any * state from the engine. The render function will be re-called if anything * in the engine changes regarding the made engine calls. * * @category Component Registration * @param ids - The component ID or array of IDs for use in ordering APIs. * @param renderComponent - Function that renders the component using the builder system. */ registerComponent
(ids: string | string[], renderComponent: BuilderRenderFunction
): void; /** * Sets the rendering order of components in the dock area. * * The ids in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.dock' }, order)` instead. * @category UI Layout * @param dockOrder - Array of component IDs defining the dock order. * @param orderContext - Optional context specifying when this order applies. */ setDockOrder(dockOrder: (DockOrderComponentId | DockOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of dock components. * * The id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders could have been set depending on different contexts. * The context consists of the edit mode (e.g. `Transform` or `Text`) right now. * If no context is given, the default order (with `Transform` edit mode) is * returned. * * @deprecated Use `getComponentOrder({ in: 'ly.img.dock' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the dock order. */ getDockOrder(orderContext?: OrderContext): DockOrderComponent[]; /** * Updates a component in the render order of the dock area. * * This method finds a dock order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.dock', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ updateDockOrderComponent(matcher: OrderComponentMatcher>, update: DockOrderComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the dock area. * * This method finds a dock order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.dock', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ removeDockOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: DockOrderComponent[]; }; /** * Inserts a component into the render order of the dock area. * * This method inserts a new dock order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.dock', before/after }, component)` instead. * @category UI Layout * @param matcher - Function or object to match the component to insert relative to. * @param component - The component ID or configuration to insert. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated dock order array. */ insertDockOrderComponent(matcher: OrderComponentMatcher>, component: DockOrderComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the inspector bar. * * The * id in this order refer to registered default components or custom components * registered in `registerComponent`. * * Different orders can be set depending on different contexts. The context * consists of the edit mode (e.g. `Transform` or `Text`) right now. If no * context is given, the default order is set for the `Transform` edit mode. * * @deprecated Use `setComponentOrder({ in: 'ly.img.inspector.bar' }, order)` instead. * @category UI Layout * @param inspectorBarOrder - Array of component IDs defining the inspector bar order. * @param orderContext - Optional context specifying when this order applies. */ setInspectorBarOrder(inspectorBarOrder: (InspectorBarComponentId | OrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of inspector bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.inspector.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the inspector bar order. */ getInspectorBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.inspector.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ updateInspectorBarOrderComponent(matcher: OrderComponentMatcher>, update: InspectorBarComponentId | Partial> | ((component: OrderComponent) => Partial>), orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the inspector bar. * * This method finds an inspector bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.inspector.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ removeInspectorBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the inspector bar. * * This method inserts a new inspector bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.inspector.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated inspector bar order array. */ insertInspectorBarOrderComponent(matcher: OrderComponentMatcher>, component: InspectorBarComponentId | OrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the canvas menu. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.menu' }, order)` instead. * @category UI Layout * @param canvasMenuOrder - Array of component IDs defining the canvas menu order. * @param orderContext - Optional context specifying when this order applies. */ setCanvasMenuOrder(canvasMenuOrder: (CanvasMenuComponentId | CanvasMenuOrderComponent)[], orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas menu components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.menu' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas menu order. */ getCanvasMenuOrder(orderContext?: OrderContext): CanvasMenuOrderComponent[]; /** * Updates a component in the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.menu', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated canvas menu order array. */ updateCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, update: CanvasMenuComponentId | Partial | ((component: CanvasMenuOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: CanvasMenuOrderComponent[]; }; /** * Removes a component from the render order of the canvas menu. * * This method finds a canvas menu order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.menu', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated canvas menu order array. */ removeCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: CanvasMenuOrderComponent[]; }; /** * Inserts a component into the render order of the canvas menu. * * This method inserts a new canvas menu order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.menu', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas menu order array. */ insertCanvasMenuOrderComponent(matcher: OrderComponentMatcher>, component: CanvasMenuComponentId | CanvasMenuOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in the navigation bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.navigation.bar' }, order)` instead. * @category UI Layout * @param navigationBarOrder - Array of component IDs defining the navigation bar order. * @param orderContext - Optional context specifying when this order applies. */ setNavigationBarOrder(navigationBarOrder: (NavigationBarComponentId | NavigationBarOrderComponent)[], orderContext?: OrderContext): void; /** * Updates a component in the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.navigation.bar', match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of updated components and the updated navigation bar order array. */ updateNavigationBarOrderComponent(matcher: OrderComponentMatcher>, update: NavigationBarComponentId | Partial | ((component: NavigationBarOrderComponent) => Partial), orderContext?: OrderContext): { updated: number; order: NavigationBarOrderComponent[]; }; /** * Removes a component from the render order of the navigation bar. * * This method finds a navigation bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.navigation.bar', match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param orderContext - Optional context specifying which order to update. * @returns An object containing the number of removed components and the updated navigation bar order array. */ removeNavigationBarOrderComponent(matcher: OrderComponentMatcher>, orderContext?: OrderContext): { removed: number; order: NavigationBarOrderComponent[]; }; /** * Inserts a component into the render order of the navigation bar. * * This method inserts a new navigation bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.navigation.bar', before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated navigation bar order array. */ insertNavigationBarOrderComponent(matcher: OrderComponentMatcher>, component: NavigationBarComponentId | NavigationBarOrderComponent, location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Gets the current rendering order of navigation bar components. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.navigation.bar' })` instead. * @category UI Layout * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the navigation bar order. */ getNavigationBarOrder(orderContext?: OrderContext): OrderComponent[]; /** * Sets the rendering order of components in the canvas bar. * * Component IDs refer to built-in components or those registered via * registerComponent. Canvas bars can be positioned at the top or bottom * of the canvas. Different orders can be set for different contexts * (e.g., Transform or Text edit modes). Defaults to Transform mode if no context is provided. * * @deprecated Use `setComponentOrder({ in: 'ly.img.canvas.bar', at: position }, order)` instead. * @category UI Layout * @param canvasBarOrder - Array of component IDs defining the canvas bar order. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying when this order applies. */ setCanvasBarOrder(canvasBarOrder: (CanvasBarComponentId | OrderComponent)[], position: 'top' | 'bottom', orderContext?: OrderContext): void; /** * Gets the current rendering order of canvas bar components at the specified position. * * Component IDs refer to built-in components or those registered via * registerComponent. Returns the order for the specified context, or * defaults to Transform mode if no context is provided. * * @deprecated Use `getComponentOrder({ in: 'ly.img.canvas.bar', at: position })` instead. * @category UI Layout * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to retrieve. * @returns Array of component configurations defining the canvas bar order. */ getCanvasBarOrder(position: 'top' | 'bottom', orderContext?: OrderContext): OrderComponent[]; /** * Updates a component in the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and updates it * with the given component, ID, or updater function. The matcher can be a function or * an object describing the component to match. The update can be a new ID, a partial * object with updated properties, or a function that receives the current component and * returns the updated one. * * The update API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `updateOrderComponent({ in: 'ly.img.canvas.bar', at: position, match }, update)` instead. * @category UI Layout * @param matcher - Function or object to match the component to update. * @param update - New ID, partial properties, or updater function for the component. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ updateCanvasBarOrderComponent(matcher: OrderComponentMatcher>, update: CanvasBarComponentId | Partial> | ((component: OrderComponent) => Partial>), position: 'top' | 'bottom', orderContext?: OrderContext): { updated: number; order: OrderComponent[]; }; /** * Removes a component from the render order of the canvas bar. * * This method finds a canvas bar order component matching the provided matcher and removes it * from the current order. The matcher can be a function or an object describing the component to match. * * The remove API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `removeOrderComponent({ in: 'ly.img.canvas.bar', at: position, match })` instead. * @category UI Layout * @param matcher - Function or object to match the component to remove. * @param position - The canvas bar position ('top' or 'bottom'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ removeCanvasBarOrderComponent(matcher: OrderComponentMatcher>, position: 'top' | 'bottom', orderContext?: OrderContext): { removed: number; order: OrderComponent[]; }; /** * Inserts a component into the render order of the canvas bar. * * This method inserts a new canvas bar order component before or after a component matching * the provided matcher. The matcher can be a function or an object describing the component to match. * The location can be 'before' or 'after'. * * The insert API can be used in different contexts (such as edit modes and bar positions). * * @deprecated Use `insertOrderComponent({ in: 'ly.img.canvas.bar', at: position, before/after }, component)` instead. * @category UI Layout * @param component - The component ID or configuration to insert. * @param matcher - Function or object to match the component to insert relative to. * @param position - The canvas bar position ('top' or 'bottom'). * @param location - Where to insert the new component relative to the matched component ('before' or 'after'). * @param orderContext - Optional context specifying which order to update. * @returns The updated canvas bar order array. */ insertCanvasBarOrderComponent(matcher: OrderComponentMatcher>, component: CanvasBarComponentId | OrderComponent, position: 'top' | 'bottom', location?: InsertOrderComponentLocation, orderContext?: OrderContext): { inserted: boolean; order: (OrderComponent | { id: string; })[]; }; /** * Sets the rendering order of components in a UI area. * * This unified method replaces area-specific methods like `setDockOrder`, * `setInspectorBarOrder`, etc. It provides a consistent API for all UI areas. * * @category Unified Component Order API * @param options - Location options specifying which area to set. For canvas bar, requires `at` position. For dock, `at` specifies position (`'left'`, `'right'`, or `'bottom'`); defaults to `'left'`. * @param order - Array of component IDs or component objects defining the order. * * @example * ```typescript * // Set dock order * cesdk.ui.setComponentOrder({ in: 'ly.img.dock' }, ['ly.img.spacer', 'my.button']); * * // Set canvas bar order (requires position) * cesdk.ui.setComponentOrder( * { in: 'ly.img.canvas.bar', at: 'top' }, * ['ly.img.settings.canvasBar'] * ); * * // Set order with edit mode context * cesdk.ui.setComponentOrder( * { in: 'ly.img.inspector.bar', when: { editMode: 'Text' } }, * ['ly.img.text.typeFace.inspectorBar', 'ly.img.text.bold.inspectorBar'] * ); * ``` */ setComponentOrder(options: SetOrderOptions, order: ComponentSpec[]): void; /** * Gets the current rendering order of components in a UI area. * * This unified method replaces area-specific methods like `getDockOrder`, * `getInspectorBarOrder`, etc. * * @category Unified Component Order API * @param options - Location options specifying which area to get. For canvas bar, `at` is required. For dock, omitting `at` returns components from all positions. * @returns Array of components in the specified area. * * @example * ```typescript * // Get all dock components across all positions * const allDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock' }); * * // Get dock order at a specific position * const rightDock = cesdk.ui.getComponentOrder({ in: 'ly.img.dock', at: 'right' }); * * // Get canvas bar order (requires position) * const canvasBarTop = cesdk.ui.getComponentOrder({ in: 'ly.img.canvas.bar', at: 'top' }); * ``` */ getComponentOrder(options: GetOrderOptions): OrderComponentFor[]; /** * Updates components matching a criteria in one or more UI areas. * * This unified method replaces area-specific update methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the update applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the update * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to update. * @param update - New ID, partial properties, or updater function. * @returns For single area: UpdateResult. For multi-area: MultiAreaUpdateResult. * * @example * ```typescript * // Update by exact ID * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.separator' }, * { key: 'my-separator' } * ); * * // Update by glob pattern * cesdk.ui.updateOrderComponent( * { in: 'ly.img.dock', match: 'ly.img.*' }, * { disabled: true } * ); * * // Update using function * cesdk.ui.updateOrderComponent( * { in: 'ly.img.inspector.bar', match: 'first' }, * (component) => ({ key: `${component.id}-modified` }) * ); * * // Update across multiple areas * const results = cesdk.ui.updateOrderComponent( * { in: '*', match: 'ly.img.separator' }, * { key: 'global-sep' } * ); * ``` */ updateOrderComponent(options: ComponentMatchOptions, update: UpdateSpec): A extends UIArea ? UpdateResult : MultiAreaUpdateResult; /** * Removes components matching a criteria from one or more UI areas. * * This unified method replaces area-specific remove methods. Supports glob * patterns for both areas and component matching. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, if `options.at` is omitted, * the removal applies to BOTH top and bottom bars and results are combined. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the removal * applies to all dock positions (left, right, bottom) and results are combined. * * @category Unified Component Order API * @param options - Match options specifying where and what to remove. * @returns For single area: RemoveResult. For multi-area: MultiAreaRemoveResult. * * @example * ```typescript * // Remove by exact ID * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.separator' }); * * // Remove by position * cesdk.ui.removeOrderComponent({ in: 'ly.img.inspector.bar', match: 'last' }); * * // Remove by glob pattern * cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', match: 'ly.img.*' }); * * // Remove from all areas * const results = cesdk.ui.removeOrderComponent({ * in: '*', * match: 'ly.img.separator' * }); * ``` */ removeOrderComponent(options: ComponentMatchOptions): A extends UIArea ? RemoveResult : MultiAreaRemoveResult; /** * Inserts one or more components into a UI area at a specified position. * * This unified method replaces area-specific insert methods. Supports * inserting before, after, or at a specific index. When inserting multiple * components, they are inserted in order at the specified position. * * **Canvas Bar Note:** For `ly.img.canvas.bar`, `options.at` is required * and must specify either 'top' or 'bottom'. * * **Dock Note:** For `ly.img.dock`, if `options.at` is omitted, the anchor * component is searched across all positions. For positional inserts * (start/end/index), defaults to `'left'`. * * @category Unified Component Order API * @param options - Insert options specifying where to insert. * @param components - The component ID(s) or object(s) to insert. Can be a single component or an array. * @returns InsertResult with success status, count, and new order. * * @example * ```typescript * // Append single component to end (default) * cesdk.ui.insertOrderComponent({ in: 'ly.img.dock' }, 'my.button'); * * // Insert multiple components at once * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', after: 'ly.img.spacer' }, * ['my.button.1', 'my.button.2', 'my.button.3'] * ); * * // Insert before a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', before: 'ly.img.separator' }, * 'my.button' * ); * * // Insert after a component * cesdk.ui.insertOrderComponent( * { in: 'ly.img.inspector.bar', after: 'ly.img.fill.inspectorBar' }, * 'my.fill.tool' * ); * * // Insert at specific position * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 'start' }, * ['first.button', 'second.button'] * ); * * // Insert at index * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: 2 }, * 'my.third.button' * ); * * // Insert at negative index (from end) * cesdk.ui.insertOrderComponent( * { in: 'ly.img.dock', position: -1 }, * 'my.before.last.button' * ); * ``` */ insertOrderComponent(options: InsertComponentOptions, components: ComponentSpec | ComponentSpec[]): InsertResult; /** * Gets the active order context for a UI area. * * Returns the full context including both settable properties (like `view` for * the caption panel) and engine-derived properties (like `editMode`). * * @category Unified Component Order API * @param options - Location options specifying which area to get context for. * @returns The full order context for the area, or undefined if no context has been set. * * @example * ```typescript * // Get caption panel context * const context = cesdk.ui.getOrderContext({ in: 'ly.img.caption.panel' }); * // → { view: 'edit', editMode: 'Transform' } | undefined * * // Get inspector bar context (editMode only, derived from engine) * const inspectorContext = cesdk.ui.getOrderContext({ in: 'ly.img.inspector.bar' }); * // → { editMode: 'Crop' } | undefined * ``` */ getOrderContext(options: { in: A; }): OrderContextFor | undefined; /** * Sets the active order context for a UI area. * * Only accepts settable properties (excludes base OrderContext properties like * `editMode` which are derived from the engine). For the caption panel, this * means you can set the `view` property. * * @category Unified Component Order API * @param options - Location options specifying which area to set context for. * @param context - The context properties to set. Only settable properties are accepted. * * @example * ```typescript * // Set caption panel to style view * cesdk.ui.setOrderContext( * { in: 'ly.img.caption.panel' }, * { view: 'style' } * ); * * // Note: editMode cannot be set via this API - it's engine-derived * // Use cesdk.engine.editor.setEditMode('Crop') instead * ``` */ setOrderContext(options: { in: A; }, context: UIAreaContext): void; /** * Adds a new asset library entry for display in asset libraries. * * If an entry with the same ID already exists, it will be replaced. * The method validates sorting configurations and warns about duplicates. * * @category Asset Library * @param AssetLibraryEntry - The asset library entry configuration to add. */ addAssetLibraryEntry(AssetLibraryEntry: AssetLibraryEntry): void; /** * Updates an existing asset library entry with new properties. * * The provided properties will be merged with the existing entry. * * @category Asset Library * @param id - The ID of the asset library entry to update. * @param assetLibraryEntry - Partial entry properties to merge with the existing entry, or a function that receives the current entry and returns the updated properties. * * @example * ```typescript * // Simple static update * cesdk.ui.updateAssetLibraryEntry('ly.img.colors', { * sourceIds: ['my-custom-colors'] * }); * * // Update other properties using callback with entry * cesdk.ui.updateAssetLibraryEntry('ly.img.pagePresets', (entry) => ({ * title: entry?.title ? `${entry.title} (Custom)` : 'Page Formats', * icon: { name: 'format-icon' } * })); * * // Extend sourceIds with lazy resolution (preserves dynamic behavior) * cesdk.ui.updateAssetLibraryEntry('ly.img.typefaces', { * sourceIds: ({ currentIds }) => [...currentIds, 'my-custom-fonts'] * }); * ``` */ updateAssetLibraryEntry(id: AssetEntryId, assetLibraryEntry: Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }> | ((entry: AssetLibraryEntry | undefined) => Partial & { sourceIds: string[] | ((context: AssetEntrySourceIdsContext & { currentIds: string[]; }) => string[]); }>)): void; /** * Removes an asset library entry from the available entries. * * @category Asset Library * @param id - The ID of the asset library entry to remove. */ removeAssetLibraryEntry(id: AssetEntryId): void; /** * Gets a specific asset library entry by its ID. * * @category Asset Library * @param id - The ID of the asset library entry to retrieve. * @returns The asset library entry configuration, or undefined if not found. */ getAssetLibraryEntry(id: AssetEntryId): AssetLibraryEntry | undefined; /** * Gets all currently registered asset library entry IDs. * * @category Asset Library * @returns Array of asset library entry IDs. */ findAllAssetLibraryEntries(): AssetEntryId[]; /** * Sets the asset library entries to use for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @param backgroundTrackAssetLibraryEntries - Array of asset library entry IDs for the background track. * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * // Before * cesdk.ui.setBackgroundTrackAssetLibraryEntries(['ly.img.video', 'ly.img.image']); * // After * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ setBackgroundTrackAssetLibraryEntries(backgroundTrackAssetLibraryEntries: AssetEntryId[]): void; /** * Gets the asset library entries configured for the background track in video scenes. * * This setting only affects video scenes and has no impact on other scene types. * * @category Asset Library * @returns Array of asset library entry IDs configured for the background track. * @deprecated The background track entries are now defined via the cesdk.actions API. */ getBackgroundTrackAssetLibraryEntries(): AssetEntryId[]; /** * Sets a function that determines which asset library entries to use for replacement operations. * * The function receives context information (like selected blocks or default entry IDs) * and returns the appropriate asset library entry IDs for replacement. * * @category Asset Library * @param replaceAssetLibraryEntries - Function that receives context and returns an array of asset library entry IDs for replacement. */ setReplaceAssetLibraryEntries(replaceAssetLibraryEntries: (context: ReplaceAssetLibraryEntriesContext) => AssetEntryId[]): void; /** * Gets the current view style of the editor interface. * * @category Experimental Features * @returns The current view style ('default' or 'advanced'). * @deprecated Use `getView()` instead. This experimental API will be removed in a future version. * @experimental This API may change or be removed in future versions. * * @example * ```javascript * // Before (deprecated) * const view = cesdk.ui.unstable_getView(); * * // After (preferred) * const view = cesdk.ui.getView(); * ``` */ unstable_getView(): ViewStyle; /** * Adds a custom icon set to the editor interface. * * The icon set should be an SVG sprite containing symbol elements. * Symbol IDs must start with '\@' to be recognized by the editor. * * **Security Warning**: The SVG sprite is injected into the DOM without * sanitization. Only use trusted sources to prevent XSS attacks. * Consider using libraries like DOMPurify for untrusted content. * * @category UI Layout * @param id - The unique identifier for the icon set. * @param svgSprite - The SVG sprite string containing symbol definitions. */ addIconSet(id: string, svgSprite: string): void; /** * programmatically applies a crop preset to a design block. * * This is useful in scenarios where you want to enforce a particular * format (e.g., fixed aspect ratio) and define how the editor should * respond after the preset is applied. * * @param id - The ID of the design block to apply the crop preset to. * @param options - Options for applying the crop preset: * - `sourceId`: The ID of the asset source containing the crop preset. * - `presetId`: The ID of the crop preset to apply. * - `mode`: The mode for applying the crop preset: * - `'silent'`: Apply the crop preset silently. * - `'always'`: Apply the crop preset and enter crop mode. * - `'ifNeeded'`: Apply the crop preset only if needed (i.e., if the preset is different from the current crop). */ applyForceCrop(id: DesignBlockId, { sourceId, presetId, mode }: { sourceId: string; presetId: string; mode: 'silent' | 'always' | 'ifNeeded'; }): Promise; } /** * @public * Interface representing the asset library in the user interface. * - `position`: Optional position of the asset library. */ declare interface UserInterfaceAssetLibrary extends UserInterfaceElement { position?: PanelPosition; } /** * @public * Interface representing a custom action in the user interface. * - `callback`: Function to be called when the action is triggered. * - `label`: Label for the action. * - `iconName`: Name of the icon for the action. */ declare interface UserInterfaceCustomAction { callback: () => void | Promise; label: string; iconName: UserInterfaceCustomActionIconName; } /** * @public * Type representing the name of a custom action icon. * - `default`: Default icon. * - `download`: Download icon. * - `upload`: Upload icon. * - `save`: Save icon. * - Any other string: Custom icon name. */ declare type UserInterfaceCustomActionIconName = 'default' | 'download' | 'upload' | 'save' | (string & {}); /** * @public * Interface representing an element in the user interface. * - `show`: Optional boolean indicating whether the element should be shown. */ declare interface UserInterfaceElement { show?: boolean; } declare namespace UserInterfaceElements { export { PanelPosition, NavigationPosition, CustomIcon, UserInterfaceElement, UserInterfaceInspectorBlocks, UserInterfaceInspectorBlock, UserInterfaceInspectorBlockPage, UserInterfaceInspectorBlockText, UserInterfaceInspectorBlockImage, UserInterfaceInspectorBlockVideoFill, UserInterfaceInspectorBlockRectShape, UserInterfaceInspectorBlockGraphic, UserInterfaceInspectorBlockShape, UserInterfaceInspector, UserInterfaceSettings, UserInterfaceAssetLibrary, ExportFormat, UserInterfaceExportAction, UserInterfaceCustomActionIconName, UserInterfaceCustomAction, UserInterfaceNavigation, CardBackground, CustomCardImageBackground, CustomCardSvgVectorPathBackground, CustomCardBackground, AssetLibraryEntryView, AssetEntrySourceIdsContext, AssetEntryId, AssetLibraryEntryData, AssetLibraryEntry, AssetLibraryEntries, ReplaceAssetLibraryEntriesContext, UserInterfaceElements_2 as UserInterfaceElements } } export { UserInterfaceElements } /** * @public * Defines the configuration for user interface elements, including panels, dock, libraries, blocks, navigation, and inspector bar. */ declare interface UserInterfaceElements_2 { /** * @deprecated * Please use `cesdk.ui.setView` and `cesdk.ui.getView` instead. * * @example * ```ts * // Before (deprecated): * const config = { * ui: { * elements: { * view: 'default' // or 'advanced' * } * } * }; * * // After (recommended): * const view = 'default'; // or 'advanced' * cesdk.ui.setView(view); * ``` */ view?: 'default' | 'advanced'; panels?: { /** @deprecated Plese use `cesdk.feature.enable('ly.img.inspector')`, `cesdk.ui.setPanelPosition('//ly.img.panel/inspector')` and `cesdk.ui.setPanelFloating('//ly.img.panel/inspector')` instead. */ inspector?: UserInterfaceInspector | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.settings')`, `cesdk.ui.setPanelPosition('//ly.img.panel/settings')` and `cesdk.ui.setPanelFloating('//ly.img.panel/settings')` instead. */ settings?: UserInterfaceSettings | boolean; /** @deprecated Please use `cesdk.feature.enable('ly.img.library.panel')`, `cesdk.ui.setPanelPosition('//ly.img.panel/assetLibrary')` and `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ assetLibrary?: UserInterfaceAssetLibrary | boolean; }; dock?: { /** @deprecated Please use `cesdk.feature.enable('ly.img.dock')` instead. */ show?: boolean; iconSize?: 'normal' | 'large'; hideLabels?: boolean; }; libraries?: { insert?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/assetLibrary')` instead. */ floating?: boolean; /** * @deprecated please use the cesdk.actions API to register an action for 'addClip' and implement your own logic. * @example * ```ts * cesdk.actions.register('addClip', async () => { * cesdk.ui.openPanel('//ly.img.panel/assetLibrary', { * payload: { * entries: ['ly.img.video', 'ly.img.image'] * } * }); * }); * ``` */ backgroundTrackLibraryEntries?: string[] | ((entries: AssetLibraryEntry[]) => string[]); }; replace?: { autoClose?: boolean | (() => boolean); /** @deprecated Please use `cesdk.ui.setPanelFloating('//ly.img.panel/replaceAssetLibrary')` instead. */ floating?: boolean; }; }; /** @deprecated Use `cesdk.feature.enable()` instead. */ blocks?: UserInterfaceInspectorBlocks; navigation?: UserInterfaceNavigation; inspectorBar?: UserInterfaceElement | boolean; } /** * @public * Interface representing an export action in the user interface. * - `format`: Optional array of export formats. */ declare interface UserInterfaceExportAction extends UserInterfaceElement { format?: ExportFormat[]; } /** * @public * Interface representing the inspector in the user interface. * - `position`: Optional position of the inspector. * - `floating`: Optional boolean indicating whether the inspector should be floating. */ declare interface UserInterfaceInspector extends UserInterfaceElement { position?: PanelPosition; floating?: boolean; } /** * @public * Interface representing a block in the user interface inspector. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlock { } /** * @public * Interface representing a graphic block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ declare interface UserInterfaceInspectorBlockGraphic extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing an image block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for image-related features instead. */ declare interface UserInterfaceInspectorBlockImage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a page block in the user interface inspector. * - `format`: Optional element or boolean indicating whether the format section should be shown. * - `manage`: Optional element or boolean indicating whether the manage section should be shown. * - `maxDuration`: Optional number controlling the maximum allowed duration of a page, if in video mode. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ declare interface UserInterfaceInspectorBlockPage extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.page.resize')` instead. */ format?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.page.add')`, `cesdk.feature.enable('ly.img.page.move')`, or `cesdk.feature.enable('ly.img.duplicate')` instead. */ manage?: UserInterfaceElement | boolean; /** * @deprecated Use feature API instead. * Controls the maximum allowed duration of a page, if in video mode. */ maxDuration?: number; /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing a rectangular shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockRectShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the blocks in the user interface inspector. * - `opacity`: Optional element or boolean indicating whether the opacity block should be shown. * - `transform`: Optional element or boolean indicating whether the transform block should be shown. * - `trim`: Optional element or boolean indicating whether the trim block should be shown. * - `//ly.img.ubq/text`: Optional text block configuration. * - `//ly.img.ubq/page`: Optional page block configuration. * - `//ly.img.ubq/graphic`: Optional graphic block configuration. * @deprecated Use `cesdk.feature.enable()` instead. */ declare interface UserInterfaceInspectorBlocks { /** @deprecated Use `cesdk.feature.enable('ly.img.opacity')` instead. */ opacity?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.transform.position')`, `cesdk.feature.enable('ly.img.transform.size')`, `cesdk.feature.enable('ly.img.transform.rotation')`, or `cesdk.feature.enable('ly.img.transform.flip')` instead. */ transform?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.trim')` instead. */ trim?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ '//ly.img.ubq/text'?: UserInterfaceInspectorBlockText; /** @deprecated Use `cesdk.feature.enable()` for page-related features instead. */ '//ly.img.ubq/page'?: UserInterfaceInspectorBlockPage; /** @deprecated Use `cesdk.feature.enable()` for graphic-related features instead. */ '//ly.img.ubq/graphic'?: UserInterfaceInspectorBlockGraphic; } /** * @public * Interface representing a shape block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * @deprecated Use `cesdk.feature.enable()` for shape-related features instead. */ declare interface UserInterfaceInspectorBlockShape extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; } /** * @public * Interface representing a text block in the user interface inspector. * - `advanced`: Optional element or boolean indicating whether the advanced section should be shown. * - `color`: Optional element or boolean indicating whether the color section should be shown. * @deprecated Use `cesdk.feature.enable()` for text-related features instead. */ declare interface UserInterfaceInspectorBlockText extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.text.advanced')` instead. */ advanced?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.fill')` instead. */ color?: UserInterfaceElement | boolean; } /** * @public * Interface representing a video fill block in the user interface inspector. * - `crop`: Optional element or boolean indicating whether the crop section should be shown. * - `filters`: Optional element or boolean indicating whether the filters section should be shown. * - `adjustments`: Optional element or boolean indicating whether the adjustments section should be shown. * - `effects`: Optional element or boolean indicating whether the effects section should be shown. * - `blur`: Optional element or boolean indicating whether the blur section should be shown. * @deprecated Use `cesdk.feature.enable()` for video-related features instead. */ declare interface UserInterfaceInspectorBlockVideoFill extends UserInterfaceInspectorBlock { /** @deprecated Use `cesdk.feature.enable('ly.img.crop')` instead. */ crop?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.filter')` instead. */ filters?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.adjustment')` instead. */ adjustments?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.effect')` instead. */ effects?: UserInterfaceElement | boolean; /** @deprecated Use `cesdk.feature.enable('ly.img.blur')` instead. */ blur?: UserInterfaceElement | boolean; } /** * @public * Interface representing the navigation in the user interface. * - `position`: Optional position of the navigation. * - `title`: Optional title for the navigation. * - `action`: Optional object containing actions for the navigation. */ declare interface UserInterfaceNavigation extends UserInterfaceElement { position?: NavigationPosition; title?: string | null; /** * @deprecated Use the Order API to configure the actions instead. */ action?: { /** * @deprecated Use the Order API to configure the actions instead. */ close?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ back?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ save?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ export?: UserInterfaceExportAction | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ share?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ load?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ download?: UserInterfaceElement | boolean; /** * @deprecated Use the Order API to configure the actions instead. */ custom?: UserInterfaceCustomAction[]; }; } /** * @public * Interface representing the settings in the user interface. */ declare interface UserInterfaceSettings extends UserInterfaceElement { } /** * UtilsAPI provides utility functions for common operations in the Creative Engine SDK. * * This API includes utilities for: * - Creating and managing loading dialogs * - Exporting content (images, PDFs, videos) * - Loading and downloading files * - Local file uploads * @public */ export declare class UtilsAPI { #private; /** * Generates the automatic, localized fallback name for a design block. When * the block does not have an explicit name set, this mirrors the naming shown * in the UI panels. * * @param blockId - The block ID to generate a fallback name for * @returns The localized fallback name for the block * @public */ generateBlockName(blockId: number): string; /** * Shows and manages a loading dialog with progress tracking * * @param options - Options for configuring the loading dialog * @returns A controller object for managing the dialog * * @example * ```typescript * const controller = cesdk.utils.showLoadingDialog({ * title: 'Exporting', * message: 'Please wait...', * onAbort: () => console.log('Aborted') * }); * * // Update progress * controller.updateProgress({ value: 50, max: 100 }); * * // Show success * controller.showSuccess({ * title: 'Success', * message: 'Export completed!' * }); * ``` * @public */ showLoadingDialog(options?: { title?: string; message?: string | string[]; cancelLabel?: string; abortLabel?: string; abortTitle?: string; abortMessage?: string | string[]; size?: 'regular' | 'large'; clickOutsideToClose?: boolean; progress?: DialogProgress; onDone?: () => void; onAbort?: () => void; }): { dialogId: string; updateProgress(progress: DialogProgress): void; showSuccess(options: { title?: string; message: string | string[]; }): void; showError(options: { title?: string; message: string | string[]; }): void; close(): void; }; /** * Exports content with a loading dialog and progress tracking. * Automatically handles both static exports (images, PDFs) and video exports based on MIME type. * * @param options - Export options. Type inference based on mimeType. * @returns Export result - either blobs array for static or single blob for video * * @example * ```typescript * // Image export * const imageResult = await cesdk.utils.export({ * mimeType: 'image/png', * pngCompressionLevel: 7 * }); * * // Video export * const videoResult = await cesdk.utils.export({ * mimeType: 'video/mp4', * onProgress: (rendered, encoded, total) => console.log(`${rendered}/${total}`) * }); * ``` * @public */ export(options?: T): Promise<{ blobs: Blob[]; options: T extends VideoExportOptions ? OnExportVideoOptions : OnExportOptions; }>; /** * Opens a file picker dialog for the user to select a file * * @param options - Options for the file load operation * @returns The loaded file content in the requested format. For dataURL return type, * if the file is eligible for OPFS storage and the feature is enabled, returns the * OPFS URL (opfs://...) instead of a data URL. * * @example * ```typescript * // Load a text file * const text = await cesdk.utils.loadFile({ * accept: '.txt', * returnType: 'text' * }); * * // Load an image as blob * const blob = await cesdk.utils.loadFile({ * accept: 'image/*', * returnType: 'blob' * }); * * // Load a file with OPFS support (returns opfs:// URL for eligible files) * const url = await cesdk.utils.loadFile({ * accept: 'video/*', * returnType: 'dataURL' * }); * // For eligible files: "opfs://cesdk-1234567890-video.mp4" * // For non-eligible files: "data:video/mp4;base64,..." * // Load a file as object URL (blob URL) * const objectURL = await cesdk.utils.loadFile({ * accept: '.zip', * returnType: 'objectURL' * }); * // Remember to revoke the object URL when done * URL.revokeObjectURL(objectURL); * ``` * @public */ loadFile(opts: { accept: string; returnType: 'dataURL'; }): Promise; loadFile(opts: { accept: string; returnType: 'text'; }): Promise; loadFile(opts: { accept: string; returnType: 'blob'; }): Promise; loadFile(opts: { accept: string; returnType: 'arrayBuffer'; }): Promise; loadFile(opts: { accept: string; returnType: 'objectURL'; }): Promise; loadFile(opts: { accept: string; returnType?: 'File'; }): Promise; /** * Downloads a blob, string, or OPFS path as a file to the user's device * * @param file - The content to download (Blob, string content, or opfs:// path) * @param mimeType - The MIME type of the content * * @example * ```typescript * // Download a text file * await cesdk.utils.downloadFile('Hello World', 'text/plain'); * * // Download a blob * const blob = new Blob(['content'], { type: 'text/plain' }); * await cesdk.utils.downloadFile(blob, 'text/plain'); * * // Download from OPFS path * await cesdk.utils.downloadFile('opfs://cesdk/buffer/file.mp4', 'video/mp4'); * ``` * @public */ downloadFile(file: Blob | string, mimeType?: FileMimeType): Promise; /** * Performs a local upload of a file (development only) * * Note: This is meant for development testing only. In production, * you should implement a proper upload handler using the callbacks API. * * @param file - The file to upload * @param context - Optional context information for the upload operation * @returns The asset definition for the uploaded file * * @example * ```typescript * const file = new File(['content'], 'test.txt'); * const asset = await cesdk.utils.localUpload(file, { * context: { source: 'user-upload' } * }); * ``` * @public */ localUpload(file: File, context?: UploadCallbackContext): Promise; /** * Calculates the recommended viewport padding based on current viewport size and settings. * This utility matches the internal padding used by the SDK for zoom operations. * The calculation accounts for safe area insets to ensure content remains visible * in UI-safe regions (avoiding notches, rounded corners, system overlays, etc.). * * @param width - Optional viewport width to use instead of current camera width * @param height - Optional viewport height to use instead of current camera height * @returns An object containing paddingX and paddingY values * * @example * ```typescript * const padding = cesdk.utils.calculateViewportPadding(); * console.log(`Padding: ${padding.paddingX}x${padding.paddingY}`); * * // Use with custom zoom * await cesdk.engine.scene.zoomToBlock( * pageId, * padding.paddingX, * padding.paddingY, * padding.paddingX, * padding.paddingY * ); * ``` * @public */ calculateViewportPadding(width?: number, height?: number): { paddingX: number; paddingY: number; }; /** * Checks if the current browser supports video decoding/playback. * * Video decoding requires the WebCodecs API (VideoFrame, VideoDecoder, VideoEncoder, * AudioDecoder, AudioEncoder). These APIs are not available on all platforms. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * @returns true if the browser supports video decoding, false otherwise * * @example * ```typescript * if (cesdk.utils.supportsVideoDecode()) { * // Video features are available * await cesdk.engine.scene.loadFromURL('video-scene.scene'); * } else { * // Show fallback UI or message * console.log('Video features not available in this browser'); * } * ``` * @public */ supportsVideoDecode(): boolean; /** * Checks if the current browser supports video encoding/export. * * Video encoding requires the WebCodecs API with H.264 (AVC) video encoding * and AAC audio encoding support. These codecs are patent-encumbered and not * included in open-source browser builds. * * **Supported platforms**: Chrome and Edge on Windows and macOS. * **Unsupported platforms**: All browsers on Linux, Firefox on any OS. * * For server-side video rendering that works on all platforms, see CE.SDK Renderer: * https://img.ly/docs/cesdk/renderer/cesdk-renderer-overview-7f3e9a/ * * @returns A promise that resolves to true if the browser supports video encoding, false otherwise * * @example * ```typescript * if (await cesdk.utils.supportsVideoEncode()) { * // Video export is available * const blob = await cesdk.engine.block.exportVideo(page); * } else { * // Show fallback UI or suggest server-side rendering * console.log('Video export not available - consider using CE.SDK Renderer'); * } * ``` * @public */ supportsVideoEncode(): Promise; } export { VariableAPI } export { VerticalBlockAlignment } /** * Context for the clip context menu which adds clip type filtering. * * @public */ export declare interface VideoClipMenuOrderContext extends OrderContext { clipType?: VideoClipType; } /** * The type of clip in the video timeline. * - `'clip'` — clips on the main (background) track * - `'overlay'` — clips on overlay tracks above the main track * - `'caption'` — caption clips * * @public */ export declare type VideoClipType = 'clip' | 'overlay' | 'caption'; /** * Action function for checking video decoding/playback support. * Returns true if WebCodecs APIs are available for video decoding and playback. * Shows a blocking error dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns true if video decoding is supported, false otherwise * @public */ export declare type VideoDecodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => boolean; /** * Action function for checking video encoding/export support. * Returns true if H.264 video encoding and AAC audio encoding are supported. * Shows a warning dialog if not supported (unless dialog is disabled). * * @param options - Options for configuring the action behavior * - dialog: false to disable the dialog, true for default, or VideoSupportDialogOptions for fine control * @returns A promise that resolves to true if video encoding is supported, false otherwise * @public */ export declare type VideoEncodeCheckSupportAction = (options?: { dialog?: boolean | VideoSupportDialogOptions; }) => Promise; export { VideoExportOptions } export { VideoMimeType } /** * Dialog display options for video support check actions. * Allows configuring whether and how the dialog is displayed. * @public */ export declare type VideoSupportDialogOptions = { /** Whether to show the dialog */ show: boolean; /** Backdrop style for the dialog - 'transparent' allows interaction with the page, 'opaque' blocks it */ backdrop?: 'transparent' | 'opaque'; }; /** * Represents the view style options in the Creative Editor SDK. * This type defines the possible view styles, which are 'advanced' and 'default'. * * @public */ export declare type ViewStyle = 'advanced' | 'default'; export { XYWH } export { ZoomAutoFitAxis } /** * Action function for zooming in by one step * @public */ export declare type ZoomInAction = (options?: { /** Custom step size for zoom in (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; export { ZoomOptions } /** * Action function for zooming out by one step * @public */ export declare type ZoomOutAction = (options?: { /** Custom step size for zoom out (default uses predefined steps) */ stepSize?: number; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; }) => void | Promise; /** * Zoom action types for explicit zoom control */ /** * Action function for zooming to a specific block * @public */ export declare type ZoomToBlockAction = (blockId: number, options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for setting zoom to a specific level * @public */ export declare type ZoomToLevelAction = (level: number, options?: { /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Minimum allowed zoom level (default: 0.125) */ minZoom?: number; /** Maximum allowed zoom level (default: 32) */ maxZoom?: number; }) => void | Promise; /** * Action function for zooming to a page with optional padding * @public */ export declare type ZoomToPageAction = (options?: { /** The page to zoom to - 'current' (default), 'first', 'last', or a numeric page index (0-based) */ page?: 'current' | 'first' | 'last' | number; /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; /** * Action function for zooming to the current selection * @public */ export declare type ZoomToSelectionAction = (options?: { /** Padding configuration around the block */ padding?: number | { x?: number; y?: number; } | { top?: number; bottom?: number; left?: number; right?: number; }; /** Animation configuration - boolean for default animation or object for custom settings */ animate?: boolean | { /** Duration of the animation in seconds */ duration?: number; /** Easing function for the animation */ easing?: 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut'; /** Whether the animation can be interrupted */ interruptible?: boolean; }; /** Whether to enable auto-fit mode after zooming (default: false) */ autoFit?: boolean; }) => Promise; export { }