ooxml-core 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/README.md +35 -0
  2. package/dist/{PptxHandler-TEKISCJO.cjs → PptxHandler-DNSXWTQV.cjs} +3 -3
  3. package/dist/{PptxHandler-FYD7IYXT.mjs → PptxHandler-FSKKPZZC.mjs} +3 -3
  4. package/dist/PptxHandler-H7MEWJJJ.mjs +4 -0
  5. package/dist/{PresentationBuilder-IMB4DVRN.mjs → PresentationBuilder-7TSENZTX.mjs} +2 -2
  6. package/dist/{PresentationBuilder-NCKASKXU.cjs → PresentationBuilder-A5NI35VN.cjs} +5 -5
  7. package/dist/{PresentationBuilder-EYI6Z2JP.mjs → PresentationBuilder-RIJWQSEU.mjs} +3 -3
  8. package/dist/automation/docx-forms.d.ts +26 -0
  9. package/dist/automation/docx-forms.d.ts.map +1 -0
  10. package/dist/automation/index.cjs +39159 -14352
  11. package/dist/automation/index.d.ts +5 -0
  12. package/dist/automation/index.d.ts.map +1 -1
  13. package/dist/automation/index.mjs +39145 -14353
  14. package/dist/automation/node.cjs +37 -0
  15. package/dist/automation/node.d.ts +32 -1
  16. package/dist/automation/node.d.ts.map +1 -1
  17. package/dist/automation/node.mjs +36 -1
  18. package/dist/automation/proposal.d.ts +25 -0
  19. package/dist/automation/proposal.d.ts.map +1 -0
  20. package/dist/automation/tools/define.d.ts +27 -0
  21. package/dist/automation/tools/define.d.ts.map +1 -0
  22. package/dist/automation/tools/docx-tools.d.ts +4 -0
  23. package/dist/automation/tools/docx-tools.d.ts.map +1 -0
  24. package/dist/automation/tools/index.d.ts +16 -0
  25. package/dist/automation/tools/index.d.ts.map +1 -0
  26. package/dist/automation/tools/types.d.ts +52 -0
  27. package/dist/automation/tools/types.d.ts.map +1 -0
  28. package/dist/automation/tools/visio-tools.d.ts +4 -0
  29. package/dist/automation/tools/visio-tools.d.ts.map +1 -0
  30. package/dist/automation/tools/xlsx-tools.d.ts +8 -0
  31. package/dist/automation/tools/xlsx-tools.d.ts.map +1 -0
  32. package/dist/automation/xlsx-edits.d.ts +88 -0
  33. package/dist/automation/xlsx-edits.d.ts.map +1 -0
  34. package/dist/automation/xlsx-proposal.d.ts +34 -0
  35. package/dist/automation/xlsx-proposal.d.ts.map +1 -0
  36. package/dist/automation/xlsx.d.ts +10 -5
  37. package/dist/automation/xlsx.d.ts.map +1 -1
  38. package/dist/chart/axis-range.d.ts.map +1 -1
  39. package/dist/chart/bubble-radius.d.ts +0 -5
  40. package/dist/chart/bubble-radius.d.ts.map +1 -1
  41. package/dist/chart/extent.d.ts +9 -0
  42. package/dist/chart/extent.d.ts.map +1 -0
  43. package/dist/chart/histogram-binning.d.ts.map +1 -1
  44. package/dist/chart/index.cjs +56 -18
  45. package/dist/chart/index.mjs +56 -18
  46. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  47. package/dist/chart/render/chart-svg-legend.d.ts.map +1 -1
  48. package/dist/chart/render/chart-view-ex.d.ts.map +1 -1
  49. package/dist/chart/render/chart-view.d.ts.map +1 -1
  50. package/dist/chart/trendline-fit.d.ts.map +1 -1
  51. package/dist/{chunk-3IENHIFD.cjs → chunk-4LZIUJI3.cjs} +52 -12
  52. package/dist/{chunk-LEV2SVMK.mjs → chunk-4QPOJCJG.mjs} +45 -8
  53. package/dist/{chunk-CC5UNZOO.mjs → chunk-6IIMI5RS.mjs} +52 -12
  54. package/dist/{chunk-MN27HKHM.mjs → chunk-BA7Z6ATM.mjs} +5 -5
  55. package/dist/{chunk-LVM3IZJ2.mjs → chunk-DLFMCZZT.mjs} +1 -1
  56. package/dist/{chunk-M4XLF4R7.mjs → chunk-GBKBR4CX.mjs} +20 -8
  57. package/dist/{chunk-NXKATFM5.cjs → chunk-HL3FBJ6X.cjs} +1065 -1016
  58. package/dist/{chunk-WXY5EDGT.mjs → chunk-LF5E5ZOH.mjs} +51 -2
  59. package/dist/chunk-MHNETXQB.mjs +1 -0
  60. package/dist/{chunk-MNXKRXFB.mjs → chunk-Q5PKBQXH.mjs} +52 -3
  61. package/dist/{chunk-GQYQQ3GA.mjs → chunk-VQF6HQEE.mjs} +1 -1
  62. package/dist/collab/embedding.d.ts +108 -0
  63. package/dist/collab/embedding.d.ts.map +1 -0
  64. package/dist/collab/index.cjs +423 -293
  65. package/dist/collab/index.d.ts +2 -0
  66. package/dist/collab/index.d.ts.map +1 -1
  67. package/dist/collab/index.mjs +415 -294
  68. package/dist/collab/webrtc-provider.d.ts +21 -0
  69. package/dist/collab/webrtc-provider.d.ts.map +1 -0
  70. package/dist/color/theme-palette.d.ts +5 -1
  71. package/dist/color/theme-palette.d.ts.map +1 -1
  72. package/dist/crypto/index.cjs +27 -2
  73. package/dist/crypto/index.mjs +27 -2
  74. package/dist/diagram/index.cjs +31 -3
  75. package/dist/diagram/index.mjs +31 -3
  76. package/dist/docx/block-parser.d.ts.map +1 -1
  77. package/dist/docx/cell-blocks.d.ts +7 -1
  78. package/dist/docx/cell-blocks.d.ts.map +1 -1
  79. package/dist/docx/content-control-edit.d.ts +14 -0
  80. package/dist/docx/content-control-edit.d.ts.map +1 -1
  81. package/dist/docx/content-control-model.d.ts +8 -0
  82. package/dist/docx/content-control-model.d.ts.map +1 -1
  83. package/dist/docx/content-control-values.d.ts +20 -0
  84. package/dist/docx/content-control-values.d.ts.map +1 -0
  85. package/dist/docx/content-control.d.ts +7 -1
  86. package/dist/docx/content-control.d.ts.map +1 -1
  87. package/dist/docx/element-order.d.ts +10 -5
  88. package/dist/docx/element-order.d.ts.map +1 -1
  89. package/dist/docx/embedded.cjs +3861 -1379
  90. package/dist/docx/embedded.mjs +3861 -1379
  91. package/dist/docx/field-instruction.d.ts +22 -0
  92. package/dist/docx/field-instruction.d.ts.map +1 -0
  93. package/dist/docx/form-field-model.d.ts +48 -0
  94. package/dist/docx/form-field-model.d.ts.map +1 -0
  95. package/dist/docx/form-fields.d.ts +31 -0
  96. package/dist/docx/form-fields.d.ts.map +1 -0
  97. package/dist/docx/form-fill-fields.d.ts +61 -0
  98. package/dist/docx/form-fill-fields.d.ts.map +1 -0
  99. package/dist/docx/form-fill-labels.d.ts +8 -0
  100. package/dist/docx/form-fill-labels.d.ts.map +1 -0
  101. package/dist/docx/form-fill-sites.d.ts +59 -0
  102. package/dist/docx/form-fill-sites.d.ts.map +1 -0
  103. package/dist/docx/form-fill-values.d.ts +28 -0
  104. package/dist/docx/form-fill-values.d.ts.map +1 -0
  105. package/dist/docx/form-fill-write.d.ts +26 -0
  106. package/dist/docx/form-fill-write.d.ts.map +1 -0
  107. package/dist/docx/glossary.d.ts +15 -0
  108. package/dist/docx/glossary.d.ts.map +1 -0
  109. package/dist/docx/index.cjs +5929 -3153
  110. package/dist/docx/index.d.ts +7 -0
  111. package/dist/docx/index.d.ts.map +1 -1
  112. package/dist/docx/index.mjs +5913 -3154
  113. package/dist/docx/inline-annotations.d.ts +21 -0
  114. package/dist/docx/inline-annotations.d.ts.map +1 -0
  115. package/dist/docx/inline-container-markers.d.ts +14 -0
  116. package/dist/docx/inline-container-markers.d.ts.map +1 -0
  117. package/dist/docx/inline-containers.d.ts +54 -0
  118. package/dist/docx/inline-containers.d.ts.map +1 -0
  119. package/dist/docx/inline-form-field-bookmarks.d.ts +15 -0
  120. package/dist/docx/inline-form-field-bookmarks.d.ts.map +1 -0
  121. package/dist/docx/inline-marker-positions.d.ts +15 -0
  122. package/dist/docx/inline-marker-positions.d.ts.map +1 -0
  123. package/dist/docx/inline-markers.d.ts +63 -0
  124. package/dist/docx/inline-markers.d.ts.map +1 -0
  125. package/dist/docx/inline-slots.d.ts +24 -0
  126. package/dist/docx/inline-slots.d.ts.map +1 -0
  127. package/dist/docx/layout/adapter.d.ts.map +1 -1
  128. package/dist/docx/layout/index.cjs +1176 -563
  129. package/dist/docx/layout/index.d.ts +2 -1
  130. package/dist/docx/layout/index.d.ts.map +1 -1
  131. package/dist/docx/layout/index.mjs +1175 -564
  132. package/dist/docx/layout/input.d.ts +5 -1
  133. package/dist/docx/layout/input.d.ts.map +1 -1
  134. package/dist/docx/layout/page-style-refs.d.ts +21 -0
  135. package/dist/docx/layout/page-style-refs.d.ts.map +1 -0
  136. package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
  137. package/dist/docx/layout/result.d.ts +1 -0
  138. package/dist/docx/layout/result.d.ts.map +1 -1
  139. package/dist/docx/layout/tab-stops.d.ts +8 -1
  140. package/dist/docx/layout/tab-stops.d.ts.map +1 -1
  141. package/dist/docx/load/index.cjs +3969 -1487
  142. package/dist/docx/load/index.mjs +3969 -1487
  143. package/dist/docx/model-run.d.ts +24 -2
  144. package/dist/docx/model-run.d.ts.map +1 -1
  145. package/dist/docx/model.d.ts +5 -0
  146. package/dist/docx/model.d.ts.map +1 -1
  147. package/dist/docx/numbering-format.d.ts.map +1 -1
  148. package/dist/docx/parse-warnings.d.ts.map +1 -1
  149. package/dist/docx/parse.d.ts.map +1 -1
  150. package/dist/docx/run-segmentation.d.ts +11 -0
  151. package/dist/docx/run-segmentation.d.ts.map +1 -0
  152. package/dist/docx/save.d.ts.map +1 -1
  153. package/dist/docx/section-model.d.ts +5 -0
  154. package/dist/docx/section-model.d.ts.map +1 -1
  155. package/dist/docx/sections.d.ts +4 -2
  156. package/dist/docx/sections.d.ts.map +1 -1
  157. package/dist/docx/settings.d.ts +9 -0
  158. package/dist/docx/settings.d.ts.map +1 -1
  159. package/dist/docx/special-characters.d.ts +34 -0
  160. package/dist/docx/special-characters.d.ts.map +1 -0
  161. package/dist/docx/style-ref-fields.d.ts +40 -0
  162. package/dist/docx/style-ref-fields.d.ts.map +1 -0
  163. package/dist/docx/style-ref.d.ts +85 -0
  164. package/dist/docx/style-ref.d.ts.map +1 -0
  165. package/dist/docx/table-model.d.ts +2 -2
  166. package/dist/docx/table-model.d.ts.map +1 -1
  167. package/dist/docx/ui/break-note-schema.d.ts.map +1 -1
  168. package/dist/docx/ui/content-control-commands.d.ts +20 -8
  169. package/dist/docx/ui/content-control-commands.d.ts.map +1 -1
  170. package/dist/docx/ui/content-control-guard.d.ts +4 -1
  171. package/dist/docx/ui/content-control-guard.d.ts.map +1 -1
  172. package/dist/docx/ui/content-control-paste.d.ts +23 -0
  173. package/dist/docx/ui/content-control-paste.d.ts.map +1 -0
  174. package/dist/docx/ui/content-control-rows.d.ts +15 -0
  175. package/dist/docx/ui/content-control-rows.d.ts.map +1 -0
  176. package/dist/docx/ui/content-control-sources.d.ts +12 -0
  177. package/dist/docx/ui/content-control-sources.d.ts.map +1 -0
  178. package/dist/docx/ui/content-control-spans.d.ts +29 -6
  179. package/dist/docx/ui/content-control-spans.d.ts.map +1 -1
  180. package/dist/docx/ui/content-control-temporary.d.ts +10 -0
  181. package/dist/docx/ui/content-control-temporary.d.ts.map +1 -0
  182. package/dist/docx/ui/form-field-commands.d.ts +41 -0
  183. package/dist/docx/ui/form-field-commands.d.ts.map +1 -0
  184. package/dist/docx/ui/form-field-guard.d.ts +24 -0
  185. package/dist/docx/ui/form-field-guard.d.ts.map +1 -0
  186. package/dist/docx/ui/form-text-blank.d.ts +18 -0
  187. package/dist/docx/ui/form-text-blank.d.ts.map +1 -0
  188. package/dist/docx/ui/index.cjs +9276 -7132
  189. package/dist/docx/ui/index.d.ts +5 -0
  190. package/dist/docx/ui/index.d.ts.map +1 -1
  191. package/dist/docx/ui/index.mjs +9259 -7137
  192. package/dist/docx/ui/positional-tab-input.d.ts +7 -0
  193. package/dist/docx/ui/positional-tab-input.d.ts.map +1 -0
  194. package/dist/docx/ui/run-compare.d.ts.map +1 -1
  195. package/dist/docx/ui/run-extra-mark.d.ts +1 -1
  196. package/dist/docx/ui/run-extra-mark.d.ts.map +1 -1
  197. package/dist/docx/ui/schema-marks.d.ts +1 -1
  198. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  199. package/dist/docx/ui/symbol-font.d.ts +4 -0
  200. package/dist/docx/ui/symbol-font.d.ts.map +1 -0
  201. package/dist/docx/ui/yjs-collaboration.d.ts +12 -1
  202. package/dist/docx/ui/yjs-collaboration.d.ts.map +1 -1
  203. package/dist/docx/write-block-placement.d.ts +7 -0
  204. package/dist/docx/write-block-placement.d.ts.map +1 -1
  205. package/dist/docx/write-content-control.d.ts +6 -0
  206. package/dist/docx/write-content-control.d.ts.map +1 -1
  207. package/dist/docx/write-header-footer.d.ts +6 -2
  208. package/dist/docx/write-header-footer.d.ts.map +1 -1
  209. package/dist/docx/write-inline.d.ts +12 -16
  210. package/dist/docx/write-inline.d.ts.map +1 -1
  211. package/dist/docx/write-paragraph.d.ts.map +1 -1
  212. package/dist/docx/write-revisions.d.ts.map +1 -1
  213. package/dist/docx/write-run.d.ts.map +1 -1
  214. package/dist/docx/write-section-properties.d.ts +5 -0
  215. package/dist/docx/write-section-properties.d.ts.map +1 -0
  216. package/dist/docx/write-sections.d.ts.map +1 -1
  217. package/dist/docx/write-table-controls.d.ts +15 -0
  218. package/dist/docx/write-table-controls.d.ts.map +1 -0
  219. package/dist/docx/write-table-properties.d.ts.map +1 -1
  220. package/dist/docx/write-table.d.ts.map +1 -1
  221. package/dist/docx/write.d.ts.map +1 -1
  222. package/dist/docx/xml.d.ts +6 -0
  223. package/dist/docx/xml.d.ts.map +1 -1
  224. package/dist/drawingml/index.cjs +31 -3
  225. package/dist/drawingml/index.mjs +31 -3
  226. package/dist/index.cjs +77 -26
  227. package/dist/index.mjs +77 -26
  228. package/dist/math/index.cjs +27 -2
  229. package/dist/math/index.mjs +27 -2
  230. package/dist/opc/index.cjs +51 -11
  231. package/dist/opc/index.mjs +51 -11
  232. package/dist/opc/zip-folders.d.ts +11 -0
  233. package/dist/opc/zip-folders.d.ts.map +1 -0
  234. package/dist/opc/zip-limits.d.ts +9 -0
  235. package/dist/opc/zip-limits.d.ts.map +1 -1
  236. package/dist/pptx/automation/index.cjs +28818 -7388
  237. package/dist/pptx/automation/index.d.ts +93 -3
  238. package/dist/pptx/automation/index.d.ts.map +1 -1
  239. package/dist/pptx/automation/index.mjs +740 -63
  240. package/dist/pptx/automation/schemas/chart-formatting-schemas.d.ts +1 -1
  241. package/dist/pptx/automation/schemas/chart-schemas.d.ts +1 -1
  242. package/dist/pptx/automation/schemas/chart-user-shape-schemas.d.ts +1 -1
  243. package/dist/pptx/automation/schemas/element-schemas.d.ts +1 -1
  244. package/dist/pptx/automation/schemas/export-schemas.d.ts +1 -1
  245. package/dist/pptx/automation/schemas/geometry-schemas.d.ts +1 -1
  246. package/dist/pptx/automation/schemas/hyperlink-schemas.d.ts +1 -1
  247. package/dist/pptx/automation/schemas/index.mjs +1 -0
  248. package/dist/pptx/automation/schemas/json-schemas.d.ts +1 -1
  249. package/dist/pptx/automation/schemas/layout-schemas.d.ts +1 -1
  250. package/dist/pptx/automation/schemas/lock-schemas.d.ts +1 -1
  251. package/dist/pptx/automation/schemas/metadata-schemas.d.ts +1 -1
  252. package/dist/pptx/automation/schemas/ole-schemas.d.ts +1 -1
  253. package/dist/pptx/automation/schemas/presentation-schemas.d.ts +1 -1
  254. package/dist/pptx/automation/schemas/section-schemas.d.ts +1 -1
  255. package/dist/pptx/automation/schemas/slide-schemas.d.ts +1 -1
  256. package/dist/pptx/automation/schemas/smartart-schemas.d.ts +1 -1
  257. package/dist/pptx/automation/schemas/table-style-schemas.d.ts +1 -1
  258. package/dist/pptx/automation/schemas/template-schemas.d.ts +1 -1
  259. package/dist/pptx/automation/schemas/theme-schemas.d.ts +1 -1
  260. package/dist/pptx/automation/schemas/validation-schemas.d.ts +1 -1
  261. package/dist/pptx/chunks/{index-CgFX0T7b.d.ts → index-CPhsd7Df.d.ts} +9 -1
  262. package/dist/pptx/chunks/{index-CgFX0T7b.d.ts.map → index-CPhsd7Df.d.ts.map} +1 -1
  263. package/dist/pptx/chunks/{index-qwVYoFn6.d.ts → index-Q5mM8kIR.d.ts} +2 -2
  264. package/dist/pptx/chunks/{index-qwVYoFn6.d.ts.map → index-Q5mM8kIR.d.ts.map} +1 -1
  265. package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts → schemas-fuDGetRe.d.ts} +2 -2
  266. package/dist/pptx/chunks/{schemas-CWr181Wx.d.ts.map → schemas-fuDGetRe.d.ts.map} +1 -1
  267. package/dist/pptx/cli/index.cjs +116 -17
  268. package/dist/pptx/cli/index.mjs +5 -5
  269. package/dist/pptx/converter/index.cjs +12 -3
  270. package/dist/pptx/converter/index.d.ts +1 -1
  271. package/dist/pptx/converter/index.mjs +3 -3
  272. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  273. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  274. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  275. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  276. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  277. package/dist/pptx/index.cjs +116 -17
  278. package/dist/pptx/index.d.ts +2 -2
  279. package/dist/pptx/index.mjs +6 -6
  280. package/dist/pptx/signature-node/index.cjs +20 -8
  281. package/dist/pptx/signature-node/index.mjs +2 -2
  282. package/dist/teams/index.cjs +105 -70
  283. package/dist/teams/index.mjs +105 -70
  284. package/dist/text/text-diff.d.ts +15 -0
  285. package/dist/text/text-diff.d.ts.map +1 -0
  286. package/dist/visio/collab/bind.d.ts +44 -0
  287. package/dist/visio/collab/bind.d.ts.map +1 -0
  288. package/dist/visio/collab/compose.d.ts +15 -0
  289. package/dist/visio/collab/compose.d.ts.map +1 -0
  290. package/dist/visio/collab/index.cjs +1194 -0
  291. package/dist/visio/collab/index.d.ts +8 -0
  292. package/dist/visio/collab/index.d.ts.map +1 -0
  293. package/dist/visio/collab/index.mjs +1152 -0
  294. package/dist/visio/collab/keys.d.ts +22 -0
  295. package/dist/visio/collab/keys.d.ts.map +1 -0
  296. package/dist/visio/collab/order.d.ts +11 -0
  297. package/dist/visio/collab/order.d.ts.map +1 -0
  298. package/dist/visio/collab/package.d.ts +37 -0
  299. package/dist/visio/collab/package.d.ts.map +1 -0
  300. package/dist/visio/collab/read.d.ts +41 -0
  301. package/dist/visio/collab/read.d.ts.map +1 -0
  302. package/dist/visio/collab/scan.d.ts +28 -0
  303. package/dist/visio/collab/scan.d.ts.map +1 -0
  304. package/dist/visio/collab/schema.d.ts +70 -0
  305. package/dist/visio/collab/schema.d.ts.map +1 -0
  306. package/dist/visio/collab/snapshot.d.ts +61 -0
  307. package/dist/visio/collab/snapshot.d.ts.map +1 -0
  308. package/dist/visio/collab/write.d.ts +20 -0
  309. package/dist/visio/collab/write.d.ts.map +1 -0
  310. package/dist/visio/index.cjs +159 -39
  311. package/dist/visio/index.mjs +159 -39
  312. package/dist/visio/ui/collab-options.d.ts +24 -0
  313. package/dist/visio/ui/collab-options.d.ts.map +1 -0
  314. package/dist/visio/ui/collab-presence.d.ts +31 -0
  315. package/dist/visio/ui/collab-presence.d.ts.map +1 -0
  316. package/dist/visio/ui/contract.d.ts +9 -3
  317. package/dist/visio/ui/contract.d.ts.map +1 -1
  318. package/dist/visio/ui/document-history.d.ts +3 -1
  319. package/dist/visio/ui/document-history.d.ts.map +1 -1
  320. package/dist/visio/ui/index.cjs +284 -95
  321. package/dist/visio/ui/index.d.ts +2 -0
  322. package/dist/visio/ui/index.d.ts.map +1 -1
  323. package/dist/visio/ui/index.mjs +278 -95
  324. package/dist/xlsx/collab/index.cjs +8 -3
  325. package/dist/xlsx/collab/index.mjs +8 -3
  326. package/dist/xlsx/compare/cells.d.ts +22 -0
  327. package/dist/xlsx/compare/cells.d.ts.map +1 -0
  328. package/dist/xlsx/compare/compare.d.ts +12 -0
  329. package/dist/xlsx/compare/compare.d.ts.map +1 -0
  330. package/dist/xlsx/compare/conditional.d.ts +7 -0
  331. package/dist/xlsx/compare/conditional.d.ts.map +1 -0
  332. package/dist/xlsx/compare/format-key.d.ts +34 -0
  333. package/dist/xlsx/compare/format-key.d.ts.map +1 -0
  334. package/dist/xlsx/compare/group.d.ts +8 -0
  335. package/dist/xlsx/compare/group.d.ts.map +1 -0
  336. package/dist/xlsx/compare/index.d.ts +5 -0
  337. package/dist/xlsx/compare/index.d.ts.map +1 -0
  338. package/dist/xlsx/compare/rich-text.d.ts +7 -0
  339. package/dist/xlsx/compare/rich-text.d.ts.map +1 -0
  340. package/dist/xlsx/compare/sheets.d.ts +22 -0
  341. package/dist/xlsx/compare/sheets.d.ts.map +1 -0
  342. package/dist/xlsx/compare/structure.d.ts +11 -0
  343. package/dist/xlsx/compare/structure.d.ts.map +1 -0
  344. package/dist/xlsx/compare/text.d.ts +8 -0
  345. package/dist/xlsx/compare/text.d.ts.map +1 -0
  346. package/dist/xlsx/compare/types.d.ts +173 -0
  347. package/dist/xlsx/compare/types.d.ts.map +1 -0
  348. package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
  349. package/dist/xlsx/edit/clipboard-html.d.ts.map +1 -1
  350. package/dist/xlsx/edit/clipboard-text.d.ts.map +1 -1
  351. package/dist/xlsx/edit/clipboard.d.ts.map +1 -1
  352. package/dist/xlsx/edit/clone-cell.d.ts +9 -0
  353. package/dist/xlsx/edit/clone-cell.d.ts.map +1 -0
  354. package/dist/xlsx/edit/history.d.ts +8 -3
  355. package/dist/xlsx/edit/history.d.ts.map +1 -1
  356. package/dist/xlsx/edit/timelines.d.ts.map +1 -1
  357. package/dist/xlsx/formula/change-areas.d.ts +9 -0
  358. package/dist/xlsx/formula/change-areas.d.ts.map +1 -0
  359. package/dist/xlsx/formula/engine-prepare.d.ts +8 -0
  360. package/dist/xlsx/formula/engine-prepare.d.ts.map +1 -1
  361. package/dist/xlsx/formula/engine.d.ts.map +1 -1
  362. package/dist/xlsx/formula/spill.d.ts +5 -1
  363. package/dist/xlsx/formula/spill.d.ts.map +1 -1
  364. package/dist/xlsx/index.cjs +2461 -1192
  365. package/dist/xlsx/index.d.ts +1 -0
  366. package/dist/xlsx/index.d.ts.map +1 -1
  367. package/dist/xlsx/index.mjs +2454 -1193
  368. package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
  369. package/dist/xlsx/layout/navigate.d.ts.map +1 -1
  370. package/dist/xlsx/layout/style-view.d.ts +5 -0
  371. package/dist/xlsx/layout/style-view.d.ts.map +1 -1
  372. package/dist/xlsx/load/csv-dates.d.ts +22 -0
  373. package/dist/xlsx/load/csv-dates.d.ts.map +1 -0
  374. package/dist/xlsx/load/csv-import.d.ts +64 -0
  375. package/dist/xlsx/load/csv-import.d.ts.map +1 -0
  376. package/dist/xlsx/load/csv-separators.d.ts +13 -0
  377. package/dist/xlsx/load/csv-separators.d.ts.map +1 -0
  378. package/dist/xlsx/load/csv-traits.d.ts +20 -0
  379. package/dist/xlsx/load/csv-traits.d.ts.map +1 -0
  380. package/dist/xlsx/load/csv.d.ts +8 -4
  381. package/dist/xlsx/load/csv.d.ts.map +1 -1
  382. package/dist/xlsx/load/detect.d.ts +13 -0
  383. package/dist/xlsx/load/detect.d.ts.map +1 -1
  384. package/dist/xlsx/load/errors.d.ts +1 -0
  385. package/dist/xlsx/load/errors.d.ts.map +1 -1
  386. package/dist/xlsx/load/index.cjs +537 -91
  387. package/dist/xlsx/load/index.d.ts +3 -1
  388. package/dist/xlsx/load/index.d.ts.map +1 -1
  389. package/dist/xlsx/load/index.mjs +536 -92
  390. package/dist/xlsx/numfmt/input-date.d.ts +2 -0
  391. package/dist/xlsx/numfmt/input-date.d.ts.map +1 -1
  392. package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
  393. package/dist/xlsx/pivot/groups.d.ts.map +1 -1
  394. package/dist/xlsx/read/index.d.ts +2 -1
  395. package/dist/xlsx/read/index.d.ts.map +1 -1
  396. package/dist/xlsx/read/limits.d.ts +50 -0
  397. package/dist/xlsx/read/limits.d.ts.map +1 -0
  398. package/dist/xlsx/read/load.d.ts +11 -1
  399. package/dist/xlsx/read/load.d.ts.map +1 -1
  400. package/dist/xlsx/read/package.d.ts +5 -23
  401. package/dist/xlsx/read/package.d.ts.map +1 -1
  402. package/dist/xlsx/read/shared-strings.d.ts +2 -2
  403. package/dist/xlsx/read/shared-strings.d.ts.map +1 -1
  404. package/dist/xlsx/read/worksheet.d.ts +2 -0
  405. package/dist/xlsx/read/worksheet.d.ts.map +1 -1
  406. package/dist/xlsx/stable-key.d.ts +3 -0
  407. package/dist/xlsx/stable-key.d.ts.map +1 -0
  408. package/dist/xlsx/styles.d.ts.map +1 -1
  409. package/dist/xlsx/ui/index.cjs +662 -372
  410. package/dist/xlsx/ui/index.mjs +662 -372
  411. package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -1
  412. package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -1
  413. package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -1
  414. package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -1
  415. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -1
  416. package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
  417. package/dist/xml/index.cjs +32 -3
  418. package/dist/xml/index.mjs +32 -4
  419. package/dist/xml/xml.d.ts +11 -1
  420. package/dist/xml/xml.d.ts.map +1 -1
  421. package/package.json +6 -1
  422. package/dist/PptxHandler-SITN3K3F.mjs +0 -4
