roosterjs-content-model-api 0.26.0 → 0.26.1

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 (703) hide show
  1. package/lib/index.d.ts +48 -48
  2. package/lib/index.js +99 -99
  3. package/lib/index.js.map +1 -1
  4. package/lib/modelApi/block/setModelAlignment.d.ts +5 -5
  5. package/lib/modelApi/block/setModelAlignment.js +62 -62
  6. package/lib/modelApi/block/setModelAlignment.js.map +1 -1
  7. package/lib/modelApi/block/setModelDirection.d.ts +5 -5
  8. package/lib/modelApi/block/setModelDirection.js +68 -68
  9. package/lib/modelApi/block/setModelDirection.js.map +1 -1
  10. package/lib/modelApi/block/setModelIndentation.d.ts +8 -8
  11. package/lib/modelApi/block/setModelIndentation.js +138 -138
  12. package/lib/modelApi/block/setModelIndentation.js.map +1 -1
  13. package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  14. package/lib/modelApi/block/toggleModelBlockQuote.js +50 -50
  15. package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  16. package/lib/modelApi/common/clearModelFormat.d.ts +5 -5
  17. package/lib/modelApi/common/clearModelFormat.js +129 -129
  18. package/lib/modelApi/common/clearModelFormat.js.map +1 -1
  19. package/lib/modelApi/common/wrapBlock.d.ts +16 -16
  20. package/lib/modelApi/common/wrapBlock.js +48 -48
  21. package/lib/modelApi/common/wrapBlock.js.map +1 -1
  22. package/lib/modelApi/entity/insertEntityModel.d.ts +5 -5
  23. package/lib/modelApi/entity/insertEntityModel.js +79 -79
  24. package/lib/modelApi/entity/insertEntityModel.js.map +1 -1
  25. package/lib/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  26. package/lib/modelApi/image/applyImageBorderFormat.js +57 -57
  27. package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -1
  28. package/lib/modelApi/link/matchLink.d.ts +29 -29
  29. package/lib/modelApi/link/matchLink.js +94 -94
  30. package/lib/modelApi/link/matchLink.js.map +1 -1
  31. package/lib/modelApi/list/findListItemsInSameThread.d.ts +7 -7
  32. package/lib/modelApi/list/findListItemsInSameThread.js +114 -114
  33. package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
  34. package/lib/modelApi/list/setListType.d.ts +7 -7
  35. package/lib/modelApi/list/setListType.js +113 -113
  36. package/lib/modelApi/list/setListType.js.map +1 -1
  37. package/lib/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  38. package/lib/modelApi/selection/adjustSegmentSelection.js +47 -47
  39. package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  40. package/lib/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  41. package/lib/modelApi/selection/adjustTrailingSpaceSelection.js +55 -55
  42. package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  43. package/lib/modelApi/selection/adjustWordSelection.d.ts +5 -5
  44. package/lib/modelApi/selection/adjustWordSelection.js +121 -121
  45. package/lib/modelApi/selection/adjustWordSelection.js.map +1 -1
  46. package/lib/modelApi/selection/collapseTableSelection.d.ts +5 -5
  47. package/lib/modelApi/selection/collapseTableSelection.js +16 -16
  48. package/lib/modelApi/selection/collapseTableSelection.js.map +1 -1
  49. package/lib/modelApi/table/alignTable.d.ts +5 -5
  50. package/lib/modelApi/table/alignTable.js +12 -12
  51. package/lib/modelApi/table/alignTable.js.map +1 -1
  52. package/lib/modelApi/table/alignTableCell.d.ts +9 -9
  53. package/lib/modelApi/table/alignTableCell.js +58 -58
  54. package/lib/modelApi/table/alignTableCell.js.map +1 -1
  55. package/lib/modelApi/table/canMergeCells.d.ts +5 -5
  56. package/lib/modelApi/table/canMergeCells.js +56 -56
  57. package/lib/modelApi/table/canMergeCells.js.map +1 -1
  58. package/lib/modelApi/table/clearSelectedCells.d.ts +8 -8
  59. package/lib/modelApi/table/clearSelectedCells.js +26 -26
  60. package/lib/modelApi/table/clearSelectedCells.js.map +1 -1
  61. package/lib/modelApi/table/createTableStructure.d.ts +5 -5
  62. package/lib/modelApi/table/createTableStructure.js +19 -19
  63. package/lib/modelApi/table/createTableStructure.js.map +1 -1
  64. package/lib/modelApi/table/deleteTable.d.ts +5 -5
  65. package/lib/modelApi/table/deleteTable.js +11 -11
  66. package/lib/modelApi/table/deleteTable.js.map +1 -1
  67. package/lib/modelApi/table/deleteTableColumn.d.ts +5 -5
  68. package/lib/modelApi/table/deleteTableColumn.js +24 -24
  69. package/lib/modelApi/table/deleteTableColumn.js.map +1 -1
  70. package/lib/modelApi/table/deleteTableRow.d.ts +5 -5
  71. package/lib/modelApi/table/deleteTableRow.js +23 -23
  72. package/lib/modelApi/table/deleteTableRow.js.map +1 -1
  73. package/lib/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  74. package/lib/modelApi/table/ensureFocusableParagraphForTable.js +56 -56
  75. package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  76. package/lib/modelApi/table/insertTableColumn.d.ts +7 -7
  77. package/lib/modelApi/table/insertTableColumn.js +28 -28
  78. package/lib/modelApi/table/insertTableColumn.js.map +1 -1
  79. package/lib/modelApi/table/insertTableRow.d.ts +7 -7
  80. package/lib/modelApi/table/insertTableRow.js +32 -32
  81. package/lib/modelApi/table/insertTableRow.js.map +1 -1
  82. package/lib/modelApi/table/mergeTableCells.d.ts +5 -5
  83. package/lib/modelApi/table/mergeTableCells.js +26 -26
  84. package/lib/modelApi/table/mergeTableCells.js.map +1 -1
  85. package/lib/modelApi/table/mergeTableColumn.d.ts +5 -5
  86. package/lib/modelApi/table/mergeTableColumn.js +37 -37
  87. package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
  88. package/lib/modelApi/table/mergeTableRow.d.ts +5 -5
  89. package/lib/modelApi/table/mergeTableRow.js +38 -38
  90. package/lib/modelApi/table/mergeTableRow.js.map +1 -1
  91. package/lib/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  92. package/lib/modelApi/table/splitTableCellHorizontally.js +54 -54
  93. package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  94. package/lib/modelApi/table/splitTableCellVertically.d.ts +5 -5
  95. package/lib/modelApi/table/splitTableCellVertically.js +57 -57
  96. package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
  97. package/lib/publicApi/block/setAlignment.d.ts +7 -7
  98. package/lib/publicApi/block/setAlignment.js +15 -15
  99. package/lib/publicApi/block/setAlignment.js.map +1 -1
  100. package/lib/publicApi/block/setDirection.d.ts +7 -7
  101. package/lib/publicApi/block/setDirection.js +15 -15
  102. package/lib/publicApi/block/setDirection.js.map +1 -1
  103. package/lib/publicApi/block/setHeadingLevel.d.ts +7 -7
  104. package/lib/publicApi/block/setHeadingLevel.js +49 -49
  105. package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
  106. package/lib/publicApi/block/setIndentation.d.ts +8 -8
  107. package/lib/publicApi/block/setIndentation.js +24 -24
  108. package/lib/publicApi/block/setIndentation.js.map +1 -1
  109. package/lib/publicApi/block/setParagraphMargin.d.ts +9 -9
  110. package/lib/publicApi/block/setParagraphMargin.js +32 -32
  111. package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
  112. package/lib/publicApi/block/setSpacing.d.ts +7 -7
  113. package/lib/publicApi/block/setSpacing.js +20 -20
  114. package/lib/publicApi/block/setSpacing.js.map +1 -1
  115. package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -9
  116. package/lib/publicApi/block/toggleBlockQuote.js +38 -38
  117. package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
  118. package/lib/publicApi/entity/insertEntity.d.ts +25 -25
  119. package/lib/publicApi/entity/insertEntity.js +41 -41
  120. package/lib/publicApi/entity/insertEntity.js.map +1 -1
  121. package/lib/publicApi/format/clearFormat.d.ts +6 -6
  122. package/lib/publicApi/format/clearFormat.js +22 -22
  123. package/lib/publicApi/format/clearFormat.js.map +1 -1
  124. package/lib/publicApi/format/getFormatState.d.ts +6 -6
  125. package/lib/publicApi/format/getFormatState.js +20 -20
  126. package/lib/publicApi/format/getFormatState.js.map +1 -1
  127. package/lib/publicApi/image/adjustImageSelection.d.ts +6 -6
  128. package/lib/publicApi/image/adjustImageSelection.js +25 -25
  129. package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
  130. package/lib/publicApi/image/changeImage.d.ts +7 -7
  131. package/lib/publicApi/image/changeImage.js +34 -34
  132. package/lib/publicApi/image/changeImage.js.map +1 -1
  133. package/lib/publicApi/image/insertImage.d.ts +7 -7
  134. package/lib/publicApi/image/insertImage.js +36 -36
  135. package/lib/publicApi/image/insertImage.js.map +1 -1
  136. package/lib/publicApi/image/setImageAltText.d.ts +8 -8
  137. package/lib/publicApi/image/setImageAltText.js +16 -16
  138. package/lib/publicApi/image/setImageAltText.js.map +1 -1
  139. package/lib/publicApi/image/setImageBorder.d.ts +9 -9
  140. package/lib/publicApi/image/setImageBorder.js +18 -18
  141. package/lib/publicApi/image/setImageBorder.js.map +1 -1
  142. package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -8
  143. package/lib/publicApi/image/setImageBoxShadow.js +28 -28
  144. package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
  145. package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -6
  146. package/lib/publicApi/link/adjustLinkSelection.js +33 -33
  147. package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
  148. package/lib/publicApi/link/insertLink.d.ts +15 -15
  149. package/lib/publicApi/link/insertLink.js +119 -119
  150. package/lib/publicApi/link/insertLink.js.map +1 -1
  151. package/lib/publicApi/link/removeLink.d.ts +8 -8
  152. package/lib/publicApi/link/removeLink.js +31 -31
  153. package/lib/publicApi/link/removeLink.js.map +1 -1
  154. package/lib/publicApi/list/setListStartNumber.d.ts +7 -7
  155. package/lib/publicApi/list/setListStartNumber.js +25 -25
  156. package/lib/publicApi/list/setListStartNumber.js.map +1 -1
  157. package/lib/publicApi/list/setListStyle.d.ts +7 -7
  158. package/lib/publicApi/list/setListStyle.js +32 -32
  159. package/lib/publicApi/list/setListStyle.js.map +1 -1
  160. package/lib/publicApi/list/toggleBullet.d.ts +8 -8
  161. package/lib/publicApi/list/toggleBullet.js +19 -19
  162. package/lib/publicApi/list/toggleBullet.js.map +1 -1
  163. package/lib/publicApi/list/toggleNumbering.d.ts +8 -8
  164. package/lib/publicApi/list/toggleNumbering.js +19 -19
  165. package/lib/publicApi/list/toggleNumbering.js.map +1 -1
  166. package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -7
  167. package/lib/publicApi/segment/applySegmentFormat.js +22 -22
  168. package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
  169. package/lib/publicApi/segment/changeCapitalization.d.ts +10 -10
  170. package/lib/publicApi/segment/changeCapitalization.js +48 -48
  171. package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
  172. package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
  173. package/lib/publicApi/segment/changeFontSize.js +61 -61
  174. package/lib/publicApi/segment/changeFontSize.js.map +1 -1
  175. package/lib/publicApi/segment/setBackgroundColor.d.ts +7 -7
  176. package/lib/publicApi/segment/setBackgroundColor.js +35 -35
  177. package/lib/publicApi/segment/setBackgroundColor.js.map +1 -1
  178. package/lib/publicApi/segment/setFontName.d.ts +7 -7
  179. package/lib/publicApi/segment/setFontName.js +18 -18
  180. package/lib/publicApi/segment/setFontName.js.map +1 -1
  181. package/lib/publicApi/segment/setFontSize.d.ts +12 -12
  182. package/lib/publicApi/segment/setFontSize.js +33 -33
  183. package/lib/publicApi/segment/setFontSize.js.map +1 -1
  184. package/lib/publicApi/segment/setTextColor.d.ts +7 -7
  185. package/lib/publicApi/segment/setTextColor.js +25 -25
  186. package/lib/publicApi/segment/setTextColor.js.map +1 -1
  187. package/lib/publicApi/segment/toggleBold.d.ts +6 -6
  188. package/lib/publicApi/segment/toggleBold.js +20 -20
  189. package/lib/publicApi/segment/toggleBold.js.map +1 -1
  190. package/lib/publicApi/segment/toggleCode.d.ts +6 -6
  191. package/lib/publicApi/segment/toggleCode.js +27 -27
  192. package/lib/publicApi/segment/toggleCode.js.map +1 -1
  193. package/lib/publicApi/segment/toggleItalic.d.ts +6 -6
  194. package/lib/publicApi/segment/toggleItalic.js +14 -14
  195. package/lib/publicApi/segment/toggleItalic.js.map +1 -1
  196. package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  197. package/lib/publicApi/segment/toggleStrikethrough.js +14 -14
  198. package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
  199. package/lib/publicApi/segment/toggleSubscript.d.ts +6 -6
  200. package/lib/publicApi/segment/toggleSubscript.js +14 -14
  201. package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
  202. package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -6
  203. package/lib/publicApi/segment/toggleSuperscript.js +14 -14
  204. package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
  205. package/lib/publicApi/segment/toggleUnderline.d.ts +6 -6
  206. package/lib/publicApi/segment/toggleUnderline.js +18 -18
  207. package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
  208. package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  209. package/lib/publicApi/table/applyTableBorderFormat.js +293 -293
  210. package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
  211. package/lib/publicApi/table/editTable.d.ts +7 -7
  212. package/lib/publicApi/table/editTable.js +77 -77
  213. package/lib/publicApi/table/editTable.js.map +1 -1
  214. package/lib/publicApi/table/formatTable.d.ts +8 -8
  215. package/lib/publicApi/table/formatTable.js +37 -37
  216. package/lib/publicApi/table/formatTable.js.map +1 -1
  217. package/lib/publicApi/table/insertTable.d.ts +11 -11
  218. package/lib/publicApi/table/insertTable.js +46 -46
  219. package/lib/publicApi/table/insertTable.js.map +1 -1
  220. package/lib/publicApi/table/setTableCellShade.d.ts +7 -7
  221. package/lib/publicApi/table/setTableCellShade.js +32 -32
  222. package/lib/publicApi/table/setTableCellShade.js.map +1 -1
  223. package/lib/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  224. package/lib/publicApi/utils/formatImageWithContentModel.js +14 -14
  225. package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  226. package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  227. package/lib/publicApi/utils/formatParagraphWithContentModel.js +18 -18
  228. package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  229. package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  230. package/lib/publicApi/utils/formatSegmentWithContentModel.js +46 -46
  231. package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  232. package/lib/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
  233. package/lib/publicApi/utils/formatTableWithContentModel.js +43 -43
  234. package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -1
  235. package/lib-amd/index.d.ts +48 -48
  236. package/lib-amd/index.js +53 -53
  237. package/lib-amd/index.js.map +1 -1
  238. package/lib-amd/modelApi/block/setModelAlignment.d.ts +5 -5
  239. package/lib-amd/modelApi/block/setModelAlignment.js +62 -62
  240. package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -1
  241. package/lib-amd/modelApi/block/setModelDirection.d.ts +5 -5
  242. package/lib-amd/modelApi/block/setModelDirection.js +68 -68
  243. package/lib-amd/modelApi/block/setModelDirection.js.map +1 -1
  244. package/lib-amd/modelApi/block/setModelIndentation.d.ts +8 -8
  245. package/lib-amd/modelApi/block/setModelIndentation.js +137 -137
  246. package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
  247. package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  248. package/lib-amd/modelApi/block/toggleModelBlockQuote.js +49 -49
  249. package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  250. package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -5
  251. package/lib-amd/modelApi/common/clearModelFormat.js +127 -127
  252. package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
  253. package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -16
  254. package/lib-amd/modelApi/common/wrapBlock.js +48 -48
  255. package/lib-amd/modelApi/common/wrapBlock.js.map +1 -1
  256. package/lib-amd/modelApi/entity/insertEntityModel.d.ts +5 -5
  257. package/lib-amd/modelApi/entity/insertEntityModel.js +78 -78
  258. package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -1
  259. package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  260. package/lib-amd/modelApi/image/applyImageBorderFormat.js +57 -57
  261. package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
  262. package/lib-amd/modelApi/link/matchLink.d.ts +29 -29
  263. package/lib-amd/modelApi/link/matchLink.js +94 -94
  264. package/lib-amd/modelApi/link/matchLink.js.map +1 -1
  265. package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +7 -7
  266. package/lib-amd/modelApi/list/findListItemsInSameThread.js +116 -116
  267. package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
  268. package/lib-amd/modelApi/list/setListType.d.ts +7 -7
  269. package/lib-amd/modelApi/list/setListType.js +113 -113
  270. package/lib-amd/modelApi/list/setListType.js.map +1 -1
  271. package/lib-amd/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  272. package/lib-amd/modelApi/selection/adjustSegmentSelection.js +48 -48
  273. package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  274. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  275. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js +54 -54
  276. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  277. package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +5 -5
  278. package/lib-amd/modelApi/selection/adjustWordSelection.js +120 -120
  279. package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -1
  280. package/lib-amd/modelApi/selection/collapseTableSelection.d.ts +5 -5
  281. package/lib-amd/modelApi/selection/collapseTableSelection.js +17 -17
  282. package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -1
  283. package/lib-amd/modelApi/table/alignTable.d.ts +5 -5
  284. package/lib-amd/modelApi/table/alignTable.js +14 -14
  285. package/lib-amd/modelApi/table/alignTable.js.map +1 -1
  286. package/lib-amd/modelApi/table/alignTableCell.d.ts +9 -9
  287. package/lib-amd/modelApi/table/alignTableCell.js +59 -59
  288. package/lib-amd/modelApi/table/alignTableCell.js.map +1 -1
  289. package/lib-amd/modelApi/table/canMergeCells.d.ts +5 -5
  290. package/lib-amd/modelApi/table/canMergeCells.js +58 -58
  291. package/lib-amd/modelApi/table/canMergeCells.js.map +1 -1
  292. package/lib-amd/modelApi/table/clearSelectedCells.d.ts +8 -8
  293. package/lib-amd/modelApi/table/clearSelectedCells.js +27 -27
  294. package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -1
  295. package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -5
  296. package/lib-amd/modelApi/table/createTableStructure.js +20 -20
  297. package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
  298. package/lib-amd/modelApi/table/deleteTable.d.ts +5 -5
  299. package/lib-amd/modelApi/table/deleteTable.js +13 -13
  300. package/lib-amd/modelApi/table/deleteTable.js.map +1 -1
  301. package/lib-amd/modelApi/table/deleteTableColumn.d.ts +5 -5
  302. package/lib-amd/modelApi/table/deleteTableColumn.js +24 -24
  303. package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -1
  304. package/lib-amd/modelApi/table/deleteTableRow.d.ts +5 -5
  305. package/lib-amd/modelApi/table/deleteTableRow.js +23 -23
  306. package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -1
  307. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  308. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js +57 -57
  309. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  310. package/lib-amd/modelApi/table/insertTableColumn.d.ts +7 -7
  311. package/lib-amd/modelApi/table/insertTableColumn.js +27 -27
  312. package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
  313. package/lib-amd/modelApi/table/insertTableRow.d.ts +7 -7
  314. package/lib-amd/modelApi/table/insertTableRow.js +30 -30
  315. package/lib-amd/modelApi/table/insertTableRow.js.map +1 -1
  316. package/lib-amd/modelApi/table/mergeTableCells.d.ts +5 -5
  317. package/lib-amd/modelApi/table/mergeTableCells.js +26 -26
  318. package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -1
  319. package/lib-amd/modelApi/table/mergeTableColumn.d.ts +5 -5
  320. package/lib-amd/modelApi/table/mergeTableColumn.js +37 -37
  321. package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -1
  322. package/lib-amd/modelApi/table/mergeTableRow.d.ts +5 -5
  323. package/lib-amd/modelApi/table/mergeTableRow.js +38 -38
  324. package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -1
  325. package/lib-amd/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  326. package/lib-amd/modelApi/table/splitTableCellHorizontally.js +53 -53
  327. package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  328. package/lib-amd/modelApi/table/splitTableCellVertically.d.ts +5 -5
  329. package/lib-amd/modelApi/table/splitTableCellVertically.js +56 -56
  330. package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -1
  331. package/lib-amd/publicApi/block/setAlignment.d.ts +7 -7
  332. package/lib-amd/publicApi/block/setAlignment.js +16 -16
  333. package/lib-amd/publicApi/block/setAlignment.js.map +1 -1
  334. package/lib-amd/publicApi/block/setDirection.d.ts +7 -7
  335. package/lib-amd/publicApi/block/setDirection.js +16 -16
  336. package/lib-amd/publicApi/block/setDirection.js.map +1 -1
  337. package/lib-amd/publicApi/block/setHeadingLevel.d.ts +7 -7
  338. package/lib-amd/publicApi/block/setHeadingLevel.js +50 -50
  339. package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -1
  340. package/lib-amd/publicApi/block/setIndentation.d.ts +8 -8
  341. package/lib-amd/publicApi/block/setIndentation.js +24 -24
  342. package/lib-amd/publicApi/block/setIndentation.js.map +1 -1
  343. package/lib-amd/publicApi/block/setParagraphMargin.d.ts +9 -9
  344. package/lib-amd/publicApi/block/setParagraphMargin.js +32 -32
  345. package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -1
  346. package/lib-amd/publicApi/block/setSpacing.d.ts +7 -7
  347. package/lib-amd/publicApi/block/setSpacing.js +21 -21
  348. package/lib-amd/publicApi/block/setSpacing.js.map +1 -1
  349. package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +9 -9
  350. package/lib-amd/publicApi/block/toggleBlockQuote.js +38 -38
  351. package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -1
  352. package/lib-amd/publicApi/entity/insertEntity.d.ts +25 -25
  353. package/lib-amd/publicApi/entity/insertEntity.js +40 -40
  354. package/lib-amd/publicApi/entity/insertEntity.js.map +1 -1
  355. package/lib-amd/publicApi/format/clearFormat.d.ts +6 -6
  356. package/lib-amd/publicApi/format/clearFormat.js +22 -22
  357. package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
  358. package/lib-amd/publicApi/format/getFormatState.d.ts +6 -6
  359. package/lib-amd/publicApi/format/getFormatState.js +21 -21
  360. package/lib-amd/publicApi/format/getFormatState.js.map +1 -1
  361. package/lib-amd/publicApi/image/adjustImageSelection.d.ts +6 -6
  362. package/lib-amd/publicApi/image/adjustImageSelection.js +26 -26
  363. package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -1
  364. package/lib-amd/publicApi/image/changeImage.d.ts +7 -7
  365. package/lib-amd/publicApi/image/changeImage.js +34 -34
  366. package/lib-amd/publicApi/image/changeImage.js.map +1 -1
  367. package/lib-amd/publicApi/image/insertImage.d.ts +7 -7
  368. package/lib-amd/publicApi/image/insertImage.js +36 -36
  369. package/lib-amd/publicApi/image/insertImage.js.map +1 -1
  370. package/lib-amd/publicApi/image/setImageAltText.d.ts +8 -8
  371. package/lib-amd/publicApi/image/setImageAltText.js +17 -17
  372. package/lib-amd/publicApi/image/setImageAltText.js.map +1 -1
  373. package/lib-amd/publicApi/image/setImageBorder.d.ts +9 -9
  374. package/lib-amd/publicApi/image/setImageBorder.js +18 -18
  375. package/lib-amd/publicApi/image/setImageBorder.js.map +1 -1
  376. package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +8 -8
  377. package/lib-amd/publicApi/image/setImageBoxShadow.js +29 -29
  378. package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -1
  379. package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +6 -6
  380. package/lib-amd/publicApi/link/adjustLinkSelection.js +32 -32
  381. package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -1
  382. package/lib-amd/publicApi/link/insertLink.d.ts +15 -15
  383. package/lib-amd/publicApi/link/insertLink.js +116 -116
  384. package/lib-amd/publicApi/link/insertLink.js.map +1 -1
  385. package/lib-amd/publicApi/link/removeLink.d.ts +8 -8
  386. package/lib-amd/publicApi/link/removeLink.js +31 -31
  387. package/lib-amd/publicApi/link/removeLink.js.map +1 -1
  388. package/lib-amd/publicApi/list/setListStartNumber.d.ts +7 -7
  389. package/lib-amd/publicApi/list/setListStartNumber.js +26 -26
  390. package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -1
  391. package/lib-amd/publicApi/list/setListStyle.d.ts +7 -7
  392. package/lib-amd/publicApi/list/setListStyle.js +32 -32
  393. package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
  394. package/lib-amd/publicApi/list/toggleBullet.d.ts +8 -8
  395. package/lib-amd/publicApi/list/toggleBullet.js +20 -20
  396. package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
  397. package/lib-amd/publicApi/list/toggleNumbering.d.ts +8 -8
  398. package/lib-amd/publicApi/list/toggleNumbering.js +20 -20
  399. package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -1
  400. package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +7 -7
  401. package/lib-amd/publicApi/segment/applySegmentFormat.js +23 -23
  402. package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -1
  403. package/lib-amd/publicApi/segment/changeCapitalization.d.ts +10 -10
  404. package/lib-amd/publicApi/segment/changeCapitalization.js +49 -49
  405. package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
  406. package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -8
  407. package/lib-amd/publicApi/segment/changeFontSize.js +60 -60
  408. package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -1
  409. package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +7 -7
  410. package/lib-amd/publicApi/segment/setBackgroundColor.js +34 -34
  411. package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -1
  412. package/lib-amd/publicApi/segment/setFontName.d.ts +7 -7
  413. package/lib-amd/publicApi/segment/setFontName.js +19 -19
  414. package/lib-amd/publicApi/segment/setFontName.js.map +1 -1
  415. package/lib-amd/publicApi/segment/setFontSize.d.ts +12 -12
  416. package/lib-amd/publicApi/segment/setFontSize.js +34 -34
  417. package/lib-amd/publicApi/segment/setFontSize.js.map +1 -1
  418. package/lib-amd/publicApi/segment/setTextColor.d.ts +7 -7
  419. package/lib-amd/publicApi/segment/setTextColor.js +26 -26
  420. package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
  421. package/lib-amd/publicApi/segment/toggleBold.d.ts +6 -6
  422. package/lib-amd/publicApi/segment/toggleBold.js +20 -20
  423. package/lib-amd/publicApi/segment/toggleBold.js.map +1 -1
  424. package/lib-amd/publicApi/segment/toggleCode.d.ts +6 -6
  425. package/lib-amd/publicApi/segment/toggleCode.js +27 -27
  426. package/lib-amd/publicApi/segment/toggleCode.js.map +1 -1
  427. package/lib-amd/publicApi/segment/toggleItalic.d.ts +6 -6
  428. package/lib-amd/publicApi/segment/toggleItalic.js +15 -15
  429. package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -1
  430. package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  431. package/lib-amd/publicApi/segment/toggleStrikethrough.js +15 -15
  432. package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -1
  433. package/lib-amd/publicApi/segment/toggleSubscript.d.ts +6 -6
  434. package/lib-amd/publicApi/segment/toggleSubscript.js +15 -15
  435. package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -1
  436. package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +6 -6
  437. package/lib-amd/publicApi/segment/toggleSuperscript.js +15 -15
  438. package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -1
  439. package/lib-amd/publicApi/segment/toggleUnderline.d.ts +6 -6
  440. package/lib-amd/publicApi/segment/toggleUnderline.js +18 -18
  441. package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -1
  442. package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  443. package/lib-amd/publicApi/table/applyTableBorderFormat.js +292 -292
  444. package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -1
  445. package/lib-amd/publicApi/table/editTable.d.ts +7 -7
  446. package/lib-amd/publicApi/table/editTable.js +66 -66
  447. package/lib-amd/publicApi/table/editTable.js.map +1 -1
  448. package/lib-amd/publicApi/table/formatTable.d.ts +8 -8
  449. package/lib-amd/publicApi/table/formatTable.js +37 -37
  450. package/lib-amd/publicApi/table/formatTable.js.map +1 -1
  451. package/lib-amd/publicApi/table/insertTable.d.ts +11 -11
  452. package/lib-amd/publicApi/table/insertTable.js +45 -45
  453. package/lib-amd/publicApi/table/insertTable.js.map +1 -1
  454. package/lib-amd/publicApi/table/setTableCellShade.d.ts +7 -7
  455. package/lib-amd/publicApi/table/setTableCellShade.js +32 -32
  456. package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -1
  457. package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  458. package/lib-amd/publicApi/utils/formatImageWithContentModel.js +15 -15
  459. package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  460. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  461. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +19 -19
  462. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  463. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  464. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +45 -45
  465. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  466. package/lib-amd/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
  467. package/lib-amd/publicApi/utils/formatTableWithContentModel.js +41 -41
  468. package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -1
  469. package/lib-mjs/index.d.ts +48 -48
  470. package/lib-mjs/index.js +48 -48
  471. package/lib-mjs/index.js.map +1 -1
  472. package/lib-mjs/modelApi/block/setModelAlignment.d.ts +5 -5
  473. package/lib-mjs/modelApi/block/setModelAlignment.js +58 -58
  474. package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -1
  475. package/lib-mjs/modelApi/block/setModelDirection.d.ts +5 -5
  476. package/lib-mjs/modelApi/block/setModelDirection.js +64 -64
  477. package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -1
  478. package/lib-mjs/modelApi/block/setModelIndentation.d.ts +8 -8
  479. package/lib-mjs/modelApi/block/setModelIndentation.js +134 -134
  480. package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
  481. package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  482. package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +46 -46
  483. package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  484. package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -5
  485. package/lib-mjs/modelApi/common/clearModelFormat.js +125 -125
  486. package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
  487. package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -16
  488. package/lib-mjs/modelApi/common/wrapBlock.js +43 -43
  489. package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -1
  490. package/lib-mjs/modelApi/entity/insertEntityModel.d.ts +5 -5
  491. package/lib-mjs/modelApi/entity/insertEntityModel.js +75 -75
  492. package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -1
  493. package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  494. package/lib-mjs/modelApi/image/applyImageBorderFormat.js +54 -54
  495. package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
  496. package/lib-mjs/modelApi/link/matchLink.d.ts +29 -29
  497. package/lib-mjs/modelApi/link/matchLink.js +90 -90
  498. package/lib-mjs/modelApi/link/matchLink.js.map +1 -1
  499. package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +7 -7
  500. package/lib-mjs/modelApi/list/findListItemsInSameThread.js +110 -110
  501. package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
  502. package/lib-mjs/modelApi/list/setListType.d.ts +7 -7
  503. package/lib-mjs/modelApi/list/setListType.js +109 -109
  504. package/lib-mjs/modelApi/list/setListType.js.map +1 -1
  505. package/lib-mjs/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  506. package/lib-mjs/modelApi/selection/adjustSegmentSelection.js +43 -43
  507. package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  508. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  509. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js +51 -51
  510. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  511. package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +5 -5
  512. package/lib-mjs/modelApi/selection/adjustWordSelection.js +117 -117
  513. package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -1
  514. package/lib-mjs/modelApi/selection/collapseTableSelection.d.ts +5 -5
  515. package/lib-mjs/modelApi/selection/collapseTableSelection.js +12 -12
  516. package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -1
  517. package/lib-mjs/modelApi/table/alignTable.d.ts +5 -5
  518. package/lib-mjs/modelApi/table/alignTable.js +8 -8
  519. package/lib-mjs/modelApi/table/alignTable.js.map +1 -1
  520. package/lib-mjs/modelApi/table/alignTableCell.d.ts +9 -9
  521. package/lib-mjs/modelApi/table/alignTableCell.js +53 -53
  522. package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -1
  523. package/lib-mjs/modelApi/table/canMergeCells.d.ts +5 -5
  524. package/lib-mjs/modelApi/table/canMergeCells.js +52 -52
  525. package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -1
  526. package/lib-mjs/modelApi/table/clearSelectedCells.d.ts +8 -8
  527. package/lib-mjs/modelApi/table/clearSelectedCells.js +22 -22
  528. package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -1
  529. package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -5
  530. package/lib-mjs/modelApi/table/createTableStructure.js +15 -15
  531. package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
  532. package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -5
  533. package/lib-mjs/modelApi/table/deleteTable.js +7 -7
  534. package/lib-mjs/modelApi/table/deleteTable.js.map +1 -1
  535. package/lib-mjs/modelApi/table/deleteTableColumn.d.ts +5 -5
  536. package/lib-mjs/modelApi/table/deleteTableColumn.js +20 -20
  537. package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -1
  538. package/lib-mjs/modelApi/table/deleteTableRow.d.ts +5 -5
  539. package/lib-mjs/modelApi/table/deleteTableRow.js +19 -19
  540. package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -1
  541. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  542. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js +52 -52
  543. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  544. package/lib-mjs/modelApi/table/insertTableColumn.d.ts +7 -7
  545. package/lib-mjs/modelApi/table/insertTableColumn.js +24 -24
  546. package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
  547. package/lib-mjs/modelApi/table/insertTableRow.d.ts +7 -7
  548. package/lib-mjs/modelApi/table/insertTableRow.js +28 -28
  549. package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -1
  550. package/lib-mjs/modelApi/table/mergeTableCells.d.ts +5 -5
  551. package/lib-mjs/modelApi/table/mergeTableCells.js +22 -22
  552. package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -1
  553. package/lib-mjs/modelApi/table/mergeTableColumn.d.ts +5 -5
  554. package/lib-mjs/modelApi/table/mergeTableColumn.js +33 -33
  555. package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -1
  556. package/lib-mjs/modelApi/table/mergeTableRow.d.ts +5 -5
  557. package/lib-mjs/modelApi/table/mergeTableRow.js +34 -34
  558. package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -1
  559. package/lib-mjs/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  560. package/lib-mjs/modelApi/table/splitTableCellHorizontally.js +50 -50
  561. package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  562. package/lib-mjs/modelApi/table/splitTableCellVertically.d.ts +5 -5
  563. package/lib-mjs/modelApi/table/splitTableCellVertically.js +53 -53
  564. package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -1
  565. package/lib-mjs/publicApi/block/setAlignment.d.ts +7 -7
  566. package/lib-mjs/publicApi/block/setAlignment.js +12 -12
  567. package/lib-mjs/publicApi/block/setAlignment.js.map +1 -1
  568. package/lib-mjs/publicApi/block/setDirection.d.ts +7 -7
  569. package/lib-mjs/publicApi/block/setDirection.js +12 -12
  570. package/lib-mjs/publicApi/block/setDirection.js.map +1 -1
  571. package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +7 -7
  572. package/lib-mjs/publicApi/block/setHeadingLevel.js +46 -46
  573. package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -1
  574. package/lib-mjs/publicApi/block/setIndentation.d.ts +8 -8
  575. package/lib-mjs/publicApi/block/setIndentation.js +21 -21
  576. package/lib-mjs/publicApi/block/setIndentation.js.map +1 -1
  577. package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +9 -9
  578. package/lib-mjs/publicApi/block/setParagraphMargin.js +29 -29
  579. package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -1
  580. package/lib-mjs/publicApi/block/setSpacing.d.ts +7 -7
  581. package/lib-mjs/publicApi/block/setSpacing.js +17 -17
  582. package/lib-mjs/publicApi/block/setSpacing.js.map +1 -1
  583. package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +9 -9
  584. package/lib-mjs/publicApi/block/toggleBlockQuote.js +35 -35
  585. package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -1
  586. package/lib-mjs/publicApi/entity/insertEntity.d.ts +25 -25
  587. package/lib-mjs/publicApi/entity/insertEntity.js +38 -38
  588. package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -1
  589. package/lib-mjs/publicApi/format/clearFormat.d.ts +6 -6
  590. package/lib-mjs/publicApi/format/clearFormat.js +19 -19
  591. package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
  592. package/lib-mjs/publicApi/format/getFormatState.d.ts +6 -6
  593. package/lib-mjs/publicApi/format/getFormatState.js +17 -17
  594. package/lib-mjs/publicApi/format/getFormatState.js.map +1 -1
  595. package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +6 -6
  596. package/lib-mjs/publicApi/image/adjustImageSelection.js +22 -22
  597. package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -1
  598. package/lib-mjs/publicApi/image/changeImage.d.ts +7 -7
  599. package/lib-mjs/publicApi/image/changeImage.js +31 -31
  600. package/lib-mjs/publicApi/image/changeImage.js.map +1 -1
  601. package/lib-mjs/publicApi/image/insertImage.d.ts +7 -7
  602. package/lib-mjs/publicApi/image/insertImage.js +33 -33
  603. package/lib-mjs/publicApi/image/insertImage.js.map +1 -1
  604. package/lib-mjs/publicApi/image/setImageAltText.d.ts +8 -8
  605. package/lib-mjs/publicApi/image/setImageAltText.js +13 -13
  606. package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -1
  607. package/lib-mjs/publicApi/image/setImageBorder.d.ts +9 -9
  608. package/lib-mjs/publicApi/image/setImageBorder.js +15 -15
  609. package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -1
  610. package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +8 -8
  611. package/lib-mjs/publicApi/image/setImageBoxShadow.js +25 -25
  612. package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -1
  613. package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +6 -6
  614. package/lib-mjs/publicApi/link/adjustLinkSelection.js +30 -30
  615. package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -1
  616. package/lib-mjs/publicApi/link/insertLink.d.ts +15 -15
  617. package/lib-mjs/publicApi/link/insertLink.js +116 -116
  618. package/lib-mjs/publicApi/link/insertLink.js.map +1 -1
  619. package/lib-mjs/publicApi/link/removeLink.d.ts +8 -8
  620. package/lib-mjs/publicApi/link/removeLink.js +28 -28
  621. package/lib-mjs/publicApi/link/removeLink.js.map +1 -1
  622. package/lib-mjs/publicApi/list/setListStartNumber.d.ts +7 -7
  623. package/lib-mjs/publicApi/list/setListStartNumber.js +22 -22
  624. package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -1
  625. package/lib-mjs/publicApi/list/setListStyle.d.ts +7 -7
  626. package/lib-mjs/publicApi/list/setListStyle.js +29 -29
  627. package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
  628. package/lib-mjs/publicApi/list/toggleBullet.d.ts +8 -8
  629. package/lib-mjs/publicApi/list/toggleBullet.js +16 -16
  630. package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
  631. package/lib-mjs/publicApi/list/toggleNumbering.d.ts +8 -8
  632. package/lib-mjs/publicApi/list/toggleNumbering.js +16 -16
  633. package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -1
  634. package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +7 -7
  635. package/lib-mjs/publicApi/segment/applySegmentFormat.js +19 -19
  636. package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -1
  637. package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +10 -10
  638. package/lib-mjs/publicApi/segment/changeCapitalization.js +45 -45
  639. package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -1
  640. package/lib-mjs/publicApi/segment/changeFontSize.d.ts +8 -8
  641. package/lib-mjs/publicApi/segment/changeFontSize.js +58 -58
  642. package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -1
  643. package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +7 -7
  644. package/lib-mjs/publicApi/segment/setBackgroundColor.js +32 -32
  645. package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -1
  646. package/lib-mjs/publicApi/segment/setFontName.d.ts +7 -7
  647. package/lib-mjs/publicApi/segment/setFontName.js +15 -15
  648. package/lib-mjs/publicApi/segment/setFontName.js.map +1 -1
  649. package/lib-mjs/publicApi/segment/setFontSize.d.ts +12 -12
  650. package/lib-mjs/publicApi/segment/setFontSize.js +28 -28
  651. package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -1
  652. package/lib-mjs/publicApi/segment/setTextColor.d.ts +7 -7
  653. package/lib-mjs/publicApi/segment/setTextColor.js +22 -22
  654. package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -1
  655. package/lib-mjs/publicApi/segment/toggleBold.d.ts +6 -6
  656. package/lib-mjs/publicApi/segment/toggleBold.js +17 -17
  657. package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -1
  658. package/lib-mjs/publicApi/segment/toggleCode.d.ts +6 -6
  659. package/lib-mjs/publicApi/segment/toggleCode.js +24 -24
  660. package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -1
  661. package/lib-mjs/publicApi/segment/toggleItalic.d.ts +6 -6
  662. package/lib-mjs/publicApi/segment/toggleItalic.js +11 -11
  663. package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -1
  664. package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  665. package/lib-mjs/publicApi/segment/toggleStrikethrough.js +11 -11
  666. package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -1
  667. package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +6 -6
  668. package/lib-mjs/publicApi/segment/toggleSubscript.js +11 -11
  669. package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -1
  670. package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +6 -6
  671. package/lib-mjs/publicApi/segment/toggleSuperscript.js +11 -11
  672. package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -1
  673. package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +6 -6
  674. package/lib-mjs/publicApi/segment/toggleUnderline.js +15 -15
  675. package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -1
  676. package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  677. package/lib-mjs/publicApi/table/applyTableBorderFormat.js +290 -290
  678. package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -1
  679. package/lib-mjs/publicApi/table/editTable.d.ts +7 -7
  680. package/lib-mjs/publicApi/table/editTable.js +74 -74
  681. package/lib-mjs/publicApi/table/editTable.js.map +1 -1
  682. package/lib-mjs/publicApi/table/formatTable.d.ts +8 -8
  683. package/lib-mjs/publicApi/table/formatTable.js +34 -34
  684. package/lib-mjs/publicApi/table/formatTable.js.map +1 -1
  685. package/lib-mjs/publicApi/table/insertTable.d.ts +11 -11
  686. package/lib-mjs/publicApi/table/insertTable.js +43 -43
  687. package/lib-mjs/publicApi/table/insertTable.js.map +1 -1
  688. package/lib-mjs/publicApi/table/setTableCellShade.d.ts +7 -7
  689. package/lib-mjs/publicApi/table/setTableCellShade.js +29 -29
  690. package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
  691. package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  692. package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +11 -11
  693. package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  694. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  695. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +14 -14
  696. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  697. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  698. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +42 -42
  699. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  700. package/lib-mjs/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
  701. package/lib-mjs/publicApi/utils/formatTableWithContentModel.js +39 -39
  702. package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -1
  703. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
