roosterjs-content-model-types 9.40.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.
Files changed (76) hide show
  1. package/lib/context/EditorContext.d.ts +5 -0
  2. package/lib/context/EditorContext.js.map +1 -1
  3. package/lib/editor/ExperimentalFeature.d.ts +14 -10
  4. package/lib/editor/ExperimentalFeature.js.map +1 -1
  5. package/lib/event/FindResultChangedEvent.d.ts +18 -0
  6. package/lib/event/FindResultChangedEvent.js +3 -0
  7. package/lib/event/FindResultChangedEvent.js.map +1 -0
  8. package/lib/event/PluginEvent.d.ts +2 -1
  9. package/lib/event/PluginEvent.js.map +1 -1
  10. package/lib/event/PluginEventType.d.ts +5 -1
  11. package/lib/event/PluginEventType.js.map +1 -1
  12. package/lib/index.d.ts +4 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/parameter/AnnounceData.d.ts +38 -1
  15. package/lib/parameter/AnnounceData.js.map +1 -1
  16. package/lib/parameter/AnnouncingOption.d.ts +9 -0
  17. package/lib/parameter/AnnouncingOption.js +3 -0
  18. package/lib/parameter/AnnouncingOption.js.map +1 -0
  19. package/lib/parameter/DOMHelper.d.ts +15 -0
  20. package/lib/parameter/DOMHelper.js.map +1 -1
  21. package/lib/parameter/TextAndHtmlContentForCopy.d.ts +13 -0
  22. package/lib/parameter/TextAndHtmlContentForCopy.js +3 -0
  23. package/lib/parameter/TextAndHtmlContentForCopy.js.map +1 -0
  24. package/lib/selection/DOMSelection.d.ts +5 -0
  25. package/lib/selection/DOMSelection.js.map +1 -1
  26. package/lib-amd/context/EditorContext.d.ts +5 -0
  27. package/lib-amd/context/EditorContext.js.map +1 -1
  28. package/lib-amd/editor/ExperimentalFeature.d.ts +14 -10
  29. package/lib-amd/editor/ExperimentalFeature.js.map +1 -1
  30. package/lib-amd/event/FindResultChangedEvent.d.ts +18 -0
  31. package/lib-amd/event/FindResultChangedEvent.js +5 -0
  32. package/lib-amd/event/FindResultChangedEvent.js.map +1 -0
  33. package/lib-amd/event/PluginEvent.d.ts +2 -1
  34. package/lib-amd/event/PluginEvent.js.map +1 -1
  35. package/lib-amd/event/PluginEventType.d.ts +5 -1
  36. package/lib-amd/event/PluginEventType.js.map +1 -1
  37. package/lib-amd/index.d.ts +4 -1
  38. package/lib-amd/index.js.map +1 -1
  39. package/lib-amd/parameter/AnnounceData.d.ts +38 -1
  40. package/lib-amd/parameter/AnnounceData.js.map +1 -1
  41. package/lib-amd/parameter/AnnouncingOption.d.ts +9 -0
  42. package/lib-amd/parameter/AnnouncingOption.js +5 -0
  43. package/lib-amd/parameter/AnnouncingOption.js.map +1 -0
  44. package/lib-amd/parameter/DOMHelper.d.ts +15 -0
  45. package/lib-amd/parameter/DOMHelper.js.map +1 -1
  46. package/lib-amd/parameter/TextAndHtmlContentForCopy.d.ts +13 -0
  47. package/lib-amd/parameter/TextAndHtmlContentForCopy.js +5 -0
  48. package/lib-amd/parameter/TextAndHtmlContentForCopy.js.map +1 -0
  49. package/lib-amd/selection/DOMSelection.d.ts +5 -0
  50. package/lib-amd/selection/DOMSelection.js.map +1 -1
  51. package/lib-mjs/context/EditorContext.d.ts +5 -0
  52. package/lib-mjs/context/EditorContext.js.map +1 -1
  53. package/lib-mjs/editor/ExperimentalFeature.d.ts +14 -10
  54. package/lib-mjs/editor/ExperimentalFeature.js.map +1 -1
  55. package/lib-mjs/event/FindResultChangedEvent.d.ts +18 -0
  56. package/lib-mjs/event/FindResultChangedEvent.js +2 -0
  57. package/lib-mjs/event/FindResultChangedEvent.js.map +1 -0
  58. package/lib-mjs/event/PluginEvent.d.ts +2 -1
  59. package/lib-mjs/event/PluginEvent.js.map +1 -1
  60. package/lib-mjs/event/PluginEventType.d.ts +5 -1
  61. package/lib-mjs/event/PluginEventType.js.map +1 -1
  62. package/lib-mjs/index.d.ts +4 -1
  63. package/lib-mjs/index.js.map +1 -1
  64. package/lib-mjs/parameter/AnnounceData.d.ts +38 -1
  65. package/lib-mjs/parameter/AnnounceData.js.map +1 -1
  66. package/lib-mjs/parameter/AnnouncingOption.d.ts +9 -0
  67. package/lib-mjs/parameter/AnnouncingOption.js +2 -0
  68. package/lib-mjs/parameter/AnnouncingOption.js.map +1 -0
  69. package/lib-mjs/parameter/DOMHelper.d.ts +15 -0
  70. package/lib-mjs/parameter/DOMHelper.js.map +1 -1
  71. package/lib-mjs/parameter/TextAndHtmlContentForCopy.d.ts +13 -0
  72. package/lib-mjs/parameter/TextAndHtmlContentForCopy.js +2 -0
  73. package/lib-mjs/parameter/TextAndHtmlContentForCopy.js.map +1 -0
  74. package/lib-mjs/selection/DOMSelection.d.ts +5 -0
  75. package/lib-mjs/selection/DOMSelection.js.map +1 -1
  76. package/package.json +1 -1