@@ -0,0 +1,21 @@
1
+ import type { Awareness } from 'y-protocols/awareness';
2
+ import type * as Y from 'yjs';
3
+ import { type YjsProviderLike } from './external-provider.js';
4
+ import type { ProviderFactory } from './provider.js';
5
+ /** The y-webrtc `WebrtcProvider` constructor, structurally. */
6
+ export type WebrtcProviderConstructor = new (roomId: string, doc: Y.Doc, options: {
7
+ signaling?: string[];
8
+ password?: string;
9
+ awareness?: Awareness;
10
+ }) => YjsProviderLike;
11
+ export interface WebrtcOptions {
12
+ /** `WebrtcProvider` from the host's own `y-webrtc` install. */
13
+ WebrtcProvider: WebrtcProviderConstructor;
14
+ /** Signaling server URLs; y-webrtc's defaults when omitted. */
15
+ signaling?: string[];
16
+ /** Room password: peers without it cannot read the room. */
17
+ password?: string;
18
+ }
19
+ /** A provider factory that joins the session's room over y-webrtc, sharing its awareness. */
20
+ export declare function webrtcProvider(options: WebrtcOptions): ProviderFactory;
21
+ //# sourceMappingURL=webrtc-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webrtc-provider.d.ts","sourceRoot":"","sources":["../../collab/webrtc-provider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,+DAA+D;AAC/D,MAAM,MAAM,yBAAyB,GAAG,KACvC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,CAAC,CAAC,GAAG,EACV,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,KACvE,eAAe,CAAC;AAErB,MAAM,WAAW,aAAa;IAC7B,+DAA+D;IAC/D,cAAc,EAAE,yBAAyB,CAAC;IAC1C,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAStE"}
@@ -13,12 +13,16 @@ export interface ThemePaletteSwatch {
13
13
  /** Absent for the base colour of a column. */
14
14
  readonly variant?: ThemePaletteVariant;
15
15
  }
