@cesdk/node 1.76.0-nightly.20260512 → 1.76.0-nightly.20260513

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
@@ -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
  *