roosterjs-content-model-types 9.3.0 → 9.4.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 (250) hide show
  1. package/lib/contentModel/block/ContentModelBlock.d.ts +14 -6
  2. package/lib/contentModel/block/ContentModelBlock.js.map +1 -1
  3. package/lib/contentModel/block/ContentModelBlockBase.d.ts +21 -4
  4. package/lib/contentModel/block/ContentModelBlockBase.js.map +1 -1
  5. package/lib/contentModel/block/ContentModelDivider.d.ts +14 -5
  6. package/lib/contentModel/block/ContentModelDivider.js.map +1 -1
  7. package/lib/contentModel/block/ContentModelParagraph.d.ts +46 -8
  8. package/lib/contentModel/block/ContentModelParagraph.js.map +1 -1
  9. package/lib/contentModel/block/ContentModelTable.d.ts +30 -5
  10. package/lib/contentModel/block/ContentModelTable.js.map +1 -1
  11. package/lib/contentModel/block/ContentModelTableRow.d.ts +28 -4
  12. package/lib/contentModel/block/ContentModelTableRow.js.map +1 -1
  13. package/lib/contentModel/blockGroup/ContentModelBlockGroup.d.ts +13 -5
  14. package/lib/contentModel/blockGroup/ContentModelBlockGroup.js.map +1 -1
  15. package/lib/contentModel/blockGroup/ContentModelBlockGroupBase.d.ts +29 -4
  16. package/lib/contentModel/blockGroup/ContentModelBlockGroupBase.js.map +1 -1
  17. package/lib/contentModel/blockGroup/ContentModelDocument.d.ts +19 -4
  18. package/lib/contentModel/blockGroup/ContentModelDocument.js.map +1 -1
  19. package/lib/contentModel/blockGroup/ContentModelFormatContainer.d.ts +19 -5
  20. package/lib/contentModel/blockGroup/ContentModelFormatContainer.js.map +1 -1
  21. package/lib/contentModel/blockGroup/ContentModelGeneralBlock.d.ts +20 -5
  22. package/lib/contentModel/blockGroup/ContentModelGeneralBlock.js.map +1 -1
  23. package/lib/contentModel/blockGroup/ContentModelListItem.d.ts +31 -5
  24. package/lib/contentModel/blockGroup/ContentModelListItem.js.map +1 -1
  25. package/lib/contentModel/blockGroup/ContentModelTableCell.d.ts +21 -7
  26. package/lib/contentModel/blockGroup/ContentModelTableCell.js.map +1 -1
  27. package/lib/contentModel/common/MutableMark.d.ts +47 -0
  28. package/lib/contentModel/common/MutableMark.js +4 -0
  29. package/lib/contentModel/common/MutableMark.js.map +1 -0
  30. package/lib/contentModel/common/MutableType.d.ts +23 -0
  31. package/lib/contentModel/common/MutableType.js +3 -0
  32. package/lib/contentModel/common/MutableType.js.map +1 -0
  33. package/lib/contentModel/common/Selectable.d.ts +20 -1
  34. package/lib/contentModel/common/Selectable.js.map +1 -1
  35. package/lib/contentModel/decorator/ContentModelCode.d.ts +10 -2
  36. package/lib/contentModel/decorator/ContentModelCode.js.map +1 -1
  37. package/lib/contentModel/decorator/ContentModelDecorator.d.ts +7 -3
  38. package/lib/contentModel/decorator/ContentModelDecorator.js.map +1 -1
  39. package/lib/contentModel/decorator/ContentModelLink.d.ts +11 -3
  40. package/lib/contentModel/decorator/ContentModelLink.js.map +1 -1
  41. package/lib/contentModel/decorator/ContentModelListLevel.d.ts +16 -4
  42. package/lib/contentModel/decorator/ContentModelListLevel.js.map +1 -1
  43. package/lib/contentModel/decorator/ContentModelParagraphDecorator.d.ts +18 -5
  44. package/lib/contentModel/decorator/ContentModelParagraphDecorator.js.map +1 -1
  45. package/lib/contentModel/format/ContentModelWithDataset.d.ts +22 -3
  46. package/lib/contentModel/format/ContentModelWithDataset.js.map +1 -1
  47. package/lib/contentModel/format/ContentModelWithFormat.d.ts +9 -0
  48. package/lib/contentModel/format/ContentModelWithFormat.js.map +1 -1
  49. package/lib/contentModel/format/metadata/DatasetFormat.d.ts +4 -0
  50. package/lib/contentModel/format/metadata/DatasetFormat.js.map +1 -1
  51. package/lib/contentModel/format/metadata/TableMetadataFormat.js.map +1 -1
  52. package/lib/contentModel/segment/ContentModelBr.d.ts +6 -1
  53. package/lib/contentModel/segment/ContentModelBr.js.map +1 -1
  54. package/lib/contentModel/segment/ContentModelGeneralSegment.d.ts +12 -2
  55. package/lib/contentModel/segment/ContentModelGeneralSegment.js.map +1 -1
  56. package/lib/contentModel/segment/ContentModelImage.d.ts +14 -4
  57. package/lib/contentModel/segment/ContentModelImage.js.map +1 -1
  58. package/lib/contentModel/segment/ContentModelSegment.d.ts +13 -5
  59. package/lib/contentModel/segment/ContentModelSegment.js.map +1 -1
  60. package/lib/contentModel/segment/ContentModelSegmentBase.d.ts +39 -7
  61. package/lib/contentModel/segment/ContentModelSegmentBase.js.map +1 -1
  62. package/lib/contentModel/segment/ContentModelSelectionMarker.d.ts +6 -1
  63. package/lib/contentModel/segment/ContentModelSelectionMarker.js.map +1 -1
  64. package/lib/contentModel/segment/ContentModelText.d.ts +13 -3
  65. package/lib/contentModel/segment/ContentModelText.js.map +1 -1
  66. package/lib/editor/EditorOptions.d.ts +4 -0
  67. package/lib/editor/EditorOptions.js.map +1 -1
  68. package/lib/index.d.ts +34 -32
  69. package/lib/index.js.map +1 -1
  70. package/lib/parameter/DeleteSelectionStep.d.ts +4 -4
  71. package/lib/parameter/DeleteSelectionStep.js.map +1 -1
  72. package/lib/parameter/IterateSelectionsOption.d.ts +13 -4
  73. package/lib/parameter/IterateSelectionsOption.js.map +1 -1
  74. package/lib/parameter/OperationalBlocks.d.ts +19 -2
  75. package/lib/parameter/OperationalBlocks.js.map +1 -1
  76. package/lib/parameter/TypeOfBlockGroup.d.ts +3 -3
  77. package/lib/parameter/TypeOfBlockGroup.js.map +1 -1
  78. package/lib/pluginState/SelectionPluginState.d.ts +12 -0
  79. package/lib/pluginState/SelectionPluginState.js.map +1 -1
  80. package/lib/selection/InsertPoint.d.ts +6 -6
  81. package/lib/selection/InsertPoint.js.map +1 -1
  82. package/lib/selection/TableSelectionContext.d.ts +22 -1
  83. package/lib/selection/TableSelectionContext.js.map +1 -1
  84. package/lib-amd/contentModel/block/ContentModelBlock.d.ts +14 -6
  85. package/lib-amd/contentModel/block/ContentModelBlock.js.map +1 -1
  86. package/lib-amd/contentModel/block/ContentModelBlockBase.d.ts +21 -4
  87. package/lib-amd/contentModel/block/ContentModelBlockBase.js.map +1 -1
  88. package/lib-amd/contentModel/block/ContentModelDivider.d.ts +14 -5
  89. package/lib-amd/contentModel/block/ContentModelDivider.js.map +1 -1
  90. package/lib-amd/contentModel/block/ContentModelParagraph.d.ts +46 -8
  91. package/lib-amd/contentModel/block/ContentModelParagraph.js.map +1 -1
  92. package/lib-amd/contentModel/block/ContentModelTable.d.ts +30 -5
  93. package/lib-amd/contentModel/block/ContentModelTable.js.map +1 -1
  94. package/lib-amd/contentModel/block/ContentModelTableRow.d.ts +28 -4
  95. package/lib-amd/contentModel/block/ContentModelTableRow.js.map +1 -1
  96. package/lib-amd/contentModel/blockGroup/ContentModelBlockGroup.d.ts +13 -5
  97. package/lib-amd/contentModel/blockGroup/ContentModelBlockGroup.js.map +1 -1
  98. package/lib-amd/contentModel/blockGroup/ContentModelBlockGroupBase.d.ts +29 -4
  99. package/lib-amd/contentModel/blockGroup/ContentModelBlockGroupBase.js.map +1 -1
  100. package/lib-amd/contentModel/blockGroup/ContentModelDocument.d.ts +19 -4
  101. package/lib-amd/contentModel/blockGroup/ContentModelDocument.js.map +1 -1
  102. package/lib-amd/contentModel/blockGroup/ContentModelFormatContainer.d.ts +19 -5
  103. package/lib-amd/contentModel/blockGroup/ContentModelFormatContainer.js.map +1 -1
  104. package/lib-amd/contentModel/blockGroup/ContentModelGeneralBlock.d.ts +20 -5
  105. package/lib-amd/contentModel/blockGroup/ContentModelGeneralBlock.js.map +1 -1
  106. package/lib-amd/contentModel/blockGroup/ContentModelListItem.d.ts +31 -5
  107. package/lib-amd/contentModel/blockGroup/ContentModelListItem.js.map +1 -1
  108. package/lib-amd/contentModel/blockGroup/ContentModelTableCell.d.ts +21 -7
  109. package/lib-amd/contentModel/blockGroup/ContentModelTableCell.js.map +1 -1
  110. package/lib-amd/contentModel/common/MutableMark.d.ts +47 -0
  111. package/lib-amd/contentModel/common/MutableMark.js +6 -0
  112. package/lib-amd/contentModel/common/MutableMark.js.map +1 -0
  113. package/lib-amd/contentModel/common/MutableType.d.ts +23 -0
  114. package/lib-amd/contentModel/common/MutableType.js +5 -0
  115. package/lib-amd/contentModel/common/MutableType.js.map +1 -0
  116. package/lib-amd/contentModel/common/Selectable.d.ts +20 -1
  117. package/lib-amd/contentModel/common/Selectable.js.map +1 -1
  118. package/lib-amd/contentModel/decorator/ContentModelCode.d.ts +10 -2
  119. package/lib-amd/contentModel/decorator/ContentModelCode.js.map +1 -1
  120. package/lib-amd/contentModel/decorator/ContentModelDecorator.d.ts +7 -3
  121. package/lib-amd/contentModel/decorator/ContentModelDecorator.js.map +1 -1
  122. package/lib-amd/contentModel/decorator/ContentModelLink.d.ts +11 -3
  123. package/lib-amd/contentModel/decorator/ContentModelLink.js.map +1 -1
  124. package/lib-amd/contentModel/decorator/ContentModelListLevel.d.ts +16 -4
  125. package/lib-amd/contentModel/decorator/ContentModelListLevel.js.map +1 -1
  126. package/lib-amd/contentModel/decorator/ContentModelParagraphDecorator.d.ts +18 -5
  127. package/lib-amd/contentModel/decorator/ContentModelParagraphDecorator.js.map +1 -1
  128. package/lib-amd/contentModel/format/ContentModelWithDataset.d.ts +22 -3
  129. package/lib-amd/contentModel/format/ContentModelWithDataset.js.map +1 -1
  130. package/lib-amd/contentModel/format/ContentModelWithFormat.d.ts +9 -0
  131. package/lib-amd/contentModel/format/ContentModelWithFormat.js.map +1 -1
  132. package/lib-amd/contentModel/format/metadata/DatasetFormat.d.ts +4 -0
  133. package/lib-amd/contentModel/format/metadata/DatasetFormat.js.map +1 -1
  134. package/lib-amd/contentModel/format/metadata/TableMetadataFormat.js.map +1 -1
  135. package/lib-amd/contentModel/segment/ContentModelBr.d.ts +6 -1
  136. package/lib-amd/contentModel/segment/ContentModelBr.js.map +1 -1
  137. package/lib-amd/contentModel/segment/ContentModelGeneralSegment.d.ts +12 -2
  138. package/lib-amd/contentModel/segment/ContentModelGeneralSegment.js.map +1 -1
  139. package/lib-amd/contentModel/segment/ContentModelImage.d.ts +14 -4
  140. package/lib-amd/contentModel/segment/ContentModelImage.js.map +1 -1
  141. package/lib-amd/contentModel/segment/ContentModelSegment.d.ts +13 -5
  142. package/lib-amd/contentModel/segment/ContentModelSegment.js.map +1 -1
  143. package/lib-amd/contentModel/segment/ContentModelSegmentBase.d.ts +39 -7
  144. package/lib-amd/contentModel/segment/ContentModelSegmentBase.js.map +1 -1
  145. package/lib-amd/contentModel/segment/ContentModelSelectionMarker.d.ts +6 -1
  146. package/lib-amd/contentModel/segment/ContentModelSelectionMarker.js.map +1 -1
  147. package/lib-amd/contentModel/segment/ContentModelText.d.ts +13 -3
  148. package/lib-amd/contentModel/segment/ContentModelText.js.map +1 -1
  149. package/lib-amd/editor/EditorOptions.d.ts +4 -0
  150. package/lib-amd/editor/EditorOptions.js.map +1 -1
  151. package/lib-amd/index.d.ts +34 -32
  152. package/lib-amd/index.js.map +1 -1
  153. package/lib-amd/parameter/DeleteSelectionStep.d.ts +4 -4
  154. package/lib-amd/parameter/DeleteSelectionStep.js.map +1 -1
  155. package/lib-amd/parameter/IterateSelectionsOption.d.ts +13 -4
  156. package/lib-amd/parameter/IterateSelectionsOption.js.map +1 -1
  157. package/lib-amd/parameter/OperationalBlocks.d.ts +19 -2
  158. package/lib-amd/parameter/OperationalBlocks.js.map +1 -1
  159. package/lib-amd/parameter/TypeOfBlockGroup.d.ts +3 -3
  160. package/lib-amd/parameter/TypeOfBlockGroup.js.map +1 -1
  161. package/lib-amd/pluginState/SelectionPluginState.d.ts +12 -0
  162. package/lib-amd/pluginState/SelectionPluginState.js.map +1 -1
  163. package/lib-amd/selection/InsertPoint.d.ts +6 -6
  164. package/lib-amd/selection/InsertPoint.js.map +1 -1
  165. package/lib-amd/selection/TableSelectionContext.d.ts +22 -1
  166. package/lib-amd/selection/TableSelectionContext.js.map +1 -1
  167. package/lib-mjs/contentModel/block/ContentModelBlock.d.ts +14 -6
  168. package/lib-mjs/contentModel/block/ContentModelBlock.js.map +1 -1
  169. package/lib-mjs/contentModel/block/ContentModelBlockBase.d.ts +21 -4
  170. package/lib-mjs/contentModel/block/ContentModelBlockBase.js.map +1 -1
  171. package/lib-mjs/contentModel/block/ContentModelDivider.d.ts +14 -5
  172. package/lib-mjs/contentModel/block/ContentModelDivider.js.map +1 -1
  173. package/lib-mjs/contentModel/block/ContentModelParagraph.d.ts +46 -8
  174. package/lib-mjs/contentModel/block/ContentModelParagraph.js.map +1 -1
  175. package/lib-mjs/contentModel/block/ContentModelTable.d.ts +30 -5
  176. package/lib-mjs/contentModel/block/ContentModelTable.js.map +1 -1
  177. package/lib-mjs/contentModel/block/ContentModelTableRow.d.ts +28 -4
  178. package/lib-mjs/contentModel/block/ContentModelTableRow.js.map +1 -1
  179. package/lib-mjs/contentModel/blockGroup/ContentModelBlockGroup.d.ts +13 -5
  180. package/lib-mjs/contentModel/blockGroup/ContentModelBlockGroup.js.map +1 -1
  181. package/lib-mjs/contentModel/blockGroup/ContentModelBlockGroupBase.d.ts +29 -4
  182. package/lib-mjs/contentModel/blockGroup/ContentModelBlockGroupBase.js.map +1 -1
  183. package/lib-mjs/contentModel/blockGroup/ContentModelDocument.d.ts +19 -4
  184. package/lib-mjs/contentModel/blockGroup/ContentModelDocument.js.map +1 -1
  185. package/lib-mjs/contentModel/blockGroup/ContentModelFormatContainer.d.ts +19 -5
  186. package/lib-mjs/contentModel/blockGroup/ContentModelFormatContainer.js.map +1 -1
  187. package/lib-mjs/contentModel/blockGroup/ContentModelGeneralBlock.d.ts +20 -5
  188. package/lib-mjs/contentModel/blockGroup/ContentModelGeneralBlock.js.map +1 -1
  189. package/lib-mjs/contentModel/blockGroup/ContentModelListItem.d.ts +31 -5
  190. package/lib-mjs/contentModel/blockGroup/ContentModelListItem.js.map +1 -1
  191. package/lib-mjs/contentModel/blockGroup/ContentModelTableCell.d.ts +21 -7
  192. package/lib-mjs/contentModel/blockGroup/ContentModelTableCell.js.map +1 -1
  193. package/lib-mjs/contentModel/common/MutableMark.d.ts +47 -0
  194. package/lib-mjs/contentModel/common/MutableMark.js +3 -0
  195. package/lib-mjs/contentModel/common/MutableMark.js.map +1 -0
  196. package/lib-mjs/contentModel/common/MutableType.d.ts +23 -0
  197. package/lib-mjs/contentModel/common/MutableType.js +2 -0
  198. package/lib-mjs/contentModel/common/MutableType.js.map +1 -0
  199. package/lib-mjs/contentModel/common/Selectable.d.ts +20 -1
  200. package/lib-mjs/contentModel/common/Selectable.js.map +1 -1
  201. package/lib-mjs/contentModel/decorator/ContentModelCode.d.ts +10 -2
  202. package/lib-mjs/contentModel/decorator/ContentModelCode.js.map +1 -1
  203. package/lib-mjs/contentModel/decorator/ContentModelDecorator.d.ts +7 -3
  204. package/lib-mjs/contentModel/decorator/ContentModelDecorator.js.map +1 -1
  205. package/lib-mjs/contentModel/decorator/ContentModelLink.d.ts +11 -3
  206. package/lib-mjs/contentModel/decorator/ContentModelLink.js.map +1 -1
  207. package/lib-mjs/contentModel/decorator/ContentModelListLevel.d.ts +16 -4
  208. package/lib-mjs/contentModel/decorator/ContentModelListLevel.js.map +1 -1
  209. package/lib-mjs/contentModel/decorator/ContentModelParagraphDecorator.d.ts +18 -5
  210. package/lib-mjs/contentModel/decorator/ContentModelParagraphDecorator.js.map +1 -1
  211. package/lib-mjs/contentModel/format/ContentModelWithDataset.d.ts +22 -3
  212. package/lib-mjs/contentModel/format/ContentModelWithDataset.js.map +1 -1
  213. package/lib-mjs/contentModel/format/ContentModelWithFormat.d.ts +9 -0
  214. package/lib-mjs/contentModel/format/ContentModelWithFormat.js.map +1 -1
  215. package/lib-mjs/contentModel/format/metadata/DatasetFormat.d.ts +4 -0
  216. package/lib-mjs/contentModel/format/metadata/DatasetFormat.js.map +1 -1
  217. package/lib-mjs/contentModel/format/metadata/TableMetadataFormat.js.map +1 -1
  218. package/lib-mjs/contentModel/segment/ContentModelBr.d.ts +6 -1
  219. package/lib-mjs/contentModel/segment/ContentModelBr.js.map +1 -1
  220. package/lib-mjs/contentModel/segment/ContentModelGeneralSegment.d.ts +12 -2
  221. package/lib-mjs/contentModel/segment/ContentModelGeneralSegment.js.map +1 -1
  222. package/lib-mjs/contentModel/segment/ContentModelImage.d.ts +14 -4
  223. package/lib-mjs/contentModel/segment/ContentModelImage.js.map +1 -1
  224. package/lib-mjs/contentModel/segment/ContentModelSegment.d.ts +13 -5
  225. package/lib-mjs/contentModel/segment/ContentModelSegment.js.map +1 -1
  226. package/lib-mjs/contentModel/segment/ContentModelSegmentBase.d.ts +39 -7
  227. package/lib-mjs/contentModel/segment/ContentModelSegmentBase.js.map +1 -1
  228. package/lib-mjs/contentModel/segment/ContentModelSelectionMarker.d.ts +6 -1
  229. package/lib-mjs/contentModel/segment/ContentModelSelectionMarker.js.map +1 -1
  230. package/lib-mjs/contentModel/segment/ContentModelText.d.ts +13 -3
  231. package/lib-mjs/contentModel/segment/ContentModelText.js.map +1 -1
  232. package/lib-mjs/editor/EditorOptions.d.ts +4 -0
  233. package/lib-mjs/editor/EditorOptions.js.map +1 -1
  234. package/lib-mjs/index.d.ts +34 -32
  235. package/lib-mjs/index.js.map +1 -1
  236. package/lib-mjs/parameter/DeleteSelectionStep.d.ts +4 -4
  237. package/lib-mjs/parameter/DeleteSelectionStep.js.map +1 -1
  238. package/lib-mjs/parameter/IterateSelectionsOption.d.ts +13 -4
  239. package/lib-mjs/parameter/IterateSelectionsOption.js.map +1 -1
  240. package/lib-mjs/parameter/OperationalBlocks.d.ts +19 -2
  241. package/lib-mjs/parameter/OperationalBlocks.js.map +1 -1
  242. package/lib-mjs/parameter/TypeOfBlockGroup.d.ts +3 -3
  243. package/lib-mjs/parameter/TypeOfBlockGroup.js.map +1 -1
  244. package/lib-mjs/pluginState/SelectionPluginState.d.ts +12 -0
  245. package/lib-mjs/pluginState/SelectionPluginState.js.map +1 -1
  246. package/lib-mjs/selection/InsertPoint.d.ts +6 -6
  247. package/lib-mjs/selection/InsertPoint.js.map +1 -1
  248. package/lib-mjs/selection/TableSelectionContext.d.ts +22 -1
  249. package/lib-mjs/selection/TableSelectionContext.js.map +1 -1
  250. package/package.json +1 -1