16
+ /** A swatch below the base row: it always names its lighter or darker step. */
17
+ export interface ThemePaletteVariantSwatch extends ThemePaletteSwatch {
18
+ readonly variant: ThemePaletteVariant;
19
+ }
16
20
  /** One column: the base swatch, then its five variants from top to bottom. */
17
21
  export interface ThemePaletteColumn {
18
22
  /** Column name, in Office's order: "Background 1", "Text 1", ... "Accent 6". */
19
23
  readonly name: string;
20
24
  readonly base: ThemePaletteSwatch;
21
- readonly variants: readonly ThemePaletteSwatch[];
25
+ readonly variants: readonly ThemePaletteVariantSwatch[];
22
26
  }
23
27
  /** The ten columns of the Theme Colors grid, in Office's order. */
24
28
  export declare const THEME_PALETTE_COLUMN_NAMES: readonly string[];
@@ -1 +1 @@
1
- {"version":3,"file":"theme-palette.d.ts","sourceRoot":"","sources":["../../color/theme-palette.ts"],"names":[],"mappings":"AASA,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IACpC,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED,8BAA8B;AAC9B,MAAM,WAAW,kBAAkB;IAClC,4BAA4B;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IAClC,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACjD;AAED,mEAAmE;AACnE,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAWvD,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAWxD,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,EAAE,SAAS,kBAAkB,EAW/D,CAAC;AAKF;;;;GAIG;AACH,wBAAgB,gCAAgC,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,mBAAmB,EAAE,CAM1F;AAED,gGAAgG;AAChG,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAC3E,MAAM,EAAE,M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AS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,EAAE,CAI5F"}
@@ -3210,6 +3210,19 @@ var DEFAULT_XML_LIMITS = {
3210
3210
  maxDepth: 512,
3211
3211
  maxNodes: 5e6
3212
3212
  };
