@cesdk/engine 1.39.0 → 1.40.0-rc.1
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.39.0-DSJC7MDH.wasm → cesdk-v1.40.0-rc.1-DRICUCQJ.wasm} +0 -0
- package/assets/core/{worker-host-v1.39.0.js → worker-host-v1.40.0-rc.1.js} +1 -1
- package/index.d.ts +23 -3
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.39.0-XHZXX7DG.data → cesdk-v1.40.0-rc.1-XHZXX7DG.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -2323,19 +2323,39 @@ export declare class BlockAPI {
|
|
|
2323
2323
|
* Sets the given typeface for the text block.
|
|
2324
2324
|
* The current formatting, e.g., bold or italic, is retained as far as possible. Some formatting might change if the
|
|
2325
2325
|
* new typeface does not support it, e.g. thin might change to light, bold to normal, and/or italic to non-italic.
|
|
2326
|
+
* If the typeface is applied to the entire text block, its typeface property will be updated.
|
|
2327
|
+
* If a run does not support the new typeface, it will fall back to the default typeface from the typeface property.
|
|
2326
2328
|
* Required scope: 'text/character'
|
|
2327
2329
|
* @param id - The text block whose font should be changed.
|
|
2328
|
-
* @param fallbackFontFileUri - The URI of the fallback font file.
|
|
2329
2330
|
* @param typeface - The new typeface.
|
|
2331
|
+
* @param from - The start index of the UTF-16 range whose typeface should be changed.
|
|
2332
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2333
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2334
|
+
* @param to - The UTF-16 index after the last grapheme whose typeface should be changed.
|
|
2335
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2336
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2330
2337
|
*/
|
|
2331
|
-
setTypeface(id: DesignBlockId,
|
|
2338
|
+
setTypeface(id: DesignBlockId, typeface: Typeface, from?: number, to?: number): void;
|
|
2332
2339
|
/**
|
|
2333
2340
|
* Returns the current typeface of the given text block.
|
|
2334
2341
|
* @param id - The text block whose typeface should be queried.
|
|
2335
|
-
* @returns
|
|
2342
|
+
* @returns the typeface property of the text block. Does not return the typefaces of the text runs.
|
|
2336
2343
|
* @throws An error if the block does not have a valid typeface.
|
|
2337
2344
|
*/
|
|
2338
2345
|
getTypeface(id: DesignBlockId): Typeface;
|
|
2346
|
+
/**
|
|
2347
|
+
* Returns the current typefaces of the given text block.
|
|
2348
|
+
* @param id - The text block whose typefaces should be queried.
|
|
2349
|
+
* @param from - The start index of the grapheme range whose typefaces should be returned.
|
|
2350
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
2351
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
2352
|
+
* @param to - The UTF-16 index after the last grapheme whose typefaces should be returned.
|
|
2353
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
2354
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
2355
|
+
* @returns The typefaces of the text block.
|
|
2356
|
+
* @throws An error if the block does not have a valid typeface.
|
|
2357
|
+
*/
|
|
2358
|
+
getTypefaces(id: DesignBlockId, from?: number, to?: number): Typeface[];
|
|
2339
2359
|
/**
|
|
2340
2360
|
* Returns the UTF-16 indices of the selected range of the text block that is currently being edited.
|
|
2341
2361
|
* If both the start and end index of the returned range have the same value, then the text cursor is positioned at that index.
|