@@ -1,11 +1,19 @@
1
- import type { ContentModelDivider } from './ContentModelDivider';
1
+ import type { ContentModelDivider, ReadonlyContentModelDivider } from './ContentModelDivider';
2
2
  import type { ContentModelEntity } from '../entity/ContentModelEntity';
3
- import type { ContentModelFormatContainer } from '../blockGroup/ContentModelFormatContainer';
4
- import type { ContentModelGeneralBlock } from '../blockGroup/ContentModelGeneralBlock';
5
- import type { ContentModelListItem } from '../blockGroup/ContentModelListItem';
6
- import type { ContentModelParagraph } from './ContentModelParagraph';
7
- import type { ContentModelTable } from './ContentModelTable';
3
+ import type { ContentModelFormatContainer, ReadonlyContentModelFormatContainer, ShallowMutableContentModelFormatContainer } from '../blockGroup/ContentModelFormatContainer';
4
+ import type { ContentModelGeneralBlock, ReadonlyContentModelGeneralBlock, ShallowMutableContentModelGeneralBlock } from '../blockGroup/ContentModelGeneralBlock';
5
+ import type { ContentModelListItem, ReadonlyContentModelListItem, ShallowMutableContentModelListItem } from '../blockGroup/ContentModelListItem';
6
+ import type { ContentModelParagraph, ReadonlyContentModelParagraph, ShallowMutableContentModelParagraph } from './ContentModelParagraph';
7
+ import type { ContentModelTable, ReadonlyContentModelTable, ShallowMutableContentModelTable } from './ContentModelTable';
8
8
  /**
9
9
  * A union type of Content Model Block
10
10
  */