3213
+ var XmlLimitError = class extends Error {
3214
+ code = "xml-limit";
3215
+ /** The limit that was exceeded. */
3216
+ limit;
3217
+ /** Its value: the largest depth or element count allowed. */
3218
+ maximum;
3219
+ constructor(message, limit, maximum) {
3220
+ super(message);
3221
+ this.name = "XmlLimitError";
3222
+ this.limit = limit;
3223
+ this.maximum = maximum;
3224
+ }
3225
+ };
3213
3226
  var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
3214
3227
  var MARKUP_SKIPS = [
3215
3228
  ["<!--", "-->"],
@@ -3243,11 +3256,22 @@ function checkXmlLimits(xml, label, limits = {}) {
3243
3256
  continue;
3244
3257
  }
3245
3258
  nodes++;
3246
- if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
3259
+ if (nodes > maxNodes)
3260
+ throw new XmlLimitError(
3261
+ `${label} XML exceeds the limit of ${maxNodes} elements`,
3262
+ "maxNodes",
3263
+ maxNodes
3264
+ );
3247
3265
  if (!selfClosing && ++depth > maxDepth)
3248
- throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth}`);
3266
+ throw new XmlLimitError(
3267
+ `${label} XML exceeds the nesting depth limit of ${maxDepth}`,
3268
+ "maxDepth",
3269
+ maxDepth
3270
+ );
3249
3271
  }
3250
3272
  }
3273
+ var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
3274
+ var crlfDeclarations = /* @__PURE__ */ new WeakSet();
3251
3275
  function parseXml(xml, options = {}) {
3252
3276
  const label = options.label ?? "OOXML";
3253
3277
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
@@ -3269,6 +3293,7 @@ function parseXml(xml, options = {}) {
3269
3293
  }
3270
3294
  if (parseError || !parsed.documentElement)
3271
3295
  throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
3296
+ if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
3272
3297
  return parsed;
3273
3298
  }
3274
3299
 
@@ -3208,6 +3208,19 @@ var DEFAULT_XML_LIMITS = {
3208
3208
  maxDepth: 512,
3209
3209
  maxNodes: 5e6
3210
3210
  };
3211
+ var XmlLimitError = class extends Error {
3212
+ code = "xml-limit";
3213
+ /** The limit that was exceeded. */
3214
+ limit;
3215
+ /** Its value: the largest depth or element count allowed. */
3216
+ maximum;
3217
+ constructor(message, limit, maximum) {
3218
+ super(message);
3219
+ this.name = "XmlLimitError";
3220
+ this.limit = limit;
3221
+ this.maximum = maximum;
3222
+ }
3223
+ };
3211
3224
  var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
3212
3225
  var MARKUP_SKIPS = [
3213
3226
  ["<!--", "-->"],
@@ -3241,11 +3254,22 @@ function checkXmlLimits(xml, label, limits = {}) {
3241
3254
  continue;
3242
3255
  }
3243
3256
  nodes++;
3244
- if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
3257
+ if (nodes > maxNodes)
3258
+ throw new XmlLimitError(
3259
+ `${label} XML exceeds the limit of ${maxNodes} elements`,
3260
+ "maxNodes",
3261
+ maxNodes
3262
+ );
3245
3263
  if (!selfClosing && ++depth > maxDepth)
3246
- throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth}`);
3264
+ throw new XmlLimitError(
3265
+ `${label} XML exceeds the nesting depth limit of ${maxDepth}`,
3266
+ "maxDepth",
3267
+ maxDepth
3268
+ );
3247
3269
  }
