roosterjs 8.43.0 → 8.44.0
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/dist/rooster-amd-min.js +1 -1
- package/dist/rooster-amd-min.js.map +1 -1
- package/dist/rooster-amd.d.ts +67 -31
- package/dist/rooster-amd.js +576 -157
- package/dist/rooster-amd.js.map +1 -1
- package/dist/rooster-min.js +1 -1
- package/dist/rooster-min.js.map +1 -1
- package/dist/rooster.d.ts +67 -31
- package/dist/rooster.js +576 -157
- package/dist/rooster.js.map +1 -1
- package/package.json +7 -7
- package/tsconfig.child.tsbuildinfo +1 -1
package/dist/rooster-amd.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for roosterjs (Version 8.
|
|
1
|
+
// Type definitions for roosterjs (Version 8.44.0)
|
|
2
2
|
// Generated by dts tool from roosterjs
|
|
3
3
|
// Project: https://github.com/Microsoft/roosterjs
|
|
4
4
|
|
|
@@ -188,17 +188,29 @@ export class PositionContentSearcher implements IPositionContentSearcher {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
* Adds delimiters to the element provided.
|
|
192
|
-
* @param
|
|
191
|
+
* Adds delimiters to the element provided. If the delimiters already exists, will not be added
|
|
192
|
+
* @param node the node to add the delimiters
|
|
193
193
|
*/
|
|
194
|
-
export function addDelimiters(
|
|
194
|
+
export function addDelimiters(node: Element): Element[];
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Adds delimiter after the element provided.
|
|
198
|
+
* @param element element to use
|
|
199
|
+
*/
|
|
200
|
+
export function addDelimiterAfter(element: Element): Element;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Adds delimiter before the element provided.
|
|
204
|
+
* @param element element to use
|
|
205
|
+
*/
|
|
206
|
+
export function addDelimiterBefore(element: Element): Element;
|
|
195
207
|
|
|
196
208
|
/**
|
|
197
209
|
* Retrieves Delimiter information from a provided element.
|
|
198
210
|
* @param element element to try to retrieve a delimiter
|
|
199
211
|
* @returns delimiter info if it is a Delimiter, else null
|
|
200
212
|
*/
|
|
201
|
-
export function getDelimiterFromElement(element:
|
|
213
|
+
export function getDelimiterFromElement(element: Node | null | undefined): Element | null;
|
|
202
214
|
|
|
203
215
|
/**
|
|
204
216
|
* Get the inline element at a node
|
|
@@ -3664,23 +3676,11 @@ export const enum ExperimentalFeatures {
|
|
|
3664
3676
|
* Align table elements to left, center and right using setAlignment API
|
|
3665
3677
|
*/
|
|
3666
3678
|
TableAlignment = "TableAlignment",
|
|
3667
|
-
/**
|
|
3668
|
-
* Provide additional Tab Key Features. Requires Text Features Content Editable Features
|
|
3669
|
-
*/
|
|
3670
|
-
TabKeyTextFeatures = "TabKeyTextFeatures",
|
|
3671
3679
|
/**
|
|
3672
3680
|
* @deprecated this feature is always enabled
|
|
3673
3681
|
* Provide a circular resize handles that adaptive the number od handles to the size of the image
|
|
3674
3682
|
*/
|
|
3675
3683
|
AdaptiveHandlesResizer = "AdaptiveHandlesResizer",
|
|
3676
|
-
/**
|
|
3677
|
-
* Align list elements elements to left, center and right using setAlignment API
|
|
3678
|
-
*/
|
|
3679
|
-
ListItemAlignment = "ListItemAlignment",
|
|
3680
|
-
/**
|
|
3681
|
-
* Trigger formatting by a especial characters. Ex: (A), 1. i).
|
|
3682
|
-
*/
|
|
3683
|
-
AutoFormatList = "AutoFormatList",
|
|
3684
3684
|
/**
|
|
3685
3685
|
* @deprecated this feature is always disabled
|
|
3686
3686
|
* Automatically transform -- into hyphen, if typed between two words.
|
|
@@ -3704,6 +3704,18 @@ export const enum ExperimentalFeatures {
|
|
|
3704
3704
|
* When a html image is selected, the selected image data will be stored by editor core.
|
|
3705
3705
|
*/
|
|
3706
3706
|
ImageSelection = "ImageSelection",
|
|
3707
|
+
/**
|
|
3708
|
+
* Provide additional Tab Key Features. Requires Text Features Content Editable Features
|
|
3709
|
+
*/
|
|
3710
|
+
TabKeyTextFeatures = "TabKeyTextFeatures",
|
|
3711
|
+
/**
|
|
3712
|
+
* Align list elements elements to left, center and right using setAlignment API
|
|
3713
|
+
*/
|
|
3714
|
+
ListItemAlignment = "ListItemAlignment",
|
|
3715
|
+
/**
|
|
3716
|
+
* Trigger formatting by a especial characters. Ex: (A), 1. i).
|
|
3717
|
+
*/
|
|
3718
|
+
AutoFormatList = "AutoFormatList",
|
|
3707
3719
|
/**
|
|
3708
3720
|
* With this feature enabled, when writing back a list item we will re-use all
|
|
3709
3721
|
* ancestor list elements, even if they don't match the types currently in the
|
|
@@ -3722,6 +3734,10 @@ export const enum ExperimentalFeatures {
|
|
|
3722
3734
|
* if you need them work for dark mode
|
|
3723
3735
|
*/
|
|
3724
3736
|
VariableBasedDarkColor = "VariableBasedDarkColor",
|
|
3737
|
+
/**
|
|
3738
|
+
* Reuse existing DOM structure if possible when convert Content Model back to DOM tree
|
|
3739
|
+
*/
|
|
3740
|
+
ReusableContentModel = "ReusableContentModel",
|
|
3725
3741
|
/**
|
|
3726
3742
|
* Delete table with Backspace key with the whole was selected with table selector
|
|
3727
3743
|
*/
|
|
@@ -5329,6 +5345,10 @@ export interface ElementBasedFormatState {
|
|
|
5329
5345
|
* Whether the text is in block quote
|
|
5330
5346
|
*/
|
|
5331
5347
|
isBlockQuote?: boolean;
|
|
5348
|
+
/**
|
|
5349
|
+
* Whether the text is in Code element
|
|
5350
|
+
*/
|
|
5351
|
+
isCodeInline?: boolean;
|
|
5332
5352
|
/**
|
|
5333
5353
|
* Whether the text is in Code block
|
|
5334
5354
|
*/
|
|
@@ -6687,8 +6707,10 @@ export interface DarkColorHandler {
|
|
|
6687
6707
|
* Parse an existing color value, if it is in variable-based color format, extract color key,
|
|
6688
6708
|
* light color and query related dark color if any
|
|
6689
6709
|
* @param color The color string to parse
|
|
6710
|
+
* @param isInDarkMode Whether current content is in dark mode. When set to true, if the color value is not in dark var format,
|
|
6711
|
+
* we will treat is as a dark mode color and try to find a matched dark mode color.
|
|
6690
6712
|
*/
|
|
6691
|
-
parseColorValue(color: string | null | undefined): ColorKeyAndValue;
|
|
6713
|
+
parseColorValue(color: string | null | undefined, isInDarkMode?: boolean): ColorKeyAndValue;
|
|
6692
6714
|
/**
|
|
6693
6715
|
* Get a copy of known colors
|
|
6694
6716
|
*/
|
|
@@ -7096,6 +7118,7 @@ export interface CoreApiMap {
|
|
|
7096
7118
|
* @param direction To specify the transform direction, light to dark, or dark to light
|
|
7097
7119
|
* @param forceTransform By default this function will only work when editor core is in dark mode.
|
|
7098
7120
|
* Pass true to this value to force do color transformation even editor core is in light mode
|
|
7121
|
+
* @param fromDarkModel Whether the given content is already in dark mode
|
|
7099
7122
|
*/
|
|
7100
7123
|
transformColor: TransformColor;
|
|
7101
7124
|
/**
|
|
@@ -7246,8 +7269,9 @@ export type SwitchShadowEdit = (core: EditorCore, isOn: boolean) => void;
|
|
|
7246
7269
|
* @param direction To specify the transform direction, light to dark, or dark to light
|
|
7247
7270
|
* @param forceTransform By default this function will only work when editor core is in dark mode.
|
|
7248
7271
|
* Pass true to this value to force do color transformation even editor core is in light mode
|
|
7272
|
+
* @param fromDarkModel Whether the given content is already in dark mode
|
|
7249
7273
|
*/
|
|
7250
|
-
export type TransformColor = (core: EditorCore, rootNode: Node | null, includeSelf: boolean, callback: (() => void) | null, direction: ColorTransformDirection | CompatibleColorTransformDirection, forceTransform?: boolean) => void;
|
|
7274
|
+
export type TransformColor = (core: EditorCore, rootNode: Node | null, includeSelf: boolean, callback: (() => void) | null, direction: ColorTransformDirection | CompatibleColorTransformDirection, forceTransform?: boolean, fromDarkMode?: boolean) => void;
|
|
7251
7275
|
|
|
7252
7276
|
/**
|
|
7253
7277
|
* Trigger a plugin event
|
|
@@ -7451,6 +7475,14 @@ export interface EntityFeatureSettings {
|
|
|
7451
7475
|
* press DELETE right after an entity
|
|
7452
7476
|
*/
|
|
7453
7477
|
deleteBeforeEntity: boolean;
|
|
7478
|
+
/**
|
|
7479
|
+
* Content edit feature to move the cursor from Delimiters around Entities when using Right or Left Arrow Keys
|
|
7480
|
+
*/
|
|
7481
|
+
moveBetweenDelimitersFeature: boolean;
|
|
7482
|
+
/**
|
|
7483
|
+
* Content edit Feature to trigger a Delete Entity Operation when one of the Delimiter is about to be removed with DELETE or Backspace
|
|
7484
|
+
*/
|
|
7485
|
+
removeEntityBetweenDelimiters: boolean;
|
|
7454
7486
|
}
|
|
7455
7487
|
|
|
7456
7488
|
/**
|
|
@@ -8228,23 +8260,11 @@ export enum CompatibleExperimentalFeatures {
|
|
|
8228
8260
|
* Align table elements to left, center and right using setAlignment API
|
|
8229
8261
|
*/
|
|
8230
8262
|
TableAlignment = "TableAlignment",
|
|
8231
|
-
/**
|
|
8232
|
-
* Provide additional Tab Key Features. Requires Text Features Content Editable Features
|
|
8233
|
-
*/
|
|
8234
|
-
TabKeyTextFeatures = "TabKeyTextFeatures",
|
|
8235
8263
|
/**
|
|
8236
8264
|
* @deprecated this feature is always enabled
|
|
8237
8265
|
* Provide a circular resize handles that adaptive the number od handles to the size of the image
|
|
8238
8266
|
*/
|
|
8239
8267
|
AdaptiveHandlesResizer = "AdaptiveHandlesResizer",
|
|
8240
|
-
/**
|
|
8241
|
-
* Align list elements elements to left, center and right using setAlignment API
|
|
8242
|
-
*/
|
|
8243
|
-
ListItemAlignment = "ListItemAlignment",
|
|
8244
|
-
/**
|
|
8245
|
-
* Trigger formatting by a especial characters. Ex: (A), 1. i).
|
|
8246
|
-
*/
|
|
8247
|
-
AutoFormatList = "AutoFormatList",
|
|
8248
8268
|
/**
|
|
8249
8269
|
* @deprecated this feature is always disabled
|
|
8250
8270
|
* Automatically transform -- into hyphen, if typed between two words.
|
|
@@ -8268,6 +8288,18 @@ export enum CompatibleExperimentalFeatures {
|
|
|
8268
8288
|
* When a html image is selected, the selected image data will be stored by editor core.
|
|
8269
8289
|
*/
|
|
8270
8290
|
ImageSelection = "ImageSelection",
|
|
8291
|
+
/**
|
|
8292
|
+
* Provide additional Tab Key Features. Requires Text Features Content Editable Features
|
|
8293
|
+
*/
|
|
8294
|
+
TabKeyTextFeatures = "TabKeyTextFeatures",
|
|
8295
|
+
/**
|
|
8296
|
+
* Align list elements elements to left, center and right using setAlignment API
|
|
8297
|
+
*/
|
|
8298
|
+
ListItemAlignment = "ListItemAlignment",
|
|
8299
|
+
/**
|
|
8300
|
+
* Trigger formatting by a especial characters. Ex: (A), 1. i).
|
|
8301
|
+
*/
|
|
8302
|
+
AutoFormatList = "AutoFormatList",
|
|
8271
8303
|
/**
|
|
8272
8304
|
* With this feature enabled, when writing back a list item we will re-use all
|
|
8273
8305
|
* ancestor list elements, even if they don't match the types currently in the
|
|
@@ -8286,6 +8318,10 @@ export enum CompatibleExperimentalFeatures {
|
|
|
8286
8318
|
* if you need them work for dark mode
|
|
8287
8319
|
*/
|
|
8288
8320
|
VariableBasedDarkColor = "VariableBasedDarkColor",
|
|
8321
|
+
/**
|
|
8322
|
+
* Reuse existing DOM structure if possible when convert Content Model back to DOM tree
|
|
8323
|
+
*/
|
|
8324
|
+
ReusableContentModel = "ReusableContentModel",
|
|
8289
8325
|
/**
|
|
8290
8326
|
* Delete table with Backspace key with the whole was selected with table selector
|
|
8291
8327
|
*/
|