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
@@ -80,6 +80,19 @@ var DEFAULT_XML_LIMITS = {
80
80
  maxDepth: 512,
81
81
  maxNodes: 5e6
82
82
  };
83
+ var XmlLimitError = class extends Error {
84
+ code = "xml-limit";
85
+ /** The limit that was exceeded. */
86
+ limit;
87
+ /** Its value: the largest depth or element count allowed. */
88
+ maximum;
89
+ constructor(message, limit3, maximum) {
90
+ super(message);
91
+ this.name = "XmlLimitError";
92
+ this.limit = limit3;
93
+ this.maximum = maximum;
94
+ }
95
+ };
83
96
  var TAG_RE = /<(\/?)([^\s\/><]+)(?:\s+[^\s=\/><]+\s*=\s*(?:"[^"<]*"|'[^'<]*'))*\s*(\/?)>/y;
84
97
  var MARKUP_SKIPS = [
85
98
  ["<!--", "-->"],
@@ -113,11 +126,22 @@ function checkXmlLimits(xml, label, limits = {}) {
113
126
  continue;
114
127
  }
115
128
  nodes++;
116
- if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
129
+ if (nodes > maxNodes)
130
+ throw new XmlLimitError(
131
+ `${label} XML exceeds the limit of ${maxNodes} elements`,
132
+ "maxNodes",
133
+ maxNodes
134
+ );
117
135
  if (!selfClosing && ++depth > maxDepth)
118
- throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth}`);
136
+ throw new XmlLimitError(
137
+ `${label} XML exceeds the nesting depth limit of ${maxDepth}`,
138
+ "maxDepth",
139
+ maxDepth
140
+ );
119
141
  }
120
142
  }
143
+ var CRLF_DECLARATION = /^<\?xml[^>]*\?>\r\n/;
144
+ var crlfDeclarations = /* @__PURE__ */ new WeakSet();
121
145
  function parseXml(xml, options2 = {}) {
122
146
  const label = options2.label ?? "OOXML";
123
147
  if (/<!DOCTYPE|<!ENTITY/i.test(xml))
@@ -139,9 +163,13 @@ function parseXml(xml, options2 = {}) {
139
163
  }
140
164
  if (parseError || !parsed.documentElement)
141
165
  throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
166
+ if (CRLF_DECLARATION.test(xml)) crlfDeclarations.add(parsed);
142
167
  return parsed;
143
168
  }
144
- var buildXml = (node3) => new xmldom.XMLSerializer().serializeToString(node3);
169
+ var buildXml = (node3) => {
170
+ const xml = new xmldom.XMLSerializer().serializeToString(node3);
171
+ return crlfDeclarations.has(node3) ? xml.replace(/^(<\?xml[^>]*\?>)\n/, "$1\r\n") : xml;
172
+ };
145
173
  var isElement = (node3) => node3.nodeType === 1;
146
174
  var elements = (parent) => Array.from(parent.childNodes).filter(isElement);
147
175
  function named(element2, local, ns, lenient = true) {
@@ -7690,9 +7718,9 @@ function createWorksheet(name3, sheetId5) {
7690
7718
  };
7691
7719
  }
7692
7720
 
7693
- // xlsx/styles.ts
7694
- function styleKey(style2) {
7695
- return JSON.stringify(sortKeys(style2));
7721
+ // xlsx/stable-key.ts
7722
+ function stableKey(value3) {
7723
+ return JSON.stringify(sortKeys(value3));
7696
7724
  }
7697
7725
  function sortKeys(value3) {
7698
7726
  if (Array.isArray(value3)) return value3.map(sortKeys);
@@ -7706,6 +7734,11 @@ function sortKeys(value3) {
7706
7734
  }
7707
7735
  return value3;
7708
7736
  }
7737
+
7738
+ // xlsx/styles.ts
7739
+ function styleKey(style2) {
7740
+ return stableKey(style2);
7741
+ }
7709
7742
  function styleAt(workbook, styleId) {
7710
7743
  const style2 = workbook.styles[styleId ?? 0] ?? workbook.styles[0];
7711
7744
  if (!style2) throw new Error("Workbook has no default cell style");
@@ -10312,10 +10345,13 @@ var DEFAULT_ZIP_LIMITS = {
10312
10345
  var ZipLimitError = class extends Error {
10313
10346
  code = "ZIP_BOMB";
10314
10347
  limit;
10348
+ /** The check that failed (absent when the error was built without one). */
10349
+ kind;
10315
10350
  constructor(message, details) {
10316
10351
  super(message);
10317
10352
  this.name = "ZipLimitError";
10318
10353
  this.limit = details.limit;
10354
+ this.kind = details.kind;
10319
10355
  }
10320
10356
  };
10321
10357
  var mib = (bytes) => Math.round(bytes / 1048576);
@@ -10338,7 +10374,7 @@ function resolveLimits(limits) {
10338
10374
  maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
10339
10375
  maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
10340
10376
  label: limits.label ?? "ZIP",
10341
- fail: (message, limit3) => create2 ? create2(message, { limit: limit3 }) : new ZipLimitError(message, { limit: limit3 })
10377
+ fail: (message, limit3, kind) => create2 ? create2(message, { limit: limit3, kind }) : new ZipLimitError(message, { limit: limit3, kind })
10342
10378
  };
10343
10379
  }
10344
10380
  function inflateEntryGuarded(entry3, alreadyRead, limits) {
@@ -10361,13 +10397,18 @@ function inflateEntryGuarded(entry3, alreadyRead, limits) {
10361
10397
  size3 += chunk.byteLength;
10362
10398
  if (size3 > declared || size3 > r.maxEntryBytes)
10363
10399
  return abort(
10364
- r.fail(`${r.label} part ${entry3.name} inflates past its declared size`, r.maxEntryBytes)
10400
+ r.fail(
10401
+ `${r.label} part ${entry3.name} inflates past its declared size`,
10402
+ r.maxEntryBytes,
10403
+ size3 > declared ? "declaredSize" : "maxEntryBytes"
10404
+ )
10365
10405
  );
10366
10406
  if (alreadyRead + size3 > r.maxTotalBytes)
10367
10407
  return abort(
10368
10408
  r.fail(
10369
10409
  `${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
10370
- r.maxTotalBytes
10410
+ r.maxTotalBytes,
10411
+ "maxTotalBytes"
10371
10412
  )
10372
10413
  );