3248
3270
  }
3271
+ var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
3272
+ var crlfDeclarations = /* @__PURE__ */ new WeakSet();
3249
3273
  function parseXml(xml, options = {}) {
3250
3274
  const label = options.label ?? "OOXML";
3251
3275
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
@@ -3267,6 +3291,7 @@ function parseXml(xml, options = {}) {
3267
3291
  }
3268
3292
  if (parseError || !parsed.documentElement)
3269
3293
  throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
3294
+ if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
3270
3295
  return parsed;
3271
3296
  }
3272
3297
 
@@ -22539,6 +22539,19 @@ var DEFAULT_XML_LIMITS = {
22539
22539
  maxDepth: 512,
22540
22540
  maxNodes: 5e6
22541
22541
  };
22542
+ var XmlLimitError = class extends Error {
22543
+ code = "xml-limit";
22544
+ /** The limit that was exceeded. */
22545
+ limit;
22546
+ /** Its value: the largest depth or element count allowed. */
22547
+ maximum;
22548
+ constructor(message, limit, maximum) {
22549
+ super(message);
22550
+ this.name = "XmlLimitError";
22551
+ this.limit = limit;
22552
+ this.maximum = maximum;
22553
+ }
22554
+ };
22542
22555
  var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
22543
22556
  var MARKUP_SKIPS = [
22544
22557
  ["<!--", "-->"],
@@ -22572,11 +22585,22 @@ function checkXmlLimits(xml, label, limits = {}) {
22572
22585
  continue;
22573
22586
  }
22574
22587
  nodes++;
22575
- if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
22588
+ if (nodes > maxNodes)
22589
+ throw new XmlLimitError(
22590
+ `${label} XML exceeds the limit of ${maxNodes} elements`,
22591
+ "maxNodes",
22592
+ maxNodes
22593
+ );
22576
22594
  if (!selfClosing && ++depth > maxDepth2)
22577
- throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth2}`);
22595
+ throw new XmlLimitError(
22596
+ `${label} XML exceeds the nesting depth limit of ${maxDepth2}`,
22597
+ "maxDepth",
22598
+ maxDepth2
22599
+ );
22578
22600
  }
22579
22601
  }
22602
+ var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
22603
+ var crlfDeclarations = /* @__PURE__ */ new WeakSet();
22580
22604
  function parseXml(xml, options = {}) {
22581
22605
  const label = options.label ?? "OOXML";
22582
22606
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
@@ -22598,9 +22622,13 @@ function parseXml(xml, options = {}) {
22598
22622
  }
22599
22623
  if (parseError || !parsed.documentElement)
22600
22624
  throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
22625
+ if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
22601
22626
  return parsed;
22602
22627
  }
22603
- var buildXml = (node) => new xmldom.XMLSerializer().serializeToString(node);
22628
+ var buildXml = (node) => {
22629
+ const xml = new xmldom.XMLSerializer().serializeToString(node);
22630
+ return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
22631
+ };
22604
22632
  var isElement = (node) => node.nodeType === 1;
22605
22633
  var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
22606
22634
  function named(element, local, ns, lenient = true) {
@@ -22537,6 +22537,19 @@ var DEFAULT_XML_LIMITS = {
22537
22537
  maxDepth: 512,
22538
22538
  maxNodes: 5e6
22539
22539
  };
22540
+ var XmlLimitError = class extends Error {
22541
+ code = "xml-limit";
22542
+ /** The limit that was exceeded. */
22543
+ limit;
22544
+ /** Its value: the largest depth or element count allowed. */
22545
+ maximum;
22546
+ constructor(message, limit, maximum) {
22547
+ super(message);
22548
+ this.name = "XmlLimitError";
22549
+ this.limit = limit;
22550
+ this.maximum = maximum;
22551
+ }
22552
+ };
22540
22553
  var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
22541
22554
  var MARKUP_SKIPS = [
22542
22555
  ["<!--", "-->"],
@@ -22570,11 +22583,22 @@ function checkXmlLimits(xml, label, limits = {}) {
22570
22583
  continue;
22571
22584
  }
22572
22585
  nodes++;
22573
- if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
22586
+ if (nodes > maxNodes)
22587
+ throw new XmlLimitError(
22588
+ `${label} XML exceeds the limit of ${maxNodes} elements`,
22589
+ "maxNodes",
22590
+ maxNodes
22591
+ );
22574
22592
  if (!selfClosing && ++depth > maxDepth2)
22575
- throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth2}`);
22593
+ throw new XmlLimitError(
22594
+ `${label} XML exceeds the nesting depth limit of ${maxDepth2}`,
22595
+ "maxDepth",
22596
+ maxDepth2
22597
+ );
22576
22598
  }