11
11
  export declare type ContentModelBlock = ContentModelFormatContainer | ContentModelListItem | ContentModelGeneralBlock | ContentModelTable | ContentModelParagraph | ContentModelEntity | ContentModelDivider;
12
+ /**
13
+ * A union type of Content Model Block (Readonly)
14
+ */
15
+ export declare type ReadonlyContentModelBlock = ReadonlyContentModelFormatContainer | ReadonlyContentModelListItem | ReadonlyContentModelGeneralBlock | ReadonlyContentModelTable | ReadonlyContentModelParagraph | ContentModelEntity | ReadonlyContentModelDivider;
16
+ /**
17
+ * A union type of Content Model Block (Shallow mutable)
18
+ */
19
+ export declare type ShallowMutableContentModelBlock = ShallowMutableContentModelFormatContainer | ShallowMutableContentModelListItem | ShallowMutableContentModelGeneralBlock | ShallowMutableContentModelTable | ShallowMutableContentModelParagraph | ContentModelEntity | ContentModelDivider;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlock.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelBlock.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelDivider } from './ContentModelDivider';\nimport type { ContentModelEntity } from '../entity/ContentModelEntity';\nimport type { ContentModelFormatContainer } from '../blockGroup/ContentModelFormatContainer';\nimport type { ContentModelGeneralBlock } from '../blockGroup/ContentModelGeneralBlock';\nimport type { ContentModelListItem } from '../blockGroup/ContentModelListItem';\nimport type { ContentModelParagraph } from './ContentModelParagraph';\nimport type { ContentModelTable } from './ContentModelTable';\n\n/**\n * A union type of Content Model Block\n */\nexport type ContentModelBlock =\n | ContentModelFormatContainer\n | ContentModelListItem\n | ContentModelGeneralBlock\n | ContentModelTable\n | ContentModelParagraph\n | ContentModelEntity\n | ContentModelDivider;\n"]}
1
+ {"version":3,"file":"ContentModelBlock.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelBlock.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelDivider, ReadonlyContentModelDivider } from './ContentModelDivider';\nimport type { ContentModelEntity } from '../entity/ContentModelEntity';\nimport type {\n ContentModelFormatContainer,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from '../blockGroup/ContentModelFormatContainer';\nimport type {\n ContentModelGeneralBlock,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from '../blockGroup/ContentModelGeneralBlock';\nimport type {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from '../blockGroup/ContentModelListItem';\nimport type {\n ContentModelParagraph,\n ReadonlyContentModelParagraph,\n ShallowMutableContentModelParagraph,\n} from './ContentModelParagraph';\nimport type {\n ContentModelTable,\n ReadonlyContentModelTable,\n ShallowMutableContentModelTable,\n} from './ContentModelTable';\n\n/**\n * A union type of Content Model Block\n */\nexport type ContentModelBlock =\n | ContentModelFormatContainer\n | ContentModelListItem\n | ContentModelGeneralBlock\n | ContentModelTable\n | ContentModelParagraph\n | ContentModelEntity\n | ContentModelDivider;\n\n/**\n * A union type of Content Model Block (Readonly)\n */\nexport type ReadonlyContentModelBlock =\n | ReadonlyContentModelFormatContainer\n | ReadonlyContentModelListItem\n | ReadonlyContentModelGeneralBlock\n | ReadonlyContentModelTable\n | ReadonlyContentModelParagraph\n | ContentModelEntity\n | ReadonlyContentModelDivider;\n\n/**\n * A union type of Content Model Block (Shallow mutable)\n */\nexport type ShallowMutableContentModelBlock =\n | ShallowMutableContentModelFormatContainer\n | ShallowMutableContentModelListItem\n | ShallowMutableContentModelGeneralBlock\n | ShallowMutableContentModelTable\n | ShallowMutableContentModelParagraph\n | ContentModelEntity\n | ContentModelDivider;\n"]}
@@ -1,12 +1,29 @@
1
+ import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
2
+ import type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';
1
3
  import type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';
2
4
  import type { ContentModelBlockType } from './BlockType';
3
- import type { ContentModelWithFormat } from '../format/ContentModelWithFormat';
5
+ import type { ContentModelWithFormat, ReadonlyContentModelWithFormat } from '../format/ContentModelWithFormat';
4
6
  /**
5
- * Base type of a block
7
+ * Common part of base type of a block
6
8
  */
