@cesdk/engine 1.58.0-nightly.20250730 → 1.58.0-nightly.20250807

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
@@ -1018,7 +1018,6 @@ export declare type AssetTransformPreset = AssetFixedAspectRatio | AssetFreeAspe
1018
1018
  /**
1019
1019
  * Represents the options for exporting audio.
1020
1020
  *
1021
- * @categoryDescription Audio Export Options
1022
1021
  * Defines the possible options for exporting audio.
1023
1022
  * - 'mimeType': The MIME type of the output audio file.
1024
1023
  * - 'onProgress': A callback which reports on the progress of the export.
@@ -1391,6 +1390,10 @@ export declare class BlockAPI {
1391
1390
  * @category Block Lifecycle
1392
1391
  * @param blocks - The blocks to save.
1393
1392
  * @param allowedResourceSchemes - The resource schemes to allow in the saved string. Defaults to ['buffer', 'http', 'https'].
1393
+ * @param onDisallowedResourceScheme - An optional callback that is called for each resource URL that has a scheme absent from
1394
+ * `resourceSchemesAllowed`. The `url` parameter is the resource URL and the `dataHash` parameter is the hash of the
1395
+ * resource's data. The callback should return a new URL for the resource, which will be used in the serialized
1396
+ * scene. The callback is expected to return the original URL if no persistence is needed.
1394
1397
  * @returns A promise that resolves to a string representing the blocks or an error.
1395
1398
  * @example
1396
1399
  * ```typescript
@@ -1403,7 +1406,7 @@ export declare class BlockAPI {
1403
1406
  * const serialized = await engine.block.saveToString([page]);
1404
1407
  * ```
1405
1408
  */
1406
- saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[]): Promise<string>;
1409
+ saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
1407
1410
  /**
1408
1411
  * Saves the given blocks and their assets to a zip archive.
1409
1412
  *
@@ -5018,9 +5021,6 @@ export declare class BlockAPI {
5018
5021
  * The `BlockEvent` interface provides a set of properties that describe an event related to
5019
5022
  * a design block, including the block ID and the type of event.
5020
5023
  *
5021
- * @categoryDescription BlockEvent
5022
- * Methods for working with events related to design blocks.
5023
- *
5024
5024
  * @public
5025
5025
  */
