ooxml-core 1.30.0 → 1.31.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 (363) hide show
  1. package/dist/{PptxHandler-3OLZT5YW.cjs → PptxHandler-DHQPVTUI.cjs} +2 -2
  2. package/dist/{PptxHandler-LOFY2PRO.mjs → PptxHandler-E4DDV3FQ.mjs} +1 -1
  3. package/dist/{PptxHandler-FJHKJEZU.mjs → PptxHandler-KKLAYUGQ.mjs} +2 -2
  4. package/dist/{PresentationBuilder-LVIVJZIL.cjs → PresentationBuilder-JORMF5CP.cjs} +4 -4
  5. package/dist/{PresentationBuilder-W5VRPFLM.mjs → PresentationBuilder-Q2Z33LLM.mjs} +2 -2
  6. package/dist/{PresentationBuilder-23M6WQK3.mjs → PresentationBuilder-YYZYCKTZ.mjs} +1 -1
  7. package/dist/automation/index.cjs +5829 -3266
  8. package/dist/automation/index.mjs +5829 -3266
  9. package/dist/automation/node.cjs +2 -1
  10. package/dist/automation/node.d.ts.map +1 -1
  11. package/dist/automation/node.mjs +2 -1
  12. package/dist/automation/tools/define.d.ts +2 -0
  13. package/dist/automation/tools/define.d.ts.map +1 -1
  14. package/dist/automation/tools/types.d.ts +6 -0
  15. package/dist/automation/tools/types.d.ts.map +1 -1
  16. package/dist/{chunk-JZ64GVIB.mjs → chunk-6FXOAMNL.mjs} +1 -1
  17. package/dist/{chunk-SCK5U362.cjs → chunk-B4LXDHBX.cjs} +19 -1
  18. package/dist/{chunk-5YZFO55V.mjs → chunk-FFJBOR2Y.mjs} +4 -4
  19. package/dist/{chunk-SCTM27HK.mjs → chunk-GJDFCP2T.mjs} +20 -2
  20. package/dist/{chunk-HDHUJM5M.mjs → chunk-KWJYMAEF.mjs} +19 -1
  21. package/dist/{chunk-HK7DVTEF.mjs → chunk-MKDONWNO.mjs} +1 -1
  22. package/dist/{chunk-UVYWAI4M.mjs → chunk-WZJ25K7P.mjs} +1 -1
  23. package/dist/collab/index.cjs +35 -4
  24. package/dist/collab/index.mjs +35 -4
  25. package/dist/collab/websocket-transport.d.ts +9 -1
  26. package/dist/collab/websocket-transport.d.ts.map +1 -1
  27. package/dist/docx/data-binding.d.ts +9 -0
  28. package/dist/docx/data-binding.d.ts.map +1 -0
  29. package/dist/docx/document-parts.d.ts +1 -0
  30. package/dist/docx/document-parts.d.ts.map +1 -1
  31. package/dist/docx/drawing.d.ts.map +1 -1
  32. package/dist/docx/embedded.cjs +1383 -609
  33. package/dist/docx/embedded.mjs +1383 -609
  34. package/dist/docx/index.cjs +1394 -618
  35. package/dist/docx/index.mjs +1394 -618
  36. package/dist/docx/inline-model.d.ts +2 -0
  37. package/dist/docx/inline-model.d.ts.map +1 -1
  38. package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
  39. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  40. package/dist/docx/layout/adapter.d.ts.map +1 -1
  41. package/dist/docx/layout/equation-object.d.ts +1 -1
  42. package/dist/docx/layout/equation-object.d.ts.map +1 -1
  43. package/dist/docx/layout/floats.d.ts +1 -1
  44. package/dist/docx/layout/floats.d.ts.map +1 -1
  45. package/dist/docx/layout/flow-paragraph.d.ts +4 -0
  46. package/dist/docx/layout/flow-paragraph.d.ts.map +1 -1
  47. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  48. package/dist/docx/layout/index.cjs +452 -203
  49. package/dist/docx/layout/index.mjs +452 -203
  50. package/dist/docx/layout/input.d.ts +12 -0
  51. package/dist/docx/layout/input.d.ts.map +1 -1
  52. package/dist/docx/layout/nested-frame-profile.d.ts +3 -1
  53. package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -1
  54. package/dist/docx/layout/page-cursor.d.ts +11 -2
  55. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  56. package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -1
  57. package/dist/docx/layout/paragraph-layout.d.ts +5 -0
  58. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  59. package/dist/docx/layout/result.d.ts +4 -0
  60. package/dist/docx/layout/result.d.ts.map +1 -1
  61. package/dist/docx/layout/section-flow.d.ts +2 -0
  62. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  63. package/dist/docx/layout/table-layout.d.ts +4 -14
  64. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  65. package/dist/docx/layout/table-merged-rows.d.ts +21 -0
  66. package/dist/docx/layout/table-merged-rows.d.ts.map +1 -0
  67. package/dist/docx/layout/table-row-split.d.ts +16 -0
  68. package/dist/docx/layout/table-row-split.d.ts.map +1 -0
  69. package/dist/docx/layout/wrap.d.ts +2 -0
  70. package/dist/docx/layout/wrap.d.ts.map +1 -1
  71. package/dist/docx/load/index.cjs +1397 -623
  72. package/dist/docx/load/index.mjs +1397 -623
  73. package/dist/docx/model-paragraph.d.ts +4 -1
  74. package/dist/docx/model-paragraph.d.ts.map +1 -1
  75. package/dist/docx/model.d.ts +24 -1
  76. package/dist/docx/model.d.ts.map +1 -1
  77. package/dist/docx/paragraph-properties.d.ts.map +1 -1
  78. package/dist/docx/paragraph-styles.d.ts.map +1 -1
  79. package/dist/docx/parse-table.d.ts.map +1 -1
  80. package/dist/docx/parse.d.ts.map +1 -1
  81. package/dist/docx/run-segmentation.d.ts.map +1 -1
  82. package/dist/docx/save-modified.d.ts +4 -0
  83. package/dist/docx/save-modified.d.ts.map +1 -0
  84. package/dist/docx/save.d.ts +2 -2
  85. package/dist/docx/save.d.ts.map +1 -1
  86. package/dist/docx/style-formatting-package.d.ts +9 -0
  87. package/dist/docx/style-formatting-package.d.ts.map +1 -0
  88. package/dist/docx/style-numbering-package.d.ts +4 -1
  89. package/dist/docx/style-numbering-package.d.ts.map +1 -1
  90. package/dist/docx/table-grid.d.ts +35 -0
  91. package/dist/docx/table-grid.d.ts.map +1 -0
  92. package/dist/docx/table-structure-cells.d.ts +19 -0
  93. package/dist/docx/table-structure-cells.d.ts.map +1 -0
  94. package/dist/docx/table-structure-check.d.ts +12 -0
  95. package/dist/docx/table-structure-check.d.ts.map +1 -0
  96. package/dist/docx/table-structure-merge.d.ts +28 -0
  97. package/dist/docx/table-structure-merge.d.ts.map +1 -0
  98. package/dist/docx/table-structure.d.ts +30 -0
  99. package/dist/docx/table-structure.d.ts.map +1 -0
  100. package/dist/docx/ui/index.cjs +717 -256
  101. package/dist/docx/ui/index.d.ts +4 -0
  102. package/dist/docx/ui/index.d.ts.map +1 -1
  103. package/dist/docx/ui/index.mjs +703 -257
  104. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  105. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  106. package/dist/docx/ui/table-structure-guard.d.ts +2 -0
  107. package/dist/docx/ui/table-structure-guard.d.ts.map +1 -1
  108. package/dist/docx/word-content-control-docs.d.ts +5 -0
  109. package/dist/docx/word-content-control-docs.d.ts.map +1 -0
  110. package/dist/docx/word-corpus-gaps.d.ts +10 -0
  111. package/dist/docx/word-corpus-gaps.d.ts.map +1 -0
  112. package/dist/docx/word-measurer.d.ts +6 -0
  113. package/dist/docx/word-measurer.d.ts.map +1 -0
  114. package/dist/docx/word-spacing-docs.d.ts +12 -0
  115. package/dist/docx/word-spacing-docs.d.ts.map +1 -0
  116. package/dist/docx/word-table-docs.d.ts +9 -0
  117. package/dist/docx/word-table-docs.d.ts.map +1 -0
  118. package/dist/docx/write-drawing.d.ts.map +1 -1
  119. package/dist/docx/write-fallback.d.ts +5 -0
  120. package/dist/docx/write-fallback.d.ts.map +1 -0
  121. package/dist/docx/write-table-properties.d.ts +1 -0
  122. package/dist/docx/write-table-properties.d.ts.map +1 -1
  123. package/dist/docx/write-table-structure.d.ts +14 -0
  124. package/dist/docx/write-table-structure.d.ts.map +1 -0
  125. package/dist/docx/write-table.d.ts +3 -4
  126. package/dist/docx/write-table.d.ts.map +1 -1
  127. package/dist/index.cjs +22 -22
  128. package/dist/index.mjs +22 -22
  129. package/dist/math/index.cjs +22 -22
  130. package/dist/math/index.mjs +22 -22
  131. package/dist/math/omml-box-grouped.d.ts.map +1 -1
  132. package/dist/math/omml-box-layout.d.ts +3 -1
  133. package/dist/math/omml-box-layout.d.ts.map +1 -1
  134. package/dist/math/omml-box-structures.d.ts.map +1 -1
  135. package/dist/math/omml-box.d.ts +2 -0
  136. package/dist/math/omml-box.d.ts.map +1 -1
  137. package/dist/math/omml-svg.d.ts +6 -2
  138. package/dist/math/omml-svg.d.ts.map +1 -1
  139. package/dist/pptx/automation/index.cjs +20 -1
  140. package/dist/pptx/automation/index.d.ts +6 -0
  141. package/dist/pptx/automation/index.d.ts.map +1 -1
  142. package/dist/pptx/automation/index.mjs +6 -5
  143. package/dist/pptx/chunks/index-PdM5zpmu.d.ts.map +1 -1
  144. package/dist/pptx/cli/index.cjs +19 -1
  145. package/dist/pptx/cli/index.mjs +4 -4
  146. package/dist/pptx/converter/index.mjs +2 -2
  147. package/dist/pptx/editor/render/slide-operations.cjs +1 -1
  148. package/dist/pptx/editor/render/slide-operations.mjs +1 -1
  149. package/dist/pptx/index.cjs +19 -1
  150. package/dist/pptx/index.mjs +5 -5
  151. package/dist/teams/chat-rooms.d.ts.map +1 -1
  152. package/dist/teams/chat.d.ts +7 -0
  153. package/dist/teams/chat.d.ts.map +1 -1
  154. package/dist/teams/files.d.ts +1 -1
  155. package/dist/teams/files.d.ts.map +1 -1
  156. package/dist/teams/index.cjs +2735 -1148
  157. package/dist/teams/index.d.ts +3 -0
  158. package/dist/teams/index.d.ts.map +1 -1
  159. package/dist/teams/index.mjs +2710 -1148
  160. package/dist/teams/message-transfer.d.ts +1 -1
  161. package/dist/teams/message-transfer.d.ts.map +1 -1
  162. package/dist/teams/protocol.d.ts +30 -0
  163. package/dist/teams/protocol.d.ts.map +1 -0
  164. package/dist/teams/schema.d.ts +59 -0
  165. package/dist/teams/schema.d.ts.map +1 -0
  166. package/dist/teams/server-config.d.ts +19 -2
  167. package/dist/teams/server-config.d.ts.map +1 -1
  168. package/dist/teams/server-file-storage.d.ts +11 -1
  169. package/dist/teams/server-file-storage.d.ts.map +1 -1
  170. package/dist/teams/server-session.d.ts +2 -0
  171. package/dist/teams/server-session.d.ts.map +1 -1
  172. package/dist/teams/signaling.d.ts +2 -0
  173. package/dist/teams/signaling.d.ts.map +1 -1
  174. package/dist/teams/store.d.ts +9 -0
  175. package/dist/teams/store.d.ts.map +1 -1
  176. package/dist/teams/stored-file.d.ts +1 -1
  177. package/dist/teams/stored-file.d.ts.map +1 -1
  178. package/dist/teams/sync-transport.d.ts.map +1 -1
  179. package/dist/teams/validate-members.d.ts +28 -0
  180. package/dist/teams/validate-members.d.ts.map +1 -0
  181. package/dist/teams/validate-owned.d.ts +20 -0
  182. package/dist/teams/validate-owned.d.ts.map +1 -0
  183. package/dist/teams/validate-update.d.ts +70 -0
  184. package/dist/teams/validate-update.d.ts.map +1 -0
  185. package/dist/teams/workspace.d.ts +12 -0
  186. package/dist/teams/workspace.d.ts.map +1 -1
  187. package/dist/visio/connector-route-walk.d.ts +2 -0
  188. package/dist/visio/connector-route-walk.d.ts.map +1 -1
  189. package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
  190. package/dist/visio/edit-connector.d.ts +2 -0
  191. package/dist/visio/edit-connector.d.ts.map +1 -1
  192. package/dist/visio/edit-delete.d.ts.map +1 -1
  193. package/dist/visio/edit-duplicate-line.d.ts +40 -0
  194. package/dist/visio/edit-duplicate-line.d.ts.map +1 -0
  195. package/dist/visio/edit-duplicate.d.ts.map +1 -1
  196. package/dist/visio/edit-formatting-scope.d.ts +5 -1
  197. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  198. package/dist/visio/edit-geometry.d.ts.map +1 -1
  199. package/dist/visio/edit-instance-duplicate.d.ts +2 -1
  200. package/dist/visio/edit-instance-duplicate.d.ts.map +1 -1
  201. package/dist/visio/edit-master-move.d.ts.map +1 -1
  202. package/dist/visio/edit-recalculate-index.d.ts +23 -0
  203. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  204. package/dist/visio/edit-recalculate-text.d.ts +12 -0
  205. package/dist/visio/edit-recalculate-text.d.ts.map +1 -0
  206. package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
  207. package/dist/visio/edit-recalculate.d.ts +15 -3
  208. package/dist/visio/edit-recalculate.d.ts.map +1 -1
  209. package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
  210. package/dist/visio/edit-stencil-connector-layout.d.ts +1 -1
  211. package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -1
  212. package/dist/visio/edit-text-scope.d.ts +4 -1
  213. package/dist/visio/edit-text-scope.d.ts.map +1 -1
  214. package/dist/visio/formula-analyze.d.ts +18 -0
  215. package/dist/visio/formula-analyze.d.ts.map +1 -0
  216. package/dist/visio/formula-bound.d.ts +4 -0
  217. package/dist/visio/formula-bound.d.ts.map +1 -0
  218. package/dist/visio/formula-evaluate.d.ts +2 -9
  219. package/dist/visio/formula-evaluate.d.ts.map +1 -1
  220. package/dist/visio/formula-extra-functions.d.ts +23 -0
  221. package/dist/visio/formula-extra-functions.d.ts.map +1 -0
  222. package/dist/visio/formula-indirect.d.ts +6 -0
  223. package/dist/visio/formula-indirect.d.ts.map +1 -0
  224. package/dist/visio/formula-master.d.ts +1 -0
  225. package/dist/visio/formula-master.d.ts.map +1 -1
  226. package/dist/visio/formula-operators.d.ts +6 -0
  227. package/dist/visio/formula-operators.d.ts.map +1 -0
  228. package/dist/visio/formula-text-functions.d.ts +5 -1
  229. package/dist/visio/formula-text-functions.d.ts.map +1 -1
  230. package/dist/visio/formula.d.ts +12 -0
  231. package/dist/visio/formula.d.ts.map +1 -1
  232. package/dist/visio/index.cjs +1354 -396
  233. package/dist/visio/index.mjs +1354 -396
  234. package/dist/visio/ui/index.cjs +1341 -383
  235. package/dist/visio/ui/index.mjs +1341 -383
  236. package/dist/xlsx/collab/apply.d.ts.map +1 -1
  237. package/dist/xlsx/collab/codec.d.ts +2 -0
  238. package/dist/xlsx/collab/codec.d.ts.map +1 -1
  239. package/dist/xlsx/collab/dirty.d.ts +4 -1
  240. package/dist/xlsx/collab/dirty.d.ts.map +1 -1
  241. package/dist/xlsx/collab/index.cjs +551 -106
  242. package/dist/xlsx/collab/index.mjs +551 -106
  243. package/dist/xlsx/collab/keyed.d.ts +36 -0
  244. package/dist/xlsx/collab/keyed.d.ts.map +1 -0
  245. package/dist/xlsx/collab/names.d.ts +2 -0
  246. package/dist/xlsx/collab/names.d.ts.map +1 -1
  247. package/dist/xlsx/collab/part-specs.d.ts +13 -0
  248. package/dist/xlsx/collab/part-specs.d.ts.map +1 -0
  249. package/dist/xlsx/collab/schema.d.ts +8 -0
  250. package/dist/xlsx/collab/schema.d.ts.map +1 -1
  251. package/dist/xlsx/collab/sheet-parts.d.ts +19 -0
  252. package/dist/xlsx/collab/sheet-parts.d.ts.map +1 -0
  253. package/dist/xlsx/collab/sheets.d.ts +6 -0
  254. package/dist/xlsx/collab/sheets.d.ts.map +1 -1
  255. package/dist/xlsx/collab/write.d.ts +3 -0
  256. package/dist/xlsx/collab/write.d.ts.map +1 -1
  257. package/dist/xlsx/edit/clipboard-areas.d.ts +17 -0
  258. package/dist/xlsx/edit/clipboard-areas.d.ts.map +1 -0
  259. package/dist/xlsx/edit/custom-views.d.ts +21 -0
  260. package/dist/xlsx/edit/custom-views.d.ts.map +1 -0
  261. package/dist/xlsx/edit/data-table.d.ts.map +1 -1
  262. package/dist/xlsx/edit/history.d.ts +1 -1
  263. package/dist/xlsx/edit/history.d.ts.map +1 -1
  264. package/dist/xlsx/edit/index.d.ts +2 -0
  265. package/dist/xlsx/edit/index.d.ts.map +1 -1
  266. package/dist/xlsx/edit/paste-selection.d.ts.map +1 -1
  267. package/dist/xlsx/edit/scenario-merge.d.ts +7 -0
  268. package/dist/xlsx/edit/scenario-merge.d.ts.map +1 -0
  269. package/dist/xlsx/edit/session.d.ts.map +1 -1
  270. package/dist/xlsx/edit/shift-data-tables.d.ts +7 -0
  271. package/dist/xlsx/edit/shift-data-tables.d.ts.map +1 -0
  272. package/dist/xlsx/edit/shift-scenarios.d.ts +7 -0
  273. package/dist/xlsx/edit/shift-scenarios.d.ts.map +1 -0
  274. package/dist/xlsx/edit/shift-sheet.d.ts.map +1 -1
  275. package/dist/xlsx/edit/sparkline-grouping.d.ts +10 -0
  276. package/dist/xlsx/edit/sparkline-grouping.d.ts.map +1 -0
  277. package/dist/xlsx/edit/types.d.ts +21 -0
  278. package/dist/xlsx/edit/types.d.ts.map +1 -1
  279. package/dist/xlsx/formula/ets-excel-compare.d.ts +24 -0
  280. package/dist/xlsx/formula/ets-excel-compare.d.ts.map +1 -0
  281. package/dist/xlsx/formula/functions/ets-core.d.ts +36 -0
  282. package/dist/xlsx/formula/functions/ets-core.d.ts.map +1 -0
  283. package/dist/xlsx/formula/functions/ets-grid.d.ts +15 -0
  284. package/dist/xlsx/formula/functions/ets-grid.d.ts.map +1 -0
  285. package/dist/xlsx/formula/functions/ets-init.d.ts +15 -0
  286. package/dist/xlsx/formula/functions/ets-init.d.ts.map +1 -0
  287. package/dist/xlsx/formula/functions/ets-input.d.ts +13 -0
  288. package/dist/xlsx/formula/functions/ets-input.d.ts.map +1 -0
  289. package/dist/xlsx/formula/functions/ets-season.d.ts +6 -0
  290. package/dist/xlsx/formula/functions/ets-season.d.ts.map +1 -0
  291. package/dist/xlsx/formula/functions/forecast-ets.d.ts +3 -0
  292. package/dist/xlsx/formula/functions/forecast-ets.d.ts.map +1 -0
  293. package/dist/xlsx/formula/functions/statistical.d.ts.map +1 -1
  294. package/dist/xlsx/index.cjs +4444 -2447
  295. package/dist/xlsx/index.mjs +4423 -2448
  296. package/dist/xlsx/layout/form-control-link.d.ts +20 -0
  297. package/dist/xlsx/layout/form-control-link.d.ts.map +1 -0
  298. package/dist/xlsx/layout/form-control-state.d.ts +49 -0
  299. package/dist/xlsx/layout/form-control-state.d.ts.map +1 -0
  300. package/dist/xlsx/layout/form-control-view.d.ts +11 -0
  301. package/dist/xlsx/layout/form-control-view.d.ts.map +1 -0
  302. package/dist/xlsx/layout/header-footer-edit.d.ts +4 -2
  303. package/dist/xlsx/layout/header-footer-edit.d.ts.map +1 -1
  304. package/dist/xlsx/layout/header-footer.d.ts +16 -0
  305. package/dist/xlsx/layout/header-footer.d.ts.map +1 -1
  306. package/dist/xlsx/layout/index.d.ts +5 -0
  307. package/dist/xlsx/layout/index.d.ts.map +1 -1
  308. package/dist/xlsx/layout/ref-evaluator.d.ts +6 -0
  309. package/dist/xlsx/layout/ref-evaluator.d.ts.map +1 -1
  310. package/dist/xlsx/layout/shape-paint.d.ts +25 -0
  311. package/dist/xlsx/layout/shape-paint.d.ts.map +1 -0
  312. package/dist/xlsx/layout/shape-view.d.ts +15 -0
  313. package/dist/xlsx/layout/shape-view.d.ts.map +1 -0
  314. package/dist/xlsx/load/index.cjs +2134 -1103
  315. package/dist/xlsx/load/index.mjs +2134 -1103
  316. package/dist/xlsx/model-custom-views.d.ts +33 -0
  317. package/dist/xlsx/model-custom-views.d.ts.map +1 -0
  318. package/dist/xlsx/model-shapes.d.ts +78 -0
  319. package/dist/xlsx/model-shapes.d.ts.map +1 -0
  320. package/dist/xlsx/model.d.ts +38 -1
  321. package/dist/xlsx/model.d.ts.map +1 -1
  322. package/dist/xlsx/read/custom-views.d.ts +5 -0
  323. package/dist/xlsx/read/custom-views.d.ts.map +1 -0
  324. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  325. package/dist/xlsx/read/form-control.d.ts +14 -0
  326. package/dist/xlsx/read/form-control.d.ts.map +1 -0
  327. package/dist/xlsx/read/header-footer-images.d.ts +5 -0
  328. package/dist/xlsx/read/header-footer-images.d.ts.map +1 -0
  329. package/dist/xlsx/read/load.d.ts.map +1 -1
  330. package/dist/xlsx/read/shape.d.ts +5 -0
  331. package/dist/xlsx/read/shape.d.ts.map +1 -0
  332. package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
  333. package/dist/xlsx/read/workbook-part.d.ts +5 -1
  334. package/dist/xlsx/read/workbook-part.d.ts.map +1 -1
  335. package/dist/xlsx/read/worksheet-children.d.ts +3 -0
  336. package/dist/xlsx/read/worksheet-children.d.ts.map +1 -0
  337. package/dist/xlsx/read/worksheet.d.ts.map +1 -1
  338. package/dist/xlsx/ui/commands/i18n/sparklines.d.ts.map +1 -1
  339. package/dist/xlsx/ui/commands/i18n/what-if.d.ts.map +1 -1
  340. package/dist/xlsx/ui/commands/what-if.d.ts +0 -1
  341. package/dist/xlsx/ui/commands/what-if.d.ts.map +1 -1
  342. package/dist/xlsx/ui/dialogs/forecast-sheet.d.ts +51 -0
  343. package/dist/xlsx/ui/dialogs/forecast-sheet.d.ts.map +1 -0
  344. package/dist/xlsx/ui/dialogs/scenario-summary.d.ts +15 -0
  345. package/dist/xlsx/ui/dialogs/scenario-summary.d.ts.map +1 -0
  346. package/dist/xlsx/ui/index.cjs +4411 -2195
  347. package/dist/xlsx/ui/index.d.ts +2 -0
  348. package/dist/xlsx/ui/index.d.ts.map +1 -1
  349. package/dist/xlsx/ui/index.mjs +4404 -2194
  350. package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -1
  351. package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -1
  352. package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -1
  353. package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -1
  354. package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -1
  355. package/dist/xlsx/write/custom-views.d.ts +4 -0
  356. package/dist/xlsx/write/custom-views.d.ts.map +1 -0
  357. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  358. package/dist/xlsx/write/form-control.d.ts +4 -0
  359. package/dist/xlsx/write/form-control.d.ts.map +1 -0
  360. package/dist/xlsx/write/sheet-data.d.ts.map +1 -1
  361. package/dist/xlsx/write/workbook-part.d.ts.map +1 -1
  362. package/dist/xlsx/write/worksheet.d.ts.map +1 -1
  363. package/package.json +1 -1