7
- export interface ContentModelBlockBase<T extends ContentModelBlockType, TFormat extends ContentModelBlockFormat = ContentModelBlockFormat> extends ContentModelWithFormat<TFormat> {
9
+ export interface ContentModelBlockBaseCommon<T extends ContentModelBlockType> {
8
10
  /**
9
11
  * Type of this block
10
12
  */
11
- blockType: T;
13
+ readonly blockType: T;
14
+ }
15
+ /**
16
+ * Base type of a block
17
+ */
18
+ export interface ContentModelBlockBase<T extends ContentModelBlockType, TFormat extends ContentModelBlockFormat = ContentModelBlockFormat, TCacheElement extends HTMLElement = HTMLElement> extends MutableMark, ContentModelBlockBaseCommon<T>, ContentModelWithFormat<TFormat>, ContentModelBlockWithCache<TCacheElement> {
19
+ }
20
+ /**
21
+ * Base type of a block (Readonly)
22
+ */
23
+ export interface ReadonlyContentModelBlockBase<T extends ContentModelBlockType, TFormat extends ContentModelBlockFormat = ContentModelBlockFormat, TCacheElement extends HTMLElement = HTMLElement> extends ReadonlyMark, ContentModelBlockBaseCommon<T>, ReadonlyContentModelWithFormat<TFormat>, ContentModelBlockWithCache<TCacheElement> {
24
+ }
25
+ /**
26
+ * Base type of a block (Shallow mutable)
27
+ */
28
+ export interface ShallowMutableContentModelBlockBase<T extends ContentModelBlockType, TFormat extends ContentModelBlockFormat = ContentModelBlockFormat, TCacheElement extends HTMLElement = HTMLElement> extends ShallowMutableMark, ContentModelBlockBaseCommon<T>, ContentModelWithFormat<TFormat>, ContentModelBlockWithCache<TCacheElement> {
12
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlockBase.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelBlockBase.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type { ContentModelBlockType } from './BlockType';\nimport type { ContentModelWithFormat } from '../format/ContentModelWithFormat';\n\n/**\n * Base type of a block\n */\nexport interface ContentModelBlockBase<\n T extends ContentModelBlockType,\n TFormat extends ContentModelBlockFormat = ContentModelBlockFormat\n> extends ContentModelWithFormat<TFormat> {\n /**\n * Type of this block\n */\n blockType: T;\n}\n"]}
1
+ {"version":3,"file":"ContentModelBlockBase.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelBlockBase.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';\nimport type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type { ContentModelBlockType } from './BlockType';\nimport type {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from '../format/ContentModelWithFormat';\n\n/**\n * Common part of base type of a block\n */\nexport interface ContentModelBlockBaseCommon<T extends ContentModelBlockType> {\n /**\n * Type of this block\n */\n readonly blockType: T;\n}\n\n/**\n * Base type of a block\n */\nexport interface ContentModelBlockBase<\n T extends ContentModelBlockType,\n TFormat extends ContentModelBlockFormat = ContentModelBlockFormat,\n TCacheElement extends HTMLElement = HTMLElement\n>\n extends MutableMark,\n ContentModelBlockBaseCommon<T>,\n ContentModelWithFormat<TFormat>,\n ContentModelBlockWithCache<TCacheElement> {}\n\n/**\n * Base type of a block (Readonly)\n */\nexport interface ReadonlyContentModelBlockBase<\n T extends ContentModelBlockType,\n TFormat extends ContentModelBlockFormat = ContentModelBlockFormat,\n TCacheElement extends HTMLElement = HTMLElement\n>\n extends ReadonlyMark,\n ContentModelBlockBaseCommon<T>,\n ReadonlyContentModelWithFormat<TFormat>,\n ContentModelBlockWithCache<TCacheElement> {}\n\n/**\n * Base type of a block (Shallow mutable)\n */\nexport interface ShallowMutableContentModelBlockBase<\n T extends ContentModelBlockType,\n TFormat extends ContentModelBlockFormat = ContentModelBlockFormat,\n TCacheElement extends HTMLElement = HTMLElement\n>\n extends ShallowMutableMark,\n ContentModelBlockBaseCommon<T>,\n ContentModelWithFormat<TFormat>,\n ContentModelBlockWithCache<TCacheElement> {}\n"]}
@@ -1,11 +1,10 @@
1
- import type { ContentModelBlockBase } from './ContentModelBlockBase';
2
- import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase } from './ContentModelBlockBase';
3
2
  import type { ContentModelDividerFormat } from '../format/ContentModelDividerFormat';
4
- import type { Selectable } from '../common/Selectable';
3
+ import type { ReadonlySelectable, Selectable } from '../common/Selectable';
5
4
  /**
6
- * Content Model of horizontal divider
5
+ * Common part of Content Model of horizontal divider
7
6
  */
8
- export interface ContentModelDivider extends Selectable, ContentModelBlockWithCache, ContentModelBlockBase<'Divider', ContentModelDividerFormat> {
7
+ export interface ContentModelDividerCommon {
9
8
  /**
10
9
  * Tag name of this element, either HR or DIV
11
10
  */
@@ -15,3 +14,13 @@ export interface ContentModelDivider extends Selectable, ContentModelBlockWithCa
15
14
  */
16
15
  size?: string;
17
16
  }
17
+ /**
18
+ * Content Model of horizontal divider
19
+ */
20
+ export interface ContentModelDivider extends Selectable, ContentModelDividerCommon, ContentModelBlockBase<'Divider', ContentModelDividerFormat> {
21
+ }
22
+ /**
23
+ * Content Model of horizontal divider (Readonly)
24
+ */
25
+ export interface ReadonlyContentModelDivider extends ReadonlySelectable, ReadonlyContentModelBlockBase<'Divider', ContentModelDividerFormat>, Readonly<ContentModelDividerCommon> {
26
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelDivider.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelDivider.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase } from './ContentModelBlockBase';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { ContentModelDividerFormat } from '../format/ContentModelDividerFormat';\nimport type { Selectable } from '../common/Selectable';\n\n/**\n * Content Model of horizontal divider\n */\nexport interface ContentModelDivider\n extends Selectable,\n ContentModelBlockWithCache,\n ContentModelBlockBase<'Divider', ContentModelDividerFormat> {\n /**\n * Tag name of this element, either HR or DIV\n */\n tagName: 'hr' | 'div';\n\n /**\n * Size property for HR\n */\n size?: string;\n}\n"]}
1
+ {"version":3,"file":"ContentModelDivider.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelDivider.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase, ReadonlyContentModelBlockBase } from './ContentModelBlockBase';\nimport type { ContentModelDividerFormat } from '../format/ContentModelDividerFormat';\nimport type { ReadonlySelectable, Selectable } from '../common/Selectable';\n\n/**\n * Common part of Content Model of horizontal divider\n */\nexport interface ContentModelDividerCommon {\n /**\n * Tag name of this element, either HR or DIV\n */\n tagName: 'hr' | 'div';\n\n /**\n * Size property for HR\n */\n size?: string;\n}\n\n/**\n * Content Model of horizontal divider\n */\nexport interface ContentModelDivider\n extends Selectable,\n ContentModelDividerCommon,\n ContentModelBlockBase<'Divider', ContentModelDividerFormat> {}\n\n/**\n * Content Model of horizontal divider (Readonly)\n */\nexport interface ReadonlyContentModelDivider\n extends ReadonlySelectable,\n ReadonlyContentModelBlockBase<'Divider', ContentModelDividerFormat>,\n Readonly<ContentModelDividerCommon> {}\n"]}
@@ -1,12 +1,21 @@
1
- import type { ContentModelBlockBase } from './ContentModelBlockBase';
2
- import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
3
- import type { ContentModelParagraphDecorator } from '../decorator/ContentModelParagraphDecorator';
4
- import type { ContentModelSegment } from '../segment/ContentModelSegment';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase } from './ContentModelBlockBase';
2
+ import type { ContentModelParagraphDecorator, ReadonlyContentModelParagraphDecorator } from '../decorator/ContentModelParagraphDecorator';
3
+ import type { ContentModelSegment, ReadonlyContentModelSegment, ShallowMutableContentModelSegment } from '../segment/ContentModelSegment';
5
4
  import type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';
5
+ /**
6
+ * Common part of Content Model of Paragraph
7
+ */
8
+ export interface ContentModelParagraphCommon {
9
+ /**
10
+ * Whether this block was created from a block HTML element or just some simple segment between other block elements.
11
+ * True means it doesn't have a related block element, false means it was from a block element
12
+ */
13
+ isImplicit?: boolean;
14
+ }
6
15
  /**
7
16
  * Content Model of Paragraph
8
17
  */
