@cesdk/engine 1.38.0-rc.0 → 1.39.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
@@ -2096,9 +2096,11 @@ export declare class BlockAPI {
2096
2096
  * original contour.
2097
2097
  * @param simplifyDistanceThreshold - The maximum number of pixels by which the simplified cutout path can deviate from
2098
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.
2099
2101
  * @returns The newly created block or an error.
2100
2102
  */
2101
- createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number): DesignBlockId;
2103
+ createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number, useExistingShapeInformation?: boolean): DesignBlockId;
2102
2104
  /**
2103
2105
  * Create a Cutout block.
2104
2106
  * @param path - An SVG string describing a path.
@@ -2321,19 +2323,39 @@ export declare class BlockAPI {
2321
2323
  * Sets the given typeface for the text block.
2322
2324
  * The current formatting, e.g., bold or italic, is retained as far as possible. Some formatting might change if the
2323
2325
  * new typeface does not support it, e.g. thin might change to light, bold to normal, and/or italic to non-italic.
2326
+ * If the typeface is applied to the entire text block, its typeface property will be updated.
2327
+ * If a run does not support the new typeface, it will fall back to the default typeface from the typeface property.
2324
2328
  * Required scope: 'text/character'
2325
2329
  * @param id - The text block whose font should be changed.
2326
- * @param fallbackFontFileUri - The URI of the fallback font file.
2327
2330
  * @param typeface - The new typeface.
2331
+ * @param from - The start index of the UTF-16 range whose typeface should be changed.
2332
+ * 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.
2333
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2334
+ * @param to - The UTF-16 index after the last grapheme whose typeface should be changed.
2335
+ * 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.
2336
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2328
2337
  */
2329
- setTypeface(id: DesignBlockId, fallbackFontFileUri: string, typeface: Typeface): void;
2338
+ setTypeface(id: DesignBlockId, typeface: Typeface, from?: number, to?: number): void;
2330
2339
  /**
2331
2340
  * Returns the current typeface of the given text block.
2332
2341
  * @param id - The text block whose typeface should be queried.
2333
- * @returns The typeface of the text block.
2342
+ * @returns the typeface property of the text block. Does not return the typefaces of the text runs.
2334
2343
  * @throws An error if the block does not have a valid typeface.
2335
2344
  */
2336
2345
  getTypeface(id: DesignBlockId): Typeface;
2346
+ /**
2347
+ * Returns the current typefaces of the given text block.
2348
+ * @param id - The text block whose typefaces should be queried.
2349
+ * @param from - The start index of the grapheme range whose typefaces should be returned.
2350
+ * 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.
2351
+ * If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
2352
+ * @param to - The UTF-16 index after the last grapheme whose typefaces should be returned.
2353
+ * 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.
2354
+ * If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
2355
+ * @returns The typefaces of the text block.
2356
+ * @throws An error if the block does not have a valid typeface.
2357
+ */
2358
+ getTypefaces(id: DesignBlockId, from?: number, to?: number): Typeface[];
2337
2359
  /**
2338
2360
  * Returns the UTF-16 indices of the selected range of the text block that is currently being edited.
2339
2361
  * If both the start and end index of the returned range have the same value, then the text cursor is positioned at that index.
@@ -4564,7 +4586,7 @@ export declare type SceneMode = 'Design' | 'Video';
4564
4586
  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';
4565
4587
 
4566
4588
  /** @public */
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';
4589
+ export declare type SettingsBool = 'controlGizmo/showCropHandles' | 'controlGizmo/showCropScaleHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showScaleHandles' | 'doubleClickToCropEnabled' | 'features/singlePageModeEnabled' | 'features/pageCarouselEnabled' | 'features/transformEditsRetainCoverMode' | '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';
4568
4590
 
4569
4591
  /** @public
4570
4592
  */