@cesdk/node 1.76.0-rc.0 → 1.76.0-rc.2

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
@@ -3640,6 +3640,25 @@ export declare class BlockAPI {
3640
3640
  * @param locked - Whether aspect ratio should be locked.
3641
3641
  */
3642
3642
  setCropAspectRatioLocked(id: DesignBlockId, locked: boolean): void;
3643
+ /**
3644
+ * Checks whether the "Original" crop preset (`ContentAspectRatio`) can be applied to a block.
3645
+ *
3646
+ * This runs the same preliminary check the apply path performs: it resolves the intrinsic
3647
+ * content dimensions from the block's image/video fill (an image fill resolves only from its
3648
+ * `sourceSet`; a video fill resolves from its `sourceSet` or the first decoded frame). Use it
3649
+ * to gate UI that would otherwise call the preset and fail — e.g. an unreplaced placeholder
3650
+ * image fill with an empty `sourceSet`.
3651
+ *
3652
+ * ```javascript
3653
+ * const canRevert = engine.block.canRevertToOriginalRatio(block);
3654
+ * ```
3655
+ *
3656
+ * @category Block Crop
3657
+ * @param id - The block to query.
3658
+ * @returns True if the preset would resolve, false if it cannot (no/placeholder fill, empty
3659
+ * sourceSet, video not yet decoded, or unsupported fill type).
3660
+ */
3661
+ canRevertToOriginalRatio(id: DesignBlockId): boolean;
3643
3662
  /**
3644
3663
  * Checks if a block has an opacity property.
3645
3664
  *
@@ -7201,6 +7220,17 @@ export declare class EditorAPI {
7201
7220
  * @returns True if a redo step is available.
7202
7221
  */
7203
7222
  canRedo(): boolean;
7223
+ /**
7224
+ * Subscribe to undo/redo history changes.
7225
+ *
7226
+ * @deprecated Use {@link onHistoryUpdatedWithKind} instead, which additionally reports a {@link HistoryUpdate}
7227
+ * describing the kind of update.
7228
+ *
7229
+ * @category Event Subscriptions
7230
+ * @param callback - Function called when the undo/redo history changes.
7231
+ * @returns A method to unsubscribe from the event.
7232
+ */
7233
+ onHistoryUpdated: (callback: () => void) => (() => void);
7204
7234
  /**
7205
7235
  * Subscribe to undo/redo history changes.
7206
7236
  *
@@ -7209,7 +7239,7 @@ export declare class EditorAPI {
7209
7239
  * via `setActiveHistory`.
7210
7240
  *
7211
7241
  * ```javascript
7212
- * const unsubscribe = engine.editor.onHistoryUpdated((kind) => {
7242
+ * const unsubscribe = engine.editor.onHistoryUpdatedWithKind((kind) => {
7213
7243
  * if (kind === 'Activated') {
7214
7244
  * // The active history was switched; no scene change happened on this event.
7215
7245
  * return;
@@ -7224,7 +7254,7 @@ export declare class EditorAPI {
7224
7254
  * @param callback - Function called when the undo/redo history changes. The argument describes the kind of update.
7225
7255
  * @returns A method to unsubscribe from the event.
7226
7256
  */
7227
- onHistoryUpdated: (callback: (kind: HistoryUpdate) => void) => (() => void);
7257
+ onHistoryUpdatedWithKind: (callback: (kind: HistoryUpdate) => void) => (() => void);
7228
7258
  /**
7229
7259
  * Subscribe to editor settings changes.
7230
7260
  *
@@ -8356,7 +8386,7 @@ export declare type HexColorString = string;
8356
8386
  export declare type HistoryId = number;
8357
8387
 
8358
8388
  /**
8359
- * Describes the kind of update that triggered an `onHistoryUpdated` callback.
8389
+ * Describes the kind of update that triggered an `onHistoryUpdatedWithKind` callback.
8360
8390
  *
8361
8391
  * - `Updated`: The active history's snapshots changed: a new snapshot was added (e.g. after an edit), or undo/redo
8362
8392
  * was applied. The scene state changed as a direct consequence.
@@ -9464,7 +9494,7 @@ export declare const SceneModeValues: readonly ["Design", "Video"];
9464
9494
  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';
9465
9495
 
9466
9496
  /** @public */
9467
- export declare type SettingBoolPropertyName = 'alwaysHighlightPlaceholders' | 'doubleClickToCropEnabled' | 'showBuildVersion' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'renderTextCursorAndSelectionInEngine' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'mouse/enableZoom' | 'mouse/enableScroll' | 'controlGizmo/showCropHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/dynamicMoveHandleVisibility' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showScaleHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showCropScaleHandles' | 'page/title/canEdit' | 'page/title/show' | 'page/title/showPageTitleTemplate' | 'page/title/appendPageName' | 'page/title/showOnSinglePage' | 'page/dimOutOfPageAreas' | 'page/allowCropInteraction' | 'page/allowResizeInteraction' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/allowRotateInteraction' | 'page/allowMoveInteraction' | 'page/marqueeSelectOnBodyDrag' | 'page/restrictPageSelectionToBorderAndTitle' | 'page/moveChildrenWhenCroppingFill' | 'page/selectWhenNoBlocksSelected' | 'page/highlightWhenCropping' | 'page/highlightDropTarget' | 'page/reparentBlocksToSceneWhenOutOfPage' | 'colorMaskingSettings/secondPass' | 'clampThumbnailTextureSizes' | 'useSystemFontFallback' | 'forceSystemEmojis' | 'features/textEditModeTransformHandlesEnabled' | 'features/videoStreamingEnabled' | 'grid/enabled' | 'grid/snapEnabled' | 'features/enableAutomaticEnumerations' | 'features/transparentClickThroughEnabled' | 'features/fontLineGapEnabled' | (string & {});
9497
+ export declare type SettingBoolPropertyName = 'alwaysHighlightPlaceholders' | 'doubleClickToCropEnabled' | 'showBuildVersion' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'playback/showAllBlocks' | 'renderTextCursorAndSelectionInEngine' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'mouse/enableZoom' | 'mouse/enableScroll' | 'controlGizmo/showCropHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/dynamicMoveHandleVisibility' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showScaleHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showCropScaleHandles' | 'page/title/canEdit' | 'page/title/show' | 'page/title/showPageTitleTemplate' | 'page/title/appendPageName' | 'page/title/showOnSinglePage' | 'page/dimOutOfPageAreas' | 'page/allowCropInteraction' | 'page/allowResizeInteraction' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/allowRotateInteraction' | 'page/allowMoveInteraction' | 'page/marqueeSelectOnBodyDrag' | 'page/restrictPageSelectionToBorderAndTitle' | 'page/moveChildrenWhenCroppingFill' | 'page/selectWhenNoBlocksSelected' | 'page/highlightWhenCropping' | 'page/highlightDropTarget' | 'page/reparentBlocksToSceneWhenOutOfPage' | 'colorMaskingSettings/secondPass' | 'clampThumbnailTextureSizes' | 'useSystemFontFallback' | 'forceSystemEmojis' | 'features/textEditModeTransformHandlesEnabled' | 'features/videoStreamingEnabled' | 'grid/enabled' | 'grid/snapEnabled' | 'features/enableAutomaticEnumerations' | 'features/transparentClickThroughEnabled' | 'features/fontLineGapEnabled' | (string & {});
9468
9498
 
9469
9499
  /** @public */
9470
9500
  export declare type SettingColorPropertyName = 'clearColor' | 'handleFillColor' | 'highlightColor' | 'pageHighlightColor' | 'placeholderHighlightColor' | 'snappingGuideColor' | 'rotationSnappingGuideColor' | 'cropOverlayColor' | 'textVariableHighlightColor' | 'borderOutlineColor' | 'progressColor' | 'errorStateColor' | 'page/title/color' | 'page/marginFillColor' | 'page/marginFrameColor' | 'page/innerBorderColor' | 'page/outerBorderColor' | 'colorMaskingSettings/maskColor' | 'grid/color' | (string & {});
@@ -9584,6 +9614,11 @@ export declare interface Settings {
9584
9614
  'placeholderControls/showOverlay': boolean;
9585
9615
  /** Whether animations should be enabled or not. */
9586
9616
  'blockAnimations/enabled': boolean;
9617
+ /**
9618
+ * When enabled, every block stays visible regardless of the current playback time, instead of being
9619
+ * culled outside its time offset/duration. No effect on export.
9620
+ */
9621
+ 'playback/showAllBlocks': boolean;
9587
9622
  /** Whether the background grid is shown on pages. */
9588
9623
  'grid/enabled': boolean;
9589
9624
  /** Whether elements should snap to grid lines when dragged. */