- import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * Set table cell shade color
4
- * @param editor The editor instance
5
- * @param color The color to set. Pass null to remove existing shade color
6
- */
7
- export default function setTableCellShade(editor: IStandaloneEditor, color: string | null): void;
1
+ import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Set table cell shade color
4
+ * @param editor The editor instance
5
+ * @param color The color to set. Pass null to remove existing shade color
6
+ */
7
+ export default function setTableCellShade(editor: IStandaloneEditor, color: string | null): void;
@@ -1,33 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
5
- /**
6
- * Set table cell shade color
7
- * @param editor The editor instance
8
- * @param color The color to set. Pass null to remove existing shade color
9
- */
10
- function setTableCellShade(editor, color) {
11
- editor.focus();
12
- editor.formatContentModel(function (model) {
13
- var _a = (0, tslib_1.__read)((0, roosterjs_content_model_core_1.getFirstSelectedTable)(model), 1), table = _a[0];
14
- if (table) {
15
- (0, roosterjs_content_model_core_1.normalizeTable)(table);
16
- table.rows.forEach(function (row) {
17
- return row.cells.forEach(function (cell) {
18
- if ((0, roosterjs_content_model_core_1.hasSelectionInBlockGroup)(cell)) {
19
- (0, roosterjs_content_model_core_1.setTableCellBackgroundColor)(cell, color, true /*isColorOverride*/);
20
- }
21
- });
22
- });
23
- return true;
24
- }
25
- else {
26
- return false;
27
- }
28
- }, {
29
- apiName: 'setTableCellShade',
30
- });
31
- }
32
- exports.default = setTableCellShade;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
5
+ /**
6
+ * Set table cell shade color
7
+ * @param editor The editor instance
8
+ * @param color The color to set. Pass null to remove existing shade color
9
+ */
10
+ function setTableCellShade(editor, color) {
11
+ editor.focus();
12
+ editor.formatContentModel(function (model) {
13
+ var _a = (0, tslib_1.__read)((0, roosterjs_content_model_core_1.getFirstSelectedTable)(model), 1), table = _a[0];
14
+ if (table) {
15
+ (0, roosterjs_content_model_core_1.normalizeTable)(table);
16
+ table.rows.forEach(function (row) {
17
+ return row.cells.forEach(function (cell) {
18
+ if ((0, roosterjs_content_model_core_1.hasSelectionInBlockGroup)(cell)) {
19
+ (0, roosterjs_content_model_core_1.setTableCellBackgroundColor)(cell, color, true /*isColorOverride*/);
20
+ }
21
+ });
22
+ });
23
+ return true;
24
+ }
25
+ else {
26
+ return false;
27
+ }
28
+ }, {
29
+ apiName: 'setTableCellShade',
30
+ });
31
+ }
32
+ exports.default = setTableCellShade;
33
33
  //# sourceMappingURL=setTableCellShade.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/table/setTableCellShade.ts"],"names":[],"mappings":";;;AAAA,6EAKsC;AAGtC;;;;GAIG;AACH,SAAwB,iBAAiB,CAAC,MAAyB,EAAE,KAAoB;IACrF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAU,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAArC,KAAK,QAAgC,CAAC;QAE7C,IAAI,KAAK,EAAE;YACP,IAAA,6CAAc,EAAC,KAAK,CAAC,CAAC;YAEtB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBAClB,OAAA,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBAClB,IAAI,IAAA,uDAAwB,EAAC,IAAI,CAAC,EAAE;wBAChC,IAAA,0DAA2B,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;qBACtE;gBACL,CAAC,CAAC;YAJF,CAIE,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,mBAAmB;KAC/B,CACJ,CAAC;AACN,CAAC;AA3BD,oCA2BC","sourcesContent":["import {\r\n hasSelectionInBlockGroup,\r\n getFirstSelectedTable,\r\n normalizeTable,\r\n setTableCellBackgroundColor,\r\n} from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set table cell shade color\r\n * @param editor The editor instance\r\n * @param color The color to set. Pass null to remove existing shade color\r\n */\r\nexport default function setTableCellShade(editor: IStandaloneEditor, color: string | null) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const [table] = getFirstSelectedTable(model);\r\n\r\n if (table) {\r\n normalizeTable(table);\r\n\r\n table.rows.forEach(row =>\r\n row.cells.forEach(cell => {\r\n if (hasSelectionInBlockGroup(cell)) {\r\n setTableCellBackgroundColor(cell, color, true /*isColorOverride*/);\r\n }\r\n })\r\n );\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName: 'setTableCellShade',\r\n }\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/table/setTableCellShade.ts"],"names":[],"mappings":";;;AAAA,6EAKsC;AAGtC;;;;GAIG;AACH,SAAwB,iBAAiB,CAAC,MAAyB,EAAE,KAAoB;IACrF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAU,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAArC,KAAK,QAAgC,CAAC;QAE7C,IAAI,KAAK,EAAE;YACP,IAAA,6CAAc,EAAC,KAAK,CAAC,CAAC;YAEtB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBAClB,OAAA,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBAClB,IAAI,IAAA,uDAAwB,EAAC,IAAI,CAAC,EAAE;wBAChC,IAAA,0DAA2B,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;qBACtE;gBACL,CAAC,CAAC;YAJF,CAIE,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,mBAAmB;KAC/B,CACJ,CAAC;AACN,CAAC;AA3BD,oCA2BC","sourcesContent":["import {\n hasSelectionInBlockGroup,\n getFirstSelectedTable,\n normalizeTable,\n setTableCellBackgroundColor,\n} from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set table cell shade color\n * @param editor The editor instance\n * @param color The color to set. Pass null to remove existing shade color\n */\nexport default function setTableCellShade(editor: IStandaloneEditor, color: string | null) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const [table] = getFirstSelectedTable(model);\n\n if (table) {\n normalizeTable(table);\n\n table.rows.forEach(row =>\n row.cells.forEach(cell => {\n if (hasSelectionInBlockGroup(cell)) {\n setTableCellBackgroundColor(cell, color, true /*isColorOverride*/);\n }\n })\n );\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'setTableCellShade',\n }\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export default function formatImageWithContentModel(editor: IStandaloneEditor, apiName: string, callback: (segment: ContentModelImage) => void): void;
