roosterjs 9.52.0 → 9.53.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.52.0)
1
+ // Type definitions for roosterjs (Version 9.53.0)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -3828,7 +3828,19 @@ type ExperimentalFeature = GraduatedExperimentalFeature
3828
3828
  /**
3829
3829
  * Transform the table border colors when switching from light to dark mode
3830
3830
  */
3831
- | 'TransformTableBorderColors';
3831
+ | 'TransformTableBorderColors'
3832
+ /**
3833
+ * When the editor content div is inside a Shadow DOM, enable shadow root detection
3834
+ * in DOMHelper so that selection, focus, and element appending work correctly within
3835
+ * the shadow boundary.
3836
+ */
3837
+ | 'ShadowDom'
3838
+ /**
3839
+ * Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.
3840
+ * These characters can be used to hide text in HTML and may cause unexpected behavior.
3841
+ * @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/
3842
+ */
3843
+ | 'FilterInvisibleUnicode';
3832
3844
 
3833
3845
  /**
3834
3846
  * Predefined experiment features (Graduated, only keep them for backward compatibility)
@@ -5805,6 +5817,22 @@ interface DOMHelper {
5805
5817
  * @returns An array of Ranges that match the search criteria
5806
5818
  */
5807
5819
  getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];
5820
+ /**
5821
+ * Get the current selection range, handling shadow DOM StaticRange conversion.
5822
+ * Returns a live Range in all browsers.
5823
+ */
5824
+ getSelectionRange(): Range | null;
5825
+ /**
5826
+ * Set the selection to the given range, handling browser differences for shadow DOM.
5827
+ * @param range The range to set
5828
+ * @param isReverted Whether the selection is reverted (focus before anchor)
5829
+ */
5830
+ setSelectionRange(range: Range, isReverted?: boolean): void;
5831
+ /**
5832
+ * Append an element to the correct root container (shadow root or document.body)
5833
+ * @param element The element to append
5834
+ */
5835
+ appendToRoot(element: HTMLElement): void;
5808
5836
  }
5809
5837
 
5810
5838
  /**