@cj-tech-master/excelts 9.4.2 → 9.5.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 (618) hide show
  1. package/dist/browser/index.browser.d.ts +8 -5
  2. package/dist/browser/index.browser.js +19 -1
  3. package/dist/browser/index.d.ts +4 -2
  4. package/dist/browser/index.js +9 -1
  5. package/dist/browser/modules/excel/chart/cache-populator.d.ts +49 -0
  6. package/dist/browser/modules/excel/chart/cache-populator.js +1171 -0
  7. package/dist/browser/modules/excel/chart/chart-api.d.ts +92 -0
  8. package/dist/browser/modules/excel/chart/chart-api.js +364 -0
  9. package/dist/browser/modules/excel/chart/chart-builder.d.ts +48 -0
  10. package/dist/browser/modules/excel/chart/chart-builder.js +2432 -0
  11. package/dist/browser/modules/excel/chart/chart-ex-builder.d.ts +36 -0
  12. package/dist/browser/modules/excel/chart/chart-ex-builder.js +903 -0
  13. package/dist/browser/modules/excel/chart/chart-ex-parser.d.ts +8 -0
  14. package/dist/browser/modules/excel/chart/chart-ex-parser.js +1205 -0
  15. package/dist/browser/modules/excel/chart/chart-ex-renderer.d.ts +187 -0
  16. package/dist/browser/modules/excel/chart/chart-ex-renderer.js +5352 -0
  17. package/dist/browser/modules/excel/chart/chart-ex-types.d.ts +531 -0
  18. package/dist/browser/modules/excel/chart/chart-ex-types.js +11 -0
  19. package/dist/browser/modules/excel/chart/chart-images.d.ts +78 -0
  20. package/dist/browser/modules/excel/chart/chart-images.js +363 -0
  21. package/dist/browser/modules/excel/chart/chart-presets.d.ts +392 -0
  22. package/dist/browser/modules/excel/chart/chart-presets.js +179 -0
  23. package/dist/browser/modules/excel/chart/chart-renderer.d.ts +550 -0
  24. package/dist/browser/modules/excel/chart/chart-renderer.js +6440 -0
  25. package/dist/browser/modules/excel/chart/chart-sidecar.d.ts +21 -0
  26. package/dist/browser/modules/excel/chart/chart-sidecar.js +427 -0
  27. package/dist/browser/modules/excel/chart/chart-utils.d.ts +306 -0
  28. package/dist/browser/modules/excel/chart/chart-utils.js +821 -0
  29. package/dist/browser/modules/excel/chart/chart.d.ts +504 -0
  30. package/dist/browser/modules/excel/chart/chart.js +1320 -0
  31. package/dist/browser/modules/excel/chart/glyph-rasterizer.d.ts +62 -0
  32. package/dist/browser/modules/excel/chart/glyph-rasterizer.js +658 -0
  33. package/dist/browser/modules/excel/chart/index.d.ts +54 -0
  34. package/dist/browser/modules/excel/chart/index.js +46 -0
  35. package/dist/browser/modules/excel/chart/install.d.ts +44 -0
  36. package/dist/browser/modules/excel/chart/install.js +91 -0
  37. package/dist/browser/modules/excel/chart/shape-properties.d.ts +156 -0
  38. package/dist/browser/modules/excel/chart/shape-properties.js +1557 -0
  39. package/dist/browser/modules/excel/chart/stroke-font.d.ts +36 -0
  40. package/dist/browser/modules/excel/chart/stroke-font.js +1556 -0
  41. package/dist/browser/modules/excel/chart/topojson.d.ts +98 -0
  42. package/dist/browser/modules/excel/chart/topojson.js +236 -0
  43. package/dist/browser/modules/excel/chart/types.d.ts +2559 -0
  44. package/dist/browser/modules/excel/chart/types.js +8 -0
  45. package/dist/browser/modules/excel/chart-host-registry.d.ts +157 -0
  46. package/dist/browser/modules/excel/chart-host-registry.js +90 -0
  47. package/dist/browser/modules/excel/chartsheet.d.ts +102 -0
  48. package/dist/browser/modules/excel/chartsheet.js +196 -0
  49. package/dist/browser/modules/excel/defined-names.d.ts +35 -0
  50. package/dist/browser/modules/excel/defined-names.js +44 -4
  51. package/dist/browser/modules/excel/errors.d.ts +6 -0
  52. package/dist/browser/modules/excel/errors.js +9 -0
  53. package/dist/browser/modules/excel/form-control.d.ts +6 -0
  54. package/dist/browser/modules/excel/form-control.js +17 -0
  55. package/dist/browser/modules/excel/image.js +12 -2
  56. package/dist/browser/modules/excel/pivot-chart.d.ts +7 -0
  57. package/dist/browser/modules/excel/pivot-chart.js +53 -0
  58. package/dist/browser/modules/excel/pivot-table.d.ts +55 -0
  59. package/dist/browser/modules/excel/pivot-table.js +35 -0
  60. package/dist/browser/modules/excel/range.js +5 -1
  61. package/dist/browser/modules/excel/sparkline/index.d.ts +7 -0
  62. package/dist/browser/modules/excel/sparkline/index.js +7 -0
  63. package/dist/browser/modules/excel/sparkline/sparkline.d.ts +206 -0
  64. package/dist/browser/modules/excel/sparkline/sparkline.js +750 -0
  65. package/dist/browser/modules/excel/stream/worksheet-writer.js +3 -2
  66. package/dist/browser/modules/excel/table.js +42 -6
  67. package/dist/browser/modules/excel/types.d.ts +72 -0
  68. package/dist/browser/modules/excel/utils/address.d.ts +18 -0
  69. package/dist/browser/modules/excel/utils/address.js +28 -0
  70. package/dist/browser/modules/excel/utils/drawing-utils.js +11 -6
  71. package/dist/browser/modules/excel/utils/guid.d.ts +15 -0
  72. package/dist/browser/modules/excel/utils/guid.js +35 -0
  73. package/dist/browser/modules/excel/utils/ooxml-paths.d.ts +74 -0
  74. package/dist/browser/modules/excel/utils/ooxml-paths.js +206 -9
  75. package/dist/browser/modules/excel/utils/ooxml-validator/check-chart-sidecar.d.ts +35 -0
  76. package/dist/browser/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +101 -0
  77. package/dist/browser/modules/excel/utils/ooxml-validator/check-chart.d.ts +32 -0
  78. package/dist/browser/modules/excel/utils/ooxml-validator/check-chart.js +2125 -0
  79. package/dist/browser/modules/excel/utils/ooxml-validator/check-chartsheet.d.ts +9 -0
  80. package/dist/browser/modules/excel/utils/ooxml-validator/check-chartsheet.js +26 -0
  81. package/dist/browser/modules/excel/utils/ooxml-validator/check-content-types.d.ts +16 -0
  82. package/dist/browser/modules/excel/utils/ooxml-validator/check-content-types.js +181 -0
  83. package/dist/browser/modules/excel/utils/ooxml-validator/check-drawing.d.ts +34 -0
  84. package/dist/browser/modules/excel/utils/ooxml-validator/check-drawing.js +267 -0
  85. package/dist/browser/modules/excel/utils/ooxml-validator/check-pivot.d.ts +14 -0
  86. package/dist/browser/modules/excel/utils/ooxml-validator/check-pivot.js +104 -0
  87. package/dist/browser/modules/excel/utils/ooxml-validator/check-relationships.d.ts +18 -0
  88. package/dist/browser/modules/excel/utils/ooxml-validator/check-relationships.js +184 -0
  89. package/dist/browser/modules/excel/utils/ooxml-validator/check-structure.d.ts +21 -0
  90. package/dist/browser/modules/excel/utils/ooxml-validator/check-structure.js +56 -0
  91. package/dist/browser/modules/excel/utils/ooxml-validator/check-styles.d.ts +15 -0
  92. package/dist/browser/modules/excel/utils/ooxml-validator/check-styles.js +89 -0
  93. package/dist/browser/modules/excel/utils/ooxml-validator/check-table.d.ts +31 -0
  94. package/dist/browser/modules/excel/utils/ooxml-validator/check-table.js +177 -0
  95. package/dist/browser/modules/excel/utils/ooxml-validator/check-workbook.d.ts +19 -0
  96. package/dist/browser/modules/excel/utils/ooxml-validator/check-workbook.js +163 -0
  97. package/dist/browser/modules/excel/utils/ooxml-validator/check-worksheet.d.ts +25 -0
  98. package/dist/browser/modules/excel/utils/ooxml-validator/check-worksheet.js +569 -0
  99. package/dist/browser/modules/excel/utils/ooxml-validator/context.d.ts +85 -0
  100. package/dist/browser/modules/excel/utils/ooxml-validator/context.js +191 -0
  101. package/dist/browser/modules/excel/utils/ooxml-validator/index.d.ts +31 -0
  102. package/dist/browser/modules/excel/utils/ooxml-validator/index.js +102 -0
  103. package/dist/browser/modules/excel/utils/ooxml-validator/path-utils.d.ts +67 -0
  104. package/dist/browser/modules/excel/utils/ooxml-validator/path-utils.js +156 -0
  105. package/dist/browser/modules/excel/utils/ooxml-validator/reporter.d.ts +41 -0
  106. package/dist/browser/modules/excel/utils/ooxml-validator/reporter.js +61 -0
  107. package/dist/browser/modules/excel/utils/ooxml-validator/types.d.ts +109 -0
  108. package/dist/browser/modules/excel/utils/ooxml-validator/types.js +12 -0
  109. package/dist/browser/modules/excel/utils/ooxml-validator/xml-utils.d.ts +38 -0
  110. package/dist/browser/modules/excel/utils/ooxml-validator/xml-utils.js +100 -0
  111. package/dist/browser/modules/excel/workbook.browser.d.ts +248 -30
  112. package/dist/browser/modules/excel/workbook.browser.js +966 -31
  113. package/dist/browser/modules/excel/workbook.d.ts +43 -0
  114. package/dist/browser/modules/excel/workbook.js +48 -0
  115. package/dist/browser/modules/excel/worksheet.d.ts +157 -3
  116. package/dist/browser/modules/excel/worksheet.js +394 -35
  117. package/dist/browser/modules/excel/xlsx/rel-type.d.ts +40 -0
  118. package/dist/browser/modules/excel/xlsx/rel-type.js +41 -1
  119. package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +1 -0
  120. package/dist/browser/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
  121. package/dist/browser/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
  122. package/dist/browser/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
  123. package/dist/browser/modules/excel/xlsx/xform/chart/chart-space-xform.d.ts +353 -0
  124. package/dist/browser/modules/excel/xlsx/xform/chart/chart-space-xform.js +6000 -0
  125. package/dist/browser/modules/excel/xlsx/xform/comment/threaded-comments-xform.d.ts +60 -0
  126. package/dist/browser/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +213 -0
  127. package/dist/browser/modules/excel/xlsx/xform/core/content-types-xform.js +150 -11
  128. package/dist/browser/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
  129. package/dist/browser/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
  130. package/dist/browser/modules/excel/xlsx/xform/drawing/drawing-xform.d.ts +30 -0
  131. package/dist/browser/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
  132. package/dist/browser/modules/excel/xlsx/xform/drawing/graphic-frame-xform.d.ts +54 -0
  133. package/dist/browser/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +225 -0
  134. package/dist/browser/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.d.ts +3 -1
  135. package/dist/browser/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
  136. package/dist/browser/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.d.ts +46 -0
  137. package/dist/browser/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
  138. package/dist/browser/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.d.ts +13 -2
  139. package/dist/browser/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
  140. package/dist/browser/modules/excel/xlsx/xform/sheet/chartsheet-xform.d.ts +185 -0
  141. package/dist/browser/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +441 -0
  142. package/dist/browser/modules/excel/xlsx/xform/sheet/ext-lst-xform.d.ts +1 -0
  143. package/dist/browser/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
  144. package/dist/browser/modules/excel/xlsx/xform/sheet/worksheet-xform.js +196 -20
  145. package/dist/browser/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
  146. package/dist/browser/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
  147. package/dist/browser/modules/excel/xlsx/xform/xsd-values.d.ts +63 -0
  148. package/dist/browser/modules/excel/xlsx/xform/xsd-values.js +101 -0
  149. package/dist/browser/modules/excel/xlsx/xlsx.browser.d.ts +115 -21
  150. package/dist/browser/modules/excel/xlsx/xlsx.browser.js +4422 -78
  151. package/dist/browser/modules/pdf/builder/document-builder.d.ts +74 -0
  152. package/dist/browser/modules/pdf/builder/document-builder.js +507 -2
  153. package/dist/browser/modules/pdf/builder/pdf-editor.js +48 -3
  154. package/dist/browser/modules/pdf/excel-bridge.d.ts +69 -0
  155. package/dist/browser/modules/pdf/excel-bridge.js +683 -12
  156. package/dist/browser/modules/pdf/font/font-manager.d.ts +25 -0
  157. package/dist/browser/modules/pdf/font/font-manager.js +39 -0
  158. package/dist/browser/modules/pdf/index.d.ts +5 -2
  159. package/dist/browser/modules/pdf/index.js +3 -1
  160. package/dist/browser/modules/pdf/render/chart-surface.d.ts +33 -0
  161. package/dist/browser/modules/pdf/render/chart-surface.js +200 -0
  162. package/dist/browser/modules/pdf/render/layout-engine.d.ts +22 -1
  163. package/dist/browser/modules/pdf/render/layout-engine.js +436 -56
  164. package/dist/browser/modules/pdf/render/page-renderer.js +169 -28
  165. package/dist/browser/modules/pdf/render/pdf-exporter.js +117 -7
  166. package/dist/browser/modules/pdf/types.d.ts +227 -23
  167. package/dist/browser/modules/pdf/types.js +4 -0
  168. package/dist/browser/modules/pdf/word-bridge.d.ts +47 -0
  169. package/dist/browser/modules/pdf/word-bridge.js +304 -0
  170. package/dist/browser/modules/word/constants.d.ts +179 -0
  171. package/dist/browser/modules/word/constants.js +231 -0
  172. package/dist/browser/modules/word/content-types.d.ts +27 -0
  173. package/dist/browser/modules/word/content-types.js +53 -0
  174. package/dist/browser/modules/word/digital-signatures.d.ts +87 -0
  175. package/dist/browser/modules/word/digital-signatures.js +134 -0
  176. package/dist/browser/modules/word/document.d.ts +728 -0
  177. package/dist/browser/modules/word/document.js +1795 -0
  178. package/dist/browser/modules/word/docx-packager.d.ts +14 -0
  179. package/dist/browser/modules/word/docx-packager.js +822 -0
  180. package/dist/browser/modules/word/docx-reader.d.ts +11 -0
  181. package/dist/browser/modules/word/docx-reader.js +4929 -0
  182. package/dist/browser/modules/word/encryption.d.ts +102 -0
  183. package/dist/browser/modules/word/encryption.js +274 -0
  184. package/dist/browser/modules/word/errors.d.ts +49 -0
  185. package/dist/browser/modules/word/errors.js +68 -0
  186. package/dist/browser/modules/word/font-obfuscation.d.ts +31 -0
  187. package/dist/browser/modules/word/font-obfuscation.js +83 -0
  188. package/dist/browser/modules/word/html-renderer.d.ts +38 -0
  189. package/dist/browser/modules/word/html-renderer.js +782 -0
  190. package/dist/browser/modules/word/index.base.d.ts +19 -0
  191. package/dist/browser/modules/word/index.base.js +51 -0
  192. package/dist/browser/modules/word/index.browser.d.ts +4 -0
  193. package/dist/browser/modules/word/index.browser.js +4 -0
  194. package/dist/browser/modules/word/index.d.ts +4 -0
  195. package/dist/browser/modules/word/index.js +4 -0
  196. package/dist/browser/modules/word/internal-utils.d.ts +23 -0
  197. package/dist/browser/modules/word/internal-utils.js +54 -0
  198. package/dist/browser/modules/word/relationships.d.ts +31 -0
  199. package/dist/browser/modules/word/relationships.js +56 -0
  200. package/dist/browser/modules/word/types.d.ts +2325 -0
  201. package/dist/browser/modules/word/types.js +10 -0
  202. package/dist/browser/modules/word/units.d.ts +49 -0
  203. package/dist/browser/modules/word/units.js +111 -0
  204. package/dist/browser/modules/word/writers/chart-writer.d.ts +10 -0
  205. package/dist/browser/modules/word/writers/chart-writer.js +385 -0
  206. package/dist/browser/modules/word/writers/checkbox-writer.d.ts +9 -0
  207. package/dist/browser/modules/word/writers/checkbox-writer.js +42 -0
  208. package/dist/browser/modules/word/writers/comment-writer.d.ts +15 -0
  209. package/dist/browser/modules/word/writers/comment-writer.js +70 -0
  210. package/dist/browser/modules/word/writers/document-writer.d.ts +16 -0
  211. package/dist/browser/modules/word/writers/document-writer.js +461 -0
  212. package/dist/browser/modules/word/writers/footnote-writer.d.ts +11 -0
  213. package/dist/browser/modules/word/writers/footnote-writer.js +72 -0
  214. package/dist/browser/modules/word/writers/header-footer-writer.d.ts +13 -0
  215. package/dist/browser/modules/word/writers/header-footer-writer.js +129 -0
  216. package/dist/browser/modules/word/writers/image-writer.d.ts +10 -0
  217. package/dist/browser/modules/word/writers/image-writer.js +185 -0
  218. package/dist/browser/modules/word/writers/math-writer.d.ts +9 -0
  219. package/dist/browser/modules/word/writers/math-writer.js +428 -0
  220. package/dist/browser/modules/word/writers/numbering-writer.d.ts +10 -0
  221. package/dist/browser/modules/word/writers/numbering-writer.js +125 -0
  222. package/dist/browser/modules/word/writers/paragraph-writer.d.ts +13 -0
  223. package/dist/browser/modules/word/writers/paragraph-writer.js +516 -0
  224. package/dist/browser/modules/word/writers/parts-writer.d.ts +26 -0
  225. package/dist/browser/modules/word/writers/parts-writer.js +660 -0
  226. package/dist/browser/modules/word/writers/run-writer.d.ts +15 -0
  227. package/dist/browser/modules/word/writers/run-writer.js +649 -0
  228. package/dist/browser/modules/word/writers/section-writer.d.ts +10 -0
  229. package/dist/browser/modules/word/writers/section-writer.js +238 -0
  230. package/dist/browser/modules/word/writers/styles-writer.d.ts +10 -0
  231. package/dist/browser/modules/word/writers/styles-writer.js +242 -0
  232. package/dist/browser/modules/word/writers/table-writer.d.ts +10 -0
  233. package/dist/browser/modules/word/writers/table-writer.js +503 -0
  234. package/dist/browser/modules/word/writers/textbox-writer.d.ts +9 -0
  235. package/dist/browser/modules/word/writers/textbox-writer.js +53 -0
  236. package/dist/browser/modules/word/writers/toc-writer.d.ts +9 -0
  237. package/dist/browser/modules/word/writers/toc-writer.js +79 -0
  238. package/dist/browser/modules/xml/encode.d.ts +56 -7
  239. package/dist/browser/modules/xml/encode.js +157 -11
  240. package/dist/cjs/index.js +13 -2
  241. package/dist/cjs/modules/excel/chart/cache-populator.js +1178 -0
  242. package/dist/cjs/modules/excel/chart/chart-api.js +371 -0
  243. package/dist/cjs/modules/excel/chart/chart-builder.js +2440 -0
  244. package/dist/cjs/modules/excel/chart/chart-ex-builder.js +907 -0
  245. package/dist/cjs/modules/excel/chart/chart-ex-parser.js +1208 -0
  246. package/dist/cjs/modules/excel/chart/chart-ex-renderer.js +5364 -0
  247. package/dist/cjs/modules/excel/chart/chart-ex-types.js +12 -0
  248. package/dist/cjs/modules/excel/chart/chart-images.js +366 -0
  249. package/dist/cjs/modules/excel/chart/chart-presets.js +184 -0
  250. package/dist/cjs/modules/excel/chart/chart-renderer.js +6450 -0
  251. package/dist/cjs/modules/excel/chart/chart-sidecar.js +433 -0
  252. package/dist/cjs/modules/excel/chart/chart-utils.js +845 -0
  253. package/dist/cjs/modules/excel/chart/chart.js +1324 -0
  254. package/dist/cjs/modules/excel/chart/glyph-rasterizer.js +664 -0
  255. package/dist/cjs/modules/excel/chart/index.js +101 -0
  256. package/dist/cjs/modules/excel/chart/install.js +95 -0
  257. package/dist/cjs/modules/excel/chart/shape-properties.js +1577 -0
  258. package/dist/cjs/modules/excel/chart/stroke-font.js +1559 -0
  259. package/dist/cjs/modules/excel/chart/topojson.js +239 -0
  260. package/dist/cjs/modules/excel/chart/types.js +9 -0
  261. package/dist/cjs/modules/excel/chart-host-registry.js +96 -0
  262. package/dist/cjs/modules/excel/chartsheet.js +199 -0
  263. package/dist/cjs/modules/excel/defined-names.js +44 -4
  264. package/dist/cjs/modules/excel/errors.js +11 -1
  265. package/dist/cjs/modules/excel/form-control.js +17 -0
  266. package/dist/cjs/modules/excel/image.js +12 -2
  267. package/dist/cjs/modules/excel/pivot-chart.js +56 -0
  268. package/dist/cjs/modules/excel/pivot-table.js +35 -0
  269. package/dist/cjs/modules/excel/range.js +5 -1
  270. package/dist/cjs/modules/excel/sparkline/index.js +23 -0
  271. package/dist/cjs/modules/excel/sparkline/sparkline.js +756 -0
  272. package/dist/cjs/modules/excel/stream/worksheet-writer.js +3 -2
  273. package/dist/cjs/modules/excel/table.js +42 -6
  274. package/dist/cjs/modules/excel/utils/address.js +29 -0
  275. package/dist/cjs/modules/excel/utils/drawing-utils.js +11 -6
  276. package/dist/cjs/modules/excel/utils/guid.js +38 -0
  277. package/dist/cjs/modules/excel/utils/ooxml-paths.js +246 -9
  278. package/dist/cjs/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +103 -0
  279. package/dist/cjs/modules/excel/utils/ooxml-validator/check-chart.js +2128 -0
  280. package/dist/cjs/modules/excel/utils/ooxml-validator/check-chartsheet.js +29 -0
  281. package/dist/cjs/modules/excel/utils/ooxml-validator/check-content-types.js +184 -0
  282. package/dist/cjs/modules/excel/utils/ooxml-validator/check-drawing.js +270 -0
  283. package/dist/cjs/modules/excel/utils/ooxml-validator/check-pivot.js +107 -0
  284. package/dist/cjs/modules/excel/utils/ooxml-validator/check-relationships.js +188 -0
  285. package/dist/cjs/modules/excel/utils/ooxml-validator/check-structure.js +60 -0
  286. package/dist/cjs/modules/excel/utils/ooxml-validator/check-styles.js +92 -0
  287. package/dist/cjs/modules/excel/utils/ooxml-validator/check-table.js +180 -0
  288. package/dist/cjs/modules/excel/utils/ooxml-validator/check-workbook.js +166 -0
  289. package/dist/cjs/modules/excel/utils/ooxml-validator/check-worksheet.js +572 -0
  290. package/dist/cjs/modules/excel/utils/ooxml-validator/context.js +196 -0
  291. package/dist/cjs/modules/excel/utils/ooxml-validator/index.js +105 -0
  292. package/dist/cjs/modules/excel/utils/ooxml-validator/path-utils.js +168 -0
  293. package/dist/cjs/modules/excel/utils/ooxml-validator/reporter.js +66 -0
  294. package/dist/cjs/modules/excel/utils/ooxml-validator/types.js +13 -0
  295. package/dist/cjs/modules/excel/utils/ooxml-validator/xml-utils.js +110 -0
  296. package/dist/cjs/modules/excel/workbook.browser.js +973 -38
  297. package/dist/cjs/modules/excel/workbook.js +48 -0
  298. package/dist/cjs/modules/excel/worksheet.js +393 -34
  299. package/dist/cjs/modules/excel/xlsx/rel-type.js +41 -1
  300. package/dist/cjs/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
  301. package/dist/cjs/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
  302. package/dist/cjs/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
  303. package/dist/cjs/modules/excel/xlsx/xform/chart/chart-space-xform.js +6003 -0
  304. package/dist/cjs/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +219 -0
  305. package/dist/cjs/modules/excel/xlsx/xform/core/content-types-xform.js +149 -10
  306. package/dist/cjs/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
  307. package/dist/cjs/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
  308. package/dist/cjs/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
  309. package/dist/cjs/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +228 -0
  310. package/dist/cjs/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
  311. package/dist/cjs/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
  312. package/dist/cjs/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
  313. package/dist/cjs/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +444 -0
  314. package/dist/cjs/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
  315. package/dist/cjs/modules/excel/xlsx/xform/sheet/worksheet-xform.js +195 -19
  316. package/dist/cjs/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
  317. package/dist/cjs/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
  318. package/dist/cjs/modules/excel/xlsx/xform/xsd-values.js +106 -0
  319. package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +4420 -76
  320. package/dist/cjs/modules/pdf/builder/document-builder.js +506 -1
  321. package/dist/cjs/modules/pdf/builder/pdf-editor.js +48 -3
  322. package/dist/cjs/modules/pdf/excel-bridge.js +684 -12
  323. package/dist/cjs/modules/pdf/font/font-manager.js +39 -0
  324. package/dist/cjs/modules/pdf/index.js +5 -1
  325. package/dist/cjs/modules/pdf/render/chart-surface.js +203 -0
  326. package/dist/cjs/modules/pdf/render/layout-engine.js +437 -56
  327. package/dist/cjs/modules/pdf/render/page-renderer.js +169 -28
  328. package/dist/cjs/modules/pdf/render/pdf-exporter.js +115 -5
  329. package/dist/cjs/modules/pdf/types.js +5 -0
  330. package/dist/cjs/modules/pdf/word-bridge.js +307 -0
  331. package/dist/cjs/modules/word/constants.js +234 -0
  332. package/dist/cjs/modules/word/content-types.js +57 -0
  333. package/dist/cjs/modules/word/digital-signatures.js +140 -0
  334. package/dist/cjs/modules/word/document.js +1909 -0
  335. package/dist/cjs/modules/word/docx-packager.js +825 -0
  336. package/dist/cjs/modules/word/docx-reader.js +4932 -0
  337. package/dist/cjs/modules/word/encryption.js +282 -0
  338. package/dist/cjs/modules/word/errors.js +88 -0
  339. package/dist/cjs/modules/word/font-obfuscation.js +88 -0
  340. package/dist/cjs/modules/word/html-renderer.js +785 -0
  341. package/dist/cjs/modules/word/index.base.js +199 -0
  342. package/dist/cjs/modules/word/index.browser.js +20 -0
  343. package/dist/cjs/modules/word/index.js +20 -0
  344. package/dist/cjs/modules/word/internal-utils.js +59 -0
  345. package/dist/cjs/modules/word/relationships.js +60 -0
  346. package/dist/cjs/modules/word/types.js +11 -0
  347. package/dist/cjs/modules/word/units.js +135 -0
  348. package/dist/cjs/modules/word/writers/chart-writer.js +388 -0
  349. package/dist/cjs/modules/word/writers/checkbox-writer.js +45 -0
  350. package/dist/cjs/modules/word/writers/comment-writer.js +74 -0
  351. package/dist/cjs/modules/word/writers/document-writer.js +465 -0
  352. package/dist/cjs/modules/word/writers/footnote-writer.js +76 -0
  353. package/dist/cjs/modules/word/writers/header-footer-writer.js +134 -0
  354. package/dist/cjs/modules/word/writers/image-writer.js +188 -0
  355. package/dist/cjs/modules/word/writers/math-writer.js +431 -0
  356. package/dist/cjs/modules/word/writers/numbering-writer.js +128 -0
  357. package/dist/cjs/modules/word/writers/paragraph-writer.js +521 -0
  358. package/dist/cjs/modules/word/writers/parts-writer.js +671 -0
  359. package/dist/cjs/modules/word/writers/run-writer.js +655 -0
  360. package/dist/cjs/modules/word/writers/section-writer.js +241 -0
  361. package/dist/cjs/modules/word/writers/styles-writer.js +245 -0
  362. package/dist/cjs/modules/word/writers/table-writer.js +506 -0
  363. package/dist/cjs/modules/word/writers/textbox-writer.js +56 -0
  364. package/dist/cjs/modules/word/writers/toc-writer.js +82 -0
  365. package/dist/cjs/modules/xml/encode.js +158 -11
  366. package/dist/esm/index.browser.js +20 -2
  367. package/dist/esm/index.js +9 -1
  368. package/dist/esm/modules/excel/chart/cache-populator.js +1171 -0
  369. package/dist/esm/modules/excel/chart/chart-api.js +364 -0
  370. package/dist/esm/modules/excel/chart/chart-builder.js +2432 -0
  371. package/dist/esm/modules/excel/chart/chart-ex-builder.js +903 -0
  372. package/dist/esm/modules/excel/chart/chart-ex-parser.js +1205 -0
  373. package/dist/esm/modules/excel/chart/chart-ex-renderer.js +5352 -0
  374. package/dist/esm/modules/excel/chart/chart-ex-types.js +11 -0
  375. package/dist/esm/modules/excel/chart/chart-images.js +363 -0
  376. package/dist/esm/modules/excel/chart/chart-presets.js +179 -0
  377. package/dist/esm/modules/excel/chart/chart-renderer.js +6440 -0
  378. package/dist/esm/modules/excel/chart/chart-sidecar.js +427 -0
  379. package/dist/esm/modules/excel/chart/chart-utils.js +821 -0
  380. package/dist/esm/modules/excel/chart/chart.js +1320 -0
  381. package/dist/esm/modules/excel/chart/glyph-rasterizer.js +658 -0
  382. package/dist/esm/modules/excel/chart/index.js +46 -0
  383. package/dist/esm/modules/excel/chart/install.js +91 -0
  384. package/dist/esm/modules/excel/chart/shape-properties.js +1557 -0
  385. package/dist/esm/modules/excel/chart/stroke-font.js +1556 -0
  386. package/dist/esm/modules/excel/chart/topojson.js +236 -0
  387. package/dist/esm/modules/excel/chart/types.js +8 -0
  388. package/dist/esm/modules/excel/chart-host-registry.js +90 -0
  389. package/dist/esm/modules/excel/chartsheet.js +196 -0
  390. package/dist/esm/modules/excel/defined-names.js +44 -4
  391. package/dist/esm/modules/excel/errors.js +9 -0
  392. package/dist/esm/modules/excel/form-control.js +17 -0
  393. package/dist/esm/modules/excel/image.js +12 -2
  394. package/dist/esm/modules/excel/pivot-chart.js +53 -0
  395. package/dist/esm/modules/excel/pivot-table.js +35 -0
  396. package/dist/esm/modules/excel/range.js +5 -1
  397. package/dist/esm/modules/excel/sparkline/index.js +7 -0
  398. package/dist/esm/modules/excel/sparkline/sparkline.js +750 -0
  399. package/dist/esm/modules/excel/stream/worksheet-writer.js +3 -2
  400. package/dist/esm/modules/excel/table.js +42 -6
  401. package/dist/esm/modules/excel/utils/address.js +28 -0
  402. package/dist/esm/modules/excel/utils/drawing-utils.js +11 -6
  403. package/dist/esm/modules/excel/utils/guid.js +35 -0
  404. package/dist/esm/modules/excel/utils/ooxml-paths.js +206 -9
  405. package/dist/esm/modules/excel/utils/ooxml-validator/check-chart-sidecar.js +101 -0
  406. package/dist/esm/modules/excel/utils/ooxml-validator/check-chart.js +2125 -0
  407. package/dist/esm/modules/excel/utils/ooxml-validator/check-chartsheet.js +26 -0
  408. package/dist/esm/modules/excel/utils/ooxml-validator/check-content-types.js +181 -0
  409. package/dist/esm/modules/excel/utils/ooxml-validator/check-drawing.js +267 -0
  410. package/dist/esm/modules/excel/utils/ooxml-validator/check-pivot.js +104 -0
  411. package/dist/esm/modules/excel/utils/ooxml-validator/check-relationships.js +184 -0
  412. package/dist/esm/modules/excel/utils/ooxml-validator/check-structure.js +56 -0
  413. package/dist/esm/modules/excel/utils/ooxml-validator/check-styles.js +89 -0
  414. package/dist/esm/modules/excel/utils/ooxml-validator/check-table.js +177 -0
  415. package/dist/esm/modules/excel/utils/ooxml-validator/check-workbook.js +163 -0
  416. package/dist/esm/modules/excel/utils/ooxml-validator/check-worksheet.js +569 -0
  417. package/dist/esm/modules/excel/utils/ooxml-validator/context.js +191 -0
  418. package/dist/esm/modules/excel/utils/ooxml-validator/index.js +102 -0
  419. package/dist/esm/modules/excel/utils/ooxml-validator/path-utils.js +156 -0
  420. package/dist/esm/modules/excel/utils/ooxml-validator/reporter.js +61 -0
  421. package/dist/esm/modules/excel/utils/ooxml-validator/types.js +12 -0
  422. package/dist/esm/modules/excel/utils/ooxml-validator/xml-utils.js +100 -0
  423. package/dist/esm/modules/excel/workbook.browser.js +969 -34
  424. package/dist/esm/modules/excel/workbook.js +48 -0
  425. package/dist/esm/modules/excel/worksheet.js +394 -35
  426. package/dist/esm/modules/excel/xlsx/rel-type.js +41 -1
  427. package/dist/esm/modules/excel/xlsx/xform/book/defined-name-xform.js +11 -2
  428. package/dist/esm/modules/excel/xlsx/xform/book/external-link-xform.js +12 -10
  429. package/dist/esm/modules/excel/xlsx/xform/book/workbook-xform.js +96 -22
  430. package/dist/esm/modules/excel/xlsx/xform/chart/chart-space-xform.js +6000 -0
  431. package/dist/esm/modules/excel/xlsx/xform/comment/threaded-comments-xform.js +213 -0
  432. package/dist/esm/modules/excel/xlsx/xform/core/content-types-xform.js +150 -11
  433. package/dist/esm/modules/excel/xlsx/xform/drawing/absolute-anchor-xform.js +20 -1
  434. package/dist/esm/modules/excel/xlsx/xform/drawing/base-cell-anchor-xform.js +1 -1
  435. package/dist/esm/modules/excel/xlsx/xform/drawing/drawing-xform.js +109 -5
  436. package/dist/esm/modules/excel/xlsx/xform/drawing/graphic-frame-xform.js +225 -0
  437. package/dist/esm/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.js +18 -3
  438. package/dist/esm/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.js +294 -12
  439. package/dist/esm/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.js +32 -6
  440. package/dist/esm/modules/excel/xlsx/xform/sheet/chartsheet-xform.js +441 -0
  441. package/dist/esm/modules/excel/xlsx/xform/sheet/ext-lst-xform.js +51 -2
  442. package/dist/esm/modules/excel/xlsx/xform/sheet/worksheet-xform.js +196 -20
  443. package/dist/esm/modules/excel/xlsx/xform/table/auto-filter-xform.js +16 -1
  444. package/dist/esm/modules/excel/xlsx/xform/table/table-column-xform.js +17 -2
  445. package/dist/esm/modules/excel/xlsx/xform/xsd-values.js +101 -0
  446. package/dist/esm/modules/excel/xlsx/xlsx.browser.js +4422 -78
  447. package/dist/esm/modules/pdf/builder/document-builder.js +507 -2
  448. package/dist/esm/modules/pdf/builder/pdf-editor.js +48 -3
  449. package/dist/esm/modules/pdf/excel-bridge.js +683 -12
  450. package/dist/esm/modules/pdf/font/font-manager.js +39 -0
  451. package/dist/esm/modules/pdf/index.js +3 -1
  452. package/dist/esm/modules/pdf/render/chart-surface.js +200 -0
  453. package/dist/esm/modules/pdf/render/layout-engine.js +436 -56
  454. package/dist/esm/modules/pdf/render/page-renderer.js +169 -28
  455. package/dist/esm/modules/pdf/render/pdf-exporter.js +117 -7
  456. package/dist/esm/modules/pdf/types.js +4 -0
  457. package/dist/esm/modules/pdf/word-bridge.js +304 -0
  458. package/dist/esm/modules/word/constants.js +231 -0
  459. package/dist/esm/modules/word/content-types.js +53 -0
  460. package/dist/esm/modules/word/digital-signatures.js +134 -0
  461. package/dist/esm/modules/word/document.js +1795 -0
  462. package/dist/esm/modules/word/docx-packager.js +822 -0
  463. package/dist/esm/modules/word/docx-reader.js +4929 -0
  464. package/dist/esm/modules/word/encryption.js +274 -0
  465. package/dist/esm/modules/word/errors.js +68 -0
  466. package/dist/esm/modules/word/font-obfuscation.js +83 -0
  467. package/dist/esm/modules/word/html-renderer.js +782 -0
  468. package/dist/esm/modules/word/index.base.js +51 -0
  469. package/dist/esm/modules/word/index.browser.js +4 -0
  470. package/dist/esm/modules/word/index.js +4 -0
  471. package/dist/esm/modules/word/internal-utils.js +54 -0
  472. package/dist/esm/modules/word/relationships.js +56 -0
  473. package/dist/esm/modules/word/types.js +10 -0
  474. package/dist/esm/modules/word/units.js +111 -0
  475. package/dist/esm/modules/word/writers/chart-writer.js +385 -0
  476. package/dist/esm/modules/word/writers/checkbox-writer.js +42 -0
  477. package/dist/esm/modules/word/writers/comment-writer.js +70 -0
  478. package/dist/esm/modules/word/writers/document-writer.js +461 -0
  479. package/dist/esm/modules/word/writers/footnote-writer.js +72 -0
  480. package/dist/esm/modules/word/writers/header-footer-writer.js +129 -0
  481. package/dist/esm/modules/word/writers/image-writer.js +185 -0
  482. package/dist/esm/modules/word/writers/math-writer.js +428 -0
  483. package/dist/esm/modules/word/writers/numbering-writer.js +125 -0
  484. package/dist/esm/modules/word/writers/paragraph-writer.js +516 -0
  485. package/dist/esm/modules/word/writers/parts-writer.js +660 -0
  486. package/dist/esm/modules/word/writers/run-writer.js +649 -0
  487. package/dist/esm/modules/word/writers/section-writer.js +238 -0
  488. package/dist/esm/modules/word/writers/styles-writer.js +242 -0
  489. package/dist/esm/modules/word/writers/table-writer.js +503 -0
  490. package/dist/esm/modules/word/writers/textbox-writer.js +53 -0
  491. package/dist/esm/modules/word/writers/toc-writer.js +79 -0
  492. package/dist/esm/modules/xml/encode.js +157 -11
  493. package/dist/iife/excelts.iife.js +11789 -687
  494. package/dist/iife/excelts.iife.js.map +1 -1
  495. package/dist/iife/excelts.iife.min.js +52 -44
  496. package/dist/types/index.browser.d.ts +8 -5
  497. package/dist/types/index.d.ts +4 -2
  498. package/dist/types/modules/excel/chart/cache-populator.d.ts +49 -0
  499. package/dist/types/modules/excel/chart/chart-api.d.ts +92 -0
  500. package/dist/types/modules/excel/chart/chart-builder.d.ts +48 -0
  501. package/dist/types/modules/excel/chart/chart-ex-builder.d.ts +36 -0
  502. package/dist/types/modules/excel/chart/chart-ex-parser.d.ts +8 -0
  503. package/dist/types/modules/excel/chart/chart-ex-renderer.d.ts +187 -0
  504. package/dist/types/modules/excel/chart/chart-ex-types.d.ts +531 -0
  505. package/dist/types/modules/excel/chart/chart-images.d.ts +78 -0
  506. package/dist/types/modules/excel/chart/chart-presets.d.ts +392 -0
  507. package/dist/types/modules/excel/chart/chart-renderer.d.ts +550 -0
  508. package/dist/types/modules/excel/chart/chart-sidecar.d.ts +21 -0
  509. package/dist/types/modules/excel/chart/chart-utils.d.ts +306 -0
  510. package/dist/types/modules/excel/chart/chart.d.ts +504 -0
  511. package/dist/types/modules/excel/chart/glyph-rasterizer.d.ts +62 -0
  512. package/dist/types/modules/excel/chart/index.d.ts +54 -0
  513. package/dist/types/modules/excel/chart/install.d.ts +44 -0
  514. package/dist/types/modules/excel/chart/shape-properties.d.ts +156 -0
  515. package/dist/types/modules/excel/chart/stroke-font.d.ts +36 -0
  516. package/dist/types/modules/excel/chart/topojson.d.ts +98 -0
  517. package/dist/types/modules/excel/chart/types.d.ts +2559 -0
  518. package/dist/types/modules/excel/chart-host-registry.d.ts +157 -0
  519. package/dist/types/modules/excel/chartsheet.d.ts +102 -0
  520. package/dist/types/modules/excel/defined-names.d.ts +35 -0
  521. package/dist/types/modules/excel/errors.d.ts +6 -0
  522. package/dist/types/modules/excel/form-control.d.ts +6 -0
  523. package/dist/types/modules/excel/pivot-chart.d.ts +7 -0
  524. package/dist/types/modules/excel/pivot-table.d.ts +55 -0
  525. package/dist/types/modules/excel/sparkline/index.d.ts +7 -0
  526. package/dist/types/modules/excel/sparkline/sparkline.d.ts +206 -0
  527. package/dist/types/modules/excel/types.d.ts +72 -0
  528. package/dist/types/modules/excel/utils/address.d.ts +18 -0
  529. package/dist/types/modules/excel/utils/guid.d.ts +15 -0
  530. package/dist/types/modules/excel/utils/ooxml-paths.d.ts +74 -0
  531. package/dist/types/modules/excel/utils/ooxml-validator/check-chart-sidecar.d.ts +35 -0
  532. package/dist/types/modules/excel/utils/ooxml-validator/check-chart.d.ts +32 -0
  533. package/dist/types/modules/excel/utils/ooxml-validator/check-chartsheet.d.ts +9 -0
  534. package/dist/types/modules/excel/utils/ooxml-validator/check-content-types.d.ts +16 -0
  535. package/dist/types/modules/excel/utils/ooxml-validator/check-drawing.d.ts +34 -0
  536. package/dist/types/modules/excel/utils/ooxml-validator/check-pivot.d.ts +14 -0
  537. package/dist/types/modules/excel/utils/ooxml-validator/check-relationships.d.ts +18 -0
  538. package/dist/types/modules/excel/utils/ooxml-validator/check-structure.d.ts +21 -0
  539. package/dist/types/modules/excel/utils/ooxml-validator/check-styles.d.ts +15 -0
  540. package/dist/types/modules/excel/utils/ooxml-validator/check-table.d.ts +31 -0
  541. package/dist/types/modules/excel/utils/ooxml-validator/check-workbook.d.ts +19 -0
  542. package/dist/types/modules/excel/utils/ooxml-validator/check-worksheet.d.ts +25 -0
  543. package/dist/types/modules/excel/utils/ooxml-validator/context.d.ts +85 -0
  544. package/dist/types/modules/excel/utils/ooxml-validator/index.d.ts +31 -0
  545. package/dist/types/modules/excel/utils/ooxml-validator/path-utils.d.ts +67 -0
  546. package/dist/types/modules/excel/utils/ooxml-validator/reporter.d.ts +41 -0
  547. package/dist/types/modules/excel/utils/ooxml-validator/types.d.ts +109 -0
  548. package/dist/types/modules/excel/utils/ooxml-validator/xml-utils.d.ts +38 -0
  549. package/dist/types/modules/excel/workbook.browser.d.ts +248 -30
  550. package/dist/types/modules/excel/workbook.d.ts +43 -0
  551. package/dist/types/modules/excel/worksheet.d.ts +157 -3
  552. package/dist/types/modules/excel/xlsx/rel-type.d.ts +40 -0
  553. package/dist/types/modules/excel/xlsx/xform/book/defined-name-xform.d.ts +1 -0
  554. package/dist/types/modules/excel/xlsx/xform/chart/chart-space-xform.d.ts +353 -0
  555. package/dist/types/modules/excel/xlsx/xform/comment/threaded-comments-xform.d.ts +60 -0
  556. package/dist/types/modules/excel/xlsx/xform/drawing/drawing-xform.d.ts +30 -0
  557. package/dist/types/modules/excel/xlsx/xform/drawing/graphic-frame-xform.d.ts +54 -0
  558. package/dist/types/modules/excel/xlsx/xform/drawing/one-cell-anchor-xform.d.ts +3 -1
  559. package/dist/types/modules/excel/xlsx/xform/drawing/two-cell-anchor-xform.d.ts +46 -0
  560. package/dist/types/modules/excel/xlsx/xform/pivot-table/pivot-table-xform.d.ts +13 -2
  561. package/dist/types/modules/excel/xlsx/xform/sheet/chartsheet-xform.d.ts +185 -0
  562. package/dist/types/modules/excel/xlsx/xform/sheet/ext-lst-xform.d.ts +1 -0
  563. package/dist/types/modules/excel/xlsx/xform/xsd-values.d.ts +63 -0
  564. package/dist/types/modules/excel/xlsx/xlsx.browser.d.ts +115 -21
  565. package/dist/types/modules/pdf/builder/document-builder.d.ts +74 -0
  566. package/dist/types/modules/pdf/excel-bridge.d.ts +69 -0
  567. package/dist/types/modules/pdf/font/font-manager.d.ts +25 -0
  568. package/dist/types/modules/pdf/index.d.ts +5 -2
  569. package/dist/types/modules/pdf/render/chart-surface.d.ts +33 -0
  570. package/dist/types/modules/pdf/render/layout-engine.d.ts +22 -1
  571. package/dist/types/modules/pdf/types.d.ts +227 -23
  572. package/dist/types/modules/pdf/word-bridge.d.ts +47 -0
  573. package/dist/types/modules/word/constants.d.ts +179 -0
  574. package/dist/types/modules/word/content-types.d.ts +27 -0
  575. package/dist/types/modules/word/digital-signatures.d.ts +87 -0
  576. package/dist/types/modules/word/document.d.ts +728 -0
  577. package/dist/types/modules/word/docx-packager.d.ts +14 -0
  578. package/dist/types/modules/word/docx-reader.d.ts +11 -0
  579. package/dist/types/modules/word/encryption.d.ts +102 -0
  580. package/dist/types/modules/word/errors.d.ts +49 -0
  581. package/dist/types/modules/word/font-obfuscation.d.ts +31 -0
  582. package/dist/types/modules/word/html-renderer.d.ts +38 -0
  583. package/dist/types/modules/word/index.base.d.ts +19 -0
  584. package/dist/types/modules/word/index.browser.d.ts +4 -0
  585. package/dist/types/modules/word/index.d.ts +4 -0
  586. package/dist/types/modules/word/internal-utils.d.ts +23 -0
  587. package/dist/types/modules/word/relationships.d.ts +31 -0
  588. package/dist/types/modules/word/types.d.ts +2325 -0
  589. package/dist/types/modules/word/units.d.ts +49 -0
  590. package/dist/types/modules/word/writers/chart-writer.d.ts +10 -0
  591. package/dist/types/modules/word/writers/checkbox-writer.d.ts +9 -0
  592. package/dist/types/modules/word/writers/comment-writer.d.ts +15 -0
  593. package/dist/types/modules/word/writers/document-writer.d.ts +16 -0
  594. package/dist/types/modules/word/writers/footnote-writer.d.ts +11 -0
  595. package/dist/types/modules/word/writers/header-footer-writer.d.ts +13 -0
  596. package/dist/types/modules/word/writers/image-writer.d.ts +10 -0
  597. package/dist/types/modules/word/writers/math-writer.d.ts +9 -0
  598. package/dist/types/modules/word/writers/numbering-writer.d.ts +10 -0
  599. package/dist/types/modules/word/writers/paragraph-writer.d.ts +13 -0
  600. package/dist/types/modules/word/writers/parts-writer.d.ts +26 -0
  601. package/dist/types/modules/word/writers/run-writer.d.ts +15 -0
  602. package/dist/types/modules/word/writers/section-writer.d.ts +10 -0
  603. package/dist/types/modules/word/writers/styles-writer.d.ts +10 -0
  604. package/dist/types/modules/word/writers/table-writer.d.ts +10 -0
  605. package/dist/types/modules/word/writers/textbox-writer.d.ts +9 -0
  606. package/dist/types/modules/word/writers/toc-writer.d.ts +9 -0
  607. package/dist/types/modules/xml/encode.d.ts +56 -7
  608. package/package.json +29 -11
  609. package/dist/browser/modules/excel/utils/ooxml-validator.d.ts +0 -48
  610. package/dist/browser/modules/excel/utils/ooxml-validator.js +0 -493
  611. package/dist/browser/modules/excel/utils/passthrough-manager.d.ts +0 -77
  612. package/dist/browser/modules/excel/utils/passthrough-manager.js +0 -129
  613. package/dist/cjs/modules/excel/utils/ooxml-validator.js +0 -499
  614. package/dist/cjs/modules/excel/utils/passthrough-manager.js +0 -133
  615. package/dist/esm/modules/excel/utils/ooxml-validator.js +0 -493
  616. package/dist/esm/modules/excel/utils/passthrough-manager.js +0 -129
  617. package/dist/types/modules/excel/utils/ooxml-validator.d.ts +0 -48
  618. package/dist/types/modules/excel/utils/passthrough-manager.d.ts +0 -77
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Path helpers shared across all validator checkers.
3
+ *
4
+ * All paths are handled as **forward-slash POSIX strings** because that is
5
+ * how OPC part names are defined. We never touch the host's path separator.
6
+ */
7
+ /**
8
+ * Strip a single leading `/` if present. OPC `PartName` values start with
9
+ * `/` by spec, but zip entries do not.
10
+ */
11
+ export declare function stripLeadingSlash(p: string): string;
12
+ /** `.xml`, `.rels`, or `.vml` — the payloads we parse as XML. */
13
+ export declare function isXmlLike(pathName: string): boolean;
14
+ /**
15
+ * Directory in which a relationships part's **source** part lives. OPC
16
+ * resolves rel Targets relative to the source part's directory, NOT the
17
+ * `.rels` file's directory. Examples:
18
+ *
19
+ * | .rels path | source dir |
20
+ * |-----------------------------------------|---------------------|
21
+ * | `_rels/.rels` | `` |
22
+ * | `xl/_rels/workbook.xml.rels` | `xl` |
23
+ * | `xl/worksheets/_rels/sheet1.xml.rels` | `xl/worksheets` |
24
+ */
25
+ export declare function getRelsSourceDir(relsPath: string): string;
26
+ /**
27
+ * Basename without directory, e.g. `xl/foo/bar.xml` → `bar.xml`.
28
+ */
29
+ export declare function posixBasename(p: string): string;
30
+ /** Extension without the leading dot, lowercase. `""` when missing. */
31
+ export declare function getExtension(p: string): string;
32
+ /**
33
+ * Resolve a relationship Target against a .rels path. Handles absolute
34
+ * targets starting with `/` (relative to package root), `../` traversal,
35
+ * `./`, and plain relative segments. Never returns a leading slash.
36
+ *
37
+ * We do NOT use `node:path` so this module is usable in browsers.
38
+ */
39
+ export declare function resolveRelTarget(relsPath: string, target: string): string;
40
+ /**
41
+ * `false` when a resolved rel target escapes the package root. Targets
42
+ * that escape are malicious or accidentally produced by broken
43
+ * serialisers and always indicate a corrupt package.
44
+ */
45
+ export declare function isSafeResolvedPath(resolved: string): boolean;
46
+ /**
47
+ * Derive the .rels path for a given source part. Symmetric with
48
+ * `getRelsSourceDir`. Examples:
49
+ *
50
+ * | source part | rels path |
51
+ * |--------------------------------|----------------------------------------|
52
+ * | `xl/workbook.xml` | `xl/_rels/workbook.xml.rels` |
53
+ * | `xl/worksheets/sheet1.xml` | `xl/worksheets/_rels/sheet1.xml.rels` |
54
+ */
55
+ export declare function relsPathForPart(partPath: string): string;
56
+ /**
57
+ * Inverse of {@link relsPathForPart}: source part for a given rels file.
58
+ * Returns undefined for the root rels (which has no conventional source).
59
+ */
60
+ export declare function sourcePartForRels(relsPath: string): string | undefined;
61
+ /**
62
+ * Part name satisfies OPC PartName grammar — not empty, uses only safe
63
+ * characters, does not end with `/` and does not contain `.` or `..`
64
+ * segments. We do not validate the full grammar but cover the cases that
65
+ * break Excel in practice.
66
+ */
67
+ export declare function isLegalPartName(partName: string): boolean;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Problem reporter shared by all checkers.
3
+ *
4
+ * Two responsibilities:
5
+ * 1. Filter warnings when `includeWarnings` is `false`.
6
+ * 2. Short-circuit after `maxProblems` is reached.
7
+ *
8
+ * The reporter does not sort or dedupe — checkers are expected to emit at
9
+ * most one problem per logical issue. Callers get problems in encounter
10
+ * order, which is stable across runs for the same input.
11
+ */
12
+ import type { OoxmlProblemKind, OoxmlProblemSeverity, OoxmlValidationProblem } from "./types.js";
13
+ export interface ReporterOptions {
14
+ maxProblems?: number;
15
+ includeWarnings?: boolean;
16
+ }
17
+ export declare class Reporter {
18
+ readonly problems: OoxmlValidationProblem[];
19
+ private errorCount;
20
+ private readonly maxProblems?;
21
+ private readonly includeWarnings;
22
+ constructor(options?: ReporterOptions);
23
+ /**
24
+ * `true` once the configured `maxProblems` cap is reached. Checkers
25
+ * should consult this at the top of their per-part loops to avoid
26
+ * doing unnecessary work.
27
+ */
28
+ get capped(): boolean;
29
+ get hasErrors(): boolean;
30
+ /** Report an error-severity problem. */
31
+ error(kind: OoxmlProblemKind, message: string, file?: string): void;
32
+ /** Report a warning-severity problem. Only recorded if includeWarnings. */
33
+ warning(kind: OoxmlProblemKind, message: string, file?: string): void;
34
+ private push;
35
+ }
36
+ /**
37
+ * Convenience alias for the legacy `severity` argument used in the old
38
+ * flat API. Kept for internal checker code that wants to produce a
39
+ * problem with a runtime-chosen severity.
40
+ */
41
+ export declare function reportWithSeverity(reporter: Reporter, severity: OoxmlProblemSeverity, kind: OoxmlProblemKind, message: string, file?: string): void;
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Public types for the OOXML validator.
3
+ *
4
+ * The validator's job is to detect xlsx packages that Excel will refuse to
5
+ * open (or silently repair). Each check emits zero or more `Problem` entries
6
+ * tagged by `kind`; callers can branch on `kind` for structured handling.
7
+ *
8
+ * Problem kinds are grouped by subsystem to make ad-hoc extension easy.
9
+ * New kinds MUST be added to the union below so consumers can enumerate them
10
+ * at the type level. Removing or renaming kinds is a breaking change.
11
+ */
12
+ export type PackageStructureKind = "missing-part" | "xml-malformed" | "part-name-invalid";
13
+ export type ContentTypesKind = "content-types-missing" | "content-types-malformed" | "content-types-missing-default" | "content-types-missing-for-part" | "content-types-duplicate-override" | "content-types-wrong-for-part";
14
+ export type RelationshipsKind = "root-rels-missing-officeDocument" | "rels-malformed" | "rels-missing-target" | "rels-duplicate-id" | "rels-empty-target" | "rels-missing-id-attr" | "rels-missing-type-attr" | "rels-invalid-target-path" | "rels-source-missing" | "rels-type-target-mismatch";
15
+ export type WorkbookKind = "workbook-sheet-missing-rel" | "workbook-sheet-wrong-rel-type" | "workbook-duplicate-sheetId" | "workbook-duplicate-sheet-rid" | "workbook-sheet-missing-name" | "workbook-sheet-name-too-long" | "workbook-sheet-name-invalid-chars" | "workbook-sheet-name-duplicate" | "workbook-child-order";
16
+ export type WorksheetKind = "sheet-missing-rels" | "sheet-child-out-of-order" | "sheet-legacyDrawing-after-controls" | "sheet-controls-missing-drawing" | "sheet-control-missing-rel" | "sheet-control-wrong-rel-type" | "sheet-legacyDrawing-missing-rel" | "sheet-legacyDrawing-wrong-rel-type" | "sheet-drawing-missing-rel" | "sheet-drawing-wrong-rel-type" | "sheet-comments-missing-rel" | "sheet-comments-wrong-rel-type" | "sheet-hyperlink-missing-rel" | "sheet-hyperlink-wrong-rel-type" | "sheet-tablePart-missing-rel" | "sheet-tablePart-wrong-rel-type" | "sheet-cell-ref-missing" | "sheet-cell-ref-invalid" | "sheet-cell-ref-row-mismatch" | "sheet-cell-ref-out-of-bounds" | "sheet-cell-style-index-oob" | "sheet-cell-sst-index-oob" | "sheet-merge-invalid-range" | "sheet-merge-overlap" | "sheet-row-index-out-of-bounds" | "sheet-sharedFormula-master-missing" | "sheet-sharedFormula-duplicate-master";
17
+ export type StylesKind = "styles-malformed" | "styles-numFmt-missing-for-xf" | "styles-font-index-oob" | "styles-fill-index-oob" | "styles-border-index-oob";
18
+ export type TableKind = "table-filterColumn-redundant-per-column" | "table-totalsRowFormula-with-builtin-function" | "table-autoFilter-covers-totalsRow";
19
+ export type ChartKind = "chart-missing-chart" | "chart-missing-plotArea" | "chart-child-out-of-order" | "chart-missing-required-child" | "chart-wrong-child-count" | "chart-invalid-enum-value" | "chart-value-out-of-range" | "chart-forbidden-child" | "chart-duplicate-errBars-direction" | "chart-duplicate-series-idx" | "chart-duplicate-series-order" | "chart-pt-idx-out-of-range" | "chart-axid-unresolved" | "chart-theme-missing-schemeClr-slot" | "chart-f-invalid-syntax" | "chart-f-undefined-name" | "chartEx-missing-chart" | "chartEx-missing-plotArea" | "chartEx-missing-series" | "chartEx-series-missing-layoutId" | "chartEx-series-missing-data-id" | "chartEx-series-missing-axis-id" | "chartEx-externalData-missing-rel" | "chartEx-series-too-many-dataId" | "chartEx-typed-element-text-form" | "chartEx-invalid-auto-element" | "chartEx-paretoLine-in-layoutPr" | "chartEx-title-direct-layout" | "chartEx-axis-missing-pos-and-type" | "chartEx-f-uses-direct-range-not-defined-name" | "chartEx-waterfall-missing-subtotals" | "chartEx-chartStyle-stub-form" | "chartEx-chartColorStyle-stub-form";
20
+ export type DrawingKind = "drawing-graphicFrame-missing-chart" | "drawing-anchor-missing" | "drawing-anchor-invalid-coords" | "drawing-chartEx-missing-alternateContent-wrap" | "drawing-chartEx-alternateContent-empty-fallback" | "drawing-chartEx-alternateContent-outer-wrap" | "drawing-chartEx-missing-creationId";
21
+ export type ChartsheetKind = "chartsheet-missing-drawing";
22
+ export type PivotKind = "pivot-missing-cacheId" | "pivot-cacheId-not-in-workbook" | "pivot-cacheRecords-missing";
23
+ /**
24
+ * All problem kinds emitted by the validator. The historical legacy kind
25
+ * `sheet-legacyDrawing-after-controls` is preserved for backwards
26
+ * compatibility — new ordering violations use the generic
27
+ * `sheet-child-out-of-order` kind.
28
+ */
29
+ export type OoxmlProblemKind = PackageStructureKind | ContentTypesKind | RelationshipsKind | WorkbookKind | WorksheetKind | StylesKind | TableKind | ChartKind | DrawingKind | ChartsheetKind | PivotKind;
30
+ /**
31
+ * Historical alias: the old public API exposed a separate union for the
32
+ * single ordering check. We preserve the name so downstream type-level
33
+ * references keep compiling.
34
+ */
35
+ export type OoxmlOrderingProblemKind = "sheet-legacyDrawing-after-controls";
36
+ /**
37
+ * `error` — Excel will refuse the file or show a repair prompt.
38
+ * `warning` — Likely to work but deviates from OPC/OOXML invariants; Excel
39
+ * may silently recover.
40
+ */
41
+ export type OoxmlProblemSeverity = "error" | "warning";
42
+ export interface OoxmlValidationProblem {
43
+ kind: OoxmlProblemKind;
44
+ severity: OoxmlProblemSeverity;
45
+ /** The file this problem is reported for, if any. */
46
+ file?: string;
47
+ /** Human-readable description. Stable enough for snapshot tests. */
48
+ message: string;
49
+ }
50
+ /**
51
+ * Historical alias retained for callers that used the narrower type before
52
+ * severity was added. The shape is identical to `OoxmlValidationProblem`.
53
+ */
54
+ export type OoxmlOrderingValidationProblem = OoxmlValidationProblem;
55
+ export interface OoxmlValidationStats {
56
+ entryCount: number;
57
+ xmlLikeCount: number;
58
+ relsCount: number;
59
+ }
60
+ export interface OoxmlValidationReport {
61
+ /** `true` when there are no `error`-severity problems. Warnings do not fail. */
62
+ ok: boolean;
63
+ problems: OoxmlValidationProblem[];
64
+ stats: OoxmlValidationStats;
65
+ }
66
+ export interface OoxmlValidateOptions {
67
+ /**
68
+ * Check every XML-like entry (.xml / .rels / .vml) for well-formedness.
69
+ * Default: true.
70
+ */
71
+ checkXmlWellFormed?: boolean;
72
+ /**
73
+ * Validate relationship targets exist (TargetMode=External is skipped).
74
+ * Default: true.
75
+ */
76
+ checkRelationshipTargets?: boolean;
77
+ /**
78
+ * Validate the content types table against package parts.
79
+ * Default: true.
80
+ */
81
+ checkContentTypesOverrides?: boolean;
82
+ /**
83
+ * Validate worksheet r:id wiring (controls / drawing / comments / etc.)
84
+ * and structural invariants (child element order, cell r= consistency,
85
+ * merge overlaps, style index bounds).
86
+ * Default: true.
87
+ */
88
+ checkWorksheetControlWiring?: boolean;
89
+ /**
90
+ * Validate chart / chartEx / drawing / chartsheet / pivot internal
91
+ * structure. Default: true.
92
+ */
93
+ checkChartStructure?: boolean;
94
+ /**
95
+ * Validate styles.xml internal integrity (numFmt/font/fill/border
96
+ * back-references from xf records). Default: true.
97
+ */
98
+ checkStylesIntegrity?: boolean;
99
+ /**
100
+ * Stop after this many problems across all checks. Useful for large
101
+ * packages where the first few problems imply the rest.
102
+ */
103
+ maxProblems?: number;
104
+ /**
105
+ * Include warnings in the output. When `false` (default), warnings are
106
+ * silently dropped. Errors are always reported regardless of this flag.
107
+ */
108
+ includeWarnings?: boolean;
109
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * XML helpers that tolerate namespace prefixes.
3
+ *
4
+ * OOXML serialisers are allowed to write `<drawing>` or `<x:drawing>` —
5
+ * both are legal in the same schema. All validator checks must therefore
6
+ * match on the **local name**, not the prefixed name. These helpers also
7
+ * tolerate namespaced attributes like `r:id` vs `ns0:id`.
8
+ */
9
+ import { findChildren } from "../../../xml/dom.js";
10
+ import type { XmlDocument, XmlElement } from "../../../xml/types.js";
11
+ /**
12
+ * Extract the local name from a tag name, i.e. the part after the last `:`.
13
+ * For `drawing` returns `drawing`; for `x:drawing` returns `drawing`.
14
+ */
15
+ export declare function localName(name: string): string;
16
+ /** Namespace-insensitive element-name equality. */
17
+ export declare function matchesLocal(name: string, target: string): boolean;
18
+ /** Find first child element with matching **local** name. */
19
+ export declare function findChildLocal(el: XmlElement, local: string): XmlElement | undefined;
20
+ /** Find all child elements with matching **local** name. */
21
+ export declare function findChildrenLocal(el: XmlElement, local: string): XmlElement[];
22
+ /** `true` when any descendant (or self) has matching local name. */
23
+ export declare function hasDescendantLocal(root: XmlElement, local: string): boolean;
24
+ /** Collect all descendants (including self) matching local name. */
25
+ export declare function collectDescendantsLocal(root: XmlElement, local: string): XmlElement[];
26
+ /**
27
+ * Read an attribute by local name. The OOXML convention is to use
28
+ * namespaced attributes like `r:id` but some serialisers strip or
29
+ * renumber the prefix. We match by suffix `:<local>` or exact `local`.
30
+ */
31
+ export declare function attrByLocalName(el: XmlElement, local: string): string | undefined;
32
+ /**
33
+ * Parse an XML string into a DOM tree. Returns `undefined` and records the
34
+ * failure as a malformed XML problem via `onMalformed`. We don't throw
35
+ * because validators must continue after a parse failure.
36
+ */
37
+ export declare function tryParseXml(xml: string, onMalformed: (err: Error) => void): XmlDocument | undefined;
38
+ export { findChildren };
@@ -10,16 +10,18 @@
10
10
  * - streaming: createStreamWriter/createStreamReader for large files
11
11
  */
12
12
  import type { CsvParseOptions, CsvFormatOptions } from "../csv/types.js";
13
+ import type { ChartEntry, ChartExEntry } from "./chart/chart.js";
14
+ import { Chartsheet, type AddChartsheetOptions, type AddPivotChartsheetOptions } from "./chartsheet.js";
13
15
  import { DefinedNames, type DefinedNameModel } from "./defined-names.js";
14
16
  import type { PivotTable } from "./pivot-table.js";
15
- import { WorkbookReader, type WorkbookReaderOptions } from "./stream/workbook-reader.js";
16
- import { WorkbookWriter, type WorkbookWriterOptions } from "./stream/workbook-writer.js";
17
- import type { AddWorksheetOptions, CalculationProperties, CellValue, Font, ImageData, WorkbookProperties, WorkbookProtection, WorkbookView, Buffer as ExcelBuffer } from "./types.js";
17
+ import { WorkbookReader, type WorkbookReaderOptions, type CommonInput } from "./stream/workbook-reader.browser.js";
18
+ import { WorkbookWriter, type WorkbookWriterOptions } from "./stream/workbook-writer.browser.js";
19
+ import type { AddWorksheetOptions, CalculationProperties, CellValue, Font, ImageData, ThreadedCommentPerson, WorkbookProperties, WorkbookProtection, WorkbookView, Buffer as ExcelBuffer } from "./types.js";
18
20
  import { Worksheet, type WorksheetModel } from "./worksheet.js";
19
- import { XLSX } from "./xlsx/xlsx.js";
21
+ import type { ChartsheetModel } from "./xlsx/xform/sheet/chartsheet-xform.js";
22
+ import { XLSX } from "./xlsx/xlsx.browser.js";
20
23
  import type { SyntaxProbe } from "../formula/default-syntax-probe.js";
21
24
  import type { MarkdownOptions } from "../markdown/types.js";
22
- import type { Readable } from "../stream/index.js";
23
25
  import type { IReadable, IWritable } from "../stream/types.js";
24
26
  import { type DateFormat } from "../../utils/datetime.js";
25
27
  /** Internal media type - more flexible than public Media type */
@@ -43,6 +45,16 @@ export interface WorkbookModel {
43
45
  worksheets: WorksheetModel[];
44
46
  sheets?: WorksheetModel[];
45
47
  definedNames: DefinedNameModel[];
48
+ /**
49
+ * Live `DefinedNames` instance — used by the write-time chartEx
50
+ * transform (`prepareChartExSidecars`) which registers hidden
51
+ * `_xlchart.vN.M` defined names on the fly and needs an object
52
+ * it can mutate in place. The serialised `definedNames` array
53
+ * above is re-materialised from this instance after the
54
+ * transform runs. Optional because the model is also used for
55
+ * input paths that don't carry the live instance.
56
+ */
57
+ definedNamesInstance?: unknown;
46
58
  views: WorkbookView[];
47
59
  company: string;
48
60
  manager: string;
@@ -60,12 +72,41 @@ export interface WorkbookModel {
60
72
  /** Loaded pivot tables from file - used during reconciliation */
61
73
  loadedPivotTables?: PivotTable[];
62
74
  calcProperties: Partial<CalculationProperties>;
63
- /** Passthrough files (charts, etc.) preserved for round-trip */
64
- passthrough?: Record<string, Uint8Array>;
65
- /** Raw drawing XML data for passthrough (when drawing contains chart references) */
66
- rawDrawings?: Record<string, Uint8Array>;
67
75
  /** Default font preserved from the original file for round-trip fidelity */
68
76
  defaultFont?: Partial<Font>;
77
+ /** Chart entries indexed by 1-based chart number */
78
+ chartEntries?: Record<number, ChartEntry>;
79
+ /** Chart rels indexed by chart number — preserved for round-trip */
80
+ chartRels?: Record<number, any[]>;
81
+ /** Chart style XML raw bytes indexed by style number — preserved for round-trip */
82
+ chartStyles?: Record<number, Uint8Array>;
83
+ /** Chart colors XML raw bytes indexed by colors number — preserved for round-trip */
84
+ chartColors?: Record<number, Uint8Array>;
85
+ chartExStyles?: Record<number, Uint8Array>;
86
+ chartExColors?: Record<number, Uint8Array>;
87
+ /** ChartEx raw bytes (Office 2016+ extended charts) indexed by chartEx number */
88
+ chartExEntries?: Record<number, Uint8Array>;
89
+ /** ChartEx rels indexed by chartEx number */
90
+ chartExRels?: Record<number, any[]>;
91
+ /** Structured chartEx entries (loaded or programmatically built) indexed by chartEx number */
92
+ chartExStructuredEntries?: Record<number, ChartExEntry>;
93
+ /** Chartsheets parsed from the XLSX file — preserved for round-trip */
94
+ chartsheets?: any[];
95
+ /**
96
+ * Office 365 threaded-comment person directory, hydrated from
97
+ * `xl/persons/person.xml` on load and serialised back on save when
98
+ * non-empty. See {@link Workbook.persons}.
99
+ */
100
+ persons?: ThreadedCommentPerson[];
101
+ /**
102
+ * Raw-passthrough slicer parts keyed by zip-relative path. Excelts
103
+ * does not structurally model slicers yet but preserves the bytes on
104
+ * round-trip so dashboards continue to work.
105
+ */
106
+ slicerParts?: Record<string, Uint8Array>;
107
+ slicerCacheParts?: Record<string, Uint8Array>;
108
+ timelineParts?: Record<string, Uint8Array>;
109
+ timelineCacheParts?: Record<string, Uint8Array>;
69
110
  /**
70
111
  * External workbook references in declaration order. Matches the on-disk
71
112
  * `[N]Sheet!Ref` indexing (1-based). Empty or undefined when the workbook
@@ -116,7 +157,7 @@ export interface ExternalLinkModel {
116
157
  * path relative to the current workbook: `"测试.xlsx"`, `"data/ref.xlsx"`.
117
158
  * Office resolves bare relative paths from the current workbook's
118
159
  * directory — *that* is the fix for the "Office goes to the Documents
119
- * folder" problem described in exceljs#3039.
160
+ * folder" problem with external links.
120
161
  *
121
162
  * Absolute `file:///` or `http(s)://` URIs are accepted and written
122
163
  * through unchanged.
@@ -260,10 +301,6 @@ declare class Workbook {
260
301
  protected _worksheets: Worksheet[];
261
302
  protected _definedNames: DefinedNames;
262
303
  protected _themes?: unknown;
263
- /** Passthrough files (charts, etc.) preserved for round-trip */
264
- protected _passthrough: Record<string, Uint8Array>;
265
- /** Raw drawing XML data for passthrough (when drawing contains chart references) */
266
- protected _rawDrawings: Record<string, Uint8Array>;
267
304
  /** Default font preserved from original file for round-trip fidelity */
268
305
  protected _defaultFont?: Partial<Font>;
269
306
  /**
@@ -281,6 +318,53 @@ declare class Workbook {
281
318
  protected _writerExternalLinkCache: Map<string, ExternalLinkModel>;
282
319
  /** Global registry of table names (lowercase) for cross-worksheet uniqueness checks. */
283
320
  readonly _tableNames: Set<string>;
321
+ /** Chart entries indexed by 1-based chart number */
322
+ protected _chartEntries: Record<number, ChartEntry>;
323
+ /** Chart rels indexed by chart number — preserved for round-trip */
324
+ protected _chartRels: Record<number, any[]>;
325
+ /** Chart style XML raw bytes indexed by style number — preserved for round-trip */
326
+ protected _chartStyles: Record<number, Uint8Array>;
327
+ /** Chart colors XML raw bytes indexed by colors number — preserved for round-trip */
328
+ protected _chartColors: Record<number, Uint8Array>;
329
+ protected _chartExStyles: Record<number, Uint8Array>;
330
+ protected _chartExColors: Record<number, Uint8Array>;
331
+ /** ChartEx raw bytes (Office 2016+ extended charts) indexed by chartEx number */
332
+ protected _chartExEntries: Record<number, Uint8Array>;
333
+ /** ChartEx rels indexed by chartEx number */
334
+ protected _chartExRels: Record<number, any[]>;
335
+ /** ChartEx structured entries (loaded or built programmatically via addChartEx). */
336
+ protected _chartExStructuredEntries: Record<number, ChartExEntry>;
337
+ /** Chartsheets parsed from the XLSX file — preserved for round-trip */
338
+ protected _chartsheets: ChartsheetModel[];
339
+ /**
340
+ * Office 365 threaded-comment person directory (`xl/persons/person.xml`).
341
+ * Referenced by per-sheet `threadedComment/@personId`. Hydrated on
342
+ * load, preserved across save. Programmatic comments that don't supply
343
+ * a personId get auto-registered against this list.
344
+ */
345
+ protected _persons: ThreadedCommentPerson[];
346
+ /**
347
+ * Raw XML passthrough for Office 2010+ slicers and timelines.
348
+ *
349
+ * Structured creation of these controls is out of scope for the
350
+ * current release — the OOXML surface is large (four coordinated
351
+ * part families: `xl/slicers`, `xl/slicerCaches`, `xl/timelines`,
352
+ * `xl/timelineCaches`, plus sheet-level extensions and workbook-
353
+ * level cache list entries). The passthrough here prevents silent
354
+ * data loss when an Excel dashboard with slicers or timelines
355
+ * travels through excelts: we capture every part verbatim on read
356
+ * and re-emit them on write, along with their rels and Content
357
+ * Types overrides.
358
+ *
359
+ * The map key is the full zip-relative path (e.g.
360
+ * `"xl/slicers/slicer1.xml"`), the value is the exact bytes we
361
+ * found in the input. Loaders that construct a workbook
362
+ * programmatically never touch these maps.
363
+ */
364
+ protected _slicerParts: Record<string, Uint8Array>;
365
+ protected _slicerCacheParts: Record<string, Uint8Array>;
366
+ protected _timelineParts: Record<string, Uint8Array>;
367
+ protected _timelineCacheParts: Record<string, Uint8Array>;
284
368
  private _xlsx?;
285
369
  /**
286
370
  * @param options Optional construction options.
@@ -494,17 +578,14 @@ declare class Workbook {
494
578
  * Create a streaming workbook writer for large files.
495
579
  * This is more memory-efficient than using Workbook for large datasets.
496
580
  *
497
- * @param options - Options for the workbook writer
498
- * - Node.js: can use { filename } or { stream }
499
- * - Browser: must use { stream }
500
- * @returns A new WorkbookWriter instance
581
+ * File-path output (`{ filename }`) is a Node.js-only feature and is
582
+ * exposed by the Node `Workbook` subclass, which overrides this
583
+ * factory to return the Node `WorkbookWriter`. This browser base
584
+ * only accepts `{ stream }`.
501
585
  *
502
586
  * @example
503
587
  * ```ts
504
- * // Node.js with filename
505
- * const writer = Workbook.createStreamWriter({ filename: "large-file.xlsx" });
506
- *
507
- * // Browser or Node.js with stream
588
+ * // Browser (or Node.js with an explicit stream)
508
589
  * const writer = Workbook.createStreamWriter({ stream: writableStream });
509
590
  *
510
591
  * const sheet = writer.addWorksheet("Sheet1");
@@ -519,16 +600,15 @@ declare class Workbook {
519
600
  * Create a streaming workbook reader for large files.
520
601
  * This is more memory-efficient than using Workbook.xlsx.readFile for large datasets.
521
602
  *
522
- * @param input - File path (Node.js only) or readable stream
523
- * @param options - Options for the workbook reader
524
- * @returns A new WorkbookReader instance
603
+ * File-path input (`string`) is a Node.js-only feature and is exposed
604
+ * by the Node `Workbook` subclass, which overrides this factory to
605
+ * return the Node `WorkbookReader`. This browser base accepts the
606
+ * cross-platform `CommonInput` type
607
+ * (`Uint8Array | ArrayBuffer | Readable | ReadableStream`).
525
608
  *
526
609
  * @example
527
610
  * ```ts
528
- * // Node.js with file path
529
- * const reader = Workbook.createStreamReader("large-file.xlsx");
530
- *
531
- * // Browser or Node.js with stream
611
+ * // Browser or Node.js with stream / buffer
532
612
  * const reader = Workbook.createStreamReader(readableStream);
533
613
  *
534
614
  * for await (const event of reader) {
@@ -541,7 +621,7 @@ declare class Workbook {
541
621
  * }
542
622
  * ```
543
623
  */
544
- static createStreamReader(input: string | Readable, options?: WorkbookReaderOptions): WorkbookReader;
624
+ static createStreamReader(input: CommonInput, options?: WorkbookReaderOptions): WorkbookReader;
545
625
  get nextId(): number;
546
626
  /**
547
627
  * Add a new worksheet and return a reference to it
@@ -557,6 +637,22 @@ declare class Workbook {
557
637
  * Return a clone of worksheets in order
558
638
  */
559
639
  get worksheets(): Worksheet[];
640
+ /**
641
+ * Add a chartsheet containing a single chart and return the created chartsheet.
642
+ */
643
+ addChartsheet(name: string | undefined, options: AddChartsheetOptions): Chartsheet;
644
+ /**
645
+ * Add a chartsheet containing a classic pivot chart linked to an existing pivot table.
646
+ */
647
+ addPivotChartsheet(name: string | undefined, pivotTable: PivotTable, options: AddPivotChartsheetOptions): Chartsheet;
648
+ /** Return chartsheets in workbook order. */
649
+ get chartsheets(): Chartsheet[];
650
+ getChartsheet(nameOrIndex: string | number): Chartsheet | undefined;
651
+ removeChartsheet(nameOrIndex: string | number): boolean;
652
+ private _getChartsheetModel;
653
+ renameChartsheet(nameOrIndex: string | number, name: string): boolean;
654
+ copyChartsheet(nameOrIndex: string | number, name?: string): Chartsheet | undefined;
655
+ replaceChartsheetChart(nameOrIndex: string | number, chart: AddChartsheetOptions["chart"]): boolean;
560
656
  /**
561
657
  * Iterate over all sheets.
562
658
  *
@@ -564,6 +660,30 @@ declare class Workbook {
564
660
  */
565
661
  eachSheet(callback: (sheet: Worksheet, id: number) => void): void;
566
662
  get definedNames(): DefinedNames;
663
+ /**
664
+ * Workbook-level directory of people referenced by threaded comments.
665
+ * Mutating the returned array adds/removes entries in the persistent
666
+ * state; writers emit `xl/persons/person.xml` only when this list is
667
+ * non-empty.
668
+ *
669
+ * Most callers don't need to touch this directly — creating a
670
+ * {@link ThreadedComment} through `cell.note` handles registration
671
+ * automatically.
672
+ */
673
+ get persons(): ThreadedCommentPerson[];
674
+ /**
675
+ * Register a person in the workbook persons list and return its id.
676
+ *
677
+ * When an entry with the same {@link displayName} + {@link userId}
678
+ * already exists, its existing id is returned so duplicate
679
+ * commenters collapse onto a single entry. New entries receive a
680
+ * synthesised `{GUID}` id.
681
+ *
682
+ * @param displayName — shown in the comment bubble author line
683
+ * @param userId — optional identity-provider user id (email / SID)
684
+ * @param providerId — optional provider identifier ("AD", …)
685
+ */
686
+ registerPerson(displayName: string, userId?: string, providerId?: string): string;
567
687
  /**
568
688
  * Recalculate all formula cells in this workbook.
569
689
  *
@@ -666,6 +786,104 @@ declare class Workbook {
666
786
  */
667
787
  addImage(image: ImageData): number;
668
788
  getImage(id: number | string): WorkbookMedia | undefined;
789
+ /**
790
+ * Return the next available 1-based chart number.
791
+ */
792
+ nextChartNumber(): number;
793
+ /**
794
+ * Store a chart entry in the workbook (keyed by chartNumber).
795
+ */
796
+ addChartEntry(entry: ChartEntry): void;
797
+ setChartStyle(chartNumber: number, data: Uint8Array): void;
798
+ setChartColors(chartNumber: number, data: Uint8Array): void;
799
+ copyChartSidecars(sourceChartNumber: number, targetChartNumber: number, targetWorkbook?: Workbook): void;
800
+ /**
801
+ * Copy the media referenced by `target` (e.g. `../media/image3.png`)
802
+ * from this workbook's media collection into `targetWorkbook`, then
803
+ * return the rewritten Target pointing at the destination workbook's
804
+ * copy. Returns `undefined` when the source media can't be
805
+ * resolved — callers leave the original target in place and let
806
+ * the writer emit a broken rel (same degradation as before the
807
+ * cross-workbook rewrite landed).
808
+ *
809
+ * The on-disk naming convention is determined by the destination
810
+ * workbook's `addImage`, so we take the `id` the new image gets and
811
+ * compute `../media/image{id+1}.{ext}` (the same formula used in
812
+ * `chart-images.ts:resolvePendingChartImages`). Centralising the
813
+ * mapping here keeps the cross-workbook copy robust against future
814
+ * media-naming changes on either workbook.
815
+ */
816
+ private _rewriteCrossWorkbookImageTarget;
817
+ /**
818
+ * Copy the ChartEx-specific sidecar state from one `chartExNumber` slot
819
+ * to another. Classic charts have `copyChartSidecars` for chart-style /
820
+ * chart-colors; ChartEx charts carry their own `_chartExRels`
821
+ * (relationship entries for extension packages, embedded images, etc.)
822
+ * that the classic helper does not touch. Without this, cloning a
823
+ * ChartEx via {@link Chart.copyTo} / {@link Chartsheet.clone} silently
824
+ * dropped every relationship the source had — authored `cx14:`
825
+ * extensions, embedded custom geometry, or linked media ended up
826
+ * pointing at an undefined rel id on the clone.
827
+ */
828
+ copyChartExSidecars(sourceChartExNumber: number, targetChartExNumber: number, targetWorkbook?: Workbook): void;
829
+ private _applyChartsheetSidecars;
830
+ /**
831
+ * Retrieve a chart entry by its 1-based chart number.
832
+ */
833
+ getChartEntry(chartNumber: number): ChartEntry | undefined;
834
+ /**
835
+ * Remove a chart entry from the workbook.
836
+ * Safe to call even if the chart number doesn't exist.
837
+ */
838
+ removeChartEntry(chartNumber: number): void;
839
+ /** Return the next available 1-based chartEx number. */
840
+ nextChartExNumber(): number;
841
+ /**
842
+ * Store a structured chartEx entry.
843
+ * Loaded entries may also keep raw bytes for clean passthrough.
844
+ */
845
+ addChartExStructuredEntry(entry: ChartExEntry): void;
846
+ /** Get a structured chartEx entry by number. */
847
+ getChartExStructuredEntry(chartExNumber: number): ChartExEntry | undefined;
848
+ private _nextChartsheetNo;
849
+ /**
850
+ * Next value for the unified `orderNo` (tab-bar position) counter
851
+ * shared between worksheets and chartsheets. Used by the writer's
852
+ * `prepare()` to emit `<sheets>` in the author's insertion order,
853
+ * preserving interleaved `[ws, cs, ws]` layouts that the old
854
+ * sheetNo-based sort used to reshuffle.
855
+ */
856
+ private _nextSheetOrderNo;
857
+ private _nextSheetId;
858
+ /**
859
+ * Validate a sheet name (worksheet OR chartsheet) against Excel's
860
+ * single unified namespace. Returns the (possibly truncated) name on
861
+ * success; throws {@link WorksheetNameError} on invalid input.
862
+ *
863
+ * Unifying the check at the workbook level fixes three related
864
+ * regressions that used to exist in the per-family validators:
865
+ * 1. `Worksheet.name` setter only cross-checked against other
866
+ * worksheets, so `addChartsheet("S")` followed by
867
+ * `addWorksheet("S")` silently produced a duplicate tab name.
868
+ * 2. The chartsheet regex was missing the backslash, so
869
+ * `addChartsheet("A\\B")` sneaked through — Excel rejects it.
870
+ * 3. `Chartsheet.name = …` bypassed validation entirely, letting
871
+ * users mutate the model into a corrupt state.
872
+ *
873
+ * @param name - Proposed sheet name. `undefined` / empty / over-31
874
+ * chars / containing any of `* ? : \\ / [ ]` / leading or trailing
875
+ * single-quote is rejected. Names ≤31 chars are passed through;
876
+ * longer ones are truncated (non-production builds emit a warning).
877
+ * @param existing - The sheet being renamed (if any) — it is
878
+ * excluded from the duplicate check so `sheet.name = sheet.name`
879
+ * is a no-op rather than a self-collision.
880
+ */
881
+ validateSheetName(name: string, existing?: Worksheet | {
882
+ name: string;
883
+ }): string;
884
+ private _validateChartsheetName;
885
+ /** Remove a structured chartEx entry. */
886
+ removeChartExStructuredEntry(chartExNumber: number): void;
669
887
  /**
670
888
  * Declare that formulas in this workbook may reference an external
671
889
  * workbook. Registers the target so the output file contains the required