@cesdk/node 1.61.0-nightly.20250915 → 1.61.0-nightly.20250917

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
@@ -4010,28 +4010,75 @@ export declare class BlockAPI {
4010
4010
  * Sets the font size for a range of text.
4011
4011
  *
4012
4012
  * ```javascript
4013
+ * // With numeric fontSize (in points)
4013
4014
  * engine.block.setTextFontSize(text, 12, 0, 5);
4015
+ *
4016
+ * // With font size and options object
4017
+ * engine.block.setTextFontSize(text, 16, { unit: 'Pixel' });
4018
+ * engine.block.setTextFontSize(text, 24, { unit: 'Point', from: 0, to: 10 });
4014
4019
  * ```
4015
4020
  *
4016
4021
  * @category Block Text
4017
4022
  * @param id - The text block whose font size should be changed.
4018
- * @param fontSize - The new font size.
4023
+ * @param fontSize - The new font size value.
4024
+ * @param options - An options object with unit, from, and to properties.
4025
+ */
4026
+ setTextFontSize(id: DesignBlockId, fontSize: number, options?: TextFontSizeOptions): void;
4027
+ /**
4028
+ * Sets the font size for a range of text.
4029
+ *
4030
+ * @category Block Text
4031
+ * @param id - The text block whose font size should be changed.
4032
+ * @param fontSize - The new font size in points.
4019
4033
  * @param from - The start index of the UTF-16 range. Defaults to the start of the current selection or text.
4020
4034
  * @param to - The end index of the UTF-16 range. Defaults to the end of the current selection or text.
4035
+ * @deprecated Use the new signature with options object instead.
4036
+ * @example
4037
+ * ```typescript
4038
+ * // Before migration
4039
+ * engine.block.setTextFontSize(text, 18, 0, 5);
4040
+ * // After migration
4041
+ * engine.block.setTextFontSize(text, 18, { from: 0, to: 5 });
4042
+ * ```
4021
4043
  */
4022
4044
  setTextFontSize(id: DesignBlockId, fontSize: number, from?: number, to?: number): void;
4023
4045
  /**
4024
4046
  * Gets the unique font sizes within a range of text.
4025
4047
  *
4026
4048
  * ```javascript
4049
+ * // Get all font sizes
4027
4050
  * const fontSizes = engine.block.getTextFontSizes(text);
4051
+ *
4052
+ * // Get font sizes for a range
4053
+ * const fontSizes = engine.block.getTextFontSizes(text, 0, 10);
4054
+ *
4055
+ * // With options object
4056
+ * const sizesInPx = engine.block.getTextFontSizes(text, { unit: 'Pixel' });
4057
+ * const sizesInRange = engine.block.getTextFontSizes(text, { unit: 'Millimeter', from: 5, to: 15 });
4028
4058
  * ```
4029
4059
  *
4030
4060
  * @category Block Text
4031
4061
  * @param id - The text block whose font sizes should be returned.
4062
+ * @param options - An options object with unit, from, and to properties.
4063
+ * @returns The ordered unique list of font sizes.
4064
+ */
4065
+ getTextFontSizes(id: DesignBlockId, options?: TextFontSizeOptions): number[];
4066
+ /**
4067
+ * Gets the unique font sizes within a range of text.
4068
+ *
4069
+ * @category Block Text
4070
+ * @param id - The text block whose font sizes should be returned.
4032
4071
  * @param from - The start index of the UTF-16 range. Defaults to the start of the current selection or text.
4033
4072
  * @param to - The end index of the UTF-16 range. Defaults to the end of the current selection or text.
4034
- * @returns The ordered unique list of font sizes.
4073
+ * @returns The ordered unique list of font sizes in points.
4074
+ * @deprecated Use the new signature with options object instead.
4075
+ * @example
4076
+ * ```typescript
4077
+ * // Before migration
4078
+ * const fontSizes = engine.block.getTextFontSizes(text, 0, 10);
4079
+ * // After migration
4080
+ * const fontSizes = engine.block.getTextFontSizes(text, { from: 0, to: 10 });
4081
+ * ```
4035
4082
  */
4036
4083
  getTextFontSizes(id: DesignBlockId, from?: number, to?: number): number[];
4037
4084
  /**
@@ -6854,6 +6901,13 @@ export declare interface Font {
6854
6901
  style?: FontStyle;
6855
6902
  }
6856
6903
 
6904
+ /**
6905
+ * Extended design unit type that includes Point for font size operations.
6906
+ * Maintains consistency with DesignUnit's capitalized naming convention.
6907
+ * @public
6908
+ */
6909
+ export declare type FontSizeUnit = DesignUnit | 'Point';
6910
+
6857
6911
  /**
6858
6912
  * Represents the style of a font.
6859
6913
  *
@@ -8285,6 +8339,19 @@ declare type Subscription = number;
8285
8339
  */
8286
8340
  export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
8287
8341
 
8342
+ /**
8343
+ * Options for text font size operations with unit support.
8344
+ * @public
8345
+ */
8346
+ export declare interface TextFontSizeOptions {
8347
+ /** The unit of the font size. Defaults to 'Point' */
8348
+ unit?: FontSizeUnit;
8349
+ /** The start index of the UTF-16 range. Defaults to -1 (start of selection/text) */
8350
+ from?: number;
8351
+ /** The end index of the UTF-16 range. Defaults to -1 (end of selection/text) */
8352
+ to?: number;
8353
+ }
8354
+
8288
8355
  /**
8289
8356
  * Represents a transient resource.
8290
8357
  *