@@ -60,4 +60,9 @@ export interface EditorContext {
60
60
  * When set to true, size of table will be recalculated when converting from DOM to Content Model.
61
61
  */
62
62
  recalculateTableSize?: boolean | 'all' | 'selected' | 'none';
63
+ /**
64
+ * Width of the editor's editable area in pixels, excluding padding.
65
+ * This value is typically used for layout calculations such as constraining pasted image sizes.
66
+ */
67
+ editorViewWidth?: number;
63
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\nimport type { ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap;\n\n /**\n * When set to true, size of table will be recalculated when converting from DOM to Content Model.\n */\n recalculateTableSize?: boolean | 'all' | 'selected' | 'none';\n}\n"]}
1
+ {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\nimport type { ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap;\n\n /**\n * When set to true, size of table will be recalculated when converting from DOM to Content Model.\n */\n recalculateTableSize?: boolean | 'all' | 'selected' | 'none';\n\n /**\n * Width of the editor's editable area in pixels, excluding padding.\n * This value is typically used for layout calculations such as constraining pasted image sizes.\n */\n editorViewWidth?: number;\n}\n"]}
@@ -1,9 +1,7 @@
1
1
  /**
2
- * Predefined experiment features
3
- * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures
4
- * when create editor
2
+ * Predefined experiment features (Graduated, only keep them for backward compatibility)
5
3
  */
6
- export declare type ExperimentalFeature =
4
+ export declare type GraduatedExperimentalFeature =
7
5
  /**
8
6
  * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,
9
7
  * and use cached element when write back if it is not changed.
@@ -14,17 +12,23 @@ export declare type ExperimentalFeature =
14
12
  * Workaround for the Legacy Image Edit
15
13
  */
16
14
  | 'LegacyImageSelection'
17
- /**
18
- * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
19
- * Use Content Model handle ENTER key
20
- */
21
- | 'HandleEnterKey'
22
15
  /**
23
16
  * @deprecated
24
17
  * Prevent default browser behavior for copy/cut event,
25
18
  * and set the clipboard data with custom implementation.
26
19
  */
27
- | 'CustomCopyCut'
20
+ | 'CustomCopyCut';
21
+ /**
22
+ * Predefined experiment features
23
+ * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures
24
+ * when create editor
25
+ */
26
+ export declare type ExperimentalFeature = GraduatedExperimentalFeature
27
+ /**
28
+ * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
29
+ * Use Content Model handle ENTER key
30
+ */
31
+ | 'HandleEnterKey'
28
32
  /**
29
33
  * For CJK keyboard input on mobile, if the user toggles bold/italic/underline on an empty div,
30
34
  * the pending format will be applied on the selection marker. When typing text, the selection moves to the text node and the
@@ -1 +1 @@
1
- {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey'\n /**\n * @deprecated\n * Prevent default browser behavior for copy/cut event,\n * and set the clipboard data with custom implementation.\n */\n | 'CustomCopyCut'\n /**\n * For CJK keyboard input on mobile, if the user toggles bold/italic/underline on an empty div,\n * the pending format will be applied on the selection marker. When typing text, the selection moves to the text node and the\n * selection marker may be recreated during reconciliation, potentially losing its original formatting. This feature ensures\n * the original formatting of the selection marker is kept to match the pending format.\n */\n | 'KeepSelectionMarkerWhenEnteringTextNode'\n\n /**\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\n\n /**\n * Get cloned root element from an independent HTML document instead of current document.\n * So any operation to the cloned root won't trigger network request for resources like images\n */\n | 'CloneIndependentRoot';\n"]}
1
+ {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features (Graduated, only keep them for backward compatibility)\n */\nexport type GraduatedExperimentalFeature =\n /**\n * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n\n /**\n * @deprecated\n * Prevent default browser behavior for copy/cut event,\n * and set the clipboard data with custom implementation.\n */\n | 'CustomCopyCut';\n\n/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n | GraduatedExperimentalFeature\n\n /**\n * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey'\n\n /**\n * For CJK keyboard input on mobile, if the user toggles bold/italic/underline on an empty div,\n * the pending format will be applied on the selection marker. When typing text, the selection moves to the text node and the\n * selection marker may be recreated during reconciliation, potentially losing its original formatting. This feature ensures\n * the original formatting of the selection marker is kept to match the pending format.\n */\n | 'KeepSelectionMarkerWhenEnteringTextNode'\n\n /**\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\n\n /**\n * Get cloned root element from an independent HTML document instead of current document.\n * So any operation to the cloned root won't trigger network request for resources like images\n */\n | 'CloneIndependentRoot';\n"]}
@@ -0,0 +1,18 @@
1
+ import type { BasePluginEvent } from './BasePluginEvent';
2
+ /**
3
+ * Represents an event that occurs when the find result changes in the editor
4
+ */
5
+ export interface FindResultChangedEvent extends BasePluginEvent<'findResultChanged'> {
6
+ /**
7
+ * The index of the currently marked find result
8
+ */
9
+ readonly markedIndex: number;
10
+ /**
11
+ * The array of ranges representing the current find results
12
+ */
13
+ readonly ranges: ReadonlyArray<Range>;
14
+ /**
15
+ * An alternative range to select when there is no marked result
16
+ */
17
+ readonly alternativeRange?: Range | null;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=FindResultChangedEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FindResultChangedEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/FindResultChangedEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { BasePluginEvent } from './BasePluginEvent';\n\n/**\n * Represents an event that occurs when the find result changes in the editor\n */\nexport interface FindResultChangedEvent extends BasePluginEvent<'findResultChanged'> {\n /**\n * The index of the currently marked find result\n */\n readonly markedIndex: number;\n\n /**\n * The array of ranges representing the current find results\n */\n readonly ranges: ReadonlyArray<Range>;\n\n /**\n * An alternative range to select when there is no marked result\n */\n readonly alternativeRange?: Range | null;\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import type { FindResultChangedEvent } from './FindResultChangedEvent';
1
2
  import type { BeforeAddUndoSnapshotEvent } from './BeforeAddUndoSnapshotEvent';
2
3
  import type { BeforeCutCopyEvent } from './BeforeCutCopyEvent';
3
4
  import type { BeforeDisposeEvent } from './BeforeDisposeEvent';
@@ -23,4 +24,4 @@ import type { PointerDownEvent, PointerUpEvent } from './PointerEvent';
23
24
  /**
24
25
  * Editor plugin event interface
25
26
  */
26
- export declare type PluginEvent = BeforeAddUndoSnapshotEvent | BeforeCutCopyEvent | BeforeDisposeEvent | BeforeKeyboardEditingEvent | BeforeLogicalRootChangeEvent | BeforePasteEvent | BeforeSetContentEvent | CompositionEndEvent | ContentChangedEvent | ContextMenuEvent | RewriteFromModelEvent | EditImageEvent | EditorReadyEvent | EnterShadowEditEvent | EntityOperationEvent | ExtractContentWithDomEvent | EditorInputEvent | KeyDownEvent | KeyPressEvent | KeyUpEvent | LeaveShadowEditEvent | LogicalRootChangedEvent | MouseDownEvent | MouseUpEvent | ScrollEvent | SelectionChangedEvent | ZoomChangedEvent | PointerDownEvent | PointerUpEvent | DoubleClickEvent;
27
+ export declare type PluginEvent = BeforeAddUndoSnapshotEvent | BeforeCutCopyEvent | BeforeDisposeEvent | BeforeKeyboardEditingEvent | BeforeLogicalRootChangeEvent | BeforePasteEvent | BeforeSetContentEvent | CompositionEndEvent | ContentChangedEvent | ContextMenuEvent | RewriteFromModelEvent | EditImageEvent | EditorReadyEvent | EnterShadowEditEvent | EntityOperationEvent | ExtractContentWithDomEvent | EditorInputEvent | KeyDownEvent | KeyPressEvent | KeyUpEvent | LeaveShadowEditEvent | LogicalRootChangedEvent | MouseDownEvent | MouseUpEvent | ScrollEvent | SelectionChangedEvent | ZoomChangedEvent | PointerDownEvent | PointerUpEvent | DoubleClickEvent | FindResultChangedEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"PluginEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/PluginEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { BeforeAddUndoSnapshotEvent } from './BeforeAddUndoSnapshotEvent';\nimport type { BeforeCutCopyEvent } from './BeforeCutCopyEvent';\nimport type { BeforeDisposeEvent } from './BeforeDisposeEvent';\nimport type { BeforeKeyboardEditingEvent } from './BeforeKeyboardEditingEvent';\nimport type { BeforePasteEvent } from './BeforePasteEvent';\nimport type { BeforeSetContentEvent } from './BeforeSetContentEvent';\nimport type { ContentChangedEvent } from './ContentChangedEvent';\nimport type { ContextMenuEvent } from './ContextMenuEvent';\nimport type { EditImageEvent } from './EditImageEvent';\nimport type { EditorInputEvent } from './EditorInputEvent';\nimport type { EditorReadyEvent } from './EditorReadyEvent';\nimport type { EntityOperationEvent } from './EntityOperationEvent';\nimport type { ExtractContentWithDomEvent } from './ExtractContentWithDomEvent';\nimport type { CompositionEndEvent, KeyDownEvent, KeyPressEvent, KeyUpEvent } from './KeyboardEvent';\nimport type {\n BeforeLogicalRootChangeEvent,\n LogicalRootChangedEvent,\n} from './LogicalRootChangedEvent';\nimport type { MouseDownEvent, MouseUpEvent, DoubleClickEvent } from './MouseEvent';\nimport type { RewriteFromModelEvent } from './RewriteFromModelEvent';\nimport type { ScrollEvent } from './ScrollEvent';\nimport type { SelectionChangedEvent } from './SelectionChangedEvent';\nimport type { EnterShadowEditEvent, LeaveShadowEditEvent } from './ShadowEditEvent';\nimport type { ZoomChangedEvent } from './ZoomChangedEvent';\nimport type { PointerDownEvent, PointerUpEvent } from './PointerEvent';\n\n/**\n * Editor plugin event interface\n */\nexport type PluginEvent =\n | BeforeAddUndoSnapshotEvent\n | BeforeCutCopyEvent\n | BeforeDisposeEvent\n | BeforeKeyboardEditingEvent\n | BeforeLogicalRootChangeEvent\n | BeforePasteEvent\n | BeforeSetContentEvent\n | CompositionEndEvent\n | ContentChangedEvent\n | ContextMenuEvent\n | RewriteFromModelEvent\n | EditImageEvent\n | EditorReadyEvent\n | EnterShadowEditEvent\n | EntityOperationEvent\n | ExtractContentWithDomEvent\n | EditorInputEvent\n | KeyDownEvent\n | KeyPressEvent\n | KeyUpEvent\n | LeaveShadowEditEvent\n | LogicalRootChangedEvent\n | MouseDownEvent\n | MouseUpEvent\n | ScrollEvent\n | SelectionChangedEvent\n | ZoomChangedEvent\n | PointerDownEvent\n | PointerUpEvent\n | DoubleClickEvent;\n"]}
1
+ {"version":3,"file":"PluginEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/PluginEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { FindResultChangedEvent } from './FindResultChangedEvent';\nimport type { BeforeAddUndoSnapshotEvent } from './BeforeAddUndoSnapshotEvent';\nimport type { BeforeCutCopyEvent } from './BeforeCutCopyEvent';\nimport type { BeforeDisposeEvent } from './BeforeDisposeEvent';\nimport type { BeforeKeyboardEditingEvent } from './BeforeKeyboardEditingEvent';\nimport type { BeforePasteEvent } from './BeforePasteEvent';\nimport type { BeforeSetContentEvent } from './BeforeSetContentEvent';\nimport type { ContentChangedEvent } from './ContentChangedEvent';\nimport type { ContextMenuEvent } from './ContextMenuEvent';\nimport type { EditImageEvent } from './EditImageEvent';\nimport type { EditorInputEvent } from './EditorInputEvent';\nimport type { EditorReadyEvent } from './EditorReadyEvent';\nimport type { EntityOperationEvent } from './EntityOperationEvent';\nimport type { ExtractContentWithDomEvent } from './ExtractContentWithDomEvent';\nimport type { CompositionEndEvent, KeyDownEvent, KeyPressEvent, KeyUpEvent } from './KeyboardEvent';\nimport type {\n BeforeLogicalRootChangeEvent,\n LogicalRootChangedEvent,\n} from './LogicalRootChangedEvent';\nimport type { MouseDownEvent, MouseUpEvent, DoubleClickEvent } from './MouseEvent';\nimport type { RewriteFromModelEvent } from './RewriteFromModelEvent';\nimport type { ScrollEvent } from './ScrollEvent';\nimport type { SelectionChangedEvent } from './SelectionChangedEvent';\nimport type { EnterShadowEditEvent, LeaveShadowEditEvent } from './ShadowEditEvent';\nimport type { ZoomChangedEvent } from './ZoomChangedEvent';\nimport type { PointerDownEvent, PointerUpEvent } from './PointerEvent';\n\n/**\n * Editor plugin event interface\n */\nexport type PluginEvent =\n | BeforeAddUndoSnapshotEvent\n | BeforeCutCopyEvent\n | BeforeDisposeEvent\n | BeforeKeyboardEditingEvent\n | BeforeLogicalRootChangeEvent\n | BeforePasteEvent\n | BeforeSetContentEvent\n | CompositionEndEvent\n | ContentChangedEvent\n | ContextMenuEvent\n | RewriteFromModelEvent\n | EditImageEvent\n | EditorReadyEvent\n | EnterShadowEditEvent\n | EntityOperationEvent\n | ExtractContentWithDomEvent\n | EditorInputEvent\n | KeyDownEvent\n | KeyPressEvent\n | KeyUpEvent\n | LeaveShadowEditEvent\n | LogicalRootChangedEvent\n | MouseDownEvent\n | MouseUpEvent\n | ScrollEvent\n | SelectionChangedEvent\n | ZoomChangedEvent\n | PointerDownEvent\n | PointerUpEvent\n | DoubleClickEvent\n | FindResultChangedEvent;\n"]}
@@ -132,4 +132,8 @@ export declare type PluginEventType =
132
132
  /**
133
133
  * HTML double click event
134
134
  */
135
- | 'doubleClick';
135
+ | 'doubleClick'
136
+ /**
137
+ * Find result changed event
138
+ */
139
+ | 'findResultChanged';
@@ -1 +1 @@
1
- {"version":3,"file":"PluginEventType.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/PluginEventType.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Type of plugin events\n */\nexport type PluginEventType =\n /**\n * HTML KeyDown event\n */\n | 'keyDown'\n\n /**\n * HTML KeyPress event\n */\n | 'keyPress'\n\n /**\n * HTML KeyUp event\n */\n | 'keyUp'\n\n /**\n * HTML Input / TextInput event\n */\n | 'input'\n\n /**\n * HTML CompositionEnd event\n */\n | 'compositionEnd'\n\n /**\n * HTML MouseDown event\n */\n | 'mouseDown'\n\n /**\n * HTML MouseUp event\n */\n | 'mouseUp'\n\n /**\n * Content changed event\n */\n | 'contentChanged'\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n | 'extractContentWithDom'\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n | 'beforeCutCopy'\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n | 'beforePaste'\n\n /**\n * Let plugin know editor is ready now\n */\n | 'editorReady'\n\n /**\n * Let plugin know editor is about to dispose\n */\n | 'beforeDispose'\n\n /**\n * Scroll event triggered by scroll container\n */\n | 'scroll'\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n | 'entityOperation'\n\n /**\n * HTML ContextMenu event\n */\n | 'contextMenu'\n\n /**\n * Editor has entered shadow edit mode\n */\n | 'enteredShadowEdit'\n\n /**\n * Editor is about to leave shadow edit mode\n */\n | 'leavingShadowEdit'\n\n /**\n * Content of image is being changed from client side\n */\n | 'editImage'\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n | 'beforeSetContent'\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n | 'zoomChanged'\n\n /**\n * Rewrite result information from Content Model\n */\n | 'rewriteFromModel'\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n | 'selectionChanged'\n\n /**\n * EXPERIMENTAL FEATURE\n * The logical root changed\n */\n | 'logicalRootChanged'\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n | 'beforeKeyboardEditing'\n\n /**\n * The logical root is about to change\n * This event is used to clean up any features from the old logical root\n * before the new logical root is set.\n */\n | 'beforeLogicalRootChange'\n\n /**\n * Before an undo snapshot is added to the undo stack.\n * This event is used to give plugins a chance to add additional state to the snapshot.\n */\n | 'beforeAddUndoSnapshot'\n\n /**\n * HTML PointerDown event - for touch only\n */\n | 'pointerDown'\n\n /**\n * HTML PointerUp event - for touch only\n */\n | 'pointerUp'\n\n /**\n * HTML double click event\n */\n | 'doubleClick';\n"]}
1
+ {"version":3,"file":"PluginEventType.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/PluginEventType.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Type of plugin events\n */\nexport type PluginEventType =\n /**\n * HTML KeyDown event\n */\n | 'keyDown'\n\n /**\n * HTML KeyPress event\n */\n | 'keyPress'\n\n /**\n * HTML KeyUp event\n */\n | 'keyUp'\n\n /**\n * HTML Input / TextInput event\n */\n | 'input'\n\n /**\n * HTML CompositionEnd event\n */\n | 'compositionEnd'\n\n /**\n * HTML MouseDown event\n */\n | 'mouseDown'\n\n /**\n * HTML MouseUp event\n */\n | 'mouseUp'\n\n /**\n * Content changed event\n */\n | 'contentChanged'\n\n /**\n * Extract Content with a DOM tree event\n * This event is triggered when getContent() is called with triggerExtractContentEvent = true\n * Plugin can handle this event to remove the UI only markups to return clean HTML\n * by operating on a cloned DOM tree\n */\n | 'extractContentWithDom'\n\n /**\n * Before Paste event, provide a chance to change copied content\n */\n | 'beforeCutCopy'\n\n /**\n * Before Paste event, provide a chance to change paste content\n */\n | 'beforePaste'\n\n /**\n * Let plugin know editor is ready now\n */\n | 'editorReady'\n\n /**\n * Let plugin know editor is about to dispose\n */\n | 'beforeDispose'\n\n /**\n * Scroll event triggered by scroll container\n */\n | 'scroll'\n\n /**\n * Operating on an entity. See enum EntityOperation for more details about each operation\n */\n | 'entityOperation'\n\n /**\n * HTML ContextMenu event\n */\n | 'contextMenu'\n\n /**\n * Editor has entered shadow edit mode\n */\n | 'enteredShadowEdit'\n\n /**\n * Editor is about to leave shadow edit mode\n */\n | 'leavingShadowEdit'\n\n /**\n * Content of image is being changed from client side\n */\n | 'editImage'\n\n /**\n * Content of editor is about to be cleared by SetContent API, handle this event to cache anything you need\n * before it is gone\n */\n | 'beforeSetContent'\n\n /**\n * Zoom scale value is changed, triggered by Editor.setZoomScale() when set a different scale number\n */\n | 'zoomChanged'\n\n /**\n * Rewrite result information from Content Model\n */\n | 'rewriteFromModel'\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor changed the selection.\n */\n | 'selectionChanged'\n\n /**\n * EXPERIMENTAL FEATURE\n * The logical root changed\n */\n | 'logicalRootChanged'\n\n /**\n * EXPERIMENTAL FEATURE\n * Editor content is about to be changed by keyboard event.\n * This is only used by Content Model editing\n */\n | 'beforeKeyboardEditing'\n\n /**\n * The logical root is about to change\n * This event is used to clean up any features from the old logical root\n * before the new logical root is set.\n */\n | 'beforeLogicalRootChange'\n\n /**\n * Before an undo snapshot is added to the undo stack.\n * This event is used to give plugins a chance to add additional state to the snapshot.\n */\n | 'beforeAddUndoSnapshot'\n\n /**\n * HTML PointerDown event - for touch only\n */\n | 'pointerDown'\n\n /**\n * HTML PointerUp event - for touch only\n */\n | 'pointerUp'\n\n /**\n * HTML double click event\n */\n | 'doubleClick'\n\n /**\n * Find result changed event\n */\n | 'findResultChanged';\n"]}
package/lib/index.d.ts CHANGED
@@ -121,7 +121,7 @@ export { DefinitionType } from './metadata/DefinitionType';
121
121
  export { ArrayItemType, DefinitionBase, StringDefinition, NumberDefinition, BooleanDefinition, ArrayDefinition, ObjectPropertyDefinition, ObjectDefinition, Definition, } from './metadata/Definition';
