@cesdk/node 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.
|
Binary file
|
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
|
*
|
|
@@ -7649,9 +7630,10 @@ export declare class SceneAPI {
|
|
|
7649
7630
|
* @category Scene Loading
|
|
7650
7631
|
* @param sceneContent - The scene file contents, a base64 string.
|
|
7651
7632
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7633
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
7652
7634
|
* @returns A handle to the loaded scene.
|
|
7653
7635
|
*/
|
|
7654
|
-
loadFromString(sceneContent: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7636
|
+
loadFromString(sceneContent: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
7655
7637
|
/**
|
|
7656
7638
|
* Load a scene from the URL to the scene file.
|
|
7657
7639
|
*
|
|
@@ -7665,9 +7647,10 @@ export declare class SceneAPI {
|
|
|
7665
7647
|
* @category Scene Loading
|
|
7666
7648
|
* @param url - The URL of the scene file.
|
|
7667
7649
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7650
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
7668
7651
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
7669
7652
|
*/
|
|
7670
|
-
loadFromURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7653
|
+
loadFromURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
7671
7654
|
/**
|
|
7672
7655
|
* Load a previously archived scene from the URL to the scene file.
|
|
7673
7656
|
*
|
|
@@ -7677,9 +7660,10 @@ export declare class SceneAPI {
|
|
|
7677
7660
|
* @category Scene Loading
|
|
7678
7661
|
* @param url - The URL of the scene archive file.
|
|
7679
7662
|
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7663
|
+
* @param waitForResources - Whether to wait for all resources to finish loading before resolving. Defaults to false.
|
|
7680
7664
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
7681
7665
|
*/
|
|
7682
|
-
loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7666
|
+
loadFromArchiveURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;
|
|
7683
7667
|
/**
|
|
7684
7668
|
* Serializes the current scene into a string. Selection is discarded.
|
|
7685
7669
|
*
|
|
@@ -8047,6 +8031,7 @@ export declare class SceneAPI {
|
|
|
8047
8031
|
isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
|
|
8048
8032
|
/**
|
|
8049
8033
|
* Continually ensures the camera position to be within the width and height of the blocks axis-aligned bounding box.
|
|
8034
|
+
* Disables any previously set camera position clamping in the scene and also takes priority over clamp camera commands.
|
|
8050
8035
|
*
|
|
8051
8036
|
* ```javascript
|
|
8052
8037
|
* // Keep the scene with padding of 10px within the camera
|
|
@@ -8216,7 +8201,7 @@ export declare const SceneModeValues: readonly ["Design", "Video"];
|
|
|
8216
8201
|
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';
|
|
8217
8202
|
|
|
8218
8203
|
/** @public */
|
|
8219
|
-
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 & {});
|
|
8204
|
+
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 & {});
|
|
8220
8205
|
|
|
8221
8206
|
/** @public */
|
|
8222
8207
|
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 & {});
|
|
@@ -8430,6 +8415,7 @@ export declare interface Settings {
|
|
|
8430
8415
|
|
|
8431
8416
|
|
|
8432
8417
|
|
|
8418
|
+
|
|
8433
8419
|
|
|
8434
8420
|
|
|
8435
8421
|
}
|