roosterjs-content-model-types 9.26.0 → 9.29.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 (58) hide show
  1. package/lib/contentModel/format/ContentModelBlockFormat.d.ts +2 -1
  2. package/lib/contentModel/format/ContentModelBlockFormat.js.map +1 -1
  3. package/lib/contentModel/format/ContentModelImageFormat.d.ts +2 -1
  4. package/lib/contentModel/format/ContentModelImageFormat.js.map +1 -1
  5. package/lib/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  6. package/lib/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  7. package/lib/contentModel/format/formatParts/ImageStateFormat.d.ts +9 -0
  8. package/lib/contentModel/format/formatParts/ImageStateFormat.js +3 -0
  9. package/lib/contentModel/format/formatParts/ImageStateFormat.js.map +1 -0
  10. package/lib/context/DomIndexer.d.ts +5 -0
  11. package/lib/context/DomIndexer.js.map +1 -1
  12. package/lib/editor/ExperimentalFeature.d.ts +7 -1
  13. package/lib/editor/ExperimentalFeature.js.map +1 -1
  14. package/lib/index.d.ts +1 -0
  15. package/lib/index.js.map +1 -1
  16. package/lib/parameter/ContentModelFormatState.d.ts +6 -1
  17. package/lib/parameter/ContentModelFormatState.js.map +1 -1
  18. package/lib/parameter/TrustedHTMLHandler.d.ts +8 -0
  19. package/lib/parameter/TrustedHTMLHandler.js.map +1 -1
  20. package/lib-amd/contentModel/format/ContentModelBlockFormat.d.ts +2 -1
  21. package/lib-amd/contentModel/format/ContentModelBlockFormat.js.map +1 -1
  22. package/lib-amd/contentModel/format/ContentModelImageFormat.d.ts +2 -1
  23. package/lib-amd/contentModel/format/ContentModelImageFormat.js.map +1 -1
  24. package/lib-amd/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  25. package/lib-amd/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  26. package/lib-amd/contentModel/format/formatParts/ImageStateFormat.d.ts +9 -0
  27. package/lib-amd/contentModel/format/formatParts/ImageStateFormat.js +5 -0
  28. package/lib-amd/contentModel/format/formatParts/ImageStateFormat.js.map +1 -0
  29. package/lib-amd/context/DomIndexer.d.ts +5 -0
  30. package/lib-amd/context/DomIndexer.js.map +1 -1
  31. package/lib-amd/editor/ExperimentalFeature.d.ts +7 -1
  32. package/lib-amd/editor/ExperimentalFeature.js.map +1 -1
  33. package/lib-amd/index.d.ts +1 -0
  34. package/lib-amd/index.js.map +1 -1
  35. package/lib-amd/parameter/ContentModelFormatState.d.ts +6 -1
  36. package/lib-amd/parameter/ContentModelFormatState.js.map +1 -1
  37. package/lib-amd/parameter/TrustedHTMLHandler.d.ts +8 -0
  38. package/lib-amd/parameter/TrustedHTMLHandler.js.map +1 -1
  39. package/lib-mjs/contentModel/format/ContentModelBlockFormat.d.ts +2 -1
  40. package/lib-mjs/contentModel/format/ContentModelBlockFormat.js.map +1 -1
  41. package/lib-mjs/contentModel/format/ContentModelImageFormat.d.ts +2 -1
  42. package/lib-mjs/contentModel/format/ContentModelImageFormat.js.map +1 -1
  43. package/lib-mjs/contentModel/format/FormatHandlerTypeMap.d.ts +5 -0
  44. package/lib-mjs/contentModel/format/FormatHandlerTypeMap.js.map +1 -1
  45. package/lib-mjs/contentModel/format/formatParts/ImageStateFormat.d.ts +9 -0
  46. package/lib-mjs/contentModel/format/formatParts/ImageStateFormat.js +2 -0
  47. package/lib-mjs/contentModel/format/formatParts/ImageStateFormat.js.map +1 -0
  48. package/lib-mjs/context/DomIndexer.d.ts +5 -0
  49. package/lib-mjs/context/DomIndexer.js.map +1 -1
  50. package/lib-mjs/editor/ExperimentalFeature.d.ts +7 -1
  51. package/lib-mjs/editor/ExperimentalFeature.js.map +1 -1
  52. package/lib-mjs/index.d.ts +1 -0
  53. package/lib-mjs/index.js.map +1 -1
  54. package/lib-mjs/parameter/ContentModelFormatState.d.ts +6 -1
  55. package/lib-mjs/parameter/ContentModelFormatState.js.map +1 -1
  56. package/lib-mjs/parameter/TrustedHTMLHandler.d.ts +8 -0
  57. package/lib-mjs/parameter/TrustedHTMLHandler.js.map +1 -1
  58. package/package.json +1 -1
@@ -2,6 +2,7 @@ import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat'
2
2
  import type { BorderFormat } from './formatParts/BorderFormat';
3
3
  import type { DirectionFormat } from './formatParts/DirectionFormat';
4
4
  import type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';
5
+ import type { IdFormat } from './formatParts/IdFormat';
5
6
  import type { LineHeightFormat } from './formatParts/LineHeightFormat';
6
7
  import type { MarginFormat } from './formatParts/MarginFormat';
7
8
  import type { PaddingFormat } from './formatParts/PaddingFormat';
@@ -11,4 +12,4 @@ import type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';
11
12
  /**
12
13
  * The format object for a paragraph in Content Model
13
14
  */
14
- export declare type ContentModelBlockFormat = BackgroundColorFormat & DirectionFormat & TextAlignFormat & HtmlAlignFormat & MarginFormat & PaddingFormat & LineHeightFormat & WhiteSpaceFormat & BorderFormat & TextIndentFormat;
15
+ export declare type ContentModelBlockFormat = BackgroundColorFormat & DirectionFormat & TextAlignFormat & HtmlAlignFormat & MarginFormat & PaddingFormat & LineHeightFormat & WhiteSpaceFormat & BorderFormat & TextIndentFormat & IdFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlockFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelBlockFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\n\n/**\n * The format object for a paragraph in Content Model\n */\nexport type ContentModelBlockFormat = BackgroundColorFormat &\n DirectionFormat &\n TextAlignFormat &\n HtmlAlignFormat &\n MarginFormat &\n PaddingFormat &\n LineHeightFormat &\n WhiteSpaceFormat &\n BorderFormat &\n TextIndentFormat;\n"]}
1
+ {"version":3,"file":"ContentModelBlockFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelBlockFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\n\n/**\n * The format object for a paragraph in Content Model\n */\nexport type ContentModelBlockFormat = BackgroundColorFormat &\n DirectionFormat &\n TextAlignFormat &\n HtmlAlignFormat &\n MarginFormat &\n PaddingFormat &\n LineHeightFormat &\n WhiteSpaceFormat &\n BorderFormat &\n TextIndentFormat &\n IdFormat;\n"]}
@@ -8,7 +8,8 @@ import type { MarginFormat } from './formatParts/MarginFormat';
8
8
  import type { PaddingFormat } from './formatParts/PaddingFormat';
