@cesdk/node 1.58.0-nightly.20250801 → 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/assets/core/{cesdk-v1.58.0-nightly.20250801-M47XASEH.wasm → cesdk-v1.58.0-nightly.20250807-XUMPARPM.wasm} +0 -0
- package/index.d.ts +17 -5
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.58.0-nightly.20250801-44YCFRT6.data → cesdk-v1.58.0-nightly.20250807-44YCFRT6.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1390,6 +1390,10 @@ export declare class BlockAPI {
|
|
|
1390
1390
|
* @category Block Lifecycle
|
|
1391
1391
|
* @param blocks - The blocks to save.
|
|
1392
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.
|
|
1393
1397
|
* @returns A promise that resolves to a string representing the blocks or an error.
|
|
1394
1398
|
* @example
|
|
1395
1399
|
* ```typescript
|
|
@@ -1402,7 +1406,7 @@ export declare class BlockAPI {
|
|
|
1402
1406
|
* const serialized = await engine.block.saveToString([page]);
|
|
1403
1407
|
* ```
|
|
1404
1408
|
*/
|
|
1405
|
-
saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[]): Promise<string>;
|
|
1409
|
+
saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
|
|
1406
1410
|
/**
|
|
1407
1411
|
* Saves the given blocks and their assets to a zip archive.
|
|
1408
1412
|
*
|
|
@@ -7043,9 +7047,10 @@ export declare class SceneAPI {
|
|
|
7043
7047
|
*
|
|
7044
7048
|
* @category Scene Loading
|
|
7045
7049
|
* @param sceneContent - The scene file contents, a base64 string.
|
|
7050
|
+
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7046
7051
|
* @returns A handle to the loaded scene.
|
|
7047
7052
|
*/
|
|
7048
|
-
loadFromString(sceneContent: string): Promise<DesignBlockId>;
|
|
7053
|
+
loadFromString(sceneContent: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7049
7054
|
/**
|
|
7050
7055
|
* Load a scene from the URL to the scene file.
|
|
7051
7056
|
*
|
|
@@ -7058,9 +7063,10 @@ export declare class SceneAPI {
|
|
|
7058
7063
|
*
|
|
7059
7064
|
* @category Scene Loading
|
|
7060
7065
|
* @param url - The URL of the scene file.
|
|
7066
|
+
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7061
7067
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
7062
7068
|
*/
|
|
7063
|
-
loadFromURL(url: string): Promise<DesignBlockId>;
|
|
7069
|
+
loadFromURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7064
7070
|
/**
|
|
7065
7071
|
* Load a previously archived scene from the URL to the scene file.
|
|
7066
7072
|
*
|
|
@@ -7069,16 +7075,22 @@ export declare class SceneAPI {
|
|
|
7069
7075
|
*
|
|
7070
7076
|
* @category Scene Loading
|
|
7071
7077
|
* @param url - The URL of the scene file.
|
|
7078
|
+
* @param overrideEditorConfig - Whether to override editor configuration with settings and data from the scene file. Defaults to false.
|
|
7072
7079
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
7073
7080
|
*/
|
|
7074
|
-
loadFromArchiveURL(url: string): Promise<DesignBlockId>;
|
|
7081
|
+
loadFromArchiveURL(url: string, overrideEditorConfig?: boolean): Promise<DesignBlockId>;
|
|
7075
7082
|
/**
|
|
7076
7083
|
* Serializes the current scene into a string. Selection is discarded.
|
|
7077
7084
|
*
|
|
7078
7085
|
* @category Scene Saving
|
|
7086
|
+
* @param allowedResourceSchemes - The resource schemes to allow in the saved string. Defaults to ['blob', 'bundle', 'file', 'http', 'https', 'opfs'].
|
|
7087
|
+
* @param onDisallowedResourceScheme - An optional callback that is called for each resource URL that has a scheme absent from
|
|
7088
|
+
* `resourceSchemesAllowed`. The `url` parameter is the resource URL and the `dataHash` parameter is the hash of the
|
|
7089
|
+
* resource's data. The callback should return a new URL for the resource, which will be used in the serialized
|
|
7090
|
+
* scene. The callback is expected to return the original URL if no persistence is needed.
|
|
7079
7091
|
* @returns A promise that resolves with a string on success or an error on failure.
|
|
7080
7092
|
*/
|
|
7081
|
-
saveToString(allowedResourceSchemes?: string[]): Promise<string>;
|
|
7093
|
+
saveToString(allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
|
|
7082
7094
|
/**
|
|
7083
7095
|
* Saves the current scene and all of its referenced assets into an archive.
|
|
7084
7096
|
*
|