@cesdk/node 1.29.0-rc.0 → 1.30.0-rc.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
|
@@ -391,6 +391,36 @@ export declare interface AssetsQueryResult<T extends AssetResult = AssetResult>
|
|
|
391
391
|
|
|
392
392
|
declare type _AssetsQueryResult = AssetsQueryResult;
|
|
393
393
|
|
|
394
|
+
/**
|
|
395
|
+
* @public
|
|
396
|
+
*/
|
|
397
|
+
export declare type AudioExportOptions = {
|
|
398
|
+
/**
|
|
399
|
+
* The time offset in seconds relative to the target block.
|
|
400
|
+
*
|
|
401
|
+
* @defaultValue 0
|
|
402
|
+
*/
|
|
403
|
+
timeOffset?: number;
|
|
404
|
+
/**
|
|
405
|
+
* The duration in seconds of the final audio.
|
|
406
|
+
*
|
|
407
|
+
* @defaultValue The duration of the block.
|
|
408
|
+
*/
|
|
409
|
+
duration?: number;
|
|
410
|
+
/**
|
|
411
|
+
* The sample rate of the exported audio.
|
|
412
|
+
*
|
|
413
|
+
* @defaultValue 48000
|
|
414
|
+
*/
|
|
415
|
+
sampleRate?: number;
|
|
416
|
+
/**
|
|
417
|
+
* The number of channels of the exported audio.
|
|
418
|
+
*
|
|
419
|
+
* @defaultValue 2
|
|
420
|
+
*/
|
|
421
|
+
numberOfChannels?: number;
|
|
422
|
+
};
|
|
423
|
+
|
|
394
424
|
/**
|
|
395
425
|
* @public
|
|
396
426
|
*/
|
|
@@ -429,10 +459,19 @@ export declare class BlockAPI {
|
|
|
429
459
|
* @param handle - The design block element to export. Currently, only page blocks are supported.
|
|
430
460
|
* @param mimeType - The mime type of the output video file.
|
|
431
461
|
* @param progressCallback - A callback which reports on the progress of the export. It informs the receiver of the current frame index, which currently gets exported and the total frame count.
|
|
432
|
-
* @param options - The options for exporting the video
|
|
433
|
-
* @returns A promise that resolves with video blob or is rejected with an error.
|
|
462
|
+
* @param options - The options for exporting the video.
|
|
463
|
+
* @returns A promise that resolves with a video blob or is rejected with an error.
|
|
434
464
|
*/
|
|
435
465
|
exportVideo(handle: DesignBlockId, mimeType: MimeType_2 | undefined, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void, options: VideoExportOptions): Promise<Blob>;
|
|
466
|
+
/**
|
|
467
|
+
* Exports a design block as an audio file of the given mime type.
|
|
468
|
+
* @param handle - The design block element to export. Currently, only audio blocks are supported.
|
|
469
|
+
* @param mimeType - The mime type of the output audio file.
|
|
470
|
+
* @param progressCallback - A callback which reports on the progress of the export.
|
|
471
|
+
* @param options - The options for exporting the audio.
|
|
472
|
+
* @returns A promise that resolves with an audio blob or is rejected with an error.
|
|
473
|
+
*/
|
|
474
|
+
unstable_exportAudio(handle: DesignBlockId, mimeType: MimeType_2 | undefined, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void, options: AudioExportOptions): Promise<Blob>;
|
|
436
475
|
/**
|
|
437
476
|
* Loads existing blocks from the given string.
|
|
438
477
|
* The blocks are not attached by default and won't be visible until attached to a page or the scene.
|
|
@@ -3333,9 +3372,12 @@ export declare class EditorAPI {
|
|
|
3333
3372
|
* This function can be called more than once. Subsequent calls will overwrite previous calls.
|
|
3334
3373
|
* To remove a previously set resolver, pass the value `null`.
|
|
3335
3374
|
* The given function must return an absolute path with a scheme.
|
|
3336
|
-
* @param resolver - Custom resolution function.
|
|
3375
|
+
* @param resolver - Custom resolution function. The resolution function
|
|
3376
|
+
* should not reference variables outside of its scope.
|
|
3377
|
+
* It receives the default URI resolver as its second argument
|
|
3337
3378
|
*/
|
|
3338
|
-
setURIResolver(resolver: (URI: string) => string): void;
|
|
3379
|
+
setURIResolver(resolver: (URI: string, defaultURIResolver: (URI: string) => string) => string): void;
|
|
3380
|
+
|
|
3339
3381
|
/**
|
|
3340
3382
|
* This is the default implementation for the URI resolver.
|
|
3341
3383
|
* It resolves the given path relative to the `basePath` setting.
|
|
@@ -3513,6 +3555,12 @@ export declare class EventAPI {
|
|
|
3513
3555
|
subscribe: (blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void) => (() => void);
|
|
3514
3556
|
}
|
|
3515
3557
|
|
|
3558
|
+
/** @public */
|
|
3559
|
+
declare interface ExportAudioOptions {
|
|
3560
|
+
sampleRate: number;
|
|
3561
|
+
numberOfChannels: number;
|
|
3562
|
+
}
|
|
3563
|
+
|
|
3516
3564
|
/**
|
|
3517
3565
|
* @public
|
|
3518
3566
|
*/
|
|
@@ -3725,6 +3773,7 @@ declare enum MimeType_2 {
|
|
|
3725
3773
|
Jpeg = "image/jpeg",
|
|
3726
3774
|
WebP = "image/webp",
|
|
3727
3775
|
Tga = "image/x-tga",
|
|
3776
|
+
Wav = "audio/wav",
|
|
3728
3777
|
Mp4 = "video/mp4",
|
|
3729
3778
|
QuickTime = "video/quicktime",
|
|
3730
3779
|
Binary = "application/octet-stream",
|
|
@@ -4114,7 +4163,7 @@ export declare type SceneMode = 'Design' | 'Video';
|
|
|
4114
4163
|
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' | 'lifecycle/destroy' | 'lifecycle/duplicate' | 'editor/add' | 'editor/select';
|
|
4115
4164
|
|
|
4116
4165
|
/** @public */
|
|
4117
|
-
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'checkScopesInAPIs' | 'page/dimOutOfPageAreas' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning';
|
|
4166
|
+
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'checkScopesInAPIs' | 'page/dimOutOfPageAreas' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning';
|
|
4118
4167
|
|
|
4119
4168
|
/** @public
|
|
4120
4169
|
*/
|