@cesdk/engine 1.65.0-rc.0 → 1.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/core/{cesdk-v1.65.0-rc.0-FJGVMDMC.wasm → cesdk-v1.65.0-KQV5RSP2.wasm} +0 -0
- package/assets/core/{worker-host-v1.65.0-rc.0.js → worker-host-v1.65.0.js} +1 -1
- package/index.d.ts +33 -47
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.65.0-rc.0-44YCFRT6.data → cesdk-v1.65.0-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -357,20 +357,13 @@ export declare class AssetAPI {
|
|
|
357
357
|
* and an `assets` array with asset definitions. Each asset should have an `id`, localized `label` object,
|
|
358
358
|
* and a `meta` object containing asset-specific properties like `uri`, `thumbUri`, `blockType`, etc.
|
|
359
359
|
*
|
|
360
|
-
* Optionally, you can provide a `basePath` for resolving relative URLs and additional options including a
|
|
361
|
-
* `matcher` array to filter which assets are loaded based on their IDs. The matcher patterns support wildcard
|
|
362
|
-
* matching using `*`. If multiple patterns are provided, an asset is included if it matches ANY of the patterns.
|
|
363
|
-
*
|
|
364
360
|
* @category Asset Source Management
|
|
365
361
|
* @param contentJSON - The JSON string containing the asset definitions.
|
|
366
362
|
* @param basePath - An optional base path with which \{\{base_url\}\} strings in the assets should be replaced. If no value is provided, settings.basePath is used.
|
|
367
|
-
* @param options - Optional configuration:
|
|
368
|
-
* - `matcher`: Array of patterns to filter assets by ID. Supports `*` wildcard. An asset is included if it matches ANY pattern.
|
|
369
363
|
* @returns The ID of the newly created asset source (as specified in the JSON's `id` field).
|
|
370
364
|
*
|
|
371
365
|
* @example
|
|
372
366
|
* ```javascript
|
|
373
|
-
* // Load all assets from JSON
|
|
374
367
|
* const json = JSON.stringify({
|
|
375
368
|
* "version": "2.0.0",
|
|
376
369
|
* "id": "my.custom.assets",
|
|
@@ -388,31 +381,9 @@ export declare class AssetAPI {
|
|
|
388
381
|
* });
|
|
389
382
|
* const sourceId = await engine.asset.addLocalAssetSourceFromJSONString(json);
|
|
390
383
|
* console.log('Created asset source:', sourceId); // "my.custom.assets"
|
|
391
|
-
*
|
|
392
|
-
* // Load with custom base path
|
|
393
|
-
* const sourceId2 = await engine.asset.addLocalAssetSourceFromJSONString(
|
|
394
|
-
* json,
|
|
395
|
-
* 'https://example.com/'
|
|
396
|
-
* );
|
|
397
|
-
*
|
|
398
|
-
* // Load only assets matching one of the patterns
|
|
399
|
-
* const sourceId3 = await engine.asset.addLocalAssetSourceFromJSONString(
|
|
400
|
-
* json,
|
|
401
|
-
* undefined,
|
|
402
|
-
* { matcher: ['sample_*', '*_asset'] }
|
|
403
|
-
* );
|
|
404
|
-
*
|
|
405
|
-
* // Load with custom base path and matcher
|
|
406
|
-
* const sourceId4 = await engine.asset.addLocalAssetSourceFromJSONString(
|
|
407
|
-
* json,
|
|
408
|
-
* 'https://example.com/',
|
|
409
|
-
* { matcher: ['portrait_*', 'landscape_*'] }
|
|
410
|
-
* );
|
|
411
384
|
* ```
|
|
412
385
|
*/
|
|
413
|
-
addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string
|
|
414
|
-
matcher?: string[];
|
|
415
|
-
}): Promise<string>;
|
|
386
|
+
addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string): Promise<string>;
|
|
416
387
|
/**
|
|
417
388
|
* Creates a new local asset source from a JSON URI.
|
|
418
389
|
*
|
|
@@ -426,28 +397,38 @@ export declare class AssetAPI {
|
|
|
426
397
|
*
|
|
427
398
|
* @category Asset Source Management
|
|
428
399
|
* @param contentURI - The URI for the JSON file to load and parse.
|
|
429
|
-
* @param options - Optional configuration:
|
|
430
|
-
* - `matcher`: Array of patterns to filter assets by ID. Supports `*` wildcard. An asset is included if it matches ANY pattern.
|
|
431
400
|
* @returns The ID of the newly created asset source (as specified in the JSON's `id` field).
|
|
432
401
|
*
|
|
433
402
|
* @example
|
|
434
403
|
* ```javascript
|
|
435
|
-
* // Load
|
|
404
|
+
* // Load audio assets from IMG.LY's CDN
|
|
436
405
|
* const sourceId = await engine.asset.addLocalAssetSourceFromJSONURI(
|
|
437
406
|
* 'https://cdn.img.ly/assets/demo/v2/ly.img.audio/content.json'
|
|
438
407
|
* );
|
|
439
408
|
* console.log('Loaded asset source:', sourceId); // "ly.img.audio"
|
|
440
409
|
*
|
|
441
|
-
* //
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
410
|
+
* // The parent directory (https://cdn.img.ly/assets/demo/v2/ly.img.audio/)
|
|
411
|
+
* // will be used as base path for resolving relative asset URLs
|
|
412
|
+
*
|
|
413
|
+
* // The JSON at this URL contains audio assets with structure like:
|
|
414
|
+
* // {
|
|
415
|
+
* // "version": "2.0.0",
|
|
416
|
+
* // "id": "ly.img.audio",
|
|
417
|
+
* // "assets": [
|
|
418
|
+
* // {
|
|
419
|
+
* // "id": "dance_harder",
|
|
420
|
+
* // "label": { "en": "Dance Harder" },
|
|
421
|
+
* // "meta": {
|
|
422
|
+
* // "uri": "https://cdn.img.ly/.../dance_harder.m4a",
|
|
423
|
+
* // "blockType": "//ly.img.ubq/audio",
|
|
424
|
+
* // "mimeType": "audio/x-m4a"
|
|
425
|
+
* // }
|
|
426
|
+
* // }
|
|
427
|
+
* // ]
|
|
428
|
+
* // }
|
|
429
|
+
* ```
|
|
430
|
+
*/
|
|
431
|
+
addLocalAssetSourceFromJSONURI(contentURI: string): Promise<string>;
|
|
451
432
|
/**
|
|
452
433
|
* Remove a registered asset source.
|
|
453
434
|
*
|
|
@@ -8172,9 +8153,10 @@ export declare class SceneAPI {
|
|
|
8172
8153
|
* @category Scene Loading
|
|
8173
8154
|
* @param sceneContent - The scene file contents, a base64 string.
|
|
8174
8155
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
8156
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
8175
8157
|
* @returns A handle to the loaded scene.
|
|
8176
8158
|
*/
|
|
8177
|
-
loadFromString(sceneContent: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
8159
|
+
loadFromString(sceneContent: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
8178
8160
|
/**
|
|
8179
8161
|
* Load a scene from the URL to the scene file.
|
|
8180
8162
|
*
|
|
@@ -8188,9 +8170,10 @@ export declare class SceneAPI {
|
|
|
8188
8170
|
* @category Scene Loading
|
|
8189
8171
|
* @param url - The URL of the scene file.
|
|
8190
8172
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
8173
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
8191
8174
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
8192
8175
|
*/
|
|
8193
|
-
loadFromURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
8176
|
+
loadFromURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
8194
8177
|
/**
|
|
8195
8178
|
* Load a previously archived scene from the URL to the scene file.
|
|
8196
8179
|
*
|
|
@@ -8200,9 +8183,10 @@ export declare class SceneAPI {
|
|
|
8200
8183
|
* @category Scene Loading
|
|
8201
8184
|
* @param url - The URL of the scene archive file.
|
|
8202
8185
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
8186
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
8203
8187
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
8204
8188
|
*/
|
|
8205
|
-
loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
8189
|
+
loadFromArchiveURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
8206
8190
|
/**
|
|
8207
8191
|
* Serializes the current scene into a string. Selection is discarded.
|
|
8208
8192
|
*
|
|
@@ -8570,6 +8554,7 @@ export declare class SceneAPI {
|
|
|
8570
8554
|
isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
|
|
8571
8555
|
/**
|
|
8572
8556
|
* Continually ensures the camera position to be within the width and height of the blocks axis-aligned bounding box.
|
|
8557
|
+
* Disables any previously set camera position clamping in the scene and also takes priority over clamp camera commands.
|
|
8573
8558
|
*
|
|
8574
8559
|
* ```javascript
|
|
8575
8560
|
* // Keep the scene with padding of 10px within the camera
|
|
@@ -8739,7 +8724,7 @@ export declare const SceneModeValues: readonly ["Design", "Video"];
|
|
|
8739
8724
|
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';
|
|
8740
8725
|
|
|
8741
8726
|
/** @public */
|
|
8742
|
-
export declare type SettingBoolPropertyName = 'alwaysHighlightPlaceholders' | 'doubleClickToCropEnabled' | 'showBuildVersion' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'renderTextCursorAndSelectionInEngine' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'mouse/enableZoom' | 'mouse/enableScroll' | 'controlGizmo/showCropHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showScaleHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showCropScaleHandles' | 'page/title/show' | 'page/title/showPageTitleTemplate' | 'page/title/appendPageName' | 'page/title/showOnSinglePage' | 'page/dimOutOfPageAreas' | 'page/allowCropInteraction' | 'page/allowResizeInteraction' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/allowRotateInteraction' | 'page/allowMoveInteraction' | 'page/moveChildrenWhenCroppingFill' | 'page/selectWhenNoBlocksSelected' | 'colorMaskingSettings/secondPass' | 'clampThumbnailTextureSizes' | 'useSystemFontFallback' | 'forceSystemEmojis' | (string & {});
|
|
8727
|
+
export declare type SettingBoolPropertyName = 'alwaysHighlightPlaceholders' | 'doubleClickToCropEnabled' | 'showBuildVersion' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'renderTextCursorAndSelectionInEngine' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'mouse/enableZoom' | 'mouse/enableScroll' | 'controlGizmo/showCropHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showScaleHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showCropScaleHandles' | 'page/title/show' | 'page/title/showPageTitleTemplate' | 'page/title/appendPageName' | 'page/title/showOnSinglePage' | 'page/dimOutOfPageAreas' | 'page/allowCropInteraction' | 'page/allowResizeInteraction' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/allowRotateInteraction' | 'page/allowMoveInteraction' | 'page/moveChildrenWhenCroppingFill' | 'page/selectWhenNoBlocksSelected' | 'colorMaskingSettings/secondPass' | 'clampThumbnailTextureSizes' | 'useSystemFontFallback' | 'forceSystemEmojis' | 'features/textEditModeTransformHandlesEnabled' | (string & {});
|
|
8743
8728
|
|
|
8744
8729
|
/** @public */
|
|
8745
8730
|
export declare type SettingColorPropertyName = 'clearColor' | 'handleFillColor' | 'highlightColor' | 'pageHighlightColor' | 'placeholderHighlightColor' | 'snappingGuideColor' | 'rotationSnappingGuideColor' | 'cropOverlayColor' | 'textVariableHighlightColor' | 'borderOutlineColor' | 'progressColor' | 'errorStateColor' | 'page/title/color' | 'page/marginFillColor' | 'page/marginFrameColor' | 'page/innerBorderColor' | 'page/outerBorderColor' | 'colorMaskingSettings/maskColor' | (string & {});
|
|
@@ -8953,6 +8938,7 @@ export declare interface Settings {
|
|
|
8953
8938
|
|
|
8954
8939
|
|
|
8955
8940
|
|
|
8941
|
+
|
|
8956
8942
|
|
|
8957
8943
|
|
|
8958
8944
|
}
|