roosterjs-content-model-types 9.22.0 → 9.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/lib/contentModel/format/ContentModelHyperLinkFormat.d.ts +2 -1
  2. package/lib/contentModel/format/ContentModelHyperLinkFormat.js.map +1 -1
  3. package/lib/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  4. package/lib/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  5. package/lib/contentModel/format/formatParts/UndeletableFormat.d.ts +10 -0
  6. package/lib/contentModel/format/formatParts/UndeletableFormat.js +3 -0
  7. package/lib/contentModel/format/formatParts/UndeletableFormat.js.map +1 -0
  8. package/lib/context/EditorContext.d.ts +5 -0
  9. package/lib/context/EditorContext.js.map +1 -1
  10. package/lib/editor/EditorOptions.d.ts +5 -0
  11. package/lib/editor/EditorOptions.js.map +1 -1
  12. package/lib/index.d.ts +2 -0
  13. package/lib/index.js.map +1 -1
  14. package/lib/parameter/DeleteSelectionStep.d.ts +6 -0
  15. package/lib/parameter/DeleteSelectionStep.js.map +1 -1
  16. package/lib/parameter/FormatContentModelContext.d.ts +5 -0
  17. package/lib/parameter/FormatContentModelContext.js.map +1 -1
  18. package/lib/parameter/ParagraphMap.d.ts +35 -0
  19. package/lib/parameter/ParagraphMap.js +3 -0
  20. package/lib/parameter/ParagraphMap.js.map +1 -0
  21. package/lib/pluginState/CachePluginState.d.ts +5 -0
  22. package/lib/pluginState/CachePluginState.js.map +1 -1
  23. package/lib-amd/contentModel/format/ContentModelHyperLinkFormat.d.ts +2 -1
  24. package/lib-amd/contentModel/format/ContentModelHyperLinkFormat.js.map +1 -1
  25. package/lib-amd/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  26. package/lib-amd/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  27. package/lib-amd/contentModel/format/formatParts/UndeletableFormat.d.ts +10 -0
  28. package/lib-amd/contentModel/format/formatParts/UndeletableFormat.js +5 -0
  29. package/lib-amd/contentModel/format/formatParts/UndeletableFormat.js.map +1 -0
  30. package/lib-amd/context/EditorContext.d.ts +5 -0
  31. package/lib-amd/context/EditorContext.js.map +1 -1
  32. package/lib-amd/editor/EditorOptions.d.ts +5 -0
  33. package/lib-amd/editor/EditorOptions.js.map +1 -1
  34. package/lib-amd/index.d.ts +2 -0
  35. package/lib-amd/index.js.map +1 -1
  36. package/lib-amd/parameter/DeleteSelectionStep.d.ts +6 -0
  37. package/lib-amd/parameter/DeleteSelectionStep.js.map +1 -1
  38. package/lib-amd/parameter/FormatContentModelContext.d.ts +5 -0
  39. package/lib-amd/parameter/FormatContentModelContext.js.map +1 -1
  40. package/lib-amd/parameter/ParagraphMap.d.ts +35 -0
  41. package/lib-amd/parameter/ParagraphMap.js +5 -0
  42. package/lib-amd/parameter/ParagraphMap.js.map +1 -0
  43. package/lib-amd/pluginState/CachePluginState.d.ts +5 -0
  44. package/lib-amd/pluginState/CachePluginState.js.map +1 -1
  45. package/lib-mjs/contentModel/format/ContentModelHyperLinkFormat.d.ts +2 -1
  46. package/lib-mjs/contentModel/format/ContentModelHyperLinkFormat.js.map +1 -1
  47. package/lib-mjs/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  48. package/lib-mjs/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  49. package/lib-mjs/contentModel/format/formatParts/UndeletableFormat.d.ts +10 -0
  50. package/lib-mjs/contentModel/format/formatParts/UndeletableFormat.js +2 -0
  51. package/lib-mjs/contentModel/format/formatParts/UndeletableFormat.js.map +1 -0
  52. package/lib-mjs/context/EditorContext.d.ts +5 -0
  53. package/lib-mjs/context/EditorContext.js.map +1 -1
  54. package/lib-mjs/editor/EditorOptions.d.ts +5 -0
  55. package/lib-mjs/editor/EditorOptions.js.map +1 -1
  56. package/lib-mjs/index.d.ts +2 -0
  57. package/lib-mjs/index.js.map +1 -1
  58. package/lib-mjs/parameter/DeleteSelectionStep.d.ts +6 -0
  59. package/lib-mjs/parameter/DeleteSelectionStep.js.map +1 -1
  60. package/lib-mjs/parameter/FormatContentModelContext.d.ts +5 -0
  61. package/lib-mjs/parameter/FormatContentModelContext.js.map +1 -1
  62. package/lib-mjs/parameter/ParagraphMap.d.ts +35 -0
  63. package/lib-mjs/parameter/ParagraphMap.js +2 -0
  64. package/lib-mjs/parameter/ParagraphMap.js.map +1 -0
  65. package/lib-mjs/pluginState/CachePluginState.d.ts +5 -0
  66. package/lib-mjs/pluginState/CachePluginState.js.map +1 -1
  67. package/package.json +1 -1
@@ -7,8 +7,9 @@ import type { PaddingFormat } from './formatParts/PaddingFormat';
7
7
  import type { SizeFormat } from './formatParts/SizeFormat';
8
8
  import type { TextAlignFormat } from './formatParts/TextAlignFormat';
9
9
  import type { TextColorFormat } from './formatParts/TextColorFormat';
10
+ import type { UndeletableFormat } from './formatParts/UndeletableFormat';
10
11
  import type { UnderlineFormat } from './formatParts/UnderlineFormat';
11
12
  /**
12
13
  * The format object for a hyperlink in Content Model
13
14
  */
14
- export declare type ContentModelHyperLinkFormat = LinkFormat & TextColorFormat & BackgroundColorFormat & UnderlineFormat & DisplayFormat & MarginFormat & PaddingFormat & BorderFormat & SizeFormat & TextAlignFormat;
15
+ export declare type ContentModelHyperLinkFormat = LinkFormat & TextColorFormat & BackgroundColorFormat & UnderlineFormat & DisplayFormat & MarginFormat & PaddingFormat & BorderFormat & SizeFormat & TextAlignFormat & UndeletableFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelHyperLinkFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelHyperLinkFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\n\n/**\n * The format object for a hyperlink in Content Model\n */\nexport type ContentModelHyperLinkFormat = LinkFormat &\n TextColorFormat &\n BackgroundColorFormat &\n UnderlineFormat &\n DisplayFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n SizeFormat &\n TextAlignFormat;\n"]}
1
+ {"version":3,"file":"ContentModelHyperLinkFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelHyperLinkFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { UndeletableFormat } from './formatParts/UndeletableFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\n\n/**\n * The format object for a hyperlink in Content Model\n */\nexport type ContentModelHyperLinkFormat = LinkFormat &\n TextColorFormat &\n BackgroundColorFormat &\n UnderlineFormat &\n DisplayFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n SizeFormat &\n TextAlignFormat &\n UndeletableFormat;\n"]}
@@ -29,6 +29,7 @@ import type { TableLayoutFormat } from './formatParts/TableLayoutFormat';
29
29
  import type { TextAlignFormat } from './formatParts/TextAlignFormat';
30
30
  import type { TextColorFormat } from './formatParts/TextColorFormat';
31
31
  import type { TextIndentFormat } from './formatParts/TextIndentFormat';
32
+ import type { UndeletableFormat } from './formatParts/UndeletableFormat';
32
33
  import type { UnderlineFormat } from './formatParts/UnderlineFormat';
33
34
  import type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';
34
35
  import type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';
