@cesdk/node 1.76.0-nightly.20260522 → 1.77.0-nightly.20260523
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-FMEP3YXS.wasm → cesdk-v1.77.0-nightly.20260523-EK7WC72U.wasm} +0 -0
- package/index.d.ts +49 -2
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.76.0-nightly.20260522-MLEZSZ4D.data → cesdk-v1.77.0-nightly.20260523-MLEZSZ4D.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -6536,7 +6536,7 @@ export declare const ContentFillModeValues: readonly ["Crop", "Cover", "Contain"
|
|
|
6536
6536
|
*/
|
|
6537
6537
|
export declare type CreateSceneOptions = {
|
|
6538
6538
|
/** The page options */
|
|
6539
|
-
page
|
|
6539
|
+
page?: {
|
|
6540
6540
|
/** The size of the page */
|
|
6541
6541
|
size: number | {
|
|
6542
6542
|
width: number;
|
|
@@ -6545,6 +6545,15 @@ export declare type CreateSceneOptions = {
|
|
|
6545
6545
|
/** The background color of the page */
|
|
6546
6546
|
color?: Color;
|
|
6547
6547
|
};
|
|
6548
|
+
/**
|
|
6549
|
+
* The design unit of the new scene. Defaults to `Pixel`.
|
|
6550
|
+
*/
|
|
6551
|
+
designUnit?: SceneDesignUnit;
|
|
6552
|
+
/**
|
|
6553
|
+
* The unit in which font sizes for `setTextFontSize` and `getTextFontSizes` are interpreted.
|
|
6554
|
+
* If omitted, it is paired with `designUnit`: `Pixel` scenes get `Pixel`, all other scenes get `Point`.
|
|
6555
|
+
*/
|
|
6556
|
+
fontSizeUnit?: SceneFontSizeUnit;
|
|
6548
6557
|
};
|
|
6549
6558
|
|
|
6550
6559
|
/**
|
|
@@ -8894,6 +8903,8 @@ export declare class SceneAPI {
|
|
|
8894
8903
|
*
|
|
8895
8904
|
* ```javascript
|
|
8896
8905
|
* const scene = engine.scene.create(layout);
|
|
8906
|
+
* // With a specific design unit and auto-paired font-size unit:
|
|
8907
|
+
* const pxScene = engine.scene.create('Free', { designUnit: 'Pixel' });
|
|
8897
8908
|
* ```
|
|
8898
8909
|
*
|
|
8899
8910
|
* @category Scene Creation
|
|
@@ -8902,6 +8913,9 @@ export declare class SceneAPI {
|
|
|
8902
8913
|
* - `page` - Page options. Properties:
|
|
8903
8914
|
* - `size` - The size of the page.
|
|
8904
8915
|
* - `color` - Optional background color of the page.
|
|
8916
|
+
* - `designUnit` - The design unit of the new scene. Defaults to `Pixel`.
|
|
8917
|
+
* - `fontSizeUnit` - The font-size unit. If omitted, paired with `designUnit`
|
|
8918
|
+
* (`Pixel` design unit → `Pixel` font unit, others → `Point`).
|
|
8905
8919
|
* @returns The scene's handle.
|
|
8906
8920
|
*/
|
|
8907
8921
|
create(sceneLayout?: SceneLayout, options?: CreateSceneOptions): DesignBlockId;
|
|
@@ -9045,6 +9059,30 @@ export declare class SceneAPI {
|
|
|
9045
9059
|
* @returns The current design unit.
|
|
9046
9060
|
*/
|
|
9047
9061
|
getDesignUnit(): SceneDesignUnit;
|
|
9062
|
+
/**
|
|
9063
|
+
* Sets the unit in which font sizes for `setTextFontSize` and `getTextFontSizes` are interpreted.
|
|
9064
|
+
* The engine continues to store font sizes in points internally; this only affects how values
|
|
9065
|
+
* are interpreted at the API boundary when callers don't specify a `unit` in `TextFontSizeOptions`.
|
|
9066
|
+
*
|
|
9067
|
+
* ```javascript
|
|
9068
|
+
* engine.scene.setFontSizeUnit('Pixel');
|
|
9069
|
+
* ```
|
|
9070
|
+
*
|
|
9071
|
+
* @category Scene Properties
|
|
9072
|
+
* @param fontSizeUnit - The new font-size unit of the scene.
|
|
9073
|
+
*/
|
|
9074
|
+
setFontSizeUnit(fontSizeUnit: SceneFontSizeUnit): void;
|
|
9075
|
+
/**
|
|
9076
|
+
* Returns the font-size unit of the current scene.
|
|
9077
|
+
*
|
|
9078
|
+
* ```javascript
|
|
9079
|
+
* engine.scene.getFontSizeUnit();
|
|
9080
|
+
* ```
|
|
9081
|
+
*
|
|
9082
|
+
* @category Scene Properties
|
|
9083
|
+
* @returns The current font-size unit.
|
|
9084
|
+
*/
|
|
9085
|
+
getFontSizeUnit(): SceneFontSizeUnit;
|
|
9048
9086
|
/**
|
|
9049
9087
|
* Get the layout of the current scene.
|
|
9050
9088
|
*
|
|
@@ -9390,6 +9428,12 @@ export { SceneDesignUnit }
|
|
|
9390
9428
|
/** @public */
|
|
9391
9429
|
export declare const SceneDesignUnitValues: readonly ["Pixel", "Millimeter", "Inch"];
|
|
9392
9430
|
|
|
9431
|
+
/** @public */
|
|
9432
|
+
export declare type SceneFontSizeUnit = (typeof SceneFontSizeUnitValues)[number];
|
|
9433
|
+
|
|
9434
|
+
/** @public */
|
|
9435
|
+
export declare const SceneFontSizeUnitValues: readonly ["Pixel", "Point"];
|
|
9436
|
+
|
|
9393
9437
|
/** @public */
|
|
9394
9438
|
export declare type SceneLayout = (typeof SceneLayoutValues)[number];
|
|
9395
9439
|
|
|
@@ -10010,7 +10054,10 @@ export declare type TextDecorationStyle = 'Solid' | 'Double' | 'Dotted' | 'Dashe
|
|
|
10010
10054
|
* @public
|
|
10011
10055
|
*/
|
|
10012
10056
|
export declare interface TextFontSizeOptions {
|
|
10013
|
-
/**
|
|
10057
|
+
/**
|
|
10058
|
+
* The unit of the font size. Defaults to the scene's `fontSizeUnit`
|
|
10059
|
+
* (configured via `engine.scene.setFontSizeUnit()`), which itself defaults to `'Point'`.
|
|
10060
|
+
*/
|
|
10014
10061
|
unit?: FontSizeUnit;
|
|
10015
10062
|
/** The start index of the UTF-16 range. Defaults to -1 (start of selection/text) */
|
|
10016
10063
|
from?: number;
|