9
9
  import type { SizeFormat } from './formatParts/SizeFormat';
10
10
  import type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';
11
+ import type { ImageStateFormat } from './formatParts/ImageStateFormat';
11
12
  /**
12
13
  * The format object for an image in Content Model
13
14
  */
14
- export declare type ContentModelImageFormat = ContentModelSegmentFormat & IdFormat & SizeFormat & MarginFormat & PaddingFormat & BorderFormat & BoxShadowFormat & DisplayFormat & FloatFormat & VerticalAlignFormat;
15
+ export declare type ContentModelImageFormat = ContentModelSegmentFormat & IdFormat & SizeFormat & MarginFormat & PaddingFormat & BorderFormat & BoxShadowFormat & DisplayFormat & FloatFormat & VerticalAlignFormat & ImageStateFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelImageFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelImageFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { ContentModelSegmentFormat } from './ContentModelSegmentFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\n\n/**\n * The format object for an image in Content Model\n */\nexport type ContentModelImageFormat = ContentModelSegmentFormat &\n IdFormat &\n SizeFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n BoxShadowFormat &\n DisplayFormat &\n FloatFormat &\n VerticalAlignFormat;\n"]}
1
+ {"version":3,"file":"ContentModelImageFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelImageFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { ContentModelSegmentFormat } from './ContentModelSegmentFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { ImageStateFormat } from './formatParts/ImageStateFormat';\n\n/**\n * The format object for an image in Content Model\n */\nexport type ContentModelImageFormat = ContentModelSegmentFormat &\n IdFormat &\n SizeFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n BoxShadowFormat &\n DisplayFormat &\n FloatFormat &\n VerticalAlignFormat &\n ImageStateFormat;\n"]}
@@ -14,6 +14,7 @@ import type { FontSizeFormat } from './formatParts/FontSizeFormat';
14
14
  import type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';
15
15
  import type { IdFormat } from './formatParts/IdFormat';
16
16
  import type { ItalicFormat } from './formatParts/ItalicFormat';
17
+ import type { ImageStateFormat } from './formatParts/ImageStateFormat';
17
18
  import type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';
18
19
  import type { LineHeightFormat } from './formatParts/LineHeightFormat';
19
20
  import type { LinkFormat } from './formatParts/LinkFormat';
