@cesdk/engine 1.37.0 → 1.38.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/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.
@@ -2152,6 +2160,19 @@ export declare class BlockAPI {
2152
2160
  * 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
2161
  */
2154
2162
  getTextColors(id: DesignBlockId, from?: number, to?: number): Array<Color>;
2163
+ /**
2164
+ * Changes the weight of the text in the selected range to the given weight.
2165
+ * Required scope: 'text/edit'
2166
+ * @param block - The text block whose weight should be changed.
2167
+ * @param fontWeight - The new weight of the selected text range.
2168
+ * @param from - The start index of the UTF-16 range whose weight should be changed.
2169
+ * 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.
2170
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2171
+ * @param to - The UTF-16 index after the last grapheme whose weight should be changed.
2172
+ * 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.
2173
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2174
+ */
2175
+ setTextFontWeight(id: DesignBlockId, fontWeight: FontWeight, from?: number, to?: number): void;
2155
2176
  /**
2156
2177
  * Returns the ordered unique list of font weights of the text in the selected range.
2157
2178
  * @param block - The text block whose font weights should be returned.
@@ -2163,10 +2184,47 @@ export declare class BlockAPI {
2163
2184
  * 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
2185
  */
2165
2186
  getTextFontWeights(id: DesignBlockId, from?: number, to?: number): FontWeight[];
2187
+ /**
2188
+ * Sets the given font size for the text block.
2189
+ * Required scope: 'text/character'
2190
+ * @param block - The text block whose font size should be changed.
2191
+ * @param fontSize - The new font size.
2192
+ * @param from - The start index of the UTF-16 range whose font size should be changed.
2193
+ * 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.
2194
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2195
+ * @param to - The UTF-16 index after the last grapheme whose font size should be changed.
2196
+ * 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.
2197
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2198
+ */
2199
+ setTextFontSize(id: DesignBlockId, fontSize: number, from?: number, to?: number): void;
2200
+ /**
2201
+ * Returns the ordered unique list of font sizes of the text in the selected range.
2202
+ * @param block - The text block whose font sizes should be returned.
2203
+ * @param from - The start index of the grapheme range whose font sizes should be returned.
2204
+ * 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.
2205
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2206
+ * @param to - The UTF-16 index after the last grapheme whose font sizes should be returned.
2207
+ * 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.
2208
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2209
+ */
2210
+ getTextFontSizes(id: DesignBlockId, from?: number, to?: number): number[];
2211
+ /**
2212
+ * Changes the style of the text in the selected range to the given style.
2213
+ * Required scope: 'text/edit'
2214
+ * @param block - The text block whose style should be changed.
2215
+ * @param fontStyle - The new style of the selected text range.
2216
+ * @param from - The start index of the UTF-16 range whose style should be changed.
2217
+ * 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.
2218
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2219
+ * @param to - The UTF-16 index after the last grapheme whose style should be changed.
2220
+ * 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.
2221
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2222
+ */
2223
+ setTextFontStyle(id: DesignBlockId, fontStyle: FontStyle, from?: number, to?: number): void;
2166
2224
  /**
2167
2225
  * Returns the ordered unique list of font styles of the text in the selected range.
2168
2226
  * @param block - The text block whose font styles should be returned.
2169
- * @param from - The start index of the UTF-16 range whose font weights should be returned.
2227
+ * @param from - The start index of the UTF-16 range whose font styles should be returned.
2170
2228
  * 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
2229
  * 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
2230
  * @param to - The UTF-16 index after the last grapheme whose font styles should be returned.
@@ -2187,7 +2245,7 @@ export declare class BlockAPI {
2187
2245
  getTextCases(id: DesignBlockId, from?: number, to?: number): TextCase[];
2188
2246
  /**
2189
2247
  * Sets the given text case for the selected range of text.
2190
- * Required scope: 'text/edit'
2248
+ * Required scope: 'text/character'
2191
2249
  * @param id - The text block whose text case should be changed.
2192
2250
  * @param textCase - The new text case value.
2193
2251
  * @param from - The start index of the UTF-16 range whose text cases should be returned.
@@ -2199,7 +2257,7 @@ export declare class BlockAPI {
2199
2257
  */
2200
2258
  setTextCase(id: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;
2201
2259
  /**
2202
- * Returns whether the font weight of the given text block can be toggled between bold and normal.
2260
+ * Returns whether the font weight of the given text block can be toggled between bold and normal.
2203
2261
  * If any part of the selected range is not already bold and the necessary bold font is available, then this function returns true.
2204
2262
  * @param id - The text block whose font weight should be toggled.
2205
2263
  * @param from - The start index of the UTF-16 range whose font weight should be toggled.
@@ -2227,6 +2285,7 @@ export declare class BlockAPI {
2227
2285
  /**
2228
2286
  * Toggles the font weight of the given text block between bold and normal.
2229
2287
  * 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.
2288
+ * Required scope: 'text/character'
2230
2289
  * @param id - The text block whose font weight should be toggled.
2231
2290
  * @param from - The start index of the UTF-16 range whose font weight should be toggled.
2232
2291
  * 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 +2298,7 @@ export declare class BlockAPI {
2239
2298
  /**
2240
2299
  * Toggles the font style of the given text block between italic and normal.
2241
2300
  * 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.
2301
+ * Required scope: 'text/character'
2242
2302
  * @param id - The text block whose font style should be toggled.
2243
2303
  * @param from - The start index of the UTF-16 range whose font style should be toggled.
2244
2304
  * 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 +2311,7 @@ export declare class BlockAPI {
2251
2311
  /**
2252
2312
  * Sets the given font and typeface for the text block.
2253
2313
  * Existing formatting is reset.
2314
+ * Required scope: 'text/character'
2254
2315
  * @param id - The text block whose font should be changed.
2255
2316
  * @param fontFileUri - The URI of the new font file.
2256
2317
  * @param typeface - The typeface of the new font.
@@ -2260,6 +2321,7 @@ export declare class BlockAPI {
2260
2321
  * Sets the given typeface for the text block.
2261
2322
  * The current formatting, e.g., bold or italic, is retained as far as possible. Some formatting might change if the
2262
2323
  * new typeface does not support it, e.g. thin might change to light, bold to normal, and/or italic to non-italic.
2324
+ * Required scope: 'text/character'
2263
2325
  * @param id - The text block whose font should be changed.
2264
2326
  * @param fallbackFontFileUri - The URI of the fallback font file.
2265
2327
  * @param typeface - The new typeface.
@@ -4502,7 +4564,7 @@ export declare type SceneMode = 'Design' | 'Video';
4502
4564
  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
4565
 
4504
4566
  /** @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' | 'checkScopesInAPIs' | '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';
4567
+ 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
4568
 
4507
4569
  /** @public
4508
4570
  */