9
- export interface ContentModelParagraph extends ContentModelBlockWithCache, ContentModelBlockBase<'Paragraph'> {
18
+ export interface ContentModelParagraph extends ContentModelParagraphCommon, ContentModelBlockBase<'Paragraph'> {
10
19
  /**
11
20
  * Segments within this paragraph
12
21
  */
@@ -19,9 +28,38 @@ export interface ContentModelParagraph extends ContentModelBlockWithCache, Conte
19
28
  * Decorator info for this paragraph, used by heading and P tags
20
29
  */
21
30
  decorator?: ContentModelParagraphDecorator;
31
+ }
32
+ /**
33
+ * Content Model of Paragraph (Readonly)
34
+ */
35
+ export interface ReadonlyContentModelParagraph extends ReadonlyContentModelBlockBase<'Paragraph'>, Readonly<ContentModelParagraphCommon> {
22
36
  /**
23
- * Whether this block was created from a block HTML element or just some simple segment between other block elements.
24
- * True means it doesn't have a related block element, false means it was from a block element
37
+ * Segments within this paragraph
25
38
  */
26
- isImplicit?: boolean;
39
+ readonly segments: ReadonlyArray<ReadonlyContentModelSegment>;
40
+ /**
41
+ * Segment format on this paragraph. This is mostly used for default format
42
+ */
43
+ readonly segmentFormat?: Readonly<ContentModelSegmentFormat>;
44
+ /**
45
+ * Decorator info for this paragraph, used by heading and P tags
46
+ */
47
+ readonly decorator?: ReadonlyContentModelParagraphDecorator;
48
+ }
49
+ /**
50
+ * Content Model of Paragraph (Shallow mutable)
51
+ */
52
+ export interface ShallowMutableContentModelParagraph extends ContentModelParagraphCommon, ContentModelBlockBase<'Paragraph'> {
53
+ /**
54
+ * Segments within this paragraph
55
+ */
56
+ segments: ShallowMutableContentModelSegment[];
57
+ /**
58
+ * Segment format on this paragraph. This is mostly used for default format
59
+ */
60
+ segmentFormat?: ContentModelSegmentFormat;
61
+ /**
62
+ * Decorator info for this paragraph, used by heading and P tags
63
+ */
64
+ decorator?: ContentModelParagraphDecorator;
27
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelParagraph.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelParagraph.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase } from './ContentModelBlockBase';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { ContentModelParagraphDecorator } from '../decorator/ContentModelParagraphDecorator';\nimport type { ContentModelSegment } from '../segment/ContentModelSegment';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\n\n/**\n * Content Model of Paragraph\n */\nexport interface ContentModelParagraph\n extends ContentModelBlockWithCache,\n ContentModelBlockBase<'Paragraph'> {\n /**\n * Segments within this paragraph\n */\n segments: ContentModelSegment[];\n\n /**\n * Segment format on this paragraph. This is mostly used for default format\n */\n segmentFormat?: ContentModelSegmentFormat;\n\n /**\n * Decorator info for this paragraph, used by heading and P tags\n */\n decorator?: ContentModelParagraphDecorator;\n\n /**\n * Whether this block was created from a block HTML element or just some simple segment between other block elements.\n * True means it doesn't have a related block element, false means it was from a block element\n */\n isImplicit?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ContentModelParagraph.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelParagraph.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase, ReadonlyContentModelBlockBase } from './ContentModelBlockBase';\nimport type {\n ContentModelParagraphDecorator,\n ReadonlyContentModelParagraphDecorator,\n} from '../decorator/ContentModelParagraphDecorator';\nimport type {\n ContentModelSegment,\n ReadonlyContentModelSegment,\n ShallowMutableContentModelSegment,\n} from '../segment/ContentModelSegment';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\n\n/**\n * Common part of Content Model of Paragraph\n */\nexport interface ContentModelParagraphCommon {\n /**\n * Whether this block was created from a block HTML element or just some simple segment between other block elements.\n * True means it doesn't have a related block element, false means it was from a block element\n */\n isImplicit?: boolean;\n}\n\n/**\n * Content Model of Paragraph\n */\nexport interface ContentModelParagraph\n extends ContentModelParagraphCommon,\n ContentModelBlockBase<'Paragraph'> {\n /**\n * Segments within this paragraph\n */\n segments: ContentModelSegment[];\n\n /**\n * Segment format on this paragraph. This is mostly used for default format\n */\n segmentFormat?: ContentModelSegmentFormat;\n\n /**\n * Decorator info for this paragraph, used by heading and P tags\n */\n decorator?: ContentModelParagraphDecorator;\n}\n\n/**\n * Content Model of Paragraph (Readonly)\n */\nexport interface ReadonlyContentModelParagraph\n extends ReadonlyContentModelBlockBase<'Paragraph'>,\n Readonly<ContentModelParagraphCommon> {\n /**\n * Segments within this paragraph\n */\n readonly segments: ReadonlyArray<ReadonlyContentModelSegment>;\n\n /**\n * Segment format on this paragraph. This is mostly used for default format\n */\n readonly segmentFormat?: Readonly<ContentModelSegmentFormat>;\n\n /**\n * Decorator info for this paragraph, used by heading and P tags\n */\n readonly decorator?: ReadonlyContentModelParagraphDecorator;\n}\n\n/**\n * Content Model of Paragraph (Shallow mutable)\n */\nexport interface ShallowMutableContentModelParagraph\n extends ContentModelParagraphCommon,\n ContentModelBlockBase<'Paragraph'> {\n /**\n * Segments within this paragraph\n */\n segments: ShallowMutableContentModelSegment[];\n\n /**\n * Segment format on this paragraph. This is mostly used for default format\n */\n segmentFormat?: ContentModelSegmentFormat;\n\n /**\n * Decorator info for this paragraph, used by heading and P tags\n */\n decorator?: ContentModelParagraphDecorator;\n}\n"]}
@@ -1,13 +1,12 @@
1
- import type { ContentModelBlockBase } from './ContentModelBlockBase';
2
- import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase, ShallowMutableContentModelBlockBase } from './ContentModelBlockBase';
3
2
  import type { ContentModelTableFormat } from '../format/ContentModelTableFormat';
4
- import type { ContentModelTableRow } from './ContentModelTableRow';
5
- import type { ContentModelWithDataset } from '../format/ContentModelWithDataset';
3
+ import type { ContentModelTableRow, ReadonlyContentModelTableRow, ShallowMutableContentModelTableRow } from './ContentModelTableRow';
4
+ import type { ContentModelWithDataset, ReadonlyContentModelWithDataset, ShallowMutableContentModelWithDataset } from '../format/ContentModelWithDataset';
6
5
  import type { TableMetadataFormat } from '../format/metadata/TableMetadataFormat';
7
6
  /**
8
7
  * Content Model of Table
9
8
  */
10
- export interface ContentModelTable extends ContentModelBlockBase<'Table', ContentModelTableFormat>, ContentModelWithDataset<TableMetadataFormat>, ContentModelBlockWithCache<HTMLTableElement> {
9
+ export interface ContentModelTable extends ContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>, ContentModelWithDataset<TableMetadataFormat> {
11
10
  /**
12
11
  * Widths of each column
13
12
  */
@@ -17,3 +16,29 @@ export interface ContentModelTable extends ContentModelBlockBase<'Table', Conten
17
16
  */
18
17
  rows: ContentModelTableRow[];
19
18
  }
19
+ /**
20
+ * Content Model of Table (Readonly)
21
+ */
22
+ export interface ReadonlyContentModelTable extends ReadonlyContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>, ReadonlyContentModelWithDataset<TableMetadataFormat> {
23
+ /**
24
+ * Widths of each column
25
+ */
26
+ readonly widths: ReadonlyArray<number>;
27
+ /**
28
+ * Cells of this table
29
+ */
30
+ readonly rows: ReadonlyArray<ReadonlyContentModelTableRow>;
31
+ }
32
+ /**
33
+ * Content Model of Table (Shallow mutable)
34
+ */
35
+ export interface ShallowMutableContentModelTable extends ShallowMutableContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>, ShallowMutableContentModelWithDataset<TableMetadataFormat> {
36
+ /**
37
+ * Widths of each column
38
+ */
39
+ widths: number[];
40
+ /**
41
+ * Cells of this table
42
+ */
43
+ rows: ShallowMutableContentModelTableRow[];
44
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelTable.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelTable.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase } from './ContentModelBlockBase';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { ContentModelTableFormat } from '../format/ContentModelTableFormat';\nimport type { ContentModelTableRow } from './ContentModelTableRow';\nimport type { ContentModelWithDataset } from '../format/ContentModelWithDataset';\nimport type { TableMetadataFormat } from '../format/metadata/TableMetadataFormat';\n\n/**\n * Content Model of Table\n */\nexport interface ContentModelTable\n extends ContentModelBlockBase<'Table', ContentModelTableFormat>,\n ContentModelWithDataset<TableMetadataFormat>,\n ContentModelBlockWithCache<HTMLTableElement> {\n /**\n * Widths of each column\n */\n widths: number[];\n\n /**\n * Cells of this table\n */\n rows: ContentModelTableRow[];\n}\n"]}
1
+ {"version":3,"file":"ContentModelTable.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelTable.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelBlockBase,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from './ContentModelBlockBase';\nimport type { ContentModelTableFormat } from '../format/ContentModelTableFormat';\nimport type {\n ContentModelTableRow,\n ReadonlyContentModelTableRow,\n ShallowMutableContentModelTableRow,\n} from './ContentModelTableRow';\nimport type {\n ContentModelWithDataset,\n ReadonlyContentModelWithDataset,\n ShallowMutableContentModelWithDataset,\n} from '../format/ContentModelWithDataset';\nimport type { TableMetadataFormat } from '../format/metadata/TableMetadataFormat';\n\n/**\n * Content Model of Table\n */\nexport interface ContentModelTable\n extends ContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>,\n ContentModelWithDataset<TableMetadataFormat> {\n /**\n * Widths of each column\n */\n widths: number[];\n\n /**\n * Cells of this table\n */\n rows: ContentModelTableRow[];\n}\n\n/**\n * Content Model of Table (Readonly)\n */\nexport interface ReadonlyContentModelTable\n extends ReadonlyContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>,\n ReadonlyContentModelWithDataset<TableMetadataFormat> {\n /**\n * Widths of each column\n */\n readonly widths: ReadonlyArray<number>;\n\n /**\n * Cells of this table\n */\n readonly rows: ReadonlyArray<ReadonlyContentModelTableRow>;\n}\n\n/**\n * Content Model of Table (Shallow mutable)\n */\nexport interface ShallowMutableContentModelTable\n extends ShallowMutableContentModelBlockBase<'Table', ContentModelTableFormat, HTMLTableElement>,\n ShallowMutableContentModelWithDataset<TableMetadataFormat> {\n /**\n * Widths of each column\n */\n widths: number[];\n\n /**\n * Cells of this table\n */\n rows: ShallowMutableContentModelTableRow[];\n}\n"]}
@@ -1,17 +1,41 @@
1
+ import type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';
1
2
  import type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';
2
3
  import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
3
- import type { ContentModelTableCell } from '../blockGroup/ContentModelTableCell';
4
- import type { ContentModelWithFormat } from '../format/ContentModelWithFormat';
4
+ import type { ContentModelTableCell, ReadonlyContentModelTableCell } from '../blockGroup/ContentModelTableCell';
5
+ import type { ContentModelWithFormat, ReadonlyContentModelWithFormat } from '../format/ContentModelWithFormat';
5
6
  /**
6
- * Content Model of Table
7
+ * Common part of Content Model of Table
7
8
  */
