@cesdk/node 1.76.0-nightly.20260512 → 1.76.0-nightly.20260514
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.20260512-T45ABY6Q.wasm → cesdk-v1.76.0-nightly.20260514-UG44JZFW.wasm} +0 -0
- package/index.d.ts +61 -0
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.76.0-nightly.20260512-MLEZSZ4D.data → cesdk-v1.76.0-nightly.20260514-MLEZSZ4D.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -4490,6 +4490,38 @@ export declare class BlockAPI {
|
|
|
4490
4490
|
* @param to - The end index of the UTF-16 range. Defaults to the end of the current selection or text.
|
|
4491
4491
|
*/
|
|
4492
4492
|
setTextDecoration(id: DesignBlockId, config: TextDecorationConfig, from?: number, to?: number): void;
|
|
4493
|
+
/**
|
|
4494
|
+
* Sets kerning for a grapheme range.
|
|
4495
|
+
*
|
|
4496
|
+
* Applies an additional offset in em units on top of the font's built-in kern.
|
|
4497
|
+
* `1.0` equals the run's font size, so the offset scales proportionally with text size.
|
|
4498
|
+
*
|
|
4499
|
+
* ```javascript
|
|
4500
|
+
* engine.block.setTextKerning(text, 0.1); // add 10% of font size as extra spacing
|
|
4501
|
+
* engine.block.setTextKerning(text, -0.05, 0, 5); // tighten first 5 graphemes
|
|
4502
|
+
* engine.block.setTextKerning(text, 0); // reset to no extra offset
|
|
4503
|
+
* ```
|
|
4504
|
+
*
|
|
4505
|
+
* @category Block Text
|
|
4506
|
+
* @param id - The text block to modify.
|
|
4507
|
+
* @param kerning - Additional kerning in em units (1.0 = one full em). Use 0 for no extra offset.
|
|
4508
|
+
* @param from - The start index of the UTF-16 range. Defaults to the start of the current selection or text.
|
|
4509
|
+
* @param to - The end index of the UTF-16 range. Defaults to the end of the current selection or text.
|
|
4510
|
+
*/
|
|
4511
|
+
setTextKerning(id: DesignBlockId, kerning: number, from?: number, to?: number): void;
|
|
4512
|
+
/**
|
|
4513
|
+
* Returns the unique kerning values across the grapheme range.
|
|
4514
|
+
*
|
|
4515
|
+
* ```javascript
|
|
4516
|
+
* const kernings = engine.block.getTextKernings(text); // e.g. [0] or [0.1, 0]
|
|
4517
|
+
* ```
|
|
4518
|
+
*
|
|
4519
|
+
* @category Block Text
|
|
4520
|
+
* @param id - The text block to query.
|
|
4521
|
+
* @param from - The start index of the UTF-16 range. Defaults to the start of the current selection or text.
|
|
4522
|
+
* @param to - The end index of the UTF-16 range. Defaults to the end of the current selection or text.
|
|
4523
|
+
*/
|
|
4524
|
+
getTextKernings(id: DesignBlockId, from?: number, to?: number): number[];
|
|
4493
4525
|
/**
|
|
4494
4526
|
* Toggles the underline decoration for a text range.
|
|
4495
4527
|
*
|
|
@@ -4870,6 +4902,18 @@ export declare class BlockAPI {
|
|
|
4870
4902
|
* @returns The text content of the line.
|
|
4871
4903
|
*/
|
|
4872
4904
|
getTextVisibleLineContent(id: DesignBlockId, lineIndex: number): string;
|
|
4905
|
+
/**
|
|
4906
|
+
* Returns the tight ink-paint bounding box for each grapheme in the range.
|
|
4907
|
+
* One entry per grapheme in [from, to). Non-printable graphemes get a zero-rect.
|
|
4908
|
+
* Coordinates are in global scene space.
|
|
4909
|
+
*
|
|
4910
|
+
* @category Block Text
|
|
4911
|
+
* @param id - The text block to query.
|
|
4912
|
+
* @param from - Start grapheme index (-1 = start of cursor selection or 0).
|
|
4913
|
+
* @param to - End grapheme index (-1 = end of cursor selection or text length).
|
|
4914
|
+
* @returns Array of CharacterInkBox, one per grapheme in range, in text order.
|
|
4915
|
+
*/
|
|
4916
|
+
getTextCharacterInkBoxes(id: DesignBlockId, from?: number, to?: number): CharacterInkBox[];
|
|
4873
4917
|
/**
|
|
4874
4918
|
* Gets the effective horizontal alignment of a text block.
|
|
4875
4919
|
* If the alignment is set to Auto, this returns the resolved alignment (Left or Right)
|
|
@@ -6056,6 +6100,23 @@ export declare type CaptionVerticalAlignment = (typeof CaptionVerticalAlignmentV
|
|
|
6056
6100
|
/** @public */
|
|
6057
6101
|
export declare const CaptionVerticalAlignmentValues: readonly ["Top", "Bottom", "Center"];
|
|
6058
6102
|
|
|
6103
|
+
/**
|
|
6104
|
+
* Tight ink-paint bounding box of a single grapheme, in global scene coordinates.
|
|
6105
|
+
* @public
|
|
6106
|
+
*/
|
|
6107
|
+
export declare interface CharacterInkBox {
|
|
6108
|
+
/** Global X of the tight ink rect (left edge, Y-down scene space). */
|
|
6109
|
+
x: number;
|
|
6110
|
+
/** Global Y of the tight ink rect (top edge, Y-down scene space). */
|
|
6111
|
+
y: number;
|
|
6112
|
+
/** Width of the tight ink rect. */
|
|
6113
|
+
width: number;
|
|
6114
|
+
/** Height of the tight ink rect. */
|
|
6115
|
+
height: number;
|
|
6116
|
+
/** Global Y of the glyph baseline (needed for underline/cursor overlays). */
|
|
6117
|
+
baselineY: number;
|
|
6118
|
+
}
|
|
6119
|
+
|
|
6059
6120
|
/**
|
|
6060
6121
|
* Represents a color in the CMYK color space.
|
|
6061
6122
|
*
|