1
+ import type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export default function formatImageWithContentModel(editor: IStandaloneEditor, apiName: string, callback: (segment: ContentModelImage) => void): void;
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var formatSegmentWithContentModel_1 = require("./formatSegmentWithContentModel");
4
- /**
5
- * @internal
6
- */
7
- function formatImageWithContentModel(editor, apiName, callback) {
8
- (0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, apiName, function (_, __, segment) {
9
- if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Image') {
10
- callback(segment);
11
- }
12
- }, undefined /** segmentHasStyleCallback **/, undefined /** includingFormatHolder */);
13
- }
14
- exports.default = formatImageWithContentModel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var formatSegmentWithContentModel_1 = require("./formatSegmentWithContentModel");
4
+ /**
5
+ * @internal
6
+ */
7
+ function formatImageWithContentModel(editor, apiName, callback) {
8
+ (0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, apiName, function (_, __, segment) {
9
+ if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Image') {
10
+ callback(segment);
11
+ }
12
+ }, undefined /** segmentHasStyleCallback **/, undefined /** includingFormatHolder */);
13
+ }
14
+ exports.default = formatImageWithContentModel;
15
15
  //# sourceMappingURL=formatImageWithContentModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatImageWithContentModel.ts"],"names":[],"mappings":";;AAAA,iFAAgF;AAGhF;;GAEG;AACH,SAAwB,2BAA2B,CAC/C,MAAyB,EACzB,OAAe,EACf,QAA8C;IAE9C,IAAA,6DAA6B,EACzB,MAAM,EACN,OAAO,EACP,UAAC,CAAC,EAAE,EAAE,EAAE,OAAO;QACX,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,EAAE;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACrB;IACL,CAAC,EACD,SAAS,CAAC,+BAA+B,EACzC,SAAS,CAAC,4BAA4B,CACzC,CAAC;AACN,CAAC;AAhBD,8CAgBC","sourcesContent":["import { formatSegmentWithContentModel } from './formatSegmentWithContentModel';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport default function formatImageWithContentModel(\r\n editor: IStandaloneEditor,\r\n apiName: string,\r\n callback: (segment: ContentModelImage) => void\r\n) {\r\n formatSegmentWithContentModel(\r\n editor,\r\n apiName,\r\n (_, __, segment) => {\r\n if (segment?.segmentType == 'Image') {\r\n callback(segment);\r\n }\r\n },\r\n undefined /** segmentHasStyleCallback **/,\r\n undefined /** includingFormatHolder */\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatImageWithContentModel.ts"],"names":[],"mappings":";;AAAA,iFAAgF;AAGhF;;GAEG;AACH,SAAwB,2BAA2B,CAC/C,MAAyB,EACzB,OAAe,EACf,QAA8C;IAE9C,IAAA,6DAA6B,EACzB,MAAM,EACN,OAAO,EACP,UAAC,CAAC,EAAE,EAAE,EAAE,OAAO;QACX,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,EAAE;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACrB;IACL,CAAC,EACD,SAAS,CAAC,+BAA+B,EACzC,SAAS,CAAC,4BAA4B,CACzC,CAAC;AACN,CAAC;AAhBD,8CAgBC","sourcesContent":["import { formatSegmentWithContentModel } from './formatSegmentWithContentModel';\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport default function formatImageWithContentModel(\n editor: IStandaloneEditor,\n apiName: string,\n callback: (segment: ContentModelImage) => void\n) {\n formatSegmentWithContentModel(\n editor,\n apiName,\n (_, __, segment) => {\n if (segment?.segmentType == 'Image') {\n callback(segment);\n }\n },\n undefined /** segmentHasStyleCallback **/,\n undefined /** includingFormatHolder */\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { ContentModelParagraph, IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export declare function formatParagraphWithContentModel(editor: IStandaloneEditor, apiName: string, setStyleCallback: (paragraph: ContentModelParagraph) => void): void;