8
- export interface ContentModelTableRow extends ContentModelBlockWithCache<HTMLTableRowElement>, ContentModelWithFormat<ContentModelBlockFormat> {
9
+ export interface ContentModelTableRowCommon {
9
10
  /**
10
11
  * Heights of each row
11
12
  */
12
13
  height: number;
14
+ }
15
+ /**
16
+ * Content Model of Table
17
+ */
18
+ export interface ContentModelTableRow extends MutableMark, ContentModelTableRowCommon, ContentModelBlockWithCache<HTMLTableRowElement>, ContentModelWithFormat<ContentModelBlockFormat> {
13
19
  /**
14
20
  * Cells of this table
15
21
  */
16
22
  cells: ContentModelTableCell[];
17
23
  }
24
+ /**
25
+ * Content Model of Table (Readonly)
26
+ */
27
+ export interface ReadonlyContentModelTableRow extends ReadonlyMark, Readonly<ContentModelTableRowCommon>, ContentModelBlockWithCache<HTMLTableRowElement>, ReadonlyContentModelWithFormat<ContentModelBlockFormat> {
28
+ /**
29
+ * Cells of this table
30
+ */
31
+ readonly cells: ReadonlyArray<ReadonlyContentModelTableCell>;
32
+ }
33
+ /**
34
+ * Content Model of Table (Readonly)
35
+ */
36
+ export interface ShallowMutableContentModelTableRow extends ShallowMutableMark, ContentModelTableRowCommon, ContentModelBlockWithCache<HTMLTableRowElement>, ContentModelWithFormat<ContentModelBlockFormat> {
37
+ /**
38
+ * Cells of this table
39
+ */
40
+ cells: ReadonlyContentModelTableCell[];
41
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelTableRow.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelTableRow.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { ContentModelTableCell } from '../blockGroup/ContentModelTableCell';\nimport type { ContentModelWithFormat } from '../format/ContentModelWithFormat';\n\n/**\n * Content Model of Table\n */\nexport interface ContentModelTableRow\n extends ContentModelBlockWithCache<HTMLTableRowElement>,\n ContentModelWithFormat<ContentModelBlockFormat> {\n /**\n * Heights of each row\n */\n height: number;\n\n /**\n * Cells of this table\n */\n cells: ContentModelTableCell[];\n}\n"]}
1
+ {"version":3,"file":"ContentModelTableRow.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/block/ContentModelTableRow.ts"],"names":[],"mappings":"","sourcesContent":["import type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';\nimport type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type {\n ContentModelTableCell,\n ReadonlyContentModelTableCell,\n} from '../blockGroup/ContentModelTableCell';\nimport type {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from '../format/ContentModelWithFormat';\n\n/**\n * Common part of Content Model of Table\n */\nexport interface ContentModelTableRowCommon {\n /**\n * Heights of each row\n */\n height: number;\n}\n\n/**\n * Content Model of Table\n */\nexport interface ContentModelTableRow\n extends MutableMark,\n ContentModelTableRowCommon,\n ContentModelBlockWithCache<HTMLTableRowElement>,\n ContentModelWithFormat<ContentModelBlockFormat> {\n /**\n * Cells of this table\n */\n cells: ContentModelTableCell[];\n}\n\n/**\n * Content Model of Table (Readonly)\n */\nexport interface ReadonlyContentModelTableRow\n extends ReadonlyMark,\n Readonly<ContentModelTableRowCommon>,\n ContentModelBlockWithCache<HTMLTableRowElement>,\n ReadonlyContentModelWithFormat<ContentModelBlockFormat> {\n /**\n * Cells of this table\n */\n readonly cells: ReadonlyArray<ReadonlyContentModelTableCell>;\n}\n\n/**\n * Content Model of Table (Readonly)\n */\nexport interface ShallowMutableContentModelTableRow\n extends ShallowMutableMark,\n ContentModelTableRowCommon,\n ContentModelBlockWithCache<HTMLTableRowElement>,\n ContentModelWithFormat<ContentModelBlockFormat> {\n /**\n * Cells of this table\n */\n cells: ReadonlyContentModelTableCell[];\n}\n"]}
@@ -1,9 +1,17 @@
1
- import type { ContentModelDocument } from './ContentModelDocument';
2
- import type { ContentModelFormatContainer } from './ContentModelFormatContainer';
3
- import type { ContentModelGeneralBlock } from './ContentModelGeneralBlock';
4
- import type { ContentModelListItem } from './ContentModelListItem';
5
- import type { ContentModelTableCell } from './ContentModelTableCell';
1
+ import type { ContentModelDocument, ReadonlyContentModelDocument, ShallowMutableContentModelDocument } from './ContentModelDocument';
2
+ import type { ContentModelFormatContainer, ReadonlyContentModelFormatContainer, ShallowMutableContentModelFormatContainer } from './ContentModelFormatContainer';
3
+ import type { ContentModelGeneralBlock, ReadonlyContentModelGeneralBlock, ShallowMutableContentModelGeneralBlock } from './ContentModelGeneralBlock';
4
+ import type { ContentModelListItem, ReadonlyContentModelListItem, ShallowMutableContentModelListItem } from './ContentModelListItem';
5
+ import type { ContentModelTableCell, ReadonlyContentModelTableCell, ShallowMutableContentModelTableCell } from './ContentModelTableCell';
6
6
  /**
7
7
  * The union type of Content Model Block Group
8
8
  */
9
9
  export declare type ContentModelBlockGroup = ContentModelDocument | ContentModelFormatContainer | ContentModelListItem | ContentModelTableCell | ContentModelGeneralBlock;
10
+ /**
11
+ * The union type of Content Model Block Group (Readonly)
12
+ */
13
+ export declare type ReadonlyContentModelBlockGroup = ReadonlyContentModelDocument | ReadonlyContentModelFormatContainer | ReadonlyContentModelListItem | ReadonlyContentModelTableCell | ReadonlyContentModelGeneralBlock;
14
+ /**
15
+ * The union type of Content Model Block Group (Shallow mutable)
16
+ */
17
+ export declare type ShallowMutableContentModelBlockGroup = ShallowMutableContentModelDocument | ShallowMutableContentModelFormatContainer | ShallowMutableContentModelListItem | ShallowMutableContentModelTableCell | ShallowMutableContentModelGeneralBlock;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlockGroup.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelBlockGroup.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelDocument } from './ContentModelDocument';\nimport type { ContentModelFormatContainer } from './ContentModelFormatContainer';\nimport type { ContentModelGeneralBlock } from './ContentModelGeneralBlock';\nimport type { ContentModelListItem } from './ContentModelListItem';\nimport type { ContentModelTableCell } from './ContentModelTableCell';\n\n/**\n * The union type of Content Model Block Group\n */\nexport type ContentModelBlockGroup =\n | ContentModelDocument\n | ContentModelFormatContainer\n | ContentModelListItem\n | ContentModelTableCell\n | ContentModelGeneralBlock;\n"]}
1
+ {"version":3,"file":"ContentModelBlockGroup.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelBlockGroup.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelDocument,\n ReadonlyContentModelDocument,\n ShallowMutableContentModelDocument,\n} from './ContentModelDocument';\nimport type {\n ContentModelFormatContainer,\n ReadonlyContentModelFormatContainer,\n ShallowMutableContentModelFormatContainer,\n} from './ContentModelFormatContainer';\nimport type {\n ContentModelGeneralBlock,\n ReadonlyContentModelGeneralBlock,\n ShallowMutableContentModelGeneralBlock,\n} from './ContentModelGeneralBlock';\nimport type {\n ContentModelListItem,\n ReadonlyContentModelListItem,\n ShallowMutableContentModelListItem,\n} from './ContentModelListItem';\nimport type {\n ContentModelTableCell,\n ReadonlyContentModelTableCell,\n ShallowMutableContentModelTableCell,\n} from './ContentModelTableCell';\n\n/**\n * The union type of Content Model Block Group\n */\nexport type ContentModelBlockGroup =\n | ContentModelDocument\n | ContentModelFormatContainer\n | ContentModelListItem\n | ContentModelTableCell\n | ContentModelGeneralBlock;\n\n/**\n * The union type of Content Model Block Group (Readonly)\n */\nexport type ReadonlyContentModelBlockGroup =\n | ReadonlyContentModelDocument\n | ReadonlyContentModelFormatContainer\n | ReadonlyContentModelListItem\n | ReadonlyContentModelTableCell\n | ReadonlyContentModelGeneralBlock;\n\n/**\n * The union type of Content Model Block Group (Shallow mutable)\n */\nexport type ShallowMutableContentModelBlockGroup =\n | ShallowMutableContentModelDocument\n | ShallowMutableContentModelFormatContainer\n | ShallowMutableContentModelListItem\n | ShallowMutableContentModelTableCell\n | ShallowMutableContentModelGeneralBlock;\n"]}
@@ -1,15 +1,40 @@
1
- import type { ContentModelBlock } from '../block/ContentModelBlock';
1
+ import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
2
+ import type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';
3
+ import type { ContentModelBlock, ReadonlyContentModelBlock } from '../block/ContentModelBlock';
2
4
  import type { ContentModelBlockGroupType } from './BlockGroupType';
3
5
  /**
4
- * Base type of Content Model Block Group
6
+ * Common part of base type of Content Model Block Group
5
7
  */