@@ -98,6 +99,10 @@ export interface FormatHandlerTypeMap {
98
99
  * Format for IdFormat
99
100
  */
100
101
  id: IdFormat;
102
+ /**
103
+ * Format of ImageStateFormat
104
+ */
105
+ imageState: ImageStateFormat;
101
106
  /**
102
107
  * Format for ItalicFormat
103
108
  */
@@ -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 { 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"]}
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 { ImageStateFormat } from './formatParts/ImageStateFormat';\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 of ImageStateFormat\n */\n imageState: ImageStateFormat;\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,9 @@
1
+ /**
2
+ * The hidden property of an image
3
+ */
4
+ export declare type ImageStateFormat = {
5
+ /**
6
+ * A hidden marker for the image state
7
+ */
8
+ imageState?: string;
9
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ImageStateFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageStateFormat.js","sourceRoot":"","sources":["../../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/formatParts/ImageStateFormat.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The hidden property of an image\n */\nexport type ImageStateFormat = {\n /**\n * A hidden marker for the image state\n */\n imageState?: string;\n};\n"]}
@@ -42,6 +42,11 @@ export interface DomIndexer {
42
42
  * Node1 will become "FooBar", Node2 will be removed from DOM tree
43
43
  */
44
44
  onMergeText: (targetText: Text, sourceText: Text) => void;
45
+ /**
46
+ * Clear index from the given container and all its descendants
47
+ * @param container The root container to clear index from
48
+ */
49
+ clearIndex: (container: Node) => void;
45
50
  /**
46
51
  * When document content or selection is changed by user, we need to use this function to update the content model
47
52
  * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.
@@ -1 +1 @@
1
- {"version":3,"file":"DomIndexer.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/DomIndexer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockGroup } from '../contentModel/blockGroup/ContentModelBlockGroup';\nimport type { CacheSelection } from '../pluginState/CachePluginState';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { ContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { ContentModelSegment } from '../contentModel/segment/ContentModelSegment';\nimport type { ContentModelTable } from '../contentModel/block/ContentModelTable';\nimport type { DOMSelection } from '../selection/DOMSelection';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\n\n/**\n * Represents an indexer object which provides methods to help build backward relationship\n * from DOM node to Content Model\n */\nexport interface DomIndexer {\n /**\n * Invoked when processing a segment\n * @param segmentNode The new DOM node for this segment\n * @param paragraph Parent paragraph of this segment\n * @param segments The source segments\n */\n onSegment: (\n segmentNode: Node,\n paragraph: ContentModelParagraph,\n segments: ContentModelSegment[]\n ) => void;\n\n /**\n * Invoked when new paragraph node is created in DOM tree\n * @param paragraphElement The new DOM node for this paragraph\n */\n onParagraph: (paragraphElement: HTMLElement) => void;\n\n /**\n * Invoked when new table node is created in DOM tree\n * @param tableElement The new DOM node for this table\n */\n onTable: (tableElement: HTMLTableElement, tableModel: ContentModelTable) => void;\n\n /**\n * Invoke when new block entity is created in DOM tree\n * @param entity The related entity\n * @param parent Parent of entity. For block element, this should be the parent block group. For inline entity, this should be the parent paragraph\n */\n onBlockEntity: (entity: ContentModelEntity, group: ContentModelBlockGroup) => void;\n\n /**\n * Invoke when merge two continuous text nodes, we need to merge their indexes as well\n * @param targetText Target text node to merge into\n * @param sourceText Source text node to merge from\n * @example Assume we have two text nodes: Node1=\"Foo\", Node2=\"Bar\", after merge,\n * Node1 will become \"FooBar\", Node2 will be removed from DOM tree\n */\n onMergeText: (targetText: Text, sourceText: Text) => void;\n\n /**\n * When document content or selection is changed by user, we need to use this function to update the content model\n * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.\n * @param model Current cached content model\n * @param newSelection Latest selection\n * @param oldSelection @optional Original selection before this change\n * @returns True if reconcile successfully, otherwise false\n */\n reconcileSelection: (\n model: ContentModelDocument,\n newSelection: DOMSelection,\n oldSelection?: CacheSelection\n ) => boolean;\n\n /**\n * When id is changed from DOM element, update the new ID to related content model if possible\n * @param element The element that has id changed\n * @returns True if successfully updated, otherwise false\n */\n reconcileElementId: (element: HTMLElement) => boolean;\n\n /**\n * When child list of editor content is changed, we can use this method to do sync the change from editor into content model.\n * This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any,\n * and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment\n * in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model\n * @param addedNodes Nodes added by browser during mutation\n * @param removedNodes Nodes removed by browser during mutation\n * @returns True if the changed nodes are successfully reconciled, otherwise false\n */\n reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean;\n}\n"]}
1
+ {"version":3,"file":"DomIndexer.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/DomIndexer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockGroup } from '../contentModel/blockGroup/ContentModelBlockGroup';\nimport type { CacheSelection } from '../pluginState/CachePluginState';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { ContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { ContentModelSegment } from '../contentModel/segment/ContentModelSegment';\nimport type { ContentModelTable } from '../contentModel/block/ContentModelTable';\nimport type { DOMSelection } from '../selection/DOMSelection';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\n\n/**\n * Represents an indexer object which provides methods to help build backward relationship\n * from DOM node to Content Model\n */\nexport interface DomIndexer {\n /**\n * Invoked when processing a segment\n * @param segmentNode The new DOM node for this segment\n * @param paragraph Parent paragraph of this segment\n * @param segments The source segments\n */\n onSegment: (\n segmentNode: Node,\n paragraph: ContentModelParagraph,\n segments: ContentModelSegment[]\n ) => void;\n\n /**\n * Invoked when new paragraph node is created in DOM tree\n * @param paragraphElement The new DOM node for this paragraph\n */\n onParagraph: (paragraphElement: HTMLElement) => void;\n\n /**\n * Invoked when new table node is created in DOM tree\n * @param tableElement The new DOM node for this table\n */\n onTable: (tableElement: HTMLTableElement, tableModel: ContentModelTable) => void;\n\n /**\n * Invoke when new block entity is created in DOM tree\n * @param entity The related entity\n * @param parent Parent of entity. For block element, this should be the parent block group. For inline entity, this should be the parent paragraph\n */\n onBlockEntity: (entity: ContentModelEntity, group: ContentModelBlockGroup) => void;\n\n /**\n * Invoke when merge two continuous text nodes, we need to merge their indexes as well\n * @param targetText Target text node to merge into\n * @param sourceText Source text node to merge from\n * @example Assume we have two text nodes: Node1=\"Foo\", Node2=\"Bar\", after merge,\n * Node1 will become \"FooBar\", Node2 will be removed from DOM tree\n */\n onMergeText: (targetText: Text, sourceText: Text) => void;\n\n /**\n * Clear index from the given container and all its descendants\n * @param container The root container to clear index from\n */\n clearIndex: (container: Node) => void;\n\n /**\n * When document content or selection is changed by user, we need to use this function to update the content model\n * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.\n * @param model Current cached content model\n * @param newSelection Latest selection\n * @param oldSelection @optional Original selection before this change\n * @returns True if reconcile successfully, otherwise false\n */\n reconcileSelection: (\n model: ContentModelDocument,\n newSelection: DOMSelection,\n oldSelection?: CacheSelection\n ) => boolean;\n\n /**\n * When id is changed from DOM element, update the new ID to related content model if possible\n * @param element The element that has id changed\n * @returns True if successfully updated, otherwise false\n */\n reconcileElementId: (element: HTMLElement) => boolean;\n\n /**\n * When child list of editor content is changed, we can use this method to do sync the change from editor into content model.\n * This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any,\n * and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment\n * in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model\n * @param addedNodes Nodes added by browser during mutation\n * @param removedNodes Nodes removed by browser during mutation\n * @returns True if the changed nodes are successfully reconciled, otherwise false\n */\n reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean;\n}\n"]}
@@ -15,6 +15,12 @@ export declare type ExperimentalFeature =
15
15
  */
16
16
  | 'LegacyImageSelection'
17
17
  /**
18
+ * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
18
19
  * Use Content Model handle ENTER key
19
20
  */
20
- | 'HandleEnterKey';
21
+ | 'HandleEnterKey'
22
+ /**
23
+ * Prevent default browser behavior for copy/cut event,
24
+ * and set the clipboard data with custom implementation.
25
+ */
26
+ | 'CustomCopyCut';
@@ -1 +1 @@
1
- {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
1
+ {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey'\n /**\n * Prevent default browser behavior for copy/cut event,\n * and set the clipboard data with custom implementation.\n */\n | 'CustomCopyCut';\n"]}
package/lib/index.d.ts CHANGED
@@ -50,6 +50,7 @@ export { ListStyleFormat } from './contentModel/format/formatParts/ListStyleForm
50
50
  export { FloatFormat } from './contentModel/format/formatParts/FloatFormat';
51
51
  export { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';
52
52
  export { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';
53
+ export { ImageStateFormat } from './contentModel/format/formatParts/ImageStateFormat';
53
54
  export { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';
54
55
  export { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';
55
56
  export { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-types/lib/index.ts"],"names":[],"mappings":"","sourcesContent":["export { ContentModelSegmentFormat } from './contentModel/format/ContentModelSegmentFormat';\nexport {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from './contentModel/format/ContentModelWithFormat';\nexport { ContentModelTableFormat } from './contentModel/format/ContentModelTableFormat';\nexport {\n ContentModelWithDataset,\n ReadonlyContentModelWithDataset,\n ShallowMutableContentModelWithDataset,\n} from './contentModel/format/ContentModelWithDataset';\nexport { ContentModelBlockFormat } from './contentModel/format/ContentModelBlockFormat';\nexport { ContentModelTableCellFormat } from './contentModel/format/ContentModelTableCellFormat';\nexport { ContentModelListItemFormat } from './contentModel/format/ContentModelListItemFormat';\nexport { ContentModelListItemLevelFormat } from './contentModel/format/ContentModelListItemLevelFormat';\nexport { ContentModelHyperLinkFormat } from './contentModel/format/ContentModelHyperLinkFormat';\nexport { ContentModelCodeFormat } from './contentModel/format/ContentModelCodeFormat';\nexport { ContentModelFormatContainerFormat } from './contentModel/format/ContentModelFormatContainerFormat';\nexport { ContentModelDividerFormat } from './contentModel/format/ContentModelDividerFormat';\nexport { ContentModelFormatBase } from './contentModel/format/ContentModelFormatBase';\nexport { ContentModelFormatMap } from './contentModel/format/ContentModelFormatMap';\nexport { ContentModelImageFormat } from './contentModel/format/ContentModelImageFormat';\nexport { ContentModelEntityFormat } from './contentModel/format/ContentModelEntityFormat';\nexport { FormatHandlerTypeMap, FormatKey } from './contentModel/format/FormatHandlerTypeMap';\n\nexport { AriaFormat } from './contentModel/format/formatParts/AriaFormat';\nexport { BackgroundColorFormat } from './contentModel/format/formatParts/BackgroundColorFormat';\nexport { BoldFormat } from './contentModel/format/formatParts/BoldFormat';\nexport { FontFamilyFormat } from './contentModel/format/formatParts/FontFamilyFormat';\nexport { FontSizeFormat } from './contentModel/format/formatParts/FontSizeFormat';\nexport { ItalicFormat } from './contentModel/format/formatParts/ItalicFormat';\nexport { LetterSpacingFormat } from './contentModel/format/formatParts/LetterSpacingFormat';\nexport { LineHeightFormat } from './contentModel/format/formatParts/LineHeightFormat';\nexport { StrikeFormat } from './contentModel/format/formatParts/StrikeFormat';\nexport { SuperOrSubScriptFormat } from './contentModel/format/formatParts/SuperOrSubScriptFormat';\nexport { TextColorFormat } from './contentModel/format/formatParts/TextColorFormat';\nexport { UnderlineFormat } from './contentModel/format/formatParts/UnderlineFormat';\nexport { BorderBoxFormat } from './contentModel/format/formatParts/BorderBoxFormat';\nexport { VerticalAlignFormat } from './contentModel/format/formatParts/VerticalAlignFormat';\nexport { WordBreakFormat } from './contentModel/format/formatParts/WordBreakFormat';\nexport { BorderFormat } from './contentModel/format/formatParts/BorderFormat';\nexport { DirectionFormat } from './contentModel/format/formatParts/DirectionFormat';\nexport { HtmlAlignFormat } from './contentModel/format/formatParts/HtmlAlignFormat';\nexport { MarginFormat } from './contentModel/format/formatParts/MarginFormat';\nexport { PaddingFormat } from './contentModel/format/formatParts/PaddingFormat';\nexport { TextAlignFormat } from './contentModel/format/formatParts/TextAlignFormat';\nexport { TextIndentFormat } from './contentModel/format/formatParts/TextIndentFormat';\nexport { WhiteSpaceFormat } from './contentModel/format/formatParts/WhiteSpaceFormat';\nexport { DisplayFormat } from './contentModel/format/formatParts/DisplayFormat';\nexport { IdFormat } from './contentModel/format/formatParts/IdFormat';\nexport { SpacingFormat } from './contentModel/format/formatParts/SpacingFormat';\nexport { TableLayoutFormat } from './contentModel/format/formatParts/TableLayoutFormat';\nexport { LinkFormat } from './contentModel/format/formatParts/LinkFormat';\nexport { SizeFormat } from './contentModel/format/formatParts/SizeFormat';\nexport { BoxShadowFormat } from './contentModel/format/formatParts/BoxShadowFormat';\nexport { ListThreadFormat } from './contentModel/format/formatParts/ListThreadFormat';\nexport { ListStyleFormat } from './contentModel/format/formatParts/ListStyleFormat';\nexport { FloatFormat } from './contentModel/format/formatParts/FloatFormat';\nexport { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';\nexport { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-types/lib/index.ts"],"names":[],"mappings":"","sourcesContent":["export { ContentModelSegmentFormat } from './contentModel/format/ContentModelSegmentFormat';\nexport {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from './contentModel/format/ContentModelWithFormat';\nexport { ContentModelTableFormat } from './contentModel/format/ContentModelTableFormat';\nexport {\n ContentModelWithDataset,\n ReadonlyContentModelWithDataset,\n ShallowMutableContentModelWithDataset,\n} from './contentModel/format/ContentModelWithDataset';\nexport { ContentModelBlockFormat } from './contentModel/format/ContentModelBlockFormat';\nexport { ContentModelTableCellFormat } from './contentModel/format/ContentModelTableCellFormat';\nexport { ContentModelListItemFormat } from './contentModel/format/ContentModelListItemFormat';\nexport { ContentModelListItemLevelFormat } from './contentModel/format/ContentModelListItemLevelFormat';\nexport { ContentModelHyperLinkFormat } from './contentModel/format/ContentModelHyperLinkFormat';\nexport { ContentModelCodeFormat } from './contentModel/format/ContentModelCodeFormat';\nexport { ContentModelFormatContainerFormat } from './contentModel/format/ContentModelFormatContainerFormat';\nexport { ContentModelDividerFormat } from './contentModel/format/ContentModelDividerFormat';\nexport { ContentModelFormatBase } from './contentModel/format/ContentModelFormatBase';\nexport { ContentModelFormatMap } from './contentModel/format/ContentModelFormatMap';\nexport { ContentModelImageFormat } from './contentModel/format/ContentModelImageFormat';\nexport { ContentModelEntityFormat } from './contentModel/format/ContentModelEntityFormat';\nexport { FormatHandlerTypeMap, FormatKey } from './contentModel/format/FormatHandlerTypeMap';\n\nexport { AriaFormat } from './contentModel/format/formatParts/AriaFormat';\nexport { BackgroundColorFormat } from './contentModel/format/formatParts/BackgroundColorFormat';\nexport { BoldFormat } from './contentModel/format/formatParts/BoldFormat';\nexport { FontFamilyFormat } from './contentModel/format/formatParts/FontFamilyFormat';\nexport { FontSizeFormat } from './contentModel/format/formatParts/FontSizeFormat';\nexport { ItalicFormat } from './contentModel/format/formatParts/ItalicFormat';\nexport { LetterSpacingFormat } from './contentModel/format/formatParts/LetterSpacingFormat';\nexport { LineHeightFormat } from './contentModel/format/formatParts/LineHeightFormat';\nexport { StrikeFormat } from './contentModel/format/formatParts/StrikeFormat';\nexport { SuperOrSubScriptFormat } from './contentModel/format/formatParts/SuperOrSubScriptFormat';\nexport { TextColorFormat } from './contentModel/format/formatParts/TextColorFormat';\nexport { UnderlineFormat } from './contentModel/format/formatParts/UnderlineFormat';\nexport { BorderBoxFormat } from './contentModel/format/formatParts/BorderBoxFormat';\nexport { VerticalAlignFormat } from './contentModel/format/formatParts/VerticalAlignFormat';\nexport { WordBreakFormat } from './contentModel/format/formatParts/WordBreakFormat';\nexport { BorderFormat } from './contentModel/format/formatParts/BorderFormat';\nexport { DirectionFormat } from './contentModel/format/formatParts/DirectionFormat';\nexport { HtmlAlignFormat } from './contentModel/format/formatParts/HtmlAlignFormat';\nexport { MarginFormat } from './contentModel/format/formatParts/MarginFormat';\nexport { PaddingFormat } from './contentModel/format/formatParts/PaddingFormat';\nexport { TextAlignFormat } from './contentModel/format/formatParts/TextAlignFormat';\nexport { TextIndentFormat } from './contentModel/format/formatParts/TextIndentFormat';\nexport { WhiteSpaceFormat } from './contentModel/format/formatParts/WhiteSpaceFormat';\nexport { DisplayFormat } from './contentModel/format/formatParts/DisplayFormat';\nexport { IdFormat } from './contentModel/format/formatParts/IdFormat';\nexport { SpacingFormat } from './contentModel/format/formatParts/SpacingFormat';\nexport { TableLayoutFormat } from './contentModel/format/formatParts/TableLayoutFormat';\nexport { LinkFormat } from './contentModel/format/formatParts/LinkFormat';\nexport { SizeFormat } from './contentModel/format/formatParts/SizeFormat';\nexport { BoxShadowFormat } from './contentModel/format/formatParts/BoxShadowFormat';\nexport { ListThreadFormat } from './contentModel/format/formatParts/ListThreadFormat';\nexport { ListStyleFormat } from './contentModel/format/formatParts/ListStyleFormat';\nexport { FloatFormat } from './contentModel/format/formatParts/FloatFormat';\nexport { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';\nexport { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';\nexport { ImageStateFormat } from './contentModel/format/formatParts/ImageStateFormat';\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"]}
@@ -1,3 +1,4 @@
1
+ import type { ImageMetadataFormat } from '../contentModel/format/metadata/ImageMetadataFormat';
1
2
  import type { TableMetadataFormat } from '../contentModel/format/metadata/TableMetadataFormat';
2
3
  import type { ImageFormatState } from './ImageFormatState';
3
4
  /**
@@ -121,9 +122,13 @@ export interface ContentModelFormatState {
121
122
  */
122
123
  fontWeight?: string;
123
124
  /**
124
- * Format of image, if there is table at cursor position
125
+ * Format of image, if there is image at cursor position
125
126
  */
126
127
  imageFormat?: ImageFormatState;
128
+ /**
129
+ * Editing metadata of image, if there is image at cursor position
130
+ */
131
+ imageEditingMetadata?: ImageMetadataFormat | null;
127
132
  /**
128
133
  * Letter spacing
129
134
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelFormatState.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/ContentModelFormatState.ts"],"names":[],"mappings":"","sourcesContent":["import type { TableMetadataFormat } from '../contentModel/format/metadata/TableMetadataFormat';\nimport type { ImageFormatState } from './ImageFormatState';\n\n/**\n * The format object state in Content Model\n */\nexport interface ContentModelFormatState {\n /**\n * Whether the text is bolded\n */\n isBold?: boolean;\n\n /**\n * Whether the text is italic\n */\n isItalic?: boolean;\n\n /**\n * Whether the text has underline\n */\n isUnderline?: boolean;\n\n /**\n * Whether the text has strike through line\n */\n isStrikeThrough?: boolean;\n\n /**\n * Whether the text is in subscript mode\n */\n isSubscript?: boolean;\n\n /**\n * Whether the text is in superscript mode\n */\n isSuperscript?: boolean;\n\n /**\n * Whether the text is in bullet mode\n */\n isBullet?: boolean;\n\n /**\n * Whether the text is in numbering mode\n */\n isNumbering?: boolean;\n\n /**\n * Whether the text is in block quote\n */\n isBlockQuote?: boolean;\n\n /**\n * Whether the text is in Code element\n */\n isCodeInline?: boolean;\n\n /**\n * Whether the text is in Code block\n */\n isCodeBlock?: boolean;\n\n /**\n * Whether unlink command can be called to the text\n */\n canUnlink?: boolean;\n\n /**\n * Whether the selected text is multiline\n */\n isMultilineSelection?: boolean;\n\n /**\n * Whether add image alt text command can be called to the text\n */\n canAddImageAltText?: boolean;\n\n /**\n * Heading level (0-6, 0 means no heading)\n */\n headingLevel?: number;\n\n /**\n * Whether the cursor is in table\n */\n isInTable?: boolean;\n\n /**\n * Format of table, if there is table at cursor position\n */\n tableFormat?: TableMetadataFormat;\n\n /**\n * If there is a table, whether the table has header row\n */\n tableHasHeader?: boolean;\n\n /**\n * Whether we can execute table cell merge operation\n */\n canMergeTableCell?: boolean;\n\n /**\n * Font name\n */\n fontName?: string;\n\n /**\n * Font size\n */\n fontSize?: string;\n\n /**\n * Background color\n */\n backgroundColor?: string;\n\n /**\n * Text color\n */\n textColor?: string;\n\n /**\n * Line height\n */\n lineHeight?: string;\n\n /**\n * Margin Top\n */\n marginTop?: string;\n\n /**\n * Margin Bottom\n */\n marginBottom?: string;\n\n /**\n * Text Align\n */\n textAlign?: string;\n\n /**\n * Direction of the element ('ltr' or 'rtl')\n */\n direction?: string;\n\n /**\n * Font weight\n */\n fontWeight?: string;\n\n /**\n * Format of image, if there is table at cursor position\n */\n imageFormat?: ImageFormatState;\n\n /**\n * Letter spacing\n */\n letterSpacing?: string;\n\n /**\n * Whether the content can be undone\n */\n canUndo?: boolean;\n\n /**\n * Whether the content ca nbe redone\n */\n canRedo?: boolean;\n\n /**\n * Whether editor is in dark mode\n */\n isDarkMode?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ContentModelFormatState.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/ContentModelFormatState.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImageMetadataFormat } from '../contentModel/format/metadata/ImageMetadataFormat';\nimport type { TableMetadataFormat } from '../contentModel/format/metadata/TableMetadataFormat';\nimport type { ImageFormatState } from './ImageFormatState';\n\n/**\n * The format object state in Content Model\n */\nexport interface ContentModelFormatState {\n /**\n * Whether the text is bolded\n */\n isBold?: boolean;\n\n /**\n * Whether the text is italic\n */\n isItalic?: boolean;\n\n /**\n * Whether the text has underline\n */\n isUnderline?: boolean;\n\n /**\n * Whether the text has strike through line\n */\n isStrikeThrough?: boolean;\n\n /**\n * Whether the text is in subscript mode\n */\n isSubscript?: boolean;\n\n /**\n * Whether the text is in superscript mode\n */\n isSuperscript?: boolean;\n\n /**\n * Whether the text is in bullet mode\n */\n isBullet?: boolean;\n\n /**\n * Whether the text is in numbering mode\n */\n isNumbering?: boolean;\n\n /**\n * Whether the text is in block quote\n */\n isBlockQuote?: boolean;\n\n /**\n * Whether the text is in Code element\n */\n isCodeInline?: boolean;\n\n /**\n * Whether the text is in Code block\n */\n isCodeBlock?: boolean;\n\n /**\n * Whether unlink command can be called to the text\n */\n canUnlink?: boolean;\n\n /**\n * Whether the selected text is multiline\n */\n isMultilineSelection?: boolean;\n\n /**\n * Whether add image alt text command can be called to the text\n */\n canAddImageAltText?: boolean;\n\n /**\n * Heading level (0-6, 0 means no heading)\n */\n headingLevel?: number;\n\n /**\n * Whether the cursor is in table\n */\n isInTable?: boolean;\n\n /**\n * Format of table, if there is table at cursor position\n */\n tableFormat?: TableMetadataFormat;\n\n /**\n * If there is a table, whether the table has header row\n */\n tableHasHeader?: boolean;\n\n /**\n * Whether we can execute table cell merge operation\n */\n canMergeTableCell?: boolean;\n\n /**\n * Font name\n */\n fontName?: string;\n\n /**\n * Font size\n */\n fontSize?: string;\n\n /**\n * Background color\n */\n backgroundColor?: string;\n\n /**\n * Text color\n */\n textColor?: string;\n\n /**\n * Line height\n */\n lineHeight?: string;\n\n /**\n * Margin Top\n */\n marginTop?: string;\n\n /**\n * Margin Bottom\n */\n marginBottom?: string;\n\n /**\n * Text Align\n */\n textAlign?: string;\n\n /**\n * Direction of the element ('ltr' or 'rtl')\n */\n direction?: string;\n\n /**\n * Font weight\n */\n fontWeight?: string;\n\n /**\n * Format of image, if there is image at cursor position\n */\n imageFormat?: ImageFormatState;\n\n /**\n * Editing metadata of image, if there is image at cursor position\n */\n imageEditingMetadata?: ImageMetadataFormat | null;\n\n /**\n * Letter spacing\n */\n letterSpacing?: string;\n\n /**\n * Whether the content can be undone\n */\n canUndo?: boolean;\n\n /**\n * Whether the content ca nbe redone\n */\n canRedo?: boolean;\n\n /**\n * Whether editor is in dark mode\n */\n isDarkMode?: boolean;\n}\n"]}
@@ -7,7 +7,15 @@ export declare type LegacyTrustedHTMLHandler = (html: string) => string;
7
7
  * A handler type to convert HTML string to a DOM object
8
8
  */
9
9
  export interface DOMCreator {
10
+ /**
11
+ * Callback to convert HTML string to a DOM object
12
+ */
10
13
  htmlToDOM: (html: string) => Document;
14
+ /**
15
+ * Flag to indicate if this handler is bypassed or not.
16
+ * If this is true, it means that when converting HTML string to DOM object, we don't need to do any conversion.
17
+ */
18
+ isBypassed?: boolean;
11
19
  }
12
20
  /**
13
21
  * A handler type to convert HTML string to a trust HTML string or a DOM object
@@ -1 +1 @@
1
- {"version":3,"file":"TrustedHTMLHandler.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/TrustedHTMLHandler.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @deprecated Use DOMCreator instead\n * A handler type to convert HTML string to a trust HTML string\n */\nexport type LegacyTrustedHTMLHandler = (html: string) => string;\n\n/**\n * A handler type to convert HTML string to a DOM object\n */\nexport interface DOMCreator {\n htmlToDOM: (html: string) => Document;\n}\n\n/**\n * A handler type to convert HTML string to a trust HTML string or a DOM object\n */\nexport type TrustedHTMLHandler = DOMCreator | LegacyTrustedHTMLHandler;\n"]}
1
+ {"version":3,"file":"TrustedHTMLHandler.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/parameter/TrustedHTMLHandler.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @deprecated Use DOMCreator instead\n * A handler type to convert HTML string to a trust HTML string\n */\nexport type LegacyTrustedHTMLHandler = (html: string) => string;\n\n/**\n * A handler type to convert HTML string to a DOM object\n */\nexport interface DOMCreator {\n /**\n * Callback to convert HTML string to a DOM object\n */\n htmlToDOM: (html: string) => Document;\n\n /**\n * Flag to indicate if this handler is bypassed or not.\n * If this is true, it means that when converting HTML string to DOM object, we don't need to do any conversion.\n */\n isBypassed?: boolean;\n}\n\n/**\n * A handler type to convert HTML string to a trust HTML string or a DOM object\n */\nexport type TrustedHTMLHandler = DOMCreator | LegacyTrustedHTMLHandler;\n"]}
@@ -2,6 +2,7 @@ import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat'
2
2
  import type { BorderFormat } from './formatParts/BorderFormat';
3
3
  import type { DirectionFormat } from './formatParts/DirectionFormat';
4
4
  import type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';
5
+ import type { IdFormat } from './formatParts/IdFormat';
5
6
  import type { LineHeightFormat } from './formatParts/LineHeightFormat';
6
7
  import type { MarginFormat } from './formatParts/MarginFormat';
7
8
  import type { PaddingFormat } from './formatParts/PaddingFormat';
@@ -11,4 +12,4 @@ import type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';
11
12
  /**
12
13
  * The format object for a paragraph in Content Model
13
14
  */
14
- export declare type ContentModelBlockFormat = BackgroundColorFormat & DirectionFormat & TextAlignFormat & HtmlAlignFormat & MarginFormat & PaddingFormat & LineHeightFormat & WhiteSpaceFormat & BorderFormat & TextIndentFormat;
15
+ export declare type ContentModelBlockFormat = BackgroundColorFormat & DirectionFormat & TextAlignFormat & HtmlAlignFormat & MarginFormat & PaddingFormat & LineHeightFormat & WhiteSpaceFormat & BorderFormat & TextIndentFormat & IdFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlockFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelBlockFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\n\n/**\n * The format object for a paragraph in Content Model\n */\nexport type ContentModelBlockFormat = BackgroundColorFormat &\n DirectionFormat &\n TextAlignFormat &\n HtmlAlignFormat &\n MarginFormat &\n PaddingFormat &\n LineHeightFormat &\n WhiteSpaceFormat &\n BorderFormat &\n TextIndentFormat;\n"]}
1
+ {"version":3,"file":"ContentModelBlockFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelBlockFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BackgroundColorFormat } from './formatParts/BackgroundColorFormat';\nimport type { BorderFormat } from './formatParts/BorderFormat';\nimport type { DirectionFormat } from './formatParts/DirectionFormat';\nimport type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { LineHeightFormat } from './formatParts/LineHeightFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { TextAlignFormat } from './formatParts/TextAlignFormat';\nimport type { TextIndentFormat } from './formatParts/TextIndentFormat';\nimport type { WhiteSpaceFormat } from './formatParts/WhiteSpaceFormat';\n\n/**\n * The format object for a paragraph in Content Model\n */\nexport type ContentModelBlockFormat = BackgroundColorFormat &\n DirectionFormat &\n TextAlignFormat &\n HtmlAlignFormat &\n MarginFormat &\n PaddingFormat &\n LineHeightFormat &\n WhiteSpaceFormat &\n BorderFormat &\n TextIndentFormat &\n IdFormat;\n"]}
@@ -8,7 +8,8 @@ import type { MarginFormat } from './formatParts/MarginFormat';
8
8
  import type { PaddingFormat } from './formatParts/PaddingFormat';
9
9
  import type { SizeFormat } from './formatParts/SizeFormat';
10
10
  import type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';
11
+ import type { ImageStateFormat } from './formatParts/ImageStateFormat';
11
12
  /**
12
13
  * The format object for an image in Content Model
13
14
  */
14
- export declare type ContentModelImageFormat = ContentModelSegmentFormat & IdFormat & SizeFormat & MarginFormat & PaddingFormat & BorderFormat & BoxShadowFormat & DisplayFormat & FloatFormat & VerticalAlignFormat;
15
+ export declare type ContentModelImageFormat = ContentModelSegmentFormat & IdFormat & SizeFormat & MarginFormat & PaddingFormat & BorderFormat & BoxShadowFormat & DisplayFormat & FloatFormat & VerticalAlignFormat & ImageStateFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelImageFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelImageFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { ContentModelSegmentFormat } from './ContentModelSegmentFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\n\n/**\n * The format object for an image in Content Model\n */\nexport type ContentModelImageFormat = ContentModelSegmentFormat &\n IdFormat &\n SizeFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n BoxShadowFormat &\n DisplayFormat &\n FloatFormat &\n VerticalAlignFormat;\n"]}
1
+ {"version":3,"file":"ContentModelImageFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelImageFormat.ts"],"names":[],"mappings":"","sourcesContent":["import type { BorderFormat } from './formatParts/BorderFormat';\nimport type { BoxShadowFormat } from './formatParts/BoxShadowFormat';\nimport type { ContentModelSegmentFormat } from './ContentModelSegmentFormat';\nimport type { DisplayFormat } from './formatParts/DisplayFormat';\nimport type { FloatFormat } from './formatParts/FloatFormat';\nimport type { IdFormat } from './formatParts/IdFormat';\nimport type { MarginFormat } from './formatParts/MarginFormat';\nimport type { PaddingFormat } from './formatParts/PaddingFormat';\nimport type { SizeFormat } from './formatParts/SizeFormat';\nimport type { VerticalAlignFormat } from './formatParts/VerticalAlignFormat';\nimport type { ImageStateFormat } from './formatParts/ImageStateFormat';\n\n/**\n * The format object for an image in Content Model\n */\nexport type ContentModelImageFormat = ContentModelSegmentFormat &\n IdFormat &\n SizeFormat &\n MarginFormat &\n PaddingFormat &\n BorderFormat &\n BoxShadowFormat &\n DisplayFormat &\n FloatFormat &\n VerticalAlignFormat &\n ImageStateFormat;\n"]}
@@ -14,6 +14,7 @@ import type { FontSizeFormat } from './formatParts/FontSizeFormat';
14
14
  import type { HtmlAlignFormat } from './formatParts/HtmlAlignFormat';
15
15
  import type { IdFormat } from './formatParts/IdFormat';
16
16
  import type { ItalicFormat } from './formatParts/ItalicFormat';
17
+ import type { ImageStateFormat } from './formatParts/ImageStateFormat';
17
18
  import type { LetterSpacingFormat } from './formatParts/LetterSpacingFormat';
18
19
  import type { LineHeightFormat } from './formatParts/LineHeightFormat';
19
20
  import type { LinkFormat } from './formatParts/LinkFormat';
@@ -98,6 +99,10 @@ export interface FormatHandlerTypeMap {
98
99
  * Format for IdFormat
99
100
  */
100
101
  id: IdFormat;
102
+ /**
103
+ * Format of ImageStateFormat
104
+ */
105
+ imageState: ImageStateFormat;
101
106
  /**
102
107
  * Format for ItalicFormat
103
108
  */
@@ -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 { 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"]}
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 { ImageStateFormat } from './formatParts/ImageStateFormat';\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 of ImageStateFormat\n */\n imageState: ImageStateFormat;\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,9 @@
1
+ /**
2
+ * The hidden property of an image
3
+ */
4
+ export declare type ImageStateFormat = {
5
+ /**
6
+ * A hidden marker for the image state
7
+ */
8
+ imageState?: string;
9
+ };
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=ImageStateFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageStateFormat.js","sourceRoot":"","sources":["../../../../../../packages/roosterjs-content-model-types/lib/contentModel/format/formatParts/ImageStateFormat.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The hidden property of an image\n */\nexport type ImageStateFormat = {\n /**\n * A hidden marker for the image state\n */\n imageState?: string;\n};\n"]}
@@ -42,6 +42,11 @@ export interface DomIndexer {
42
42
  * Node1 will become "FooBar", Node2 will be removed from DOM tree
43
43
  */
44
44
  onMergeText: (targetText: Text, sourceText: Text) => void;
45
+ /**
46
+ * Clear index from the given container and all its descendants
47
+ * @param container The root container to clear index from
48
+ */
49
+ clearIndex: (container: Node) => void;
45
50
  /**
46
51
  * When document content or selection is changed by user, we need to use this function to update the content model
47
52
  * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.
@@ -1 +1 @@
1
- {"version":3,"file":"DomIndexer.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/DomIndexer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockGroup } from '../contentModel/blockGroup/ContentModelBlockGroup';\nimport type { CacheSelection } from '../pluginState/CachePluginState';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { ContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { ContentModelSegment } from '../contentModel/segment/ContentModelSegment';\nimport type { ContentModelTable } from '../contentModel/block/ContentModelTable';\nimport type { DOMSelection } from '../selection/DOMSelection';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\n\n/**\n * Represents an indexer object which provides methods to help build backward relationship\n * from DOM node to Content Model\n */\nexport interface DomIndexer {\n /**\n * Invoked when processing a segment\n * @param segmentNode The new DOM node for this segment\n * @param paragraph Parent paragraph of this segment\n * @param segments The source segments\n */\n onSegment: (\n segmentNode: Node,\n paragraph: ContentModelParagraph,\n segments: ContentModelSegment[]\n ) => void;\n\n /**\n * Invoked when new paragraph node is created in DOM tree\n * @param paragraphElement The new DOM node for this paragraph\n */\n onParagraph: (paragraphElement: HTMLElement) => void;\n\n /**\n * Invoked when new table node is created in DOM tree\n * @param tableElement The new DOM node for this table\n */\n onTable: (tableElement: HTMLTableElement, tableModel: ContentModelTable) => void;\n\n /**\n * Invoke when new block entity is created in DOM tree\n * @param entity The related entity\n * @param parent Parent of entity. For block element, this should be the parent block group. For inline entity, this should be the parent paragraph\n */\n onBlockEntity: (entity: ContentModelEntity, group: ContentModelBlockGroup) => void;\n\n /**\n * Invoke when merge two continuous text nodes, we need to merge their indexes as well\n * @param targetText Target text node to merge into\n * @param sourceText Source text node to merge from\n * @example Assume we have two text nodes: Node1=\"Foo\", Node2=\"Bar\", after merge,\n * Node1 will become \"FooBar\", Node2 will be removed from DOM tree\n */\n onMergeText: (targetText: Text, sourceText: Text) => void;\n\n /**\n * When document content or selection is changed by user, we need to use this function to update the content model\n * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.\n * @param model Current cached content model\n * @param newSelection Latest selection\n * @param oldSelection @optional Original selection before this change\n * @returns True if reconcile successfully, otherwise false\n */\n reconcileSelection: (\n model: ContentModelDocument,\n newSelection: DOMSelection,\n oldSelection?: CacheSelection\n ) => boolean;\n\n /**\n * When id is changed from DOM element, update the new ID to related content model if possible\n * @param element The element that has id changed\n * @returns True if successfully updated, otherwise false\n */\n reconcileElementId: (element: HTMLElement) => boolean;\n\n /**\n * When child list of editor content is changed, we can use this method to do sync the change from editor into content model.\n * This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any,\n * and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment\n * in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model\n * @param addedNodes Nodes added by browser during mutation\n * @param removedNodes Nodes removed by browser during mutation\n * @returns True if the changed nodes are successfully reconciled, otherwise false\n */\n reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean;\n}\n"]}
1
+ {"version":3,"file":"DomIndexer.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/context/DomIndexer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockGroup } from '../contentModel/blockGroup/ContentModelBlockGroup';\nimport type { CacheSelection } from '../pluginState/CachePluginState';\nimport type { ContentModelDocument } from '../contentModel/blockGroup/ContentModelDocument';\nimport type { ContentModelParagraph } from '../contentModel/block/ContentModelParagraph';\nimport type { ContentModelSegment } from '../contentModel/segment/ContentModelSegment';\nimport type { ContentModelTable } from '../contentModel/block/ContentModelTable';\nimport type { DOMSelection } from '../selection/DOMSelection';\nimport type { ContentModelEntity } from '../contentModel/entity/ContentModelEntity';\n\n/**\n * Represents an indexer object which provides methods to help build backward relationship\n * from DOM node to Content Model\n */\nexport interface DomIndexer {\n /**\n * Invoked when processing a segment\n * @param segmentNode The new DOM node for this segment\n * @param paragraph Parent paragraph of this segment\n * @param segments The source segments\n */\n onSegment: (\n segmentNode: Node,\n paragraph: ContentModelParagraph,\n segments: ContentModelSegment[]\n ) => void;\n\n /**\n * Invoked when new paragraph node is created in DOM tree\n * @param paragraphElement The new DOM node for this paragraph\n */\n onParagraph: (paragraphElement: HTMLElement) => void;\n\n /**\n * Invoked when new table node is created in DOM tree\n * @param tableElement The new DOM node for this table\n */\n onTable: (tableElement: HTMLTableElement, tableModel: ContentModelTable) => void;\n\n /**\n * Invoke when new block entity is created in DOM tree\n * @param entity The related entity\n * @param parent Parent of entity. For block element, this should be the parent block group. For inline entity, this should be the parent paragraph\n */\n onBlockEntity: (entity: ContentModelEntity, group: ContentModelBlockGroup) => void;\n\n /**\n * Invoke when merge two continuous text nodes, we need to merge their indexes as well\n * @param targetText Target text node to merge into\n * @param sourceText Source text node to merge from\n * @example Assume we have two text nodes: Node1=\"Foo\", Node2=\"Bar\", after merge,\n * Node1 will become \"FooBar\", Node2 will be removed from DOM tree\n */\n onMergeText: (targetText: Text, sourceText: Text) => void;\n\n /**\n * Clear index from the given container and all its descendants\n * @param container The root container to clear index from\n */\n clearIndex: (container: Node) => void;\n\n /**\n * When document content or selection is changed by user, we need to use this function to update the content model\n * to reflect the latest document. This process can fail since the selected node may not have a related model data structure.\n * @param model Current cached content model\n * @param newSelection Latest selection\n * @param oldSelection @optional Original selection before this change\n * @returns True if reconcile successfully, otherwise false\n */\n reconcileSelection: (\n model: ContentModelDocument,\n newSelection: DOMSelection,\n oldSelection?: CacheSelection\n ) => boolean;\n\n /**\n * When id is changed from DOM element, update the new ID to related content model if possible\n * @param element The element that has id changed\n * @returns True if successfully updated, otherwise false\n */\n reconcileElementId: (element: HTMLElement) => boolean;\n\n /**\n * When child list of editor content is changed, we can use this method to do sync the change from editor into content model.\n * This is mostly used when user start to type in an empty line. In that case browser will remove the existing BR node in the empty line if any,\n * and create a new TEXT node for the typed text. Here we use these information to remove original Br segment and create a new Text segment\n * in content model. But if we find anything that cannot be handled, return false so caller will invalidate the cached model\n * @param addedNodes Nodes added by browser during mutation\n * @param removedNodes Nodes removed by browser during mutation\n * @returns True if the changed nodes are successfully reconciled, otherwise false\n */\n reconcileChildList: (addedNodes: ArrayLike<Node>, removedNodes: ArrayLike<Node>) => boolean;\n}\n"]}
@@ -15,6 +15,12 @@ export declare type ExperimentalFeature =
15
15
  */
16
16
  | 'LegacyImageSelection'
17
17
  /**
18
+ * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options
18
19
  * Use Content Model handle ENTER key
19
20
  */
20
- | 'HandleEnterKey';
21
+ | 'HandleEnterKey'
22
+ /**
23
+ * Prevent default browser behavior for copy/cut event,
24
+ * and set the clipboard data with custom implementation.
25
+ */
26
+ | 'CustomCopyCut';
@@ -1 +1 @@
1
- {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey';\n"]}
1
+ {"version":3,"file":"ExperimentalFeature.js","sourceRoot":"","sources":["../../../../packages/roosterjs-content-model-types/lib/editor/ExperimentalFeature.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Predefined experiment features\n * By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures\n * when create editor\n */\nexport type ExperimentalFeature =\n /**\n * When this feature is enabled, we will persist a content model in memory as long as we can,\n * and use cached element when write back if it is not changed.\n */\n | 'PersistCache'\n /**\n * @deprecated\n * Workaround for the Legacy Image Edit\n */\n | 'LegacyImageSelection'\n /**\n * @deprecated Please use the shouldHandleEnterKey option of the EditPlugin Options\n * Use Content Model handle ENTER key\n */\n | 'HandleEnterKey'\n /**\n * Prevent default browser behavior for copy/cut event,\n * and set the clipboard data with custom implementation.\n */\n | 'CustomCopyCut';\n"]}
@@ -50,6 +50,7 @@ export { ListStyleFormat } from './contentModel/format/formatParts/ListStyleForm
50
50
  export { FloatFormat } from './contentModel/format/formatParts/FloatFormat';
51
51
  export { EntityInfoFormat } from './contentModel/format/formatParts/EntityInfoFormat';
52
52
  export { UndeletableFormat } from './contentModel/format/formatParts/UndeletableFormat';
53
+ export { ImageStateFormat } from './contentModel/format/formatParts/ImageStateFormat';
53
54
  export { DatasetFormat, ReadonlyDatasetFormat } from './contentModel/format/metadata/DatasetFormat';
54
55
  export { TableMetadataFormat } from './contentModel/format/metadata/TableMetadataFormat';
55
56
  export { ListMetadataFormat } from './contentModel/format/metadata/ListMetadataFormat';