roosterjs 8.34.0 → 8.35.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.34.0)
1
+ // Type definitions for roosterjs (Version 8.35.0)
2
2
  // Generated by dts tool from roosterjs
3
3
  // Project: https://github.com/Microsoft/roosterjs
4
4
 
@@ -2003,8 +2003,7 @@ class Editor implements IEditor {
2003
2003
  * Focus to this editor, the selection was restored to where it was before, no unexpected scroll.
2004
2004
  */
2005
2005
  focus(): void;
2006
- select(arg1: Range | NodePosition | Node | SelectionPath | HTMLTableElement | HTMLImageElement | null, arg2?: NodePosition | number | PositionType | TableSelection, arg3?: Node, arg4?: number | PositionType): boolean;
2007
- private triggerSelectionChanged;
2006
+ select(arg1: Range | SelectionRangeEx | NodePosition | Node | SelectionPath | null, arg2?: NodePosition | number | PositionType | TableSelection, arg3?: Node, arg4?: number | PositionType): boolean;
2008
2007
  /**
2009
2008
  * Get current focused position. Return null if editor doesn't have focus at this time.
2010
2009
  */
@@ -3184,6 +3183,8 @@ const enum Keys {
3184
3183
  ESCAPE = 27,
3185
3184
  SPACE = 32,
3186
3185
  PAGEUP = 33,
3186
+ END = 35,
3187
+ HOME = 36,
3187
3188
  LEFT = 37,
3188
3189
  UP = 38,
3189
3190
  RIGHT = 39,
@@ -5729,8 +5730,21 @@ interface TableContentMetadata extends TableSelection, ContentMetadataBase<Selec
5729
5730
  /**
5730
5731
  * A content metadata is a data structure storing information other than HTML content,
5731
5732
  * such as dark mode info, selection info, ...
5733
+ *
5734
+ * ImageContentMetadata is content metadata for image selection with image id
5735
+ *
5736
+ * When do any change to this type, also need to fix function isUndoMetadata to make sure
5737
+ * the check is correct
5738
+ */
5739
+ interface ImageContentMetadata extends ContentMetadataBase<SelectionRangeTypes.ImageSelection> {
5740
+ imageId: string;
5741
+ }
5742
+
5743
+ /**
5744
+ * A content metadata is a data structure storing information other than HTML content,
5745
+ * such as dark mode info, selection info, ...
5732
5746
  */
5733
- type ContentMetadata = NormalContentMetadata | TableContentMetadata;
5747
+ type ContentMetadata = NormalContentMetadata | TableContentMetadata | ImageContentMetadata;
5734
5748
 
5735
5749
  /**
5736
5750
  * A serializable snapshot of editor content, including the html content and metadata
@@ -6249,6 +6263,11 @@ interface IEditor {
6249
6263
  * @param coordinates first and last cell of the range
6250
6264
  */
6251
6265
  select(table: HTMLTableElement, coordinates: TableSelection): boolean;
6266
+ /**
6267
+ * Select content SelectionRangeEx
6268
+ * @param rangeEx SelectionRangeEx object to specify what to select
6269
+ */
6270
+ select(rangeEx: SelectionRangeEx): boolean;
6252
6271
  /**
6253
6272
  * Get current focused position. Return null if editor doesn't have focus at this time.
6254
6273
  */
@@ -9004,6 +9023,8 @@ enum CompatibleKeys {
9004
9023
  ESCAPE = 27,
9005
9024
  SPACE = 32,
9006
9025
  PAGEUP = 33,
9026
+ END = 35,
9027
+ HOME = 36,
9007
9028
  LEFT = 37,
9008
9029
  UP = 38,
9009
9030
  RIGHT = 39,