roosterjs-content-model-types 9.51.0 → 9.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/editor/ExperimentalFeature.d.ts +13 -1
- package/lib/editor/ExperimentalFeature.js.map +1 -1
- package/lib/event/BeforePasteEvent.d.ts +11 -0
- package/lib/event/BeforePasteEvent.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/parameter/DOMHelper.d.ts +16 -0
- package/lib/parameter/DOMHelper.js.map +1 -1
- package/lib-amd/editor/ExperimentalFeature.d.ts +13 -1
- package/lib-amd/editor/ExperimentalFeature.js.map +1 -1
- package/lib-amd/event/BeforePasteEvent.d.ts +11 -0
- package/lib-amd/event/BeforePasteEvent.js.map +1 -1
- package/lib-amd/index.d.ts +1 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/parameter/DOMHelper.d.ts +16 -0
- package/lib-amd/parameter/DOMHelper.js.map +1 -1
- package/lib-mjs/editor/ExperimentalFeature.d.ts +13 -1
- package/lib-mjs/editor/ExperimentalFeature.js.map +1 -1
- package/lib-mjs/event/BeforePasteEvent.d.ts +11 -0
- package/lib-mjs/event/BeforePasteEvent.js.map +1 -1
- package/lib-mjs/index.d.ts +1 -1
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/parameter/DOMHelper.d.ts +16 -0
- package/lib-mjs/parameter/DOMHelper.js.map +1 -1
- package/package.json +1 -1
|
@@ -55,4 +55,16 @@ export declare type ExperimentalFeature = GraduatedExperimentalFeature
|
|
|
55
55
|
/**
|
|
56
56
|
* Transform the table border colors when switching from light to dark mode
|
|
57
57
|
*/
|
|
58
|
-
| 'TransformTableBorderColors'
|
|
58
|
+
| 'TransformTableBorderColors'
|
|
59
|
+
/**
|
|
60
|
+
* When the editor content div is inside a Shadow DOM, enable shadow root detection
|
|
61
|
+
* in DOMHelper so that selection, focus, and element appending work correctly within
|
|
62
|
+
* the shadow boundary.
|
|
63
|
+
*/
|
|
64
|
+
| 'ShadowDom'
|
|
65
|
+
/**
|
|
66
|
+
* Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.
|
|
67
|
+
* These characters can be used to hide text in HTML and may cause unexpected behavior.
|
|
68
|
+
* @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/
|
|
69
|
+
*/
|
|
70
|
+
| 'FilterInvisibleUnicode';
|
|
@@ -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 (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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors';\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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors'\n\n /**\n * When the editor content div is inside a Shadow DOM, enable shadow root detection\n * in DOMHelper so that selection, focus, and element appending work correctly within\n * the shadow boundary.\n */\n | 'ShadowDom'\n\n /**\n * Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.\n * These characters can be used to hide text in HTML and may cause unexpected behavior.\n * @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/\n */\n | 'FilterInvisibleUnicode';\n"]}
|
|
@@ -11,6 +11,13 @@ import type { InsertPoint } from '../selection/InsertPoint';
|
|
|
11
11
|
* @returns Insert point after merge
|
|
12
12
|
*/
|
|
13
13
|
export declare type MergePastedContentFunc = (target: ShallowMutableContentModelDocument, source: ContentModelDocument) => InsertPoint | null;
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single CSS rule parsed from a pasted document's style sheets
|
|
16
|
+
*/
|
|
17
|
+
export interface CssRule {
|
|
18
|
+
selectors: string[];
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
14
21
|
/**
|
|
15
22
|
* Data of BeforePasteEvent
|
|
16
23
|
*/
|
|
@@ -51,4 +58,8 @@ export interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {
|
|
|
51
58
|
* Whether the current clipboard contains at least a block element.
|
|
52
59
|
*/
|
|
53
60
|
readonly containsBlockElements?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Global CSS rules extracted from the pasted document's style sheets
|
|
63
|
+
*/
|
|
64
|
+
readonly globalCssRules?: CssRule[];
|
|
54
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Represents a single CSS rule parsed from a pasted document's style sheets\n */\nexport interface CssRule {\n selectors: string[];\n text: string;\n}\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n\n /**\n * Global CSS rules extracted from the pasted document's style sheets\n */\n readonly globalCssRules?: CssRule[];\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';
|
|
|
182
182
|
export { BeforeDisposeEvent } from './event/BeforeDisposeEvent';
|
|
183
183
|
export { BeforeDropEvent } from './event/BeforeDropEvent';
|
|
184
184
|
export { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';
|
|
185
|
-
export { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
185
|
+
export { BeforePasteEvent, CssRule, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
186
186
|
export { BeforeSetContentEvent } from './event/BeforeSetContentEvent';
|
|
187
187
|
export { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';
|
|
188
188
|
export { ContextMenuEvent } from './event/ContextMenuEvent';
|
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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\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"]}
|
|
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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, CssRule, 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"]}
|
|
@@ -102,4 +102,20 @@ export interface DOMHelper {
|
|
|
102
102
|
* @returns An array of Ranges that match the search criteria
|
|
103
103
|
*/
|
|
104
104
|
getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];
|
|
105
|
+
/**
|
|
106
|
+
* Get the current selection range, handling shadow DOM StaticRange conversion.
|
|
107
|
+
* Returns a live Range in all browsers.
|
|
108
|
+
*/
|
|
109
|
+
getSelectionRange(): Range | null;
|
|
110
|
+
/**
|
|
111
|
+
* Set the selection to the given range, handling browser differences for shadow DOM.
|
|
112
|
+
* @param range The range to set
|
|
113
|
+
* @param isReverted Whether the selection is reverted (focus before anchor)
|
|
114
|
+
*/
|
|
115
|
+
setSelectionRange(range: Range, isReverted?: boolean): void;
|
|
116
|
+
/**
|
|
117
|
+
* Append an element to the correct root container (shadow root or document.body)
|
|
118
|
+
* @param element The element to append
|
|
119
|
+
*/
|
|
120
|
+
appendToRoot(element: HTMLElement): void;
|
|
105
121
|
}
|
|
@@ -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 * 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"]}
|
|
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 /**\n * Get the current selection range, handling shadow DOM StaticRange conversion.\n * Returns a live Range in all browsers.\n */\n getSelectionRange(): Range | null;\n\n /**\n * Set the selection to the given range, handling browser differences for shadow DOM.\n * @param range The range to set\n * @param isReverted Whether the selection is reverted (focus before anchor)\n */\n setSelectionRange(range: Range, isReverted?: boolean): void;\n\n /**\n * Append an element to the correct root container (shadow root or document.body)\n * @param element The element to append\n */\n appendToRoot(element: HTMLElement): void;\n}\n"]}
|
|
@@ -55,4 +55,16 @@ export declare type ExperimentalFeature = GraduatedExperimentalFeature
|
|
|
55
55
|
/**
|
|
56
56
|
* Transform the table border colors when switching from light to dark mode
|
|
57
57
|
*/
|
|
58
|
-
| 'TransformTableBorderColors'
|
|
58
|
+
| 'TransformTableBorderColors'
|
|
59
|
+
/**
|
|
60
|
+
* When the editor content div is inside a Shadow DOM, enable shadow root detection
|
|
61
|
+
* in DOMHelper so that selection, focus, and element appending work correctly within
|
|
62
|
+
* the shadow boundary.
|
|
63
|
+
*/
|
|
64
|
+
| 'ShadowDom'
|
|
65
|
+
/**
|
|
66
|
+
* Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.
|
|
67
|
+
* These characters can be used to hide text in HTML and may cause unexpected behavior.
|
|
68
|
+
* @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/
|
|
69
|
+
*/
|
|
70
|
+
| 'FilterInvisibleUnicode';
|
|
@@ -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 (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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors';\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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors'\n\n /**\n * When the editor content div is inside a Shadow DOM, enable shadow root detection\n * in DOMHelper so that selection, focus, and element appending work correctly within\n * the shadow boundary.\n */\n | 'ShadowDom'\n\n /**\n * Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.\n * These characters can be used to hide text in HTML and may cause unexpected behavior.\n * @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/\n */\n | 'FilterInvisibleUnicode';\n"]}
|
|
@@ -11,6 +11,13 @@ import type { InsertPoint } from '../selection/InsertPoint';
|
|
|
11
11
|
* @returns Insert point after merge
|
|
12
12
|
*/
|
|
13
13
|
export declare type MergePastedContentFunc = (target: ShallowMutableContentModelDocument, source: ContentModelDocument) => InsertPoint | null;
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single CSS rule parsed from a pasted document's style sheets
|
|
16
|
+
*/
|
|
17
|
+
export interface CssRule {
|
|
18
|
+
selectors: string[];
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
14
21
|
/**
|
|
15
22
|
* Data of BeforePasteEvent
|
|
16
23
|
*/
|
|
@@ -51,4 +58,8 @@ export interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {
|
|
|
51
58
|
* Whether the current clipboard contains at least a block element.
|
|
52
59
|
*/
|
|
53
60
|
readonly containsBlockElements?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Global CSS rules extracted from the pasted document's style sheets
|
|
63
|
+
*/
|
|
64
|
+
readonly globalCssRules?: CssRule[];
|
|
54
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Represents a single CSS rule parsed from a pasted document's style sheets\n */\nexport interface CssRule {\n selectors: string[];\n text: string;\n}\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n\n /**\n * Global CSS rules extracted from the pasted document's style sheets\n */\n readonly globalCssRules?: CssRule[];\n}\n"]}
|
package/lib-amd/index.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';
|
|
|
182
182
|
export { BeforeDisposeEvent } from './event/BeforeDisposeEvent';
|
|
183
183
|
export { BeforeDropEvent } from './event/BeforeDropEvent';
|
|
184
184
|
export { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';
|
|
185
|
-
export { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
185
|
+
export { BeforePasteEvent, CssRule, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
186
186
|
export { BeforeSetContentEvent } from './event/BeforeSetContentEvent';
|
|
187
187
|
export { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';
|
|
188
188
|
export { ContextMenuEvent } from './event/ContextMenuEvent';
|
package/lib-amd/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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\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"]}
|
|
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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, CssRule, 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"]}
|
|
@@ -102,4 +102,20 @@ export interface DOMHelper {
|
|
|
102
102
|
* @returns An array of Ranges that match the search criteria
|
|
103
103
|
*/
|
|
104
104
|
getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];
|
|
105
|
+
/**
|
|
106
|
+
* Get the current selection range, handling shadow DOM StaticRange conversion.
|
|
107
|
+
* Returns a live Range in all browsers.
|
|
108
|
+
*/
|
|
109
|
+
getSelectionRange(): Range | null;
|
|
110
|
+
/**
|
|
111
|
+
* Set the selection to the given range, handling browser differences for shadow DOM.
|
|
112
|
+
* @param range The range to set
|
|
113
|
+
* @param isReverted Whether the selection is reverted (focus before anchor)
|
|
114
|
+
*/
|
|
115
|
+
setSelectionRange(range: Range, isReverted?: boolean): void;
|
|
116
|
+
/**
|
|
117
|
+
* Append an element to the correct root container (shadow root or document.body)
|
|
118
|
+
* @param element The element to append
|
|
119
|
+
*/
|
|
120
|
+
appendToRoot(element: HTMLElement): void;
|
|
105
121
|
}
|
|
@@ -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 * 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"]}
|
|
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 /**\n * Get the current selection range, handling shadow DOM StaticRange conversion.\n * Returns a live Range in all browsers.\n */\n getSelectionRange(): Range | null;\n\n /**\n * Set the selection to the given range, handling browser differences for shadow DOM.\n * @param range The range to set\n * @param isReverted Whether the selection is reverted (focus before anchor)\n */\n setSelectionRange(range: Range, isReverted?: boolean): void;\n\n /**\n * Append an element to the correct root container (shadow root or document.body)\n * @param element The element to append\n */\n appendToRoot(element: HTMLElement): void;\n}\n"]}
|
|
@@ -55,4 +55,16 @@ export declare type ExperimentalFeature = GraduatedExperimentalFeature
|
|
|
55
55
|
/**
|
|
56
56
|
* Transform the table border colors when switching from light to dark mode
|
|
57
57
|
*/
|
|
58
|
-
| 'TransformTableBorderColors'
|
|
58
|
+
| 'TransformTableBorderColors'
|
|
59
|
+
/**
|
|
60
|
+
* When the editor content div is inside a Shadow DOM, enable shadow root detection
|
|
61
|
+
* in DOMHelper so that selection, focus, and element appending work correctly within
|
|
62
|
+
* the shadow boundary.
|
|
63
|
+
*/
|
|
64
|
+
| 'ShadowDom'
|
|
65
|
+
/**
|
|
66
|
+
* Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.
|
|
67
|
+
* These characters can be used to hide text in HTML and may cause unexpected behavior.
|
|
68
|
+
* @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/
|
|
69
|
+
*/
|
|
70
|
+
| 'FilterInvisibleUnicode';
|
|
@@ -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 (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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors';\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 * @deprecated\n * Export editor content as HTML using HTMLFast option\n */\n | 'ExportHTMLFast'\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 * @deprecated\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\n /**\n * @deprecated\n * Allow caching list item elements.\n */\n | 'CacheList';\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 * 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 * Transform the table border colors when switching from light to dark mode\n */\n | 'TransformTableBorderColors'\n\n /**\n * When the editor content div is inside a Shadow DOM, enable shadow root detection\n * in DOMHelper so that selection, focus, and element appending work correctly within\n * the shadow boundary.\n */\n | 'ShadowDom'\n\n /**\n * Strip invisible unicode characters (U+E0000 to U+EFFFF) from text segments during DOM to Model conversion.\n * These characters can be used to hide text in HTML and may cause unexpected behavior.\n * @see https://embracethered.com/blog/posts/2024/hiding-and-finding-text-with-unicode-tags/\n */\n | 'FilterInvisibleUnicode';\n"]}
|
|
@@ -11,6 +11,13 @@ import type { InsertPoint } from '../selection/InsertPoint';
|
|
|
11
11
|
* @returns Insert point after merge
|
|
12
12
|
*/
|
|
13
13
|
export declare type MergePastedContentFunc = (target: ShallowMutableContentModelDocument, source: ContentModelDocument) => InsertPoint | null;
|
|
14
|
+
/**
|
|
15
|
+
* Represents a single CSS rule parsed from a pasted document's style sheets
|
|
16
|
+
*/
|
|
17
|
+
export interface CssRule {
|
|
18
|
+
selectors: string[];
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
14
21
|
/**
|
|
15
22
|
* Data of BeforePasteEvent
|
|
16
23
|
*/
|
|
@@ -51,4 +58,8 @@ export interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {
|
|
|
51
58
|
* Whether the current clipboard contains at least a block element.
|
|
52
59
|
*/
|
|
53
60
|
readonly containsBlockElements?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Global CSS rules extracted from the pasted document's style sheets
|
|
63
|
+
*/
|
|
64
|
+
readonly globalCssRules?: CssRule[];
|
|
54
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BeforePasteEvent.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/event/BeforePasteEvent.ts"],"names":[],"mappings":"","sourcesContent":["import type { DomToModelOptionForSanitizing } from '../context/DomToModelOption';\nimport type { PasteType } from '../enum/PasteType';\nimport type { ClipboardData } from '../parameter/ClipboardData';\nimport type { BasePluginEvent } from './BasePluginEvent';\nimport type {\n ContentModelDocument,\n ShallowMutableContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { InsertPoint } from '../selection/InsertPoint';\n\n/**\n * A function type used by merging pasted content into current Content Model\n * @param target Target Content Model to merge into\n * @param source Source Content Model to merge from\n * @returns Insert point after merge\n */\nexport type MergePastedContentFunc = (\n target: ShallowMutableContentModelDocument,\n source: ContentModelDocument\n) => InsertPoint | null;\n\n/**\n * Represents a single CSS rule parsed from a pasted document's style sheets\n */\nexport interface CssRule {\n selectors: string[];\n text: string;\n}\n\n/**\n * Data of BeforePasteEvent\n */\nexport interface BeforePasteEvent extends BasePluginEvent<'beforePaste'> {\n /**\n * An object contains all related data for pasting\n */\n readonly clipboardData: ClipboardData;\n\n /**\n * HTML Document Fragment which will be inserted into content\n */\n readonly fragment: DocumentFragment;\n\n /**\n * Stripped HTML string before \"StartFragment\" comment\n */\n readonly htmlBefore: string;\n\n /**\n * Stripped HTML string after \"EndFragment\" comment\n */\n readonly htmlAfter: string;\n\n /**\n * Attributes of the root \"HTML\" tag\n */\n readonly htmlAttributes: Record<string, string>;\n\n /**\n * Paste type option (as plain text, merge format, normal, as image)\n */\n readonly pasteType: PasteType;\n\n /**\n * domToModel Options to use when creating the content model from the paste fragment\n */\n readonly domToModelOption: DomToModelOptionForSanitizing;\n\n /**\n * customizedMerge Customized merge function to use when merging the paste fragment into the editor\n */\n customizedMerge?: MergePastedContentFunc;\n\n /**\n * Whether the current clipboard contains at least a block element.\n */\n readonly containsBlockElements?: boolean;\n\n /**\n * Global CSS rules extracted from the pasted document's style sheets\n */\n readonly globalCssRules?: CssRule[];\n}\n"]}
|
package/lib-mjs/index.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';
|
|
|
182
182
|
export { BeforeDisposeEvent } from './event/BeforeDisposeEvent';
|
|
183
183
|
export { BeforeDropEvent } from './event/BeforeDropEvent';
|
|
184
184
|
export { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';
|
|
185
|
-
export { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
185
|
+
export { BeforePasteEvent, CssRule, MergePastedContentFunc } from './event/BeforePasteEvent';
|
|
186
186
|
export { BeforeSetContentEvent } from './event/BeforeSetContentEvent';
|
|
187
187
|
export { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';
|
|
188
188
|
export { ContextMenuEvent } from './event/ContextMenuEvent';
|
package/lib-mjs/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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\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"]}
|
|
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';\nexport { LegacyTableBorderFormat } from './contentModel/format/formatParts/LegacyTableBorderFormat';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { TableSpecialCellMetadataFormat } from './contentModel/format/metadata/TableSpecialCellMetadataFormat';\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 TableCellShiftOperation,\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, ModelToDomSegmentContext } 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';\nexport { PromotedLink } from './parameter/PromotedLink';\nexport { BorderKey } from './parameter/BorderKey';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeAddUndoSnapshotEvent } from './event/BeforeAddUndoSnapshotEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeDropEvent } from './event/BeforeDropEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, CssRule, 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"]}
|
|
@@ -102,4 +102,20 @@ export interface DOMHelper {
|
|
|
102
102
|
* @returns An array of Ranges that match the search criteria
|
|
103
103
|
*/
|
|
104
104
|
getRangesByText(text: string, matchCase: boolean, wholeWord: boolean): Range[];
|
|
105
|
+
/**
|
|
106
|
+
* Get the current selection range, handling shadow DOM StaticRange conversion.
|
|
107
|
+
* Returns a live Range in all browsers.
|
|
108
|
+
*/
|
|
109
|
+
getSelectionRange(): Range | null;
|
|
110
|
+
/**
|
|
111
|
+
* Set the selection to the given range, handling browser differences for shadow DOM.
|
|
112
|
+
* @param range The range to set
|
|
113
|
+
* @param isReverted Whether the selection is reverted (focus before anchor)
|
|
114
|
+
*/
|
|
115
|
+
setSelectionRange(range: Range, isReverted?: boolean): void;
|
|
116
|
+
/**
|
|
117
|
+
* Append an element to the correct root container (shadow root or document.body)
|
|
118
|
+
* @param element The element to append
|
|
119
|
+
*/
|
|
120
|
+
appendToRoot(element: HTMLElement): void;
|
|
105
121
|
}
|
|
@@ -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 * 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"]}
|
|
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 /**\n * Get the current selection range, handling shadow DOM StaticRange conversion.\n * Returns a live Range in all browsers.\n */\n getSelectionRange(): Range | null;\n\n /**\n * Set the selection to the given range, handling browser differences for shadow DOM.\n * @param range The range to set\n * @param isReverted Whether the selection is reverted (focus before anchor)\n */\n setSelectionRange(range: Range, isReverted?: boolean): void;\n\n /**\n * Append an element to the correct root container (shadow root or document.body)\n * @param element The element to append\n */\n appendToRoot(element: HTMLElement): void;\n}\n"]}
|
package/package.json
CHANGED