@cesdk/engine 1.61.0-nightly.20250914 → 1.61.0-nightly.20250916
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.61.0-nightly.20250914-5DDRHSPG.wasm → cesdk-v1.61.0-nightly.20250916-AT7VXXNL.wasm} +0 -0
- package/assets/core/{worker-host-v1.61.0-nightly.20250914.js → worker-host-v1.61.0-nightly.20250916.js} +1 -1
- package/index.d.ts +69 -2
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.61.0-nightly.20250914-44YCFRT6.data → cesdk-v1.61.0-nightly.20250916-44YCFRT6.data} +0 -0
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
|
/**
|
|
@@ -6994,6 +7041,13 @@ export declare interface Font {
|
|
|
6994
7041
|
style?: FontStyle;
|
|
6995
7042
|
}
|
|
6996
7043
|
|
|
7044
|
+
/**
|
|
7045
|
+
* Extended design unit type that includes Point for font size operations.
|
|
7046
|
+
* Maintains consistency with DesignUnit's capitalized naming convention.
|
|
7047
|
+
* @public
|
|
7048
|
+
*/
|
|
7049
|
+
export declare type FontSizeUnit = DesignUnit | 'Point';
|
|
7050
|
+
|
|
6997
7051
|
/**
|
|
6998
7052
|
* Represents the style of a font.
|
|
6999
7053
|
*
|
|
@@ -8572,6 +8626,19 @@ export declare function supportsWasm(): boolean;
|
|
|
8572
8626
|
*/
|
|
8573
8627
|
export declare type TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';
|
|
8574
8628
|
|
|
8629
|
+
/**
|
|
8630
|
+
* Options for text font size operations with unit support.
|
|
8631
|
+
* @public
|
|
8632
|
+
*/
|
|
8633
|
+
export declare interface TextFontSizeOptions {
|
|
8634
|
+
/** The unit of the font size. Defaults to 'Point' */
|
|
8635
|
+
unit?: FontSizeUnit;
|
|
8636
|
+
/** The start index of the UTF-16 range. Defaults to -1 (start of selection/text) */
|
|
8637
|
+
from?: number;
|
|
8638
|
+
/** The end index of the UTF-16 range. Defaults to -1 (end of selection/text) */
|
|
8639
|
+
to?: number;
|
|
8640
|
+
}
|
|
8641
|
+
|
|
8575
8642
|
/**
|
|
8576
8643
|
* Represents a transient resource.
|
|
8577
8644
|
*
|