@@ -169,6 +170,10 @@ export interface FormatHandlerTypeMap {
169
170
  * Format for TextIndentFormat
170
171
  */
171
172
  textIndent: TextIndentFormat;
173
+ /**
174
+ * Format for Undeletable link
175
+ */
176
+ undeletableLink: UndeletableFormat;
172
177
  /**
173
178
  * Format for UnderlineFormat
174
179
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FormatHandlerTypeMap.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/FormatHandlerTypeMap.ts"],"names":[],"mappings":"","sourcesContent":["import type { AriaFormat } from './formatParts/AriaFormat';\nimport type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { DatasetFormat } from './metadata/DatasetFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { EntityInfoFormat } from './formatParts/EntityInfoFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { FontFamilyFormat } from './formatParts/FontFamilyFormat';\nimport type { FontSizeFormat } from './formatParts/FontSizeFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { ItalicFormat } from './formatParts/ItalicFormat';\nimport type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { ListStyleFormat } from './formatParts/ListStyleFormat';\nimport type { ListThreadFormat } from './formatParts/ListThreadFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { SpacingFormat } from './formatParts/SpacingFormat';\nimport type { StrikeFormat } from './formatParts/StrikeFormat';\nimport type { SuperOrSubScriptFormat } from './formatParts/SuperOrSubScriptFormat';\nimport type { TableLayoutFormat } from './formatParts/TableLayoutFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\nimport type { WordBreakFormat } from './formatParts/WordBreakFormat';\n\n/**\n * Represents a record of all format handlers\n */\nexport interface FormatHandlerTypeMap {\n /**\n * Format for AriaFormat\n */\n aria: AriaFormat;\n\n /**\n * Format for BackgroundColorFormat\n */\n backgroundColor: BackgroundColorFormat;\n\n /**\n * Format for BoldFormat\n */\n bold: BoldFormat;\n\n /**\n * Format for BorderFormat\n */\n border: BorderFormat;\n\n /**\n * Format for BorderBoxFormat\n */\n borderBox: BorderBoxFormat;\n\n /**\n * Format for BoxShadowFormat\n */\n boxShadow: BoxShadowFormat;\n\n /**\n * Format for DatasetFormat\n */\n dataset: DatasetFormat;\n\n /**\n * Format for DirectionFormat\n */\n direction: DirectionFormat;\n\n /**\n * Format for DisplayFormat\n */\n display: DisplayFormat;\n\n /**\n * Format for EntityInfoFormat and IdFormat\n */\n entity: EntityInfoFormat & IdFormat;\n\n /**\n * Format for FloatFormat\n */\n float: FloatFormat;\n\n /**\n * Format for FontFamilyFormat\n */\n fontFamily: FontFamilyFormat;\n\n /**\n * Format for FontSizeFormat\n */\n fontSize: FontSizeFormat;\n\n /**\n * Format for HtmlAlignFormat\n */\n htmlAlign: HtmlAlignFormat;\n\n /**\n * Format for IdFormat\n */\n id: IdFormat;\n\n /**\n * Format for ItalicFormat\n */\n italic: ItalicFormat;\n\n /**\n * Format for LetterSpacingFormat\n */\n letterSpacing: LetterSpacingFormat;\n\n /**\n * Format for LineHeightFormat\n */\n lineHeight: LineHeightFormat;\n\n /**\n * Format for LinkFormat\n */\n link: LinkFormat;\n\n /**\n * Format for ListThreadFormat (used by list item)\n */\n listItemThread: ListThreadFormat;\n\n /**\n * Format for ListThreadFormat (used by list level)\n */\n listLevelThread: ListThreadFormat;\n\n /**\n * Format for ListStyleFormat\n */\n listStyle: ListStyleFormat;\n\n /**\n * Format for MarginFormat\n */\n margin: MarginFormat;\n\n /**\n * Format for PaddingFormat\n */\n padding: PaddingFormat;\n\n /**\n * Format for SizeFormat\n */\n size: SizeFormat;\n\n /**\n * Format for StrikeFormat\n */\n strike: StrikeFormat;\n\n /**\n * Format for SuperOrSubScriptFormat\n */\n superOrSubScript: SuperOrSubScriptFormat;\n\n /**\n * Format for TableLayout\n */\n tableLayout: TableLayoutFormat;\n\n /**\n * Format for SpacingFormat\n */\n tableSpacing: SpacingFormat;\n\n /**\n * Format for TextAlignFormat\n */\n textAlign: TextAlignFormat;\n\n /**\n * Format for TextColorFormat\n */\n textColor: TextColorFormat;\n\n /**\n * Format for TextColorFormat, for Table Cell only\n */\n textColorOnTableCell: TextColorFormat;\n\n /**\n * Format for TextIndentFormat\n */\n textIndent: TextIndentFormat;\n\n /**\n * Format for UnderlineFormat\n */\n underline: UnderlineFormat;\n\n /**\n * Format for VerticalAlignFormat\n */\n verticalAlign: VerticalAlignFormat;\n\n /**\n * Format for WhiteSpaceFormat\n */\n whiteSpace: WhiteSpaceFormat;\n\n /**\n * Format for WordBreakFormat\n */\n wordBreak: WordBreakFormat;\n}\n\n/**\n * Key of all format handler\n */\nexport type FormatKey = keyof FormatHandlerTypeMap;\n"]}
1
+ {"version":3,"file":"FormatHandlerTypeMap.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/FormatHandlerTypeMap.ts"],"names":[],"mappings":"","sourcesContent":["import type { AriaFormat } from './formatParts/AriaFormat';\nimport type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { DatasetFormat } from './metadata/DatasetFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { EntityInfoFormat } from './formatParts/EntityInfoFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { FontFamilyFormat } from './formatParts/FontFamilyFormat';\nimport type { FontSizeFormat } from './formatParts/FontSizeFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { ItalicFormat } from './formatParts/ItalicFormat';\nimport type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { ListStyleFormat } from './formatParts/ListStyleFormat';\nimport type { ListThreadFormat } from './formatParts/ListThreadFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { SpacingFormat } from './formatParts/SpacingFormat';\nimport type { StrikeFormat } from './formatParts/StrikeFormat';\nimport type { SuperOrSubScriptFormat } from './formatParts/SuperOrSubScriptFormat';\nimport type { TableLayoutFormat } from './formatParts/TableLayoutFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { UndeletableFormat } from './formatParts/UndeletableFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\nimport type { WordBreakFormat } from './formatParts/WordBreakFormat';\n\n/**\n * Represents a record of all format handlers\n */\nexport interface FormatHandlerTypeMap {\n /**\n * Format for AriaFormat\n */\n aria: AriaFormat;\n\n /**\n * Format for BackgroundColorFormat\n */\n backgroundColor: BackgroundColorFormat;\n\n /**\n * Format for BoldFormat\n */\n bold: BoldFormat;\n\n /**\n * Format for BorderFormat\n */\n border: BorderFormat;\n\n /**\n * Format for BorderBoxFormat\n */\n borderBox: BorderBoxFormat;\n\n /**\n * Format for BoxShadowFormat\n */\n boxShadow: BoxShadowFormat;\n\n /**\n * Format for DatasetFormat\n */\n dataset: DatasetFormat;\n\n /**\n * Format for DirectionFormat\n */\n direction: DirectionFormat;\n\n /**\n * Format for DisplayFormat\n */\n display: DisplayFormat;\n\n /**\n * Format for EntityInfoFormat and IdFormat\n */\n entity: EntityInfoFormat & IdFormat;\n\n /**\n * Format for FloatFormat\n */\n float: FloatFormat;\n\n /**\n * Format for FontFamilyFormat\n */\n fontFamily: FontFamilyFormat;\n\n /**\n * Format for FontSizeFormat\n */\n fontSize: FontSizeFormat;\n\n /**\n * Format for HtmlAlignFormat\n */\n htmlAlign: HtmlAlignFormat;\n\n /**\n * Format for IdFormat\n */\n id: IdFormat;\n\n /**\n * Format for ItalicFormat\n */\n italic: ItalicFormat;\n\n /**\n * Format for LetterSpacingFormat\n */\n letterSpacing: LetterSpacingFormat;\n\n /**\n * Format for LineHeightFormat\n */\n lineHeight: LineHeightFormat;\n\n /**\n * Format for LinkFormat\n */\n link: LinkFormat;\n\n /**\n * Format for ListThreadFormat (used by list item)\n */\n listItemThread: ListThreadFormat;\n\n /**\n * Format for ListThreadFormat (used by list level)\n */\n listLevelThread: ListThreadFormat;\n\n /**\n * Format for ListStyleFormat\n */\n listStyle: ListStyleFormat;\n\n /**\n * Format for MarginFormat\n */\n margin: MarginFormat;\n\n /**\n * Format for PaddingFormat\n */\n padding: PaddingFormat;\n\n /**\n * Format for SizeFormat\n */\n size: SizeFormat;\n\n /**\n * Format for StrikeFormat\n */\n strike: StrikeFormat;\n\n /**\n * Format for SuperOrSubScriptFormat\n */\n superOrSubScript: SuperOrSubScriptFormat;\n\n /**\n * Format for TableLayout\n */\n tableLayout: TableLayoutFormat;\n\n /**\n * Format for SpacingFormat\n */\n tableSpacing: SpacingFormat;\n\n /**\n * Format for TextAlignFormat\n */\n textAlign: TextAlignFormat;\n\n /**\n * Format for TextColorFormat\n */\n textColor: TextColorFormat;\n\n /**\n * Format for TextColorFormat, for Table Cell only\n */\n textColorOnTableCell: TextColorFormat;\n\n /**\n * Format for TextIndentFormat\n */\n textIndent: TextIndentFormat;\n\n /**\n * Format for Undeletable link\n */\n undeletableLink: UndeletableFormat;\n\n /**\n * Format for UnderlineFormat\n */\n underline: UnderlineFormat;\n\n /**\n * Format for VerticalAlignFormat\n */\n verticalAlign: VerticalAlignFormat;\n\n /**\n * Format for WhiteSpaceFormat\n */\n whiteSpace: WhiteSpaceFormat;\n\n /**\n * Format for WordBreakFormat\n */\n wordBreak: WordBreakFormat;\n}\n\n/**\n * Key of all format handler\n */\nexport type FormatKey = keyof FormatHandlerTypeMap;\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Format of undeletable segments
3
+ */
4
+ export declare type UndeletableFormat = {
5
+ /**
6
+ * When set to true, this link is not allowed to be deleted by deleteSelection API.
7
+ * This is used to protect links that are not allowed to be deleted by user action.
8
+ */
9
+ undeletable?: boolean;
10
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=UndeletableFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UndeletableFormat.js","sourceRoot":"","sources":["../../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/formatParts/UndeletableFormat.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Format of undeletable segments\n */\nexport type UndeletableFormat = {\n /**\n * When set to true, this link is not allowed to be deleted by deleteSelection API.\n * This is used to protect links that are not allowed to be deleted by user action.\n */\n undeletable?: boolean;\n};\n"]}
@@ -2,6 +2,7 @@ import type { DarkColorHandler } from './DarkColorHandler';
2
2
  import type { DomIndexer } from './DomIndexer';
3
3
  import type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';
4
4
  import type { PendingFormat } from '../pluginState/FormatPluginState';
5
+ import type { ParagraphMap } from '../parameter/ParagraphMap';
5
6
  /**
6
7
  * An editor context interface used by ContentModel PAI
7
8
  */
@@ -51,4 +52,8 @@ export interface EditorContext {
51
52
  * Enabled experimental features
52
53
  */
53
54
  experimentalFeatures?: ReadonlyArray<string>;
55
+ /**
56
+ * A helper class that manages a mapping from paragraph marker to paragraph object.
57
+ */
58
+ paragraphMap?: ParagraphMap;
54
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n}\n"]}
1
+ {"version":3,"file":"EditorContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/EditorContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { DarkColorHandler } from './DarkColorHandler';\nimport type { DomIndexer } from './DomIndexer';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { PendingFormat } from '../pluginState/FormatPluginState';\nimport type { ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * An editor context interface used by ContentModel PAI\n */\nexport interface EditorContext {\n /**\n * Whether current content is in dark mode\n */\n isDarkMode?: boolean;\n\n /**\n * Default format of editor\n */\n defaultFormat?: ContentModelSegmentFormat;\n\n /**\n * Pending format if any\n */\n pendingFormat?: PendingFormat;\n\n /**\n * Color manager, to help manager color in dark mode\n */\n darkColorHandler?: DarkColorHandler;\n\n /**\n * Whether to handle delimiters in Content Model\n */\n addDelimiterForEntity?: boolean;\n\n /**\n * Zoom scale number\n */\n zoomScale?: number;\n\n /**\n * Whether the content is in Right-to-left from root level\n */\n isRootRtl?: boolean;\n\n /**\n * Whether put the source element into Content Model when possible.\n * When pass true, this cached element will be used to create DOM tree back when convert Content Model to DOM\n */\n allowCacheElement?: boolean;\n\n /**\n * @optional Indexer for content model, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * Root Font size in Px.\n */\n rootFontSize?: number;\n\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: ReadonlyArray<string>;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap;\n}\n"]}
@@ -148,6 +148,11 @@ export interface EditorBaseOptions {
148
148
  * @returns A template string to announce, use placeholder such as "{0}" for variables if necessary
149
149
  */
150
150
  announcerStringGetter?: (key: KnownAnnounceStrings) => string;
151
+ /**
152
+ * Whether to enable paragraph map. Default value is false.
153
+ * Paragraph map is used to save a marker for paragraphs so it can be found even content is changed from a previous marked paragraph.
154
+ */
155
+ enableParagraphMap?: boolean;
151
156
  }
152
157
  /**
153
158
  * Options for editor
@@ -1 +1 @@
1
- {"version":3,"file":"EditorOptions.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/EditorOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PasteTypeOrGetter } from '../parameter/PasteTypeOrGetter';\nimport type { ExperimentalFeature } from './ExperimentalFeature';\nimport type { KnownAnnounceStrings } from '../parameter/AnnounceData';\nimport type { Colors, ColorTransformFunction } from '../context/DarkColorHandler';\nimport type { EditorPlugin } from './EditorPlugin';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { CoreApiMap } from './EditorCore';\nimport type { DomToModelOption } from '../context/DomToModelOption';\nimport type { ModelToDomOption } from '../context/ModelToDomOption';\nimport type {\n ContentModelDocument,\n ReadonlyContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { Snapshots } from '../parameter/Snapshot';\nimport type { TrustedHTMLHandler } from '../parameter/TrustedHTMLHandler';\n\n/**\n * Options for colors and dark mode\n */\nexport interface ColorOptions {\n /**\n * A util function to transform light mode color to dark mode color\n * Default value is to return the original light color\n */\n getDarkColor?: ColorTransformFunction;\n\n /**\n * A util function to generate color key for dark mode color.\n * By default, the color key is generated from the light mode color. For example,\n * color \"#123456\" will have the key \"--darkColor__123456\", and\n * color \"rgb(0,0,0)\" will have key \"--darkColor_rgb_0_0_0_\".\n * Pass in this function to customize this behavior.\n * The return value must be a valid CSS variable, starts with \"--\"\n */\n generateColorKey?: ColorTransformFunction;\n\n /**\n * Existing known color pairs\n */\n knownColors?: Record<string, Colors>;\n\n /**\n * Whether to skip the adjust editor process when for light/dark mode\n */\n doNotAdjustEditorColor?: boolean;\n\n /**\n * If the editor is currently in dark mode\n */\n inDarkMode?: boolean;\n}\n\n/**\n * Options for Content Model\n */\nexport interface ContentModelOptions {\n /**\n * Default options used for DOM to Content Model conversion\n */\n defaultDomToModelOptions?: DomToModelOption;\n\n /**\n * Default options used for Content Model to DOM conversion\n */\n defaultModelToDomOptions?: ModelToDomOption;\n\n /**\n * Default format of editor content. This will be applied to empty content.\n * If there is already content inside editor, format of existing content will not be changed.\n * Default value is the computed style of editor content DIV\n */\n defaultSegmentFormat?: ContentModelSegmentFormat;\n\n /**\n * An optional callback function that will be invoked before write content model back to editor.\n * This is used for make sure model can satisfy some customized requirement\n * @param model The model to fix up\n */\n onFixUpModel?: (model: ReadonlyContentModelDocument) => void;\n\n /**\n * @deprecated\n */\n disableCache?: boolean;\n}\n\n/**\n * Options for selection\n */\nexport interface SelectionOptions {\n /**\n * Color of the border of a selectedImage. Default color: '#DB626C'\n */\n imageSelectionBorderColor?: string;\n\n /**\n * Background color of a selected table cell. Default color: '#C6C6C6'\n */\n tableCellSelectionBackgroundColor?: string;\n}\n\n/**\n * Options for paste\n */\nexport interface PasteOptions {\n /**\n * Allowed custom content type when paste besides text/plain, text/html and images\n * Only text types are supported, and do not add \"text/\" prefix to the type values\n */\n allowedCustomPasteType?: string[];\n\n /**\n * Default paste type or function that returns the paste type. By default will use the normal (as-is) paste type.\n */\n defaultPasteType?: PasteTypeOrGetter;\n}\n\n/**\n * Options for editor fundamental data structure\n */\nexport interface EditorBaseOptions {\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: (ExperimentalFeature | string)[];\n\n /**\n * List of plugins.\n * The order of plugins here determines in what order each event will be dispatched.\n * Plugins not appear in this list will not be added to editor, including built-in plugins.\n * Default value is empty array.\n */\n plugins?: EditorPlugin[];\n\n /**\n * The scroll container to get scroll event from.\n * By default, the scroll container will be the same with editor content DIV\n */\n scrollContainer?: HTMLElement;\n\n /**\n * Customized trusted type handler used for sanitizing HTML string before assign to DOM tree\n * This is required when trusted-type Content-Security-Policy (CSP) is enabled.\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types\n */\n trustedHTMLHandler?: TrustedHTMLHandler;\n\n /**\n * A function map to override default core API implementation\n * Default value is null\n */\n coreApiOverride?: Partial<CoreApiMap>;\n\n /**\n * Initial Content Model\n */\n initialModel?: ContentModelDocument;\n\n /**\n * Undo snapshot. Use this parameter to provide an external storage of undo snapshots\n */\n snapshots?: Snapshots;\n\n /**\n * A callback to be invoked when any exception is thrown during disposing editor\n * @param plugin The plugin that causes exception\n * @param error The error object we got\n */\n disposeErrorHandler?: (plugin: EditorPlugin, error: Error) => void;\n\n /**\n * A callback to help get string template to announce, used for accessibility\n * @param key The key of known announce data\n * @returns A template string to announce, use placeholder such as \"{0}\" for variables if necessary\n */\n announcerStringGetter?: (key: KnownAnnounceStrings) => string;\n}\n\n/**\n * Options for editor\n */\nexport interface EditorOptions\n extends EditorBaseOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions {}\n"]}
1
+ {"version":3,"file":"EditorOptions.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/EditorOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PasteTypeOrGetter } from '../parameter/PasteTypeOrGetter';\nimport type { ExperimentalFeature } from './ExperimentalFeature';\nimport type { KnownAnnounceStrings } from '../parameter/AnnounceData';\nimport type { Colors, ColorTransformFunction } from '../context/DarkColorHandler';\nimport type { EditorPlugin } from './EditorPlugin';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { CoreApiMap } from './EditorCore';\nimport type { DomToModelOption } from '../context/DomToModelOption';\nimport type { ModelToDomOption } from '../context/ModelToDomOption';\nimport type {\n ContentModelDocument,\n ReadonlyContentModelDocument,\n} from '../contentModel/blockGroup/ContentModelDocument';\nimport type { Snapshots } from '../parameter/Snapshot';\nimport type { TrustedHTMLHandler } from '../parameter/TrustedHTMLHandler';\n\n/**\n * Options for colors and dark mode\n */\nexport interface ColorOptions {\n /**\n * A util function to transform light mode color to dark mode color\n * Default value is to return the original light color\n */\n getDarkColor?: ColorTransformFunction;\n\n /**\n * A util function to generate color key for dark mode color.\n * By default, the color key is generated from the light mode color. For example,\n * color \"#123456\" will have the key \"--darkColor__123456\", and\n * color \"rgb(0,0,0)\" will have key \"--darkColor_rgb_0_0_0_\".\n * Pass in this function to customize this behavior.\n * The return value must be a valid CSS variable, starts with \"--\"\n */\n generateColorKey?: ColorTransformFunction;\n\n /**\n * Existing known color pairs\n */\n knownColors?: Record<string, Colors>;\n\n /**\n * Whether to skip the adjust editor process when for light/dark mode\n */\n doNotAdjustEditorColor?: boolean;\n\n /**\n * If the editor is currently in dark mode\n */\n inDarkMode?: boolean;\n}\n\n/**\n * Options for Content Model\n */\nexport interface ContentModelOptions {\n /**\n * Default options used for DOM to Content Model conversion\n */\n defaultDomToModelOptions?: DomToModelOption;\n\n /**\n * Default options used for Content Model to DOM conversion\n */\n defaultModelToDomOptions?: ModelToDomOption;\n\n /**\n * Default format of editor content. This will be applied to empty content.\n * If there is already content inside editor, format of existing content will not be changed.\n * Default value is the computed style of editor content DIV\n */\n defaultSegmentFormat?: ContentModelSegmentFormat;\n\n /**\n * An optional callback function that will be invoked before write content model back to editor.\n * This is used for make sure model can satisfy some customized requirement\n * @param model The model to fix up\n */\n onFixUpModel?: (model: ReadonlyContentModelDocument) => void;\n\n /**\n * @deprecated\n */\n disableCache?: boolean;\n}\n\n/**\n * Options for selection\n */\nexport interface SelectionOptions {\n /**\n * Color of the border of a selectedImage. Default color: '#DB626C'\n */\n imageSelectionBorderColor?: string;\n\n /**\n * Background color of a selected table cell. Default color: '#C6C6C6'\n */\n tableCellSelectionBackgroundColor?: string;\n}\n\n/**\n * Options for paste\n */\nexport interface PasteOptions {\n /**\n * Allowed custom content type when paste besides text/plain, text/html and images\n * Only text types are supported, and do not add \"text/\" prefix to the type values\n */\n allowedCustomPasteType?: string[];\n\n /**\n * Default paste type or function that returns the paste type. By default will use the normal (as-is) paste type.\n */\n defaultPasteType?: PasteTypeOrGetter;\n}\n\n/**\n * Options for editor fundamental data structure\n */\nexport interface EditorBaseOptions {\n /**\n * Enabled experimental features\n */\n experimentalFeatures?: (ExperimentalFeature | string)[];\n\n /**\n * List of plugins.\n * The order of plugins here determines in what order each event will be dispatched.\n * Plugins not appear in this list will not be added to editor, including built-in plugins.\n * Default value is empty array.\n */\n plugins?: EditorPlugin[];\n\n /**\n * The scroll container to get scroll event from.\n * By default, the scroll container will be the same with editor content DIV\n */\n scrollContainer?: HTMLElement;\n\n /**\n * Customized trusted type handler used for sanitizing HTML string before assign to DOM tree\n * This is required when trusted-type Content-Security-Policy (CSP) is enabled.\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types\n */\n trustedHTMLHandler?: TrustedHTMLHandler;\n\n /**\n * A function map to override default core API implementation\n * Default value is null\n */\n coreApiOverride?: Partial<CoreApiMap>;\n\n /**\n * Initial Content Model\n */\n initialModel?: ContentModelDocument;\n\n /**\n * Undo snapshot. Use this parameter to provide an external storage of undo snapshots\n */\n snapshots?: Snapshots;\n\n /**\n * A callback to be invoked when any exception is thrown during disposing editor\n * @param plugin The plugin that causes exception\n * @param error The error object we got\n */\n disposeErrorHandler?: (plugin: EditorPlugin, error: Error) => void;\n\n /**\n * A callback to help get string template to announce, used for accessibility\n * @param key The key of known announce data\n * @returns A template string to announce, use placeholder such as \"{0}\" for variables if necessary\n */\n announcerStringGetter?: (key: KnownAnnounceStrings) => string;\n\n /**\n * Whether to enable paragraph map. Default value is false.\n * Paragraph map is used to save a marker for paragraphs so it can be found even content is changed from a previous marked paragraph.\n */\n enableParagraphMap?: boolean;\n}\n\n/**\n * Options for editor\n */\nexport interface EditorOptions\n extends EditorBaseOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions {}\n"]}
package/lib/index.d.ts CHANGED
@@ -49,6 +49,7 @@ export { ListThreadFormat } from './contentModel/format/formatParts/ListThreadFo
49
49
  export { ListStyleFormat } from './contentModel/format/formatParts/ListStyleFormat';
50
50
  export { FloatFormat } from './contentModel/format/formatParts/FloatFormat';
51
51
  export { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';
52
+ export { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';
52
53
  export { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';
53
54
  export { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';
54
55
  export { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';
@@ -166,6 +167,7 @@ export { OperationalBlocks, ReadonlyOperationalBlocks } from './parameter/Operat
166
167
  export { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';
167
168
  export { ModelToTextCallback, ModelToTextCallbacks, ModelToTextChecker, } from './parameter/ModelToTextCallbacks';
168
169
  export { ConflictFormatSolution } from './parameter/ConflictFormatSolution';
170
+ export { ParagraphMap, ParagraphIndexer } from './parameter/ParagraphMap';
169
171
  export { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';
170
172
  export { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';
171
173
  export { BeforeDisposeEvent } from './event/BeforeDisposeEvent';
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';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';\nexport {\n ImageResizeMetadataFormat,\n ImageCropMetadataFormat,\n ImageMetadataFormat,\n ImageRotateMetadataFormat,\n ImageFlipMetadataFormat,\n} from './contentModel/format/metadata/ImageMetadataFormat';\nexport { TableCellMetadataFormat } from './contentModel/format/metadata/TableCellMetadataFormat';\n\nexport { ContentModelBlockGroupType } from './contentModel/blockGroup/BlockGroupType';\nexport { ContentModelBlockType } from './contentModel/block/BlockType';\nexport { ContentModelSegmentType } from './contentModel/segment/SegmentType';\n\nexport {\n EntityLifecycleOperation,\n EntityOperation,\n EntityRemovalOperation,\n EntityFormatOperation,\n} from './enum/EntityOperation';\nexport {\n TableOperation,\n TableVerticalInsertOperation,\n TableHorizontalInsertOperation,\n TableDeleteOperation,\n TableVerticalMergeOperation,\n TableHorizontalMergeOperation,\n TableCellMergeOperation,\n TableSplitOperation,\n TableAlignOperation,\n TableCellHorizontalAlignOperation,\n TableCellVerticalAlignOperation,\n} from './enum/TableOperation';\nexport { PasteType } from './enum/PasteType';\nexport { BorderOperations } from './enum/BorderOperations';\nexport { DeleteResult } from './enum/DeleteResult';\nexport { InsertEntityPosition } from './enum/InsertEntityPosition';\nexport { ExportContentMode } from './enum/ExportContentMode';\n\nexport {\n ContentModelBlock,\n ReadonlyContentModelBlock,\n ShallowMutableContentModelBlock,\n} from './contentModel/block/ContentModelBlock';\nexport {\n ContentModelParagraph,\n ContentModelParagraphCommon,\n ReadonlyContentModelParagraph,\n ShallowMutableContentModelParagraph,\n} from './contentModel/block/ContentModelParagraph';\nexport {\n ContentModelTable,\n ReadonlyContentModelTable,\n ShallowMutableContentModelTable,\n} from './contentModel/block/ContentModelTable';\nexport {\n ContentModelDivider,\n ContentModelDividerCommon,\n ReadonlyContentModelDivider,\n} from './contentModel/block/ContentModelDivider';\nexport {\n ContentModelBlockBase,\n ContentModelBlockBaseCommon,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from './contentModel/block/ContentModelBlockBase';\nexport { ContentModelBlockWithCache } from './contentModel/common/ContentModelBlockWithCache';\nexport {\n ContentModelTableRow,\n ContentModelTableRowCommon,\n ReadonlyContentModelTableRow,\n ShallowMutableContentModelTableRow,\n} from './contentModel/block/ContentModelTableRow';\n\nexport { ContentModelEntity } from './contentModel/entity/ContentModelEntity';\n\nexport {\n ContentModelDocument,\n ContentModelDocumentCommon,\n ReadonlyContentModelDocument,\n ShallowMutableContentModelDocument,\n} from './contentModel/blockGroup/ContentModelDocument';\nexport {\n ContentModelBlockGroupBase,\n ContentModelBlockGroupBaseCommon,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './contentModel/blockGroup/ContentModelBlockGroupBase';\nexport {\n ContentModelFormatContainer,\n ContentModelFormatContainerCommon,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from './contentModel/blockGroup/ContentModelFormatContainer';\nexport {\n ContentModelGeneralBlock,\n ContentModelGeneralBlockCommon,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from './contentModel/blockGroup/ContentModelGeneralBlock';\nexport {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from './contentModel/blockGroup/ContentModelListItem';\nexport {\n ContentModelTableCell,\n ContentModelTableCellCommon,\n ReadonlyContentModelTableCell,\n ShallowMutableContentModelTableCell,\n} from './contentModel/blockGroup/ContentModelTableCell';\nexport {\n ContentModelBlockGroup,\n ReadonlyContentModelBlockGroup,\n ShallowMutableContentModelBlockGroup,\n} from './contentModel/blockGroup/ContentModelBlockGroup';\n\nexport { ContentModelBr, ReadonlyContentModelBr } from './contentModel/segment/ContentModelBr';\nexport {\n ContentModelGeneralSegment,\n ReadonlyContentModelGeneralSegment,\n ShallowMutableContentModelGeneralSegment,\n} from './contentModel/segment/ContentModelGeneralSegment';\nexport {\n ContentModelImage,\n ContentModelImageCommon,\n ReadonlyContentModelImage,\n} from './contentModel/segment/ContentModelImage';\nexport {\n ContentModelText,\n ContentModelTextCommon,\n ReadonlyContentModelText,\n} from './contentModel/segment/ContentModelText';\nexport {\n ContentModelSelectionMarker,\n ReadonlyContentModelSelectionMarker,\n} from './contentModel/segment/ContentModelSelectionMarker';\nexport {\n ContentModelSegmentBase,\n ContentModelSegmentBaseCommon,\n ReadonlyContentModelSegmentBase,\n ShallowMutableContentModelSegmentBase,\n} from './contentModel/segment/ContentModelSegmentBase';\nexport {\n ContentModelSegment,\n ReadonlyContentModelSegment,\n ShallowMutableContentModelSegment,\n} from './contentModel/segment/ContentModelSegment';\n\nexport {\n ContentModelCode,\n ReadonlyContentModelCode,\n} from './contentModel/decorator/ContentModelCode';\nexport {\n ContentModelLink,\n ReadonlyContentModelLink,\n} from './contentModel/decorator/ContentModelLink';\nexport {\n ContentModelParagraphDecorator,\n ContentModelParagraphDecoratorCommon,\n ReadonlyContentModelParagraphDecorator,\n} from './contentModel/decorator/ContentModelParagraphDecorator';\nexport {\n ContentModelDecorator,\n ReadonlyContentModelDecorator,\n} from './contentModel/decorator/ContentModelDecorator';\nexport {\n ContentModelListLevel,\n ContentModelListLevelCommon,\n ReadonlyContentModelListLevel,\n} from './contentModel/decorator/ContentModelListLevel';\n\nexport {\n Selectable,\n ReadonlySelectable,\n ShallowMutableSelectable,\n} from './contentModel/common/Selectable';\nexport { MutableMark, ShallowMutableMark, ReadonlyMark } from './contentModel/common/MutableMark';\nexport { MutableType } from './contentModel/common/MutableType';\n\nexport {\n DOMSelection,\n SelectionType,\n SelectionBase,\n ImageSelection,\n RangeSelection,\n TableSelection,\n DOMInsertPoint,\n} from './selection/DOMSelection';\nexport { InsertPoint } from './selection/InsertPoint';\nexport {\n TableSelectionContext,\n ReadonlyTableSelectionContext,\n} from './selection/TableSelectionContext';\nexport { TableSelectionCoordinates } from './selection/TableSelectionCoordinates';\n\nexport {\n ContentModelHandlerMap,\n DefaultImplicitFormatMap,\n FormatAppliers,\n FormatAppliersPerCategory,\n OnNodeCreated,\n ModelToDomSettings,\n FormatApplier,\n ApplyMetadata,\n MetadataApplier,\n MetadataAppliers,\n TextFormatApplier,\n ElementFormatAppliersPerCategory,\n} from './context/ModelToDomSettings';\nexport {\n DefaultStyleMap,\n ElementProcessorMap,\n FormatParsers,\n FormatParsersPerCategory,\n DomToModelSettings,\n FormatParser,\n TextFormatParser,\n ElementFormatParserPerCategory,\n} from './context/DomToModelSettings';\nexport { DomToModelContext } from './context/DomToModelContext';\nexport { ElementProcessor } from './context/ElementProcessor';\nexport { DomToModelSelectionContext } from './context/DomToModelSelectionContext';\nexport { EditorContext } from './context/EditorContext';\nexport {\n DomToModelFormatContext,\n DomToModelDecoratorContext,\n DomToModelListFormat,\n} from './context/DomToModelFormatContext';\nexport { ModelToDomContext } from './context/ModelToDomContext';\nexport {\n ModelToDomBlockAndSegmentNode,\n ModelToDomRegularSelection,\n ModelToDomSelectionContext,\n} from './context/ModelToDomSelectionContext';\nexport {\n ModelToDomListStackItem,\n ModelToDomListContext,\n ModelToDomFormatContext,\n} from './context/ModelToDomFormatContext';\nexport { RewriteFromModel, RewriteFromModelContext } from './context/RewriteFromModel';\nexport {\n ContentModelHandler,\n ContentModelSegmentHandler,\n ContentModelBlockHandler,\n} from './context/ContentModelHandler';\nexport {\n DomToModelOption,\n DomToModelOptionForSanitizing,\n DomToModelOptionForCreateModel,\n} from './context/DomToModelOption';\nexport { ModelToDomOption } from './context/ModelToDomOption';\nexport { DomIndexer } from './context/DomIndexer';\nexport { TextMutationObserver } from './context/TextMutationObserver';\n\nexport { DefinitionType } from './metadata/DefinitionType';\nexport {\n ArrayItemType,\n DefinitionBase,\n StringDefinition,\n NumberDefinition,\n BooleanDefinition,\n ArrayDefinition,\n ObjectPropertyDefinition,\n ObjectDefinition,\n Definition,\n} from './metadata/Definition';\nexport { DarkColorHandler, Colors, ColorTransformFunction } from './context/DarkColorHandler';\n\nexport { IEditor } from './editor/IEditor';\nexport { ExperimentalFeature } from './editor/ExperimentalFeature';\nexport {\n EditorOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions,\n EditorBaseOptions,\n} from './editor/EditorOptions';\nexport {\n CreateContentModel,\n CreateEditorContext,\n GetDOMSelection,\n SetContentModel,\n SetDOMSelection,\n SetLogicalRoot,\n FormatContentModel,\n CoreApiMap,\n EditorCore,\n SwitchShadowEdit,\n TriggerEvent,\n AddUndoSnapshot,\n Focus,\n AttachDomEvent,\n RestoreUndoSnapshot,\n GetVisibleViewport,\n SetEditorStyle,\n Announce,\n} from './editor/EditorCore';\nexport { EditorCorePlugins } from './editor/EditorCorePlugins';\nexport { EditorPlugin } from './editor/EditorPlugin';\nexport { PluginWithState } from './editor/PluginWithState';\nexport { ContextMenuProvider } from './editor/ContextMenuProvider';\n\nexport {\n CachePluginState,\n RangeSelectionForCache,\n CacheSelection,\n} from './pluginState/CachePluginState';\nexport { FormatPluginState, PendingFormat } from './pluginState/FormatPluginState';\nexport { CopyPastePluginState } from './pluginState/CopyPastePluginState';\nexport { DOMEventPluginState } from './pluginState/DOMEventPluginState';\nexport { LifecyclePluginState } from './pluginState/LifecyclePluginState';\nexport { EntityPluginState, KnownEntityItem } from './pluginState/EntityPluginState';\nexport {\n SelectionPluginState,\n TableSelectionInfo,\n TableCellCoordinate,\n} from './pluginState/SelectionPluginState';\nexport { UndoPluginState } from './pluginState/UndoPluginState';\nexport {\n PluginKey,\n KeyOfStatePlugin,\n TypeOfStatePlugin,\n StatePluginKeys,\n GenericPluginState,\n PluginState,\n} from './pluginState/PluginState';\nexport { ContextMenuPluginState } from './pluginState/ContextMenuPluginState';\n\nexport { AutoLinkOptions } from './parameter/AutoLinkOptions';\nexport { EditorEnvironment, ContentModelSettings } from './parameter/EditorEnvironment';\nexport {\n EntityState,\n DeletedEntity,\n FormatContentModelContext,\n} from './parameter/FormatContentModelContext';\nexport {\n FormatContentModelOptions,\n ContentModelFormatter,\n} from './parameter/FormatContentModelOptions';\nexport { ContentModelFormatState } from './parameter/ContentModelFormatState';\nexport { PasteTypeOrGetter } from './parameter/PasteTypeOrGetter';\nexport { ImageFormatState } from './parameter/ImageFormatState';\nexport { Border } from './parameter/Border';\nexport { InsertEntityOptions } from './parameter/InsertEntityOptions';\nexport {\n DeleteSelectionContext,\n DeleteSelectionResult,\n DeleteSelectionStep,\n ValidDeleteSelectionContext,\n} from './parameter/DeleteSelectionStep';\nexport {\n SnapshotSelectionBase,\n RangeSnapshotSelection,\n ImageSnapshotSelection,\n TableSnapshotSelection,\n SnapshotSelection,\n Snapshot,\n Snapshots,\n} from './parameter/Snapshot';\nexport { SnapshotsManager } from './parameter/SnapshotsManager';\nexport { DOMEventHandlerFunction, DOMEventRecord } from './parameter/DOMEventRecord';\nexport { EdgeLinkPreview } from './parameter/EdgeLinkPreview';\nexport { ClipboardData } from './parameter/ClipboardData';\nexport { AnnounceData, KnownAnnounceStrings } from './parameter/AnnounceData';\nexport {\n TrustedHTMLHandler,\n DOMCreator,\n LegacyTrustedHTMLHandler,\n} from './parameter/TrustedHTMLHandler';\nexport { Rect } from './parameter/Rect';\nexport { ValueSanitizer } from './parameter/ValueSanitizer';\nexport { DOMHelper } from './parameter/DOMHelper';\nexport { ImageEditOperation, ImageEditor } from './parameter/ImageEditor';\nexport { CachedElementHandler, CloneModelOptions } from './parameter/CloneModelOptions';\nexport { LinkData } from './parameter/LinkData';\nexport { MergeModelOption } from './parameter/MergeModelOption';\nexport {\n IterateSelectionsCallback,\n IterateSelectionsOption,\n ReadonlyIterateSelectionsCallback,\n} from './parameter/IterateSelectionsOption';\nexport { NodeTypeMap } from './parameter/NodeTypeMap';\nexport { TypeOfBlockGroup } from './parameter/TypeOfBlockGroup';\nexport { OperationalBlocks, ReadonlyOperationalBlocks } from './parameter/OperationalBlocks';\nexport { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';\nexport {\n ModelToTextCallback,\n ModelToTextCallbacks,\n ModelToTextChecker,\n} from './parameter/ModelToTextCallbacks';\nexport { ConflictFormatSolution } from './parameter/ConflictFormatSolution';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';\nexport { BeforeSetContentEvent } from './event/BeforeSetContentEvent';\nexport { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';\nexport { ContextMenuEvent } from './event/ContextMenuEvent';\nexport { RewriteFromModelEvent } from './event/RewriteFromModelEvent';\nexport { EditImageEvent } from './event/EditImageEvent';\nexport { EditorReadyEvent } from './event/EditorReadyEvent';\nexport { EntityOperationEvent, FormattableRoot, Entity } from './event/EntityOperationEvent';\nexport { ExtractContentWithDomEvent } from './event/ExtractContentWithDomEvent';\nexport { EditorInputEvent } from './event/EditorInputEvent';\nexport {\n KeyDownEvent,\n KeyPressEvent,\n KeyUpEvent,\n CompositionEndEvent,\n} from './event/KeyboardEvent';\nexport { LogicalRootChangedEvent } from './event/LogicalRootChangedEvent';\nexport { MouseDownEvent, MouseUpEvent } 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';\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';\n\nexport { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';\nexport { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';\nexport { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';\nexport {\n ImageResizeMetadataFormat,\n ImageCropMetadataFormat,\n ImageMetadataFormat,\n ImageRotateMetadataFormat,\n ImageFlipMetadataFormat,\n} from './contentModel/format/metadata/ImageMetadataFormat';\nexport { TableCellMetadataFormat } from './contentModel/format/metadata/TableCellMetadataFormat';\n\nexport { ContentModelBlockGroupType } from './contentModel/blockGroup/BlockGroupType';\nexport { ContentModelBlockType } from './contentModel/block/BlockType';\nexport { ContentModelSegmentType } from './contentModel/segment/SegmentType';\n\nexport {\n EntityLifecycleOperation,\n EntityOperation,\n EntityRemovalOperation,\n EntityFormatOperation,\n} from './enum/EntityOperation';\nexport {\n TableOperation,\n TableVerticalInsertOperation,\n TableHorizontalInsertOperation,\n TableDeleteOperation,\n TableVerticalMergeOperation,\n TableHorizontalMergeOperation,\n TableCellMergeOperation,\n TableSplitOperation,\n TableAlignOperation,\n TableCellHorizontalAlignOperation,\n TableCellVerticalAlignOperation,\n} from './enum/TableOperation';\nexport { PasteType } from './enum/PasteType';\nexport { BorderOperations } from './enum/BorderOperations';\nexport { DeleteResult } from './enum/DeleteResult';\nexport { InsertEntityPosition } from './enum/InsertEntityPosition';\nexport { ExportContentMode } from './enum/ExportContentMode';\n\nexport {\n ContentModelBlock,\n ReadonlyContentModelBlock,\n ShallowMutableContentModelBlock,\n} from './contentModel/block/ContentModelBlock';\nexport {\n ContentModelParagraph,\n ContentModelParagraphCommon,\n ReadonlyContentModelParagraph,\n ShallowMutableContentModelParagraph,\n} from './contentModel/block/ContentModelParagraph';\nexport {\n ContentModelTable,\n ReadonlyContentModelTable,\n ShallowMutableContentModelTable,\n} from './contentModel/block/ContentModelTable';\nexport {\n ContentModelDivider,\n ContentModelDividerCommon,\n ReadonlyContentModelDivider,\n} from './contentModel/block/ContentModelDivider';\nexport {\n ContentModelBlockBase,\n ContentModelBlockBaseCommon,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from './contentModel/block/ContentModelBlockBase';\nexport { ContentModelBlockWithCache } from './contentModel/common/ContentModelBlockWithCache';\nexport {\n ContentModelTableRow,\n ContentModelTableRowCommon,\n ReadonlyContentModelTableRow,\n ShallowMutableContentModelTableRow,\n} from './contentModel/block/ContentModelTableRow';\n\nexport { ContentModelEntity } from './contentModel/entity/ContentModelEntity';\n\nexport {\n ContentModelDocument,\n ContentModelDocumentCommon,\n ReadonlyContentModelDocument,\n ShallowMutableContentModelDocument,\n} from './contentModel/blockGroup/ContentModelDocument';\nexport {\n ContentModelBlockGroupBase,\n ContentModelBlockGroupBaseCommon,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './contentModel/blockGroup/ContentModelBlockGroupBase';\nexport {\n ContentModelFormatContainer,\n ContentModelFormatContainerCommon,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from './contentModel/blockGroup/ContentModelFormatContainer';\nexport {\n ContentModelGeneralBlock,\n ContentModelGeneralBlockCommon,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from './contentModel/blockGroup/ContentModelGeneralBlock';\nexport {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from './contentModel/blockGroup/ContentModelListItem';\nexport {\n ContentModelTableCell,\n ContentModelTableCellCommon,\n ReadonlyContentModelTableCell,\n ShallowMutableContentModelTableCell,\n} from './contentModel/blockGroup/ContentModelTableCell';\nexport {\n ContentModelBlockGroup,\n ReadonlyContentModelBlockGroup,\n ShallowMutableContentModelBlockGroup,\n} from './contentModel/blockGroup/ContentModelBlockGroup';\n\nexport { ContentModelBr, ReadonlyContentModelBr } from './contentModel/segment/ContentModelBr';\nexport {\n ContentModelGeneralSegment,\n ReadonlyContentModelGeneralSegment,\n ShallowMutableContentModelGeneralSegment,\n} from './contentModel/segment/ContentModelGeneralSegment';\nexport {\n ContentModelImage,\n ContentModelImageCommon,\n ReadonlyContentModelImage,\n} from './contentModel/segment/ContentModelImage';\nexport {\n ContentModelText,\n ContentModelTextCommon,\n ReadonlyContentModelText,\n} from './contentModel/segment/ContentModelText';\nexport {\n ContentModelSelectionMarker,\n ReadonlyContentModelSelectionMarker,\n} from './contentModel/segment/ContentModelSelectionMarker';\nexport {\n ContentModelSegmentBase,\n ContentModelSegmentBaseCommon,\n ReadonlyContentModelSegmentBase,\n ShallowMutableContentModelSegmentBase,\n} from './contentModel/segment/ContentModelSegmentBase';\nexport {\n ContentModelSegment,\n ReadonlyContentModelSegment,\n ShallowMutableContentModelSegment,\n} from './contentModel/segment/ContentModelSegment';\n\nexport {\n ContentModelCode,\n ReadonlyContentModelCode,\n} from './contentModel/decorator/ContentModelCode';\nexport {\n ContentModelLink,\n ReadonlyContentModelLink,\n} from './contentModel/decorator/ContentModelLink';\nexport {\n ContentModelParagraphDecorator,\n ContentModelParagraphDecoratorCommon,\n ReadonlyContentModelParagraphDecorator,\n} from './contentModel/decorator/ContentModelParagraphDecorator';\nexport {\n ContentModelDecorator,\n ReadonlyContentModelDecorator,\n} from './contentModel/decorator/ContentModelDecorator';\nexport {\n ContentModelListLevel,\n ContentModelListLevelCommon,\n ReadonlyContentModelListLevel,\n} from './contentModel/decorator/ContentModelListLevel';\n\nexport {\n Selectable,\n ReadonlySelectable,\n ShallowMutableSelectable,\n} from './contentModel/common/Selectable';\nexport { MutableMark, ShallowMutableMark, ReadonlyMark } from './contentModel/common/MutableMark';\nexport { MutableType } from './contentModel/common/MutableType';\n\nexport {\n DOMSelection,\n SelectionType,\n SelectionBase,\n ImageSelection,\n RangeSelection,\n TableSelection,\n DOMInsertPoint,\n} from './selection/DOMSelection';\nexport { InsertPoint } from './selection/InsertPoint';\nexport {\n TableSelectionContext,\n ReadonlyTableSelectionContext,\n} from './selection/TableSelectionContext';\nexport { TableSelectionCoordinates } from './selection/TableSelectionCoordinates';\n\nexport {\n ContentModelHandlerMap,\n DefaultImplicitFormatMap,\n FormatAppliers,\n FormatAppliersPerCategory,\n OnNodeCreated,\n ModelToDomSettings,\n FormatApplier,\n ApplyMetadata,\n MetadataApplier,\n MetadataAppliers,\n TextFormatApplier,\n ElementFormatAppliersPerCategory,\n} from './context/ModelToDomSettings';\nexport {\n DefaultStyleMap,\n ElementProcessorMap,\n FormatParsers,\n FormatParsersPerCategory,\n DomToModelSettings,\n FormatParser,\n TextFormatParser,\n ElementFormatParserPerCategory,\n} from './context/DomToModelSettings';\nexport { DomToModelContext } from './context/DomToModelContext';\nexport { ElementProcessor } from './context/ElementProcessor';\nexport { DomToModelSelectionContext } from './context/DomToModelSelectionContext';\nexport { EditorContext } from './context/EditorContext';\nexport {\n DomToModelFormatContext,\n DomToModelDecoratorContext,\n DomToModelListFormat,\n} from './context/DomToModelFormatContext';\nexport { ModelToDomContext } from './context/ModelToDomContext';\nexport {\n ModelToDomBlockAndSegmentNode,\n ModelToDomRegularSelection,\n ModelToDomSelectionContext,\n} from './context/ModelToDomSelectionContext';\nexport {\n ModelToDomListStackItem,\n ModelToDomListContext,\n ModelToDomFormatContext,\n} from './context/ModelToDomFormatContext';\nexport { RewriteFromModel, RewriteFromModelContext } from './context/RewriteFromModel';\nexport {\n ContentModelHandler,\n ContentModelSegmentHandler,\n ContentModelBlockHandler,\n} from './context/ContentModelHandler';\nexport {\n DomToModelOption,\n DomToModelOptionForSanitizing,\n DomToModelOptionForCreateModel,\n} from './context/DomToModelOption';\nexport { ModelToDomOption } from './context/ModelToDomOption';\nexport { DomIndexer } from './context/DomIndexer';\nexport { TextMutationObserver } from './context/TextMutationObserver';\n\nexport { DefinitionType } from './metadata/DefinitionType';\nexport {\n ArrayItemType,\n DefinitionBase,\n StringDefinition,\n NumberDefinition,\n BooleanDefinition,\n ArrayDefinition,\n ObjectPropertyDefinition,\n ObjectDefinition,\n Definition,\n} from './metadata/Definition';\nexport { DarkColorHandler, Colors, ColorTransformFunction } from './context/DarkColorHandler';\n\nexport { IEditor } from './editor/IEditor';\nexport { ExperimentalFeature } from './editor/ExperimentalFeature';\nexport {\n EditorOptions,\n ColorOptions,\n ContentModelOptions,\n SelectionOptions,\n PasteOptions,\n EditorBaseOptions,\n} from './editor/EditorOptions';\nexport {\n CreateContentModel,\n CreateEditorContext,\n GetDOMSelection,\n SetContentModel,\n SetDOMSelection,\n SetLogicalRoot,\n FormatContentModel,\n CoreApiMap,\n EditorCore,\n SwitchShadowEdit,\n TriggerEvent,\n AddUndoSnapshot,\n Focus,\n AttachDomEvent,\n RestoreUndoSnapshot,\n GetVisibleViewport,\n SetEditorStyle,\n Announce,\n} from './editor/EditorCore';\nexport { EditorCorePlugins } from './editor/EditorCorePlugins';\nexport { EditorPlugin } from './editor/EditorPlugin';\nexport { PluginWithState } from './editor/PluginWithState';\nexport { ContextMenuProvider } from './editor/ContextMenuProvider';\n\nexport {\n CachePluginState,\n RangeSelectionForCache,\n CacheSelection,\n} from './pluginState/CachePluginState';\nexport { FormatPluginState, PendingFormat } from './pluginState/FormatPluginState';\nexport { CopyPastePluginState } from './pluginState/CopyPastePluginState';\nexport { DOMEventPluginState } from './pluginState/DOMEventPluginState';\nexport { LifecyclePluginState } from './pluginState/LifecyclePluginState';\nexport { EntityPluginState, KnownEntityItem } from './pluginState/EntityPluginState';\nexport {\n SelectionPluginState,\n TableSelectionInfo,\n TableCellCoordinate,\n} from './pluginState/SelectionPluginState';\nexport { UndoPluginState } from './pluginState/UndoPluginState';\nexport {\n PluginKey,\n KeyOfStatePlugin,\n TypeOfStatePlugin,\n StatePluginKeys,\n GenericPluginState,\n PluginState,\n} from './pluginState/PluginState';\nexport { ContextMenuPluginState } from './pluginState/ContextMenuPluginState';\n\nexport { AutoLinkOptions } from './parameter/AutoLinkOptions';\nexport { EditorEnvironment, ContentModelSettings } from './parameter/EditorEnvironment';\nexport {\n EntityState,\n DeletedEntity,\n FormatContentModelContext,\n} from './parameter/FormatContentModelContext';\nexport {\n FormatContentModelOptions,\n ContentModelFormatter,\n} from './parameter/FormatContentModelOptions';\nexport { ContentModelFormatState } from './parameter/ContentModelFormatState';\nexport { PasteTypeOrGetter } from './parameter/PasteTypeOrGetter';\nexport { ImageFormatState } from './parameter/ImageFormatState';\nexport { Border } from './parameter/Border';\nexport { InsertEntityOptions } from './parameter/InsertEntityOptions';\nexport {\n DeleteSelectionContext,\n DeleteSelectionResult,\n DeleteSelectionStep,\n ValidDeleteSelectionContext,\n} from './parameter/DeleteSelectionStep';\nexport {\n SnapshotSelectionBase,\n RangeSnapshotSelection,\n ImageSnapshotSelection,\n TableSnapshotSelection,\n SnapshotSelection,\n Snapshot,\n Snapshots,\n} from './parameter/Snapshot';\nexport { SnapshotsManager } from './parameter/SnapshotsManager';\nexport { DOMEventHandlerFunction, DOMEventRecord } from './parameter/DOMEventRecord';\nexport { EdgeLinkPreview } from './parameter/EdgeLinkPreview';\nexport { ClipboardData } from './parameter/ClipboardData';\nexport { AnnounceData, KnownAnnounceStrings } from './parameter/AnnounceData';\nexport {\n TrustedHTMLHandler,\n DOMCreator,\n LegacyTrustedHTMLHandler,\n} from './parameter/TrustedHTMLHandler';\nexport { Rect } from './parameter/Rect';\nexport { ValueSanitizer } from './parameter/ValueSanitizer';\nexport { DOMHelper } from './parameter/DOMHelper';\nexport { ImageEditOperation, ImageEditor } from './parameter/ImageEditor';\nexport { CachedElementHandler, CloneModelOptions } from './parameter/CloneModelOptions';\nexport { LinkData } from './parameter/LinkData';\nexport { MergeModelOption } from './parameter/MergeModelOption';\nexport {\n IterateSelectionsCallback,\n IterateSelectionsOption,\n ReadonlyIterateSelectionsCallback,\n} from './parameter/IterateSelectionsOption';\nexport { NodeTypeMap } from './parameter/NodeTypeMap';\nexport { TypeOfBlockGroup } from './parameter/TypeOfBlockGroup';\nexport { OperationalBlocks, ReadonlyOperationalBlocks } from './parameter/OperationalBlocks';\nexport { ParsedTable, ParsedTableCell } from './parameter/ParsedTable';\nexport {\n ModelToTextCallback,\n ModelToTextCallbacks,\n ModelToTextChecker,\n} from './parameter/ModelToTextCallbacks';\nexport { ConflictFormatSolution } from './parameter/ConflictFormatSolution';\nexport { ParagraphMap, ParagraphIndexer } from './parameter/ParagraphMap';\n\nexport { BasePluginEvent, BasePluginDomEvent } from './event/BasePluginEvent';\nexport { BeforeCutCopyEvent } from './event/BeforeCutCopyEvent';\nexport { BeforeDisposeEvent } from './event/BeforeDisposeEvent';\nexport { BeforeKeyboardEditingEvent } from './event/BeforeKeyboardEditingEvent';\nexport { BeforePasteEvent, MergePastedContentFunc } from './event/BeforePasteEvent';\nexport { BeforeSetContentEvent } from './event/BeforeSetContentEvent';\nexport { ContentChangedEvent, ChangedEntity } from './event/ContentChangedEvent';\nexport { ContextMenuEvent } from './event/ContextMenuEvent';\nexport { RewriteFromModelEvent } from './event/RewriteFromModelEvent';\nexport { EditImageEvent } from './event/EditImageEvent';\nexport { EditorReadyEvent } from './event/EditorReadyEvent';\nexport { EntityOperationEvent, FormattableRoot, Entity } from './event/EntityOperationEvent';\nexport { ExtractContentWithDomEvent } from './event/ExtractContentWithDomEvent';\nexport { EditorInputEvent } from './event/EditorInputEvent';\nexport {\n KeyDownEvent,\n KeyPressEvent,\n KeyUpEvent,\n CompositionEndEvent,\n} from './event/KeyboardEvent';\nexport { LogicalRootChangedEvent } from './event/LogicalRootChangedEvent';\nexport { MouseDownEvent, MouseUpEvent } 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';\n"]}
@@ -3,6 +3,7 @@ import type { DeleteResult } from '../enum/DeleteResult';
3
3
  import type { FormatContentModelContext } from './FormatContentModelContext';
4
4
  import type { InsertPoint } from '../selection/InsertPoint';
5
5
  import type { ReadonlyTableSelectionContext } from '../selection/TableSelectionContext';
6
+ import type { ShallowMutableContentModelSegment } from '../contentModel/segment/ContentModelSegment';
6
7
  /**
7
8
  * Result of deleteSelection API
8
9
  */
@@ -32,6 +33,11 @@ export interface DeleteSelectionContext extends DeleteSelectionResult {
32
33
  * Format context provided by formatContentModel API
33
34
  */
34
35
  formatContext?: FormatContentModelContext;
36
+ /**
37
+ * To store those undeletable segments whose paragraph is deleted.
38
+ * So at the end we can insert them back in to the remaining paragraph
39
+ */
40
+ undeletableSegments?: ShallowMutableContentModelSegment[];
35
41
  }
36
42
  /**
37
43
  * DeleteSelectionContext with a valid insert point that can be handled by next step
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteSelectionStep.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/DeleteSelectionStep.ts"],"names":[],"mappings":"","sourcesContent":["import type { ShallowMutableContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { DeleteResult } from '../enum/DeleteResult';\nimport type { FormatContentModelContext } from './FormatContentModelContext';\nimport type { InsertPoint } from '../selection/InsertPoint';\nimport type { ReadonlyTableSelectionContext } from '../selection/TableSelectionContext';\n\n/**\n * Result of deleteSelection API\n */\nexport interface DeleteSelectionResult {\n /**\n * Insert point position after delete, or null if there is no insert point\n */\n insertPoint: InsertPoint | null;\n\n /**\n * Delete result\n */\n deleteResult: DeleteResult;\n}\n\n/**\n * A context object used by DeleteSelectionStep\n */\nexport interface DeleteSelectionContext extends DeleteSelectionResult {\n /**\n * Last paragraph after previous step\n */\n lastParagraph?: ShallowMutableContentModelParagraph;\n\n /**\n * Last table context after previous step\n */\n lastTableContext?: ReadonlyTableSelectionContext;\n\n /**\n * Format context provided by formatContentModel API\n */\n formatContext?: FormatContentModelContext;\n}\n\n/**\n * DeleteSelectionContext with a valid insert point that can be handled by next step\n */\nexport interface ValidDeleteSelectionContext extends DeleteSelectionContext {\n /**\n * Insert point position after delete\n */\n insertPoint: InsertPoint;\n}\n\n/**\n * Represents a step function for deleteSelection API\n * @param context The valid delete selection context object returned from previous step\n */\nexport type DeleteSelectionStep = (context: ValidDeleteSelectionContext) => void;\n"]}
1
+ {"version":3,"file":"DeleteSelectionStep.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/DeleteSelectionStep.ts"],"names":[],"mappings":"","sourcesContent":["import type { ShallowMutableContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { DeleteResult } from '../enum/DeleteResult';\nimport type { FormatContentModelContext } from './FormatContentModelContext';\nimport type { InsertPoint } from '../selection/InsertPoint';\nimport type { ReadonlyTableSelectionContext } from '../selection/TableSelectionContext';\nimport type { ShallowMutableContentModelSegment } from '../contentModel/segment/ContentModelSegment';\n\n/**\n * Result of deleteSelection API\n */\nexport interface DeleteSelectionResult {\n /**\n * Insert point position after delete, or null if there is no insert point\n */\n insertPoint: InsertPoint | null;\n\n /**\n * Delete result\n */\n deleteResult: DeleteResult;\n}\n\n/**\n * A context object used by DeleteSelectionStep\n */\nexport interface DeleteSelectionContext extends DeleteSelectionResult {\n /**\n * Last paragraph after previous step\n */\n lastParagraph?: ShallowMutableContentModelParagraph;\n\n /**\n * Last table context after previous step\n */\n lastTableContext?: ReadonlyTableSelectionContext;\n\n /**\n * Format context provided by formatContentModel API\n */\n formatContext?: FormatContentModelContext;\n\n /**\n * To store those undeletable segments whose paragraph is deleted.\n * So at the end we can insert them back in to the remaining paragraph\n */\n undeletableSegments?: ShallowMutableContentModelSegment[];\n}\n\n/**\n * DeleteSelectionContext with a valid insert point that can be handled by next step\n */\nexport interface ValidDeleteSelectionContext extends DeleteSelectionContext {\n /**\n * Insert point position after delete\n */\n insertPoint: InsertPoint;\n}\n\n/**\n * Represents a step function for deleteSelection API\n * @param context The valid delete selection context object returned from previous step\n */\nexport type DeleteSelectionStep = (context: ValidDeleteSelectionContext) => void;\n"]}
@@ -4,6 +4,7 @@ import type { ContentModelImage } from '../contentModel/segment/ContentModelImag
4
4
  import type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';
5
5
  import type { EntityRemovalOperation } from '../enum/EntityOperation';
6
6
  import type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';
7
+ import type { ParagraphIndexer } from './ParagraphMap';
7
8
  /**
8
9
  * State for an entity. This is used for storing entity undo snapshot
9
10
  */
@@ -53,6 +54,10 @@ export interface FormatContentModelContext {
53
54
  * Images inserted in the editor that needs to have their size adjusted
54
55
  */
55
56
  readonly newImages: ContentModelImage[];
57
+ /**
58
+ * A helper class to help find paragraph from its marker
59
+ */
60
+ readonly paragraphIndexer?: ParagraphIndexer;
56
61
  /**
57
62
  * Raw Event that triggers this format call
58
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n * Default value is false, which means add undo snapshot\n * When set to true, it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added, this is same with \"MarkNewContent\"\n * When set to 'DoNotSkip', it will add undo snapshot (default behavior)\n * When set to 'MarkNewContent', it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added\n * When set to 'SkipAll', it will skip adding undo snapshot and not mark \"hasNewContent\", as if no change is made\n */\n skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
1
+ {"version":3,"file":"FormatContentModelContext.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/FormatContentModelContext.ts"],"names":[],"mappings":"","sourcesContent":["import type { AnnounceData } from './AnnounceData';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\nimport type { ContentModelImage } from '../contentModel/segment/ContentModelImage';\nimport type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';\nimport type { EntityRemovalOperation } from '../enum/EntityOperation';\nimport type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';\nimport type { ParagraphIndexer } from './ParagraphMap';\n\n/**\n * State for an entity. This is used for storing entity undo snapshot\n */\nexport interface EntityState {\n /**\n * Type of the entity\n */\n type: string;\n\n /**\n * Id of the entity\n */\n id: string;\n\n /**\n * The state of this entity to store into undo snapshot.\n * The state can be any string, or a serialized JSON object.\n * We are using string here instead of a JSON object to make sure the whole state is serializable.\n */\n state: string;\n}\n\n/**\n * Represents an entity that is deleted by a specified entity operation\n */\nexport interface DeletedEntity {\n /**\n * The deleted entity\n */\n entity: ContentModelEntity;\n\n /**\n * The operation that causes this entity to be deleted\n */\n operation: EntityRemovalOperation;\n}\n\n/**\n * Context object for API formatWithContentModel\n */\nexport interface FormatContentModelContext {\n /**\n * New entities added during the format process. This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly newEntities: ContentModelEntity[];\n\n /**\n * Entities got deleted during formatting. Need to be set by the formatter function\n * This value is only respected when autoDetectChangedEntities is not set to true\n */\n readonly deletedEntities: DeletedEntity[];\n\n /**\n * Images inserted in the editor that needs to have their size adjusted\n */\n readonly newImages: ContentModelImage[];\n\n /**\n * A helper class to help find paragraph from its marker\n */\n readonly paragraphIndexer?: ParagraphIndexer;\n\n /**\n * Raw Event that triggers this format call\n */\n readonly rawEvent?: Event;\n\n /**\n * @optional\n * When pass true, skip adding undo snapshot when write Content Model back to DOM.\n * Need to be set by the formatter function\n * Default value is false, which means add undo snapshot\n * When set to true, it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added, this is same with \"MarkNewContent\"\n * When set to 'DoNotSkip', it will add undo snapshot (default behavior)\n * When set to 'MarkNewContent', it will skip adding undo snapshot but mark \"hasNewContent\" so that next undo snapshot will be added\n * When set to 'SkipAll', it will skip adding undo snapshot and not mark \"hasNewContent\", as if no change is made\n */\n skipUndoSnapshot?: boolean | 'DoNotSkip' | 'MarkNewContent' | 'SkipAll';\n\n /**\n * @optional\n * When set to true, formatWithContentModel API will not keep cached Content Model. Next time when we need a Content Model, a new one will be created\n */\n clearModelCache?: boolean;\n\n /**\n * @optional\n * Specify new pending format.\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingFormat?: ContentModelSegmentFormat | 'preserve';\n\n /**\n * @optional\n * Specify new pending format for paragraph\n * To keep current format event selection position is changed, set this value to \"preserved\", editor will update pending format position to the new position\n * To set a new pending format, set this property to the format object\n * Otherwise, leave it there and editor will automatically decide if the original pending format is still available\n */\n newPendingParagraphFormat?: ContentModelBlockFormat | 'preserve';\n\n /**\n * @optional Entity states related to the format API that will be added together with undo snapshot.\n * When entity states are set, each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState\n * when undo/redo to this snapshot\n */\n entityStates?: EntityState[];\n\n /**\n * @optional Set to true if this action can be undone when user press Backspace key (aka Auto Complete).\n */\n canUndoByBackspace?: boolean;\n\n /**\n * @optional Set this value to tell AnnouncePlugin to announce the given information\n */\n announceData?: AnnounceData | null;\n\n /**\n * @optional When set to true, EntityPlugin will detect any entity changes during this process, newEntities and deletedEntities will be ignored\n */\n autoDetectChangedEntities?: boolean;\n}\n"]}
@@ -0,0 +1,35 @@
1
+ import type { ContentModelParagraph, ReadonlyContentModelParagraph } from '../contentModel/block/ContentModelParagraph';
2
+ /**
3
+ * ParagraphMap is used to map a paragraph marker to a paragraph in the model.
4
+ */
5
+ export interface ParagraphMap {
6
+ /**
7
+ * When create content model from DOM, assign a marker to a paragraph in the model.
8
+ * This marker is used to identify the paragraph in the model.
9
+ * If the DOM element does not have a marker, a new marker will be generated and assigned to the paragraph and write back to DOM.
10
+ * @param element The DOM element to assign marker to
11
+ * @param paragraph The paragraph in the model to assign marker to
12
+ */
13
+ assignMarkerToModel(element: HTMLElement, paragraph: ContentModelParagraph): void;
14
+ /**
15
+ * When create DOM elements from content model, assign a marker to a paragraph in the DOM.
16
+ * This marker is used to identify the paragraph in the model.
17
+ * @param element The DOM element to assign marker to
18
+ * @param paragraph The paragraph in the model to assign marker to
19
+ */
20
+ applyMarkerToDom(element: HTMLElement, paragraph: ContentModelParagraph): void;
21
+ /**
22
+ * Clear cached marker map
23
+ */
24
+ clear(): void;
25
+ }
26
+ /**
27
+ * A helper class to help find paragraph from its marker
28
+ */
29
+ export interface ParagraphIndexer {
30
+ /**
31
+ * Get paragraph using a previously marked paragraph
32
+ * @param paragraphWithMarker The paragraph with marker to find
33
+ */
34
+ getParagraphFromMarker(paragraphWithMarker: ReadonlyContentModelParagraph): ReadonlyContentModelParagraph | null;
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ParagraphMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParagraphMap.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/ParagraphMap.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelParagraph,\n ReadonlyContentModelParagraph,\n} from '../contentModel/block/ContentModelParagraph';\n\n/**\n * ParagraphMap is used to map a paragraph marker to a paragraph in the model.\n */\nexport interface ParagraphMap {\n /**\n * When create content model from DOM, assign a marker to a paragraph in the model.\n * This marker is used to identify the paragraph in the model.\n * If the DOM element does not have a marker, a new marker will be generated and assigned to the paragraph and write back to DOM.\n * @param element The DOM element to assign marker to\n * @param paragraph The paragraph in the model to assign marker to\n */\n assignMarkerToModel(element: HTMLElement, paragraph: ContentModelParagraph): void;\n\n /**\n * When create DOM elements from content model, assign a marker to a paragraph in the DOM.\n * This marker is used to identify the paragraph in the model.\n * @param element The DOM element to assign marker to\n * @param paragraph The paragraph in the model to assign marker to\n */\n applyMarkerToDom(element: HTMLElement, paragraph: ContentModelParagraph): void;\n\n /**\n * Clear cached marker map\n */\n clear(): void;\n}\n\n/**\n * A helper class to help find paragraph from its marker\n */\nexport interface ParagraphIndexer {\n /**\n * Get paragraph using a previously marked paragraph\n * @param paragraphWithMarker The paragraph with marker to find\n */\n getParagraphFromMarker(\n paragraphWithMarker: ReadonlyContentModelParagraph\n ): ReadonlyContentModelParagraph | null;\n}\n"]}
@@ -2,6 +2,7 @@ import type { TextMutationObserver } from '../context/TextMutationObserver';
2
2
  import type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';
3
3
  import type { DomIndexer } from '../context/DomIndexer';
4
4
  import type { DOMInsertPoint, ImageSelection, SelectionBase, TableSelection } from '../selection/DOMSelection';
5
+ import type { ParagraphIndexer, ParagraphMap } from '../parameter/ParagraphMap';
5
6
  /**
6
7
  * Represents a range selection used for cache. We store the start and end insert point here instead of range itself
7
8
  * to prevent range got automatically modified by browser
@@ -37,6 +38,10 @@ export interface CachePluginState {
37
38
  * When reuse Content Model is allowed, we cache the Content Model object here after created
38
39
  */
39
40
  cachedModel?: ContentModelDocument;
41
+ /**
42
+ * A helper class that manages a mapping from paragraph marker to paragraph object.
43
+ */
44
+ paragraphMap?: ParagraphMap & ParagraphIndexer;
40
45
  /**
41
46
  * @optional Indexer for CachePlugin, to help build backward relationship from DOM node to Content Model
42
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CachePluginState.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/pluginState/CachePluginState.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextMutationObserver } from '../context/TextMutationObserver';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { DomIndexer } from '../context/DomIndexer';\nimport type {\n DOMInsertPoint,\n ImageSelection,\n SelectionBase,\n TableSelection,\n} from '../selection/DOMSelection';\n\n/**\n * Represents a range selection used for cache. We store the start and end insert point here instead of range itself\n * to prevent range got automatically modified by browser\n */\nexport interface RangeSelectionForCache extends SelectionBase<'range'> {\n /**\n * Start insert point\n */\n start: DOMInsertPoint;\n\n /**\n * End inset point\n */\n end: DOMInsertPoint;\n\n /**\n * Whether the selection was from left to right (in document order) or\n * right to left (reverse of document order)\n */\n isReverted: boolean;\n}\n\n/**\n * Represents a selection used for cache\n */\nexport type CacheSelection = RangeSelectionForCache | ImageSelection | TableSelection;\n\n/**\n * Plugin state for CacheEditPlugin\n */\nexport interface CachePluginState {\n /**\n * Cached selection\n */\n cachedSelection?: CacheSelection | undefined;\n\n /**\n * When reuse Content Model is allowed, we cache the Content Model object here after created\n */\n cachedModel?: ContentModelDocument;\n\n /**\n * @optional Indexer for CachePlugin, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * @optional A wrapper of MutationObserver to help detect text changes in editor\n */\n textMutationObserver?: TextMutationObserver;\n}\n"]}
1
+ {"version":3,"file":"CachePluginState.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/pluginState/CachePluginState.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextMutationObserver } from '../context/TextMutationObserver';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { DomIndexer } from '../context/DomIndexer';\nimport type {\n DOMInsertPoint,\n ImageSelection,\n SelectionBase,\n TableSelection,\n} from '../selection/DOMSelection';\nimport type { ParagraphIndexer, ParagraphMap } from '../parameter/ParagraphMap';\n\n/**\n * Represents a range selection used for cache. We store the start and end insert point here instead of range itself\n * to prevent range got automatically modified by browser\n */\nexport interface RangeSelectionForCache extends SelectionBase<'range'> {\n /**\n * Start insert point\n */\n start: DOMInsertPoint;\n\n /**\n * End inset point\n */\n end: DOMInsertPoint;\n\n /**\n * Whether the selection was from left to right (in document order) or\n * right to left (reverse of document order)\n */\n isReverted: boolean;\n}\n\n/**\n * Represents a selection used for cache\n */\nexport type CacheSelection = RangeSelectionForCache | ImageSelection | TableSelection;\n\n/**\n * Plugin state for CacheEditPlugin\n */\nexport interface CachePluginState {\n /**\n * Cached selection\n */\n cachedSelection?: CacheSelection | undefined;\n\n /**\n * When reuse Content Model is allowed, we cache the Content Model object here after created\n */\n cachedModel?: ContentModelDocument;\n\n /**\n * A helper class that manages a mapping from paragraph marker to paragraph object.\n */\n paragraphMap?: ParagraphMap & ParagraphIndexer;\n\n /**\n * @optional Indexer for CachePlugin, to help build backward relationship from DOM node to Content Model\n */\n domIndexer?: DomIndexer;\n\n /**\n * @optional A wrapper of MutationObserver to help detect text changes in editor\n */\n textMutationObserver?: TextMutationObserver;\n}\n"]}
@@ -7,8 +7,9 @@ import type { PaddingFormat } from './formatParts/PaddingFormat';
7
7
  import type { SizeFormat } from './formatParts/SizeFormat';
8
8
  import type { TextAlignFormat } from './formatParts/TextAlignFormat';
9
9
  import type { TextColorFormat } from './formatParts/TextColorFormat';
10
+ import type { UndeletableFormat } from './formatParts/UndeletableFormat';
10
11
  import type { UnderlineFormat } from './formatParts/UnderlineFormat';
11
12
  /**
12
13
  * The format object for a hyperlink in Content Model
13
14
  */
14
- export declare type ContentModelHyperLinkFormat = LinkFormat & TextColorFormat & BackgroundColorFormat & UnderlineFormat & DisplayFormat & MarginFormat & PaddingFormat & BorderFormat & SizeFormat & TextAlignFormat;
15
+ export declare type ContentModelHyperLinkFormat = LinkFormat & TextColorFormat & BackgroundColorFormat & UnderlineFormat & DisplayFormat & MarginFormat & PaddingFormat & BorderFormat & SizeFormat & TextAlignFormat & UndeletableFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelHyperLinkFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelHyperLinkFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\n\n/**\n * The format object for a hyperlink in Content Model\n */\nexport type ContentModelHyperLinkFormat = LinkFormat &\n TextColorFormat &\n BackgroundColorFormat &\n UnderlineFormat &\n DisplayFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n SizeFormat &\n TextAlignFormat;\n"]}
1
+ {"version":3,"file":"ContentModelHyperLinkFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelHyperLinkFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { UndeletableFormat } from './formatParts/UndeletableFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\n\n/**\n * The format object for a hyperlink in Content Model\n */\nexport type ContentModelHyperLinkFormat = LinkFormat &\n TextColorFormat &\n BackgroundColorFormat &\n UnderlineFormat &\n DisplayFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n SizeFormat &\n TextAlignFormat &\n UndeletableFormat;\n"]}
@@ -29,6 +29,7 @@ import type { TableLayoutFormat } from './formatParts/TableLayoutFormat';
29
29
  import type { TextAlignFormat } from './formatParts/TextAlignFormat';
30
30
  import type { TextColorFormat } from './formatParts/TextColorFormat';
31
31
  import type { TextIndentFormat } from './formatParts/TextIndentFormat';
32
+ import type { UndeletableFormat } from './formatParts/UndeletableFormat';
32
33
  import type { UnderlineFormat } from './formatParts/UnderlineFormat';
33
34
  import type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';
34
35
  import type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';
@@ -169,6 +170,10 @@ export interface FormatHandlerTypeMap {
169
170
  * Format for TextIndentFormat
170
171
  */
171
172
  textIndent: TextIndentFormat;
173
+ /**
174
+ * Format for Undeletable link
175
+ */
176
+ undeletableLink: UndeletableFormat;
172
177
  /**
173
178
  * Format for UnderlineFormat
174
179
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FormatHandlerTypeMap.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/FormatHandlerTypeMap.ts"],"names":[],"mappings":"","sourcesContent":["import type { AriaFormat } from './formatParts/AriaFormat';\nimport type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { DatasetFormat } from './metadata/DatasetFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { EntityInfoFormat } from './formatParts/EntityInfoFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { FontFamilyFormat } from './formatParts/FontFamilyFormat';\nimport type { FontSizeFormat } from './formatParts/FontSizeFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { ItalicFormat } from './formatParts/ItalicFormat';\nimport type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { ListStyleFormat } from './formatParts/ListStyleFormat';\nimport type { ListThreadFormat } from './formatParts/ListThreadFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { SpacingFormat } from './formatParts/SpacingFormat';\nimport type { StrikeFormat } from './formatParts/StrikeFormat';\nimport type { SuperOrSubScriptFormat } from './formatParts/SuperOrSubScriptFormat';\nimport type { TableLayoutFormat } from './formatParts/TableLayoutFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\nimport type { WordBreakFormat } from './formatParts/WordBreakFormat';\n\n/**\n * Represents a record of all format handlers\n */\nexport interface FormatHandlerTypeMap {\n /**\n * Format for AriaFormat\n */\n aria: AriaFormat;\n\n /**\n * Format for BackgroundColorFormat\n */\n backgroundColor: BackgroundColorFormat;\n\n /**\n * Format for BoldFormat\n */\n bold: BoldFormat;\n\n /**\n * Format for BorderFormat\n */\n border: BorderFormat;\n\n /**\n * Format for BorderBoxFormat\n */\n borderBox: BorderBoxFormat;\n\n /**\n * Format for BoxShadowFormat\n */\n boxShadow: BoxShadowFormat;\n\n /**\n * Format for DatasetFormat\n */\n dataset: DatasetFormat;\n\n /**\n * Format for DirectionFormat\n */\n direction: DirectionFormat;\n\n /**\n * Format for DisplayFormat\n */\n display: DisplayFormat;\n\n /**\n * Format for EntityInfoFormat and IdFormat\n */\n entity: EntityInfoFormat & IdFormat;\n\n /**\n * Format for FloatFormat\n */\n float: FloatFormat;\n\n /**\n * Format for FontFamilyFormat\n */\n fontFamily: FontFamilyFormat;\n\n /**\n * Format for FontSizeFormat\n */\n fontSize: FontSizeFormat;\n\n /**\n * Format for HtmlAlignFormat\n */\n htmlAlign: HtmlAlignFormat;\n\n /**\n * Format for IdFormat\n */\n id: IdFormat;\n\n /**\n * Format for ItalicFormat\n */\n italic: ItalicFormat;\n\n /**\n * Format for LetterSpacingFormat\n */\n letterSpacing: LetterSpacingFormat;\n\n /**\n * Format for LineHeightFormat\n */\n lineHeight: LineHeightFormat;\n\n /**\n * Format for LinkFormat\n */\n link: LinkFormat;\n\n /**\n * Format for ListThreadFormat (used by list item)\n */\n listItemThread: ListThreadFormat;\n\n /**\n * Format for ListThreadFormat (used by list level)\n */\n listLevelThread: ListThreadFormat;\n\n /**\n * Format for ListStyleFormat\n */\n listStyle: ListStyleFormat;\n\n /**\n * Format for MarginFormat\n */\n margin: MarginFormat;\n\n /**\n * Format for PaddingFormat\n */\n padding: PaddingFormat;\n\n /**\n * Format for SizeFormat\n */\n size: SizeFormat;\n\n /**\n * Format for StrikeFormat\n */\n strike: StrikeFormat;\n\n /**\n * Format for SuperOrSubScriptFormat\n */\n superOrSubScript: SuperOrSubScriptFormat;\n\n /**\n * Format for TableLayout\n */\n tableLayout: TableLayoutFormat;\n\n /**\n * Format for SpacingFormat\n */\n tableSpacing: SpacingFormat;\n\n /**\n * Format for TextAlignFormat\n */\n textAlign: TextAlignFormat;\n\n /**\n * Format for TextColorFormat\n */\n textColor: TextColorFormat;\n\n /**\n * Format for TextColorFormat, for Table Cell only\n */\n textColorOnTableCell: TextColorFormat;\n\n /**\n * Format for TextIndentFormat\n */\n textIndent: TextIndentFormat;\n\n /**\n * Format for UnderlineFormat\n */\n underline: UnderlineFormat;\n\n /**\n * Format for VerticalAlignFormat\n */\n verticalAlign: VerticalAlignFormat;\n\n /**\n * Format for WhiteSpaceFormat\n */\n whiteSpace: WhiteSpaceFormat;\n\n /**\n * Format for WordBreakFormat\n */\n wordBreak: WordBreakFormat;\n}\n\n/**\n * Key of all format handler\n */\nexport type FormatKey = keyof FormatHandlerTypeMap;\n"]}
1
+ {"version":3,"file":"FormatHandlerTypeMap.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/FormatHandlerTypeMap.ts"],"names":[],"mappings":"","sourcesContent":["import type { AriaFormat } from './formatParts/AriaFormat';\nimport type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BoldFormat } from './formatParts/BoldFormat';\nimport type { BorderBoxFormat } from './formatParts/BorderBoxFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { DatasetFormat } from './metadata/DatasetFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { EntityInfoFormat } from './formatParts/EntityInfoFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { FontFamilyFormat } from './formatParts/FontFamilyFormat';\nimport type { FontSizeFormat } from './formatParts/FontSizeFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { ItalicFormat } from './formatParts/ItalicFormat';\nimport type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { LinkFormat } from './formatParts/LinkFormat';\nimport type { ListStyleFormat } from './formatParts/ListStyleFormat';\nimport type { ListThreadFormat } from './formatParts/ListThreadFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { SpacingFormat } from './formatParts/SpacingFormat';\nimport type { StrikeFormat } from './formatParts/StrikeFormat';\nimport type { SuperOrSubScriptFormat } from './formatParts/SuperOrSubScriptFormat';\nimport type { TableLayoutFormat } from './formatParts/TableLayoutFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextColorFormat } from './formatParts/TextColorFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { UndeletableFormat } from './formatParts/UndeletableFormat';\nimport type { UnderlineFormat } from './formatParts/UnderlineFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\nimport type { WordBreakFormat } from './formatParts/WordBreakFormat';\n\n/**\n * Represents a record of all format handlers\n */\nexport interface FormatHandlerTypeMap {\n /**\n * Format for AriaFormat\n */\n aria: AriaFormat;\n\n /**\n * Format for BackgroundColorFormat\n */\n backgroundColor: BackgroundColorFormat;\n\n /**\n * Format for BoldFormat\n */\n bold: BoldFormat;\n\n /**\n * Format for BorderFormat\n */\n border: BorderFormat;\n\n /**\n * Format for BorderBoxFormat\n */\n borderBox: BorderBoxFormat;\n\n /**\n * Format for BoxShadowFormat\n */\n boxShadow: BoxShadowFormat;\n\n /**\n * Format for DatasetFormat\n */\n dataset: DatasetFormat;\n\n /**\n * Format for DirectionFormat\n */\n direction: DirectionFormat;\n\n /**\n * Format for DisplayFormat\n */\n display: DisplayFormat;\n\n /**\n * Format for EntityInfoFormat and IdFormat\n */\n entity: EntityInfoFormat & IdFormat;\n\n /**\n * Format for FloatFormat\n */\n float: FloatFormat;\n\n /**\n * Format for FontFamilyFormat\n */\n fontFamily: FontFamilyFormat;\n\n /**\n * Format for FontSizeFormat\n */\n fontSize: FontSizeFormat;\n\n /**\n * Format for HtmlAlignFormat\n */\n htmlAlign: HtmlAlignFormat;\n\n /**\n * Format for IdFormat\n */\n id: IdFormat;\n\n /**\n * Format for ItalicFormat\n */\n italic: ItalicFormat;\n\n /**\n * Format for LetterSpacingFormat\n */\n letterSpacing: LetterSpacingFormat;\n\n /**\n * Format for LineHeightFormat\n */\n lineHeight: LineHeightFormat;\n\n /**\n * Format for LinkFormat\n */\n link: LinkFormat;\n\n /**\n * Format for ListThreadFormat (used by list item)\n */\n listItemThread: ListThreadFormat;\n\n /**\n * Format for ListThreadFormat (used by list level)\n */\n listLevelThread: ListThreadFormat;\n\n /**\n * Format for ListStyleFormat\n */\n listStyle: ListStyleFormat;\n\n /**\n * Format for MarginFormat\n */\n margin: MarginFormat;\n\n /**\n * Format for PaddingFormat\n */\n padding: PaddingFormat;\n\n /**\n * Format for SizeFormat\n */\n size: SizeFormat;\n\n /**\n * Format for StrikeFormat\n */\n strike: StrikeFormat;\n\n /**\n * Format for SuperOrSubScriptFormat\n */\n superOrSubScript: SuperOrSubScriptFormat;\n\n /**\n * Format for TableLayout\n */\n tableLayout: TableLayoutFormat;\n\n /**\n * Format for SpacingFormat\n */\n tableSpacing: SpacingFormat;\n\n /**\n * Format for TextAlignFormat\n */\n textAlign: TextAlignFormat;\n\n /**\n * Format for TextColorFormat\n */\n textColor: TextColorFormat;\n\n /**\n * Format for TextColorFormat, for Table Cell only\n */\n textColorOnTableCell: TextColorFormat;\n\n /**\n * Format for TextIndentFormat\n */\n textIndent: TextIndentFormat;\n\n /**\n * Format for Undeletable link\n */\n undeletableLink: UndeletableFormat;\n\n /**\n * Format for UnderlineFormat\n */\n underline: UnderlineFormat;\n\n /**\n * Format for VerticalAlignFormat\n */\n verticalAlign: VerticalAlignFormat;\n\n /**\n * Format for WhiteSpaceFormat\n */\n whiteSpace: WhiteSpaceFormat;\n\n /**\n * Format for WordBreakFormat\n */\n wordBreak: WordBreakFormat;\n}\n\n/**\n * Key of all format handler\n */\nexport type FormatKey = keyof FormatHandlerTypeMap;\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Format of undeletable segments
3
+ */
4
+ export declare type UndeletableFormat = {
5
+ /**
6
+ * When set to true, this link is not allowed to be deleted by deleteSelection API.
7
+ * This is used to protect links that are not allowed to be deleted by user action.
8
+ */
9
+ undeletable?: boolean;
10
+ };
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=UndeletableFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UndeletableFormat.js","sourceRoot":"","sources":["../../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/formatParts/UndeletableFormat.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Format of undeletable segments\n */\nexport type UndeletableFormat = {\n /**\n * When set to true, this link is not allowed to be deleted by deleteSelection API.\n * This is used to protect links that are not allowed to be deleted by user action.\n */\n undeletable?: boolean;\n};\n"]}