22577
22599
  }
22600
+ var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
22601
+ var crlfDeclarations = /* @__PURE__ */ new WeakSet();
22578
22602
  function parseXml(xml, options = {}) {
22579
22603
  const label = options.label ?? "OOXML";
22580
22604
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
@@ -22596,9 +22620,13 @@ function parseXml(xml, options = {}) {
22596
22620
  }
22597
22621
  if (parseError || !parsed.documentElement)
22598
22622
  throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
22623
+ if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
22599
22624
  return parsed;
22600
22625
  }
22601
- var buildXml = (node) => new XMLSerializer().serializeToString(node);
22626
+ var buildXml = (node) => {
22627
+ const xml = new XMLSerializer().serializeToString(node);
22628
+ return crlfDeclarations.has(node) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
22629
+ };
22602
22630
  var isElement = (node) => node.nodeType === 1;
22603
22631
  var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
22604
22632
  function named(element, local, ns, lenient = true) {
@@ -1 +1 @@
1
- {"version":3,"file":"block-parser.d.ts","sourceRoot":"","sources":["../../docx/block-parser.ts"],"names":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GAAG,KAAK,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,UAAU,EACrB,QAAQ,SAAK,EACb,OAAO,CAAC,EAAE,cAAc,GACtB,KAAK,EAAE,CAcT;AAgBD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
@@ -1,4 +1,10 @@
1
- import type { Block, TableCell } from './model.js';
1
+ import type { Block, Paragraph, TableCell } from './model.js';
2
2
  /** Source child order, with current direct paragraphs and any new paragraphs beside their source anchor. */
3
3
  export declare function cellSourceBlocks(cell: TableCell): Block[];
4
+ /**
5
+ * The paragraphs of the main document in reading order: body paragraphs, and each table's cells
6
+ * row by row, a cell's paragraphs and the tables nested in it in the order they come. Headers,
7
+ * footers, notes and text boxes are not searched, as in Word.
8
+ */
9
+ export declare function documentParagraphs(blocks: readonly Block[]): Paragraph[];
4
10
  //# sourceMappingURL=cell-blocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-blocks.d.ts","sourceRoot":"","sources":["../../docx/cell-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,4GAA4G;AAC5G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,CAuBzD"}
1
+ {"version":3,"file":"cell-blocks.d.ts","sourceRoot":"","sources":["../../docx/cell-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3D,4GAA4G;AAC5G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,CAuBzD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,SAAS,EAAE,CAUxE"}
@@ -4,11 +4,20 @@ export interface ControlChange {
4
4
  control: ContentControl;
5
5
  text: string;
6
6
  font?: string;
7
+ /** The control is temporary (`w:temporary`): the edit keeps `text` and removes the control. */
8
+ removed?: boolean;
7
9
  }
8
10
  /** Whether the user may type in, toggle or pick for this control. */
9
11
  export declare const canEditControlContent: (control: ContentControl | undefined) => boolean;
10
12
  /** Whether the control itself may be deleted (with its content). */
11
13
  export declare const canDeleteControl: (control: ContentControl | undefined) => boolean;
14
+ /**
15
+ * Whether editing the control's content removes it, its content staying as ordinary text: Word
16
+ * removes a temporary control (ECMA-376 17.5.2.43) unless its lock forbids deleting it.
17
+ */
18
+ export declare const removedByEdit: (control: ContentControl) => boolean;
19
+ /** The change as Word applies it (`removedByEdit`). */
20
+ export declare const afterEdit: (change: ControlChange) => ControlChange;
12
21
  export declare function checkboxState(control: ContentControl, checked: boolean): ControlChange;
13
22
  export declare const toggleCheckbox: (control: ContentControl) => ControlChange;
14
23
  /** Choosing entry `index` of a drop-down list or combo box. */
@@ -21,6 +30,11 @@ export declare const fullDateOf: (date: Date) => string;
21
30
  export declare function setControlDate(control: ContentControl, date: Date): ControlChange;
22
31
  /** The placeholder text Word shows for an empty control of this kind. */
23
32
  export declare function defaultPlaceholder(control: ContentControl): string;
33
+ /**
34
+ * The control's own placeholder text (from the glossary), else Word's default for its kind. An
35
+ * entry without text gives the default too: an inline control left without text is lost with it.
36
+ */
37
+ export declare const placeholderTextOf: (control: ContentControl) => string;
24
38
  /** Typed text replaces a placeholder: the control no longer shows one. */
25
39
  export declare function withValue(control: ContentControl): ContentControl;
26
40
  //# sourceMappingURL=content-control-edit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-control-edit.d.ts","sourceRoot":"","sources":["../../docx/content-control-edit.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtF,8FAA8F;AAC9F,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,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AAM,qBAAqB,YAAa,cAAc,GAAG,SAAS,KAAG,OAChC,CAAC;AAC7C,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,YAAa,cAAc,GAAG,SAAS,KAAG,OAC3B,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,aAAa,YAAa,cAAc,KAAG,OACA,CAAC;AAEzD,uDAAuD;AACvD,eAAO,MAAM,SAAS,WAAY,aAAa,KAAG,aACoB,CAAC;AAEvE,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,CAStF;AAED,eAAO,MAAM,cAAc,YAAa,cAAc,KAAG,aACL,CAAC;AAErD,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAKhG;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAKrE;AAED,6FAA6F;AAC7F,eAAO,MAAM,UAAU,SAAU,IAAI,KAAG,MAC8G,CAAC;AAEvJ,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAG,aAAa,CAMjF;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAYlE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,YAAa,cAAc,KAAG,MACL,CAAC;AAExD,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAGjE"}
@@ -43,9 +43,17 @@ export interface ContentControl {
43
43
  dataBound?: boolean;
44
44
  /** `w:temporary`: Word removes the control once the user edits it. */
45
45
  temporary?: boolean;
46
+ /** `w:placeholder/w:docPart`: the glossary entry that holds the control's placeholder text. */
47
+ placeholder?: string;
48
+ /** The text of that glossary entry, which the control shows while it is empty (read only). */
49
+ placeholderText?: string;
46
50
  /** Verbatim `w:sdtPr`, used to recreate the control and to keep what is not modeled. */
47
51
  sourceXml?: string;
52
+ /** Verbatim `w:sdtEndPr` (the formatting of the control's end), kept when it is recreated. */
53
+ endSourceXml?: string;
48
54
  }
49
55
  /** A content control surrounding a row or cell is read and preserved; the model keeps its fields. */
50
56
  export declare const isContentControlLocked: (control: ContentControl | undefined, scope: 'content' | 'control') => boolean;
57
+ /** A control id that is not in `used`: Word uses signed 32-bit integers, so 1 to 2^31 - 1. */
58
+ export declare function freshControlId(used: ReadonlySet<string>): string;
51
59
  //# sourceMappingURL=content-control-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-control-model.d.ts","sourceRoot":"","sources":["../../docx/content-control-model.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAC3B,UAAU,GACV,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,GACV,UAAU,GACV,cAAc,GACd,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,SAAS,CAAC;AAEb,qGAAqG;AACrG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtE,gGAAgG;AAChG,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAEpF,MAAM,WAAW,sBAAsB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,mGAAmG;AACnG,MAAM,WAAW,mBAAmB;IACnC,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC9B,oGAAoG;IACpG,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,mBAAmB,CAAC;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,oEAAoE;IACpE,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACjC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mGAAmG;IACnG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,YACzB,cAAc,GAAG,SAAS,SAC5B,SAAS,GAAG,SAAS,KAC1B,OAKF,CAAC"}
1
+ {"version":3,"file":"content-control-model.d.ts","sourceRoot":"","sources":["../../docx/content-control-model.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAC3B,UAAU,GACV,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,GACV,UAAU,GACV,cAAc,GACd,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,SAAS,CAAC;AAEb,qGAAqG;AACrG,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtE,gGAAg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SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,YACzB,cAAc,GAAG,SAAS,SAC5B,SAAS,GAAG,SAAS,KAC1B,OAKF,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAKhE"}
@@ -0,0 +1,20 @@
1
+ import type { ContentControl } from './content-control-model.js';
2
+ import { type XmlDocument, type XmlElement } from './xml.js';
3
+ /** The lock, when it is one the model holds (`ST_Lock`'s locks; `unlocked` is the default). */
4
+ export declare const validLock: (lock: string | undefined) => ContentControl['lock'];
5
+ /** The id, when it is a decimal integer Word reads (signed 32-bit). */
6
+ export declare function validId(id: string | undefined): string | undefined;
7
+ /** The kinds whose `w:sdtPr` type element is named after the kind; rich text has none. */
8
+ export declare const NAMED_TYPES: ReadonlySet<string>;
9
+ /**
10
+ * The `w:sdtPr` that `xml` holds, imported into `doc`: nothing when it is not XML, holds another
11
+ * element, or holds anything but properties Word reads, such as a paragraph with a field that
12
+ * fetches a picture when it is updated, or an id or lock Word does not read.
13
+ */
14
+ export declare function verbatimProperties(doc: XmlDocument, xml: string | undefined): XmlElement | undefined;
15
+ /**
16
+ * The `w:sdtEndPr` that `xml` holds, imported into `doc`: nothing when it is not XML, holds another
17
+ * element, or holds anything but run properties shaped as their schema allows.
18
+ */
19
+ export declare function verbatimEndProperties(doc: XmlDocument, xml: string | undefined): XmlElement | undefined;
20
+ //# sourceMappingURL=content-control-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-control-values.d.ts","sourceRoot":"","sources":["../../docx/content-control-values.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAON,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,MAAM,OAAO,CAAC;AAEf,+FAA+F;AAC/F,eAAO,MAAM,SAAS,SAAU,MAAM,GAAG,SAAS,KAAG,cAAc,CAAC,MAAM,CAG7D,CAAC;AAEd,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIlE;AAED,0FAA0F;AAC1F,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAQ1C,CAAC;AA6HH;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,MAAM,GAAG,SAAS,GACrB,UAAU,GAAG,SAAS,CAWxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,MAAM,GAAG,SAAS,GACrB,UAAU,GAAG,SAAS,CAWxB"}
@@ -1,9 +1,15 @@
1
- import type { ContentControl, ContentControlLevel } from './content-control-model.js';
1
+ import type { ContentControl, ContentControlKind, ContentControlLevel } from './content-control-model.js';
2
2
  import { type XmlElement } from './xml.js';
3
3
  export declare const WORD_2012_NS = "http://schemas.microsoft.com/office/word/2012/wordml";
4
4
  /** The direct `w:sdtContent` of a `w:sdt`. */
5
5
  export declare const sdtContent: (sdt: XmlElement) => XmlElement | undefined;
6
6
  export declare const isSdt: (element: XmlElement | null | undefined) => element is XmlElement;
7
+ /**
8
+ * The type elements of a `w:sdtPr`, one at most in a valid file: also `w:richText`, which the
9
+ * default type need not be written as, an entity picker and a repeating section's item.
10
+ */
11
+ export declare const typeElements: (sdtPr: XmlElement) => XmlElement[];
12
+ export declare function parseKind(sdtPr: XmlElement): ContentControlKind;
7
13
  /** Reads `w:sdtPr` into the control model. `level` is where the `w:sdt` sits. */
8
14
  export declare function parseContentControl(sdt: XmlElement, level: ContentControlLevel): ContentControl;
9
15
  //# sourceMappingURL=content-control.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-control.d.ts","sourceRoot":"","sources":["../../docx/content-control.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,cAAc,EAGd,mBAAmB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAoD,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1F,eAAO,MAAM,YAAY,yDAAyD,CAAC;AAEnF,8CAA8C;AAC9C,eAAO,MAAM,UAAU,QAAS,UAAU,KAAG,UAAU,GAAG,SAAqC,CAAC;AAChG,eAAO,MAAM,KAAK,YAAa,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,OAAO,IAAI,UACpD,CAAC;AAyCvB,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,GAAG,cAAc,CAsD/F"}
1
+ {"version":3,"file":"content-control.d.ts","sourceRoot":"","sources":["../../docx/content-control.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACX,cAAc,EAEd,kBAAkB,EAClB,mBAAmB,EAEnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAoD,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAG1F,eAAO,MAAM,YAAY,yDAAyD,CAAC;AAEnF,8CAA8C;AAC9C,eAAO,MAAM,UAAU,QAAS,UAAU,KAAG,UAAU,GAAG,SAAqC,CAAC;AAChG,eAAO,MAAM,KAAK,YAAa,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,OAAO,IAAI,UACpD,CAAC;AAuCvB;;;GAGG;AACH,eAAO,MAAM,YAAY,UAAW,UAAU,KAAG,UAAU,EASxD,CAAC;AAEJ,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,kBAAkB,CAI/D;AAID,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,GAAG,cAAc,CA2D/F"}
@@ -2,12 +2,17 @@ import { type XmlElement } from './xml.js';
2
2
  /** `CT_RPr` child order (ECMA-376 §17.3.2.28). */
3
3
  export declare const RPR_ORDER: string[];
4
4
  /**
5
- * Sorts an element's children into `order`. Elements outside the list (extensions) keep their
6
- * position relative to the known element before them. Nothing moves when already in order.
5
+ * Sorts an element's children into `order`. An entry that lists several names is a choice group
6
+ * whose members may come in any order, so they keep theirs. Elements outside the list
7
+ * (extensions) keep their position relative to the known element before them. Nothing moves when
8
+ * already in order.
7
9
  */
8
- export declare function orderChildren(parent: XmlElement, order: readonly string[]): void;
9
- /** `CT_SectPr` child order (ECMA-376 §17.6.17); header/footer references come first. */
10
- export declare const SECTPR_ORDER: string[];
10
+ export declare function orderChildren(parent: XmlElement, order: readonly (string | readonly string[])[]): void;
11
+ /**
12
+ * `CT_SectPr` child order (ECMA-376 §17.6.17). Header and footer references come first, as one
13
+ * choice group (`EG_HdrFtrReferences`): Word interleaves them, the first-page pair last.
14
+ */
15
+ export declare const SECTPR_ORDER: (string | string[])[];
11
16
  /** Sorts `w:sectPr` children into schema order. */
12
17
  export declare function orderSectionProperties(sectPr: XmlElement): void;
13
18
  //# sourceMappingURL=element-order.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-order.d.ts","sourceRoot":"","sources":["../../docx/element-order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,SAAS,UA6CrB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAWhF;AAED,wFAAwF;AACxF,eAAO,MAAM,YAAY,UAuBxB,CAAC;AAEF,mDAAmD;AACnD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAE/D"}
1
+ {"version":3,"file":"element-order.d.ts","sourceRoot":"","sources":["../../docx/element-order.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,SAAS,UA6CrB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,EAAE,GAC5C,IAAI,CAaN;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,uBAsBxB,CAAC;AAEF,mDAAmD;AACnD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAE/D"}