@cesdk/engine 1.37.0 → 1.38.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.37.0-PJWLHKQM.wasm → cesdk-v1.38.0-7UE54EA5.wasm} +0 -0
- package/assets/core/{worker-host-v1.37.0.js → worker-host-v1.38.0.js} +1 -1
- package/index.d.ts +70 -6
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.37.0-XHZXX7DG.data → cesdk-v1.38.0-XHZXX7DG.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare type AnimationTypeLonghand = `//ly.img.ubq/animation/${AnimationT
|
|
|
17
17
|
* using `cesdk.engine.block.createAnimation(id)`.
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
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';
|
|
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';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Generic asset information
|
|
@@ -1456,6 +1456,14 @@ export declare class BlockAPI {
|
|
|
1456
1456
|
* @param uri - The source to add to the source set.
|
|
1457
1457
|
*/
|
|
1458
1458
|
addImageFileURIToSourceSet(id: DesignBlockId, property: string, uri: string): Promise<void>;
|
|
1459
|
+
/**
|
|
1460
|
+
* Add a video file URI to the `sourceSet` property of the given block.
|
|
1461
|
+
* If there already exists in source set an video with the same width, that existing video will be replaced.
|
|
1462
|
+
* @param id - The block to update.
|
|
1463
|
+
* @param property - The name of the property to modify.
|
|
1464
|
+
* @param uri - The source to add to the source set.
|
|
1465
|
+
*/
|
|
1466
|
+
addVideoFileURIToSourceSet(id: DesignBlockId, property: string, uri: string): Promise<void>;
|
|
1459
1467
|
/**
|
|
1460
1468
|
* Set an enum property of the given design block to the given value.
|
|
1461
1469
|
* @param id - The block whose property should be set.
|
|
@@ -2088,9 +2096,11 @@ export declare class BlockAPI {
|
|
|
2088
2096
|
* original contour.
|
|
2089
2097
|
* @param simplifyDistanceThreshold - The maximum number of pixels by which the simplified cutout path can deviate from
|
|
2090
2098
|
* the cutout contour. If 0, no simplification step is performed.
|
|
2099
|
+
* @param useExistingShapeInformation - If true, the existing vector paths of the provided blocks will be used to create the cutout.
|
|
2100
|
+
* If false, new shape information for the cutout will be generated.
|
|
2091
2101
|
* @returns The newly created block or an error.
|
|
2092
2102
|
*/
|
|
2093
|
-
createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number): DesignBlockId;
|
|
2103
|
+
createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number, useExistingShapeInformation?: boolean): DesignBlockId;
|
|
2094
2104
|
/**
|
|
2095
2105
|
* Create a Cutout block.
|
|
2096
2106
|
* @param path - An SVG string describing a path.
|
|
@@ -2152,6 +2162,19 @@ export declare class BlockAPI {
|
|
|
2152
2162
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2153
2163
|
*/
|
|
2154
2164
|
getTextColors(id: DesignBlockId, from?: number, to?: number): Array<Color>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Changes the weight of the text in the selected range to the given weight.
|
|
2167
|
+
* Required scope: 'text/edit'
|
|
2168
|
+
* @param block - The text block whose weight should be changed.
|
|
2169
|
+
* @param fontWeight - The new weight of the selected text range.
|
|
2170
|
+
* @param from - The start index of the UTF-16 range whose weight should be changed.
|
|
2171
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2172
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2173
|
+
* @param to - The UTF-16 index after the last grapheme whose weight should be changed.
|
|
2174
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2175
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2176
|
+
*/
|
|
2177
|
+
setTextFontWeight(id: DesignBlockId, fontWeight: FontWeight, from?: number, to?: number): void;
|
|
2155
2178
|
/**
|
|
2156
2179
|
* Returns the ordered unique list of font weights of the text in the selected range.
|
|
2157
2180
|
* @param block - The text block whose font weights should be returned.
|
|
@@ -2163,10 +2186,47 @@ export declare class BlockAPI {
|
|
|
2163
2186
|
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2164
2187
|
*/
|
|
2165
2188
|
getTextFontWeights(id: DesignBlockId, from?: number, to?: number): FontWeight[];
|
|
2189
|
+
/**
|
|
2190
|
+
* Sets the given font size for the text block.
|
|
2191
|
+
* Required scope: 'text/character'
|
|
2192
|
+
* @param block - The text block whose font size should be changed.
|
|
2193
|
+
* @param fontSize - The new font size.
|
|
2194
|
+
* @param from - The start index of the UTF-16 range whose font size should be changed.
|
|
2195
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2196
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2197
|
+
* @param to - The UTF-16 index after the last grapheme whose font size should be changed.
|
|
2198
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2199
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2200
|
+
*/
|
|
2201
|
+
setTextFontSize(id: DesignBlockId, fontSize: number, from?: number, to?: number): void;
|
|
2202
|
+
/**
|
|
2203
|
+
* Returns the ordered unique list of font sizes of the text in the selected range.
|
|
2204
|
+
* @param block - The text block whose font sizes should be returned.
|
|
2205
|
+
* @param from - The start index of the grapheme range whose font sizes should be returned.
|
|
2206
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2207
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2208
|
+
* @param to - The UTF-16 index after the last grapheme whose font sizes should be returned.
|
|
2209
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2210
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2211
|
+
*/
|
|
2212
|
+
getTextFontSizes(id: DesignBlockId, from?: number, to?: number): number[];
|
|
2213
|
+
/**
|
|
2214
|
+
* Changes the style of the text in the selected range to the given style.
|
|
2215
|
+
* Required scope: 'text/edit'
|
|
2216
|
+
* @param block - The text block whose style should be changed.
|
|
2217
|
+
* @param fontStyle - The new style of the selected text range.
|
|
2218
|
+
* @param from - The start index of the UTF-16 range whose style should be changed.
|
|
2219
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2220
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2221
|
+
* @param to - The UTF-16 index after the last grapheme whose style should be changed.
|
|
2222
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2223
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2224
|
+
*/
|
|
2225
|
+
setTextFontStyle(id: DesignBlockId, fontStyle: FontStyle, from?: number, to?: number): void;
|
|
2166
2226
|
/**
|
|
2167
2227
|
* Returns the ordered unique list of font styles of the text in the selected range.
|
|
2168
2228
|
* @param block - The text block whose font styles should be returned.
|
|
2169
|
-
* @param from - The start index of the UTF-16 range whose font
|
|
2229
|
+
* @param from - The start index of the UTF-16 range whose font styles should be returned.
|
|
2170
2230
|
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2171
2231
|
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2172
2232
|
* @param to - The UTF-16 index after the last grapheme whose font styles should be returned.
|
|
@@ -2187,7 +2247,7 @@ export declare class BlockAPI {
|
|
|
2187
2247
|
getTextCases(id: DesignBlockId, from?: number, to?: number): TextCase[];
|
|
2188
2248
|
/**
|
|
2189
2249
|
* Sets the given text case for the selected range of text.
|
|
2190
|
-
* Required scope: 'text/
|
|
2250
|
+
* Required scope: 'text/character'
|
|
2191
2251
|
* @param id - The text block whose text case should be changed.
|
|
2192
2252
|
* @param textCase - The new text case value.
|
|
2193
2253
|
* @param from - The start index of the UTF-16 range whose text cases should be returned.
|
|
@@ -2199,7 +2259,7 @@ export declare class BlockAPI {
|
|
|
2199
2259
|
*/
|
|
2200
2260
|
setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
|
|
2201
2261
|
/**
|
|
2202
|
-
*
|
|
2262
|
+
* Returns whether the font weight of the given text block can be toggled between bold and normal.
|
|
2203
2263
|
* If any part of the selected range is not already bold and the necessary bold font is available, then this function returns true.
|
|
2204
2264
|
* @param id - The text block whose font weight should be toggled.
|
|
2205
2265
|
* @param from - The start index of the UTF-16 range whose font weight should be toggled.
|
|
@@ -2227,6 +2287,7 @@ export declare class BlockAPI {
|
|
|
2227
2287
|
/**
|
|
2228
2288
|
* Toggles the font weight of the given text block between bold and normal.
|
|
2229
2289
|
* If any part of the selected range is not already bold, all of the selected range will become bold. Only if the entire range is already bold will this function toggle it all back to normal.
|
|
2290
|
+
* Required scope: 'text/character'
|
|
2230
2291
|
* @param id - The text block whose font weight should be toggled.
|
|
2231
2292
|
* @param from - The start index of the UTF-16 range whose font weight should be toggled.
|
|
2232
2293
|
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
@@ -2239,6 +2300,7 @@ export declare class BlockAPI {
|
|
|
2239
2300
|
/**
|
|
2240
2301
|
* Toggles the font style of the given text block between italic and normal.
|
|
2241
2302
|
* If any part of the selected range is not already italic, all of the selected range will become italic. Only if the entire range is already italic will this function toggle it all back to normal.
|
|
2303
|
+
* Required scope: 'text/character'
|
|
2242
2304
|
* @param id - The text block whose font style should be toggled.
|
|
2243
2305
|
* @param from - The start index of the UTF-16 range whose font style should be toggled.
|
|
2244
2306
|
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
@@ -2251,6 +2313,7 @@ export declare class BlockAPI {
|
|
|
2251
2313
|
/**
|
|
2252
2314
|
* Sets the given font and typeface for the text block.
|
|
2253
2315
|
* Existing formatting is reset.
|
|
2316
|
+
* Required scope: 'text/character'
|
|
2254
2317
|
* @param id - The text block whose font should be changed.
|
|
2255
2318
|
* @param fontFileUri - The URI of the new font file.
|
|
2256
2319
|
* @param typeface - The typeface of the new font.
|
|
@@ -2260,6 +2323,7 @@ export declare class BlockAPI {
|
|
|
2260
2323
|
* Sets the given typeface for the text block.
|
|
2261
2324
|
* The current formatting, e.g., bold or italic, is retained as far as possible. Some formatting might change if the
|
|
2262
2325
|
* new typeface does not support it, e.g. thin might change to light, bold to normal, and/or italic to non-italic.
|
|
2326
|
+
* Required scope: 'text/character'
|
|
2263
2327
|
* @param id - The text block whose font should be changed.
|
|
2264
2328
|
* @param fallbackFontFileUri - The URI of the fallback font file.
|
|
2265
2329
|
* @param typeface - The new typeface.
|
|
@@ -4502,7 +4566,7 @@ export declare type SceneMode = 'Design' | 'Video';
|
|
|
4502
4566
|
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' | 'appearance/animation' | 'lifecycle/destroy' | 'lifecycle/duplicate' | 'editor/add' | 'editor/select';
|
|
4503
4567
|
|
|
4504
4568
|
/** @public */
|
|
4505
|
-
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | '
|
|
4569
|
+
export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'mouse/enableScroll' | 'mouse/enableZoom' | 'page/allowCropInteraction' | 'page/allowMoveInteraction' | 'page/allowResizeInteraction' | 'page/allowRotateInteraction' | 'page/dimOutOfPageAreas' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/title/appendPageName' | 'page/title/show' | 'page/title/showOnSinglePage' | 'page/title/showPageTitleTemplate' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'showBuildVersion' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning';
|
|
4506
4570
|
|
|
4507
4571
|
/** @public
|
|
4508
4572
|
*/
|