122
122
  export { DarkColorHandler, Colors, ColorTransformFunction } from './context/DarkColorHandler';
123
123
  export { IEditor } from './editor/IEditor';
124
- export { ExperimentalFeature } from './editor/ExperimentalFeature';
124
+ export { ExperimentalFeature, GraduatedExperimentalFeature } from './editor/ExperimentalFeature';
125
125
  export { EditorOptions, ColorOptions, ContentModelOptions, SelectionOptions, PasteOptions, EditorBaseOptions, } from './editor/EditorOptions';
126
126
  export { CreateContentModel, CreateEditorContext, GetDOMSelection, SetContentModel, SetDOMSelection, SetLogicalRoot, FormatContentModel, CoreApiMap, EditorCore, SwitchShadowEdit, TriggerEvent, AddUndoSnapshot, Focus, AttachDomEvent, RestoreUndoSnapshot, GetVisibleViewport, SetEditorStyle, Announce, } from './editor/EditorCore';
127
127
  export { EditorCorePlugins } from './editor/EditorCorePlugins';
@@ -154,6 +154,7 @@ export { DOMEventHandlerFunction, DOMEventRecord } from './parameter/DOMEventRec
154
154
  export { EdgeLinkPreview } from './parameter/EdgeLinkPreview';
155
155
  export { ClipboardData } from './parameter/ClipboardData';
156
156
  export { AnnounceData, KnownAnnounceStrings } from './parameter/AnnounceData';
157
+ export { AnnouncingOption } from './parameter/AnnouncingOption';
157
158
  export { TrustedHTMLHandler, DOMCreator, LegacyTrustedHTMLHandler, } from './parameter/TrustedHTMLHandler';
158
159
  export { Rect } from './parameter/Rect';
159
160
  export { ValueSanitizer } from './parameter/ValueSanitizer';
