ooxml-core 1.50.2 → 1.51.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 (366) hide show
  1. package/README.md +11 -0
  2. package/dist/{PptxHandler-PVQW47CY.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
  3. package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
  4. package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
  5. package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
  6. package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
  7. package/dist/{PresentationBuilder-ZOOVSBPR.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
  8. package/dist/automation/index.cjs +5806 -4494
  9. package/dist/automation/index.mjs +5806 -4494
  10. package/dist/chunk-25IJEN7R.cjs +36 -0
  11. package/dist/chunk-25JN3ZQM.mjs +58 -0
  12. package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
  13. package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
  14. package/dist/chunk-554UZLPS.mjs +237 -0
  15. package/dist/{chunk-VLKUMQGT.mjs → chunk-63RAF3TS.mjs} +1 -1
  16. package/dist/{chunk-7UM5IFPR.mjs → chunk-6IUYKP77.mjs} +1 -1
  17. package/dist/{chunk-VK2G4BGX.mjs → chunk-BIMV5FVL.mjs} +481 -193
  18. package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
  19. package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
  20. package/dist/chunk-GI4Y6BBX.mjs +21 -0
  21. package/dist/{chunk-MX2GFMZS.mjs → chunk-GZL4ERW3.mjs} +1 -1
  22. package/dist/chunk-HWL2AGLD.cjs +98 -0
  23. package/dist/chunk-HZAB3YDO.cjs +234 -0
  24. package/dist/chunk-IDATIFCG.mjs +226 -0
  25. package/dist/chunk-LO55N7VL.cjs +247 -0
  26. package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
  27. package/dist/chunk-MUNEIE2J.cjs +62 -0
  28. package/dist/{chunk-ZCKEKP7N.mjs → chunk-RYUADJV6.mjs} +4 -4
  29. package/dist/chunk-TOBK5FC4.mjs +88 -0
  30. package/dist/chunk-UV4LMGVZ.mjs +31 -0
  31. package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
  32. package/dist/chunk-W7LVJC32.cjs +25 -0
  33. package/dist/chunk-WAZ7T2BL.cjs +169 -0
  34. package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
  35. package/dist/docx/auto-number-fields.d.ts +22 -0
  36. package/dist/docx/auto-number-fields.d.ts.map +1 -0
  37. package/dist/docx/block-parser.d.ts.map +1 -1
  38. package/dist/docx/character-styles.d.ts.map +1 -1
  39. package/dist/docx/clipboard/css.d.ts +21 -0
  40. package/dist/docx/clipboard/css.d.ts.map +1 -0
  41. package/dist/docx/clipboard/html-tokens.d.ts +38 -0
  42. package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
  43. package/dist/docx/clipboard/index.d.ts +6 -0
  44. package/dist/docx/clipboard/index.d.ts.map +1 -0
  45. package/dist/docx/clipboard/word-fields.d.ts +13 -0
  46. package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
  47. package/dist/docx/clipboard/word-fragment.d.ts +14 -0
  48. package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
  49. package/dist/docx/clipboard/word-html.d.ts +22 -0
  50. package/dist/docx/clipboard/word-html.d.ts.map +1 -0
  51. package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
  52. package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
  53. package/dist/docx/clipboard/word-lists.d.ts +13 -0
  54. package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
  55. package/dist/docx/clipboard/word-runs.d.ts +18 -0
  56. package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
  57. package/dist/docx/clipboard/word-styles.d.ts +35 -0
  58. package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
  59. package/dist/docx/compare/build.d.ts +48 -0
  60. package/dist/docx/compare/build.d.ts.map +1 -0
  61. package/dist/docx/compare/compare.d.ts +18 -0
  62. package/dist/docx/compare/compare.d.ts.map +1 -0
  63. package/dist/docx/compare/context.d.ts +42 -0
  64. package/dist/docx/compare/context.d.ts.map +1 -0
  65. package/dist/docx/compare/diff.d.ts +20 -0
  66. package/dist/docx/compare/diff.d.ts.map +1 -0
  67. package/dist/docx/compare/index.d.ts +4 -0
  68. package/dist/docx/compare/index.d.ts.map +1 -0
  69. package/dist/docx/compare/slide.d.ts +9 -0
  70. package/dist/docx/compare/slide.d.ts.map +1 -0
  71. package/dist/docx/compare/spans.d.ts +13 -0
  72. package/dist/docx/compare/spans.d.ts.map +1 -0
  73. package/dist/docx/compare/story.d.ts +7 -0
  74. package/dist/docx/compare/story.d.ts.map +1 -0
  75. package/dist/docx/compare/table.d.ts +23 -0
  76. package/dist/docx/compare/table.d.ts.map +1 -0
  77. package/dist/docx/compare/tokens.d.ts +50 -0
  78. package/dist/docx/compare/tokens.d.ts.map +1 -0
  79. package/dist/docx/compare/types.d.ts +51 -0
  80. package/dist/docx/compare/types.d.ts.map +1 -0
  81. package/dist/docx/compatibility.d.ts +46 -0
  82. package/dist/docx/compatibility.d.ts.map +1 -0
  83. package/dist/docx/computed-fields.d.ts +39 -0
  84. package/dist/docx/computed-fields.d.ts.map +1 -0
  85. package/dist/docx/doc-property-field.d.ts +17 -0
  86. package/dist/docx/doc-property-field.d.ts.map +1 -0
  87. package/dist/docx/document-parts.d.ts +2 -0
  88. package/dist/docx/document-parts.d.ts.map +1 -1
  89. package/dist/docx/drawing-wrap.d.ts +21 -0
  90. package/dist/docx/drawing-wrap.d.ts.map +1 -0
  91. package/dist/docx/drawing.d.ts.map +1 -1
  92. package/dist/docx/embedded.cjs +3965 -2313
  93. package/dist/docx/embedded.mjs +3965 -2313
  94. package/dist/docx/field-format.d.ts +45 -0
  95. package/dist/docx/field-format.d.ts.map +1 -0
  96. package/dist/docx/field-result-spans.d.ts +62 -0
  97. package/dist/docx/field-result-spans.d.ts.map +1 -0
  98. package/dist/docx/field-runs.d.ts.map +1 -1
  99. package/dist/docx/field-stories.d.ts +9 -0
  100. package/dist/docx/field-stories.d.ts.map +1 -0
  101. package/dist/docx/find-stories.d.ts +27 -0
  102. package/dist/docx/find-stories.d.ts.map +1 -0
  103. package/dist/docx/highlight.d.ts +19 -0
  104. package/dist/docx/highlight.d.ts.map +1 -1
  105. package/dist/docx/hyperlink.d.ts +7 -0
  106. package/dist/docx/hyperlink.d.ts.map +1 -1
  107. package/dist/docx/index.cjs +7359 -3476
  108. package/dist/docx/index.d.ts +13 -1
  109. package/dist/docx/index.d.ts.map +1 -1
  110. package/dist/docx/index.mjs +7327 -3476
  111. package/dist/docx/inline-model.d.ts +21 -0
  112. package/dist/docx/inline-model.d.ts.map +1 -1
  113. package/dist/docx/inline-slots.d.ts.map +1 -1
  114. package/dist/docx/inspect-document.d.ts +21 -0
  115. package/dist/docx/inspect-document.d.ts.map +1 -0
  116. package/dist/docx/kinsoku-settings.d.ts +9 -0
  117. package/dist/docx/kinsoku-settings.d.ts.map +1 -0
  118. package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
  119. package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
  120. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  121. package/dist/docx/layout/adapter.d.ts.map +1 -1
  122. package/dist/docx/layout/computed-field-runs.d.ts +8 -0
  123. package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
  124. package/dist/docx/layout/floats.d.ts +3 -1
  125. package/dist/docx/layout/floats.d.ts.map +1 -1
  126. package/dist/docx/layout/flow-floating-table.d.ts +13 -0
  127. package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
  128. package/dist/docx/layout/flow-table.d.ts +1 -1
  129. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  130. package/dist/docx/layout/index.cjs +2280 -941
  131. package/dist/docx/layout/index.mjs +2276 -942
  132. package/dist/docx/layout/input.d.ts +50 -0
  133. package/dist/docx/layout/input.d.ts.map +1 -1
  134. package/dist/docx/layout/layout.d.ts.map +1 -1
  135. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  136. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  137. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  138. package/dist/docx/layout/paragraph-tokens.d.ts +6 -0
  139. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  140. package/dist/docx/layout/result.d.ts +12 -0
  141. package/dist/docx/layout/result.d.ts.map +1 -1
  142. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  143. package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
  144. package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
  145. package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
  146. package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
  147. package/dist/docx/layout/table-autofit.d.ts +10 -0
  148. package/dist/docx/layout/table-autofit.d.ts.map +1 -0
  149. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  150. package/dist/docx/layout/text-breaks.d.ts +38 -13
  151. package/dist/docx/layout/text-breaks.d.ts.map +1 -1
  152. package/dist/docx/layout/wrap.d.ts +1 -1
  153. package/dist/docx/layout/wrap.d.ts.map +1 -1
  154. package/dist/docx/list-number-fields.d.ts +25 -0
  155. package/dist/docx/list-number-fields.d.ts.map +1 -0
  156. package/dist/docx/load/index.cjs +4355 -2703
  157. package/dist/docx/load/index.mjs +4355 -2703
  158. package/dist/docx/model-paragraph.d.ts +12 -1
  159. package/dist/docx/model-paragraph.d.ts.map +1 -1
  160. package/dist/docx/model.d.ts +26 -1
  161. package/dist/docx/model.d.ts.map +1 -1
  162. package/dist/docx/note-convert.d.ts +45 -0
  163. package/dist/docx/note-convert.d.ts.map +1 -0
  164. package/dist/docx/numbering-counters.d.ts +17 -0
  165. package/dist/docx/numbering-counters.d.ts.map +1 -0
  166. package/dist/docx/numbering-format.d.ts +11 -2
  167. package/dist/docx/numbering-format.d.ts.map +1 -1
  168. package/dist/docx/outline-numbering.d.ts +6 -0
  169. package/dist/docx/outline-numbering.d.ts.map +1 -0
  170. package/dist/docx/package-information-save.d.ts +9 -0
  171. package/dist/docx/package-information-save.d.ts.map +1 -0
  172. package/dist/docx/package-information.d.ts +43 -0
  173. package/dist/docx/package-information.d.ts.map +1 -0
  174. package/dist/docx/package-properties.d.ts +5 -0
  175. package/dist/docx/package-properties.d.ts.map +1 -0
  176. package/dist/docx/paragraph-styles.d.ts +2 -0
  177. package/dist/docx/paragraph-styles.d.ts.map +1 -1
  178. package/dist/docx/parse-revisions.d.ts +2 -0
  179. package/dist/docx/parse-revisions.d.ts.map +1 -1
  180. package/dist/docx/parse-table-floating.d.ts +5 -0
  181. package/dist/docx/parse-table-floating.d.ts.map +1 -0
  182. package/dist/docx/parse-table.d.ts.map +1 -1
  183. package/dist/docx/parse.d.ts.map +1 -1
  184. package/dist/docx/part-relationships.d.ts.map +1 -1
  185. package/dist/docx/personal-information.d.ts +18 -0
  186. package/dist/docx/personal-information.d.ts.map +1 -0
  187. package/dist/docx/picture-crop-edit.d.ts +18 -0
  188. package/dist/docx/picture-crop-edit.d.ts.map +1 -0
  189. package/dist/docx/picture-watermark.d.ts +29 -0
  190. package/dist/docx/picture-watermark.d.ts.map +1 -0
  191. package/dist/docx/relationship-allocator.d.ts.map +1 -1
  192. package/dist/docx/remove-document-information.d.ts +8 -0
  193. package/dist/docx/remove-document-information.d.ts.map +1 -0
  194. package/dist/docx/revision-commands.d.ts +6 -1
  195. package/dist/docx/revision-commands.d.ts.map +1 -1
  196. package/dist/docx/revision-ids.d.ts.map +1 -1
  197. package/dist/docx/run-language.d.ts +9 -0
  198. package/dist/docx/run-language.d.ts.map +1 -0
  199. package/dist/docx/run-properties-snapshot.d.ts +9 -0
  200. package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
  201. package/dist/docx/run-style-model.d.ts +4 -0
  202. package/dist/docx/run-style-model.d.ts.map +1 -1
  203. package/dist/docx/save-modified.d.ts +2 -1
  204. package/dist/docx/save-modified.d.ts.map +1 -1
  205. package/dist/docx/save.d.ts.map +1 -1
  206. package/dist/docx/style-ref-fields.d.ts +1 -8
  207. package/dist/docx/style-ref-fields.d.ts.map +1 -1
  208. package/dist/docx/symbol-field.d.ts +21 -0
  209. package/dist/docx/symbol-field.d.ts.map +1 -0
  210. package/dist/docx/table-cell-write.d.ts.map +1 -1
  211. package/dist/docx/table-defaults.d.ts +2 -0
  212. package/dist/docx/table-defaults.d.ts.map +1 -1
  213. package/dist/docx/table-margins.d.ts +18 -0
  214. package/dist/docx/table-margins.d.ts.map +1 -0
  215. package/dist/docx/table-model.d.ts +23 -0
  216. package/dist/docx/table-model.d.ts.map +1 -1
  217. package/dist/docx/table-structure-check.d.ts.map +1 -1
  218. package/dist/docx/table-styles.d.ts.map +1 -1
  219. package/dist/docx/ui/index.cjs +787 -435
  220. package/dist/docx/ui/index.d.ts +1 -0
  221. package/dist/docx/ui/index.d.ts.map +1 -1
  222. package/dist/docx/ui/index.mjs +784 -436
  223. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  224. package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
  225. package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
  226. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  227. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  228. package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
  229. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
  230. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  231. package/dist/docx/ui/schema-marks.d.ts +2 -19
  232. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  233. package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
  234. package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
  235. package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
  236. package/dist/docx/write-drawing-wrap.d.ts +22 -0
  237. package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
  238. package/dist/docx/write-drawing.d.ts.map +1 -1
  239. package/dist/docx/write-revisions.d.ts +3 -1
  240. package/dist/docx/write-revisions.d.ts.map +1 -1
  241. package/dist/docx/write-shape.d.ts.map +1 -1
  242. package/dist/docx/write-table-properties.d.ts.map +1 -1
  243. package/dist/docx/write.d.ts.map +1 -1
  244. package/dist/drawingml/html-text-paste.d.ts +28 -0
  245. package/dist/drawingml/html-text-paste.d.ts.map +1 -0
  246. package/dist/drawingml/html-text-style.d.ts +18 -0
  247. package/dist/drawingml/html-text-style.d.ts.map +1 -0
  248. package/dist/drawingml/index.cjs +762 -0
  249. package/dist/drawingml/index.d.ts +1 -0
  250. package/dist/drawingml/index.d.ts.map +1 -1
  251. package/dist/drawingml/index.mjs +760 -1
  252. package/dist/index.cjs +1237 -285
  253. package/dist/index.mjs +1237 -285
  254. package/dist/pptx/automation/index.cjs +561 -180
  255. package/dist/pptx/automation/index.d.ts +4 -4
  256. package/dist/pptx/automation/index.mjs +6 -5
  257. package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
  258. package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
  259. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
  260. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
  261. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
  262. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
  263. package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
  264. package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
  265. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
  266. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
  267. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
  268. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
  269. package/dist/pptx/cli/index.cjs +504 -124
  270. package/dist/pptx/cli/index.d.ts +1 -1
  271. package/dist/pptx/cli/index.mjs +4 -4
  272. package/dist/pptx/converter/index.d.ts +1 -1
  273. package/dist/pptx/converter/index.mjs +2 -2
  274. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  275. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  276. package/dist/pptx/editor/render/find-replace.cjs +16 -15
  277. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  278. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  279. package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
  280. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
  281. package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
  282. package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
  283. package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
  284. package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
  285. package/dist/pptx/editor/render/slide-operations.cjs +12 -9
  286. package/dist/pptx/editor/render/slide-operations.mjs +6 -3
  287. package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
  288. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  289. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  290. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  291. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  292. package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
  293. package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
  294. package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
  295. package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
  296. package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
  297. package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
  298. package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
  299. package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
  300. package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
  301. package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
  302. package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
  303. package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
  304. package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
  305. package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
  306. package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
  307. package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
  308. package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
  309. package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
  310. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  311. package/dist/pptx/editor/render/table-layout.d.ts +2 -2
  312. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  313. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  314. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  315. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  316. package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
  317. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  318. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  319. package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
  320. package/dist/pptx/index.cjs +519 -201
  321. package/dist/pptx/index.d.ts +7 -7
  322. package/dist/pptx/index.mjs +5 -5
  323. package/dist/pptx/node/index.d.ts +1 -1
  324. package/dist/pptx/smartart-layouts/index.d.ts +2 -2
  325. package/dist/teams/index.cjs +35 -25
  326. package/dist/teams/index.mjs +35 -25
  327. package/dist/text/complex-breaks.d.ts +24 -0
  328. package/dist/text/complex-breaks.d.ts.map +1 -0
  329. package/dist/text/east-asian.d.ts +32 -0
  330. package/dist/text/east-asian.d.ts.map +1 -0
  331. package/dist/text/html-tokens.d.ts +45 -0
  332. package/dist/text/html-tokens.d.ts.map +1 -0
  333. package/dist/text/index.cjs +567 -96
  334. package/dist/text/index.d.ts +6 -0
  335. package/dist/text/index.d.ts.map +1 -1
  336. package/dist/text/index.mjs +544 -97
  337. package/dist/text/kinsoku.d.ts +55 -0
  338. package/dist/text/kinsoku.d.ts.map +1 -0
  339. package/dist/text/truetype/embedding.d.ts +42 -0
  340. package/dist/text/truetype/embedding.d.ts.map +1 -0
  341. package/dist/text/truetype/glyphless.d.ts +5 -0
  342. package/dist/text/truetype/glyphless.d.ts.map +1 -0
  343. package/dist/text/truetype/sfnt-write.d.ts +10 -0
  344. package/dist/text/truetype/sfnt-write.d.ts.map +1 -0
  345. package/dist/text/truetype/subset.d.ts.map +1 -1
  346. package/dist/text/windows-1252.d.ts +10 -0
  347. package/dist/text/windows-1252.d.ts.map +1 -0
  348. package/dist/xlsx/collab/index.cjs +10 -6
  349. package/dist/xlsx/collab/index.mjs +10 -6
  350. package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
  351. package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
  352. package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
  353. package/dist/xlsx/index.cjs +96 -51
  354. package/dist/xlsx/index.mjs +96 -51
  355. package/dist/xlsx/load/index.cjs +10 -6
  356. package/dist/xlsx/load/index.mjs +10 -6
  357. package/dist/xlsx/ui/index.cjs +97 -52
  358. package/dist/xlsx/ui/index.mjs +97 -52
  359. package/package.json +1 -1
  360. package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
  361. package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
  362. package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
  363. package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
  364. package/dist/chunk-X4RL5AZ7.cjs +0 -120
  365. package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
  366. package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
@@ -0,0 +1,22 @@
1
+ import type { DocumentModel } from './model.js';
2
+ /** The field names counted together. */
3
+ export declare const AUTO_NUMBER_FIELDS: ReadonlySet<string>;
4
+ /** What a paragraph's automatic number fields count from. */
5
+ export interface AutoNumberState {
6
+ /** One-based level: a heading's outline level, else one below the numbered heading before it. */
7
+ level: number;
8
+ heading: boolean;
9
+ /** The heading counters of levels 1 to `level - 1`, then the paragraph's own count. */
10
+ counts: number[];
11
+ }
12
+ /** The automatic number state of every paragraph of the main document that holds such a field. */
13
+ export declare function autoNumberStates(model: DocumentModel): Map<string, AutoNumberState>;
14
+ /**
15
+ * What an automatic number field shows for a paragraph's state, or undefined for another field
16
+ * or switches this does not evaluate. AUTONUM draws the paragraph's count in its `\*` format,
17
+ * AUTONUMLGL every level's (`\e` drops the last separator), both followed by `\s`'s first
18
+ * character (a period by default); AUTONUMOUT draws a heading in outline numbering and a body
19
+ * paragraph as `1.`, whatever its switches.
20
+ */
21
+ export declare function autoNumberResult(instr: string, state: AutoNumberState): string | undefined;
22
+ //# sourceMappingURL=auto-number-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-number-fields.d.ts","sourceRoot":"","sources":["../../docx/auto-number-fields.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,SAAS,CAAC;AAKxD,wCAAwC;AACxC,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAIjD,CAAC;AAEH,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC/B,iGAAiG;IACjG,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AASD,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CA2BnF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAe1F"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-parser.d.ts","sourceRoot":"","sources":["../../docx/block-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAW,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAwD,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAM9F,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAI9D,OAAO,EAAyC,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA2I/F,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAuH7F;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,UAAU,EACrB,QAAQ,SAAK,EACb,OAAO,CAAC,EAAE,cAAc,GACtB,KAAK,EAAE,CAcT;AAiBD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"block-parser.d.ts","sourceRoot":"","sources":["../../docx/block-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAY,KAAK,EAAW,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAwD,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAM9F,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAI9D,OAAO,EAAyC,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA4I/F,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAuH7F;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,UAAU,EACrB,QAAQ,SAAK,EACb,OAAO,CAAC,EAAE,cAAc,GACtB,KAAK,EAAE,CAcT;AAiBD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"character-styles.d.ts","sourceRoot":"","sources":["../../docx/character-styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAanF,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CA0CjE"}
1
+ {"version":3,"file":"character-styles.d.ts","sourceRoot":"","sources":["../../docx/character-styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAenF,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CA8CjE"}
@@ -0,0 +1,21 @@
1
+ /** CSS reading for Word's clipboard HTML: inline declarations, its stylesheet and its lengths. */
2
+ /** `name:value` pairs of an inline `style` (names lower-cased, last declaration wins). */
3
+ export declare function parseDeclarations(style: string | undefined): Map<string, string>;
4
+ /** Serialises declarations back to an inline style. */
5
+ export declare function serializeDeclarations(declarations: ReadonlyMap<string, string>): string;
6
+ /** A CSS string or identifier value without its quotes and escapes (`"%1\)"` is `%1)`). */
7
+ export declare function cssStringValue(value: string): string;
8
+ /** A length (`.25in`, `-18.0pt`, `1.0cm`) in points, or `undefined` for other values. */
9
+ export declare function cssPoints(value: string | undefined): number | undefined;
10
+ /** A length in whole twips. */
11
+ export declare function cssTwips(value: string | undefined): number | undefined;
12
+ /** The first family of a `font-family` list, unquoted. */
13
+ export declare function firstFontFamily(value: string | undefined): string | undefined;
14
+ export interface CssRule {
15
+ /** The selector text (an `@list l0:level1` rule keeps its at-keyword). */
16
+ selector: string;
17
+ declarations: Map<string, string>;
18
+ }
19
+ /** The rules of every `<style>` block in `html`, comments removed. */
20
+ export declare function readStyleRules(html: string): CssRule[];
21
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/css.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAElG,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAehF;AA0BD,uDAAuD;AACvD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEvF;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASpD;AAWD,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAOvE;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGtE;AAED,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED,MAAM,WAAW,OAAO;IACvB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAWtD"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A small, DOM-free tokenizer for the HTML Word puts on the clipboard. Word writes HTML 4 with
3
+ * unquoted attributes, values that wrap across lines, namespaced tags (`o:p`), comments that
4
+ * hide content from browsers (`<!--[if supportFields]>`) and "downlevel-revealed" markers that
5
+ * leave content visible (`<![if !supportLists]>`). It is not a general HTML parser: it reads
6
+ * tags, comments, markers and text in order, which is all the normaliser needs.
7
+ */
8
+ export type HtmlToken = {
9
+ kind: 'text';
10
+ text: string;
11
+ } | {
12
+ kind: 'comment';
13
+ text: string;
14
+ }
15
+ /** `<![if expr]>` (condition) or `<![endif]>` (condition `null`). */
16
+ | {
17
+ kind: 'marker';
18
+ condition: string | null;
19
+ } | {
20
+ kind: 'open';
21
+ name: string;
22
+ attrs: Map<string, string>;
23
+ selfClosing: boolean;
24
+ } | {
25
+ kind: 'close';
26
+ name: string;
27
+ };
28
+ /** Splits `html` into tokens; unterminated constructs become text, as a browser shows them. */
29
+ export declare function tokenizeHtml(html: string): HtmlToken[];
30
+ /** Decodes character references; unknown names stay as written. */
31
+ export declare function decodeEntities(value: string): string;
32
+ export declare const escapeText: (value: string) => string;
33
+ export declare const escapeAttribute: (value: string) => string;
34
+ /** Serialises an element's start tag from an attribute record (empty values are dropped). */
35
+ export declare function startTag(name: string, attrs: Record<string, string | undefined>): string;
36
+ /** The text of `tokens`, ignoring markup (used for field codes and list markers). */
37
+ export declare function tokensText(tokens: readonly HtmlToken[]): string;
38
+ //# sourceMappingURL=html-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-tokens.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/html-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,SAAS,GAClB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACnC,qEAAqE;GACnE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,GAChF;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAwCnC,+FAA+F;AAC/F,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAoDtD;AA2BD,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYpD;AAED,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,MAC8B,CAAC;AAE1E,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,MAAmD,CAAC;AAEpG,6FAA6F;AAC7F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAKxF;AAED,qFAAqF;AACrF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,CAE/D"}
@@ -0,0 +1,6 @@
1
+ /** Reading the HTML Word puts on the clipboard (see `word-html.ts`). */
2
+ export { normalizeWordClipboardHtml, type WordClipboardOptions, type WordPasteMode, } from './word-html.js';
3
+ export { clipboardFragment, isWordClipboardHtml } from './word-fragment.js';
4
+ export type { WordClipboardList } from './word-list-scan.js';
5
+ export { styleIdForName, styleNameFromClass } from './word-styles.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EACN,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,aAAa,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare class FieldTracker {
2
+ private readonly fields;
3
+ /** Whether text belongs to a field code rather than to the document. */
4
+ get inCode(): boolean;
5
+ addCode(text: string): void;
6
+ /** Reads one comment at element depth `depth`; returns the markup it opens or closes. */
7
+ comment(text: string, depth: number): string;
8
+ private separate;
9
+ private end;
10
+ /** Closes an open result span before an element it was opened inside closes (to `depth`). */
11
+ closeTo(depth: number): string;
12
+ }
13
+ //# sourceMappingURL=word-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-fields.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-fields.ts"],"names":[],"mappings":"AAgBA,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC,wEAAwE;IACxE,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAG1B;IAED,yFAAyF;IACzF,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAgB3C;IAED,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,GAAG;IAMX,6FAA6F;IAC7F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK7B;CACD"}
@@ -0,0 +1,14 @@
1
+ /** Finding Word's clipboard HTML and the part of it that was copied. */
2
+ /**
3
+ * Whether `html` came from Word (or another Office program that writes Word's HTML, such as
4
+ * Outlook): its namespace, its `ProgId`/`Generator` meta, or its `Mso` classes and `mso-` CSS.
5
+ */
6
+ export declare function isWordClipboardHtml(html: string): boolean;
7
+ /**
8
+ * The copied fragment: what lies between `<!--StartFragment-->` and `<!--EndFragment-->` (the
9
+ * HTML clipboard format's markers, which browsers keep), else the body, else everything. The
10
+ * byte offsets in a raw `Version:` header are not trusted: they no longer match once the text
11
+ * has been decoded or its line endings changed.
12
+ */
13
+ export declare function clipboardFragment(html: string): string;
14
+ //# sourceMappingURL=word-fragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-fragment.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-fragment.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMzD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQtD"}
@@ -0,0 +1,22 @@
1
+ import { type WordClipboardList } from './word-list-scan.js';
2
+ /**
3
+ * Word's Paste Options: `source` keeps the copied styles and direct formatting; `merge` keeps
4
+ * lists and emphasis (bold, italic, underline, strikethrough, super- and subscript) and lets the
5
+ * text take the formatting of the place it is pasted.
6
+ */
7
+ export type WordPasteMode = 'source' | 'merge';
8
+ export interface WordClipboardOptions {
9
+ mode?: WordPasteMode;
10
+ /** The `numId` to give one pasted list (called once per list), or `undefined` for none. */
11
+ numId?(list: WordClipboardList): number | undefined;
12
+ /** The id of the destination's paragraph style named `name`, or `undefined` when it has none. */
13
+ paragraphStyleId?(name: string): string | undefined;
14
+ /** The id of the destination's character style named `name`. */
15
+ characterStyleId?(name: string): string | undefined;
16
+ }
17
+ /**
18
+ * Word's clipboard HTML as the editor's HTML, or `null` when `html` did not come from Word (the
19
+ * caller then pastes it unchanged).
20
+ */
21
+ export declare function normalizeWordClipboardHtml(html: string, options?: WordClipboardOptions): string | null;
22
+ //# sourceMappingURL=word-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-html.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-html.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKpG;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,oBAAoB;IACpC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,2FAA2F;IAC3F,KAAK,CAAC,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,iGAAiG;IACjG,gBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,gEAAgE;IAChE,gBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpD;AAuHD;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,oBAAyB,GAChC,MAAM,GAAG,IAAI,CAuGf"}
@@ -0,0 +1,25 @@
1
+ /** The lists a Word clipboard fragment uses, with their levels. */
2
+ import type { NumberingLevelDefinition } from '../numbering-model.js';
3
+ import { type HtmlToken } from './html-tokens.js';
4
+ import type { WordStyleSheet } from './word-styles.js';
5
+ /** One pasted list: Word's list definition (`l0`) as used by one list instance (`lfo1`). */
6
+ export interface WordClipboardList {
7
+ /** `l0:lfo1`, unique within one clipboard fragment. */
8
+ key: string;
9
+ levels: NumberingLevelDefinition[];
10
+ }
11
+ export interface WordListReference {
12
+ key: string;
13
+ /** 0-based `w:ilvl`. */
14
+ level: number;
15
+ }
16
+ /** A paragraph's `mso-list:l0 level2 lfo1`, or `undefined` for none (`mso-list:none`). */
17
+ export declare function listReference(style: string | undefined): WordListReference | undefined;
18
+ /** The end index (exclusive) of the element opened at `start`, by matching its name. */
19
+ export declare function elementEnd(tokens: readonly HtmlToken[], start: number): number;
20
+ /**
21
+ * Every list the fragment's paragraphs reference. Levels come from the stylesheet's `@list`
22
+ * rules when present, otherwise from the marker text Word wrote for browsers (`mso-list:Ignore`).
23
+ */
24
+ export declare function scanWordLists(tokens: readonly HtmlToken[], sheet: WordStyleSheet): Map<string, WordClipboardList>;
25
+ //# sourceMappingURL=word-list-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-list-scan.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-list-scan.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,4FAA4F;AAC5F,MAAM,WAAW,iBAAiB;IACjC,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,wBAAwB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,CAMtF;AAED,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAU9E;AASD;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,KAAK,EAAE,cAAc,GACnB,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAwDhC"}
@@ -0,0 +1,13 @@
1
+ /** List levels from Word's `@list` rules, or from the marker text when the rules are missing. */
2
+ import type { NumberingLevelDefinition } from '../numbering-model.js';
3
+ /**
4
+ * One level of an `@list lN:levelM` rule. `inherited` is the paragraph style's own formatting,
5
+ * which supplies the indent when the level does not set one (as Word's default bullet does).
6
+ */
7
+ export declare function levelFromRule(level: number, rule: ReadonlyMap<string, string>, inherited?: ReadonlyMap<string, string>): NumberingLevelDefinition;
8
+ /**
9
+ * A level inferred from the marker Word wrote for browsers (`1)`, `a.`, `iv.`, `·`), for HTML
10
+ * without its stylesheet. `font` is the marker span's font, which decides a bullet's glyph.
11
+ */
12
+ export declare function levelFromMarker(level: number, marker: string, font: string | undefined): NumberingLevelDefinition;
13
+ //# sourceMappingURL=word-lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-lists.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-lists.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AA0CnE;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACrC,wBAAwB,CA4B1B;AAsBD;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,SAAS,GACtB,wBAAwB,CAmC1B"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Run formatting in Word's clipboard HTML that CSS cannot say, read from its `mso-` and Office
3
+ * HTML properties (`mso-highlight`, `text-underline`, `text-line-through`, `mso-hide`,
4
+ * `mso-text-raise`) and from the CSS a browser would read differently from Word.
5
+ */
6
+ import type { TextRun } from '../model-run.js';
7
+ /** The run properties the editor carries as one `data-run-props` mark. */
8
+ export type PastedRunProperties = Pick<TextRun, 'caps' | 'smallCaps' | 'doubleStrike' | 'vanish' | 'underlineStyle' | 'characterSpacingTwips' | 'positionHalfPoints'>;
9
+ export interface WordRunStyle {
10
+ /** The CSS left for the browser-facing marks (fonts, colour, highlight). */
11
+ css: Map<string, string>;
12
+ props: PastedRunProperties;
13
+ /** A `<s>` that Word means as a double strikethrough is not a single strike. */
14
+ dropStrike: boolean;
15
+ }
16
+ /** Reads one element's inline style; `mso-` declarations never reach the output CSS. */
17
+ export declare function wordRunStyle(declarations: ReadonlyMap<string, string>): WordRunStyle;
18
+ //# sourceMappingURL=word-runs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-runs.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-runs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAM5C,0EAA0E;AAC1E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACrC,OAAO,EACL,MAAM,GACN,WAAW,GACX,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,uBAAuB,GACvB,oBAAoB,CACtB,CAAC;AA4CF,MAAM,WAAW,YAAY;IAC5B,4EAA4E;IAC5E,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gFAAgF;IAChF,UAAU,EAAE,OAAO,CAAC;CACpB;AAWD,wFAAwF;AACxF,wBAAgB,YAAY,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY,CAoCpF"}
@@ -0,0 +1,35 @@
1
+ export type WordStyleKind = 'paragraph' | 'character';
2
+ export interface WordStyleSheet {
3
+ /** Class name to Word style name and kind (`MsoQuote` is the paragraph style `Quote`). */
4
+ classes: Map<string, {
5
+ name: string;
6
+ kind: WordStyleKind;
7
+ }>;
8
+ /** Paragraph style formatting by class, for list levels that inherit their indent. */
9
+ classDeclarations: Map<string, Map<string, string>>;
10
+ /** `@list l0:level1` declarations: list id, then the 0-based level. */
11
+ lists: Map<string, Map<number, Map<string, string>>>;
12
+ }
13
+ /**
14
+ * The style name a class stands for when the stylesheet does not say (`mso-style-name` is only
15
+ * written for styles whose name is not the class): Word's built-in classes are `Mso` plus the
16
+ * name without spaces, and list and quote paragraphs add `CxSpFirst`/`Middle`/`Last` for
17
+ * contextual spacing.
18
+ */
19
+ export declare function styleNameFromClass(className: string): string;
20
+ /** Reads the `<style>` blocks of a Word clipboard document. */
21
+ export declare function readWordStyleSheet(html: string): WordStyleSheet;
22
+ /** The paragraph style a class or heading tag names, falling back to the class itself. */
23
+ export declare function paragraphStyleName(sheet: WordStyleSheet, className: string | undefined, tag: string): string | undefined;
24
+ /**
25
+ * The id of the style in `styles` that a pasted style name means: the same name, ignoring case
26
+ * and spaces (Word writes `heading 1` in styles.xml and `Heading 1` on the clipboard), or a
27
+ * style whose id is that name without spaces (`Heading1`).
28
+ */
29
+ export declare function styleIdForName(styles: Readonly<Record<string, {
30
+ id: string;
31
+ name?: string;
32
+ }>> | undefined, name: string): string | undefined;
33
+ /** The character style a span's class names, when the stylesheet declares it as one. */
34
+ export declare function characterStyleName(sheet: WordStyleSheet, className: string | undefined): string | undefined;
35
+ //# sourceMappingURL=word-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"word-styles.d.ts","sourceRoot":"","sources":["../../../docx/clipboard/word-styles.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC9B,0FAA0F;IAC1F,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IAC5D,sFAAsF;IACtF,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,uEAAuE;IACvE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACrD;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG5D;AAUD,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CA0B/D;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,GAAG,EAAE,MAAM,GACT,MAAM,GAAG,SAAS,CAQpB;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,GAAG,SAAS,EAC3E,IAAI,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAOpB;AAED,wFAAwF;AACxF,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAGpB"}
@@ -0,0 +1,48 @@
1
+ import type { Block } from '../model.js';
2
+ import type { CompareContext } from './context.js';
3
+ import type { Token } from './tokens.js';
4
+ /** One aligned step of a story: a token of the original, of the revised document, or of both. */
5
+ export type StreamOp = {
6
+ kind: 'equal';
7
+ a: Token;
8
+ b: Token;
9
+ } | {
10
+ kind: 'delete';
11
+ a: Token;
12
+ } | {
13
+ kind: 'insert';
14
+ b: Token;
15
+ };
16
+ /**
17
+ * Builds the result blocks of one story (the body or a table cell) from its aligned tokens:
18
+ * runs carry `w:ins`/`w:del`/`w:rPrChange` revisions, one revision per contiguous span, and each
19
+ * paragraph mark closes a paragraph with the revised (kept or inserted mark) or original (deleted
20
+ * mark) paragraph's properties.
21
+ */
22
+ export declare class StoryBuilder {
23
+ private readonly context;
24
+ readonly blocks: Block[];
25
+ private runs;
26
+ private sources;
27
+ private span;
28
+ /** Original runs as imported, so the deleted pieces of one run merge into one run again. */
29
+ private readonly imported;
30
+ constructor(context: CompareContext);
31
+ private revisionFor;
32
+ private push;
33
+ private pieces;
34
+ /** Unchanged text: the revised runs, with a formatting revision where the formatting differs. */
35
+ private equalText;
36
+ private close;
37
+ /** Adds one aligned step; tables come in through {@link addBlock}. */
38
+ add(op: StreamOp): void;
39
+ /**
40
+ * A table goes in at once. Text open at that point is deleted text of the original whose
41
+ * paragraph ends after the table (or inserted text around a deleted table), so the paragraph
42
+ * it closes into follows the table on both sides.
43
+ */
44
+ addBlock(block: Block): void;
45
+ /** The finished blocks; a story always ends with a paragraph mark, so nothing stays open. */
46
+ finish(): Block[];
47
+ }
48
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../docx/compare/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAgC,MAAM,UAAU,CAAC;AAIpE,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,KAAK,EAAS,KAAK,EAAE,MAAM,UAAU,CAAC;AAE7C,iGAAiG;AACjG,MAAM,MAAM,QAAQ,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,CAAC,EAAE,KAAK,CAAC;IAAC,CAAC,EAAE,KAAK,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,CAAC,EAAE,KAAK,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAOhC;;;;;GAKG;AACH,qBAAa,YAAY;IAQZ,OAAO,CAAC,QAAQ,CAAC,OAAO;IAPpC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAAM;IAC9B,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,IAAI,CAA0E;IACtF,4FAA4F;IAC5F,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IAEpE,YAA6B,OAAO,EAAE,cAAc,EAAI;IAExD,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,IAAI;IAeZ,OAAO,CAAC,MAAM;IAMd,iGAAiG;IACjG,OAAO,CAAC,SAAS;IA6BjB,OAAO,CAAC,KAAK;IAYb,sEAAsE;IACtE,GAAG,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAuBtB;IAED;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE3B;IAED,6FAA6F;IAC7F,MAAM,IAAI,KAAK,EAAE,CAGhB;CACD"}
@@ -0,0 +1,18 @@
1
+ import type { DocumentModel } from '../model.js';
2
+ import { type CompareDocumentsOptions, type CompareDocumentsResult } from './types.js';
3
+ /**
4
+ * Every tracked change of a document accepted, as Word does before comparing ("Word will consider
5
+ * these changes accepted for the purpose of the comparison").
6
+ */
7
+ export declare function acceptForComparison(model: DocumentModel, warnings: string[]): DocumentModel;
8
+ /**
9
+ * Word's Review > Compare: a new document whose content is the revised document, with what
10
+ * changed since the original as tracked changes by `author`. Tracked changes already in either
11
+ * document are accepted first. Paragraphs with the same text are aligned first; the paragraphs
12
+ * between them are compared word by word (or character by character), paragraph marks included,
13
+ * so a paragraph that only changed shows its changed words and a whole paragraph shows inserted or
14
+ * deleted with its mark. Tables are compared row by row and cell by cell; formatting changes of
15
+ * unchanged text are `w:rPrChange` revisions. See {@link UNCOMPARED_DOCUMENT_PARTS} for what is not compared.
16
+ */
17
+ export declare function compareDocuments(original: Uint8Array | ArrayBuffer, revised: Uint8Array | ArrayBuffer, options: CompareDocumentsOptions): Promise<CompareDocumentsResult>;
18
+ //# sourceMappingURL=compare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../docx/compare/compare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,UAAU,CAAC;AAYrD,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,MAAM,SAAS,CAAC;AAWjB;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,aAAa,CAmB3F;AAqBD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACrC,QAAQ,EAAE,UAAU,GAAG,WAAW,EAClC,OAAO,EAAE,UAAU,GAAG,WAAW,EACjC,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAuDjC"}
@@ -0,0 +1,42 @@
1
+ import type { DocumentModel, Paragraph, Revision, TableCell, TextRun } from '../model.js';
2
+ import type { CompareGranularity, CompareSummary } from './types.js';
3
+ export type ChangeKind = 'insert' | 'delete' | 'formatChange';
4
+ /** Shared state of one comparison: options, the revision factory and what it reports. */
5
+ export interface CompareContext {
6
+ granularity: CompareGranularity;
7
+ /** Revised paragraphs never aligned with the original: they show inserted with their runs kept. */
8
+ whole: ReadonlySet<string>;
9
+ compareFormatting: boolean;
10
+ /** A new revision with a provisional id; saving numbers it with the document's allocator. */
11
+ revision(kind: ChangeKind, previousRunPropertiesXml?: string): Revision;
12
+ /** A new block id, for content carried over from the original. */
13
+ blockId(): string;
14
+ /** A run of the original as deleted text in the revised package, or undefined to drop it. */
15
+ importRun(run: TextRun): TextRun | undefined;
16
+ /** The properties of an original paragraph whose deleted mark the result shows. */
17
+ importParagraph(paragraph: Paragraph): Paragraph;
18
+ /** The properties of an original table cell shown in a deleted row. */
19
+ importCell(cell: TableCell): TableCell;
20
+ /** The paragraph-id layout of a table in the revised package as saved, before acceptance. */
21
+ sourceLayout(tableId: string): string | undefined;
22
+ /** The style id when the revised package defines it, else undefined. */
23
+ tableStyle(style: string | undefined): string | undefined;
24
+ summary: CompareSummary;
25
+ warn(message: string): void;
26
+ }
27
+ export interface ContextOptions {
28
+ author: string;
29
+ date: string;
30
+ granularity: CompareGranularity;
31
+ compareFormatting: boolean;
32
+ /** The revised document: its catalogs decide which original styles and lists can be kept. */
33
+ revised: DocumentModel;
34
+ /** Table layouts of the revised package as loaded (`tableLayout`), keyed by table id. */
35
+ sourceLayouts: ReadonlyMap<string, string>;
36
+ whole: ReadonlySet<string>;
37
+ warnings: string[];
38
+ }
39
+ /** Word's revision date form: seconds, no fraction (`2026-11-15T07:26:00Z`). */
40
+ export declare function revisionDate(date: string | Date | undefined): string;
41
+ export declare function createContext(options: ContextOptions): CompareContext;
42
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../docx/compare/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,cAAc,CAAC;AAE9D,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC9B,WAAW,EAAE,kBAAkB,CAAC;IAChC,mGAAmG;IACnG,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,wBAAwB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACxE,kEAAkE;IAClE,OAAO,IAAI,MAAM,CAAC;IAClB,6FAA6F;IAC7F,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,mFAAmF;IACnF,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjD,uEAAuE;IACvE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IACvC,6FAA6F;IAC7F,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClD,wEAAwE;IACxE,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1D,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,6FAA6F;IAC7F,OAAO,EAAE,aAAa,CAAC;IACvB,yFAAyF;IACzF,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAIpE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAoFrE"}
@@ -0,0 +1,20 @@
1
+ /** One step of an edit script: `equal` pairs `a[aIndex]` with `b[bIndex]`. */
2
+ export type DiffOp = {
3
+ kind: 'equal';
4
+ aIndex: number;
5
+ bIndex: number;
6
+ } | {
7
+ kind: 'delete';
8
+ aIndex: number;
9
+ } | {
10
+ kind: 'insert';
11
+ bIndex: number;
12
+ };
13
+ /**
14
+ * The shortest edit script turning `a` into `b`, comparing items by their keys. Deletions come
15
+ * before insertions where both are possible, which is how Word orders a replaced span.
16
+ */
17
+ export declare function diffKeys(a: readonly string[], b: readonly string[]): DiffOp[];
18
+ /** Within each run of changes, every deletion before every insertion. */
19
+ export declare function orderReplacements(ops: DiffOp[]): DiffOp[];
20
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../docx/compare/diff.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,MAAM,MAAM,MAAM,GACf;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA+DtC;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAkB7E;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAmBzD"}
@@ -0,0 +1,4 @@
1
+ export { compareDocuments } from './compare.js';
2
+ export { revisionSpans, type RevisionSpan } from './spans.js';
3
+ export * from './types.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../docx/compare/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3D,cAAc,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { DiffOp } from './diff.js';
2
+ import type { Token } from './tokens.js';
3
+ /**
4
+ * Slides each run of only insertions (or only deletions) along the equal tokens around it to the
5
+ * position with the most natural edges, keeping the edit the same size: "epsilon.[Zeta.]" rather
6
+ * than "epsilon[.Zeta].", as Word marks it.
7
+ */
8
+ export declare function slideRegions(ops: DiffOp[], a: Token[], b: Token[]): DiffOp[];
9
+ //# sourceMappingURL=slide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../../docx/compare/slide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA4BtC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAkE5E"}
@@ -0,0 +1,13 @@
1
+ import type { DocumentModel } from '../model.js';
2
+ /** One tracked span of a compared document: its kind and its text (`¶` for a paragraph mark). */
3
+ export interface RevisionSpan {
4
+ kind: 'insert' | 'delete' | 'formatChange' | 'unchanged';
5
+ text: string;
6
+ }
7
+ /**
8
+ * The body as an ordered list of spans, adjacent spans of one kind merged: paragraph marks are
9
+ * `¶`, a row revision `[row]`. Two comparisons that agree on what was inserted and deleted have
10
+ * the same spans, whatever their run boundaries or revision ids.
11
+ */
12
+ export declare function revisionSpans(model: DocumentModel): RevisionSpan[];
13
+ //# sourceMappingURL=spans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spans.d.ts","sourceRoot":"","sources":["../../../docx/compare/spans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,UAAU,CAAC;AAErD,iGAAiG;AACjG,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,WAAW,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,EAAE,CAgClE"}
@@ -0,0 +1,7 @@
1
+ import type { Block } from '../model.js';
2
+ import type { CompareContext } from './context.js';
3
+ /** Compares two stories (the body, or the paragraphs of a table cell) into result blocks. */
4
+ export declare function compareStory(original: Block[], revised: Block[], context: CompareContext): Block[];
5
+ /** A story whose every paragraph and mark is inserted or deleted (a whole table row). */
6
+ export declare function wholeStory(blocks: Block[], kind: 'insert' | 'delete', context: CompareContext): Block[];
7
+ //# sourceMappingURL=story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../../docx/compare/story.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAmMhD,6FAA6F;AAC7F,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,KAAK,EAAE,EACjB,OAAO,EAAE,KAAK,EAAE,EAChB,OAAO,EAAE,cAAc,GACrB,KAAK,EAAE,CAYT;AAED,yFAAyF;AACzF,wBAAgB,UAAU,CACzB,MAAM,EAAE,KAAK,EAAE,EACf,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,OAAO,EAAE,cAAc,GACrB,KAAK,EAAE,CAaT"}
@@ -0,0 +1,23 @@
1
+ import type { Block, Table } from '../model.js';
2
+ import type { CompareContext } from './context.js';
3
+ /**
4
+ * An original table shown deleted: every row is a tracked row deletion. The writer builds a new
5
+ * table only from rows of one width, so a merged original table shows as deleted paragraphs.
6
+ */
7
+ export declare function deletedTable(table: Table, context: CompareContext): Block[];
8
+ /** Paragraph ids cell by cell: what the writer treats as the structure of a table. */
9
+ export declare const tableLayout: (table: Table) => string;
10
+ /**
11
+ * A revised table shown inserted: every row is a tracked row insertion. When accepting the
12
+ * revised document's own changes restructured a table the writer cannot restructure, the table
13
+ * is written anew (fresh ids), or as inserted paragraphs when its cells are merged.
14
+ */
15
+ export declare function insertedTable(table: Table, context: CompareContext): Block[];
16
+ /**
17
+ * Compares two tables row by row: rows with the same text pair, rows of a changed stretch pair
18
+ * by their words, paired rows compare cell by cell and the rest are tracked row insertions and
19
+ * deletions. When the writer could not save that (a revised table it cannot restructure, or rows
20
+ * of different widths after a column was added or removed), the table is shown replaced.
21
+ */
22
+ export declare function compareTables(original: Table, revised: Table, context: CompareContext): Block[];
23
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../docx/compare/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAa,KAAK,EAAa,MAAM,UAAU,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAoJhD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,EAAE,CAuB3E;AAED,sFAAsF;AACtF,eAAO,MAAM,WAAW,UAAW,KAAK,KAAG,MACkD,CAAC;AAS9F;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,EAAE,CAgC5E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,GAAG,KAAK,EAAE,CAsC/F"}
@@ -0,0 +1,50 @@
1
+ import type { Block, Paragraph, Table, TextRun } from '../model.js';
2
+ import type { CompareGranularity } from './types.js';
3
+ /** A slice of one source run's text; an atomic run is one piece with its whole (empty) text. */
4
+ export interface Piece {
5
+ run: TextRun;
6
+ text: string;
7
+ }
8
+ /**
9
+ * What the comparison aligns. Text tokens are words, single spaces or punctuation (or single
10
+ * characters at character granularity) and may span runs; an atomic token is a run that is not
11
+ * text (a picture, a field marker, a break); a mark is a paragraph mark, owned by the paragraph
12
+ * it ends; a table is compared as a whole block.
13
+ */
14
+ export type Token = {
15
+ kind: 'text';
16
+ key: string;
17
+ pieces: Piece[];
18
+ } | {
19
+ kind: 'atomic';
20
+ key: string;
21
+ run: TextRun;
22
+ } | {
23
+ kind: 'mark';
24
+ key: string;
25
+ paragraph: Paragraph;
26
+ } | {
27
+ kind: 'table';
28
+ key: string;
29
+ table: Table;
30
+ };
31
+ /** The key of a paragraph mark; the story's last mark gets {@link END_KEY}. */
32
+ export declare const MARK_KEY = "\u2029";
33
+ /** The last paragraph mark of a story, which Word never marks as inserted or deleted. */
34
+ export declare const END_KEY = "\u0003end";
35
+ /** Runs that are not text: compared as a whole, never split. */
36
+ export declare function isAtomicRun(run: TextRun): boolean;
37
+ /** A paragraph's content tokens, without its mark. */
38
+ export declare function paragraphTokens(paragraph: Paragraph, granularity: CompareGranularity): Token[];
39
+ /** The text of a paragraph as the comparison sees it, for aligning whole paragraphs. */
40
+ export declare function paragraphKey(paragraph: Paragraph, granularity: CompareGranularity): string;
41
+ /** A table's text, row by row and cell by cell, for aligning whole tables and rows. */
42
+ export declare function rowKey(row: Table['rows'][number], granularity: CompareGranularity): string;
43
+ export declare function tableKey(table: Table, granularity: CompareGranularity): string;
44
+ /** The key aligning a block as a whole: its text, or a table's text. */
45
+ export declare function blockKey(block: Block, granularity: CompareGranularity): string;
46
+ /** The mark token of a paragraph; `last` is the story's final paragraph. */
47
+ export declare function markToken(paragraph: Paragraph, last: boolean): Token;
48
+ /** Whether every token is whitespace: such a short equal stretch between two changes joins them. */
49
+ export declare const isSpaceToken: (token: Token) => boolean;
50
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../docx/compare/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,gGAAgG;AAChG,MAAM,WAAW,KAAK;IACrB,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,MAAM,KAAK,GACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,WACpB,CAAC;AACF,yFAAyF;AACzF,eAAO,MAAM,OAAO,cAAc,CAAC;AAInC,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAWjD;AAqDD,sDAAsD;AACtD,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,GAAG,KAAK,EAAE,CAiB9F;AAED,wFAAwF;AACxF,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAI1F;AAED,uFAAuF;AACvF,wBAAgB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAM1F;AACD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAE9E;AAED,wEAAwE;AACxE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAI9E;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,CAEpE;AAED,oGAAoG;AACpG,eAAO,MAAM,YAAY,UAAW,KAAK,KAAG,OACM,CAAC"}