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