roosterjs 8.10.0 → 8.11.2

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for roosterjs (Version 8.10.0)
1
+ // Type definitions for roosterjs (Version 8.11.2)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -348,7 +348,11 @@ const enum Keys {
348
348
  RIGHT = 39,
349
349
  DOWN = 40,
350
350
  DELETE = 46,
351
+ /**
352
+ * @deprecated Just for backward compatibility
353
+ */
351
354
  EIGHT_ASTIRISK = 56,
355
+ EIGHT_ASTERISK = 56,
352
356
  B = 66,
353
357
  I = 73,
354
358
  U = 85,
@@ -357,7 +361,11 @@ const enum Keys {
357
361
  COMMA = 188,
358
362
  DASH_UNDERSCORE = 189,
359
363
  PERIOD = 190,
364
+ /**
365
+ * @deprecated Just for backward compatibility
366
+ */
360
367
  FORWARDSLASH = 191,
368
+ FORWARD_SLASH = 191,
361
369
  GRAVE_TILDE = 192,
362
370
  CONTENTCHANGED = 257,
363
371
  RANGE = 258,
@@ -1018,7 +1026,7 @@ const enum ClearFormatMode {
1018
1026
  */
1019
1027
  Block = 1,
1020
1028
  /**
1021
- * Detect Inline or Block format based on the current editor selectior.
1029
+ * Detect Inline or Block format based on the current editor selector.
1022
1030
  */
1023
1031
  AutoDetect = 2
1024
1032
  }
@@ -1028,7 +1036,7 @@ const enum ClearFormatMode {
1028
1036
  */
1029
1037
  const enum KnownCreateElementDataIndex {
1030
1038
  /**
1031
- * Set a none value to help createElement funciton ignore falsy value
1039
+ * Set a none value to help createElement function ignore falsy value
1032
1040
  */
1033
1041
  None = 0,
1034
1042
  /**
@@ -1056,7 +1064,7 @@ const enum KnownCreateElementDataIndex {
1056
1064
  */
1057
1065
  ImageEditWrapper = 6,
1058
1066
  /**
1059
- * Table resizers
1067
+ * Table resizer elements
1060
1068
  */
1061
1069
  TableHorizontalResizer = 7,
1062
1070
  TableVerticalResizer = 8,
@@ -2268,9 +2276,10 @@ interface SanitizeHtmlOptions extends HtmlSanitizerOptions {
2268
2276
  *
2269
2277
  * !!!Note: This file is generated from /tools/generateTargetWindow.js. Do NOT modify this file directly!!!
2270
2278
  */
2271
- interface TargetWindow {
2279
+ interface TargetWindowBase {
2272
2280
  Range: Range;
2273
2281
  Node: Node;
2282
+ ParentNode: ParentNode;
2274
2283
  Element: Element;
2275
2284
  SVGElement: SVGElement;
2276
2285
  SVGViewElement: SVGViewElement;
@@ -2283,6 +2292,7 @@ interface TargetWindow {
2283
2292
  SVGMetadataElement: SVGMetadataElement;
2284
2293
  SVGMaskElement: SVGMaskElement;
2285
2294
  SVGMarkerElement: SVGMarkerElement;
2295
+ SVGMPathElement: SVGMPathElement;
2286
2296
  SVGGraphicsElement: SVGGraphicsElement;
2287
2297
  SVGUseElement: SVGUseElement;
2288
2298
  SVGTextContentElement: SVGTextContentElement;
@@ -2292,12 +2302,12 @@ interface TargetWindow {
2292
2302
  SVGTextPathElement: SVGTextPathElement;
2293
2303
  SVGSwitchElement: SVGSwitchElement;
2294
2304
  SVGSVGElement: SVGSVGElement;
2295
- SVGPathElement: SVGPathElement;
2296
2305
  SVGImageElement: SVGImageElement;
2297
2306
  SVGGeometryElement: SVGGeometryElement;
2298
2307
  SVGRectElement: SVGRectElement;
2299
2308
  SVGPolylineElement: SVGPolylineElement;
2300
2309
  SVGPolygonElement: SVGPolygonElement;
2310
+ SVGPathElement: SVGPathElement;
2301
2311
  SVGLineElement: SVGLineElement;
2302
2312
  SVGEllipseElement: SVGEllipseElement;
2303
2313
  SVGCircleElement: SVGCircleElement;
@@ -2331,7 +2341,6 @@ interface TargetWindow {
2331
2341
  SVGFEColorMatrixElement: SVGFEColorMatrixElement;
2332
2342
  SVGFEBlendElement: SVGFEBlendElement;
2333
2343
  SVGDescElement: SVGDescElement;
2334
- SVGCursorElement: SVGCursorElement;
2335
2344
  SVGComponentTransferFunctionElement: SVGComponentTransferFunctionElement;
2336
2345
  SVGFEFuncRElement: SVGFEFuncRElement;
2337
2346
  SVGFEFuncGElement: SVGFEFuncGElement;
@@ -2339,9 +2348,11 @@ interface TargetWindow {
2339
2348
  SVGFEFuncAElement: SVGFEFuncAElement;
2340
2349
  SVGClipPathElement: SVGClipPathElement;
2341
2350
  SVGAnimationElement: SVGAnimationElement;
2351
+ SVGSetElement: SVGSetElement;
2342
2352
  SVGAnimateTransformElement: SVGAnimateTransformElement;
2343
2353
  SVGAnimateMotionElement: SVGAnimateMotionElement;
2344
2354
  SVGAnimateElement: SVGAnimateElement;
2355
+ MathMLElement: MathMLElement;
2345
2356
  HTMLElement: HTMLElement;
2346
2357
  HTMLUnknownElement: HTMLUnknownElement;
2347
2358
  HTMLUListElement: HTMLUListElement;
@@ -2411,11 +2422,9 @@ interface TargetWindow {
2411
2422
  HTMLCanvasElement: HTMLCanvasElement;
2412
2423
  HTMLButtonElement: HTMLButtonElement;
2413
2424
  HTMLBodyElement: HTMLBodyElement;
2414
- HTMLBaseFontElement: HTMLBaseFontElement;
2415
2425
  HTMLBaseElement: HTMLBaseElement;
2416
2426
  HTMLBRElement: HTMLBRElement;
2417
2427
  HTMLAreaElement: HTMLAreaElement;
2418
- HTMLAppletElement: HTMLAppletElement;
2419
2428
  HTMLAnchorElement: HTMLAnchorElement;
2420
2429
  DocumentType: DocumentType;
2421
2430
  DocumentFragment: DocumentFragment;
@@ -2432,6 +2441,24 @@ interface TargetWindow {
2432
2441
  Attr: Attr;
2433
2442
  }
2434
2443
 
2444
+ /**
2445
+ * Define DOM types of window, used by safeInstanceOf() to check if a given object is of the specified type of its own window
2446
+ */
2447
+ interface TargetWindow extends TargetWindowBase {
2448
+ /**
2449
+ * @deprecated Just for backward compatibility
2450
+ */
2451
+ SVGCursorElement: Element;
2452
+ /**
2453
+ * @deprecated Just for backward compatibility
2454
+ */
2455
+ HTMLBaseFontElement: Element;
2456
+ /**
2457
+ * @deprecated Just for backward compatibility
2458
+ */
2459
+ HTMLAppletElement: Element;
2460
+ }
2461
+
2435
2462
  /**
2436
2463
  * Interface of roosterjs editor object
2437
2464
  */
@@ -2805,7 +2832,7 @@ interface IEditor {
2805
2832
  */
2806
2833
  getStyleBasedFormatState(node?: Node): StyleBasedFormatState;
2807
2834
  /**
2808
- * Get the pendable format state from the current selection, incluing formats as underline, bold, italics
2835
+ * Get the pendable format state from the current selection, including formats as underline, bold, italics
2809
2836
  * @param forceGetStateFromDOM If set to true, will not consider the cached format and will get the format state directly from DOM tree
2810
2837
  * @return The pending format state of editor.
2811
2838
  */
@@ -3484,7 +3511,7 @@ interface EntityFeatureSettings {
3484
3511
  */
3485
3512
  interface ListFeatureSettings {
3486
3513
  /**
3487
- * When press space after an astirisk or number in an empty line, toggle bullet/numbering
3514
+ * When press space after an asterisk or number in an empty line, toggle bullet/numbering
3488
3515
  * @default true
3489
3516
  */
3490
3517
  autoBullet: boolean;
@@ -3836,7 +3863,7 @@ interface ImageEditOptions {
3836
3863
  }
3837
3864
 
3838
3865
  /**
3839
- * An interface represents the data for creating element used by createElemnet()
3866
+ * An interface represents the data for creating element used by createElement()
3840
3867
  */
3841
3868
  interface CreateElementData {
3842
3869
  /**
@@ -4700,7 +4727,7 @@ function wrap(nodes: Node | Node[], wrapper?: string): HTMLElement;
4700
4727
  function wrap(nodes: Node | Node[], wrapper?: HTMLElement): HTMLElement;
4701
4728
 
4702
4729
  /**
4703
- * Wrapp all the nodes with CreateElementData or an index of a known CreateElementData
4730
+ * Wraps all the nodes with CreateElementData or an index of a known CreateElementData
4704
4731
  * @param nodes The nodes to wrap
4705
4732
  * @param wrapper The CreateElementData or an index of a known CreateElementData
4706
4733
  */
@@ -6926,6 +6953,12 @@ class TableResize implements EditorPlugin {
6926
6953
  private frameAnimateResizeCells;
6927
6954
  private resizeTable;
6928
6955
  private resizeRows;
6956
+ /**
6957
+ *
6958
+ * @param newPos The position to where we want to move the vertical border
6959
+ * @returns if the move is allowed, or, if any of the cells on either side of the vertical border is smaller than
6960
+ * the minimum width, such move is not allowed
6961
+ */
6929
6962
  private canResizeColumns;
6930
6963
  private resizeColumns;
6931
6964
  private resizeCells;