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