@cesdk/node 1.75.0-nightly.20260428 → 1.75.0-nightly.20260429
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.75.0-nightly.20260428-FJUD6RI4.wasm → cesdk-v1.75.0-nightly.20260429-CMIYGC4M.wasm} +0 -0
- package/index.d.ts +132 -1
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.75.0-nightly.20260428-MLEZSZ4D.data → cesdk-v1.75.0-nightly.20260429-MLEZSZ4D.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1452,6 +1452,22 @@ export declare class BlockAPI {
|
|
|
1452
1452
|
* ```
|
|
1453
1453
|
*/
|
|
1454
1454
|
export(handle: DesignBlockId, mimeType?: ExportOptions['mimeType'], options?: Omit<ExportOptions, 'mimeType'>): Promise<Blob>;
|
|
1455
|
+
/**
|
|
1456
|
+
* Extracts the dominant colors from the rendered appearance of a block.
|
|
1457
|
+
*
|
|
1458
|
+
* Performs an internal update to resolve the final layout for the block. Will not
|
|
1459
|
+
* complete as long as assets are in a pending state; asset loading progresses during
|
|
1460
|
+
* engine updates. Crops, color adjustments, and effects applied to the block are
|
|
1461
|
+
* reflected in the returned palette. Fully or mostly transparent pixels are excluded
|
|
1462
|
+
* from the analysis.
|
|
1463
|
+
*
|
|
1464
|
+
* @category Block Analysis
|
|
1465
|
+
* @param handle - The design block element to analyze. Must be attached to a scene
|
|
1466
|
+
* and render visible content.
|
|
1467
|
+
* @param options - See `DominantColorsOptions`.
|
|
1468
|
+
* @returns A promise that resolves with the dominant colors sorted by weight, descending.
|
|
1469
|
+
*/
|
|
1470
|
+
getDominantColors(handle: DesignBlockId, options?: DominantColorsOptions): Promise<DominantColor[]>;
|
|
1455
1471
|
/**
|
|
1456
1472
|
* Exports a design block and a color mask to two separate Blobs.
|
|
1457
1473
|
*
|
|
@@ -2043,6 +2059,21 @@ export declare class BlockAPI {
|
|
|
2043
2059
|
* @returns A list of block ids.
|
|
2044
2060
|
*/
|
|
2045
2061
|
findAllPlaceholders(): DesignBlockId[];
|
|
2062
|
+
/**
|
|
2063
|
+
* Finds all blocks that are not attached to any scene.
|
|
2064
|
+
*
|
|
2065
|
+
* A block is considered unused when it has no path to a scene (no scene
|
|
2066
|
+
* reference and no ancestor that belongs to a scene) and is not itself a
|
|
2067
|
+
* scene. Generated blocks and render blocks (fills, effects, shapes, blurs)
|
|
2068
|
+
* are excluded, matching the behaviour of {@link BlockAPI.findAll}.
|
|
2069
|
+
*
|
|
2070
|
+
* This is useful for cleanup workflows and for filtering the URIs returned
|
|
2071
|
+
* by {@link EditorAPI.findAllMediaURIs} before relocating resources.
|
|
2072
|
+
*
|
|
2073
|
+
* @category Block Exploration
|
|
2074
|
+
* @returns A list of block ids that are not attached to any scene.
|
|
2075
|
+
*/
|
|
2076
|
+
findAllUnused(): DesignBlockId[];
|
|
2046
2077
|
/**
|
|
2047
2078
|
* Creates a new shape block of a given type.
|
|
2048
2079
|
*
|
|
@@ -3825,6 +3856,34 @@ export declare class BlockAPI {
|
|
|
3825
3856
|
* @returns True if the block's stroke is enabled.
|
|
3826
3857
|
*/
|
|
3827
3858
|
isStrokeEnabled(id: DesignBlockId): boolean;
|
|
3859
|
+
/**
|
|
3860
|
+
* Marks the stroke of a block as overprint for PDF export.
|
|
3861
|
+
*
|
|
3862
|
+
* The flag is only honored by the PDF writer when the stroke uses a spot color
|
|
3863
|
+
* (Separation/DeviceN). For process-color strokes it is a silent no-op. On-screen
|
|
3864
|
+
* rendering ignores the flag.
|
|
3865
|
+
*
|
|
3866
|
+
* ```javascript
|
|
3867
|
+
* engine.block.setStrokeOverprint(block, true);
|
|
3868
|
+
* ```
|
|
3869
|
+
*
|
|
3870
|
+
* @category Block Strokes
|
|
3871
|
+
* @param id - The block whose stroke overprint flag should be set.
|
|
3872
|
+
* @param overprint - If true, the stroke is marked as overprint in exported PDFs.
|
|
3873
|
+
*/
|
|
3874
|
+
setStrokeOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
3875
|
+
/**
|
|
3876
|
+
* Queries whether the stroke of a block is marked as overprint for PDF export.
|
|
3877
|
+
*
|
|
3878
|
+
* ```javascript
|
|
3879
|
+
* const overprint = engine.block.getStrokeOverprint(block);
|
|
3880
|
+
* ```
|
|
3881
|
+
*
|
|
3882
|
+
* @category Block Strokes
|
|
3883
|
+
* @param id - The block whose stroke overprint flag should be queried.
|
|
3884
|
+
* @returns The stroke overprint flag.
|
|
3885
|
+
*/
|
|
3886
|
+
getStrokeOverprint(id: DesignBlockId): boolean;
|
|
3828
3887
|
/**
|
|
3829
3888
|
* Sets the stroke color of a block using RGBA values.
|
|
3830
3889
|
*
|
|
@@ -4769,6 +4828,34 @@ export declare class BlockAPI {
|
|
|
4769
4828
|
* @param enabled - If true, the fill will be enabled.
|
|
4770
4829
|
*/
|
|
4771
4830
|
setFillEnabled(id: DesignBlockId, enabled: boolean): void;
|
|
4831
|
+
/**
|
|
4832
|
+
* Queries whether the fill of a block is marked as overprint for PDF export.
|
|
4833
|
+
*
|
|
4834
|
+
* ```javascript
|
|
4835
|
+
* const overprint = engine.block.getFillOverprint(block);
|
|
4836
|
+
* ```
|
|
4837
|
+
*
|
|
4838
|
+
* @category Block Fills
|
|
4839
|
+
* @param id - The block whose fill overprint flag should be queried.
|
|
4840
|
+
* @returns The fill overprint flag.
|
|
4841
|
+
*/
|
|
4842
|
+
getFillOverprint(id: DesignBlockId): boolean;
|
|
4843
|
+
/**
|
|
4844
|
+
* Marks the fill of a block as overprint for PDF export.
|
|
4845
|
+
*
|
|
4846
|
+
* The flag is only honored by the PDF writer when the fill uses a spot color
|
|
4847
|
+
* (Separation/DeviceN). For process-color fills it is a silent no-op. On-screen
|
|
4848
|
+
* rendering ignores the flag.
|
|
4849
|
+
*
|
|
4850
|
+
* ```javascript
|
|
4851
|
+
* engine.block.setFillOverprint(block, true);
|
|
4852
|
+
* ```
|
|
4853
|
+
*
|
|
4854
|
+
* @category Block Fills
|
|
4855
|
+
* @param id - The block whose fill overprint flag should be set.
|
|
4856
|
+
* @param overprint - If true, the fill is marked as overprint in exported PDFs.
|
|
4857
|
+
*/
|
|
4858
|
+
setFillOverprint(id: DesignBlockId, overprint: boolean): void;
|
|
4772
4859
|
/**
|
|
4773
4860
|
* Gets the fill block attached to a given block.
|
|
4774
4861
|
*
|
|
@@ -6259,6 +6346,50 @@ export declare type DesignBlockTypeLonghand = `//ly.img.ubq/${DesignBlockTypeSho
|
|
|
6259
6346
|
/** @public */
|
|
6260
6347
|
export declare type DesignBlockTypeShorthand = (typeof DESIGN_BLOCK_TYPES)[number];
|
|
6261
6348
|
|
|
6349
|
+
/**
|
|
6350
|
+
* A single color extracted from the rendered appearance of a block.
|
|
6351
|
+
*
|
|
6352
|
+
* @public
|
|
6353
|
+
*/
|
|
6354
|
+
export declare interface DominantColor {
|
|
6355
|
+
/** Red component in sRGB, normalized to the range [0, 1]. */
|
|
6356
|
+
r: number;
|
|
6357
|
+
/** Green component in sRGB, normalized to the range [0, 1]. */
|
|
6358
|
+
g: number;
|
|
6359
|
+
/** Blue component in sRGB, normalized to the range [0, 1]. */
|
|
6360
|
+
b: number;
|
|
6361
|
+
/**
|
|
6362
|
+
* Share of analyzed pixels represented by this color, in the range [0, 1].
|
|
6363
|
+
* Higher values indicate a more prominent color. The sum of weights returned
|
|
6364
|
+
* by a single `BlockAPI.getDominantColors` call is `1.0`.
|
|
6365
|
+
*/
|
|
6366
|
+
weight: number;
|
|
6367
|
+
}
|
|
6368
|
+
|
|
6369
|
+
/**
|
|
6370
|
+
* Options for `BlockAPI.getDominantColors`.
|
|
6371
|
+
*
|
|
6372
|
+
* @public
|
|
6373
|
+
*/
|
|
6374
|
+
export declare interface DominantColorsOptions {
|
|
6375
|
+
/**
|
|
6376
|
+
* Number of dominant colors to extract.
|
|
6377
|
+
* The returned palette may contain fewer entries for images with very little variation,
|
|
6378
|
+
* and is empty when `count` is `0`.
|
|
6379
|
+
*
|
|
6380
|
+
* @defaultValue 5
|
|
6381
|
+
*/
|
|
6382
|
+
count?: number;
|
|
6383
|
+
/**
|
|
6384
|
+
* If `true`, near-white pixels are excluded from the analysis.
|
|
6385
|
+
* Useful when analyzing images on white backgrounds to avoid the background
|
|
6386
|
+
* dominating the result.
|
|
6387
|
+
*
|
|
6388
|
+
* @defaultValue false
|
|
6389
|
+
*/
|
|
6390
|
+
ignoreWhite?: boolean;
|
|
6391
|
+
}
|
|
6392
|
+
|
|
6262
6393
|
/** @public */
|
|
6263
6394
|
export declare type DoubleClickSelectionMode = (typeof DoubleClickSelectionModeValues)[number];
|
|
6264
6395
|
|
|
@@ -8866,7 +8997,7 @@ export declare const SceneModeValues: readonly ["Design", "Video"];
|
|
|
8866
8997
|
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';
|
|
8867
8998
|
|
|
8868
8999
|
/** @public */
|
|
8869
|
-
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' | (string & {});
|
|
9000
|
+
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' | (string & {});
|
|
8870
9001
|
|
|
8871
9002
|
/** @public */
|
|
8872
9003
|
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 & {});
|