roosterjs 9.41.0 → 9.42.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 9.41.0)
1
+ // Type definitions for roosterjs (Version 9.42.0)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -2892,6 +2892,11 @@ interface EditorContext {
2892
2892
  * When set to true, size of table will be recalculated when converting from DOM to Content Model.
2893
2893
  */
2894
2894
  recalculateTableSize?: boolean | 'all' | 'selected' | 'none';
2895
+ /**
2896
+ * Width of the editor's editable area in pixels, excluding padding.
2897
+ * This value is typically used for layout calculations such as constraining pasted image sizes.
2898
+ */
2899
+ editorViewWidth?: number;
2895
2900
  }
2896
2901
 
2897
2902
  /**
@@ -3676,27 +3681,12 @@ interface IEditor {
3676
3681
  * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures
3677
3682
  * when create editor
3678
3683
  */
3679
- type ExperimentalFeature = /**
3680
- * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,
3681
- * and use cached element when write back if it is not changed.
3682
- */
3683
- 'PersistCache'
3684
- /**
3685
- * @deprecated
3686
- * Workaround for the Legacy Image Edit
3687
- */
3688
- | 'LegacyImageSelection'
3684
+ type ExperimentalFeature = GraduatedExperimentalFeature
3689
3685
  /**
3690
3686
  * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
3691
3687
  * Use Content Model handle ENTER key
3692
3688
  */
3693
3689
  | 'HandleEnterKey'
3694
- /**
3695
- * @deprecated
3696
- * Prevent default browser behavior for copy/cut event,
3697
- * and set the clipboard data with custom implementation.
3698
- */
3699
- | 'CustomCopyCut'
3700
3690
  /**
3701
3691
  * For CJK keyboard input on mobile, if the user toggles bold/italic/underline on an empty div,
3702
3692
  * the pending format will be applied on the selection marker. When typing text, the selection moves to the text node and the
@@ -3714,6 +3704,26 @@ type ExperimentalFeature = /**
3714
3704
  */
3715
3705
  | 'CloneIndependentRoot';
3716
3706
 
3707
+ /**
3708
+ * Predefined experiment features (Graduated, only keep them for backward compatibility)
3709
+ */
3710
+ type GraduatedExperimentalFeature = /**
3711
+ * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,
3712
+ * and use cached element when write back if it is not changed.
3713
+ */
3714
+ 'PersistCache'
3715
+ /**
3716
+ * @deprecated
3717
+ * Workaround for the Legacy Image Edit
3718
+ */
3719
+ | 'LegacyImageSelection'
3720
+ /**
3721
+ * @deprecated
3722
+ * Prevent default browser behavior for copy/cut event,
3723
+ * and set the clipboard data with custom implementation.
3724
+ */
3725
+ | 'CustomCopyCut';
3726
+
3717
3727
  /**
3718
3728
  * Options for editor
3719
3729
  */
@@ -8576,10 +8586,10 @@ function getContentForCopy(editor: IEditor, isCut: boolean, event: ClipboardEven
8576
8586
  * @param columns Number of columns in table, it also controls the default table cell width:
8577
8587
  * if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px
8578
8588
  * @param rows Number of rows in table
8579
- * @param format (Optional) The table format. If not passed, the default format will be applied:
8580
- * background color: #FFF; border color: #ABABAB
8589
+ * @param tableMetadataFormat (Optional) The table format that are stored as metadata. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB
8590
+ * @param format (Optional) The table format used for style attributes
8581
8591
  */
8582
- function insertTable(editor: IEditor, columns: number, rows: number, format?: Partial<TableMetadataFormat>): void;
8592
+ function insertTable(editor: IEditor, columns: number, rows: number, tableMetadataFormat?: Partial<TableMetadataFormat>, format?: ContentModelTableFormat): void;
8583
8593
 
8584
8594
  /**
8585
8595
  * Format current focused table with the given format