@cesdk/node 1.58.0-nightly.20250807 → 1.58.0-nightly.20250809
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.58.0-nightly.20250807-XUMPARPM.wasm → cesdk-v1.58.0-nightly.20250809-JXFFK4SC.wasm} +0 -0
- package/index.d.ts +78 -3
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.58.0-nightly.20250807-44YCFRT6.data → cesdk-v1.58.0-nightly.20250809-44YCFRT6.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -271,11 +271,83 @@ export declare class AssetAPI {
|
|
|
271
271
|
addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>, applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>): void;
|
|
272
272
|
/**
|
|
273
273
|
* Creates a new local asset source from a JSON string containing asset definitions.
|
|
274
|
+
*
|
|
275
|
+
* The JSON structure should contain a `version` field, an `id` field specifying the asset source identifier,
|
|
276
|
+
* and an `assets` array with asset definitions. Each asset should have an `id`, localized `label` object,
|
|
277
|
+
* and a `meta` object containing asset-specific properties like `uri`, `thumbUri`, `blockType`, etc.
|
|
278
|
+
*
|
|
279
|
+
* @category Asset Source Management
|
|
274
280
|
* @param contentJSON - The JSON string containing the asset definitions.
|
|
275
281
|
* @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.
|
|
276
|
-
* @returns The ID of the newly created asset source
|
|
282
|
+
* @returns The ID of the newly created asset source (as specified in the JSON's `id` field).
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```javascript
|
|
286
|
+
* const json = JSON.stringify({
|
|
287
|
+
* "version": "2.0.0",
|
|
288
|
+
* "id": "my.custom.assets",
|
|
289
|
+
* "assets": [
|
|
290
|
+
* {
|
|
291
|
+
* "id": "sample_asset",
|
|
292
|
+
* "label": { "en": "Sample Asset" },
|
|
293
|
+
* "meta": {
|
|
294
|
+
* "uri": "https://example.com/asset.jpg",
|
|
295
|
+
* "thumbUri": "https://example.com/thumb.jpg",
|
|
296
|
+
* "blockType": "//ly.img.ubq/image"
|
|
297
|
+
* }
|
|
298
|
+
* }
|
|
299
|
+
* ]
|
|
300
|
+
* });
|
|
301
|
+
* const sourceId = await engine.asset.addLocalAssetSourceFromJSONString(json);
|
|
302
|
+
* console.log('Created asset source:', sourceId); // "my.custom.assets"
|
|
303
|
+
* ```
|
|
277
304
|
*/
|
|
278
305
|
addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string): Promise<string>;
|
|
306
|
+
/**
|
|
307
|
+
* Creates a new local asset source from a JSON URI.
|
|
308
|
+
*
|
|
309
|
+
* Loads and parses a JSON file from the specified URI to create an asset source. The JSON structure
|
|
310
|
+
* should contain a `version` field, an `id` field specifying the asset source identifier, and an
|
|
311
|
+
* `assets` array with asset definitions. The created asset source will have the ID specified in the
|
|
312
|
+
* JSON's `id` field, and all assets defined in the JSON will be added to the source.
|
|
313
|
+
*
|
|
314
|
+
* Note: The parent directory of the content.json URI will be used as the base path for resolving
|
|
315
|
+
* relative URLs in the asset definitions (e.g., `{{base_url}}` placeholders).
|
|
316
|
+
*
|
|
317
|
+
* @category Asset Source Management
|
|
318
|
+
* @param contentURI - The URI for the JSON file to load and parse.
|
|
319
|
+
* @returns The ID of the newly created asset source (as specified in the JSON's `id` field).
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```javascript
|
|
323
|
+
* // Load audio assets from IMG.LY's CDN
|
|
324
|
+
* const sourceId = await engine.asset.addLocalAssetSourceFromJSONURI(
|
|
325
|
+
* 'https://cdn.img.ly/assets/demo/v2/ly.img.audio/content.json'
|
|
326
|
+
* );
|
|
327
|
+
* console.log('Loaded asset source:', sourceId); // "ly.img.audio"
|
|
328
|
+
*
|
|
329
|
+
* // The parent directory (https://cdn.img.ly/assets/demo/v2/ly.img.audio/)
|
|
330
|
+
* // will be used as base path for resolving relative asset URLs
|
|
331
|
+
*
|
|
332
|
+
* // The JSON at this URL contains audio assets with structure like:
|
|
333
|
+
* // {
|
|
334
|
+
* // "version": "2.0.0",
|
|
335
|
+
* // "id": "ly.img.audio",
|
|
336
|
+
* // "assets": [
|
|
337
|
+
* // {
|
|
338
|
+
* // "id": "dance_harder",
|
|
339
|
+
* // "label": { "en": "Dance Harder" },
|
|
340
|
+
* // "meta": {
|
|
341
|
+
* // "uri": "https://cdn.img.ly/.../dance_harder.m4a",
|
|
342
|
+
* // "blockType": "//ly.img.ubq/audio",
|
|
343
|
+
* // "mimeType": "audio/x-m4a"
|
|
344
|
+
* // }
|
|
345
|
+
* // }
|
|
346
|
+
* // ]
|
|
347
|
+
* // }
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
addLocalAssetSourceFromJSONURI(contentURI: string): Promise<string>;
|
|
279
351
|
/**
|
|
280
352
|
* Remove a registered asset source.
|
|
281
353
|
*
|
|
@@ -5577,12 +5649,15 @@ export declare class EditorAPI {
|
|
|
5577
5649
|
*
|
|
5578
5650
|
* ```javascript
|
|
5579
5651
|
* engine.editor.setEditMode('Crop');
|
|
5652
|
+
* // With a base mode
|
|
5653
|
+
* engine.editor.setEditMode('CustomMode', 'Crop');
|
|
5580
5654
|
* ```
|
|
5581
5655
|
*
|
|
5582
5656
|
* @category Edit Mode Management
|
|
5583
5657
|
* @param mode - "Transform", "Crop", "Text", "Playback", "Trim" or a custom value.
|
|
5658
|
+
* @param baseMode - Optional base mode from which the custom mode will inherit the settings.
|
|
5584
5659
|
*/
|
|
5585
|
-
setEditMode(mode: EditMode): void;
|
|
5660
|
+
setEditMode(mode: EditMode, baseMode?: string): void;
|
|
5586
5661
|
/**
|
|
5587
5662
|
* Get the editor's current edit mode.
|
|
5588
5663
|
*
|
|
@@ -7618,7 +7693,7 @@ export declare type Scope = 'text/edit' | 'text/character' | 'fill/change' | 'fi
|
|
|
7618
7693
|
*
|
|
7619
7694
|
* @public
|
|
7620
7695
|
*/
|
|
7621
|
-
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/
|
|
7696
|
+
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';
|
|
7622
7697
|
|
|
7623
7698
|
/**
|
|
7624
7699
|
* Represents the color settings available in the editor.
|