@@ -170,6 +171,7 @@ export { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';
170
171
  export { ModelToTextCallback, ModelToTextCallbacks, ModelToTextChecker, } from './parameter/ModelToTextCallbacks';
171
172
  export { ConflictFormatSolution } from './parameter/ConflictFormatSolution';
172
173
  export { ParagraphMap, ParagraphIndexer } from './parameter/ParagraphMap';
174
+ export { TextAndHtmlContentForCopy } from './parameter/TextAndHtmlContentForCopy';
173
175
  export { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';
174
176
  export { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';
175
177
  export { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';
@@ -196,3 +198,4 @@ export { SelectionChangedEvent } from './event/SelectionChangedEvent';
196
198
  export { EnterShadowEditEvent, LeaveShadowEditEvent } from './event/ShadowEditEvent';
197
199
  export { ZoomChangedEvent } from './event/ZoomChangedEvent';
198
200
  export { PointerDownEvent, PointerUpEvent } from './event/PointerEvent';
201
+ export { FindResultChangedEvent } from './event/FindResultChangedEvent';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-types/lib/index.ts"],"names":[],"mappings":"","sourcesContent":["export { ContentModelSegmentFormat } from './contentModel/format/ContentModelSegmentFormat';\nexport {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from './contentModel/format/ContentModelWithFormat';\nexport { ContentModelTableFormat } from './contentModel/format/ContentModelTableFormat';\nexport {\n ContentModelWithDataset,\n ReadonlyContentModelWithDataset,\n ShallowMutableContentModelWithDataset,\n} from './contentModel/format/ContentModelWithDataset';\nexport { ContentModelBlockFormat } from './contentModel/format/ContentModelBlockFormat';\nexport { ContentModelTableCellFormat } from './contentModel/format/ContentModelTableCellFormat';\nexport { ContentModelListItemFormat } from './contentModel/format/ContentModelListItemFormat';\nexport { ContentModelListItemLevelFormat } from './contentModel/format/ContentModelListItemLevelFormat';\nexport { ContentModelHyperLinkFormat } from './contentModel/format/ContentModelHyperLinkFormat';\nexport { ContentModelCodeFormat } from './contentModel/format/ContentModelCodeFormat';\nexport { ContentModelFormatContainerFormat } from './contentModel/format/ContentModelFormatContainerFormat';\nexport { ContentModelDividerFormat } from './contentModel/format/ContentModelDividerFormat';\nexport { ContentModelFormatBase } from './contentModel/format/ContentModelFormatBase';\nexport { ContentModelFormatMap } from './contentModel/format/ContentModelFormatMap';\nexport { ContentModelImageFormat } from './contentModel/format/ContentModelImageFormat';\nexport { ContentModelEntityFormat } from './contentModel/format/ContentModelEntityFormat';\nexport { FormatHandlerTypeMap, FormatKey } from './contentModel/format/FormatHandlerTypeMap';\n\nexport { AriaFormat } from './contentModel/format/formatParts/AriaFormat';\nexport { BackgroundColorFormat } from './contentModel/format/formatParts/BackgroundColorFormat';\nexport { BoldFormat } from './contentModel/format/formatParts/BoldFormat';\nexport { FontFamilyFormat } from './contentModel/format/formatParts/FontFamilyFormat';\nexport { FontSizeFormat } from './contentModel/format/formatParts/FontSizeFormat';\nexport { ItalicFormat } from './contentModel/format/formatParts/ItalicFormat';\nexport { LetterSpacingFormat } from './contentModel/format/formatParts/LetterSpacingFormat';\nexport { LineHeightFormat } from './contentModel/format/formatParts/LineHeightFormat';\nexport { StrikeFormat } from './contentModel/format/formatParts/StrikeFormat';\nexport { SuperOrSubScriptFormat } from './contentModel/format/formatParts/SuperOrSubScriptFormat';\nexport { TextColorFormat } from './contentModel/format/formatParts/TextColorFormat';\nexport { UnderlineFormat } from './contentModel/format/formatParts/UnderlineFormat';\nexport { BorderBoxFormat } from './contentModel/format/formatParts/BorderBoxFormat';\nexport { VerticalAlignFormat } from './contentModel/format/formatParts/VerticalAlignFormat';\nexport { WordBreakFormat } from './contentModel/format/formatParts/WordBreakFormat';\nexport { BorderFormat } from './contentModel/format/formatParts/BorderFormat';\nexport { DirectionFormat } from './contentModel/format/formatParts/DirectionFormat';\nexport { HtmlAlignFormat } from './contentModel/format/formatParts/HtmlAlignFormat';\nexport { MarginFormat } from './contentModel/format/formatParts/MarginFormat';\nexport { PaddingFormat } from './contentModel/format/formatParts/PaddingFormat';\nexport { TextAlignFormat } from './contentModel/format/formatParts/TextAlignFormat';\nexport { TextIndentFormat } from './contentModel/format/formatParts/TextIndentFormat';\nexport { WhiteSpaceFormat } from './contentModel/format/formatParts/WhiteSpaceFormat';\nexport { DisplayFormat } from './contentModel/format/formatParts/DisplayFormat';\nexport { IdFormat } from './contentModel/format/formatParts/IdFormat';\nexport { SpacingFormat } from './contentModel/format/formatParts/SpacingFormat';\nexport { TableLayoutFormat } from './contentModel/format/formatParts/TableLayoutFormat';\nexport { LinkFormat } from './contentModel/format/formatParts/LinkFormat';\nexport { SizeFormat } from './contentModel/format/formatParts/SizeFormat';\nexport { BoxShadowFormat } from './contentModel/format/formatParts/BoxShadowFormat';\nexport { ListThreadFormat } from './contentModel/format/formatParts/ListThreadFormat';\nexport { ListStyleFormat } from './contentModel/format/formatParts/ListStyleFormat';\nexport { FloatFormat } from './contentModel/format/formatParts/FloatFormat';\nexport { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';\nexport { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';\nexport { ImageStateFormat } from './contentModel/format/formatParts/ImageStateFormat';\nexport { RoleFormat } from './contentModel/format/formatParts/RoleFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';\nexport {\n ImageResizeMetadataFormat,\n ImageCropMetadataFormat,\n ImageMetadataFormat,\n ImageRotateMetadataFormat,\n ImageFlipMetadataFormat,\n} from './contentModel/format/metadata/ImageMetadataFormat';\nexport { TableCellMetadataFormat } from './contentModel/format/metadata/TableCellMetadataFormat';\n\nexport { ContentModelBlockGroupType } from './contentModel/blockGroup/BlockGroupType';\nexport { ContentModelBlockType } from './contentModel/block/BlockType';\nexport { ContentModelSegmentType } from './contentModel/segment/SegmentType';\n\nexport {\n EntityLifecycleOperation,\n EntityOperation,\n EntityRemovalOperation,\n EntityFormatOperation,\n} from './enum/EntityOperation';\nexport {\n TableOperation,\n TableVerticalInsertOperation,\n TableHorizontalInsertOperation,\n TableDeleteOperation,\n TableVerticalMergeOperation,\n TableHorizontalMergeOperation,\n TableCellMergeOperation,\n TableSplitOperation,\n TableAlignOperation,\n TableCellHorizontalAlignOperation,\n TableCellVerticalAlignOperation,\n} from './enum/TableOperation';\nexport { PasteType } from './enum/PasteType';\nexport { BorderOperations } from './enum/BorderOperations';\nexport { DeleteResult } from './enum/DeleteResult';\nexport { InsertEntityPosition } from './enum/InsertEntityPosition';\nexport { ExportContentMode } from './enum/ExportContentMode';\n\nexport {\n ContentModelBlock,\n ReadonlyContentModelBlock,\n ShallowMutableContentModelBlock,\n} from './contentModel/block/ContentModelBlock';\nexport {\n ContentModelParagraph,\n ContentModelParagraphCommon,\n ReadonlyContentModelParagraph,\n ShallowMutableContentModelParagraph,\n} from './contentModel/block/ContentModelParagraph';\nexport {\n ContentModelTable,\n ReadonlyContentModelTable,\n ShallowMutableContentModelTable,\n} from './contentModel/block/ContentModelTable';\nexport {\n ContentModelDivider,\n ContentModelDividerCommon,\n ReadonlyContentModelDivider,\n} from './contentModel/block/ContentModelDivider';\nexport {\n ContentModelBlockBase,\n ContentModelBlockBaseCommon,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from './contentModel/block/ContentModelBlockBase';\nexport { ContentModelBlockWithCache } from './contentModel/common/ContentModelBlockWithCache';\nexport {\n ContentModelTableRow,\n ContentModelTableRowCommon,\n ReadonlyContentModelTableRow,\n ShallowMutableContentModelTableRow,\n} from './contentModel/block/ContentModelTableRow';\n\nexport { ContentModelEntity } from './contentModel/entity/ContentModelEntity';\n\nexport {\n ContentModelDocument,\n ContentModelDocumentCommon,\n ReadonlyContentModelDocument,\n ShallowMutableContentModelDocument,\n} from './contentModel/blockGroup/ContentModelDocument';\nexport {\n ContentModelBlockGroupBase,\n ContentModelBlockGroupBaseCommon,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './contentModel/blockGroup/ContentModelBlockGroupBase';\nexport {\n ContentModelFormatContainer,\n ContentModelFormatContainerCommon,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from './contentModel/blockGroup/ContentModelFormatContainer';\nexport {\n ContentModelGeneralBlock,\n ContentModelGeneralBlockCommon,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from './contentModel/blockGroup/ContentModelGeneralBlock';\nexport {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from './contentModel/blockGroup/ContentModelListItem';\nexport {\n ContentModelTableCell,\n ContentModelTableCellCommon,\n ReadonlyContentModelTableCell,\n ShallowMutableContentModelTableCell,\n} from './contentModel/blockGroup/ContentModelTableCell';\nexport {\n ContentModelBlockGroup,\n ReadonlyContentModelBlockGroup,\n ShallowMutableContentModelBlockGroup,\n} from './contentModel/blockGroup/ContentModelBlockGroup';\n\nexport { ContentModelBr, ReadonlyContentModelBr } from './contentModel/segment/ContentModelBr';\nexport {\n ContentModelGeneralSegment,\n ReadonlyContentModelGeneralSegment,\n ShallowMutableContentModelGeneralSegment,\n} from './contentModel/segment/ContentModelGeneralSegment';\nexport {\n ContentModelImage,\n ContentModelImageCommon,\n ReadonlyContentModelImage,\n} from './contentModel/segment/ContentModelImage';\nexport {\n ContentModelText,\n ContentModelTextCommon,\n ReadonlyContentModelText,\n} from './contentModel/segment/ContentModelText';\nexport {\n ContentModelSelectionMarker,\n ReadonlyContentModelSelectionMarker,\n} from './contentModel/segment/ContentModelSelectionMarker';\nexport {\n ContentModelSegmentBase,\n ContentModelSegmentBaseCommon,\n ReadonlyContentModelSegmentBase,\n ShallowMutableContentModelSegmentBase,\n} from './contentModel/segment/ContentModelSegmentBase';\nexport {\n ContentModelSegment,\n ReadonlyContentModelSegment,\n ShallowMutableContentModelSegment,\n} from './contentModel/segment/ContentModelSegment';\n\nexport {\n ContentModelCode,\n ReadonlyContentModelCode,\n} from './contentModel/decorator/ContentModelCode';\nexport {\n ContentModelLink,\n ReadonlyContentModelLink,\n} from './contentModel/decorator/ContentModelLink';\nexport {\n ContentModelParagraphDecorator,\n ContentModelParagraphDecoratorCommon,\n ReadonlyContentModelParagraphDecorator,\n} from './contentModel/decorator/ContentModelParagraphDecorator';\nexport {\n ContentModelDecorator,\n ReadonlyContentModelDecorator,\n} from './contentModel/decorator/ContentModelDecorator';\nexport {\n ContentModelListLevel,\n ContentModelListLevelCommon,\n ReadonlyContentModelListLevel,\n} from './contentModel/decorator/ContentModelListLevel';\n\nexport {\n Selectable,\n ReadonlySelectable,\n ShallowMutableSelectable,\n} from './contentModel/common/Selectable';\nexport { MutableMark, ShallowMutableMark, ReadonlyMark } from './contentModel/common/MutableMark';\nexport { MutableType } from './contentModel/common/MutableType';\n\nexport {\n DOMSelection,\n SelectionType,\n SelectionBase,\n ImageSelection,\n RangeSelection,\n TableSelection,\n DOMInsertPoint,\n} from './selection/DOMSelection';\nexport { InsertPoint } from './selection/InsertPoint';\nexport {\n TableSelectionContext,\n ReadonlyTableSelectionContext,\n} from './selection/TableSelectionContext';\nexport { TableSelectionCoordinates } from './selection/TableSelectionCoordinates';\n\nexport {\n ContentModelHandlerMap,\n DefaultImplicitFormatMap,\n FormatAppliers,\n FormatAppliersPerCategory,\n OnNodeCreated,\n ModelToDomSettings,\n FormatApplier,\n ApplyMetadata,\n MetadataApplier,\n MetadataAppliers,\n TextFormatApplier,\n ElementFormatAppliersPerCategory,\n} from './context/ModelToDomSettings';\nexport {\n DefaultStyleMap,\n ElementProcessorMap,\n FormatParsers,\n FormatParsersPerCategory,\n DomToModelSettings,\n FormatParser,\n TextFormatParser,\n ElementFormatParserPerCategory,\n} from './context/DomToModelSettings';\nexport { DomToModelContext } from './context/DomToModelContext';\nexport { ElementProcessor } from './context/ElementProcessor';\nexport { DomToModelSelectionContext } from './context/DomToModelSelectionContext';\nexport { EditorContext } from './context/EditorContext';\nexport {\n DomToModelFormatContext,\n DomToModelDecoratorContext,\n DomToModelListFormat,\n} from './context/DomToModelFormatContext';\nexport { ModelToDomContext } from './context/ModelToDomContext';\nexport {\n ModelToDomBlockAndSegmentNode,\n ModelToDomRegularSelection,\n ModelToDomSelectionContext,\n} from './context/ModelToDomSelectionContext';\nexport {\n ModelToDomListStackItem,\n ModelToDomListContext,\n ModelToDomFormatContext,\n} from './context/ModelToDomFormatContext';\nexport { RewriteFromModel, RewriteFromModelContext } from './context/RewriteFromModel';\nexport {\n ContentModelHandler,\n ContentModelSegmentHandler,\n ContentModelBlockHandler,\n} from './context/ContentModelHandler';\nexport {\n DomToModelOption,\n DomToModelOptionForSanitizing,\n DomToModelOptionForCreateModel,\n} from './context/DomToModelOption';\nexport { ModelToDomOption } from './context/ModelToDomOption';\nexport { DomIndexer } from './context/DomIndexer';\nexport { TextMutationObserver } from './context/TextMutationObserver';\n\nexport { DefinitionType } from './metadata/DefinitionType';\nexport {\n ArrayItemType,\n DefinitionBase,\n StringDefinition,\n NumberDefinition,\n BooleanDefinition,\n ArrayDefinition,\n ObjectPropertyDefinition,\n ObjectDefinition,\n Definition,\n} from './metadata/Definition';\nexport { DarkColorHandler, Colors, ColorTransformFunction } from './context/DarkColorHandler';\n\nexport { IEditor } from './editor/IEditor';\nexport { ExperimentalFeature } from './editor/ExperimentalFeature';\nexport {\n EditorOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions,\n EditorBaseOptions,\n} from './editor/EditorOptions';\nexport {\n CreateContentModel,\n CreateEditorContext,\n GetDOMSelection,\n SetContentModel,\n SetDOMSelection,\n SetLogicalRoot,\n FormatContentModel,\n CoreApiMap,\n EditorCore,\n SwitchShadowEdit,\n TriggerEvent,\n AddUndoSnapshot,\n Focus,\n AttachDomEvent,\n RestoreUndoSnapshot,\n GetVisibleViewport,\n SetEditorStyle,\n Announce,\n} from './editor/EditorCore';\nexport { EditorCorePlugins } from './editor/EditorCorePlugins';\nexport { EditorPlugin } from './editor/EditorPlugin';\nexport { PluginWithState } from './editor/PluginWithState';\nexport { ContextMenuProvider } from './editor/ContextMenuProvider';\n\nexport {\n CachePluginState,\n RangeSelectionForCache,\n CacheSelection,\n} from './pluginState/CachePluginState';\nexport { FormatPluginState, PendingFormat } from './pluginState/FormatPluginState';\nexport { CopyPastePluginState } from './pluginState/CopyPastePluginState';\nexport { DOMEventPluginState } from './pluginState/DOMEventPluginState';\nexport { LifecyclePluginState } from './pluginState/LifecyclePluginState';\nexport { EntityPluginState, KnownEntityItem } from './pluginState/EntityPluginState';\nexport {\n SelectionPluginState,\n TableSelectionInfo,\n TableCellCoordinate,\n} from './pluginState/SelectionPluginState';\nexport { UndoPluginState } from './pluginState/UndoPluginState';\nexport {\n PluginKey,\n KeyOfStatePlugin,\n TypeOfStatePlugin,\n StatePluginKeys,\n GenericPluginState,\n PluginState,\n} from './pluginState/PluginState';\nexport { ContextMenuPluginState } from './pluginState/ContextMenuPluginState';\n\nexport { AutoLinkOptions } from './parameter/AutoLinkOptions';\nexport { EditorEnvironment, ContentModelSettings } from './parameter/EditorEnvironment';\nexport {\n EntityState,\n DeletedEntity,\n FormatContentModelContext,\n} from './parameter/FormatContentModelContext';\nexport {\n FormatContentModelOptions,\n ContentModelFormatter,\n} from './parameter/FormatContentModelOptions';\nexport { ContentModelFormatState } from './parameter/ContentModelFormatState';\nexport { PasteTypeOrGetter } from './parameter/PasteTypeOrGetter';\nexport { ImageFormatState } from './parameter/ImageFormatState';\nexport { Border } from './parameter/Border';\nexport { InsertEntityOptions } from './parameter/InsertEntityOptions';\nexport {\n DeleteSelectionContext,\n DeleteSelectionResult,\n DeleteSelectionStep,\n ValidDeleteSelectionContext,\n} from './parameter/DeleteSelectionStep';\nexport {\n SnapshotSelectionBase,\n RangeSnapshotSelection,\n ImageSnapshotSelection,\n TableSnapshotSelection,\n SnapshotSelection,\n Snapshot,\n Snapshots,\n} from './parameter/Snapshot';\nexport { SnapshotsManager } from './parameter/SnapshotsManager';\nexport { DOMEventHandlerFunction, DOMEventRecord } from './parameter/DOMEventRecord';\nexport { EdgeLinkPreview } from './parameter/EdgeLinkPreview';\nexport { ClipboardData } from './parameter/ClipboardData';\nexport { AnnounceData, KnownAnnounceStrings } from './parameter/AnnounceData';\nexport {\n TrustedHTMLHandler,\n DOMCreator,\n LegacyTrustedHTMLHandler,\n} from './parameter/TrustedHTMLHandler';\nexport { Rect } from './parameter/Rect';\nexport { ValueSanitizer } from './parameter/ValueSanitizer';\nexport { DOMHelper } from './parameter/DOMHelper';\nexport { ImageEditOperation, ImageEditor } from './parameter/ImageEditor';\nexport { CachedElementHandler, CloneModelOptions } from './parameter/CloneModelOptions';\nexport { LinkData } from './parameter/LinkData';\nexport { MergeModelOption } from './parameter/MergeModelOption';\nexport {\n IterateSelectionsCallback,\n IterateSelectionsOption,\n ReadonlyIterateSelectionsCallback,\n} from './parameter/IterateSelectionsOption';\nexport { NodeTypeMap } from './parameter/NodeTypeMap';\nexport { TypeOfBlockGroup } from './parameter/TypeOfBlockGroup';\nexport { OperationalBlocks, ReadonlyOperationalBlocks } from './parameter/OperationalBlocks';\nexport { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';\nexport {\n ModelToTextCallback,\n ModelToTextCallbacks,\n ModelToTextChecker,\n} from './parameter/ModelToTextCallbacks';\nexport { ConflictFormatSolution } from './parameter/ConflictFormatSolution';\nexport { ParagraphMap, ParagraphIndexer } from './parameter/ParagraphMap';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';\nexport { BeforeSetContentEvent } from './event/BeforeSetContentEvent';\nexport { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';\nexport { ContextMenuEvent } from './event/ContextMenuEvent';\nexport { RewriteFromModelEvent } from './event/RewriteFromModelEvent';\nexport { EditImageEvent } from './event/EditImageEvent';\nexport { EditorReadyEvent } from './event/EditorReadyEvent';\nexport { EntityOperationEvent, FormattableRoot, Entity } from './event/EntityOperationEvent';\nexport { ExtractContentWithDomEvent } from './event/ExtractContentWithDomEvent';\nexport { EditorInputEvent } from './event/EditorInputEvent';\nexport {\n KeyDownEvent,\n KeyPressEvent,\n KeyUpEvent,\n CompositionEndEvent,\n} from './event/KeyboardEvent';\nexport {\n BeforeLogicalRootChangeEvent,\n LogicalRootChangedEvent,\n} from './event/LogicalRootChangedEvent';\nexport { MouseDownEvent, MouseUpEvent, DoubleClickEvent } from './event/MouseEvent';\nexport { PluginEvent } from './event/PluginEvent';\nexport {\n PluginEventData,\n PluginEventFromTypeGeneric,\n PluginEventFromType,\n PluginEventDataGeneric,\n} from './event/PluginEventData';\nexport { PluginEventType } from './event/PluginEventType';\nexport { ScrollEvent } from './event/ScrollEvent';\nexport { SelectionChangedEvent } from './event/SelectionChangedEvent';\nexport { EnterShadowEditEvent, LeaveShadowEditEvent } from './event/ShadowEditEvent';\nexport { ZoomChangedEvent } from './event/ZoomChangedEvent';\nexport { PointerDownEvent, PointerUpEvent } from './event/PointerEvent';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-types/lib/index.ts"],"names":[],"mappings":"","sourcesContent":["export { ContentModelSegmentFormat } from './contentModel/format/ContentModelSegmentFormat';\nexport {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from './contentModel/format/ContentModelWithFormat';\nexport { ContentModelTableFormat } from './contentModel/format/ContentModelTableFormat';\nexport {\n ContentModelWithDataset,\n ReadonlyContentModelWithDataset,\n ShallowMutableContentModelWithDataset,\n} from './contentModel/format/ContentModelWithDataset';\nexport { ContentModelBlockFormat } from './contentModel/format/ContentModelBlockFormat';\nexport { ContentModelTableCellFormat } from './contentModel/format/ContentModelTableCellFormat';\nexport { ContentModelListItemFormat } from './contentModel/format/ContentModelListItemFormat';\nexport { ContentModelListItemLevelFormat } from './contentModel/format/ContentModelListItemLevelFormat';\nexport { ContentModelHyperLinkFormat } from './contentModel/format/ContentModelHyperLinkFormat';\nexport { ContentModelCodeFormat } from './contentModel/format/ContentModelCodeFormat';\nexport { ContentModelFormatContainerFormat } from './contentModel/format/ContentModelFormatContainerFormat';\nexport { ContentModelDividerFormat } from './contentModel/format/ContentModelDividerFormat';\nexport { ContentModelFormatBase } from './contentModel/format/ContentModelFormatBase';\nexport { ContentModelFormatMap } from './contentModel/format/ContentModelFormatMap';\nexport { ContentModelImageFormat } from './contentModel/format/ContentModelImageFormat';\nexport { ContentModelEntityFormat } from './contentModel/format/ContentModelEntityFormat';\nexport { FormatHandlerTypeMap, FormatKey } from './contentModel/format/FormatHandlerTypeMap';\n\nexport { AriaFormat } from './contentModel/format/formatParts/AriaFormat';\nexport { BackgroundColorFormat } from './contentModel/format/formatParts/BackgroundColorFormat';\nexport { BoldFormat } from './contentModel/format/formatParts/BoldFormat';\nexport { FontFamilyFormat } from './contentModel/format/formatParts/FontFamilyFormat';\nexport { FontSizeFormat } from './contentModel/format/formatParts/FontSizeFormat';\nexport { ItalicFormat } from './contentModel/format/formatParts/ItalicFormat';\nexport { LetterSpacingFormat } from './contentModel/format/formatParts/LetterSpacingFormat';\nexport { LineHeightFormat } from './contentModel/format/formatParts/LineHeightFormat';\nexport { StrikeFormat } from './contentModel/format/formatParts/StrikeFormat';\nexport { SuperOrSubScriptFormat } from './contentModel/format/formatParts/SuperOrSubScriptFormat';\nexport { TextColorFormat } from './contentModel/format/formatParts/TextColorFormat';\nexport { UnderlineFormat } from './contentModel/format/formatParts/UnderlineFormat';\nexport { BorderBoxFormat } from './contentModel/format/formatParts/BorderBoxFormat';\nexport { VerticalAlignFormat } from './contentModel/format/formatParts/VerticalAlignFormat';\nexport { WordBreakFormat } from './contentModel/format/formatParts/WordBreakFormat';\nexport { BorderFormat } from './contentModel/format/formatParts/BorderFormat';\nexport { DirectionFormat } from './contentModel/format/formatParts/DirectionFormat';\nexport { HtmlAlignFormat } from './contentModel/format/formatParts/HtmlAlignFormat';\nexport { MarginFormat } from './contentModel/format/formatParts/MarginFormat';\nexport { PaddingFormat } from './contentModel/format/formatParts/PaddingFormat';\nexport { TextAlignFormat } from './contentModel/format/formatParts/TextAlignFormat';\nexport { TextIndentFormat } from './contentModel/format/formatParts/TextIndentFormat';\nexport { WhiteSpaceFormat } from './contentModel/format/formatParts/WhiteSpaceFormat';\nexport { DisplayFormat } from './contentModel/format/formatParts/DisplayFormat';\nexport { IdFormat } from './contentModel/format/formatParts/IdFormat';\nexport { SpacingFormat } from './contentModel/format/formatParts/SpacingFormat';\nexport { TableLayoutFormat } from './contentModel/format/formatParts/TableLayoutFormat';\nexport { LinkFormat } from './contentModel/format/formatParts/LinkFormat';\nexport { SizeFormat } from './contentModel/format/formatParts/SizeFormat';\nexport { BoxShadowFormat } from './contentModel/format/formatParts/BoxShadowFormat';\nexport { ListThreadFormat } from './contentModel/format/formatParts/ListThreadFormat';\nexport { ListStyleFormat } from './contentModel/format/formatParts/ListStyleFormat';\nexport { FloatFormat } from './contentModel/format/formatParts/FloatFormat';\nexport { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';\nexport { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';\nexport { ImageStateFormat } from './contentModel/format/formatParts/ImageStateFormat';\nexport { RoleFormat } from './contentModel/format/formatParts/RoleFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';\nexport {\n ImageResizeMetadataFormat,\n ImageCropMetadataFormat,\n ImageMetadataFormat,\n ImageRotateMetadataFormat,\n ImageFlipMetadataFormat,\n} from './contentModel/format/metadata/ImageMetadataFormat';\nexport { TableCellMetadataFormat } from './contentModel/format/metadata/TableCellMetadataFormat';\n\nexport { ContentModelBlockGroupType } from './contentModel/blockGroup/BlockGroupType';\nexport { ContentModelBlockType } from './contentModel/block/BlockType';\nexport { ContentModelSegmentType } from './contentModel/segment/SegmentType';\n\nexport {\n EntityLifecycleOperation,\n EntityOperation,\n EntityRemovalOperation,\n EntityFormatOperation,\n} from './enum/EntityOperation';\nexport {\n TableOperation,\n TableVerticalInsertOperation,\n TableHorizontalInsertOperation,\n TableDeleteOperation,\n TableVerticalMergeOperation,\n TableHorizontalMergeOperation,\n TableCellMergeOperation,\n TableSplitOperation,\n TableAlignOperation,\n TableCellHorizontalAlignOperation,\n TableCellVerticalAlignOperation,\n} from './enum/TableOperation';\nexport { PasteType } from './enum/PasteType';\nexport { BorderOperations } from './enum/BorderOperations';\nexport { DeleteResult } from './enum/DeleteResult';\nexport { InsertEntityPosition } from './enum/InsertEntityPosition';\nexport { ExportContentMode } from './enum/ExportContentMode';\n\nexport {\n ContentModelBlock,\n ReadonlyContentModelBlock,\n ShallowMutableContentModelBlock,\n} from './contentModel/block/ContentModelBlock';\nexport {\n ContentModelParagraph,\n ContentModelParagraphCommon,\n ReadonlyContentModelParagraph,\n ShallowMutableContentModelParagraph,\n} from './contentModel/block/ContentModelParagraph';\nexport {\n ContentModelTable,\n ReadonlyContentModelTable,\n ShallowMutableContentModelTable,\n} from './contentModel/block/ContentModelTable';\nexport {\n ContentModelDivider,\n ContentModelDividerCommon,\n ReadonlyContentModelDivider,\n} from './contentModel/block/ContentModelDivider';\nexport {\n ContentModelBlockBase,\n ContentModelBlockBaseCommon,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from './contentModel/block/ContentModelBlockBase';\nexport { ContentModelBlockWithCache } from './contentModel/common/ContentModelBlockWithCache';\nexport {\n ContentModelTableRow,\n ContentModelTableRowCommon,\n ReadonlyContentModelTableRow,\n ShallowMutableContentModelTableRow,\n} from './contentModel/block/ContentModelTableRow';\n\nexport { ContentModelEntity } from './contentModel/entity/ContentModelEntity';\n\nexport {\n ContentModelDocument,\n ContentModelDocumentCommon,\n ReadonlyContentModelDocument,\n ShallowMutableContentModelDocument,\n} from './contentModel/blockGroup/ContentModelDocument';\nexport {\n ContentModelBlockGroupBase,\n ContentModelBlockGroupBaseCommon,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './contentModel/blockGroup/ContentModelBlockGroupBase';\nexport {\n ContentModelFormatContainer,\n ContentModelFormatContainerCommon,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from './contentModel/blockGroup/ContentModelFormatContainer';\nexport {\n ContentModelGeneralBlock,\n ContentModelGeneralBlockCommon,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from './contentModel/blockGroup/ContentModelGeneralBlock';\nexport {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from './contentModel/blockGroup/ContentModelListItem';\nexport {\n ContentModelTableCell,\n ContentModelTableCellCommon,\n ReadonlyContentModelTableCell,\n ShallowMutableContentModelTableCell,\n} from './contentModel/blockGroup/ContentModelTableCell';\nexport {\n ContentModelBlockGroup,\n ReadonlyContentModelBlockGroup,\n ShallowMutableContentModelBlockGroup,\n} from './contentModel/blockGroup/ContentModelBlockGroup';\n\nexport { ContentModelBr, ReadonlyContentModelBr } from './contentModel/segment/ContentModelBr';\nexport {\n ContentModelGeneralSegment,\n ReadonlyContentModelGeneralSegment,\n ShallowMutableContentModelGeneralSegment,\n} from './contentModel/segment/ContentModelGeneralSegment';\nexport {\n ContentModelImage,\n ContentModelImageCommon,\n ReadonlyContentModelImage,\n} from './contentModel/segment/ContentModelImage';\nexport {\n ContentModelText,\n ContentModelTextCommon,\n ReadonlyContentModelText,\n} from './contentModel/segment/ContentModelText';\nexport {\n ContentModelSelectionMarker,\n ReadonlyContentModelSelectionMarker,\n} from './contentModel/segment/ContentModelSelectionMarker';\nexport {\n ContentModelSegmentBase,\n ContentModelSegmentBaseCommon,\n ReadonlyContentModelSegmentBase,\n ShallowMutableContentModelSegmentBase,\n} from './contentModel/segment/ContentModelSegmentBase';\nexport {\n ContentModelSegment,\n ReadonlyContentModelSegment,\n ShallowMutableContentModelSegment,\n} from './contentModel/segment/ContentModelSegment';\n\nexport {\n ContentModelCode,\n ReadonlyContentModelCode,\n} from './contentModel/decorator/ContentModelCode';\nexport {\n ContentModelLink,\n ReadonlyContentModelLink,\n} from './contentModel/decorator/ContentModelLink';\nexport {\n ContentModelParagraphDecorator,\n ContentModelParagraphDecoratorCommon,\n ReadonlyContentModelParagraphDecorator,\n} from './contentModel/decorator/ContentModelParagraphDecorator';\nexport {\n ContentModelDecorator,\n ReadonlyContentModelDecorator,\n} from './contentModel/decorator/ContentModelDecorator';\nexport {\n ContentModelListLevel,\n ContentModelListLevelCommon,\n ReadonlyContentModelListLevel,\n} from './contentModel/decorator/ContentModelListLevel';\n\nexport {\n Selectable,\n ReadonlySelectable,\n ShallowMutableSelectable,\n} from './contentModel/common/Selectable';\nexport { MutableMark, ShallowMutableMark, ReadonlyMark } from './contentModel/common/MutableMark';\nexport { MutableType } from './contentModel/common/MutableType';\n\nexport {\n DOMSelection,\n SelectionType,\n SelectionBase,\n ImageSelection,\n RangeSelection,\n TableSelection,\n DOMInsertPoint,\n} from './selection/DOMSelection';\nexport { InsertPoint } from './selection/InsertPoint';\nexport {\n TableSelectionContext,\n ReadonlyTableSelectionContext,\n} from './selection/TableSelectionContext';\nexport { TableSelectionCoordinates } from './selection/TableSelectionCoordinates';\n\nexport {\n ContentModelHandlerMap,\n DefaultImplicitFormatMap,\n FormatAppliers,\n FormatAppliersPerCategory,\n OnNodeCreated,\n ModelToDomSettings,\n FormatApplier,\n ApplyMetadata,\n MetadataApplier,\n MetadataAppliers,\n TextFormatApplier,\n ElementFormatAppliersPerCategory,\n} from './context/ModelToDomSettings';\nexport {\n DefaultStyleMap,\n ElementProcessorMap,\n FormatParsers,\n FormatParsersPerCategory,\n DomToModelSettings,\n FormatParser,\n TextFormatParser,\n ElementFormatParserPerCategory,\n} from './context/DomToModelSettings';\nexport { DomToModelContext } from './context/DomToModelContext';\nexport { ElementProcessor } from './context/ElementProcessor';\nexport { DomToModelSelectionContext } from './context/DomToModelSelectionContext';\nexport { EditorContext } from './context/EditorContext';\nexport {\n DomToModelFormatContext,\n DomToModelDecoratorContext,\n DomToModelListFormat,\n} from './context/DomToModelFormatContext';\nexport { ModelToDomContext } from './context/ModelToDomContext';\nexport {\n ModelToDomBlockAndSegmentNode,\n ModelToDomRegularSelection,\n ModelToDomSelectionContext,\n} from './context/ModelToDomSelectionContext';\nexport {\n ModelToDomListStackItem,\n ModelToDomListContext,\n ModelToDomFormatContext,\n} from './context/ModelToDomFormatContext';\nexport { RewriteFromModel, RewriteFromModelContext } from './context/RewriteFromModel';\nexport {\n ContentModelHandler,\n ContentModelSegmentHandler,\n ContentModelBlockHandler,\n} from './context/ContentModelHandler';\nexport {\n DomToModelOption,\n DomToModelOptionForSanitizing,\n DomToModelOptionForCreateModel,\n} from './context/DomToModelOption';\nexport { ModelToDomOption } from './context/ModelToDomOption';\nexport { DomIndexer } from './context/DomIndexer';\nexport { TextMutationObserver } from './context/TextMutationObserver';\n\nexport { DefinitionType } from './metadata/DefinitionType';\nexport {\n ArrayItemType,\n DefinitionBase,\n StringDefinition,\n NumberDefinition,\n BooleanDefinition,\n ArrayDefinition,\n ObjectPropertyDefinition,\n ObjectDefinition,\n Definition,\n} from './metadata/Definition';\nexport { DarkColorHandler, Colors, ColorTransformFunction } from './context/DarkColorHandler';\n\nexport { IEditor } from './editor/IEditor';\nexport { ExperimentalFeature, GraduatedExperimentalFeature } from './editor/ExperimentalFeature';\nexport {\n EditorOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions,\n EditorBaseOptions,\n} from './editor/EditorOptions';\nexport {\n CreateContentModel,\n CreateEditorContext,\n GetDOMSelection,\n SetContentModel,\n SetDOMSelection,\n SetLogicalRoot,\n FormatContentModel,\n CoreApiMap,\n EditorCore,\n SwitchShadowEdit,\n TriggerEvent,\n AddUndoSnapshot,\n Focus,\n AttachDomEvent,\n RestoreUndoSnapshot,\n GetVisibleViewport,\n SetEditorStyle,\n Announce,\n} from './editor/EditorCore';\nexport { EditorCorePlugins } from './editor/EditorCorePlugins';\nexport { EditorPlugin } from './editor/EditorPlugin';\nexport { PluginWithState } from './editor/PluginWithState';\nexport { ContextMenuProvider } from './editor/ContextMenuProvider';\n\nexport {\n CachePluginState,\n RangeSelectionForCache,\n CacheSelection,\n} from './pluginState/CachePluginState';\nexport { FormatPluginState, PendingFormat } from './pluginState/FormatPluginState';\nexport { CopyPastePluginState } from './pluginState/CopyPastePluginState';\nexport { DOMEventPluginState } from './pluginState/DOMEventPluginState';\nexport { LifecyclePluginState } from './pluginState/LifecyclePluginState';\nexport { EntityPluginState, KnownEntityItem } from './pluginState/EntityPluginState';\nexport {\n SelectionPluginState,\n TableSelectionInfo,\n TableCellCoordinate,\n} from './pluginState/SelectionPluginState';\nexport { UndoPluginState } from './pluginState/UndoPluginState';\nexport {\n PluginKey,\n KeyOfStatePlugin,\n TypeOfStatePlugin,\n StatePluginKeys,\n GenericPluginState,\n PluginState,\n} from './pluginState/PluginState';\nexport { ContextMenuPluginState } from './pluginState/ContextMenuPluginState';\n\nexport { AutoLinkOptions } from './parameter/AutoLinkOptions';\nexport { EditorEnvironment, ContentModelSettings } from './parameter/EditorEnvironment';\nexport {\n EntityState,\n DeletedEntity,\n FormatContentModelContext,\n} from './parameter/FormatContentModelContext';\nexport {\n FormatContentModelOptions,\n ContentModelFormatter,\n} from './parameter/FormatContentModelOptions';\nexport { ContentModelFormatState } from './parameter/ContentModelFormatState';\nexport { PasteTypeOrGetter } from './parameter/PasteTypeOrGetter';\nexport { ImageFormatState } from './parameter/ImageFormatState';\nexport { Border } from './parameter/Border';\nexport { InsertEntityOptions } from './parameter/InsertEntityOptions';\nexport {\n DeleteSelectionContext,\n DeleteSelectionResult,\n DeleteSelectionStep,\n ValidDeleteSelectionContext,\n} from './parameter/DeleteSelectionStep';\nexport {\n SnapshotSelectionBase,\n RangeSnapshotSelection,\n ImageSnapshotSelection,\n TableSnapshotSelection,\n SnapshotSelection,\n Snapshot,\n Snapshots,\n} from './parameter/Snapshot';\nexport { SnapshotsManager } from './parameter/SnapshotsManager';\nexport { DOMEventHandlerFunction, DOMEventRecord } from './parameter/DOMEventRecord';\nexport { EdgeLinkPreview } from './parameter/EdgeLinkPreview';\nexport { ClipboardData } from './parameter/ClipboardData';\nexport { AnnounceData, KnownAnnounceStrings } from './parameter/AnnounceData';\nexport { AnnouncingOption } from './parameter/AnnouncingOption';\nexport {\n TrustedHTMLHandler,\n DOMCreator,\n LegacyTrustedHTMLHandler,\n} from './parameter/TrustedHTMLHandler';\nexport { Rect } from './parameter/Rect';\nexport { ValueSanitizer } from './parameter/ValueSanitizer';\nexport { DOMHelper } from './parameter/DOMHelper';\nexport { ImageEditOperation, ImageEditor } from './parameter/ImageEditor';\nexport { CachedElementHandler, CloneModelOptions } from './parameter/CloneModelOptions';\nexport { LinkData } from './parameter/LinkData';\nexport { MergeModelOption } from './parameter/MergeModelOption';\nexport {\n IterateSelectionsCallback,\n IterateSelectionsOption,\n ReadonlyIterateSelectionsCallback,\n} from './parameter/IterateSelectionsOption';\nexport { NodeTypeMap } from './parameter/NodeTypeMap';\nexport { TypeOfBlockGroup } from './parameter/TypeOfBlockGroup';\nexport { OperationalBlocks, ReadonlyOperationalBlocks } from './parameter/OperationalBlocks';\nexport { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';\nexport {\n ModelToTextCallback,\n ModelToTextCallbacks,\n ModelToTextChecker,\n} from './parameter/ModelToTextCallbacks';\nexport { ConflictFormatSolution } from './parameter/ConflictFormatSolution';\nexport { ParagraphMap, ParagraphIndexer } from './parameter/ParagraphMap';\nexport { TextAndHtmlContentForCopy } from './parameter/TextAndHtmlContentForCopy';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';\nexport { BeforeSetContentEvent } from './event/BeforeSetContentEvent';\nexport { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';\nexport { ContextMenuEvent } from './event/ContextMenuEvent';\nexport { RewriteFromModelEvent } from './event/RewriteFromModelEvent';\nexport { EditImageEvent } from './event/EditImageEvent';\nexport { EditorReadyEvent } from './event/EditorReadyEvent';\nexport { EntityOperationEvent, FormattableRoot, Entity } from './event/EntityOperationEvent';\nexport { ExtractContentWithDomEvent } from './event/ExtractContentWithDomEvent';\nexport { EditorInputEvent } from './event/EditorInputEvent';\nexport {\n KeyDownEvent,\n KeyPressEvent,\n KeyUpEvent,\n CompositionEndEvent,\n} from './event/KeyboardEvent';\nexport {\n BeforeLogicalRootChangeEvent,\n LogicalRootChangedEvent,\n} from './event/LogicalRootChangedEvent';\nexport { MouseDownEvent, MouseUpEvent, DoubleClickEvent } from './event/MouseEvent';\nexport { PluginEvent } from './event/PluginEvent';\nexport {\n PluginEventData,\n PluginEventFromTypeGeneric,\n PluginEventFromType,\n PluginEventDataGeneric,\n} from './event/PluginEventData';\nexport { PluginEventType } from './event/PluginEventType';\nexport { ScrollEvent } from './event/ScrollEvent';\nexport { SelectionChangedEvent } from './event/SelectionChangedEvent';\nexport { EnterShadowEditEvent, LeaveShadowEditEvent } from './event/ShadowEditEvent';\nexport { ZoomChangedEvent } from './event/ZoomChangedEvent';\nexport { PointerDownEvent, PointerUpEvent } from './event/PointerEvent';\nexport { FindResultChangedEvent } from './event/FindResultChangedEvent';\n"]}
@@ -18,7 +18,44 @@ export declare type KnownAnnounceStrings =
18
18
  /**
19
19
  * String announced when cursor is moved to the last cell in a table
20
20
  */
21
- | 'announceOnFocusLastCell';
21
+ | 'announceOnFocusLastCell'
22
+ /**
23
+ * String announced when bold formatting is applied
24
+ */
25
+ | 'announceBoldOn'
26
+ /**
27
+ * String announced when bold formatting is removed
28
+ */
29
+ | 'announceBoldOff'
30
+ /**
31
+ * String announced when italic formatting is applied
32
+ */
33
+ | 'announceItalicOn'
34
+ /**
35
+ * String announced when italic formatting is removed
36
+ */
37
+ | 'announceItalicOff'
38
+ /**
39
+ * String announced when underline formatting is applied
40
+ */
41
+ | 'announceUnderlineOn'
42
+ /**
43
+ * String announced when underline formatting is removed
44
+ */
45
+ | 'announceUnderlineOff'
46
+ /**
47
+ * String announced when text is selected in the editor
48
+ * @example
49
+ * {0}, selected
50
+ * Where {0} is the selected text content
51
+ */
52
+ | 'selected'
53
+ /**
54
+ * String announced when text is unselected in the editor.
55
+ * @example
56
+ * {0}, unselected
57
+ */
58
+ | 'unselected';
22
59
  /**
23
60
  * Represents data, that can be used to announce text to screen reader.
24
61
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AnnounceData.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/AnnounceData.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Known announce strings\n */\nexport type KnownAnnounceStrings =\n /**\n * String announced for a list item in a OL List\n * @example\n * Auto corrected, {0}\n * Where {0} is the new list item bullet\n */\n | 'announceListItemNumbering'\n\n /**\n * String announced for a list item in a UL List\n * @example\n * Auto corrected bullet\n */\n | 'announceListItemBullet'\n\n /**\n * String announced when cursor is moved to the last cell in a table\n */\n | 'announceOnFocusLastCell';\n\n/**\n * Represents data, that can be used to announce text to screen reader.\n */\nexport interface AnnounceData {\n /**\n * @optional Default announce strings built in Rooster\n */\n defaultStrings?: KnownAnnounceStrings;\n\n /**\n * @optional string to announce from this Content Changed event, will be the fallback value if default string\n * is not provided or if it is not found in the strings map.\n */\n text?: string;\n\n /**\n * @optional if provided, will attempt to replace {n} with each of the values inside of the array.\n */\n formatStrings?: string[];\n\n /**\n * @optional if provided, will set the ariaLive property of the announce container element to the provided value.\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live#values\n */\n ariaLiveMode?: 'assertive' | 'polite' | 'off';\n}\n"]}
1
+ {"version":3,"file":"AnnounceData.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/AnnounceData.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Known announce strings\n */\nexport type KnownAnnounceStrings =\n /**\n * String announced for a list item in a OL List\n * @example\n * Auto corrected, {0}\n * Where {0} is the new list item bullet\n */\n | 'announceListItemNumbering'\n\n /**\n * String announced for a list item in a UL List\n * @example\n * Auto corrected bullet\n */\n | 'announceListItemBullet'\n\n /**\n * String announced when cursor is moved to the last cell in a table\n */\n | 'announceOnFocusLastCell'\n\n /**\n * String announced when bold formatting is applied\n */\n | 'announceBoldOn'\n\n /**\n * String announced when bold formatting is removed\n */\n | 'announceBoldOff'\n\n /**\n * String announced when italic formatting is applied\n */\n | 'announceItalicOn'\n\n /**\n * String announced when italic formatting is removed\n */\n | 'announceItalicOff'\n\n /**\n * String announced when underline formatting is applied\n */\n | 'announceUnderlineOn'\n\n /**\n * String announced when underline formatting is removed\n */\n | 'announceUnderlineOff'\n\n /**\n * String announced when text is selected in the editor\n * @example\n * {0}, selected\n * Where {0} is the selected text content\n */\n | 'selected'\n\n /**\n * String announced when text is unselected in the editor.\n * @example\n * {0}, unselected\n */\n | 'unselected';\n\n/**\n * Represents data, that can be used to announce text to screen reader.\n */\nexport interface AnnounceData {\n /**\n * @optional Default announce strings built in Rooster\n */\n defaultStrings?: KnownAnnounceStrings;\n\n /**\n * @optional string to announce from this Content Changed event, will be the fallback value if default string\n * is not provided or if it is not found in the strings map.\n */\n text?: string;\n\n /**\n * @optional if provided, will attempt to replace {n} with each of the values inside of the array.\n */\n formatStrings?: string[];\n\n /**\n * @optional if provided, will set the ariaLive property of the announce container element to the provided value.\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live#values\n */\n ariaLiveMode?: 'assertive' | 'polite' | 'off';\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Options for announcing format changes
3
+ */
4
+ export interface AnnouncingOption {
5
+ /**
6
+ * Whether to announce the format change
7
+ */
8
+ announceFormatChange?: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AnnouncingOption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnouncingOption.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/AnnouncingOption.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Options for announcing format changes\n */\nexport interface AnnouncingOption {\n /**\n * Whether to announce the format change\n */\n announceFormatChange?: boolean;\n}\n"]}
@@ -64,6 +64,12 @@ export interface DOMHelper {
64
64
  * returns the given node
65
65
  */
66
66
  findClosestElementAncestor(node: Node, selector?: string): HTMLElement | null;
67
+ /**
68
+ * Find the closest block element ancestor from the given node within current editing scope
69
+ * @param startFrom The node to start the search from
70
+ * @returns The closest block element ancestor
71
+ */
72
+ findClosestBlockElement(startFrom: Node): HTMLElement;
67
73
  /**
68
74
  * Check if the editor has focus now
69
75
  * @returns True if the editor has focus, otherwise false
@@ -87,4 +93,13 @@ export interface DOMHelper {
87
93
  * @param darkColorHandler Optional DarkColorHandler to retrieve dark mode colors
88
94
  */
89
95
  getContainerFormat(isInDarkMode?: boolean, darkColorHandler?: DarkColorHandler): ContentModelSegmentFormat;
96
+ /**
97
+ * Get text ranges by searching for a specific text, with options to match case and whole word.
98
+ * This will only search within editable elements.
99
+ * @param text The text to search for
100
+ * @param matchCase Whether to match case
101
+ * @param wholeWord Whether to match whole word
102
+ * @returns An array of Ranges that match the search criteria
103
+ */
104
+ getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];
90
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DOMHelper.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/DOMHelper.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { DarkColorHandler } from '../context/DarkColorHandler';\n\n/**\n * A helper class to provide DOM access APIs\n */\nexport interface DOMHelper {\n /**\n * Check if the given DOM node is in editor\n * @param node The node to check\n * @param excludeRoot When pass true, the function will return false if the passed in node is the root node itself\n */\n isNodeInEditor(node: Node, excludeRoot?: boolean): boolean;\n\n /**\n * Query HTML elements in editor by tag name.\n * Be careful of this function since it will also return element under entity.\n * @param tag Tag name of the element to query\n * @returns HTML Element array of the query result\n */\n queryElements<TTag extends keyof HTMLElementTagNameMap>(\n tag: TTag\n ): HTMLElementTagNameMap[TTag][];\n\n /**\n * Query HTML elements in editor by a selector string\n * Be careful of this function since it will also return element under entity.\n * @param selector Selector string to query\n * @returns HTML Element array of the query result\n */\n queryElements(selector: string): HTMLElement[];\n\n /**\n * Get plain text content of editor using textContent property\n */\n getTextContent(): string;\n\n /**\n * Calculate current zoom scale of editor\n */\n calculateZoomScale(): number;\n\n /**\n * Set DOM attribute of editor content DIV\n * @param name Name of the attribute\n * @param value Value of the attribute\n */\n setDomAttribute(name: string, value: string | null): void;\n\n /**\n * Get DOM attribute of editor content DIV, null if there is no such attribute.\n * @param name Name of the attribute\n */\n getDomAttribute(name: string): string | null;\n\n /**\n * Get DOM style of editor content DIV\n * @param style Name of the style\n */\n getDomStyle<T extends keyof CSSStyleDeclaration>(style: T): CSSStyleDeclaration[T];\n\n /**\n * Find closest element ancestor start from the given node which matches the given selector\n * @param node Find ancestor start from this node\n * @param selector The expected selector. If null, return the first HTML Element found from start node\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\n * returns the given node\n */\n findClosestElementAncestor<T extends keyof HTMLElementTagNameMap>(\n node: Node,\n selector?: T\n ): HTMLElementTagNameMap[T] | null;\n\n /**\n * Find closest element ancestor start from the given node which matches the given selector\n * @param node Find ancestor start from this node\n * @param selector The expected selector. If null, return the first HTML Element found from start node\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\n * returns the given node\n */\n findClosestElementAncestor(node: Node, selector?: string): HTMLElement | null;\n\n /**\n * Check if the editor has focus now\n * @returns True if the editor has focus, otherwise false\n */\n hasFocus(): boolean;\n\n /**\n * Check if the root element is in RTL mode\n */\n isRightToLeft(): boolean;\n\n /**\n * Get the width of the editable area of the editor content div\n */\n getClientWidth(): number;\n\n /**\n * Get a deep cloned root element\n */\n getClonedRoot(): HTMLElement;\n\n /**\n * Get format of the container element\n * @param isInDarkMode Optional flag to indicate if the environment is in dark mode\n * @param darkColorHandler Optional DarkColorHandler to retrieve dark mode colors\n */\n getContainerFormat(\n isInDarkMode?: boolean,\n darkColorHandler?: DarkColorHandler\n ): ContentModelSegmentFormat;\n}\n"]}
1
+ {"version":3,"file":"DOMHelper.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/DOMHelper.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { DarkColorHandler } from '../context/DarkColorHandler';\n\n/**\n * A helper class to provide DOM access APIs\n */\nexport interface DOMHelper {\n /**\n * Check if the given DOM node is in editor\n * @param node The node to check\n * @param excludeRoot When pass true, the function will return false if the passed in node is the root node itself\n */\n isNodeInEditor(node: Node, excludeRoot?: boolean): boolean;\n\n /**\n * Query HTML elements in editor by tag name.\n * Be careful of this function since it will also return element under entity.\n * @param tag Tag name of the element to query\n * @returns HTML Element array of the query result\n */\n queryElements<TTag extends keyof HTMLElementTagNameMap>(\n tag: TTag\n ): HTMLElementTagNameMap[TTag][];\n\n /**\n * Query HTML elements in editor by a selector string\n * Be careful of this function since it will also return element under entity.\n * @param selector Selector string to query\n * @returns HTML Element array of the query result\n */\n queryElements(selector: string): HTMLElement[];\n\n /**\n * Get plain text content of editor using textContent property\n */\n getTextContent(): string;\n\n /**\n * Calculate current zoom scale of editor\n */\n calculateZoomScale(): number;\n\n /**\n * Set DOM attribute of editor content DIV\n * @param name Name of the attribute\n * @param value Value of the attribute\n */\n setDomAttribute(name: string, value: string | null): void;\n\n /**\n * Get DOM attribute of editor content DIV, null if there is no such attribute.\n * @param name Name of the attribute\n */\n getDomAttribute(name: string): string | null;\n\n /**\n * Get DOM style of editor content DIV\n * @param style Name of the style\n */\n getDomStyle<T extends keyof CSSStyleDeclaration>(style: T): CSSStyleDeclaration[T];\n\n /**\n * Find closest element ancestor start from the given node which matches the given selector\n * @param node Find ancestor start from this node\n * @param selector The expected selector. If null, return the first HTML Element found from start node\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\n * returns the given node\n */\n findClosestElementAncestor<T extends keyof HTMLElementTagNameMap>(\n node: Node,\n selector?: T\n ): HTMLElementTagNameMap[T] | null;\n\n /**\n * Find closest element ancestor start from the given node which matches the given selector\n * @param node Find ancestor start from this node\n * @param selector The expected selector. If null, return the first HTML Element found from start node\n * @returns An HTML element which matches the given selector. If the given start node matches the selector,\n * returns the given node\n */\n findClosestElementAncestor(node: Node, selector?: string): HTMLElement | null;\n\n /**\n * Find the closest block element ancestor from the given node within current editing scope\n * @param startFrom The node to start the search from\n * @returns The closest block element ancestor\n */\n findClosestBlockElement(startFrom: Node): HTMLElement;\n\n /**\n * Check if the editor has focus now\n * @returns True if the editor has focus, otherwise false\n */\n hasFocus(): boolean;\n\n /**\n * Check if the root element is in RTL mode\n */\n isRightToLeft(): boolean;\n\n /**\n * Get the width of the editable area of the editor content div\n */\n getClientWidth(): number;\n\n /**\n * Get a deep cloned root element\n */\n getClonedRoot(): HTMLElement;\n\n /**\n * Get format of the container element\n * @param isInDarkMode Optional flag to indicate if the environment is in dark mode\n * @param darkColorHandler Optional DarkColorHandler to retrieve dark mode colors\n */\n getContainerFormat(\n isInDarkMode?: boolean,\n darkColorHandler?: DarkColorHandler\n ): ContentModelSegmentFormat;\n\n /**\n * Get text ranges by searching for a specific text, with options to match case and whole word.\n * This will only search within editable elements.\n * @param text The text to search for\n * @param matchCase Whether to match case\n * @param wholeWord Whether to match whole word\n * @returns An array of Ranges that match the search criteria\n */\n getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];\n}\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The html and text content generated by the copy/cut action
3
+ */
4
+ export interface TextAndHtmlContentForCopy {
5
+ /**
6
+ * The HTML Content modified by the beforeCutCopy event
7
+ */
8
+ htmlContent: HTMLDivElement;
9
+ /**
10
+ * The content model modified by the beforeCutCopy event in plain text
11
+ */
12
+ textContent: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TextAndHtmlContentForCopy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextAndHtmlContentForCopy.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/TextAndHtmlContentForCopy.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The html and text content generated by the copy/cut action\n */\nexport interface TextAndHtmlContentForCopy {\n /**\n * The HTML Content modified by the beforeCutCopy event\n */\n htmlContent: HTMLDivElement;\n /**\n * The content model modified by the beforeCutCopy event in plain text\n */\n textContent: string;\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import type { TableSelectionInfo } from '../pluginState/SelectionPluginState';
1
2
  import type { TableSelectionCoordinates } from '../selection/TableSelectionCoordinates';
2
3
  /**
3
4
  * Type of DOM selection, it can be one of the 3 below:
@@ -50,6 +51,10 @@ export interface TableSelection extends TableSelectionCoordinates, SelectionBase
50
51
  * The table that this selection is representing
51
52
  */
52
53
  table: HTMLTableElement;
54
+ /**
55
+ * Table selection info
56
+ */
57
+ tableSelectionInfo?: TableSelectionInfo;
53
58
  }
54
59
  /**
55
60
  * The union type of 3 selection types
@@ -1 +1 @@
1
- {"version":3,"file":"DOMSelection.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/selection/DOMSelection.ts"],"names":[],"mappings":"","sourcesContent":["import type { TableSelectionCoordinates } from '../selection/TableSelectionCoordinates';\n\n/**\n * Type of DOM selection, it can be one of the 3 below:\n * range: A regular selection that can be represented by a DOM Range object with start and end container and offset\n * table: A table selection that can be defined using the Table element and first/last row and column number. Table selection can\n * cover multiple table cells, it does not need to be continuous, but it should be a rectangle\n * image: A image selection that can be defined with an image element. Not like a regular range selection with an image, image selection\n * is created when user single click the image, then we will show a selection border rather the blue background to show the selection\n */\nexport type SelectionType = 'range' | 'table' | 'image';\n\n/**\n * Base type of Selection\n */\nexport interface SelectionBase<T extends SelectionType> {\n /**\n * Type of this selection\n */\n type: T;\n}\n\n/**\n * A regular selection that can be represented by a DOM Range object with start and end container and offset\n */\nexport interface RangeSelection extends SelectionBase<'range'> {\n /**\n * The DOM Range of this selection\n */\n range: Range;\n\n /**\n * Whether the selection was from left to right (in document order) or\n * right to left (reverse of document order)\n */\n isReverted: boolean;\n}\n\n/**\n * image: A image selection that can be defined with an image element. Not like a regular range selection with an image, image selection\n * is created when user single click the image, then we will show a selection border rather the blue background to show the selection\n */\nexport interface ImageSelection extends SelectionBase<'image'> {\n /**\n * The image that this selection is representing\n */\n image: HTMLImageElement;\n}\n\n/**\n * A table selection that can be defined using the Table element and first/last row and column number. Table selection can\n * cover multiple table cells, it does not need to be continuous, but it should be a rectangle\n */\nexport interface TableSelection extends TableSelectionCoordinates, SelectionBase<'table'> {\n /**\n * The table that this selection is representing\n */\n table: HTMLTableElement;\n}\n\n/**\n * The union type of 3 selection types\n */\nexport type DOMSelection = RangeSelection | ImageSelection | TableSelection;\n\n/**\n * Represents an insert point from DOM selection\n */\nexport interface DOMInsertPoint {\n /**\n * The container node\n */\n node: Node;\n\n /**\n * The offset under container node\n */\n offset: number;\n}\n"]}
1
+ {"version":3,"file":"DOMSelection.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/selection/DOMSelection.ts"],"names":[],"mappings":"","sourcesContent":["import type { TableSelectionInfo } from '../pluginState/SelectionPluginState';\nimport type { TableSelectionCoordinates } from '../selection/TableSelectionCoordinates';\n\n/**\n * Type of DOM selection, it can be one of the 3 below:\n * range: A regular selection that can be represented by a DOM Range object with start and end container and offset\n * table: A table selection that can be defined using the Table element and first/last row and column number. Table selection can\n * cover multiple table cells, it does not need to be continuous, but it should be a rectangle\n * image: A image selection that can be defined with an image element. Not like a regular range selection with an image, image selection\n * is created when user single click the image, then we will show a selection border rather the blue background to show the selection\n */\nexport type SelectionType = 'range' | 'table' | 'image';\n\n/**\n * Base type of Selection\n */\nexport interface SelectionBase<T extends SelectionType> {\n /**\n * Type of this selection\n */\n type: T;\n}\n\n/**\n * A regular selection that can be represented by a DOM Range object with start and end container and offset\n */\nexport interface RangeSelection extends SelectionBase<'range'> {\n /**\n * The DOM Range of this selection\n */\n range: Range;\n\n /**\n * Whether the selection was from left to right (in document order) or\n * right to left (reverse of document order)\n */\n isReverted: boolean;\n}\n\n/**\n * image: A image selection that can be defined with an image element. Not like a regular range selection with an image, image selection\n * is created when user single click the image, then we will show a selection border rather the blue background to show the selection\n */\nexport interface ImageSelection extends SelectionBase<'image'> {\n /**\n * The image that this selection is representing\n */\n image: HTMLImageElement;\n}\n\n/**\n * A table selection that can be defined using the Table element and first/last row and column number. Table selection can\n * cover multiple table cells, it does not need to be continuous, but it should be a rectangle\n */\nexport interface TableSelection extends TableSelectionCoordinates, SelectionBase<'table'> {\n /**\n * The table that this selection is representing\n */\n table: HTMLTableElement;\n\n /**\n * Table selection info\n */\n tableSelectionInfo?: TableSelectionInfo;\n}\n\n/**\n * The union type of 3 selection types\n */\nexport type DOMSelection = RangeSelection | ImageSelection | TableSelection;\n\n/**\n * Represents an insert point from DOM selection\n */\nexport interface DOMInsertPoint {\n /**\n * The container node\n */\n node: Node;\n\n /**\n * The offset under container node\n */\n offset: number;\n}\n"]}
@@ -60,4 +60,9 @@ export interface EditorContext {
60
60
  * When set to true, size of table will be recalculated when converting from DOM to Content Model.
61
61
  */
62
62
  recalculateTableSize?: boolean | 'all' | 'selected' | 'none';
63
+ /**
64
+ * Width of the editor's editable area in pixels, excluding padding.
65
+ * This value is typically used for layout calculations such as constraining pasted image sizes.
66
+ */
67
+ editorViewWidth?: number;
63
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\nimport type { ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap;\n\n /**\n * When set to true, size of table will be recalculated when converting from DOM to Content Model.\n */\n recalculateTableSize?: boolean | 'all' | 'selected' | 'none';\n}\n"]}
1
+ {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\nimport type { ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap;\n\n /**\n * When set to true, size of table will be recalculated when converting from DOM to Content Model.\n */\n recalculateTableSize?: boolean | 'all' | 'selected' | 'none';\n\n /**\n * Width of the editor's editable area in pixels, excluding padding.\n * This value is typically used for layout calculations such as constraining pasted image sizes.\n */\n editorViewWidth?: number;\n}\n"]}
@@ -1,9 +1,7 @@
1
1
  /**
2
- * Predefined experiment features
3
- * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures
4
- * when create editor
2
+ * Predefined experiment features (Graduated, only keep them for backward compatibility)
5
3
  */
6
- export declare type ExperimentalFeature =
4
+ export declare type GraduatedExperimentalFeature =
7
5
  /**
8
6
  * @deprecated When this feature is enabled, we will persist a content model in memory as long as we can,
9
7
  * and use cached element when write back if it is not changed.
@@ -14,17 +12,23 @@ export declare type ExperimentalFeature =
14
12
  * Workaround for the Legacy Image Edit
15
13
  */
16
14
  | 'LegacyImageSelection'
17
- /**
18
- * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
19
- * Use Content Model handle ENTER key
20
- */
21
- | 'HandleEnterKey'
22
15
  /**
23
16
  * @deprecated
24
17
  * Prevent default browser behavior for copy/cut event,
25
18
  * and set the clipboard data with custom implementation.
26
19
  */
27
- | 'CustomCopyCut'
20
+ | 'CustomCopyCut';
21
+ /**
22
+ * Predefined experiment features
23
+ * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures
24
+ * when create editor
25
+ */
26
+ export declare type ExperimentalFeature = GraduatedExperimentalFeature
27
+ /**
28
+ * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
29
+ * Use Content Model handle ENTER key
30
+ */
31
+ | 'HandleEnterKey'
28
32
  /**
29
33
  * For CJK keyboard input on mobile, if the user toggles bold/italic/underline on an empty div,
30
34
  * the pending format will be applied on the selection marker. When typing text, the selection moves to the text node and the