1
+ import type { ContentModelParagraph, IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function formatParagraphWithContentModel(editor: IStandaloneEditor, apiName: string, setStyleCallback: (paragraph: ContentModelParagraph) => void): void;
@@ -1,19 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatParagraphWithContentModel = void 0;
4
- var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
5
- /**
6
- * @internal
7
- */
8
- function formatParagraphWithContentModel(editor, apiName, setStyleCallback) {
9
- editor.formatContentModel(function (model, context) {
10
- var paragraphs = (0, roosterjs_content_model_core_1.getSelectedParagraphs)(model);
11
- paragraphs.forEach(setStyleCallback);
12
- context.newPendingFormat = 'preserve';
13
- return paragraphs.length > 0;
14
- }, {
15
- apiName: apiName,
16
- });
17
- }
18
- exports.formatParagraphWithContentModel = formatParagraphWithContentModel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatParagraphWithContentModel = void 0;
4
+ var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
5
+ /**
6
+ * @internal
7
+ */
8
+ function formatParagraphWithContentModel(editor, apiName, setStyleCallback) {
9
+ editor.formatContentModel(function (model, context) {
10
+ var paragraphs = (0, roosterjs_content_model_core_1.getSelectedParagraphs)(model);
11
+ paragraphs.forEach(setStyleCallback);
12
+ context.newPendingFormat = 'preserve';
13
+ return paragraphs.length > 0;
14
+ }, {
15
+ apiName: apiName,
16
+ });
17
+ }
18
+ exports.formatParagraphWithContentModel = formatParagraphWithContentModel;
19
19
  //# sourceMappingURL=formatParagraphWithContentModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatParagraphWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatParagraphWithContentModel.ts"],"names":[],"mappings":";;;AAAA,6EAAqE;AAGrE;;GAEG;AACH,SAAgB,+BAA+B,CAC3C,MAAyB,EACzB,OAAe,EACf,gBAA4D;IAE5D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,UAAU,GAAG,IAAA,oDAAqB,EAAC,KAAK,CAAC,CAAC;QAEhD,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACrC,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAlBD,0EAkBC","sourcesContent":["import { getSelectedParagraphs } from 'roosterjs-content-model-core';\r\nimport type { ContentModelParagraph, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function formatParagraphWithContentModel(\r\n editor: IStandaloneEditor,\r\n apiName: string,\r\n setStyleCallback: (paragraph: ContentModelParagraph) => void\r\n) {\r\n editor.formatContentModel(\r\n (model, context) => {\r\n const paragraphs = getSelectedParagraphs(model);\r\n\r\n paragraphs.forEach(setStyleCallback);\r\n context.newPendingFormat = 'preserve';\r\n\r\n return paragraphs.length > 0;\r\n },\r\n {\r\n apiName,\r\n }\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"formatParagraphWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatParagraphWithContentModel.ts"],"names":[],"mappings":";;;AAAA,6EAAqE;AAGrE;;GAEG;AACH,SAAgB,+BAA+B,CAC3C,MAAyB,EACzB,OAAe,EACf,gBAA4D;IAE5D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,UAAU,GAAG,IAAA,oDAAqB,EAAC,KAAK,CAAC,CAAC;QAEhD,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACrC,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAlBD,0EAkBC","sourcesContent":["import { getSelectedParagraphs } from 'roosterjs-content-model-core';\nimport type { ContentModelParagraph, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function formatParagraphWithContentModel(\n editor: IStandaloneEditor,\n apiName: string,\n setStyleCallback: (paragraph: ContentModelParagraph) => void\n) {\n editor.formatContentModel(\n (model, context) => {\n const paragraphs = getSelectedParagraphs(model);\n\n paragraphs.forEach(setStyleCallback);\n context.newPendingFormat = 'preserve';\n\n return paragraphs.length > 0;\n },\n {\n apiName,\n }\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { ContentModelDocument, ContentModelParagraph, ContentModelSegment, ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * @internal
4
- */
5
- export declare function formatSegmentWithContentModel(editor: IStandaloneEditor, apiName: string, toggleStyleCallback: (format: ContentModelSegmentFormat, isTuringOn: boolean, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => void, segmentHasStyleCallback?: (format: ContentModelSegmentFormat, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => boolean, includingFormatHolder?: boolean, afterFormatCallback?: (model: ContentModelDocument) => void): void;
1
+ import type { ContentModelDocument, ContentModelParagraph, ContentModelSegment, ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function formatSegmentWithContentModel(editor: IStandaloneEditor, apiName: string, toggleStyleCallback: (format: ContentModelSegmentFormat, isTuringOn: boolean, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => void, segmentHasStyleCallback?: (format: ContentModelSegmentFormat, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => boolean, includingFormatHolder?: boolean, afterFormatCallback?: (model: ContentModelDocument) => void): void;
@@ -1,47 +1,47 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatSegmentWithContentModel = void 0;
4
- var tslib_1 = require("tslib");
5
- var adjustWordSelection_1 = require("../../modelApi/selection/adjustWordSelection");
6
- var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
7
- /**
8
- * @internal
9
- */
10
- function formatSegmentWithContentModel(editor, apiName, toggleStyleCallback, segmentHasStyleCallback, includingFormatHolder, afterFormatCallback) {
11
- editor.formatContentModel(function (model, context) {
12
- var segmentAndParagraphs = (0, roosterjs_content_model_core_1.getSelectedSegmentsAndParagraphs)(model, !!includingFormatHolder);
13
- var isCollapsedSelection = segmentAndParagraphs.length == 1 &&
14
- segmentAndParagraphs[0][0].segmentType == 'SelectionMarker';
15
- if (isCollapsedSelection) {
16
- var para_1 = segmentAndParagraphs[0][1];
17
- segmentAndParagraphs = (0, adjustWordSelection_1.adjustWordSelection)(model, segmentAndParagraphs[0][0]).map(function (x) { return [x, para_1]; });
18
- if (segmentAndParagraphs.length > 1) {
19
- isCollapsedSelection = false;
20
- }
21
- }
22
- var formatsAndSegments = segmentAndParagraphs.map(function (item) { return [item[0].format, item[0], item[1]]; });
23
- var isTurningOff = segmentHasStyleCallback
24
- ? formatsAndSegments.every(function (_a) {
25
- var _b = (0, tslib_1.__read)(_a, 3), format = _b[0], segment = _b[1], paragraph = _b[2];
26
- return segmentHasStyleCallback(format, segment, paragraph);
27
- })
28
- : false;
29
- formatsAndSegments.forEach(function (_a) {
30
- var _b = (0, tslib_1.__read)(_a, 3), format = _b[0], segment = _b[1], paragraph = _b[2];
31
- return toggleStyleCallback(format, !isTurningOff, segment, paragraph);
32
- });
33
- afterFormatCallback === null || afterFormatCallback === void 0 ? void 0 : afterFormatCallback(model);
34
- if (isCollapsedSelection) {
35
- context.newPendingFormat = segmentAndParagraphs[0][0].format;
36
- editor.focus();
37
- return false;
38
- }
39
- else {
40
- return formatsAndSegments.length > 0;
41
- }
42
- }, {
43
- apiName: apiName,
44
- });
45
- }
46
- exports.formatSegmentWithContentModel = formatSegmentWithContentModel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatSegmentWithContentModel = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var adjustWordSelection_1 = require("../../modelApi/selection/adjustWordSelection");
6
+ var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
7
+ /**
8
+ * @internal
9
+ */
10
+ function formatSegmentWithContentModel(editor, apiName, toggleStyleCallback, segmentHasStyleCallback, includingFormatHolder, afterFormatCallback) {
11
+ editor.formatContentModel(function (model, context) {
12
+ var segmentAndParagraphs = (0, roosterjs_content_model_core_1.getSelectedSegmentsAndParagraphs)(model, !!includingFormatHolder);
13
+ var isCollapsedSelection = segmentAndParagraphs.length == 1 &&
14
+ segmentAndParagraphs[0][0].segmentType == 'SelectionMarker';
15
+ if (isCollapsedSelection) {
16
+ var para_1 = segmentAndParagraphs[0][1];
17
+ segmentAndParagraphs = (0, adjustWordSelection_1.adjustWordSelection)(model, segmentAndParagraphs[0][0]).map(function (x) { return [x, para_1]; });
18
+ if (segmentAndParagraphs.length > 1) {
19
+ isCollapsedSelection = false;
20
+ }
21
+ }
22
+ var formatsAndSegments = segmentAndParagraphs.map(function (item) { return [item[0].format, item[0], item[1]]; });
23
+ var isTurningOff = segmentHasStyleCallback
24
+ ? formatsAndSegments.every(function (_a) {
25
+ var _b = (0, tslib_1.__read)(_a, 3), format = _b[0], segment = _b[1], paragraph = _b[2];
26
+ return segmentHasStyleCallback(format, segment, paragraph);
27
+ })
28
+ : false;
29
+ formatsAndSegments.forEach(function (_a) {
30
+ var _b = (0, tslib_1.__read)(_a, 3), format = _b[0], segment = _b[1], paragraph = _b[2];
31
+ return toggleStyleCallback(format, !isTurningOff, segment, paragraph);
32
+ });
33
+ afterFormatCallback === null || afterFormatCallback === void 0 ? void 0 : afterFormatCallback(model);
34
+ if (isCollapsedSelection) {
35
+ context.newPendingFormat = segmentAndParagraphs[0][0].format;
36
+ editor.focus();
37
+ return false;
38
+ }
39
+ else {
40
+ return formatsAndSegments.length > 0;
41
+ }
42
+ }, {
43
+ apiName: apiName,
44
+ });
45
+ }
46
+ exports.formatSegmentWithContentModel = formatSegmentWithContentModel;
47
47
  //# sourceMappingURL=formatSegmentWithContentModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatSegmentWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatSegmentWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,oFAAmF;AACnF,6EAAgF;AAShF;;GAEG;AACH,SAAgB,6BAA6B,CACzC,MAAyB,EACzB,OAAe,EACf,mBAKS,EACT,uBAIY,EACZ,qBAA+B,EAC/B,mBAA2D;IAE3D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAI,oBAAoB,GAAG,IAAA,+DAAgC,EACvD,KAAK,EACL,CAAC,CAAC,qBAAqB,CAC1B,CAAC;QACF,IAAI,oBAAoB,GACpB,oBAAoB,CAAC,MAAM,IAAI,CAAC;YAChC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,iBAAiB,CAAC;QAEhE,IAAI,oBAAoB,EAAE;YACtB,IAAM,MAAI,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAExC,oBAAoB,GAAG,IAAA,yCAAmB,EACtC,KAAK,EACL,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC7B,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,MAAI,CAAC,EAAT,CAAS,CAAC,CAAC;YAEtB,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,oBAAoB,GAAG,KAAK,CAAC;aAChC;SACJ;QAED,IAAM,kBAAkB,GAIlB,oBAAoB,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAE3E,IAAM,YAAY,GAAG,uBAAuB;YACxC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,UAAC,EAA4B;oBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;gBACjD,OAAA,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC;YAAnD,CAAmD,CACtD;YACH,CAAC,CAAC,KAAK,CAAC;QAEZ,kBAAkB,CAAC,OAAO,CAAC,UAAC,EAA4B;gBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;YACnD,OAAA,mBAAmB,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC;QAA9D,CAA8D,CACjE,CAAC;QAEF,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,CAAC;QAE7B,IAAI,oBAAoB,EAAE;YACtB,OAAO,CAAC,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7D,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;SAChB;aAAM;YACH,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC;IACL,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAtED,sEAsEC","sourcesContent":["import { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';\r\nimport { getSelectedSegmentsAndParagraphs } from 'roosterjs-content-model-core';\r\nimport type {\r\n ContentModelDocument,\r\n ContentModelParagraph,\r\n ContentModelSegment,\r\n ContentModelSegmentFormat,\r\n IStandaloneEditor,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function formatSegmentWithContentModel(\r\n editor: IStandaloneEditor,\r\n apiName: string,\r\n toggleStyleCallback: (\r\n format: ContentModelSegmentFormat,\r\n isTuringOn: boolean,\r\n segment: ContentModelSegment | null,\r\n paragraph: ContentModelParagraph | null\r\n ) => void,\r\n segmentHasStyleCallback?: (\r\n format: ContentModelSegmentFormat,\r\n segment: ContentModelSegment | null,\r\n paragraph: ContentModelParagraph | null\r\n ) => boolean,\r\n includingFormatHolder?: boolean,\r\n afterFormatCallback?: (model: ContentModelDocument) => void\r\n) {\r\n editor.formatContentModel(\r\n (model, context) => {\r\n let segmentAndParagraphs = getSelectedSegmentsAndParagraphs(\r\n model,\r\n !!includingFormatHolder\r\n );\r\n let isCollapsedSelection =\r\n segmentAndParagraphs.length == 1 &&\r\n segmentAndParagraphs[0][0].segmentType == 'SelectionMarker';\r\n\r\n if (isCollapsedSelection) {\r\n const para = segmentAndParagraphs[0][1];\r\n\r\n segmentAndParagraphs = adjustWordSelection(\r\n model,\r\n segmentAndParagraphs[0][0]\r\n ).map(x => [x, para]);\r\n\r\n if (segmentAndParagraphs.length > 1) {\r\n isCollapsedSelection = false;\r\n }\r\n }\r\n\r\n const formatsAndSegments: [\r\n ContentModelSegmentFormat,\r\n ContentModelSegment | null,\r\n ContentModelParagraph | null\r\n ][] = segmentAndParagraphs.map(item => [item[0].format, item[0], item[1]]);\r\n\r\n const isTurningOff = segmentHasStyleCallback\r\n ? formatsAndSegments.every(([format, segment, paragraph]) =>\r\n segmentHasStyleCallback(format, segment, paragraph)\r\n )\r\n : false;\r\n\r\n formatsAndSegments.forEach(([format, segment, paragraph]) =>\r\n toggleStyleCallback(format, !isTurningOff, segment, paragraph)\r\n );\r\n\r\n afterFormatCallback?.(model);\r\n\r\n if (isCollapsedSelection) {\r\n context.newPendingFormat = segmentAndParagraphs[0][0].format;\r\n editor.focus();\r\n return false;\r\n } else {\r\n return formatsAndSegments.length > 0;\r\n }\r\n },\r\n {\r\n apiName,\r\n }\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"formatSegmentWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatSegmentWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,oFAAmF;AACnF,6EAAgF;AAShF;;GAEG;AACH,SAAgB,6BAA6B,CACzC,MAAyB,EACzB,OAAe,EACf,mBAKS,EACT,uBAIY,EACZ,qBAA+B,EAC/B,mBAA2D;IAE3D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAI,oBAAoB,GAAG,IAAA,+DAAgC,EACvD,KAAK,EACL,CAAC,CAAC,qBAAqB,CAC1B,CAAC;QACF,IAAI,oBAAoB,GACpB,oBAAoB,CAAC,MAAM,IAAI,CAAC;YAChC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,iBAAiB,CAAC;QAEhE,IAAI,oBAAoB,EAAE;YACtB,IAAM,MAAI,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAExC,oBAAoB,GAAG,IAAA,yCAAmB,EACtC,KAAK,EACL,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC7B,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,MAAI,CAAC,EAAT,CAAS,CAAC,CAAC;YAEtB,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,oBAAoB,GAAG,KAAK,CAAC;aAChC;SACJ;QAED,IAAM,kBAAkB,GAIlB,oBAAoB,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAE3E,IAAM,YAAY,GAAG,uBAAuB;YACxC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,UAAC,EAA4B;oBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;gBACjD,OAAA,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC;YAAnD,CAAmD,CACtD;YACH,CAAC,CAAC,KAAK,CAAC;QAEZ,kBAAkB,CAAC,OAAO,CAAC,UAAC,EAA4B;gBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;YACnD,OAAA,mBAAmB,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC;QAA9D,CAA8D,CACjE,CAAC;QAEF,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,CAAC;QAE7B,IAAI,oBAAoB,EAAE;YACtB,OAAO,CAAC,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7D,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;SAChB;aAAM;YACH,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC;IACL,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAtED,sEAsEC","sourcesContent":["import { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';\nimport { getSelectedSegmentsAndParagraphs } from 'roosterjs-content-model-core';\nimport type {\n ContentModelDocument,\n ContentModelParagraph,\n ContentModelSegment,\n ContentModelSegmentFormat,\n IStandaloneEditor,\n} from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function formatSegmentWithContentModel(\n editor: IStandaloneEditor,\n apiName: string,\n toggleStyleCallback: (\n format: ContentModelSegmentFormat,\n isTuringOn: boolean,\n segment: ContentModelSegment | null,\n paragraph: ContentModelParagraph | null\n ) => void,\n segmentHasStyleCallback?: (\n format: ContentModelSegmentFormat,\n segment: ContentModelSegment | null,\n paragraph: ContentModelParagraph | null\n ) => boolean,\n includingFormatHolder?: boolean,\n afterFormatCallback?: (model: ContentModelDocument) => void\n) {\n editor.formatContentModel(\n (model, context) => {\n let segmentAndParagraphs = getSelectedSegmentsAndParagraphs(\n model,\n !!includingFormatHolder\n );\n let isCollapsedSelection =\n segmentAndParagraphs.length == 1 &&\n segmentAndParagraphs[0][0].segmentType == 'SelectionMarker';\n\n if (isCollapsedSelection) {\n const para = segmentAndParagraphs[0][1];\n\n segmentAndParagraphs = adjustWordSelection(\n model,\n segmentAndParagraphs[0][0]\n ).map(x => [x, para]);\n\n if (segmentAndParagraphs.length > 1) {\n isCollapsedSelection = false;\n }\n }\n\n const formatsAndSegments: [\n ContentModelSegmentFormat,\n ContentModelSegment | null,\n ContentModelParagraph | null\n ][] = segmentAndParagraphs.map(item => [item[0].format, item[0], item[1]]);\n\n const isTurningOff = segmentHasStyleCallback\n ? formatsAndSegments.every(([format, segment, paragraph]) =>\n segmentHasStyleCallback(format, segment, paragraph)\n )\n : false;\n\n formatsAndSegments.forEach(([format, segment, paragraph]) =>\n toggleStyleCallback(format, !isTurningOff, segment, paragraph)\n );\n\n afterFormatCallback?.(model);\n\n if (isCollapsedSelection) {\n context.newPendingFormat = segmentAndParagraphs[0][0].format;\n editor.focus();\n return false;\n } else {\n return formatsAndSegments.length > 0;\n }\n },\n {\n apiName,\n }\n );\n}\n"]}
@@ -1,9 +1,9 @@
1
- import type { ContentModelTable, IStandaloneEditor, TableSelection } from 'roosterjs-content-model-types';
2
- /**
3
- * Invoke a callback to format the selected table using Content Model
4
- * @param editor The editor object
5
- * @param apiName Name of API this calling this function. This is mostly for logging.
6
- * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.
7
- * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection
8
- */
9
- export declare function formatTableWithContentModel(editor: IStandaloneEditor, apiName: string, callback: (tableModel: ContentModelTable) => void, selectionOverride?: TableSelection): void;
1
+ import type { ContentModelTable, IStandaloneEditor, TableSelection } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Invoke a callback to format the selected table using Content Model
4
+ * @param editor The editor object
5
+ * @param apiName Name of API this calling this function. This is mostly for logging.
6
+ * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.
7
+ * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection
8
+ */
9
+ export declare function formatTableWithContentModel(editor: IStandaloneEditor, apiName: string, callback: (tableModel: ContentModelTable) => void, selectionOverride?: TableSelection): void;
@@ -1,44 +1,44 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatTableWithContentModel = void 0;
4
- var tslib_1 = require("tslib");
5
- var ensureFocusableParagraphForTable_1 = require("../../modelApi/table/ensureFocusableParagraphForTable");
6
- var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
7
- var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
8
- /**
9
- * Invoke a callback to format the selected table using Content Model
10
- * @param editor The editor object
11
- * @param apiName Name of API this calling this function. This is mostly for logging.
12
- * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.
13
- * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection
14
- */
15
- function formatTableWithContentModel(editor, apiName, callback, selectionOverride) {
16
- editor.formatContentModel(function (model) {
17
- var _a = (0, tslib_1.__read)((0, roosterjs_content_model_core_1.getFirstSelectedTable)(model), 2), tableModel = _a[0], path = _a[1];
18
- if (tableModel) {
19
- callback(tableModel);
20
- if (!(0, roosterjs_content_model_core_1.hasSelectionInBlock)(tableModel)) {
21
- var paragraph = (0, ensureFocusableParagraphForTable_1.ensureFocusableParagraphForTable)(model, path, tableModel);
22
- if (paragraph) {
23
- var marker = (0, roosterjs_content_model_dom_1.createSelectionMarker)(model.format);
24
- paragraph.segments.unshift(marker);
25
- (0, roosterjs_content_model_dom_1.setParagraphNotImplicit)(paragraph);
26
- (0, roosterjs_content_model_core_1.setSelection)(model, marker);
27
- }
28
- }
29
- (0, roosterjs_content_model_core_1.normalizeTable)(tableModel, model.format);
30
- if ((0, roosterjs_content_model_dom_1.hasMetadata)(tableModel)) {
31
- (0, roosterjs_content_model_core_1.applyTableFormat)(tableModel, undefined /*newFormat*/, true /*keepCellShade*/);
32
- }
33
- return true;
34
- }
35
- else {
36
- return false;
37
- }
38
- }, {
39
- apiName: apiName,
40
- selectionOverride: selectionOverride,
41
- });
42
- }
43
- exports.formatTableWithContentModel = formatTableWithContentModel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatTableWithContentModel = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var ensureFocusableParagraphForTable_1 = require("../../modelApi/table/ensureFocusableParagraphForTable");
6
+ var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
7
+ var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
8
+ /**
9
+ * Invoke a callback to format the selected table using Content Model
10
+ * @param editor The editor object
11
+ * @param apiName Name of API this calling this function. This is mostly for logging.
12
+ * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.
13
+ * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection
14
+ */
15
+ function formatTableWithContentModel(editor, apiName, callback, selectionOverride) {
16
+ editor.formatContentModel(function (model) {
17
+ var _a = (0, tslib_1.__read)((0, roosterjs_content_model_core_1.getFirstSelectedTable)(model), 2), tableModel = _a[0], path = _a[1];
18
+ if (tableModel) {
19
+ callback(tableModel);
20
+ if (!(0, roosterjs_content_model_core_1.hasSelectionInBlock)(tableModel)) {
21
+ var paragraph = (0, ensureFocusableParagraphForTable_1.ensureFocusableParagraphForTable)(model, path, tableModel);
22
+ if (paragraph) {
23
+ var marker = (0, roosterjs_content_model_dom_1.createSelectionMarker)(model.format);
24
+ paragraph.segments.unshift(marker);
25
+ (0, roosterjs_content_model_dom_1.setParagraphNotImplicit)(paragraph);
26
+ (0, roosterjs_content_model_core_1.setSelection)(model, marker);
27
+ }
28
+ }
29
+ (0, roosterjs_content_model_core_1.normalizeTable)(tableModel, model.format);
30
+ if ((0, roosterjs_content_model_dom_1.hasMetadata)(tableModel)) {
31
+ (0, roosterjs_content_model_core_1.applyTableFormat)(tableModel, undefined /*newFormat*/, true /*keepCellShade*/);
32
+ }
33
+ return true;
34
+ }
35
+ else {
36
+ return false;
37
+ }
38
+ }, {
39
+ apiName: apiName,
40
+ selectionOverride: selectionOverride,
41
+ });
42
+ }
43
+ exports.formatTableWithContentModel = formatTableWithContentModel;
44
44
  //# sourceMappingURL=formatTableWithContentModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatTableWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatTableWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,0GAAyG;AACzG,2EAIqC;AACrC,6EAMsC;AAOtC;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACvC,MAAyB,EACzB,OAAe,EACf,QAAiD,EACjD,iBAAkC;IAElC,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAqB,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAAhD,UAAU,QAAA,EAAE,IAAI,QAAgC,CAAC;QAExD,IAAI,UAAU,EAAE;YACZ,QAAQ,CAAC,UAAU,CAAC,CAAC;YAErB,IAAI,CAAC,IAAA,kDAAmB,EAAC,UAAU,CAAC,EAAE;gBAClC,IAAM,SAAS,GAAG,IAAA,mEAAgC,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;gBAE5E,IAAI,SAAS,EAAE;oBACX,IAAM,MAAM,GAAG,IAAA,mDAAqB,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;oBAEnD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;oBACnC,IAAA,qDAAuB,EAAC,SAAS,CAAC,CAAC;oBACnC,IAAA,2CAAY,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;iBAC/B;aACJ;YAED,IAAA,6CAAc,EAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAEzC,IAAI,IAAA,yCAAW,EAAC,UAAU,CAAC,EAAE;gBACzB,IAAA,+CAAgB,EAAC,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;aACjF;YAED,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,SAAA;QACP,iBAAiB,mBAAA;KACpB,CACJ,CAAC;AACN,CAAC;AAzCD,kEAyCC","sourcesContent":["import { ensureFocusableParagraphForTable } from '../../modelApi/table/ensureFocusableParagraphForTable';\r\nimport {\r\n createSelectionMarker,\r\n hasMetadata,\r\n setParagraphNotImplicit,\r\n} from 'roosterjs-content-model-dom';\r\nimport {\r\n hasSelectionInBlock,\r\n applyTableFormat,\r\n getFirstSelectedTable,\r\n normalizeTable,\r\n setSelection,\r\n} from 'roosterjs-content-model-core';\r\nimport type {\r\n ContentModelTable,\r\n IStandaloneEditor,\r\n TableSelection,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Invoke a callback to format the selected table using Content Model\r\n * @param editor The editor object\r\n * @param apiName Name of API this calling this function. This is mostly for logging.\r\n * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.\r\n * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection\r\n */\r\nexport function formatTableWithContentModel(\r\n editor: IStandaloneEditor,\r\n apiName: string,\r\n callback: (tableModel: ContentModelTable) => void,\r\n selectionOverride?: TableSelection\r\n) {\r\n editor.formatContentModel(\r\n model => {\r\n const [tableModel, path] = getFirstSelectedTable(model);\r\n\r\n if (tableModel) {\r\n callback(tableModel);\r\n\r\n if (!hasSelectionInBlock(tableModel)) {\r\n const paragraph = ensureFocusableParagraphForTable(model, path, tableModel);\r\n\r\n if (paragraph) {\r\n const marker = createSelectionMarker(model.format);\r\n\r\n paragraph.segments.unshift(marker);\r\n setParagraphNotImplicit(paragraph);\r\n setSelection(model, marker);\r\n }\r\n }\r\n\r\n normalizeTable(tableModel, model.format);\r\n\r\n if (hasMetadata(tableModel)) {\r\n applyTableFormat(tableModel, undefined /*newFormat*/, true /*keepCellShade*/);\r\n }\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName,\r\n selectionOverride,\r\n }\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"formatTableWithContentModel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/utils/formatTableWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,0GAAyG;AACzG,2EAIqC;AACrC,6EAMsC;AAOtC;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACvC,MAAyB,EACzB,OAAe,EACf,QAAiD,EACjD,iBAAkC;IAElC,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAqB,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAAhD,UAAU,QAAA,EAAE,IAAI,QAAgC,CAAC;QAExD,IAAI,UAAU,EAAE;YACZ,QAAQ,CAAC,UAAU,CAAC,CAAC;YAErB,IAAI,CAAC,IAAA,kDAAmB,EAAC,UAAU,CAAC,EAAE;gBAClC,IAAM,SAAS,GAAG,IAAA,mEAAgC,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;gBAE5E,IAAI,SAAS,EAAE;oBACX,IAAM,MAAM,GAAG,IAAA,mDAAqB,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;oBAEnD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;oBACnC,IAAA,qDAAuB,EAAC,SAAS,CAAC,CAAC;oBACnC,IAAA,2CAAY,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;iBAC/B;aACJ;YAED,IAAA,6CAAc,EAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAEzC,IAAI,IAAA,yCAAW,EAAC,UAAU,CAAC,EAAE;gBACzB,IAAA,+CAAgB,EAAC,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;aACjF;YAED,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,SAAA;QACP,iBAAiB,mBAAA;KACpB,CACJ,CAAC;AACN,CAAC;AAzCD,kEAyCC","sourcesContent":["import { ensureFocusableParagraphForTable } from '../../modelApi/table/ensureFocusableParagraphForTable';\nimport {\n createSelectionMarker,\n hasMetadata,\n setParagraphNotImplicit,\n} from 'roosterjs-content-model-dom';\nimport {\n hasSelectionInBlock,\n applyTableFormat,\n getFirstSelectedTable,\n normalizeTable,\n setSelection,\n} from 'roosterjs-content-model-core';\nimport type {\n ContentModelTable,\n IStandaloneEditor,\n TableSelection,\n} from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected table using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.\n * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection\n */\nexport function formatTableWithContentModel(\n editor: IStandaloneEditor,\n apiName: string,\n callback: (tableModel: ContentModelTable) => void,\n selectionOverride?: TableSelection\n) {\n editor.formatContentModel(\n model => {\n const [tableModel, path] = getFirstSelectedTable(model);\n\n if (tableModel) {\n callback(tableModel);\n\n if (!hasSelectionInBlock(tableModel)) {\n const paragraph = ensureFocusableParagraphForTable(model, path, tableModel);\n\n if (paragraph) {\n const marker = createSelectionMarker(model.format);\n\n paragraph.segments.unshift(marker);\n setParagraphNotImplicit(paragraph);\n setSelection(model, marker);\n }\n }\n\n normalizeTable(tableModel, model.format);\n\n if (hasMetadata(tableModel)) {\n applyTableFormat(tableModel, undefined /*newFormat*/, true /*keepCellShade*/);\n }\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName,\n selectionOverride,\n }\n );\n}\n"]}
@@ -1,48 +1,48 @@
1
- export { default as insertTable } from './publicApi/table/insertTable';
2
- export { default as formatTable } from './publicApi/table/formatTable';
3
- export { default as setTableCellShade } from './publicApi/table/setTableCellShade';
4
- export { default as editTable } from './publicApi/table/editTable';
5
- export { default as applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';
6
- export { default as toggleBullet } from './publicApi/list/toggleBullet';
7
- export { default as toggleNumbering } from './publicApi/list/toggleNumbering';
8
- export { default as toggleBold } from './publicApi/segment/toggleBold';
9
- export { default as toggleItalic } from './publicApi/segment/toggleItalic';
10
- export { default as toggleUnderline } from './publicApi/segment/toggleUnderline';
11
- export { default as toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';
12
- export { default as toggleSubscript } from './publicApi/segment/toggleSubscript';
13
- export { default as toggleSuperscript } from './publicApi/segment/toggleSuperscript';
14
- export { default as setBackgroundColor } from './publicApi/segment/setBackgroundColor';
15
- export { default as setFontName } from './publicApi/segment/setFontName';
16
- export { default as setFontSize } from './publicApi/segment/setFontSize';
17
- export { default as setTextColor } from './publicApi/segment/setTextColor';
18
- export { default as changeFontSize } from './publicApi/segment/changeFontSize';
19
- export { default as applySegmentFormat } from './publicApi/segment/applySegmentFormat';
20
- export { default as changeCapitalization } from './publicApi/segment/changeCapitalization';
21
- export { default as insertImage } from './publicApi/image/insertImage';
22
- export { default as setListStyle } from './publicApi/list/setListStyle';
23
- export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
24
- export { default as setIndentation } from './publicApi/block/setIndentation';
25
- export { default as setAlignment } from './publicApi/block/setAlignment';
26
- export { default as setDirection } from './publicApi/block/setDirection';
27
- export { default as setHeadingLevel } from './publicApi/block/setHeadingLevel';
28
- export { default as toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
29
- export { default as setSpacing } from './publicApi/block/setSpacing';
30
- export { default as setImageBorder } from './publicApi/image/setImageBorder';
31
- export { default as setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
32
- export { default as changeImage } from './publicApi/image/changeImage';
33
- export { default as getFormatState } from './publicApi/format/getFormatState';
34
- export { default as clearFormat } from './publicApi/format/clearFormat';
35
- export { default as insertLink } from './publicApi/link/insertLink';
36
- export { default as removeLink } from './publicApi/link/removeLink';
37
- export { default as adjustLinkSelection } from './publicApi/link/adjustLinkSelection';
38
- export { default as setImageAltText } from './publicApi/image/setImageAltText';
39
- export { default as adjustImageSelection } from './publicApi/image/adjustImageSelection';
40
- export { default as setParagraphMargin } from './publicApi/block/setParagraphMargin';
41
- export { default as toggleCode } from './publicApi/segment/toggleCode';
42
- export { default as insertEntity } from './publicApi/entity/insertEntity';
43
- export { insertTableRow } from './modelApi/table/insertTableRow';
44
- export { insertTableColumn } from './modelApi/table/insertTableColumn';
45
- export { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';
46
- export { setListType } from './modelApi/list/setListType';
47
- export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
48
- export { setModelIndentation } from './modelApi/block/setModelIndentation';
1
+ export { default as insertTable } from './publicApi/table/insertTable';
2
+ export { default as formatTable } from './publicApi/table/formatTable';
3
+ export { default as setTableCellShade } from './publicApi/table/setTableCellShade';
4
+ export { default as editTable } from './publicApi/table/editTable';
5
+ export { default as applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';
6
+ export { default as toggleBullet } from './publicApi/list/toggleBullet';
7
+ export { default as toggleNumbering } from './publicApi/list/toggleNumbering';
8
+ export { default as toggleBold } from './publicApi/segment/toggleBold';
9
+ export { default as toggleItalic } from './publicApi/segment/toggleItalic';
10
+ export { default as toggleUnderline } from './publicApi/segment/toggleUnderline';
11
+ export { default as toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';
12
+ export { default as toggleSubscript } from './publicApi/segment/toggleSubscript';
13
+ export { default as toggleSuperscript } from './publicApi/segment/toggleSuperscript';
14
+ export { default as setBackgroundColor } from './publicApi/segment/setBackgroundColor';
15
+ export { default as setFontName } from './publicApi/segment/setFontName';
16
+ export { default as setFontSize } from './publicApi/segment/setFontSize';
17
+ export { default as setTextColor } from './publicApi/segment/setTextColor';
18
+ export { default as changeFontSize } from './publicApi/segment/changeFontSize';
19
+ export { default as applySegmentFormat } from './publicApi/segment/applySegmentFormat';
20
+ export { default as changeCapitalization } from './publicApi/segment/changeCapitalization';
21
+ export { default as insertImage } from './publicApi/image/insertImage';
22
+ export { default as setListStyle } from './publicApi/list/setListStyle';
23
+ export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
24
+ export { default as setIndentation } from './publicApi/block/setIndentation';
25
+ export { default as setAlignment } from './publicApi/block/setAlignment';
26
+ export { default as setDirection } from './publicApi/block/setDirection';
27
+ export { default as setHeadingLevel } from './publicApi/block/setHeadingLevel';
28
+ export { default as toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
29
+ export { default as setSpacing } from './publicApi/block/setSpacing';
30
+ export { default as setImageBorder } from './publicApi/image/setImageBorder';
31
+ export { default as setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
32
+ export { default as changeImage } from './publicApi/image/changeImage';
33
+ export { default as getFormatState } from './publicApi/format/getFormatState';
34
+ export { default as clearFormat } from './publicApi/format/clearFormat';
35
+ export { default as insertLink } from './publicApi/link/insertLink';
36
+ export { default as removeLink } from './publicApi/link/removeLink';
37
+ export { default as adjustLinkSelection } from './publicApi/link/adjustLinkSelection';
38
+ export { default as setImageAltText } from './publicApi/image/setImageAltText';
39
+ export { default as adjustImageSelection } from './publicApi/image/adjustImageSelection';
40
+ export { default as setParagraphMargin } from './publicApi/block/setParagraphMargin';
41
+ export { default as toggleCode } from './publicApi/segment/toggleCode';
42
+ export { default as insertEntity } from './publicApi/entity/insertEntity';
43
+ export { insertTableRow } from './modelApi/table/insertTableRow';
44
+ export { insertTableColumn } from './modelApi/table/insertTableColumn';
45
+ export { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';
46
+ export { setListType } from './modelApi/list/setListType';
47
+ export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
48
+ export { setModelIndentation } from './modelApi/block/setModelIndentation';