@cesdk/engine 1.60.0-nightly.20250902 → 1.60.0-nightly.20250903

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -5853,6 +5853,14 @@ export declare type EditMode = 'Transform' | 'Crop' | 'Text' | 'Playback' | 'Tri
5853
5853
  * resource handling, and global scope controls. It serves as the central configuration and control interface
5854
5854
  * for the design editor engine.
5855
5855
  *
5856
+ * ## Settings API
5857
+ *
5858
+ * The recommended way to work with settings is through the unified API:
5859
+ * - `setSetting<K>(key: K, value: Settings[K])` - Set any setting value
5860
+ * - `getSetting<K>(key: K): Settings[K]` - Get any setting value
5861
+ *
5862
+ * Legacy methods are available in the `deprecated` namespace for backward compatibility.
5863
+ *
5856
5864
  * @categoryDescription Edit Mode Management
5857
5865
  * Control the editor's current editing mode and interaction state.
5858
5866
  *
@@ -6102,110 +6110,151 @@ export declare class EditorAPI {
6102
6110
  * @returns A method to unsubscribe from the event.
6103
6111
  */
6104
6112
  onRoleChanged: (callback: (role: RoleString) => void) => (() => void);
6113
+ /**
6114
+ * Set a setting value using the unified API.
6115
+ * The type of the value is automatically inferred from the key.
6116
+ *
6117
+ * @category Editor Settings
6118
+ * @param keypath - The setting key from Settings
6119
+ * @param value - The value to set (type-safe based on key)
6120
+ * @throws Error if the keypath is invalid or value type doesn't match
6121
+ *
6122
+ * @example
6123
+ * ```typescript
6124
+ * // Boolean setting
6125
+ * engine.editor.setSetting('doubleClickToCropEnabled', false);
6126
+ *
6127
+ * // Color setting
6128
+ * engine.editor.setSetting('highlightColor', { r: 1, g: 0, b: 1, a: 1 });
6129
+ *
6130
+ * // Enum setting
6131
+ * engine.editor.setSetting('doubleClickSelectionMode', 'Direct');
6132
+ * ```
6133
+ */
6134
+ setSetting<K extends SettingKey>(keypath: OptionalPrefix<K>, value: SettingValueType<K>): void;
6135
+ /**
6136
+ * Get a setting value using the unified API.
6137
+ * The return type is automatically inferred from the key.
6138
+ *
6139
+ * @category Editor Settings
6140
+ * @param keypath - The setting key from Settings
6141
+ * @returns The value of the setting (type-safe based on key)
6142
+ * @throws Error if the keypath is invalid
6143
+ *
6144
+ * @example
6145
+ * ```typescript
6146
+ * // Boolean setting
6147
+ * const cropEnabled = engine.editor.getSetting('doubleClickToCropEnabled');
6148
+ *
6149
+ * // Color setting
6150
+ * const highlight = engine.editor.getSetting('highlightColor');
6151
+ *
6152
+ * // Enum setting
6153
+ * const selectionMode = engine.editor.getSetting('doubleClickSelectionMode');
6154
+ * ```
6155
+ */
6156
+ getSetting<K extends SettingKey>(keypath: OptionalPrefix<K>): SettingValueType<K>;
6157
+
6158
+
6105
6159
  /**
6106
6160
  * Set a boolean setting value.
6107
6161
  *
6162
+ * @deprecated Use setSetting() instead.
6163
+ *
6108
6164
  * @category Editor Settings
6109
6165
  * @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`.
6110
6166
  * @param value - The boolean value to set.
6111
6167
  * @throws Error if the keypath is invalid.
6112
6168
  */
6113
- setSettingBool(keypath: SettingsBool, value: boolean): void;
6114
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6115
- setSettingBool(keypath: `ubq://${SettingsBool}`, value: boolean): void;
6116
-
6169
+ setSettingBool(keypath: OptionalPrefix<SettingsBool>, value: boolean): void;
6117
6170
  /**
6118
6171
  * Get a boolean setting value.
6119
6172
  *
6173
+ * @deprecated Use getSetting() instead.
6120
6174
  * @category Editor Settings
6121
6175
  * @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`.
6122
6176
  * @returns The boolean value of the setting.
6123
6177
  * @throws Error if the keypath is invalid.
6124
6178
  */
6125
- getSettingBool(keypath: SettingsBool): boolean;
6126
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6127
- getSettingBool(keypath: `ubq://${SettingsBool}`): boolean;
6128
-
6179
+ getSettingBool(keypath: OptionalPrefix<SettingsBool>): boolean;
6129
6180
  /**
6130
6181
  * Set an integer setting value.
6131
6182
  *
6183
+ * @deprecated Use setSetting() instead.
6132
6184
  * @category Editor Settings
6133
6185
  * @param keypath - The settings keypath.
6134
6186
  * @param value - The integer value to set.
6135
6187
  * @throws Error if the keypath is invalid.
6136
6188
  */
6137
- setSettingInt(keypath: string, value: number): void;
6189
+ setSettingInt(keypath: SettingsInt, value: number): void;
6138
6190
  /**
6139
6191
  * Get an integer setting value.
6140
6192
  *
6193
+ * @deprecated Use getSetting() instead.
6141
6194
  * @category Editor Settings
6142
6195
  * @param keypath - The settings keypath.
6143
6196
  * @returns The integer value of the setting.
6144
6197
  * @throws Error if the keypath is invalid.
6145
6198
  */
6146
- getSettingInt(keypath: string): number;
6199
+ getSettingInt(keypath: SettingsInt): number;
6147
6200
  /**
6148
6201
  * Set a float setting value.
6149
6202
  *
6203
+ * @deprecated Use setSetting() instead.
6150
6204
  * @category Editor Settings
6151
6205
  * @param keypath - The settings keypath, e.g. `positionSnappingThreshold`.
6152
6206
  * @param value - The float value to set.
6153
6207
  * @throws Error if the keypath is invalid.
6154
6208
  */
6155
- setSettingFloat(keypath: SettingsFloat, value: number): void;
6156
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6157
- setSettingFloat(keypath: `ubq://${SettingsFloat}`, value: number): void;
6209
+ setSettingFloat(keypath: OptionalPrefix<SettingsFloat>, value: number): void;
6158
6210
  /**
6159
6211
  * Get a float setting value.
6160
6212
  *
6213
+ * @deprecated Use getSetting() instead.
6161
6214
  * @category Editor Settings
6162
6215
  * @param keypath - The settings keypath, e.g. `positionSnappingThreshold`.
6163
6216
  * @returns The float value of the setting.
6164
6217
  * @throws Error if the keypath is invalid.
6165
6218
  */
6166
- getSettingFloat(keypath: SettingsFloat): number;
6167
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6168
- getSettingFloat(keypath: `ubq://${SettingsFloat}`): number;
6219
+ getSettingFloat(keypath: OptionalPrefix<SettingsFloat>): number;
6169
6220
  /**
6170
6221
  * Set a string setting value.
6171
6222
  *
6223
+ * @deprecated Use setSetting() instead.
6172
6224
  * @category Editor Settings
6173
6225
  * @param keypath - The settings keypath, e.g. `license`.
6174
6226
  * @param value - The string value to set.
6175
6227
  * @throws Error if the keypath is invalid.
6176
6228
  */
6177
- setSettingString(keypath: SettingsString, value: string): void;
6178
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6179
- setSettingString(keypath: `ubq://${SettingsString}`, value: string): void;
6229
+ setSettingString(keypath: OptionalPrefix<SettingsString>, value: string): void;
6180
6230
  /**
6181
6231
  * Get a string setting value.
6182
6232
  *
6233
+ * @deprecated Use getSetting() instead.
6183
6234
  * @category Editor Settings
6184
6235
  * @param keypath - The settings keypath, e.g. `license`.
6185
6236
  * @returns The string value of the setting.
6186
6237
  * @throws Error if the keypath is invalid.
6187
6238
  */
6188
- getSettingString(keypath: SettingsString): string;
6189
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6190
- getSettingString(keypath: `ubq://${SettingsString}`): string;
6239
+ getSettingString(keypath: OptionalPrefix<SettingsString>): string;
6191
6240
  /**
6192
6241
  * Set a color setting.
6242
+ *
6243
+ * @deprecated Use setSetting() instead.
6193
6244
  * @category Editor Settings
6194
6245
  * @param keypath - The settings keypath, e.g. `highlightColor`.
6195
6246
  * @param value - The The value to set.
6196
6247
  */
6197
- setSettingColor(keypath: SettingsColor, value: Color): void;
6198
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6199
- setSettingColor(keypath: `ubq://${SettingsColor}`, value: Color): void;
6248
+ setSettingColor(keypath: OptionalPrefix<SettingsColor>, value: Color): void;
6200
6249
  /**
6201
6250
  * Get a color setting.
6251
+ *
6252
+ * @deprecated Use getSetting() instead.
6202
6253
  * @category Editor Settings
6203
6254
  * @param keypath - The settings keypath, e.g. `highlightColor`.
6204
6255
  * @throws An error, if the keypath is invalid.
6205
6256
  */
6206
- getSettingColor(keypath: SettingsColor): Color;
6207
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6208
- getSettingColor(keypath: `ubq://${SettingsColor}`): Color;
6257
+ getSettingColor(keypath: OptionalPrefix<SettingsColor>): Color;
6209
6258
  /**
6210
6259
  * Set a color setting.
6211
6260
  * @param keypath - The settings keypath, e.g. `highlightColor`.
@@ -6215,34 +6264,32 @@ export declare class EditorAPI {
6215
6264
  * @param a - The alpha color component in the range of 0 to 1.
6216
6265
  * @deprecated Use setSettingColor() instead.
6217
6266
  */
6218
- setSettingColorRGBA(keypath: SettingsColorRGBA | `ubq://${SettingsColorRGBA}`, r: number, g: number, b: number, a?: number): void;
6267
+ setSettingColorRGBA(keypath: OptionalPrefix<SettingsColorRGBA>, r: number, g: number, b: number, a?: number): void;
6219
6268
  /**
6220
6269
  * Get a color setting.
6221
6270
  * @param keypath - The settings keypath, e.g. `highlightColor`.
6222
6271
  * @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
6223
6272
  * @deprecated Use getSettingColor() instead.
6224
6273
  */
6225
- getSettingColorRGBA(keypath: SettingsColorRGBA | `ubq://${SettingsColorRGBA}`): RGBA;
6274
+ getSettingColorRGBA(keypath: OptionalPrefix<SettingsColorRGBA>): RGBA;
6226
6275
  /**
6227
6276
  * Set an enum setting.
6277
+ *
6278
+ * @deprecated Use setSetting() instead.
6228
6279
  * @category Editor Settings
6229
6280
  * @param keypath - The settings keypath, e.g. `doubleClickSelectionMode`.
6230
6281
  * @param value - The enum value as string.
6231
6282
  */
6232
6283
  setSettingEnum<T extends keyof SettingsEnum>(keypath: T, value: SettingsEnum[T]): void;
6233
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6234
- setSettingEnum<T extends keyof SettingsEnum>(keypath: `ubq://${T}`, value: SettingsEnum[T]): void;
6235
-
6236
6284
  /**
6237
6285
  * Get an enum setting.
6286
+ *
6287
+ * @deprecated Use getSetting() instead.
6238
6288
  * @category Editor Settings
6239
6289
  * @param keypath - The settings keypath, e.g. `doubleClickSelectionMode`.
6240
6290
  * @returns The value as string.
6241
6291
  */
6242
6292
  getSettingEnum<T extends keyof SettingsEnum>(keypath: T): SettingsEnum[T];
6243
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6244
- getSettingEnum<T extends keyof SettingsEnum>(keypath: `ubq://${T}`): SettingsEnum[T];
6245
-
6246
6293
  /**
6247
6294
  * Get the possible enum options for a given enum setting.
6248
6295
  * @category Editor Settings
@@ -6250,8 +6297,6 @@ export declare class EditorAPI {
6250
6297
  * @returns The possible enum options as strings.
6251
6298
  */
6252
6299
  getSettingEnumOptions<T extends keyof SettingsEnum>(keypath: T): string[];
6253
- /** @deprecated Support for `ubq://` prefixed keypaths will be removed in a future release. */
6254
- getSettingEnumOptions<T extends keyof SettingsEnum>(keypath: `ubq://${T}`): string[];
6255
6300
  /**
6256
6301
  * Set the user role and apply role-dependent defaults.
6257
6302
  *
@@ -6273,7 +6318,7 @@ export declare class EditorAPI {
6273
6318
  * @category Editor Settings
6274
6319
  * @returns A list of settings keypaths.
6275
6320
  */
6276
- findAllSettings(): string[];
6321
+ findAllSettings(): SettingKey[];
6277
6322
  /**
6278
6323
  * Returns the type of a setting.
6279
6324
  * @category Editor Settings
@@ -7235,6 +7280,12 @@ declare type OffscreenCanvas_2 = {
7235
7280
  };
7236
7281
  export { OffscreenCanvas_2 as OffscreenCanvas }
7237
7282
 
7283
+ /**
7284
+ * Type helper for settings keypaths that can optionally include the 'ubq://' prefix.
7285
+ * @public
7286
+ */
7287
+ export declare type OptionalPrefix<T extends string> = `ubq://${T}` | T;
7288
+
7238
7289
  /** @public */
7239
7290
  export declare interface PageDuration {
7240
7291
  pageId: DesignBlockId;
@@ -8027,95 +8078,216 @@ export declare type SceneMode = 'Design' | 'Video';
8027
8078
  export declare type Scope = 'text/edit' | 'text/character' | 'fill/change' | 'fill/changeType' | 'stroke/change' | 'shape/change' | 'layer/move' | 'layer/resize' | 'layer/rotate' | 'layer/flip' | 'layer/crop' | 'layer/opacity' | 'layer/blendMode' | 'layer/visibility' | 'layer/clipping' | 'appearance/adjustments' | 'appearance/filter' | 'appearance/effect' | 'appearance/blur' | 'appearance/shadow' | 'appearance/animation' | 'lifecycle/destroy' | 'lifecycle/duplicate' | 'editor/add' | 'editor/select';
8028
8079
 
8029
8080
  /**
8030
- * Represents the boolean settings available in the editor.
8081
+ * Union type of all valid setting keys.
8082
+ * @public
8083
+ */
8084
+ export declare type SettingKey = keyof Settings;
8085
+
8086
+ /**
8087
+ * Map of all available settings with their types.
8088
+ * This provides type-safe access to all editor settings.
8089
+ *
8090
+ * @public
8031
8091
  *
8032
8092
  * @categoryDescription Boolean Settings
8033
- * Defines the possible boolean settings in the editor.
8034
- * - 'controlGizmo/showCropHandles': Show crop handles in the control gizmo.
8035
- * - 'controlGizmo/showCropScaleHandles': Show crop scale handles in the control gizmo.
8036
- * - 'controlGizmo/showMoveHandles': Show move handles in the control gizmo.
8037
- * - 'controlGizmo/showResizeHandles': Show resize handles in the control gizmo.
8038
- * - 'controlGizmo/showRotateHandles': Show rotate handles in the control gizmo.
8039
- * - 'controlGizmo/showScaleHandles': Show scale handles in the control gizmo.
8040
- * - 'doubleClickToCropEnabled': Enable double-click to crop.
8041
- * - 'features/singlePageModeEnabled': Enable single page mode.
8042
- * - 'features/pageCarouselEnabled': Enable page carousel.
8043
- * - 'features/transformEditsRetainCoverMode': Retain cover mode during transform edits.
8044
- * - 'mouse/enableScroll': Enable mouse scroll.
8045
- * - 'mouse/enableZoom': Enable mouse zoom.
8046
- * - 'page/allowCropInteraction': Allow crop interaction on pages.
8047
- * - 'page/allowMoveInteraction': Allow move interaction on pages.
8048
- * - 'page/allowResizeInteraction': Allow resize interaction on pages.
8049
- * - 'page/allowRotateInteraction': Allow rotate interaction on pages.
8050
- * - 'page/dimOutOfPageAreas': Dim out-of-page areas.
8051
- * - 'page/restrictResizeInteractionToFixedAspectRatio': Restrict resize interaction to fixed aspect ratio.
8052
- * - 'page/moveChildrenWhenCroppingFill': Move children when cropping fill.
8053
- * - 'page/title/appendPageName': Append page name to the title.
8054
- * - 'page/title/show': Show page title.
8055
- * - 'page/title/showOnSinglePage': Show page title on single page.
8056
- * - 'page/title/showPageTitleTemplate': Show page title template.
8057
- * - 'placeholderControls/showButton': Show button in placeholder controls.
8058
- * - 'placeholderControls/showOverlay': Show overlay in placeholder controls.
8059
- * - 'blockAnimations/enabled': Enable block animations.
8060
- * - 'showBuildVersion': Show build version.
8061
- * - 'touch/dragStartCanSelect': Allow drag start to select.
8062
- * - 'touch/singlePointPanning': Enable single-point panning.
8063
- * - 'useSystemFontFallback': Use system font fallback.
8064
- * - 'forceSystemEmojis': Force system emojis.
8065
- *
8066
- * @public
8067
- */
8068
- export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'features/transformEditsRetainCoverMode' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'page/allowCropInteraction' | 'page/allowMoveInteraction' | 'page/allowResizeInteraction' | 'page/allowRotateInteraction' | 'page/dimOutOfPageAreas' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/moveChildrenWhenCroppingFill' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'useSystemFontFallback' | 'forceSystemEmojis';
8093
+ * Boolean settings control various on/off features in the editor:
8094
+ * - Control gizmo visibility settings (crop, move, resize, rotate, scale handles)
8095
+ * - Feature flags (single page mode, page carousel, animations)
8096
+ * - Interaction permissions (mouse scroll/zoom, touch gestures, page interactions)
8097
+ * - Display options (build version, placeholders, page titles)
8098
+ *
8099
+ * @categoryDescription String Settings
8100
+ * String settings configure paths and textual values:
8101
+ * - Resource paths (base path, font URIs)
8102
+ * - License configuration
8103
+ * - Title formatting (separator, font)
8104
+ *
8105
+ * @categoryDescription Float Settings
8106
+ * Float settings define numerical thresholds and limits:
8107
+ * - Snapping thresholds for position and rotation
8108
+ * - Scale limits for control gizmos
8109
+ *
8110
+ * @categoryDescription Integer Settings
8111
+ * Integer settings specify whole number limits:
8112
+ * - Maximum image size constraints
8113
+ *
8114
+ * @categoryDescription Color Settings
8115
+ * Color settings control the visual appearance:
8116
+ * - UI element colors (borders, overlays, highlights)
8117
+ * - Guide colors (snapping, rotation, rule of thirds)
8118
+ * - State colors (error, progress, placeholder highlights)
8119
+ *
8120
+ * @categoryDescription Enum Settings
8121
+ * Enum settings provide predefined choice options:
8122
+ * - Selection modes
8123
+ * - Touch gesture actions
8124
+ * - Camera behavior modes
8125
+ */
8126
+ export declare interface Settings {
8127
+ /** Whether to show handles for adjusting the crop area during crop mode. */
8128
+ 'controlGizmo/showCropHandles': boolean;
8129
+ /** Whether to display the outer handles that scale the full image during crop. */
8130
+ 'controlGizmo/showCropScaleHandles': boolean;
8131
+ /** Whether to show the move handles. */
8132
+ 'controlGizmo/showMoveHandles': boolean;
8133
+ /** Whether to display the non-proportional resize handles (edge handles). */
8134
+ 'controlGizmo/showResizeHandles': boolean;
8135
+ /** Whether to show the rotation handles. */
8136
+ 'controlGizmo/showRotateHandles': boolean;
8137
+ /** Whether to display the proportional scale handles (corner handles). */
8138
+ 'controlGizmo/showScaleHandles': boolean;
8139
+ /** Enable double-click to enter crop mode. */
8140
+ doubleClickToCropEnabled: boolean;
8141
+ /** Enable single page mode where only one page is shown at a time. */
8142
+ 'features/singlePageModeEnabled': boolean;
8143
+ /** Enable the page carousel for navigating between pages. */
8144
+ 'features/pageCarouselEnabled': boolean;
8145
+ /** Whether transform edits should retain the cover mode of the content. */
8146
+ 'features/transformEditsRetainCoverMode': boolean;
8147
+ /** Whether the engine processes mouse scroll events. */
8148
+ 'mouse/enableScroll': boolean;
8149
+ /** Whether the engine processes mouse zoom events. */
8150
+ 'mouse/enableZoom': boolean;
8151
+ /** Whether crop interaction (by handles and gestures) should be possible. */
8152
+ 'page/allowCropInteraction': boolean;
8153
+ /** Whether move interaction should be possible when page layout is not controlled by the scene. */
8154
+ 'page/allowMoveInteraction': boolean;
8155
+ /** Whether resize interaction (by handles and gestures) should be possible. */
8156
+ 'page/allowResizeInteraction': boolean;
8157
+ /** Whether rotation interaction should be possible when page layout is not controlled by the scene. */
8158
+ 'page/allowRotateInteraction': boolean;
8159
+ /** Whether the opacity of the region outside of all pages should be reduced. */
8160
+ 'page/dimOutOfPageAreas': boolean;
8161
+ /** Whether resize interaction should be restricted to fixed aspect ratio. */
8162
+ 'page/restrictResizeInteractionToFixedAspectRatio': boolean;
8163
+ /** Whether children of the page should be transformed to match their old position when cropping. */
8164
+ 'page/moveChildrenWhenCroppingFill': boolean;
8165
+ /** Whether to append the page name to the title even if not specified in the template. */
8166
+ 'page/title/appendPageName': boolean;
8167
+ /** Whether to show titles above each page. */
8168
+ 'page/title/show': boolean;
8169
+ /** Whether to hide the page title when only a single page exists. */
8170
+ 'page/title/showOnSinglePage': boolean;
8171
+ /** Whether to include the default page title from page.titleTemplate. */
8172
+ 'page/title/showPageTitleTemplate': boolean;
8173
+ /** Whether to show the placeholder button. */
8174
+ 'placeholderControls/showButton': boolean;
8175
+ /** Whether to show the overlay pattern for placeholders. */
8176
+ 'placeholderControls/showOverlay': boolean;
8177
+ /** Whether animations should be enabled or not. */
8178
+ 'blockAnimations/enabled': boolean;
8179
+ /** Whether to display the build version in the UI. */
8180
+ showBuildVersion: boolean;
8181
+ /** Whether drag start can select elements. */
8182
+ 'touch/dragStartCanSelect': boolean;
8183
+ /** Whether single-point panning is enabled for touch interactions. */
8184
+ 'touch/singlePointPanning': boolean;
8185
+ /** Whether to use system font as fallback for missing glyphs. */
8186
+ useSystemFontFallback: boolean;
8187
+ /** Whether to force the use of system emojis instead of custom emoji fonts. */
8188
+ forceSystemEmojis: boolean;
8189
+ /** The root directory used when resolving relative paths or accessing bundle:// URIs. */
8190
+ basePath: string;
8191
+ /** The URI for the default emoji font file. */
8192
+ defaultEmojiFontFileUri: string;
8193
+ /** The URI for the default font file. */
8194
+ defaultFontFileUri: string;
8195
+ /** The license key for the SDK. */
8196
+ license: string;
8197
+ /** The font file URI for page titles. */
8198
+ 'page/title/fontFileUri': string;
8199
+ /** The separator between page number and page name in titles. */
8200
+ 'page/title/separator': string;
8201
+ /** The URI for the fallback font used when glyphs are missing. */
8202
+ fallbackFontUri: string;
8203
+ /** Scale-down limit for blocks in screen pixels when scaling with gizmos or touch gestures. */
8204
+ 'controlGizmo/blockScaleDownLimit': number;
8205
+ /** The threshold distance in pixels for position snapping. */
8206
+ positionSnappingThreshold: number;
8207
+ /** The threshold angle in degrees for rotation snapping. */
8208
+ rotationSnappingThreshold: number;
8209
+ /** The maximum size (width or height) in pixels for images. */
8210
+ maxImageSize: number;
8211
+ /** The color of the border outline for selected elements. */
8212
+ borderOutlineColor: Color;
8213
+ /** The background clear color. */
8214
+ clearColor: Color;
8215
+ /** The color used for color masking effects. */
8216
+ 'colorMaskingSettings/maskColor': Color;
8217
+ /** The color of the crop overlay. */
8218
+ cropOverlayColor: Color;
8219
+ /** The color indicating an error state. */
8220
+ errorStateColor: Color;
8221
+ /** The highlight color for selected or active elements. */
8222
+ highlightColor: Color;
8223
+ /** The color of the inner frame around the page. */
8224
+ 'page/innerBorderColor': Color;
8225
+ /** The color filled into the bleed margins of pages. */
8226
+ 'page/marginFillColor': Color;
8227
+ /** The color of the frame around the bleed margin area. */
8228
+ 'page/marginFrameColor': Color;
8229
+ /** The color of the outer frame around the page. */
8230
+ 'page/outerBorderColor': Color;
8231
+ /** The color of page titles visible in preview mode. */
8232
+ 'page/title/color': Color;
8233
+ /** The highlight color for placeholder elements. */
8234
+ placeholderHighlightColor: Color;
8235
+ /** The color indicating progress or loading states. */
8236
+ progressColor: Color;
8237
+ /** The color of rotation snapping guide lines. */
8238
+ rotationSnappingGuideColor: Color;
8239
+ /** The color of rule of thirds guide lines. */
8240
+ ruleOfThirdsLineColor: Color;
8241
+ /** The color of snapping guide lines. */
8242
+ snappingGuideColor: Color;
8243
+ /** The highlight color for text variables. */
8244
+ textVariableHighlightColor: Color;
8245
+ /** The selection mode for double-click: Direct selects the clicked element, Hierarchical traverses the hierarchy. */
8246
+ doubleClickSelectionMode: 'Direct' | 'Hierarchical';
8247
+ /** The action performed for pinch gestures: None, Zoom, or Scale. */
8248
+ 'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
8249
+ /** The action performed for rotate gestures: None or Rotate. */
8250
+ 'touch/rotateAction': 'None' | 'Rotate';
8251
+ /** Controls behavior when clamp area is smaller than viewport: Center or Reverse. */
8252
+ 'camera/clamping/overshootMode': 'Center' | 'Reverse';
8253
+
8254
+
8255
+
8256
+
8257
+
8258
+
8259
+
8260
+
8261
+
8262
+
8263
+
8264
+
8265
+
8266
+
8267
+ }
8069
8268
 
8070
8269
  /**
8071
- * Represents the color settings available in the editor.
8270
+ * Represents the boolean settings available in the editor.
8072
8271
  *
8073
- * @categoryDescription Color Settings
8074
- * Defines the possible color settings in the editor.
8075
- * - 'borderOutlineColor': The color of the border outline.
8076
- * - 'clearColor': The clear color.
8077
- * - 'colorMaskingSettings/maskColor': The color used for masking.
8078
- * - 'cropOverlayColor': The color of the crop overlay.
8079
- * - 'errorStateColor': The color indicating an error state.
8080
- * - 'highlightColor': The highlight color.
8081
- * - 'page/innerBorderColor': The color of the inner border of the page.
8082
- * - 'page/marginFillColor': The color of the margin fill.
8083
- * - 'page/marginFrameColor': The color of the margin frame.
8084
- * - 'page/outerBorderColor': The color of the outer border of the page.
8085
- * - 'page/title/color': The color of the page title.
8086
- * - 'placeholderHighlightColor': The highlight color for placeholders.
8087
- * - 'progressColor': The color indicating progress.
8088
- * - 'rotationSnappingGuideColor': The color of the rotation snapping guide.
8089
- * - 'ruleOfThirdsLineColor': The color of the rule of thirds lines.
8090
- * - 'snappingGuideColor': The color of the snapping guide.
8091
- * - 'textVariableHighlightColor': The highlight color for text variables.
8092
- *
8093
- * @public
8094
- */
8095
- export declare type SettingsColor = 'borderOutlineColor' | 'clearColor' | 'colorMaskingSettings/maskColor' | 'cropOverlayColor' | 'errorStateColor' | 'highlightColor' | 'page/innerBorderColor' | 'page/marginFillColor' | 'page/marginFrameColor' | 'page/outerBorderColor' | 'page/title/color' | 'placeholderHighlightColor' | 'progressColor' | 'rotationSnappingGuideColor' | 'ruleOfThirdsLineColor' | 'snappingGuideColor' | 'textVariableHighlightColor';
8272
+ * @deprecated Use keyof Settings or extract the boolean keys from Settings instead.
8273
+ * @public
8274
+ */
8275
+ export declare type SettingsBool = {
8276
+ [K in keyof Settings]: Settings[K] extends boolean ? K : never;
8277
+ }[keyof Settings];
8096
8278
 
8097
8279
  /**
8098
8280
  * Represents the color settings available in the editor.
8099
8281
  *
8100
- * @categoryDescription Color Settings
8101
- * Defines the possible color settings in the editor.
8102
- * - 'borderOutlineColor': The color of the border outline.
8103
- * - 'clearColor': The clear color.
8104
- * - 'colorMaskingSettings/maskColor': The color used for masking.
8105
- * - 'cropOverlayColor': The color of the crop overlay.
8106
- * - 'errorStateColor': The color indicating an error state.
8107
- * - 'highlightColor': The highlight color.
8108
- * - 'page/innerBorderColor': The color of the inner border of the page.
8109
- * - 'page/marginFillColor': The color of the margin fill.
8110
- * - 'page/marginFrameColor': The color of the margin frame.
8111
- * - 'page/outerBorderColor': The color of the outer border of the page.
8112
- * - 'page/title/color': The color of the page title.
8113
- * - 'placeholderHighlightColor': The highlight color for placeholders.
8114
- * - 'progressColor': The color indicating progress.
8115
- * - 'rotationSnappingGuideColor': The color of the rotation snapping guide.
8116
- * - 'ruleOfThirdsLineColor': The color of the rule of thirds lines.
8117
- * - 'snappingGuideColor': The color of the snapping guide.
8118
- * - 'textVariableHighlightColor': The highlight color for text variables.
8282
+ * @deprecated Use keyof Settings or extract the color keys from Settings instead.
8283
+ * @public
8284
+ */
8285
+ export declare type SettingsColor = {
8286
+ [K in keyof Settings]: Settings[K] extends Color ? K : never;
8287
+ }[keyof Settings];
8288
+
8289
+ /**
8290
+ * Represents the color settings available in the editor.
8119
8291
  *
8120
8292
  * @public
8121
8293
  * @deprecated Use SettingsColor instead.
@@ -8125,50 +8297,37 @@ export declare type SettingsColorRGBA = SettingsColor;
8125
8297
  /**
8126
8298
  * Represents the enum settings available in the editor.
8127
8299
  *
8128
- * Defines the possible enum settings in the editor.
8129
- * - 'doubleClickSelectionMode': The mode for double-click selection.
8130
- * - 'touch/pinchAction': The action for pinch gestures.
8131
- * - 'touch/rotateAction': The action for rotate gestures.
8132
- * - 'camera/clamping/overshootMode': The mode for camera clamping overshoot.
8133
- *
8300
+ * @deprecated Use keyof Settings or extract the enum keys from Settings instead.
8134
8301
  * @public
8135
8302
  */
8136
- export declare type SettingsEnum = {
8137
- doubleClickSelectionMode: 'Direct' | 'Hierarchical';
8138
- 'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
8139
- 'touch/rotateAction': 'None' | 'Rotate';
8140
- 'camera/clamping/overshootMode': 'Center' | 'Reverse';
8141
- };
8303
+ export declare type SettingsEnum = Pick<Settings, 'doubleClickSelectionMode' | 'touch/pinchAction' | 'touch/rotateAction' | 'camera/clamping/overshootMode'>;
8142
8304
 
8143
8305
  /**
8144
8306
  * Represents the float settings available in the editor.
8145
8307
  *
8146
- * @categoryDescription Float Settings
8147
- * Defines the possible float settings in the editor.
8148
- * - 'controlGizmo/blockScaleDownLimit': The scale down limit for the control gizmo block.
8149
- * - 'positionSnappingThreshold': The threshold for position snapping.
8150
- * - 'rotationSnappingThreshold': The threshold for rotation snapping.
8308
+ * @deprecated Use keyof Settings or extract the float keys from Settings instead.
8309
+ * @public
8310
+ */
8311
+ export declare type SettingsFloat = Exclude<{
8312
+ [K in keyof Settings]: Settings[K] extends number ? K : never;
8313
+ }[keyof Settings], SettingsInt>;
8314
+
8315
+ /**
8316
+ * Represents the integer settings available in the editor.
8151
8317
  *
8152
8318
  * @public
8153
8319
  */
8154
- export declare type SettingsFloat = 'controlGizmo/blockScaleDownLimit' | 'positionSnappingThreshold' | 'rotationSnappingThreshold';
8320
+ export declare type SettingsInt = 'maxImageSize';
8155
8321
 
8156
8322
  /**
8157
8323
  * Represents the string settings available in the editor.
8158
8324
  *
8159
- * @categoryDescription String Settings
8160
- * Defines the possible string settings in the editor.
8161
- * - 'basePath': The base path for resources.
8162
- * - 'defaultEmojiFontFileUri': The default URI for the emoji font file.
8163
- * - 'defaultFontFileUri': The default URI for the font file.
8164
- * - 'license': The license key.
8165
- * - 'page/title/fontFileUri': The URI for the page title font file.
8166
- * - 'page/title/separator': The separator for the page title.
8167
- * - 'fallbackFontUri': The URI for the fallback font.
8168
- *
8325
+ * @deprecated Use keyof Settings or extract the string keys from Settings instead.
8169
8326
  * @public
8170
8327
  */
8171
- export declare type SettingsString = 'basePath' | 'defaultEmojiFontFileUri' | 'defaultFontFileUri' | 'license' | 'page/title/fontFileUri' | 'page/title/separator' | 'fallbackFontUri';
8328
+ export declare type SettingsString = Exclude<{
8329
+ [K in keyof Settings]: Settings[K] extends string ? K : never;
8330
+ }[keyof Settings], keyof SettingsEnum | 'renderMode'>;
8172
8331
 
8173
8332
  /**
8174
8333
  * Represents the type of a setting.
@@ -8186,6 +8345,12 @@ export declare type SettingsString = 'basePath' | 'defaultEmojiFontFileUri' | 'd
8186
8345
  */
8187
8346
  export declare type SettingType = 'Bool' | 'Int' | 'Float' | 'String' | 'Color' | 'Enum';
8188
8347
 
8348
+ /**
8349
+ * Gets the value type for a specific setting key.
8350
+ * @public
8351
+ */
8352
+ export declare type SettingValueType<K extends SettingKey> = Settings[K];
8353
+
8189
8354
  /**
8190
8355
  * The block type IDs for the shape blocks. These are the IDs used to create new shapes
8191
8356
  * using `cesdk.engine.block.createShape(id)`.