@cesdk/engine 1.76.0-nightly.20260522 → 1.76.0-rc.1
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.76.0-nightly.20260522-X3TFTHKG.wasm → cesdk-v1.76.0-rc.1-NCGHNMAN.wasm} +0 -0
- package/assets/core/{worker-host-v1.76.0-nightly.20260522.js → worker-host-v1.76.0-rc.1.js} +1 -1
- package/index.d.ts +88 -6
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.76.0-nightly.20260522-MLEZSZ4D.data → cesdk-v1.76.0-rc.1-MLEZSZ4D.data} +0 -0
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
|
*
|
|
@@ -6655,7 +6674,7 @@ export declare function _createReactiveProperty<T>(initialValue: T, options?: _R
|
|
|
6655
6674
|
*/
|
|
6656
6675
|
export declare type CreateSceneOptions = {
|
|
6657
6676
|
/** The page options */
|
|
6658
|
-
page
|
|
6677
|
+
page?: {
|
|
6659
6678
|
/** The size of the page */
|
|
6660
6679
|
size: number | {
|
|
6661
6680
|
width: number;
|
|
@@ -6664,6 +6683,15 @@ export declare type CreateSceneOptions = {
|
|
|
6664
6683
|
/** The background color of the page */
|
|
6665
6684
|
color?: Color;
|
|
6666
6685
|
};
|
|
6686
|
+
/**
|
|
6687
|
+
* The design unit of the new scene. Defaults to `Pixel`.
|
|
6688
|
+
*/
|
|
6689
|
+
designUnit?: SceneDesignUnit;
|
|
6690
|
+
/**
|
|
6691
|
+
* The unit in which font sizes for `setTextFontSize` and `getTextFontSizes` are interpreted.
|
|
6692
|
+
* If omitted, it is paired with `designUnit`: `Pixel` scenes get `Pixel`, all other scenes get `Point`.
|
|
6693
|
+
*/
|
|
6694
|
+
fontSizeUnit?: SceneFontSizeUnit;
|
|
6667
6695
|
};
|
|
6668
6696
|
|
|
6669
6697
|
/**
|
|
@@ -7495,6 +7523,17 @@ export declare class EditorAPI {
|
|
|
7495
7523
|
* @returns True if a redo step is available.
|
|
7496
7524
|
*/
|
|
7497
7525
|
canRedo(): boolean;
|
|
7526
|
+
/**
|
|
7527
|
+
* Subscribe to undo/redo history changes.
|
|
7528
|
+
*
|
|
7529
|
+
* @deprecated Use {@link onHistoryUpdatedWithKind} instead, which additionally reports a {@link HistoryUpdate}
|
|
7530
|
+
* describing the kind of update.
|
|
7531
|
+
*
|
|
7532
|
+
* @category Event Subscriptions
|
|
7533
|
+
* @param callback - Function called when the undo/redo history changes.
|
|
7534
|
+
* @returns A method to unsubscribe from the event.
|
|
7535
|
+
*/
|
|
7536
|
+
onHistoryUpdated: (callback: () => void) => (() => void);
|
|
7498
7537
|
/**
|
|
7499
7538
|
* Subscribe to undo/redo history changes.
|
|
7500
7539
|
*
|
|
@@ -7503,7 +7542,7 @@ export declare class EditorAPI {
|
|
|
7503
7542
|
* via `setActiveHistory`.
|
|
7504
7543
|
*
|
|
7505
7544
|
* ```javascript
|
|
7506
|
-
* const unsubscribe = engine.editor.
|
|
7545
|
+
* const unsubscribe = engine.editor.onHistoryUpdatedWithKind((kind) => {
|
|
7507
7546
|
* if (kind === 'Activated') {
|
|
7508
7547
|
* // The active history was switched; no scene change happened on this event.
|
|
7509
7548
|
* return;
|
|
@@ -7518,7 +7557,7 @@ export declare class EditorAPI {
|
|
|
7518
7557
|
* @param callback - Function called when the undo/redo history changes. The argument describes the kind of update.
|
|
7519
7558
|
* @returns A method to unsubscribe from the event.
|
|
7520
7559
|
*/
|
|
7521
|
-
|
|
7560
|
+
onHistoryUpdatedWithKind: (callback: (kind: HistoryUpdate) => void) => (() => void);
|
|
7522
7561
|
/**
|
|
7523
7562
|
* Subscribe to editor settings changes.
|
|
7524
7563
|
*
|
|
@@ -8656,7 +8695,7 @@ export declare type HexColorString = string;
|
|
|
8656
8695
|
export declare type HistoryId = number;
|
|
8657
8696
|
|
|
8658
8697
|
/**
|
|
8659
|
-
* Describes the kind of update that triggered an `
|
|
8698
|
+
* Describes the kind of update that triggered an `onHistoryUpdatedWithKind` callback.
|
|
8660
8699
|
*
|
|
8661
8700
|
* - `Updated`: The active history's snapshots changed: a new snapshot was added (e.g. after an edit), or undo/redo
|
|
8662
8701
|
* was applied. The scene state changed as a direct consequence.
|
|
@@ -9454,6 +9493,8 @@ export declare class SceneAPI {
|
|
|
9454
9493
|
*
|
|
9455
9494
|
* ```javascript
|
|
9456
9495
|
* const scene = engine.scene.create(layout);
|
|
9496
|
+
* // With a specific design unit and auto-paired font-size unit:
|
|
9497
|
+
* const pxScene = engine.scene.create('Free', { designUnit: 'Pixel' });
|
|
9457
9498
|
* ```
|
|
9458
9499
|
*
|
|
9459
9500
|
* @category Scene Creation
|
|
@@ -9462,6 +9503,9 @@ export declare class SceneAPI {
|
|
|
9462
9503
|
* - `page` - Page options. Properties:
|
|
9463
9504
|
* - `size` - The size of the page.
|
|
9464
9505
|
* - `color` - Optional background color of the page.
|
|
9506
|
+
* - `designUnit` - The design unit of the new scene. Defaults to `Pixel`.
|
|
9507
|
+
* - `fontSizeUnit` - The font-size unit. If omitted, paired with `designUnit`
|
|
9508
|
+
* (`Pixel` design unit → `Pixel` font unit, others → `Point`).
|
|
9465
9509
|
* @returns The scene's handle.
|
|
9466
9510
|
*/
|
|
9467
9511
|
create(sceneLayout?: SceneLayout, options?: CreateSceneOptions): DesignBlockId;
|
|
@@ -9605,6 +9649,30 @@ export declare class SceneAPI {
|
|
|
9605
9649
|
* @returns The current design unit.
|
|
9606
9650
|
*/
|
|
9607
9651
|
getDesignUnit(): SceneDesignUnit;
|
|
9652
|
+
/**
|
|
9653
|
+
* Sets the unit in which font sizes for `setTextFontSize` and `getTextFontSizes` are interpreted.
|
|
9654
|
+
* The engine continues to store font sizes in points internally; this only affects how values
|
|
9655
|
+
* are interpreted at the API boundary when callers don't specify a `unit` in `TextFontSizeOptions`.
|
|
9656
|
+
*
|
|
9657
|
+
* ```javascript
|
|
9658
|
+
* engine.scene.setFontSizeUnit('Pixel');
|
|
9659
|
+
* ```
|
|
9660
|
+
*
|
|
9661
|
+
* @category Scene Properties
|
|
9662
|
+
* @param fontSizeUnit - The new font-size unit of the scene.
|
|
9663
|
+
*/
|
|
9664
|
+
setFontSizeUnit(fontSizeUnit: SceneFontSizeUnit): void;
|
|
9665
|
+
/**
|
|
9666
|
+
* Returns the font-size unit of the current scene.
|
|
9667
|
+
*
|
|
9668
|
+
* ```javascript
|
|
9669
|
+
* engine.scene.getFontSizeUnit();
|
|
9670
|
+
* ```
|
|
9671
|
+
*
|
|
9672
|
+
* @category Scene Properties
|
|
9673
|
+
* @returns The current font-size unit.
|
|
9674
|
+
*/
|
|
9675
|
+
getFontSizeUnit(): SceneFontSizeUnit;
|
|
9608
9676
|
/**
|
|
9609
9677
|
* Get the layout of the current scene.
|
|
9610
9678
|
*
|
|
@@ -9950,6 +10018,12 @@ export { SceneDesignUnit }
|
|
|
9950
10018
|
/** @public */
|
|
9951
10019
|
export declare const SceneDesignUnitValues: readonly ["Pixel", "Millimeter", "Inch"];
|
|
9952
10020
|
|
|
10021
|
+
/** @public */
|
|
10022
|
+
export declare type SceneFontSizeUnit = (typeof SceneFontSizeUnitValues)[number];
|
|
10023
|
+
|
|
10024
|
+
/** @public */
|
|
10025
|
+
export declare const SceneFontSizeUnitValues: readonly ["Pixel", "Point"];
|
|
10026
|
+
|
|
9953
10027
|
/** @public */
|
|
9954
10028
|
export declare type SceneLayout = (typeof SceneLayoutValues)[number];
|
|
9955
10029
|
|
|
@@ -9980,7 +10054,7 @@ export declare const SceneModeValues: readonly ["Design", "Video"];
|
|
|
9980
10054
|
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';
|
|
9981
10055
|
|
|
9982
10056
|
/** @public */
|
|
9983
|
-
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 & {});
|
|
10057
|
+
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 & {});
|
|
9984
10058
|
|
|
9985
10059
|
/** @public */
|
|
9986
10060
|
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 & {});
|
|
@@ -10100,6 +10174,11 @@ export declare interface Settings {
|
|
|
10100
10174
|
'placeholderControls/showOverlay': boolean;
|
|
10101
10175
|
/** Whether animations should be enabled or not. */
|
|
10102
10176
|
'blockAnimations/enabled': boolean;
|
|
10177
|
+
/**
|
|
10178
|
+
* When enabled, every block stays visible regardless of the current playback time, instead of being
|
|
10179
|
+
* culled outside its time offset/duration. No effect on export.
|
|
10180
|
+
*/
|
|
10181
|
+
'playback/showAllBlocks': boolean;
|
|
10103
10182
|
/** Whether the background grid is shown on pages. */
|
|
10104
10183
|
'grid/enabled': boolean;
|
|
10105
10184
|
/** Whether elements should snap to grid lines when dragged. */
|
|
@@ -10606,7 +10685,10 @@ export declare type TextDecorationStyle = 'Solid' | 'Double' | 'Dotted' | 'Dashe
|
|
|
10606
10685
|
* @public
|
|
10607
10686
|
*/
|
|
10608
10687
|
export declare interface TextFontSizeOptions {
|
|
10609
|
-
/**
|
|
10688
|
+
/**
|
|
10689
|
+
* The unit of the font size. Defaults to the scene's `fontSizeUnit`
|
|
10690
|
+
* (configured via `engine.scene.setFontSizeUnit()`), which itself defaults to `'Point'`.
|
|
10691
|
+
*/
|
|
10610
10692
|
unit?: FontSizeUnit;
|
|
10611
10693
|
/** The start index of the UTF-16 range. Defaults to -1 (start of selection/text) */
|
|
10612
10694
|
from?: number;
|