@@ -227,19 +227,24 @@ var STYLES = "xlsx:styles";
227
227
  var NAMES = "xlsx:names";
228
228
  var SHEETS = "xlsx:sheets";
229
229
  var SHEET_PARTS = ["props", "cells", "rows", "cols", "merges"];
230
+ var LIST_PARTS = ["comments", "replies", "cf", "dv", "links", "tables", "charts"];
230
231
  function sharedWorkbook(doc) {
231
232
  return {
232
233
  meta: doc.getMap(META),
233
234
  styles: doc.getMap(STYLES),
234
235
  names: doc.getMap(NAMES),
235
- sheets: doc.getMap(SHEETS)
236
+ sheets: doc.getMap(SHEETS),
237
+ parts: Object.fromEntries(
238
+ LIST_PARTS.map((part) => [part, doc.getMap(`xlsx:${part}`)])
239
+ )
236
240
  };
237
241
  }
238
242
  var sharedTypes = (shared) => [
239
243
  shared.meta,
240
244
  shared.styles,
241
245
  shared.names,
242
- shared.sheets
246
+ shared.sheets,
247
+ ...LIST_PARTS.map((part) => shared.parts[part])
243
248
  ];
244
249
  function childMap(parent, key) {
245
250
  const value = parent.get(key);
@@ -372,6 +377,8 @@ function encodeLine(info, keyOf, column = false) {
372
377
  if (info.outlineLevel) entry.ol = info.outlineLevel;
373
378
  if (info.collapsed) entry.c = 1;
374
379
  if (column && info.bestFit) entry.bf = 1;
380
+ if (!column && info.thickTop) entry.tt = 1;
381
+ if (!column && info.thickBot) entry.tb = 1;
375
382
  return entry;
376
383
  }
377
384
  function decodeLine(raw) {
@@ -394,6 +401,8 @@ function decodeRow(raw, idOf) {
394
401
  if (styleId) info.styleId = styleId;
395
402
  if (entry.ol) info.outlineLevel = entry.ol;
396
403
  if (entry.c === 1) info.collapsed = true;
404
+ if (entry.tt === 1) info.thickTop = true;
405
+ if (entry.tb === 1) info.thickBot = true;
397
406
  return info;
398
407
  }
399
408
  function decodeColumn(raw, min, max, idOf) {
@@ -508,6 +517,7 @@ function writeNames(names, list, sheetKeyAt) {
508
517
  if (scope !== void 0) entry.k = scope;
509
518
  if (name.hidden) entry.h = 1;
510
519
  if (name.comment !== void 0) entry.c = name.comment;
520
+ if (name.extra) entry.x = { ...name.extra };
511
521
  const key = nameKey(name.name, scope);
512
522
  keys.add(key);
513
523
  setIfChanged(names, key, entry);
@@ -528,11 +538,406 @@ function readNames(names, sheetIndexOf) {
528
538
  }
529
539
  if (raw.h === 1) name.hidden = true;
530
540
  if (typeof raw.c === "string") name.comment = raw.c;
541
+ if (isRecord(raw.x)) {
542
+ const extra = Object.fromEntries(
543
+ Object.entries(raw.x).filter((e) => typeof e[1] === "string")
544
+ );
545
+ if (Object.keys(extra).length) name.extra = extra;
546
+ }
531
547
  out.push(name);
532
548
  }
533
549
  return out;
534
550
  }
535
551
 
552
+ // xlsx/collab/keyed.ts
553
+ var PrefixStore = class {
554
+ constructor(map, sheetKey) {
555
+ this.map = map;
556
+ this.prefix = `${sheetKey}/`;
557
+ }
558
+ map;
559
+ prefix;
560
+ *entries() {
561
+ for (const [key, value] of this.map.entries())
562
+ if (key.startsWith(this.prefix)) yield [key.slice(this.prefix.length), value];
563
+ }
564
+ has(key) {
565
+ return this.map.has(this.prefix + key);
566
+ }
567
+ keys() {
568
+ return [...this.entries()].map(([key]) => key);
569
+ }
570
+ delete(key) {
571
+ this.map.delete(this.prefix + key);
572
+ }
573
+ /** Sets `key` only when its JSON value differs. */
574
+ setIfChanged(key, value) {
575
+ if (!jsonEqual(this.map.get(this.prefix + key), value)) this.map.set(this.prefix + key, value);
576
+ }
577
+ };
578
+ var PartIds = class {
579
+ byItem = /* @__PURE__ */ new WeakMap();
580
+ byKey = /* @__PURE__ */ new Map();
581
+ set(item, key) {
582
+ this.byItem.set(item, key);
583
+ this.byKey.set(key, item);
584
+ }
585
+ };
586
+ var isEntry = (raw) => isRecord(raw) && typeof raw.i === "number" && Number.isFinite(raw.i) && "d" in raw;
587
+ var naturalOf = (spec, encoded) => spec.natural ? spec.natural(encoded) : spec.fixedKey?.(encoded);
588
+ function push(index, key, value) {
589
+ const list = index.get(key);
590
+ if (list) list.push(value);
591
+ else index.set(key, [value]);
592
+ }
593
+ function positions(keys, known) {
594
+ const renumber = keys.map((_key, n) => n);
595
+ const current = keys.map((key) => key === void 0 ? void 0 : known.get(key));
596
+ let last;
597
+ let lastKey = "";
598
+ for (const [n, value] of current.entries()) {
599
+ const key = keys[n] ?? "";
600
+ if (value === void 0) continue;
601
+ if (last !== void 0 && !(last < value || last === value && lastKey < key)) return renumber;
602
+ last = value;
603
+ lastKey = key;
604
+ }
605
+ const out = [];
606
+ for (let n = 0; n < current.length; n++) {
607
+ const value = current[n];
608
+ if (value !== void 0) {
609
+ out.push(value);
610
+ continue;
611
+ }
612
+ const low = out[n - 1];
613
+ const high = current.slice(n + 1).find((v) => v !== void 0);
614
+ const next = high === void 0 ? (low ?? -1) + 1 : low === void 0 ? high - 1 : (low + high) / 2;
615
+ if (low !== void 0 && next <= low || high !== void 0 && next >= high) return renumber;
616
+ out.push(next);
617
+ }
618
+ return out;
619
+ }
620
+ function writeKeyed(map, items, ids, spec, mint) {
621
+ const existing = /* @__PURE__ */ new Map();
622
+ const position = /* @__PURE__ */ new Map();
623
+ for (const [key, raw] of map.entries())
624
+ if (isEntry(raw)) {
625
+ existing.set(key, raw.d);
626
+ position.set(key, raw.i);
627
+ }
628
+ const list = items.flatMap((item) => {
629
+ const encoded = spec.encode(item);
630
+ return encoded === void 0 ? [] : [{ item, encoded }];
631
+ });
632
+ const keys = list.map(() => void 0);
633
+ const used = /* @__PURE__ */ new Set();
634
+ if (spec.fixedKey) {
635
+ list.forEach(({ encoded }, n) => {
636
+ const base = spec.fixedKey?.(encoded) ?? "";
637
+ let key = base;
638
+ for (let dup = 2; used.has(key); dup++) key = `${base}#${dup}`;
639
+ used.add(key);
640
+ keys[n] = key;
641
+ });
642
+ } else {
643
+ list.forEach(({ item }, n) => {
644
+ const key = ids.byItem.get(item);
645
+ if (key !== void 0 && existing.has(key) && !used.has(key)) {
646
+ used.add(key);
647
+ keys[n] = key;
648
+ }
649
+ });
650
+ const exact = /* @__PURE__ */ new Map();
651
+ const loose = /* @__PURE__ */ new Map();
652
+ for (const [key, d] of existing) {
653
+ if (used.has(key)) continue;
654
+ push(exact, JSON.stringify(d), key);
655
+ const nat = naturalOf(spec, d);
656
+ if (nat !== void 0) push(loose, nat, key);
657
+ }
658
+ const take = (index, at) => {
659
+ const found = at === void 0 ? void 0 : index.get(at);
660
+ while (found?.length) {
661
+ const key = found.shift();
662
+ if (key !== void 0 && !used.has(key)) return key;
663
+ }
664
+ return void 0;
665
+ };
666
+ for (const pass of ["exact", "natural"])
667
+ list.forEach(({ encoded }, n) => {
668
+ if (keys[n] !== void 0) return;
669
+ const key = pass === "exact" ? take(exact, JSON.stringify(encoded)) : take(loose, naturalOf(spec, encoded));
670
+ if (key !== void 0) {
671
+ used.add(key);
672
+ keys[n] = key;
673
+ }
674
+ });
675
+ const unmatched = list.flatMap((_entry, n) => keys[n] === void 0 ? [n] : []);
676
+ const spare = [...existing.keys()].filter((key) => !used.has(key)).sort((a, b) => (position.get(a) ?? 0) - (position.get(b) ?? 0) || (a < b ? -1 : 1));
677
+ if (unmatched.length > 0 && unmatched.length === spare.length)
678
+ unmatched.forEach((n, k) => {
679
+ const key = spare[k];
680
+ if (key === void 0) return;
681
+ used.add(key);
682
+ keys[n] = key;
683
+ });
684
+ list.forEach((_entry, n) => {
685
+ if (keys[n] !== void 0) return;
686
+ let key = mint();
687
+ while (map.has(key) || used.has(key)) key = mint();
688
+ used.add(key);
689
+ keys[n] = key;
690
+ });
691
+ }
692
+ const order = positions(keys, position);
693
+ list.forEach(({ item, encoded }, n) => {
694
+ const key = keys[n];
695
+ if (key === void 0) return;
696
+ ids.set(item, key);
697
+ map.setIfChanged(key, { i: order[n] ?? n, d: encoded });
698
+ });
699
+ for (const key of map.keys()) if (!used.has(key)) map.delete(key);
700
+ }
701
+ function readKeyed(map, local, ids, spec) {
702
+ const entries = [...map.entries()].filter((pair) => isEntry(pair[1])).sort((a, b) => a[1].i - b[1].i || (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0));
703
+ const unclaimed = new Set(local);
704
+ const encodedOf = /* @__PURE__ */ new Map();
705
+ const encode = (item) => {
706
+ if (!encodedOf.has(item)) encodedOf.set(item, spec.encode(item));
707
+ return encodedOf.get(item);
708
+ };
709
+ let exact;
710
+ let loose;
711
+ const index = () => {
712
+ if (exact) return;
713
+ exact = /* @__PURE__ */ new Map();
714
+ loose = /* @__PURE__ */ new Map();
715
+ for (const item of local) {
716
+ const encoded = encode(item);
717
+ if (encoded === void 0) continue;
718
+ push(exact, JSON.stringify(encoded), item);
719
+ const nat = naturalOf(spec, encoded);
720
+ if (nat !== void 0) push(loose, nat, item);
721
+ }
722
+ };
723
+ const claim = (found) => {
724
+ while (found?.length) {
725
+ const item = found.shift();
726
+ if (item !== void 0 && unclaimed.has(item)) return item;
727
+ }
728
+ return void 0;
729
+ };
730
+ const next = [];
731
+ const keep = /* @__PURE__ */ new Map();
732
+ for (const [key, entry] of entries) {
733
+ let counterpart = ids.byKey.get(key);
734
+ if (counterpart && !unclaimed.has(counterpart)) counterpart = void 0;
735
+ if (!counterpart) {
736
+ index();
737
+ const nat = naturalOf(spec, entry.d);
738
+ counterpart = claim(exact?.get(JSON.stringify(entry.d))) ?? claim(nat === void 0 ? void 0 : loose?.get(nat));
739
+ }
740
+ let item;
741
+ if (counterpart && jsonEqual(encode(counterpart), entry.d)) item = counterpart;
742
+ else {
743
+ item = spec.decode(entry.d);
744
+ if (!item) continue;
745
+ spec.adopt?.(item, counterpart);
746
+ }
747
+ if (counterpart) unclaimed.delete(counterpart);
748
+ keep.set(key, item);
749
+ next.push(item);
750
+ }
751
+ ids.byKey.clear();
752
+ for (const [key, item] of keep) ids.set(item, key);
753
+ if (next.length === local.length && next.every((item, n) => item === local[n])) return void 0;
754
+ return next;
755
+ }
756
+
757
+ // xlsx/collab/part-specs.ts
758
+ var clone = (value) => JSON.parse(JSON.stringify(value));
759
+ var isText2 = (v, max = 32767) => typeof v === "string" && v.length <= max;
760
+ var isIndex = (v, max) => typeof v === "number" && Number.isInteger(v) && v >= 0 && v <= max;
761
+ function isRange(raw) {
762
+ if (!isRecord(raw) || !isRecord(raw.start) || !isRecord(raw.end)) return false;
763
+ return isIndex(raw.start.row, 1048575) && isIndex(raw.start.col, 16383) && isIndex(raw.end.row, 1048575) && isIndex(raw.end.col, 16383);
764
+ }
765
+ var rangeList = (raw) => Array.isArray(raw) && raw.length <= 4096 && raw.every(isRange);
766
+ var commentSpec = {
767
+ encode: (c) => ({ a: formatAddress(c.address), author: c.author, text: c.text }),
768
+ decode: (raw) => {
769
+ if (!isRecord(raw) || !isText2(raw.a, 12) || !isText2(raw.author, 1024) || !isText2(raw.text))
770
+ return void 0;
771
+ const address = parseAddress(raw.a);
772
+ return address ? { address, author: raw.author, text: raw.text } : void 0;
773
+ },
774
+ fixedKey: (e) => String(e.a),
775
+ adopt: (decoded, local) => {
776
+ if (local?.replies) decoded.replies = local.replies;
777
+ }
778
+ };
779
+ function replySpec(owner, decodedOwner) {
780
+ return {
781
+ encode: (r) => {
782
+ const c = owner.get(r) ?? decodedOwner.get(r);
783
+ if (c === void 0) return void 0;
784
+ const out = { c, author: r.author, text: r.text };
785
+ if (r.date !== void 0) out.date = r.date;
786
+ return out;
787
+ },
788
+ decode: (raw) => {
789
+ if (!isRecord(raw) || !isText2(raw.c, 12) || !isText2(raw.author, 1024) || !isText2(raw.text))
790
+ return void 0;
791
+ if (raw.date !== void 0 && !isText2(raw.date, 64)) return void 0;
792
+ const reply = { author: raw.author, text: raw.text };
793
+ if (raw.date !== void 0) reply.date = raw.date;
794
+ decodedOwner.set(reply, raw.c);
795
+ return reply;
796
+ }
797
+ };
798
+ }
799
+ var conditionalSpec = {
800
+ encode: (cf) => clone(cf),
801
+ decode: (raw) => isRecord(raw) && rangeList(raw.ranges) && Array.isArray(raw.rules) && raw.rules.length <= 1024 ? clone(raw) : void 0
802
+ };
803
+ var validationSpec = {
804
+ encode: (dv) => clone(dv),
805
+ decode: (raw) => isRecord(raw) && rangeList(raw.ranges) && isText2(raw.type, 32) ? clone(raw) : void 0
806
+ };
807
+ var linkSpec = {
808
+ encode: (link) => {
809
+ const { range, ...rest } = clone(link);
810
+ return { r: formatRange(range), ...rest };
811
+ },
812
+ decode: (raw) => {
813
+ if (!isRecord(raw) || !isText2(raw.r, 24)) return void 0;
814
+ const range = parseRange(raw.r);
815
+ if (!range) return void 0;
816
+ const { r: _r, ...rest } = clone(raw);
817
+ return { ...rest, range };
818
+ },
819
+ fixedKey: (e) => String(e.r)
820
+ };
821
+ function withoutPart(item) {
822
+ const out = clone(item);
823
+ delete out.partName;
824
+ return out;
825
+ }
826
+ var tableSpec = {
827
+ encode: (table) => withoutPart(table),
828
+ decode: (raw) => isRecord(raw) && isRange(raw.range) && isText2(raw.name, 255) && isText2(raw.displayName, 255) && Array.isArray(raw.columns) && raw.columns.length <= 16384 ? clone(raw) : void 0,
829
+ natural: (e) => String(e.displayName),
830
+ adopt: (decoded, local) => {
831
+ if (local?.partName !== void 0) decoded.partName = local.partName;
832
+ }
833
+ };
834
+ var chartSpec = {
835
+ encode: (chart) => withoutPart(chart),
836
+ decode: (raw) => isRecord(raw) && raw.kind === "chart" && isRecord(raw.anchor) && isRecord(raw.anchor.from) ? clone(raw) : void 0,
837
+ natural: (e) => {
838
+ const name = e.name;
839
+ return typeof name === "string" ? name : void 0;
840
+ },
841
+ adopt: (decoded, local) => {
842
+ if (local?.partName !== void 0) decoded.partName = local.partName;
843
+ }
844
+ };
845
+
846
+ // xlsx/collab/sheet-parts.ts
847
+ var repliesOwners = (comments) => {
848
+ const owner = /* @__PURE__ */ new Map();
849
+ for (const comment of comments)
850
+ for (const reply of comment.replies ?? []) owner.set(reply, formatAddress(comment.address));
851
+ return owner;
852
+ };
853
+ var allReplies = (comments) => comments.flatMap((comment) => comment.replies ?? []);
854
+ function writeSheetParts(sheet, host, options) {
855
+ const put = (part, items, spec) => writeKeyed(host.store(part), items, host.ids(part), spec, host.mint);
856
+ put("comments", sheet.comments, commentSpec);
857
+ put("replies", allReplies(sheet.comments), replySpec(repliesOwners(sheet.comments), /* @__PURE__ */ new Map()));
858
+ put("cf", sheet.conditionalFormats, conditionalSpec);
859
+ put("dv", sheet.dataValidations, validationSpec);
860
+ put("links", sheet.hyperlinks, linkSpec);
861
+ put("tables", sheet.tables, tableSpec);
862
+ if (options.charts)
863
+ put(
864
+ "charts",
865
+ sheet.drawings.filter(
866
+ (d) => d.kind === "chart"
867
+ ),
868
+ chartSpec
869
+ );
870
+ }
871
+ function applySheetParts(sheet, host, parts) {
872
+ const wants = (part) => !parts || parts.has(part) ? host.store(part) : void 0;
873
+ let changed = false;
874
+ const swap = (part, list, spec, rebuild) => {
875
+ const shared = wants(part);
876
+ const next = shared && readKeyed(shared, list, host.ids(part), spec);
877
+ if (!next) return;
878
+ rebuild(next);
879
+ changed = true;
880
+ };
881
+ const inPlace = (list) => (next) => void list.splice(0, list.length, ...next);
882
+ const commentsShared = wants("comments");
883
+ const repliesShared = wants("replies");
884
+ if (commentsShared || repliesShared) {
885
+ const owners = repliesOwners(sheet.comments);
886
+ const local = allReplies(sheet.comments);
887
+ let commentsNext;
888
+ if (commentsShared) {
889
+ commentsNext = readKeyed(commentsShared, sheet.comments, host.ids("comments"), commentSpec);
890
+ if (commentsNext) sheet.comments.splice(0, sheet.comments.length, ...commentsNext);
891
+ }
892
+ const decoded = /* @__PURE__ */ new Map();
893
+ const repliesNext = repliesShared ? readKeyed(repliesShared, local, host.ids("replies"), replySpec(owners, decoded)) : void 0;
894
+ if (commentsNext || repliesNext) {
895
+ const grouped = /* @__PURE__ */ new Map();
896
+ for (const reply of repliesNext ?? local) {
897
+ const at = decoded.get(reply) ?? owners.get(reply);
898
+ if (at === void 0) continue;
899
+ const list = grouped.get(at);
900
+ if (list) list.push(reply);
901
+ else grouped.set(at, [reply]);
902
+ }
903
+ const same = (x, y) => (x?.length ?? 0) === (y?.length ?? 0) && (x ?? []).every((r, n) => r === y?.[n]);
904
+ sheet.comments.forEach((comment) => {
905
+ const replies = grouped.get(formatAddress(comment.address));
906
+ if (same(replies, comment.replies)) return;
907
+ if (replies) comment.replies = replies;
908
+ else delete comment.replies;
909
+ });
910
+ changed = true;
911
+ }
912
+ }
913
+ swap("cf", sheet.conditionalFormats, conditionalSpec, inPlace(sheet.conditionalFormats));
914
+ swap("dv", sheet.dataValidations, validationSpec, inPlace(sheet.dataValidations));
915
+ swap("links", sheet.hyperlinks, linkSpec, inPlace(sheet.hyperlinks));
916
+ swap("tables", sheet.tables, tableSpec, (next) => {
917
+ const used = /* @__PURE__ */ new Set();
918
+ let max = next.reduce((m, t) => Math.max(m, t.id), 0);
919
+ for (const table of next) {
920
+ if (used.has(table.id)) table.id = ++max;
921
+ used.add(table.id);
922
+ }
923
+ inPlace(sheet.tables)(next);
924
+ });
925
+ const charts = sheet.drawings.filter(
926
+ (d) => d.kind === "chart"
927
+ );
928
+ swap("charts", charts, chartSpec, (next) => {
929
+ let k = 0;
930
+ const merged = [];
931
+ for (const drawing of sheet.drawings) {
932
+ if (drawing.kind !== "chart") merged.push(drawing);
933
+ else if (k < next.length) merged.push(next[k++]);
934
+ }
935
+ while (k < next.length) merged.push(next[k++]);
936
+ sheet.drawings.splice(0, sheet.drawings.length, ...merged);
937
+ });
938
+ return changed;
939
+ }
940
+
536
941
  // xlsx/collab/sheets.ts
537
942
  var STATES = ["visible", "hidden", "veryHidden"];
538
943
  var isNumber = (v) => typeof v === "number" && Number.isFinite(v);
@@ -585,9 +990,21 @@ var SheetKeys = class {
585
990
  clientId;
586
991
  byObject = /* @__PURE__ */ new WeakMap();
587
992
  counter = 0;
993
+ partIds = /* @__PURE__ */ new Map();
588
994
  remember(sheet, key) {
589
995
  this.byObject.set(sheet, key);
590
996
  }
997
+ /** Item identity of a keyed part of the sheet with `sheetKey`. */
998
+ ids(sheetKey, part) {
999
+ const id = `${sheetKey}/${part}`;
1000
+ let ids = this.partIds.get(id);
1001
+ if (!ids) this.partIds.set(id, ids = new PartIds());
1002
+ return ids;
1003
+ }
1004
+ /** A new key for a part item, unique to this peer. */
1005
+ mint() {
1006
+ return `${this.clientId.toString(36)}-${(this.counter++).toString(36)}`;
1007
+ }
591
1008
  /** The key of a known sheet object, else of the shared sheet with its sheetId. */
592
1009
  find(sheet, entries) {
593
1010
  const known = this.byObject.get(sheet);
@@ -756,7 +1173,120 @@ var StyleBridge = class {
756
1173
  };
757
1174
  };
758
1175
 
1176
+ // xlsx/collab/write.ts
1177
+ var partHost = (shared, keys, sheetKey) => ({
1178
+ store: (part) => new PrefixStore(shared.parts[part], sheetKey),
1179
+ ids: (part) => keys.ids(sheetKey, part),
1180
+ mint: () => keys.mint()
1181
+ });
1182
+ var PROBE_LIMIT = 4096;
1183
+ function writeWorkbook(shared, keys, workbook, scope) {
1184
+ const { meta, sheets } = shared;
1185
+ setIfChanged(meta, "v", SCHEMA_VERSION);
1186
+ setIfChanged(meta, "parts", 1);
1187
+ let defaultKey = meta.get("defaultStyle");
1188
+ if (typeof defaultKey !== "string") {
1189
+ const base = workbook.styles[0];
1190
+ defaultKey = base ? sharedStyleKey(base) : "";
1191
+ meta.set("defaultStyle", defaultKey);
1192
+ }
1193
+ const styles = new StyleBridge(workbook, shared.styles, defaultKey, true);
1194
+ styles.keyOf(0);
1195
+ const entries = sheetEntries(sheets);
1196
+ const known = workbook.sheets.map((sheet) => keys.find(sheet, entries));
1197
+ const full = scope.kind === "all" || known.some((key) => key === void 0 || !sheets.has(key));
1198
+ if (full) setIfChanged(meta, "date1904", workbook.date1904);
1199
+ const keyList = workbook.sheets.map((sheet) => keys.resolve(sheet, entries, sheets));
1200
+ if (full) {
1201
+ const live = new Set(keyList);
1202
+ for (const key of [...sheets.keys()]) if (!live.has(key)) sheets.delete(key);
1203
+ for (const part of LIST_PARTS)
1204
+ for (const key of [...shared.parts[part].keys()])
1205
+ if (!live.has(key.slice(0, key.indexOf("/")))) shared.parts[part].delete(key);
1206
+ }
1207
+ workbook.sheets.forEach((sheet, index) => {
1208
+ const key = keyList[index];
1209
+ if (key === void 0) return;
1210
+ let map = childMap(sheets, key);
1211
+ const created = !map;
1212
+ if (!map) {
1213
+ map = newSheetMap();
1214
+ sheets.set(key, map);
1215
+ }
1216
+ if (!full && !created && scope.kind === "sheet" && scope.sheet !== index) {
1217
+ writeProps(map, sheet);
1218
+ return;
1219
+ }
1220
+ writeProps(map, sheet);
1221
+ writeLines(
1222
+ sheet,
1223
+ {
1224
+ rows: sheetPart(map, "rows"),
1225
+ cols: sheetPart(map, "cols"),
1226
+ merges: sheetPart(map, "merges")
1227
+ },
1228
+ styles.keyOf
1229
+ );
1230
+ const ranges = !full && scope.kind === "sheet" ? scope.ranges : void 0;
1231
+ writeCells(sheet, sheetPart(map, "cells"), styles.keyOf, ranges);
1232
+ writeSheetParts(sheet, partHost(shared, keys, key), { charts: ranges === void 0 });
1233
+ });
1234
+ writeOrder(sheets, keyList, entries);
1235
+ writeNames(shared.names, workbook.definedNames, (index) => keyList[index]);
1236
+ }
1237
+ function writeProps(map, sheet) {
1238
+ const props = sheetPart(map, "props");
1239
+ setIfChanged(props, "name", sheet.name);
1240
+ setIfChanged(props, "sheetId", sheet.sheetId);
1241
+ setIfChanged(props, "state", sheet.state);
1242
+ setIfChanged(props, "tab", sheet.tabColor ? structuredClone(sheet.tabColor) : void 0);
1243
+ setIfChanged(props, "rh", sheet.defaultRowHeight);
1244
+ setIfChanged(props, "cw", sheet.defaultColWidth);
1245
+ }
1246
+ function writeOrder(sheets, keyList, entries) {
1247
+ const orders = new Map(entries.map((entry) => [entry.key, entry.order]));
1248
+ const current = keyList.map((key) => {
1249
+ const props = childMap(sheets, key);
1250
+ return props && childMap(props, "props")?.has("order") ? orders.get(key) : void 0;
1251
+ });
1252
+ for (const [index, order] of reorder(current)) {
1253
+ const key = keyList[index];
1254
+ const props = key === void 0 ? void 0 : childMap(sheets, key);
1255
+ if (props) sheetPart(props, "props").set("order", order);
1256
+ }
1257
+ }
1258
+ function writeCells(sheet, cells, keyOf, ranges) {
1259
+ const write = (row, col) => {
1260
+ const key = formatAddress({ row, col });
1261
+ const cell = getCell(sheet, row, col);
1262
+ setIfChanged(cells, key, cell && encodeCell(cell, keyOf));
1263
+ return key;
1264
+ };
1265
+ if (!ranges) {
1266
+ const live = /* @__PURE__ */ new Set();
1267
+ forEachCell(sheet, (_cell, row, col) => live.add(write(row, col)));
1268
+ for (const key of [...cells.keys()]) if (!live.has(key)) cells.delete(key);
1269
+ return;
1270
+ }
1271
+ for (const raw of ranges) {
1272
+ const range = normalizeRange(raw);
1273
+ const area = (range.end.row - range.start.row + 1) * (range.end.col - range.start.col + 1);
1274
+ if (area <= PROBE_LIMIT) {
1275
+ for (let row = range.start.row; row <= range.end.row; row++)
1276
+ for (let col = range.start.col; col <= range.end.col; col++) write(row, col);
1277
+ continue;
1278
+ }
1279
+ const live = /* @__PURE__ */ new Set();
1280
+ forEachCellInRange(sheet, range, (_cell, row, col) => live.add(write(row, col)));
1281
+ for (const key of [...cells.keys()]) {
1282
+ const at = parseAddress(key);
1283
+ if (!live.has(key) && at && rangeContains(range, at)) cells.delete(key);
1284
+ }
1285
+ }
1286
+ }
1287
+
759
1288
  // xlsx/collab/apply.ts
1289
+ var sharesParts = (shared) => shared.meta.get("parts") === 1;
760
1290
  function applyShared(shared, keys, workbook, dirty, label = "Remote change") {
761
1291
  const defaultKey = shared.meta.get("defaultStyle");
762
1292
  const styles = new StyleBridge(workbook, shared.styles, String(defaultKey ?? ""), false);
@@ -796,6 +1326,8 @@ function applyShared(shared, keys, workbook, dirty, label = "Remote change") {
796
1326
  applyMerges(sheet, merges);
797
1327
  sheetsTouched.add(index);
798
1328
  }
1329
+ if (sharesParts(shared) && applySheetParts(sheet, partHost(shared, keys, key), full ? void 0 : part.parts))
1330
+ sheetsTouched.add(index);
799
1331
  const cells = childMap(map, "cells");
800
1332
  if (!cells) continue;
801
1333
  const put = (address) => {
@@ -875,7 +1407,14 @@ var isDirty = (dirty) => dirty.all || dirty.list || dirty.names || dirty.sheets.
875
1407
  function sheetDirty(dirty, key) {
876
1408
  let entry = dirty.sheets.get(key);
877
1409
  if (!entry) {
878
- entry = { full: false, rows: /* @__PURE__ */ new Set(), cols: false, merges: false, cells: /* @__PURE__ */ new Set() };
1410
+ entry = {
1411
+ full: false,
1412
+ rows: /* @__PURE__ */ new Set(),
1413
+ cols: false,
1414
+ merges: false,
1415
+ cells: /* @__PURE__ */ new Set(),
1416
+ parts: /* @__PURE__ */ new Set()
1417
+ };
879
1418
  dirty.sheets.set(key, entry);
880
1419
  }
881
1420
  return entry;
@@ -891,6 +1430,14 @@ function collectDirty(dirty, top, events) {
891
1430
  dirty.names = true;
892
1431
  return;
893
1432
  }
1433
+ if (top !== "sheets") {
1434
+ for (const event of events)
1435
+ for (const key of changedKeys(event)) {
1436
+ const sheet = key.slice(0, Math.max(0, key.indexOf("/")));
1437
+ if (sheet) sheetDirty(dirty, sheet).parts.add(top);
1438
+ }
1439
+ return;
1440
+ }
894
1441
  for (const event of events) {
895
1442
  const path = event.path;
896
1443
  const key = path[0];
@@ -911,108 +1458,6 @@ function collectDirty(dirty, top, events) {
911
1458
  }
912
1459
  }
913
1460
 
914
- // xlsx/collab/write.ts
915
- var PROBE_LIMIT = 4096;
916
- function writeWorkbook(shared, keys, workbook, scope) {
917
- const { meta, sheets } = shared;
918
- setIfChanged(meta, "v", SCHEMA_VERSION);
919
- let defaultKey = meta.get("defaultStyle");
920
- if (typeof defaultKey !== "string") {
921
- const base = workbook.styles[0];
922
- defaultKey = base ? sharedStyleKey(base) : "";
923
- meta.set("defaultStyle", defaultKey);
924
- }
925
- const styles = new StyleBridge(workbook, shared.styles, defaultKey, true);
926
- styles.keyOf(0);
927
- const entries = sheetEntries(sheets);
928
- const known = workbook.sheets.map((sheet) => keys.find(sheet, entries));
929
- const full = scope.kind === "all" || known.some((key) => key === void 0 || !sheets.has(key));
930
- if (full) setIfChanged(meta, "date1904", workbook.date1904);
931
- const keyList = workbook.sheets.map((sheet) => keys.resolve(sheet, entries, sheets));
932
- if (full) {
933
- const live = new Set(keyList);
934
- for (const key of [...sheets.keys()]) if (!live.has(key)) sheets.delete(key);
935
- }
936
- workbook.sheets.forEach((sheet, index) => {
937
- const key = keyList[index];
938
- if (key === void 0) return;
939
- let map = childMap(sheets, key);
940
- const created = !map;
941
- if (!map) {
942
- map = newSheetMap();
943
- sheets.set(key, map);
944
- }
945
- if (!full && !created && scope.kind === "sheet" && scope.sheet !== index) {
946
- writeProps(map, sheet);
947
- return;
948
- }
949
- writeProps(map, sheet);
950
- writeLines(
951
- sheet,
952
- {
953
- rows: sheetPart(map, "rows"),
954
- cols: sheetPart(map, "cols"),
955
- merges: sheetPart(map, "merges")
956
- },
957
- styles.keyOf
958
- );
959
- const ranges = !full && scope.kind === "sheet" ? scope.ranges : void 0;
960
- writeCells(sheet, sheetPart(map, "cells"), styles.keyOf, ranges);
961
- });
962
- writeOrder(sheets, keyList, entries);
963
- writeNames(shared.names, workbook.definedNames, (index) => keyList[index]);
964
- }
965
- function writeProps(map, sheet) {
966
- const props = sheetPart(map, "props");
967
- setIfChanged(props, "name", sheet.name);
968
- setIfChanged(props, "sheetId", sheet.sheetId);
969
- setIfChanged(props, "state", sheet.state);
970
- setIfChanged(props, "tab", sheet.tabColor ? structuredClone(sheet.tabColor) : void 0);
971
- setIfChanged(props, "rh", sheet.defaultRowHeight);
972
- setIfChanged(props, "cw", sheet.defaultColWidth);
973
- }
974
- function writeOrder(sheets, keyList, entries) {
975
- const orders = new Map(entries.map((entry) => [entry.key, entry.order]));
976
- const current = keyList.map((key) => {
977
- const props = childMap(sheets, key);
978
- return props && childMap(props, "props")?.has("order") ? orders.get(key) : void 0;
979
- });
980
- for (const [index, order] of reorder(current)) {
981
- const key = keyList[index];
982
- const props = key === void 0 ? void 0 : childMap(sheets, key);
983
- if (props) sheetPart(props, "props").set("order", order);
984
- }
985
- }
986
- function writeCells(sheet, cells, keyOf, ranges) {
987
- const write = (row, col) => {
988
- const key = formatAddress({ row, col });
989
- const cell = getCell(sheet, row, col);
990
- setIfChanged(cells, key, cell && encodeCell(cell, keyOf));
991
- return key;
992
- };
993
- if (!ranges) {
994
- const live = /* @__PURE__ */ new Set();
995
- forEachCell(sheet, (_cell, row, col) => live.add(write(row, col)));
996
- for (const key of [...cells.keys()]) if (!live.has(key)) cells.delete(key);
997
- return;
998
- }
999
- for (const raw of ranges) {
1000
- const range = normalizeRange(raw);
1001
- const area = (range.end.row - range.start.row + 1) * (range.end.col - range.start.col + 1);
1002
- if (area <= PROBE_LIMIT) {
1003
- for (let row = range.start.row; row <= range.end.row; row++)
1004
- for (let col = range.start.col; col <= range.end.col; col++) write(row, col);
1005
- continue;
1006
- }
1007
- const live = /* @__PURE__ */ new Set();
1008
- forEachCellInRange(sheet, range, (_cell, row, col) => live.add(write(row, col)));
1009
- for (const key of [...cells.keys()]) {
1010
- const at = parseAddress(key);
1011
- if (!live.has(key) && at && rangeContains(range, at)) cells.delete(key);
1012
- }
1013
- }
1014
- }
1015
-
1016
1461
  // xlsx/collab/adapter.ts
1017
1462
  var isSharedWorkbookEmpty = (doc) => sharedWorkbook(doc).sheets.size === 0;
1018
1463
  function readSharedWorkbook(doc, base) {
@@ -1153,7 +1598,7 @@ function bindWorkbookSession(host, edit, options = {}) {
1153
1598
  unsent = false;
1154
1599
  };
1155
1600
  const observers = types.map((type, i) => {
1156
- const top = ["meta", "styles", "names", "sheets"][i] ?? "sheets";
1601
+ const top = [...["meta", "styles", "names", "sheets"], ...LIST_PARTS][i] ?? "sheets";
1157
1602
  const observer = (events, transaction) => {
1158
1603
  const origin = transaction.origin;
1159
1604
  if (origin === XLSX_EDIT_ORIGIN || origin === XLSX_SYNC_ORIGIN) return;