5026
5026
  export declare interface BlockEvent {
@@ -5047,9 +5047,6 @@ export declare type BlockState = BlockStateError | BlockStatePending | BlockStat
5047
5047
  * The `BlockStateError` interface provides a set of properties that describe an error state
5048
5048
  * for a design block, including the type of error and a description of the error.
5049
5049
  *
5050
- * @categoryDescription BlockStateError
5051
- * Methods for working with error states for design blocks.
5052
- *
5053
5050
  * @public
5054
5051
  */
5055
5052
  export declare interface BlockStateError {
@@ -5063,9 +5060,6 @@ export declare interface BlockStateError {
5063
5060
  * The `BlockStatePending` interface provides a set of properties that describe a pending
5064
5061
  * state for a design block, including the type of state and the progress of the operation.
5065
5062
  *
5066
- * @categoryDescription BlockStatePending
5067
- * Methods for working with pending states for design blocks.
5068
- *
5069
5063
  * @public
5070
5064
  */
5071
5065
  export declare interface BlockStatePending {
@@ -5080,9 +5074,6 @@ export declare interface BlockStatePending {
5080
5074
  * The `BlockStateReady` interface provides a set of properties that describe a ready state
5081
5075
  * for a design block, including the type of state.
5082
5076
  *
5083
- * @categoryDescription BlockStateReady
5084
- * Methods for working with ready states for design blocks.
5085
- *
5086
5077
  * @public
5087
5078
  */
5088
5079
  export declare interface BlockStateReady {
@@ -5127,7 +5118,6 @@ export declare type BlurTypeShorthand = 'uniform' | 'linear' | 'mirrored' | 'rad
5127
5118
  /**
5128
5119
  * Represents the names of boolean operations.
5129
5120
  *
5130
- * @categoryDescription Boolean Operation
5131
5121
  * Defines the possible boolean operations.
5132
5122
  * - 'Difference': The difference between two shapes.
5133
5123
  * - 'Intersection': The intersection of two shapes.
@@ -5144,9 +5134,6 @@ export declare type BooleanOperation = 'Difference' | 'Intersection' | 'Union' |
5144
5134
  * The `Buffer` interface provides a set of properties that describe a buffer of data,
5145
5135
  * including a handle and the buffer itself.
5146
5136
  *
5147
- * @categoryDescription Buffer
5148
- * Methods for working with buffers of data.
5149
- *
5150
5137
  * @public
5151
5138
  */
5152
5139
  export declare interface Buffer {
@@ -5188,7 +5175,6 @@ export declare type CMYK = [c: number, m: number, y: number, k: number];
5188
5175
  /**
5189
5176
  * Represents a CMYK color value.
5190
5177
  *
5191
- * @categoryDescription CMYK Color
5192
5178
  * Defines a CMYK color value with components between 0 and 1.
5193
5179
  * - 'c': The cyan component.
5194
5180
  * - 'm': The magenta component.
@@ -5263,9 +5249,6 @@ export declare interface CompleteAssetResult extends AssetResult {
5263
5249
  * user ID, core settings, logger, feature flags, presets, force WebGL1, audio output,
5264
5250
  * and role.
5265
5251
  *
5266
- * @categoryDescription Configuration
5267
- * Methods for configuring the settings of the Creative Editor SDK.
5268
- *
5269
5252
  * @public
5270
5253
  */
5271
5254
  export declare interface Configuration {
@@ -6474,7 +6457,6 @@ export declare type EffectTypeShorthand = 'adjustments' | 'cross_cut' | 'dot_pat
6474
6457
  /**
6475
6458
  * Represents an engine plugin.
6476
6459
  *
6477
- * @categoryDescription Engine Plugin
6478
6460
  * Defines the structure of an engine plugin, including its name, version, and initialization function.
6479
6461
  * - 'name': The name of the plugin.
6480
6462
  * - 'version': The version of the plugin.
@@ -6491,7 +6473,6 @@ export declare interface EnginePlugin {
6491
6473
  /**
6492
6474
  * Represents the context for an engine plugin.
6493
6475
  *
6494
- * @categoryDescription Engine Plugin Context
6495
6476
  * Defines the context provided to an engine plugin, including APIs for assets, blocks, scenes, editor, events, and variables.
6496
6477
  * - 'engine': The engine instance containing APIs for asset, block, scene, editor, event, and variable management.
6497
6478
  *
@@ -6553,7 +6534,6 @@ declare interface ExportAudioOptions {
6553
6534
  /**
6554
6535
  * Represents the options for exporting a design block.
6555
6536
  *
6556
- * @categoryDescription Export Options
6557
6537
  * Defines the possible options for exporting a design block.
6558
6538
  * - 'mimeType': The MIME type of the output file.
6559
6539
  * - 'pngCompressionLevel': The PNG compression level to use, when exporting to PNG.
@@ -6647,9 +6627,6 @@ export declare type ExportOptions = {
6647
6627
  * for JPEG, WebP, PNG, and PDF exports, as well as options for resizing and
6648
6628
  * adding underlayers.
6649
6629
  *
6650
- * @categoryDescription Export Options
6651
- * Methods for configuring export settings for design blocks.
6652
- *
6653
6630
  * @public
6654
6631
  */
6655
6632
  declare interface ExportOptions_2 {
@@ -6758,9 +6735,6 @@ declare interface Flip {
6758
6735
  * The Font interface defines the structure of a font within the Creative Editor SDK.
6759
6736
  * It includes properties for the uri, subFamily, weight, and style.
6760
6737
  *
6761
- * @categoryDescription Fonts
6762
- * Methods for managing fonts within the editor.
6763
- *
6764
6738
  * @public
6765
6739
  */
6766
6740
  export declare interface Font {
@@ -6776,9 +6750,6 @@ export declare interface Font {
6776
6750
  * The FontStyle type defines the possible styles of a font within the Creative Editor SDK.
6777
6751
  * Each style corresponds to a different appearance, allowing for flexibility in how fonts are styled.
6778
6752
  *
6779
- * @categoryDescription Fonts
6780
- * Methods for managing font styles within the editor.
6781
- *
6782
6753
  * @public
6783
6754
  */
6784
6755
  export declare type FontStyle = 'normal' | 'italic';
@@ -6789,9 +6760,6 @@ export declare type FontStyle = 'normal' | 'italic';
6789
6760
  * The FontWeight type defines the possible weights of a font within the Creative Editor SDK.
6790
6761
  * Each weight corresponds to a different thickness, allowing for flexibility in how fonts are styled.
6791
6762
  *
6792
- * @categoryDescription Fonts
6793
- * Methods for managing font weights within the editor.
6794
- *
6795
6763
  * @public
6796
6764
  */
6797
6765
  export declare type FontWeight = 'thin' | 'extraLight' | 'light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
@@ -6799,7 +6767,6 @@ export declare type FontWeight = 'thin' | 'extraLight' | 'light' | 'normal' | 'm
6799
6767
  /**
6800
6768
  * Represents a gradient color stop.
6801
6769
  *
6802
- * @categoryDescription Gradient Color Stop
6803
6770
  * Defines a gradient color stop with a color and a stop position.
6804
6771
  * - 'color': The color value.
6805
6772
  * - 'stop': The relative position of the color within the gradient in the range [0, 1].
@@ -7240,7 +7207,6 @@ export declare type RGBA = [r: number, g: number, b: number, a: number];
7240
7207
  /**
7241
7208
  * Represents an RGBA color value.
7242
7209
  *
7243
- * @categoryDescription RGBA Color
7244
7210
  * Defines an RGBA color value with components between 0 and 1.
7245
7211
  * - 'r': The red component.
7246
7212
  * - 'g': The green component.
@@ -7263,7 +7229,6 @@ export declare interface RGBAColor {
7263
7229
  /**
7264
7230
  * Represents an RGB color value.
7265
7231
  *
7266
- * @categoryDescription RGB Color
7267
7232
  * Defines an RGB color value with components between 0 and 1.
7268
7233
  * - 'r': The red component.
7269
7234
  * - 'g': The green component.
@@ -7342,9 +7307,10 @@ export declare class SceneAPI {
7342
7307
  *
7343
7308
  * @category Scene Loading
7344
7309
  * @param sceneContent - The scene file contents, a base64 string.
7310
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
7345
7311
  * @returns A handle to the loaded scene.
7346
7312
  */
7347
- loadFromString(sceneContent: string): Promise<DesignBlockId>;
7313
+ loadFromString(sceneContent: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
7348
7314
  /**
7349
7315
  * Load a scene from the URL to the scene file.
7350
7316
  *
@@ -7357,9 +7323,10 @@ export declare class SceneAPI {
7357
7323
  *
7358
7324
  * @category Scene Loading
7359
7325
  * @param url - The URL of the scene file.
7326
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
7360
7327
  * @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
7361
7328
  */
7362
- loadFromURL(url: string): Promise<DesignBlockId>;
7329
+ loadFromURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
7363
7330
  /**
7364
7331
  * Load a previously archived scene from the URL to the scene file.
7365
7332
  *
@@ -7368,16 +7335,22 @@ export declare class SceneAPI {
7368
7335
  *
7369
7336
  * @category Scene Loading
7370
7337
  * @param url - The URL of the scene file.
7338
+ * @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
7371
7339
  * @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
7372
7340
  */
7373
- loadFromArchiveURL(url: string): Promise<DesignBlockId>;
7341
+ loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
7374
7342
  /**
7375
7343
  * Serializes the current scene into a string. Selection is discarded.
7376
7344
  *
7377
7345
  * @category Scene Saving
7346
+ * @param allowedResourceSchemes - The resource schemes to allow in the saved string. Defaults to ['blob', 'bundle', 'file', 'http', 'https', 'opfs'].
7347
+ * @param onDisallowedResourceScheme - An optional callback that is called for each resource URL that has a scheme absent from
7348
+ * `resourceSchemesAllowed`. The `url` parameter is the resource URL and the `dataHash` parameter is the hash of the
7349
+ * resource's data. The callback should return a new URL for the resource, which will be used in the serialized
7350
+ * scene. The callback is expected to return the original URL if no persistence is needed.
7378
7351
  * @returns A promise that resolves with a string on success or an error on failure.
7379
7352
  */
7380
- saveToString(allowedResourceSchemes?: string[]): Promise<string>;
7353
+ saveToString(allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
7381
7354
  /**
7382
7355
  * Saves the current scene and all of its referenced assets into an archive.
7383
7356
  *
@@ -7965,7 +7938,6 @@ export declare type SettingsColorRGBA = SettingsColor;
7965
7938
  /**
7966
7939
  * Represents the enum settings available in the editor.
7967
7940
  *
7968
- * @categoryDescription Enum Settings
7969
7941
  * Defines the possible enum settings in the editor.
7970
7942
  * - 'doubleClickSelectionMode': The mode for double-click selection.
7971
7943
  * - 'touch/pinchAction': The action for pinch gestures.
@@ -8089,7 +8061,6 @@ export declare interface Source {
8089
8061
  /**
8090
8062
  * Represents a spot color value.
8091
8063
  *
8092
- * @categoryDescription Spot Color
8093
8064
  * Defines a spot color value with a name, tint, and external reference.
8094
8065
  * - 'name': The name of the spot color.
8095
8066
  * - 'tint': The tint factor.
@@ -8204,9 +8175,6 @@ export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase
8204
8175
  * The `TransientResource` interface provides a set of properties that describe a transient
8205
8176
  * resource, including a URI and the size of the resource.
8206
8177
  *
8207
- * @categoryDescription TransientResource
8208
- * Methods for working with transient resources.
8209
- *
8210
8178
  * @public
8211
8179
  */
8212
8180
  export declare interface TransientResource {
@@ -8220,9 +8188,6 @@ export declare interface TransientResource {
8220
8188
  * The Typeface interface defines the structure of a typeface within the Creative Editor SDK.
8221
8189
  * It includes properties for the name and fonts.
8222
8190
  *
8223
- * @categoryDescription Fonts
8224
- * Methods for managing typefaces within the editor.
8225
- *
8226
8191
  * @public
8227
8192
  */
8228
8193
  export declare interface Typeface {
@@ -8237,7 +8202,6 @@ export declare interface Typeface {
8237
8202
  *
8238
8203
  * @deprecated This type definition is not used anymore and will be removed.
8239
8204
  *
8240
- * @categoryDescription Typeface Definition
8241
8205
  * Defines the structure of a typeface definition, including metadata, family name, and font details.
8242
8206
  * - 'meta': Optional metadata for the typeface, including default status, library, and categories.
8243
8207
  * - 'family': The name of the typeface family.
@@ -8349,7 +8313,6 @@ export declare type VerticalTextAlignment = 'Top' | 'Bottom' | 'Center';
8349
8313
  /**
8350
8314
  * Represents the options for exporting a video.
8351
8315
  *
8352
- * @categoryDescription Video Export Options
8353
8316
  * Defines the possible options for exporting a video.
8354
8317
  * - 'mimeType': The MIME type of the output video file.
8355
8318
  * - 'onProgress': A callback which reports on the progress of the export.