@cesdk/engine 1.54.0-nightly.20250610 → 1.54.0-nightly.20250613
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.54.0-nightly.20250610-KEJWA23W.wasm → cesdk-v1.54.0-nightly.20250613-Y546X3EM.wasm} +0 -0
- package/assets/core/worker-host-v1.54.0-nightly.20250613.js +1 -0
- package/index.d.ts +144 -22
- package/index.js +1 -1
- package/package.json +1 -1
- package/assets/core/worker-host-v1.54.0-nightly.20250610.js +0 -1
- /package/assets/core/{cesdk-v1.54.0-nightly.20250610-44YCFRT6.data → cesdk-v1.54.0-nightly.20250613-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export declare type AnimationTypeLonghand = `//ly.img.ubq/animation/${AnimationT
|
|
|
19
19
|
*/
|
|
20
20
|
export declare type AnimationTypeShorthand = 'slide' | 'pan' | 'fade' | 'blur' | 'grow' | 'zoom' | 'pop' | 'wipe' | 'baseline' | 'crop_zoom' | 'spin' | 'spin_loop' | 'fade_loop' | 'blur_loop' | 'pulsating_loop' | 'breathing_loop' | 'jump_loop' | 'squeeze_loop' | 'sway_loop' | 'typewriter_text' | 'block_swipe_text' | 'spread_text' | 'merge_text' | 'ken_burns';
|
|
21
21
|
|
|
22
|
+
/** @public */
|
|
23
|
+
export declare type ApplicationMimeType = Extract<MimeType_2, 'application/octet-stream' | 'application/pdf' | 'application/zip'>;
|
|
24
|
+
|
|
22
25
|
/**
|
|
23
26
|
* Generic asset information
|
|
24
27
|
* @public
|
|
@@ -589,6 +592,16 @@ export declare type AssetTransformPreset = AssetFixedAspectRatio | AssetFreeAspe
|
|
|
589
592
|
* @public
|
|
590
593
|
*/
|
|
591
594
|
export declare type AudioExportOptions = {
|
|
595
|
+
/**
|
|
596
|
+
* The MIME type of the output audio file.
|
|
597
|
+
*
|
|
598
|
+
* @defaultValue 'audio/wav'
|
|
599
|
+
*/
|
|
600
|
+
mimeType?: AudioMimeType;
|
|
601
|
+
/**
|
|
602
|
+
* A callback which reports on the progress of the export.
|
|
603
|
+
*/
|
|
604
|
+
onProgress?: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void;
|
|
592
605
|
/**
|
|
593
606
|
* The time offset in seconds relative to the target block.
|
|
594
607
|
*
|
|
@@ -615,6 +628,9 @@ export declare type AudioExportOptions = {
|
|
|
615
628
|
numberOfChannels?: number;
|
|
616
629
|
};
|
|
617
630
|
|
|
631
|
+
/** @public */
|
|
632
|
+
export declare type AudioMimeType = Extract<MimeType_2, 'audio/wav'>;
|
|
633
|
+
|
|
618
634
|
/**
|
|
619
635
|
* @public
|
|
620
636
|
*/
|
|
@@ -626,6 +642,14 @@ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply'
|
|
|
626
642
|
export declare class BlockAPI {
|
|
627
643
|
#private;
|
|
628
644
|
|
|
645
|
+
/**
|
|
646
|
+
* Exports a design block element as a file of the given mime type.
|
|
647
|
+
* Performs an internal update to resolve the final layout for the blocks.
|
|
648
|
+
* @param handle - The design block element to export.
|
|
649
|
+
* @param options - The options for exporting the block type, including mime type and export settings.
|
|
650
|
+
* @returns A promise that resolves with the exported image or is rejected with an error.
|
|
651
|
+
*/
|
|
652
|
+
export(handle: DesignBlockId, options?: ExportOptions): Promise<Blob>;
|
|
629
653
|
/**
|
|
630
654
|
* Exports a design block element as a file of the given mime type.
|
|
631
655
|
* Performs an internal update to resolve the final layout for the blocks.
|
|
@@ -633,8 +657,28 @@ export declare class BlockAPI {
|
|
|
633
657
|
* @param mimeType - The mime type of the output file.
|
|
634
658
|
* @param options - The options for exporting the block type
|
|
635
659
|
* @returns A promise that resolves with the exported image or is rejected with an error.
|
|
660
|
+
* @deprecated Use the new `export` signature instead
|
|
661
|
+
*
|
|
662
|
+
* @example
|
|
663
|
+
* ```typescript
|
|
664
|
+
* // Before migration
|
|
665
|
+
* const blob = await cesdk.block.export(blockId, MimeType.Png, { pngCompressionLevel: 5 })
|
|
666
|
+
* // After migration
|
|
667
|
+
* const blob = await cesdk.block.export(blockId, { mimeType: 'image/png', pngCompressionLevel: 5 })
|
|
668
|
+
* ```
|
|
636
669
|
*/
|
|
637
|
-
export(handle: DesignBlockId, mimeType?:
|
|
670
|
+
export(handle: DesignBlockId, mimeType?: ExportOptions['mimeType'], options?: Omit<ExportOptions, 'mimeType'>): Promise<Blob>;
|
|
671
|
+
/**
|
|
672
|
+
* Exports a design block element as a file of the given mime type.
|
|
673
|
+
* Performs an internal update to resolve the final layout for the blocks.
|
|
674
|
+
* @param handle - The design block element to export.
|
|
675
|
+
* @param maskColorR - The red component of the special color mask color.
|
|
676
|
+
* @param maskColorG - The green component of the special color mask color.
|
|
677
|
+
* @param maskColorB - The blue component of the special color mask color.
|
|
678
|
+
* @param options - The options for exporting the block type
|
|
679
|
+
* @returns A promise that resolves with an array of the exported image and mask or is rejected with an error.
|
|
680
|
+
*/
|
|
681
|
+
exportWithColorMask(handle: DesignBlockId, maskColorR: number, maskColorG: number, maskColorB: number, options?: ExportOptions): Promise<Blob[]>;
|
|
638
682
|
/**
|
|
639
683
|
* Exports a design block element as a file of the given mime type.
|
|
640
684
|
* Performs an internal update to resolve the final layout for the blocks.
|
|
@@ -645,27 +689,77 @@ export declare class BlockAPI {
|
|
|
645
689
|
* @param maskColorB - The blue component of the special color mask color.
|
|
646
690
|
* @param options - The options for exporting the block type
|
|
647
691
|
* @returns A promise that resolves with an array of the exported image and mask or is rejected with an error.
|
|
692
|
+
* @deprecated Use the new `exportWithColorMask` signature instead
|
|
693
|
+
*
|
|
694
|
+
* @example
|
|
695
|
+
* ```typescript
|
|
696
|
+
* // Before migration
|
|
697
|
+
* const blob = await cesdk.block.exportWithColorMask(
|
|
698
|
+
* blockId,
|
|
699
|
+
* MimeType.Png,
|
|
700
|
+
* 0.5,
|
|
701
|
+
* 0,
|
|
702
|
+
* 0,
|
|
703
|
+
* {
|
|
704
|
+
* pngCompressionLevel: 5
|
|
705
|
+
* }
|
|
706
|
+
* );
|
|
707
|
+
* // After migration
|
|
708
|
+
* const blob = await cesdk.block.exportWithColorMask(
|
|
709
|
+
* blockId,
|
|
710
|
+
* 0.5,
|
|
711
|
+
* 0,
|
|
712
|
+
* 0,
|
|
713
|
+
* {
|
|
714
|
+
* mimeType: 'image/png',
|
|
715
|
+
* pngCompressionLevel: 5
|
|
716
|
+
* }
|
|
717
|
+
* );
|
|
718
|
+
* ```
|
|
648
719
|
*/
|
|
649
|
-
exportWithColorMask(handle: DesignBlockId, mimeType:
|
|
720
|
+
exportWithColorMask(handle: DesignBlockId, mimeType: ExportOptions['mimeType'] | undefined, maskColorR: number, maskColorG: number, maskColorB: number, options?: Omit<ExportOptions, 'mimeType'>): Promise<Blob[]>;
|
|
650
721
|
/**
|
|
651
722
|
* Exports a design block as a video file of the given mime type.
|
|
652
723
|
* Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
|
|
653
724
|
* @param handle - The design block element to export. Currently, only page blocks are supported.
|
|
654
|
-
* @param
|
|
655
|
-
* @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.
|
|
656
|
-
* @param options - The options for exporting the video.
|
|
725
|
+
* @param options - The options for exporting the video, including mime type, h264 profile, level, bitrate, time offset, duration, framerate, target width and height.
|
|
657
726
|
* @returns A promise that resolves with a video blob or is rejected with an error.
|
|
658
727
|
*/
|
|
659
|
-
exportVideo(handle: DesignBlockId,
|
|
728
|
+
exportVideo(handle: DesignBlockId, options?: VideoExportOptions): Promise<Blob>;
|
|
729
|
+
/**
|
|
730
|
+
* Exports a design block as a video file of the given mime type.
|
|
731
|
+
* Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
|
|
732
|
+
* @param handle - The design block element to export. Currently, only page blocks are supported.
|
|
733
|
+
* @param mimeType - The MIME type of the output video file.
|
|
734
|
+
* @param onProgress - A callback which reports on the progress of the export.
|
|
735
|
+
* @param options - The options for exporting the video, including h264 profile, level, bitrate, time offset, duration, framerate, target width and height.
|
|
736
|
+
* @returns A promise that resolves with a video blob or is rejected with an error.
|
|
737
|
+
* @deprecated Use the new `exportVideo` signature instead
|
|
738
|
+
*
|
|
739
|
+
* @example
|
|
740
|
+
* ```typescript
|
|
741
|
+
* // Before migration
|
|
742
|
+
* const blob = await cesdk.block.exportVideo(blockId, 'video/mp4', handleProgress, {
|
|
743
|
+
* targetWidth: 1920,
|
|
744
|
+
* targetHeight: 1080,
|
|
745
|
+
* })
|
|
746
|
+
* // After migration
|
|
747
|
+
* const blob = await cesdk.block.exportVideo(blockId, {
|
|
748
|
+
* mimeType: 'video/mp4',
|
|
749
|
+
* onProgress: handleProgress,
|
|
750
|
+
* targetWidth: 1920,
|
|
751
|
+
* targetHeight: 1080,
|
|
752
|
+
* })
|
|
753
|
+
* ```
|
|
754
|
+
*/
|
|
755
|
+
exportVideo(handle: DesignBlockId, mimeType?: VideoExportOptions['mimeType'], progressCallback?: VideoExportOptions['onProgress'], options?: Omit<VideoExportOptions, 'mimeType' | 'onProgress'>): Promise<Blob>;
|
|
660
756
|
/**
|
|
661
757
|
* Exports a design block as an audio file of the given mime type.
|
|
662
758
|
* @param handle - The design block element to export. Currently, only audio blocks are supported.
|
|
663
|
-
* @param
|
|
664
|
-
* @param progressCallback - A callback which reports on the progress of the export.
|
|
665
|
-
* @param options - The options for exporting the audio.
|
|
759
|
+
* @param options - The options for exporting the audio, including mime type, progress callback, and export settings.
|
|
666
760
|
* @returns A promise that resolves with an audio blob or is rejected with an error.
|
|
667
761
|
*/
|
|
668
|
-
unstable_exportAudio(handle: DesignBlockId,
|
|
762
|
+
unstable_exportAudio(handle: DesignBlockId, options?: AudioExportOptions): Promise<Blob>;
|
|
669
763
|
/**
|
|
670
764
|
* Loads existing blocks from the given string.
|
|
671
765
|
* The blocks are not attached by default and won't be visible until attached to a page or the scene.
|
|
@@ -4013,6 +4107,12 @@ declare interface ExportAudioOptions {
|
|
|
4013
4107
|
* @public
|
|
4014
4108
|
*/
|
|
4015
4109
|
export declare type ExportOptions = {
|
|
4110
|
+
/**
|
|
4111
|
+
* The MIME type of the output file.
|
|
4112
|
+
*
|
|
4113
|
+
* @defaultValue 'image/png'
|
|
4114
|
+
*/
|
|
4115
|
+
mimeType?: ImageMimeType | Exclude<ApplicationMimeType, 'application/zip'>;
|
|
4016
4116
|
/**
|
|
4017
4117
|
* The PNG compression level to use, when exporting to PNG.
|
|
4018
4118
|
*
|
|
@@ -4226,6 +4326,9 @@ export declare interface HTMLCreativeEngineCanvasElement extends HTMLElement {
|
|
|
4226
4326
|
clear(): void;
|
|
4227
4327
|
}
|
|
4228
4328
|
|
|
4329
|
+
/** @public */
|
|
4330
|
+
export declare type ImageMimeType = Extract<MimeType_2, 'image/png' | 'image/jpeg' | 'image/webp' | 'image/x-tga'>;
|
|
4331
|
+
|
|
4229
4332
|
/**
|
|
4230
4333
|
* Type guard for {@link CMYKColor}
|
|
4231
4334
|
* @public
|
|
@@ -4269,19 +4372,25 @@ export declare const LogLevel: {
|
|
|
4269
4372
|
readonly Error: "Error";
|
|
4270
4373
|
};
|
|
4271
4374
|
|
|
4375
|
+
/**
|
|
4376
|
+
* @public
|
|
4377
|
+
* @deprecated Use The `MimeType` string literal types instead.
|
|
4378
|
+
* */
|
|
4379
|
+
declare const MimeType_2: {
|
|
4380
|
+
readonly Png: "image/png";
|
|
4381
|
+
readonly Jpeg: "image/jpeg";
|
|
4382
|
+
readonly WebP: "image/webp";
|
|
4383
|
+
readonly Tga: "image/x-tga";
|
|
4384
|
+
readonly Wav: "audio/wav";
|
|
4385
|
+
readonly Mp4: "video/mp4";
|
|
4386
|
+
readonly QuickTime: "video/quicktime";
|
|
4387
|
+
readonly Binary: "application/octet-stream";
|
|
4388
|
+
readonly Pdf: "application/pdf";
|
|
4389
|
+
readonly Zip: "application/zip";
|
|
4390
|
+
};
|
|
4391
|
+
|
|
4272
4392
|
/** @public */
|
|
4273
|
-
declare
|
|
4274
|
-
Png = "image/png",
|
|
4275
|
-
Jpeg = "image/jpeg",
|
|
4276
|
-
WebP = "image/webp",
|
|
4277
|
-
Tga = "image/x-tga",
|
|
4278
|
-
Wav = "audio/wav",
|
|
4279
|
-
Mp4 = "video/mp4",
|
|
4280
|
-
QuickTime = "video/quicktime",
|
|
4281
|
-
Binary = "application/octet-stream",
|
|
4282
|
-
Pdf = "application/pdf",
|
|
4283
|
-
Zip = "application/zip"
|
|
4284
|
-
}
|
|
4393
|
+
declare type MimeType_2 = (typeof MimeType_2)[keyof typeof MimeType_2];
|
|
4285
4394
|
export { MimeType_2 as MimeType }
|
|
4286
4395
|
|
|
4287
4396
|
/**
|
|
@@ -4986,6 +5095,16 @@ export declare type VerticalTextAlignment = 'Top' | 'Bottom' | 'Center';
|
|
|
4986
5095
|
* @public
|
|
4987
5096
|
*/
|
|
4988
5097
|
export declare type VideoExportOptions = {
|
|
5098
|
+
/**
|
|
5099
|
+
* The MIME type of the output video file.
|
|
5100
|
+
*
|
|
5101
|
+
* @defaultValue 'video/mp4'
|
|
5102
|
+
*/
|
|
5103
|
+
mimeType?: VideoMimeType;
|
|
5104
|
+
/**
|
|
5105
|
+
* A callback which reports on the progress of the export.
|
|
5106
|
+
*/
|
|
5107
|
+
onProgress?: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void;
|
|
4989
5108
|
/**
|
|
4990
5109
|
* Determines the encoder feature set and in turn the quality, size and speed of the encoding process.
|
|
4991
5110
|
*
|
|
@@ -5046,6 +5165,9 @@ export declare type VideoExportOptions = {
|
|
|
5046
5165
|
abortSignal?: AbortSignal;
|
|
5047
5166
|
};
|
|
5048
5167
|
|
|
5168
|
+
/** @public */
|
|
5169
|
+
export declare type VideoMimeType = Extract<MimeType_2, 'video/mp4' | 'video/quicktime'>;
|
|
5170
|
+
|
|
5049
5171
|
/**
|
|
5050
5172
|
* Describes a rectangle on the screen
|
|
5051
5173
|
* - `x` and `y` indicate the position
|