6
- export interface ContentModelBlockGroupBase<T extends ContentModelBlockGroupType> {
8
+ export interface ContentModelBlockGroupBaseCommon<T extends ContentModelBlockGroupType, TElement extends HTMLElement = HTMLElement> extends ContentModelBlockWithCache<TElement> {
7
9
  /**
8
10
  * Type of this block group
9
11
  */
10
- blockGroupType: T;
12
+ readonly blockGroupType: T;
13
+ }
14
+ /**
15
+ * Base type of Content Model Block Group
16
+ */
17
+ export interface ContentModelBlockGroupBase<T extends ContentModelBlockGroupType, TElement extends HTMLElement = HTMLElement> extends MutableMark, ContentModelBlockGroupBaseCommon<T, TElement> {
11
18
  /**
12
19
  * Blocks under this group
13
20
  */
14
21
  blocks: ContentModelBlock[];
15
22
  }
23
+ /**
24
+ * Base type of Content Model Block Group (Readonly)
25
+ */
26
+ export interface ReadonlyContentModelBlockGroupBase<T extends ContentModelBlockGroupType, TElement extends HTMLElement = HTMLElement> extends ReadonlyMark, ContentModelBlockGroupBaseCommon<T, TElement> {
27
+ /**
28
+ * Blocks under this group
29
+ */
30
+ readonly blocks: ReadonlyArray<ReadonlyContentModelBlock>;
31
+ }
32
+ /**
33
+ * Base type of Content Model Block Group (Shallow mutable)
34
+ */
35
+ export interface ShallowMutableContentModelBlockGroupBase<T extends ContentModelBlockGroupType, TElement extends HTMLElement = HTMLElement> extends ShallowMutableMark, ContentModelBlockGroupBaseCommon<T, TElement> {
36
+ /**
37
+ * Blocks under this group
38
+ */
39
+ blocks: ReadonlyContentModelBlock[];
40
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelBlockGroupBase.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelBlockGroupBase.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlock } from '../block/ContentModelBlock';\nimport type { ContentModelBlockGroupType } from './BlockGroupType';\n\n/**\n * Base type of Content Model Block Group\n */\nexport interface ContentModelBlockGroupBase<T extends ContentModelBlockGroupType> {\n /**\n * Type of this block group\n */\n blockGroupType: T;\n\n /**\n * Blocks under this group\n */\n blocks: ContentModelBlock[];\n}\n"]}
1
+ {"version":3,"file":"ContentModelBlockGroupBase.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelBlockGroupBase.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { MutableMark, ReadonlyMark, ShallowMutableMark } from '../common/MutableMark';\nimport type { ContentModelBlock, ReadonlyContentModelBlock } from '../block/ContentModelBlock';\nimport type { ContentModelBlockGroupType } from './BlockGroupType';\n\n/**\n * Common part of base type of Content Model Block Group\n */\nexport interface ContentModelBlockGroupBaseCommon<\n T extends ContentModelBlockGroupType,\n TElement extends HTMLElement = HTMLElement\n> extends ContentModelBlockWithCache<TElement> {\n /**\n * Type of this block group\n */\n readonly blockGroupType: T;\n}\n\n/**\n * Base type of Content Model Block Group\n */\nexport interface ContentModelBlockGroupBase<\n T extends ContentModelBlockGroupType,\n TElement extends HTMLElement = HTMLElement\n> extends MutableMark, ContentModelBlockGroupBaseCommon<T, TElement> {\n /**\n * Blocks under this group\n */\n blocks: ContentModelBlock[];\n}\n\n/**\n * Base type of Content Model Block Group (Readonly)\n */\nexport interface ReadonlyContentModelBlockGroupBase<\n T extends ContentModelBlockGroupType,\n TElement extends HTMLElement = HTMLElement\n> extends ReadonlyMark, ContentModelBlockGroupBaseCommon<T, TElement> {\n /**\n * Blocks under this group\n */\n readonly blocks: ReadonlyArray<ReadonlyContentModelBlock>;\n}\n\n/**\n * Base type of Content Model Block Group (Shallow mutable)\n */\nexport interface ShallowMutableContentModelBlockGroupBase<\n T extends ContentModelBlockGroupType,\n TElement extends HTMLElement = HTMLElement\n> extends ShallowMutableMark, ContentModelBlockGroupBaseCommon<T, TElement> {\n /**\n * Blocks under this group\n */\n blocks: ReadonlyContentModelBlock[];\n}\n"]}
@@ -1,12 +1,27 @@
1
- import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
1
+ import type { ContentModelBlockGroupBase, ReadonlyContentModelBlockGroupBase, ShallowMutableContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
2
2
  import type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';
3
- import type { ContentModelWithFormat } from '../format/ContentModelWithFormat';
3
+ import type { ContentModelWithFormat, ReadonlyContentModelWithFormat } from '../format/ContentModelWithFormat';
4
4
  /**
5
- * Content Model document entry point
5
+ * Common part of Content Model document entry point
6
6
  */
7
- export interface ContentModelDocument extends ContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
7
+ export interface ContentModelDocumentCommon {
8
8
  /**
9
9
  * Whether the selection in model (if any) is a revert selection (end is before start)
10
10
  */
11
11
  hasRevertedRangeSelection?: boolean;
12
12
  }
13
+ /**
14
+ * Content Model document entry point
15
+ */
16
+ export interface ContentModelDocument extends ContentModelDocumentCommon, ContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
17
+ }
18
+ /**
19
+ * Content Model document entry point (Readonly)
20
+ */
21
+ export interface ReadonlyContentModelDocument extends Readonly<ContentModelDocumentCommon>, ReadonlyContentModelBlockGroupBase<'Document'>, Partial<ReadonlyContentModelWithFormat<ContentModelSegmentFormat>> {
22
+ }
23
+ /**
24
+ * Content Model document entry point (Shallow mutable)
25
+ */
26
+ export interface ShallowMutableContentModelDocument extends ContentModelDocumentCommon, ShallowMutableContentModelBlockGroupBase<'Document'>, Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {
27
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelDocument.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelDocument.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\nimport type { ContentModelWithFormat } from '../format/ContentModelWithFormat';\n\n/**\n * Content Model document entry point\n */\nexport interface ContentModelDocument\n extends ContentModelBlockGroupBase<'Document'>,\n Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {\n /**\n * Whether the selection in model (if any) is a revert selection (end is before start)\n */\n hasRevertedRangeSelection?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ContentModelDocument.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelDocument.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelBlockGroupBase,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './ContentModelBlockGroupBase';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\nimport type {\n ContentModelWithFormat,\n ReadonlyContentModelWithFormat,\n} from '../format/ContentModelWithFormat';\n\n/**\n * Common part of Content Model document entry point\n */\nexport interface ContentModelDocumentCommon {\n /**\n * Whether the selection in model (if any) is a revert selection (end is before start)\n */\n hasRevertedRangeSelection?: boolean;\n}\n\n/**\n * Content Model document entry point\n */\nexport interface ContentModelDocument\n extends ContentModelDocumentCommon,\n ContentModelBlockGroupBase<'Document'>,\n Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {}\n\n/**\n * Content Model document entry point (Readonly)\n */\nexport interface ReadonlyContentModelDocument\n extends Readonly<ContentModelDocumentCommon>,\n ReadonlyContentModelBlockGroupBase<'Document'>,\n Partial<ReadonlyContentModelWithFormat<ContentModelSegmentFormat>> {}\n\n/**\n * Content Model document entry point (Shallow mutable)\n */\nexport interface ShallowMutableContentModelDocument\n extends ContentModelDocumentCommon,\n ShallowMutableContentModelBlockGroupBase<'Document'>,\n Partial<ContentModelWithFormat<ContentModelSegmentFormat>> {}\n"]}
@@ -1,11 +1,10 @@
1
- import type { ContentModelBlockBase } from '../block/ContentModelBlockBase';
2
- import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
3
- import type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase, ShallowMutableContentModelBlockBase } from '../block/ContentModelBlockBase';
2
+ import type { ContentModelBlockGroupBase, ReadonlyContentModelBlockGroupBase, ShallowMutableContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
4
3
  import type { ContentModelFormatContainerFormat } from '../format/ContentModelFormatContainerFormat';
5
4
  /**
6
- * Content Model of Format Container
5
+ * Common part of Content Model of Format Container
7
6
  */
8
- export interface ContentModelFormatContainer extends ContentModelBlockWithCache, ContentModelBlockGroupBase<'FormatContainer'>, ContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat> {
7
+ export interface ContentModelFormatContainerCommon {
9
8
  /**
10
9
  * Tag name of this container
11
10
  */
@@ -16,3 +15,18 @@ export interface ContentModelFormatContainer extends ContentModelBlockWithCache,
16
15
  */
17
16
  zeroFontSize?: boolean;
18
17
  }
18
+ /**
19
+ * Content Model of Format Container
20
+ */
21
+ export interface ContentModelFormatContainer extends ContentModelFormatContainerCommon, ContentModelBlockGroupBase<'FormatContainer'>, ContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat, HTMLElement> {
22
+ }
23
+ /**
24
+ * Content Model of Format Container (Readonly)
25
+ */
26
+ export interface ReadonlyContentModelFormatContainer extends Readonly<ContentModelFormatContainerCommon>, ReadonlyContentModelBlockGroupBase<'FormatContainer'>, ReadonlyContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat, HTMLElement> {
27
+ }
28
+ /**
29
+ * Content Model of Format Container (Shallow mutable)
30
+ */
31
+ export interface ShallowMutableContentModelFormatContainer extends ContentModelFormatContainerCommon, ShallowMutableContentModelBlockGroupBase<'FormatContainer'>, ShallowMutableContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat, HTMLElement> {
32
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelFormatContainer.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelFormatContainer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase } from '../block/ContentModelBlockBase';\nimport type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';\nimport type { ContentModelBlockWithCache } from '../common/ContentModelBlockWithCache';\nimport type { ContentModelFormatContainerFormat } from '../format/ContentModelFormatContainerFormat';\n\n/**\n * Content Model of Format Container\n */\nexport interface ContentModelFormatContainer\n extends ContentModelBlockWithCache,\n ContentModelBlockGroupBase<'FormatContainer'>,\n ContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat> {\n /**\n * Tag name of this container\n */\n tagName: Lowercase<string>;\n\n /**\n * Whether we can apply \"font-size: 0\" to this paragraph. When set to true, we will check if there is no text segment inside,\n * and apply \"font-size: 0\" to the container element\n */\n zeroFontSize?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ContentModelFormatContainer.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelFormatContainer.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelBlockBase,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from '../block/ContentModelBlockBase';\nimport type {\n ContentModelBlockGroupBase,\n ReadonlyContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n} from './ContentModelBlockGroupBase';\nimport type { ContentModelFormatContainerFormat } from '../format/ContentModelFormatContainerFormat';\n\n/**\n * Common part of Content Model of Format Container\n */\nexport interface ContentModelFormatContainerCommon {\n /**\n * Tag name of this container\n */\n tagName: Lowercase<string>;\n\n /**\n * Whether we can apply \"font-size: 0\" to this paragraph. When set to true, we will check if there is no text segment inside,\n * and apply \"font-size: 0\" to the container element\n */\n zeroFontSize?: boolean;\n}\n\n/**\n * Content Model of Format Container\n */\nexport interface ContentModelFormatContainer\n extends ContentModelFormatContainerCommon,\n ContentModelBlockGroupBase<'FormatContainer'>,\n ContentModelBlockBase<'BlockGroup', ContentModelFormatContainerFormat, HTMLElement> {}\n\n/**\n * Content Model of Format Container (Readonly)\n */\nexport interface ReadonlyContentModelFormatContainer\n extends Readonly<ContentModelFormatContainerCommon>,\n ReadonlyContentModelBlockGroupBase<'FormatContainer'>,\n ReadonlyContentModelBlockBase<\n 'BlockGroup',\n ContentModelFormatContainerFormat,\n HTMLElement\n > {}\n\n/**\n * Content Model of Format Container (Shallow mutable)\n */\nexport interface ShallowMutableContentModelFormatContainer\n extends ContentModelFormatContainerCommon,\n ShallowMutableContentModelBlockGroupBase<'FormatContainer'>,\n ShallowMutableContentModelBlockBase<\n 'BlockGroup',\n ContentModelFormatContainerFormat,\n HTMLElement\n > {}\n"]}
@@ -1,14 +1,29 @@
1
- import type { ContentModelBlockBase } from '../block/ContentModelBlockBase';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase, ShallowMutableContentModelBlockBase } from '../block/ContentModelBlockBase';
2
2
  import type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';
3
- import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
3
+ import type { ContentModelBlockGroupBase, ShallowMutableContentModelBlockGroupBase, ReadonlyContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
4
4
  import type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';
5
- import type { Selectable } from '../common/Selectable';
5
+ import type { ReadonlySelectable, Selectable, ShallowMutableSelectable } from '../common/Selectable';
6
6
  /**
7
- * Content Model for general Block element
7
+ * Common part of Content Model for general Block element
8
8
  */
9
- export interface ContentModelGeneralBlock extends Selectable, ContentModelBlockGroupBase<'General'>, ContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {
9
+ export interface ContentModelGeneralBlockCommon {
10
10
  /**
11
11
  * A reference to original HTML node that this model was created from
12
12
  */
13
13
  element: HTMLElement;
14
14
  }
15
+ /**
16
+ * Content Model for general Block element
17
+ */
18
+ export interface ContentModelGeneralBlock extends Selectable, ContentModelGeneralBlockCommon, ContentModelBlockGroupBase<'General'>, ContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {
19
+ }
20
+ /**
21
+ * Content Model for general Block element (Readonly)
22
+ */
23
+ export interface ReadonlyContentModelGeneralBlock extends ReadonlySelectable, Readonly<ContentModelGeneralBlockCommon>, ReadonlyContentModelBlockGroupBase<'General'>, ReadonlyContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {
24
+ }
25
+ /**
26
+ * Content Model for general Block element (Shallow mutable)
27
+ */
28
+ export interface ShallowMutableContentModelGeneralBlock extends ShallowMutableSelectable, ContentModelGeneralBlockCommon, ShallowMutableContentModelBlockGroupBase<'General'>, ShallowMutableContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {
29
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentModelGeneralBlock.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelGeneralBlock.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentModelBlockBase } from '../block/ContentModelBlockBase';\nimport type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\nimport type { Selectable } from '../common/Selectable';\n\n/**\n * Content Model for general Block element\n */\nexport interface ContentModelGeneralBlock\n extends Selectable,\n ContentModelBlockGroupBase<'General'>,\n ContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {\n /**\n * A reference to original HTML node that this model was created from\n */\n element: HTMLElement;\n}\n"]}
1
+ {"version":3,"file":"ContentModelGeneralBlock.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-types/lib/contentModel/blockGroup/ContentModelGeneralBlock.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ContentModelBlockBase,\n ReadonlyContentModelBlockBase,\n ShallowMutableContentModelBlockBase,\n} from '../block/ContentModelBlockBase';\nimport type { ContentModelBlockFormat } from '../format/ContentModelBlockFormat';\nimport type {\n ContentModelBlockGroupBase,\n ShallowMutableContentModelBlockGroupBase,\n ReadonlyContentModelBlockGroupBase,\n} from './ContentModelBlockGroupBase';\nimport type { ContentModelSegmentFormat } from '../format/ContentModelSegmentFormat';\nimport type {\n ReadonlySelectable,\n Selectable,\n ShallowMutableSelectable,\n} from '../common/Selectable';\n\n/**\n * Common part of Content Model for general Block element\n */\nexport interface ContentModelGeneralBlockCommon {\n /**\n * A reference to original HTML node that this model was created from\n */\n element: HTMLElement;\n}\n\n/**\n * Content Model for general Block element\n */\nexport interface ContentModelGeneralBlock\n extends Selectable,\n ContentModelGeneralBlockCommon,\n ContentModelBlockGroupBase<'General'>,\n ContentModelBlockBase<'BlockGroup', ContentModelBlockFormat & ContentModelSegmentFormat> {}\n\n/**\n * Content Model for general Block element (Readonly)\n */\nexport interface ReadonlyContentModelGeneralBlock\n extends ReadonlySelectable,\n Readonly<ContentModelGeneralBlockCommon>,\n ReadonlyContentModelBlockGroupBase<'General'>,\n ReadonlyContentModelBlockBase<\n 'BlockGroup',\n ContentModelBlockFormat & ContentModelSegmentFormat\n > {}\n\n/**\n * Content Model for general Block element (Shallow mutable)\n */\nexport interface ShallowMutableContentModelGeneralBlock\n extends ShallowMutableSelectable,\n ContentModelGeneralBlockCommon,\n ShallowMutableContentModelBlockGroupBase<'General'>,\n ShallowMutableContentModelBlockBase<\n 'BlockGroup',\n ContentModelBlockFormat & ContentModelSegmentFormat\n > {}\n"]}
@@ -1,12 +1,38 @@
1
- import type { ContentModelBlockBase } from '../block/ContentModelBlockBase';
2
- import type { ContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
1
+ import type { ContentModelBlockBase, ReadonlyContentModelBlockBase, ShallowMutableContentModelBlockBase } from '../block/ContentModelBlockBase';
2
+ import type { ContentModelBlockGroupBase, ReadonlyContentModelBlockGroupBase, ShallowMutableContentModelBlockGroupBase } from './ContentModelBlockGroupBase';
3
3
  import type { ContentModelListItemFormat } from '../format/ContentModelListItemFormat';
4
- import type { ContentModelListLevel } from '../decorator/ContentModelListLevel';
5
- import type { ContentModelSelectionMarker } from '../segment/ContentModelSelectionMarker';
4
+ import type { ContentModelListLevel, ReadonlyContentModelListLevel } from '../decorator/ContentModelListLevel';
5
+ import type { ContentModelSelectionMarker, ReadonlyContentModelSelectionMarker } from '../segment/ContentModelSelectionMarker';
6
6
  /**
7
7
  * Content Model of List Item
8
8
  */
9
- export interface ContentModelListItem extends ContentModelBlockGroupBase<'ListItem'>, ContentModelBlockBase<'BlockGroup', ContentModelListItemFormat> {
9
+ export interface ContentModelListItem extends ContentModelBlockGroupBase<'ListItem', HTMLLIElement>, ContentModelBlockBase<'BlockGroup', ContentModelListItemFormat, HTMLLIElement> {
10
+ /**
11
+ * Type of this list, either ordered or unordered
12
+ */
13
+ levels: ContentModelListLevel[];
14
+ /**
15
+ * A dummy segment to hold format of this list item
16
+ */
17
+ formatHolder: ContentModelSelectionMarker;
18
+ }
19
+ /**
20
+ * Content Model of List Item (Readonly)
21
+ */
22
+ export interface ReadonlyContentModelListItem extends ReadonlyContentModelBlockGroupBase<'ListItem', HTMLLIElement>, ReadonlyContentModelBlockBase<'BlockGroup', ContentModelListItemFormat, HTMLLIElement> {
23
+ /**
24
+ * Type of this list, either ordered or unordered
25
+ */
26
+ readonly levels: ReadonlyArray<ReadonlyContentModelListLevel>;
27
+ /**
28
+ * A dummy segment to hold format of this list item
29
+ */
30
+ readonly formatHolder: ReadonlyContentModelSelectionMarker;
31
+ }
32
+ /**
33
+ * Content Model of List Item (Shallow mutable)
34
+ */
35
+ export interface ShallowMutableContentModelListItem extends ShallowMutableContentModelBlockGroupBase<'ListItem', HTMLLIElement>, ShallowMutableContentModelBlockBase<'BlockGroup', ContentModelListItemFormat, HTMLLIElement> {
10
36
  /**
11
37
  * Type of this list, either ordered or unordered
12
38
  */