roosterjs 8.29.3 → 8.30.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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for roosterjs (Version 8.29.3)
1
+ // Type definitions for roosterjs (Version 8.30.0)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -1196,6 +1196,13 @@ class VListChain {
1196
1196
  */
1197
1197
  function setListItemStyle(element: HTMLLIElement, styles: string[]): void;
1198
1198
 
1199
+ /**
1200
+ * Get the format info of a table
1201
+ * If the table does not have a info saved, it will be retrieved from the css styles
1202
+ * @param table The table that has the info
1203
+ */
1204
+ function getTableFormatInfo(table: HTMLTableElement): Required<TableFormat> | null;
1205
+
1199
1206
  /**
1200
1207
  * Get regions impacted by the given range under the root node
1201
1208
  * @param root Root node to get regions from
@@ -3452,15 +3459,15 @@ const enum ExperimentalFeatures {
3452
3459
  */
3453
3460
  MergePastedLine = "MergePastedLine",
3454
3461
  /**
3455
- * Resize an image horizontally or vertically
3462
+ * @deprecated This feature is always enabled
3456
3463
  */
3457
3464
  SingleDirectionResize = "SingleDirectionResize",
3458
3465
  /**
3459
- * Try retrieve link preview information when paste
3466
+ * @deprecated This feature is always enabled
3460
3467
  */
3461
3468
  PasteWithLinkPreview = "PasteWithLinkPreview",
3462
3469
  /**
3463
- * Rotate an inline image (requires ImageEdit plugin)
3470
+ * @deprecated This feature is always enabled
3464
3471
  */
3465
3472
  ImageRotate = "ImageRotate",
3466
3473
  /**
@@ -3506,7 +3513,12 @@ const enum ExperimentalFeatures {
3506
3513
  * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format
3507
3514
  * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something
3508
3515
  */
3509
- PendingStyleBasedFormat = "PendingStyleBasedFormat"
3516
+ PendingStyleBasedFormat = "PendingStyleBasedFormat",
3517
+ /**
3518
+ * Normalize list to make sure it can be displayed correctly in other client
3519
+ * e.g. We will move list items with "display: block" into previous list item and change tag to be DIV
3520
+ */
3521
+ NormalizeList = "NormalizeList"
3510
3522
  }
3511
3523
 
3512
3524
  /**
@@ -5083,6 +5095,14 @@ interface ElementBasedFormatState {
5083
5095
  * Whether the cursor is in table
5084
5096
  */
5085
5097
  isInTable?: boolean;
5098
+ /**
5099
+ * Format of table, if there is table at cursor position
5100
+ */
5101
+ tableFormat?: TableFormat;
5102
+ /**
5103
+ * If there is a table, whether the table has header row
5104
+ */
5105
+ tableHasHeader?: boolean;
5086
5106
  }
5087
5107
 
5088
5108
  /**
@@ -5141,7 +5161,7 @@ interface ExtractClipboardEventOption extends ExtractClipboardItemsOption, Extra
5141
5161
  */
5142
5162
  interface ExtractClipboardItemsOption {
5143
5163
  /**
5144
- * Whether retrieving value of text/link-preview is allowed
5164
+ * @deprecated This feature is always enabled
5145
5165
  */
5146
5166
  allowLinkPreview?: boolean;
5147
5167
  /**
@@ -7397,6 +7417,18 @@ interface ImageEditOptions {
7397
7417
  * @default A predefined SVG icon
7398
7418
  */
7399
7419
  rotateIconHTML?: string;
7420
+ /**
7421
+ * Whether side resizing (single direction resizing) is disabled. @default false
7422
+ */
7423
+ disableSideResize?: boolean;
7424
+ /**
7425
+ * Whether image rotate is disabled. @default false
7426
+ */
7427
+ disableRotate?: boolean;
7428
+ /**
7429
+ * Whether image crop is disabled. @default false
7430
+ */
7431
+ disableCrop?: boolean;
7400
7432
  }
7401
7433
 
7402
7434
  /**
@@ -7707,15 +7739,15 @@ enum CompatibleExperimentalFeatures {
7707
7739
  */
7708
7740
  MergePastedLine = "MergePastedLine",
7709
7741
  /**
7710
- * Resize an image horizontally or vertically
7742
+ * @deprecated This feature is always enabled
7711
7743
  */
7712
7744
  SingleDirectionResize = "SingleDirectionResize",
7713
7745
  /**
7714
- * Try retrieve link preview information when paste
7746
+ * @deprecated This feature is always enabled
7715
7747
  */
7716
7748
  PasteWithLinkPreview = "PasteWithLinkPreview",
7717
7749
  /**
7718
- * Rotate an inline image (requires ImageEdit plugin)
7750
+ * @deprecated This feature is always enabled
7719
7751
  */
7720
7752
  ImageRotate = "ImageRotate",
7721
7753
  /**
@@ -7761,7 +7793,12 @@ enum CompatibleExperimentalFeatures {
7761
7793
  * With this feature enabled, we don't need to insert temp ZeroWidthSpace character to hold pending format
7762
7794
  * when selection is collapsed. Instead, we will hold the pending format in memory and only apply it when type something
7763
7795
  */
7764
- PendingStyleBasedFormat = "PendingStyleBasedFormat"
7796
+ PendingStyleBasedFormat = "PendingStyleBasedFormat",
7797
+ /**
7798
+ * Normalize list to make sure it can be displayed correctly in other client
7799
+ * e.g. We will move list items with "display: block" into previous list item and change tag to be DIV
7800
+ */
7801
+ NormalizeList = "NormalizeList"
7765
7802
  }
7766
7803
 
7767
7804
  /**
@@ -9368,6 +9405,12 @@ class ImageEdit implements EditorPlugin {
9368
9405
  * @param event PluginEvent object
9369
9406
  */
9370
9407
  onPluginEvent(e: PluginEvent): void;
9408
+ /**
9409
+ * Check if the given image edit operation is allowed by this pluign
9410
+ * @param operation The image edit operation to check
9411
+ * @returns True means it is allowed, otherwise false
9412
+ */
9413
+ isOperationAllowed(operation: ImageEditOperation): boolean;
9371
9414
  /**
9372
9415
  * Set current image for edit. If there is already image in editing, it will quit editing mode and any pending editing
9373
9416
  * operation will be submitted