10373
10414
  chunks.push(chunk);
@@ -10400,26 +10441,29 @@ function guardZip(zip, limits = {}) {
10400
10441
  if (entries.length > r.maxEntries)
10401
10442
  throw r.fail(
10402
10443
  `${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
10403
- r.maxEntries
10444
+ r.maxEntries,
10445
+ "maxEntries"
10404
10446
  );
10405
10447
  let declared = 0;
10406
10448
  for (const entry3 of entries) {
10407
10449
  const original = entry3.unsafeOriginalName;
10408
10450
  if (!isSafePartName(entry3.name) || original !== void 0 && !isSafePartName(original))
10409
- throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries);
10451
+ throw r.fail(`${r.label} package has an unsafe part name`, r.maxEntries, "partName");
10410
10452
  if (entry3.dir) continue;
10411
10453
  const size3 = declaredEntrySize(entry3);
10412
10454
  if (size3 > r.maxEntryBytes)
10413
10455
  throw r.fail(
10414
10456
  `${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
10415
- r.maxEntryBytes
10457
+ r.maxEntryBytes,
10458
+ "maxEntryBytes"
10416
10459
  );
10417
10460
  declared += size3;
10418
10461
  }
10419
10462
  if (declared > r.maxTotalBytes)
10420
10463
  throw r.fail(
10421
10464
  `${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
10422
- r.maxTotalBytes
10465
+ r.maxTotalBytes,
10466
+ "maxTotalBytes"
10423
10467
  );
10424
10468
  const produced = /* @__PURE__ */ new Map();
10425
10469
  let total = 0;
@@ -12288,10 +12332,69 @@ function mergeComments(legacy, threaded) {
12288
12332
  (a2, b) => a2.address.row - b.address.row || a2.address.col - b.address.col
12289
12333
  );
12290
12334
  }
12291
- var MAX_INPUT_BYTES = 50 * 1024 * 1024;
12292
- var MAX_PARTS = 1e4;
12293
- var MAX_UNCOMPRESSED_BYTES = 300 * 1024 * 1024;
12294
- var MAX_PART_BYTES = 200 * 1024 * 1024;
12335
+
12336
+ // xlsx/read/limits.ts
12337
+ var DEFAULT_XLSX_LOAD_LIMITS = {
12338
+ maxInputBytes: 50 * 1024 * 1024,
12339
+ maxParts: 1e4,
12340
+ maxPartBytes: 200 * 1024 * 1024,
12341
+ maxTotalBytes: 300 * 1024 * 1024,
12342
+ maxXmlElements: 5e6
12343
+ };
12344
+ var WorkbookTooLargeError = class extends Error {
12345
+ code = "workbook-too-large";
12346
+ /** The limit that was exceeded, as named in {@link XlsxLoadLimits}. */
12347
+ limit;
12348
+ /** The value of that limit when the load failed. */
12349
+ maximum;
12350
+ constructor(message, limit3, maximum, options2) {
12351
+ super(message, options2);
12352
+ this.name = "WorkbookTooLargeError";
12353
+ this.limit = limit3;
12354
+ this.maximum = maximum;
12355
+ }
12356
+ };
12357
+ function resolveLoadLimits(limits = {}) {
12358
+ const resolved = { ...DEFAULT_XLSX_LOAD_LIMITS };
12359
+ for (const name3 of Object.keys(resolved)) {
12360
+ const value3 = limits[name3];
12361
+ if (value3 === void 0) continue;
12362
+ if (!Number.isFinite(value3) || value3 <= 0)
12363
+ throw new RangeError(`limits.${name3} must be a positive finite number`);
12364
+ resolved[name3] = value3;
12365
+ }
12366
+ return resolved;
12367
+ }
12368
+ var ZIP_LIMIT_NAMES = {
12369
+ maxInputBytes: "maxInputBytes",
12370
+ maxEntries: "maxParts",
12371
+ maxEntryBytes: "maxPartBytes",
12372
+ maxTotalBytes: "maxTotalBytes"
12373
+ };
12374
+ function zipLimitsFor(limits) {
12375
+ return {
12376
+ maxInputBytes: limits.maxInputBytes,
12377
+ maxEntries: limits.maxParts,
12378
+ maxEntryBytes: limits.maxPartBytes,
12379
+ maxTotalBytes: limits.maxTotalBytes,
12380
+ label: "XLSX",
12381
+ createError: (message, { limit: limit3, kind }) => {
12382
+ const name3 = ZIP_LIMIT_NAMES[kind];
12383
+ return name3 ? new WorkbookTooLargeError(message, name3, limit3) : new ZipLimitError(message, { limit: limit3, kind });
12384
+ }
12385
+ };
12386
+ }
12387
+ function parseDataXml(xml, label, maxXmlElements = DEFAULT_XLSX_LOAD_LIMITS.maxXmlElements) {
12388
+ try {
12389
+ return parseXml(xml, { label, limits: { maxNodes: maxXmlElements } });
12390
+ } catch (error) {
12391
+ if (error instanceof XmlLimitError && error.limit === "maxNodes")
12392
+ throw new WorkbookTooLargeError(error.message, "maxXmlElements", error.maximum, {
12393
+ cause: error
12394
+ });
12395
+ throw error;
12396
+ }
12397
+ }
12295
12398
  var CONTENT_TYPES = {
12296
12399
  workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
12297
12400
  workbookMacro: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
@@ -12362,16 +12465,15 @@ var SourceIndex = class {
12362
12465
  };
12363
12466
  var mib2 = (bytes) => Math.round(bytes / 1048576);
12364
12467
  async function readZipParts(input, limits = {}) {
12365
- const maxInput = limits.maxInputBytes ?? MAX_INPUT_BYTES;
12366
- const zipLimits = {
12367
- maxEntries: limits.maxParts ?? MAX_PARTS,
12368
- maxEntryBytes: limits.maxPartBytes ?? MAX_PART_BYTES,
12369
- maxTotalBytes: limits.maxTotalBytes ?? MAX_UNCOMPRESSED_BYTES,
12370
- label: "XLSX"
12371
- };
12468
+ const resolved = resolveLoadLimits(limits);
12469
+ const maxInput = resolved.maxInputBytes;
12372
12470
  const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
12373
12471
  if (bytes.byteLength > maxInput)
12374
- throw new Error(`XLSX package exceeds the ${mib2(maxInput)} MiB compressed input limit`);
12472
+ throw new WorkbookTooLargeError(
12473
+ `XLSX package exceeds the ${mib2(maxInput)} MiB compressed input limit`,
12474
+ "maxInputBytes",
12475
+ maxInput
12476
+ );
12375
12477
  let loaded;
12376
12478
  try {
12377
12479
  loaded = await JSZip__default.default.loadAsync(bytes);
@@ -12381,7 +12483,7 @@ async function readZipParts(input, limits = {}) {
12381
12483
  { cause: error }
12382
12484
  );
12383
12485
  }
12384
- const zip = guardZip(loaded, zipLimits);
12486
+ const zip = guardZip(loaded, zipLimitsFor(resolved));
12385
12487
  const parts = /* @__PURE__ */ new Map();
12386
12488
  for (const entry3 of Object.values(zip.files)) {
12387
12489
  if (entry3.dir) continue;
@@ -12588,9 +12690,9 @@ function parseRichString(element2, palette) {
12588
12690
  const text6 = parsed.map((run) => run.text).join("");
12589
12691
  return { text: text6, runs: parsed };
12590
12692
  }
12591
- function parseSharedStrings(xml, palette) {
12693
+ function parseSharedStrings(xml, palette, maxXmlElements) {
12592
12694
  if (!xml) return [];
12593
- const root2 = parseXml(xml, { label: "XLSX shared strings" }).documentElement;
12695
+ const root2 = parseDataXml(xml, "XLSX shared strings", maxXmlElements).documentElement;
12594
12696
  return xChildren(root2, "si").map((si) => parseRichString(si, palette));
12595
12697
  }
12596
12698
 
@@ -17424,7 +17526,11 @@ function parseWorksheet(ctx, partName, name3, sheetId5) {
17424
17526
  return sheet;
17425
17527
  }
17426
17528
  const split = splitSheetData(xml);
17427
- const root2 = parseXml(split?.xml ?? xml, { label: "XLSX worksheet" }).documentElement;
17529
+ const root2 = parseDataXml(
17530
+ split?.xml ?? xml,
17531
+ "XLSX worksheet",
17532
+ ctx.maxXmlElements
17533
+ ).documentElement;
17428
17534
  const byName = /* @__PURE__ */ new Map();
17429
17535
  const cfBlocks = [];
17430
17536
  for (const node3 of elements(root2)) {
@@ -17498,8 +17604,9 @@ function liftPrintAreas(workbook) {
17498
17604
  return false;
17499
17605
  });
17500
17606
  }
17501
- async function loadXlsx(input) {
17502
- const parts = await readZipParts(input);
17607
+ async function loadXlsx(input, options2 = {}) {
17608
+ const limits = resolveLoadLimits(options2.limits);
17609
+ const parts = await readZipParts(input, limits);
17503
17610
  const source = new SourceIndex(parts);
17504
17611
  const workbookPart = source.workbookPart();
17505
17612
  if (!workbookPart) throw new Error("XLSX package has no workbook part (xl/workbook.xml)");
@@ -17520,7 +17627,8 @@ async function loadXlsx(input) {
17520
17627
  source,
17521
17628
  sharedStrings: parseSharedStrings(
17522
17629
  stringsPart ? source.text(stringsPart) : void 0,
17523
- styles.palette
17630
+ styles.palette,
17631
+ limits.maxXmlElements
17524
17632
  ),
17525
17633
  xfMap: styles.xfMap,
17526
17634
  date1904: book.date1904,
@@ -17528,7 +17636,8 @@ async function loadXlsx(input) {
17528
17636
  dxfs: styles.dxfs,
17529
17637
  persons: parsePersons(personsPart ? source.text(personsPart) : void 0),
17530
17638
  dynamicCells: parseDynamicArrayMetadata(metadataPart ? source.text(metadataPart) : void 0),
17531
- warn
17639
+ warn,
17640
+ maxXmlElements: limits.maxXmlElements
17532
17641
  };
17533
17642
  const rels = source.rels(workbookPart);
17534
17643
  const sheets = book.sheets.map((entry3) => {
@@ -18011,14 +18120,24 @@ function formatAxisValue(value3, percent = false) {
18011
18120
  return `${v < 0 ? "-" : ""}${grouped}${frac ? `.${frac}` : ""}`;
18012
18121
  }
18013
18122
 
18123
+ // chart/extent.ts
18124
+ function extentOf(values) {
18125
+ let min = Infinity;
18126
+ let max = -Infinity;
18127
+ for (const value3 of values) {
18128
+ min = Math.min(min, value3);
18129
+ max = Math.max(max, value3);
18130
+ }
18131
+ return { min, max };
18132
+ }
18133
+
18014
18134
  // chart/axis-range.ts
18015
18135
  function computeLogValueRange(series, logBase) {
18016
18136
  const allValues = series.flatMap((item) => item.values).filter((value3) => value3 !== null && Number.isFinite(value3) && value3 > 0);
18017
18137
  if (allValues.length === 0) {
18018
18138
  return { min: 1, max: logBase, span: 1, logScale: true, logBase };
18019
18139
  }
18020
- const dataMin = Math.min(...allValues);
18021
- const dataMax = Math.max(...allValues);
18140
+ const { min: dataMin, max: dataMax } = extentOf(allValues);
18022
18141
  const logMin = Math.floor(Math.log(dataMin) / Math.log(logBase));
18023
18142
  const logMax = Math.ceil(Math.log(dataMax) / Math.log(logBase));
18024
18143
  const min = logBase ** logMin;
@@ -18746,8 +18865,7 @@ function computeHistogramBins(values, options2, format5 = String) {
18746
18865
  });
18747
18866
  }
18748
18867
  if (regular.length > 0) {
18749
- const min = Math.min(...regular.map((item) => item.value));
18750
- const max = Math.max(...regular.map((item) => item.value));
18868
+ const { min, max } = extentOf(regular.map((item) => item.value));
18751
18869
  const requestedSize = options2.binSize && options2.binSize > 0 ? options2.binSize : void 0;
18752
18870
  const requestedCount = options2.binCount && options2.binCount > 0 ? options2.binCount : void 0;
18753
18871
  const start = requestedSize ? Math.floor(min / requestedSize) * requestedSize : min;
@@ -18875,8 +18993,9 @@ function waterfallView(chart, model2, ctx) {
18875
18993
  colors: { increase: role(0), decrease: role(1), total: role(2) }
18876
18994
  };
18877
18995
  const ends = steps.flatMap((step2) => [step2.startValue, step2.endValue]);
18996
+ const range2 = extentOf(ends);
18878
18997
  model2.valueAxis = {
18879
- ...ends.length ? niceScale(Math.min(...ends), Math.max(...ends)) : niceScale(0, 1),
18998
+ ...ends.length ? niceScale(range2.min, range2.max) : niceScale(0, 1),
18880
18999
  percent: false
18881
19000
  };
18882
19001
  const labels = model2.categories;
@@ -18992,7 +19111,8 @@ function chartSummaryView(chart, theme2, options2 = {}) {
18992
19111
  s.xValues = s.values.map((_, k) => numeric5 ? toNumber(cats[k] ?? null) : k + 1);
18993
19112
  });
18994
19113
  const xs = series.flatMap((s) => s.xValues ?? []).filter((x) => x !== null);
18995
- model2.xAxis = xs.length ? niceScale(Math.min(...xs), Math.max(...xs)) : niceScale(0, 1);
19114
+ const range2 = extentOf(xs);
19115
+ model2.xAxis = xs.length ? niceScale(range2.min, range2.max) : niceScale(0, 1);
18996
19116
  }
18997
19117
  if (type === "stock") model2.stock = stockView(chart.stock, ctx);
18998
19118
  if (type === "bubble") bubbleView(chart, model2, ctx.evaluateRef);