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