@cesdk/node 1.16.1 → 1.17.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.
- package/assets/core/{cesdk-v1.16.1-9d5c3e5b0516141e5053.wasm → cesdk-v1.17.0-rc.0-cf1a0312f2de192d27d5.wasm} +0 -0
- package/assets/core/{cesdk-v1.16.1-7a4b44a70a18a86d7978.data → cesdk-v1.17.0-rc.0-d92fadafda0b5129818d.data} +0 -0
- package/index.d.ts +38 -138
- package/index.js +1 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1859,21 +1859,6 @@ export declare class BlockAPI {
|
|
|
1859
1859
|
* @param fill - The new fill.
|
|
1860
1860
|
*/
|
|
1861
1861
|
setFill(id: DesignBlockId, fill: DesignBlockId): void;
|
|
1862
|
-
/**
|
|
1863
|
-
* Set the fill type of the given design block.
|
|
1864
|
-
* @param id - The block whose fill type should be set.
|
|
1865
|
-
* @param type - The fill type to set.
|
|
1866
|
-
* @returns An empty result on success, an error otherwise.
|
|
1867
|
-
* @deprecated Use `createFill`, e.g., with type 'color' and then apply the fill block with `setFill` to the block instead. If the block has a fill, it should be removed with `getFill` and `destroy`.
|
|
1868
|
-
*/
|
|
1869
|
-
setFillType(id: DesignBlockId, fillType: FillType): void;
|
|
1870
|
-
/**
|
|
1871
|
-
* Get the fill type of the given design block.
|
|
1872
|
-
* @param id - The block whose fill type should be queried.
|
|
1873
|
-
* @returns The block's fill type or an error.
|
|
1874
|
-
* @deprecated Use `getEnum(id, 'fill/type')` instead.
|
|
1875
|
-
*/
|
|
1876
|
-
getFillType(id: DesignBlockId): FillType;
|
|
1877
1862
|
/**
|
|
1878
1863
|
* Set the fill color of the given design block.
|
|
1879
1864
|
* @param id - The block whose fill color should be set.
|
|
@@ -1890,100 +1875,6 @@ export declare class BlockAPI {
|
|
|
1890
1875
|
* @returns A result holding the fill color or an error.
|
|
1891
1876
|
*/
|
|
1892
1877
|
getFillSolidColor(id: DesignBlockId): RGBA;
|
|
1893
|
-
/**
|
|
1894
|
-
* Set the gradient type of the given design block.
|
|
1895
|
-
* @param id - The block whose gradient type should be set.
|
|
1896
|
-
* @param type - The gradient type.
|
|
1897
|
-
* @returns An empty result on success, an error otherwise.
|
|
1898
|
-
* @deprecated Use `createFill`, e.g., with '//ly.img.ubq/fill/gradient/linear' and then apply the fill block with `setFill` to the block instead. If the block has a fill, it should be removed with `getFill` and `destroy`.
|
|
1899
|
-
*/
|
|
1900
|
-
setFillGradientType(id: DesignBlockId, gradientType: GradientType): void;
|
|
1901
|
-
/**
|
|
1902
|
-
* Get the gradient type of the given design block.
|
|
1903
|
-
* @param id - The block whose gradient type should be queried.
|
|
1904
|
-
* @returns The gradient type.
|
|
1905
|
-
* @deprecated Use `getEnum(id, 'fill/gradient/type')` instead.
|
|
1906
|
-
*/
|
|
1907
|
-
getFillGradientType(id: DesignBlockId): GradientType;
|
|
1908
|
-
/**
|
|
1909
|
-
* Add a gradient color stop on a design block.
|
|
1910
|
-
* @param id - The block on which a gradient color stop should be added.
|
|
1911
|
-
* @param stop - Where to add a color stop in the range 0 to 1.
|
|
1912
|
-
* @param r - The red color component in the range of 0 to 1.
|
|
1913
|
-
* @param g - The green color component in the range of 0 to 1.
|
|
1914
|
-
* @param b - The blue color component in the range of 0 to 1.
|
|
1915
|
-
* @param a - The alpha color component in the range of 0 to 1.
|
|
1916
|
-
* @returns An empty result on success, an error otherwise.
|
|
1917
|
-
* @deprecated Removed without a direct replacement. Use `block.setFloat(fill, keypath, value)` with key paths 'fill/gradient/linear/startPointX/Y', 'fill/gradient/radial/centerPointX/Y', and 'fill/gradient/conical/centerPointX/Y' to move the control points.
|
|
1918
|
-
*/
|
|
1919
|
-
addFillGradientColorStop(id: DesignBlockId, stop: number, r: number, g: number, b: number, a?: number): void;
|
|
1920
|
-
/**
|
|
1921
|
-
* Remove a previously gradient color stop on a design block.
|
|
1922
|
-
* @param id - The block from which to remove the gradient color stop.
|
|
1923
|
-
* @param stop - The stop's position.
|
|
1924
|
-
* @returns An empty result on success, an error otherwise.
|
|
1925
|
-
* @deprecated Removed without a direct replacement. Use `block.setFloat(fill, keypath, value)` with key paths 'fill/gradient/linear/startPointX/Y', 'fill/gradient/radial/centerPointX/Y', and 'fill/gradient/conical/centerPointX/Y' to move the control points.
|
|
1926
|
-
*/
|
|
1927
|
-
removeFillGradientColorStop(id: DesignBlockId, stop: number): void;
|
|
1928
|
-
/**
|
|
1929
|
-
* Get the gradient fill color stops of the given design block.
|
|
1930
|
-
* @param id - The block whose gradient color stop should be queried.
|
|
1931
|
-
* @returns All of the design block's gradient color stops.
|
|
1932
|
-
* @deprecated Removed without a direct replacement. Use `block.getFloat(fill, keypath)` with key paths 'fill/gradient/linear/startPointX/Y', 'fill/gradient/radial/centerPointX/Y', and 'fill/gradient/conical/centerPointX/Y' instead.
|
|
1933
|
-
*/
|
|
1934
|
-
getFillGradientColorStops(id: DesignBlockId): GradientstopRGBA[];
|
|
1935
|
-
/**
|
|
1936
|
-
* Set the gradient fill color stops of the given design block, overwriting previously set color stops.
|
|
1937
|
-
* @param id - The block whose gradient color stop should be set.
|
|
1938
|
-
* @param stops - The gradient color stops to set.
|
|
1939
|
-
* @returns An empty result on success, an error otherwise.
|
|
1940
|
-
* @deprecated Removed without a direct replacement. Use `block.setFloat(fill, keypath, value)` with key paths 'fill/gradient/linear/startPointX/Y', 'fill/gradient/radial/centerPointX/Y', and 'fill/gradient/conical/centerPointX/Y' to move the control points.
|
|
1941
|
-
*/
|
|
1942
|
-
setFillGradientColorStops(id: DesignBlockId, stops: GradientstopRGBA[]): void;
|
|
1943
|
-
/**
|
|
1944
|
-
* Set the position of a gradient's control point.
|
|
1945
|
-
* Note that Different gradient types of different control points.
|
|
1946
|
-
* @param id - The block whose gradient control point should be set.
|
|
1947
|
-
* @param gradientControlPointType - The type of control point.
|
|
1948
|
-
* @param x - The horizontal component of the control point.
|
|
1949
|
-
* @param y - The vertical component of the control point.
|
|
1950
|
-
* @returns true if the control point was set, an error otherwise.
|
|
1951
|
-
* @deprecated Use, e.g., `block.setFloat(fill, 'fill/gradient/linear/startPointX', value)` and `startPointY` instead.
|
|
1952
|
-
*/
|
|
1953
|
-
setFillGradientControlPoint(id: DesignBlockId, gradientControlPointType: GradientControlPointType, x: number, y: number): boolean;
|
|
1954
|
-
/**
|
|
1955
|
-
* Get the horizontal component of a gradient's control point.
|
|
1956
|
-
* @param id - The block whose gradient control point should be queried.
|
|
1957
|
-
* @param gradientControlPointType - The type of control point.
|
|
1958
|
-
* @returns The horizontal component of the control point, an error otherwise.
|
|
1959
|
-
* @deprecated Use `block.getFloat(fill, keypath)` with key paths 'fill/gradient/linear/startPointX', 'fill/gradient/radial/centerPointX', and 'fill/gradient/conical/centerPointX' instead.
|
|
1960
|
-
*/
|
|
1961
|
-
getFillGradientControlPointX(id: DesignBlockId, gradientControlPointType: GradientControlPointType): number;
|
|
1962
|
-
/**
|
|
1963
|
-
* Get the vertical component of a gradient's control point.
|
|
1964
|
-
* @param id - The block whose gradient control point should be queried.
|
|
1965
|
-
* @param gradientControlPointType - The type of control point.
|
|
1966
|
-
* @returns The vertical component of the control point, an error otherwise.
|
|
1967
|
-
* @deprecated Use `block.setFloat(fill, keypath, value)` with key paths 'fill/gradient/linear/startPointY', 'fill/gradient/radial/centerPointY', and 'fill/gradient/conical/centerPointY' instead.
|
|
1968
|
-
*/
|
|
1969
|
-
getFillGradientControlPointY(id: DesignBlockId, gradientControlPointType: GradientControlPointType): number;
|
|
1970
|
-
/**
|
|
1971
|
-
* Set a gradient's radius.
|
|
1972
|
-
* Note that Not all gradients have a radius.
|
|
1973
|
-
* @param id - The block whose gradient radius should be set.
|
|
1974
|
-
* @param radius - The gradient's radius.
|
|
1975
|
-
* @returns true if the control point was set, an error otherwise.
|
|
1976
|
-
* @deprecated Use, e.g., `block.setFloat(fill, 'fill/gradient/radial/radius', value)` instead.
|
|
1977
|
-
*/
|
|
1978
|
-
setFillGradientRadius(id: DesignBlockId, radius: number): boolean;
|
|
1979
|
-
/**
|
|
1980
|
-
* Get a gradient's radius.
|
|
1981
|
-
* Note that Not all gradients have a radius.
|
|
1982
|
-
* @param id - The block whose gradient radius should be queried.
|
|
1983
|
-
* @returns the gradient's radius, an error otherwise.
|
|
1984
|
-
* @deprecated Use, e.g., `block.getFloat(fill, 'fill/gradient/radial/radius')` instead.
|
|
1985
|
-
*/
|
|
1986
|
-
getFillGradientRadius(id: DesignBlockId): number;
|
|
1987
1878
|
/**
|
|
1988
1879
|
* Enable or disable the placeholder function for a block.
|
|
1989
1880
|
* @param id - The block whose placeholder function should be enabled or disabled.
|
|
@@ -2337,6 +2228,12 @@ export declare class BlockAPI {
|
|
|
2337
2228
|
* @deprecated Use `generateVideoThumbnailSequence` instead.
|
|
2338
2229
|
*/
|
|
2339
2230
|
getPageThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Blob>;
|
|
2231
|
+
/**
|
|
2232
|
+
* Update the pixels of the given pixel stream fill block.
|
|
2233
|
+
* @param id - The pixel stream fill block.
|
|
2234
|
+
* @param buffer - Use pixel data from a canvas or a video element.
|
|
2235
|
+
*/
|
|
2236
|
+
setNativePixelBuffer(id: number, buffer: HTMLCanvasElement | HTMLVideoElement): void;
|
|
2340
2237
|
}
|
|
2341
2238
|
|
|
2342
2239
|
/** @public */
|
|
@@ -2800,7 +2697,7 @@ export declare enum DesignBlockType {
|
|
|
2800
2697
|
Camera = "//ly.img.ubq/camera",
|
|
2801
2698
|
Page = "//ly.img.ubq/page",
|
|
2802
2699
|
Image = "//ly.img.ubq/image",
|
|
2803
|
-
|
|
2700
|
+
Graphic = "//ly.img.ubq/graphic",
|
|
2804
2701
|
Video = "//ly.img.ubq/video",
|
|
2805
2702
|
VideoFill = "//ly.img.ubq/fill/video",
|
|
2806
2703
|
ImageFill = "//ly.img.ubq/fill/image",
|
|
@@ -2814,7 +2711,11 @@ export declare enum DesignBlockType {
|
|
|
2814
2711
|
PolygonShape = "//ly.img.ubq/shapes/polygon",
|
|
2815
2712
|
EllipseShape = "//ly.img.ubq/shapes/ellipse",
|
|
2816
2713
|
Group = "//ly.img.ubq/group",
|
|
2817
|
-
Cutout = "//ly.img.ubq/cutout"
|
|
2714
|
+
Cutout = "//ly.img.ubq/cutout",
|
|
2715
|
+
ColorFill = "//ly.img.ubq/fill/color",
|
|
2716
|
+
LinearGradientFill = "//ly.img.ubq/fill/gradient/linear",
|
|
2717
|
+
RadialGradientFill = "//ly.img.ubq/fill/gradient/radial",
|
|
2718
|
+
ConicalGradientFill = "//ly.img.ubq/fill/gradient/conical"
|
|
2818
2719
|
}
|
|
2819
2720
|
|
|
2820
2721
|
/**
|
|
@@ -3189,6 +3090,12 @@ export declare type ExportOptions = {
|
|
|
3189
3090
|
* @defaultValue 0.9
|
|
3190
3091
|
*/
|
|
3191
3092
|
jpegQuality?: number;
|
|
3093
|
+
/**
|
|
3094
|
+
* The WebP quality to use when encoding to WebP. Valid values are (0-1], higher means better quality.
|
|
3095
|
+
* WebP uses a special lossless encoding that usually produces smaller file sizes than PNG.
|
|
3096
|
+
* Ignored for other encodings. Defaults to 1.0.
|
|
3097
|
+
*/
|
|
3098
|
+
webpQuality?: number;
|
|
3192
3099
|
/**
|
|
3193
3100
|
* An optional target width used in conjunction with target height.
|
|
3194
3101
|
* If used, the block will be rendered large enough, that it fills the target
|
|
@@ -3212,6 +3119,7 @@ export declare type ExportOptions = {
|
|
|
3212
3119
|
/** @public */
|
|
3213
3120
|
declare interface ExportOptions_2 {
|
|
3214
3121
|
jpegQuality: number;
|
|
3122
|
+
webpQuality: number;
|
|
3215
3123
|
pngCompressionLevel: number;
|
|
3216
3124
|
useTargetSize: boolean;
|
|
3217
3125
|
targetWidth: number;
|
|
@@ -3229,11 +3137,6 @@ declare interface ExportVideoOptions {
|
|
|
3229
3137
|
targetHeight: number;
|
|
3230
3138
|
}
|
|
3231
3139
|
|
|
3232
|
-
/**
|
|
3233
|
-
* @public
|
|
3234
|
-
*/
|
|
3235
|
-
export declare type FillType = 'Solid' | 'Gradient' | 'Video' | 'Image';
|
|
3236
|
-
|
|
3237
3140
|
/** @public */
|
|
3238
3141
|
declare interface FindAssetsQuery {
|
|
3239
3142
|
perPage: number;
|
|
@@ -3265,11 +3168,6 @@ export declare interface GradientColorStop {
|
|
|
3265
3168
|
stop: number;
|
|
3266
3169
|
}
|
|
3267
3170
|
|
|
3268
|
-
/**
|
|
3269
|
-
* @public
|
|
3270
|
-
*/
|
|
3271
|
-
export declare type GradientControlPointType = 'Start' | 'End' | 'Center';
|
|
3272
|
-
|
|
3273
3171
|
/**
|
|
3274
3172
|
* @public
|
|
3275
3173
|
*/
|
|
@@ -3281,11 +3179,6 @@ b: number,
|
|
|
3281
3179
|
a: number
|
|
3282
3180
|
];
|
|
3283
3181
|
|
|
3284
|
-
/**
|
|
3285
|
-
* @public
|
|
3286
|
-
*/
|
|
3287
|
-
export declare type GradientType = 'Linear' | 'Radial' | 'Conical';
|
|
3288
|
-
|
|
3289
3182
|
/**
|
|
3290
3183
|
* A hexadecimal color value (RGB or RGBA) that starts with a '#'
|
|
3291
3184
|
* @example #6686FF or #6686FFFF
|
|
@@ -3339,6 +3232,7 @@ export declare const LogLevel: {
|
|
|
3339
3232
|
declare enum MimeType_2 {
|
|
3340
3233
|
Png = "image/png",
|
|
3341
3234
|
Jpeg = "image/jpeg",
|
|
3235
|
+
WebP = "image/webp",
|
|
3342
3236
|
Tga = "image/x-tga",
|
|
3343
3237
|
Mp4 = "video/mp4",
|
|
3344
3238
|
QuickTime = "video/quicktime",
|
|
@@ -3597,25 +3491,26 @@ export declare class SceneAPI {
|
|
|
3597
3491
|
*/
|
|
3598
3492
|
isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;
|
|
3599
3493
|
/**
|
|
3600
|
-
* Continually ensures the camera position to be within the width and height of
|
|
3494
|
+
* Continually ensures the camera position to be within the width and height of the blocks axis-aligned bounding box.
|
|
3601
3495
|
* Without padding, this results in a tight clamp on the block. With padding, the padded part of the
|
|
3602
|
-
*
|
|
3496
|
+
* blocks is ensured to be visible.
|
|
3603
3497
|
*
|
|
3604
|
-
* @param
|
|
3498
|
+
* @param ids - The blocks to which the camera position is adjusted to, usually, the scene or a page.
|
|
3605
3499
|
* @param paddingLeft - Optional padding in screen pixels to the left of the block.
|
|
3606
3500
|
* @param paddingTop - Optional padding in screen pixels to the top of the block.
|
|
3607
3501
|
* @param paddingRight - Optional padding in screen pixels to the right of the block.
|
|
3608
3502
|
* @param paddingBottom - Optional padding in screen pixels to the bottom of the block.
|
|
3609
|
-
* @param scaledPaddingLeft - Optional padding in pixels to the left of the block that scales with the zoom level.
|
|
3610
|
-
* @param scaledPaddingTop - Optional padding in pixels to the top of the block that scales with the zoom level.
|
|
3611
|
-
* @param scaledPaddingRight - Optional padding in pixels to the right of the block that scales with the zoom level.
|
|
3612
|
-
* @param scaledPaddingBottom - Optional padding in pixels to the bottom of the block that scales with the zoom level.
|
|
3503
|
+
* @param scaledPaddingLeft - Optional padding in screen pixels to the left of the block that scales with the zoom level until five times the initial value.
|
|
3504
|
+
* @param scaledPaddingTop - Optional padding in screen pixels to the top of the block that scales with the zoom level until five times the initial value.
|
|
3505
|
+
* @param scaledPaddingRight - Optional padding in screen pixels to the right of the block that scales with the zoom level until five times the initial value.
|
|
3506
|
+
* @param scaledPaddingBottom - Optional padding in screen pixels to the bottom of the block that scales with the zoom level until five times the initial value.
|
|
3613
3507
|
*/
|
|
3614
|
-
unstable_enableCameraPositionClamping(
|
|
3508
|
+
unstable_enableCameraPositionClamping(ids: DesignBlockId[], paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;
|
|
3615
3509
|
/**
|
|
3616
3510
|
* Disables any previously set position clamping for the current scene.
|
|
3511
|
+
* @param blockOrScene - Optionally, the scene or a block in the scene for which to query the position clamping.
|
|
3617
3512
|
*/
|
|
3618
|
-
unstable_disableCameraPositionClamping(): void;
|
|
3513
|
+
unstable_disableCameraPositionClamping(blockOrScene?: number | null): void;
|
|
3619
3514
|
/**
|
|
3620
3515
|
* Queries whether position clamping is enabled.
|
|
3621
3516
|
*
|
|
@@ -3627,7 +3522,7 @@ export declare class SceneAPI {
|
|
|
3627
3522
|
/**
|
|
3628
3523
|
* Continually ensures the zoom level of the camera in the active scene to be in the given range.
|
|
3629
3524
|
*
|
|
3630
|
-
* @param
|
|
3525
|
+
* @param ids - The blocks to which the camera zoom limits are adjusted to, usually, the scene or a page.
|
|
3631
3526
|
* @param minZoomLimit - The minimum zoom level limit when zooming out, unlimited when negative.
|
|
3632
3527
|
* @param maxZoomLimit - The maximum zoom level limit when zooming in, unlimited when negative.
|
|
3633
3528
|
* @param paddingLeft - Optional padding in screen pixels to the left of the block. Only applied when the block is not a camera.
|
|
@@ -3636,11 +3531,12 @@ export declare class SceneAPI {
|
|
|
3636
3531
|
* @param paddingBottom - Optional padding in screen pixels to the bottom of the block. Only applied when the block is not a camera.
|
|
3637
3532
|
*
|
|
3638
3533
|
*/
|
|
3639
|
-
unstable_enableCameraZoomClamping(
|
|
3534
|
+
unstable_enableCameraZoomClamping(ids: DesignBlockId[], minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;
|
|
3640
3535
|
/**
|
|
3641
3536
|
* Disables any previously set zoom clamping for the current scene.
|
|
3537
|
+
* @param blockOrScene - Optionally, the scene or a block for which to query the zoom clamping.
|
|
3642
3538
|
*/
|
|
3643
|
-
unstable_disableCameraZoomClamping(): void;
|
|
3539
|
+
unstable_disableCameraZoomClamping(blockOrScene?: number | null): void;
|
|
3644
3540
|
/**
|
|
3645
3541
|
* Queries whether zoom clamping is enabled.
|
|
3646
3542
|
*
|
|
@@ -3866,6 +3762,10 @@ export declare type VideoExportOptions = {
|
|
|
3866
3762
|
* size entirely while maintaining its aspect ratio.
|
|
3867
3763
|
*/
|
|
3868
3764
|
targetHeight?: number;
|
|
3765
|
+
/**
|
|
3766
|
+
* An abortsignal that can be used to cancel the export.
|
|
3767
|
+
*/
|
|
3768
|
+
abortSignal?: AbortSignal;
|
|
3869
3769
|
};
|
|
3870
3770
|
|
|
3871
3771
|
/**
|