@cesdk/engine 1.62.0-nightly.20250930 → 1.62.0-nightly.20251002
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.62.0-nightly.20250930-CWUDT7I4.wasm → cesdk-v1.62.0-nightly.20251002-E2LWOJ7C.wasm} +0 -0
- package/assets/core/worker-host-v1.62.0-nightly.20251002.js +1 -0
- package/index.d.ts +12 -5
- package/index.js +1 -1
- package/package.json +1 -1
- package/assets/core/worker-host-v1.62.0-nightly.20250930.js +0 -1
- /package/assets/core/{cesdk-v1.62.0-nightly.20250930-44YCFRT6.data → cesdk-v1.62.0-nightly.20251002-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -396,12 +396,19 @@ export declare class AssetAPI {
|
|
|
396
396
|
/**
|
|
397
397
|
* Fetch a specific asset by ID from an asset source.
|
|
398
398
|
*
|
|
399
|
+
* ```javascript
|
|
400
|
+
* const asset = await engine.asset.fetchAsset('asset-source-id', 'asset-id', {
|
|
401
|
+
* locale: 'en-US'
|
|
402
|
+
* });
|
|
403
|
+
* ```
|
|
404
|
+
*
|
|
399
405
|
* @category Asset Discovery
|
|
400
406
|
* @param sourceId - The ID of the asset source to search in.
|
|
401
407
|
* @param assetId - The ID of the asset to fetch.
|
|
408
|
+
* @param params - Query parameters including locale (optional).
|
|
402
409
|
* @returns Promise resolving to the complete asset result, or undefined if not found.
|
|
403
410
|
*/
|
|
404
|
-
fetchAsset(sourceId: string, assetId: string): Promise<CompleteAssetResult | null>;
|
|
411
|
+
fetchAsset(sourceId: string, assetId: string, params?: Pick<AssetQueryData, 'locale'>): Promise<CompleteAssetResult | null>;
|
|
405
412
|
/**
|
|
406
413
|
* Get available asset groups from a source.
|
|
407
414
|
*
|
|
@@ -988,7 +995,7 @@ export declare interface AssetSource {
|
|
|
988
995
|
/** Find all asset for the given type and the provided query data. */
|
|
989
996
|
findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult | undefined>;
|
|
990
997
|
/** Fetch an asset by id. */
|
|
991
|
-
fetchAsset?: (id: string) => Promise<AssetResult | null>;
|
|
998
|
+
fetchAsset?: (id: string, params?: Pick<AssetQueryData, 'locale'>) => Promise<AssetResult | null>;
|
|
992
999
|
/** Return every available group */
|
|
993
1000
|
getGroups?: () => Promise<string[]>;
|
|
994
1001
|
/** Credits for the source/api */
|
|
@@ -6638,7 +6645,7 @@ export declare class EditorAPI {
|
|
|
6638
6645
|
*
|
|
6639
6646
|
* ```javascript
|
|
6640
6647
|
* engine.editor.findAllTransientResources().forEach((resource) => {
|
|
6641
|
-
* const bufferURI = resource.
|
|
6648
|
+
* const bufferURI = resource.URL;
|
|
6642
6649
|
* const length = engine.editor.getBufferLength(buffer);
|
|
6643
6650
|
* const data = engine.editor.getBufferData(buffer, 0, length);
|
|
6644
6651
|
* const blob = new Blob([data]);
|
|
@@ -8569,12 +8576,12 @@ export declare interface TextFontSizeOptions {
|
|
|
8569
8576
|
* Represents a transient resource.
|
|
8570
8577
|
*
|
|
8571
8578
|
* The `TransientResource` interface provides a set of properties that describe a transient
|
|
8572
|
-
* resource, including a
|
|
8579
|
+
* resource, including a URL and the size of the resource.
|
|
8573
8580
|
*
|
|
8574
8581
|
* @public
|
|
8575
8582
|
*/
|
|
8576
8583
|
export declare interface TransientResource {
|
|
8577
|
-
|
|
8584
|
+
URL: string;
|
|
8578
8585
|
size: number;
|
|
8579
8586
|
}
|
|
8580
8587
|
|