ooxml-core 0.19.0 → 0.21.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 (328) hide show
  1. package/README.md +21 -43
  2. package/dist/automation/index.cjs +195 -193
  3. package/dist/automation/index.mjs +195 -193
  4. package/dist/chart/axis-nice.d.ts +97 -0
  5. package/dist/chart/axis-nice.d.ts.map +1 -0
  6. package/dist/chart/histogram-binning.d.ts +40 -0
  7. package/dist/chart/histogram-binning.d.ts.map +1 -0
  8. package/dist/chart/index.cjs +167 -0
  9. package/dist/chart/index.d.ts +2 -0
  10. package/dist/chart/index.d.ts.map +1 -1
  11. package/dist/chart/index.mjs +162 -1
  12. package/dist/diagram/index.cjs +2 -1
  13. package/dist/diagram/index.mjs +2 -1
  14. package/dist/docx/attr-units.d.ts +11 -0
  15. package/dist/docx/attr-units.d.ts.map +1 -0
  16. package/dist/docx/block-parser.d.ts.map +1 -1
  17. package/dist/docx/case-transform.d.ts +9 -0
  18. package/dist/docx/case-transform.d.ts.map +1 -0
  19. package/dist/docx/embedded.cjs +2 -1
  20. package/dist/docx/embedded.mjs +2 -1
  21. package/dist/docx/index.cjs +289 -3
  22. package/dist/docx/index.d.ts +5 -0
  23. package/dist/docx/index.d.ts.map +1 -1
  24. package/dist/docx/index.mjs +269 -4
  25. package/dist/docx/layout/adapter.d.ts.map +1 -1
  26. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  27. package/dist/docx/load/index.cjs +2 -1
  28. package/dist/docx/load/index.mjs +2 -1
  29. package/dist/docx/page-setup-model.d.ts +29 -0
  30. package/dist/docx/page-setup-model.d.ts.map +1 -0
  31. package/dist/docx/page-size.d.ts +11 -0
  32. package/dist/docx/page-size.d.ts.map +1 -0
  33. package/dist/docx/parse.d.ts.map +1 -1
  34. package/dist/docx/section-edit.d.ts +19 -0
  35. package/dist/docx/section-edit.d.ts.map +1 -0
  36. package/dist/docx/tab-stops.d.ts.map +1 -1
  37. package/dist/docx/ui/backstage-focus.d.ts +6 -0
  38. package/dist/docx/ui/backstage-focus.d.ts.map +1 -0
  39. package/dist/docx/ui/break-note-schema.d.ts +11 -0
  40. package/dist/docx/ui/break-note-schema.d.ts.map +1 -0
  41. package/dist/docx/ui/collaboration-authority.d.ts +31 -0
  42. package/dist/docx/ui/collaboration-authority.d.ts.map +1 -0
  43. package/dist/docx/ui/collaboration-identity.d.ts +8 -0
  44. package/dist/docx/ui/collaboration-identity.d.ts.map +1 -0
  45. package/dist/docx/ui/collaboration-protocol.d.ts +25 -0
  46. package/dist/docx/ui/collaboration-protocol.d.ts.map +1 -0
  47. package/dist/docx/ui/collaboration.d.ts +30 -0
  48. package/dist/docx/ui/collaboration.d.ts.map +1 -0
  49. package/dist/docx/ui/defined.d.ts +3 -0
  50. package/dist/docx/ui/defined.d.ts.map +1 -0
  51. package/dist/docx/ui/dirty-state.d.ts +9 -0
  52. package/dist/docx/ui/dirty-state.d.ts.map +1 -0
  53. package/dist/docx/ui/field-guard.d.ts +21 -0
  54. package/dist/docx/ui/field-guard.d.ts.map +1 -0
  55. package/dist/docx/ui/header-footer-history.d.ts +15 -0
  56. package/dist/docx/ui/header-footer-history.d.ts.map +1 -0
  57. package/dist/docx/ui/index.cjs +2380 -0
  58. package/dist/docx/ui/index.d.ts +30 -0
  59. package/dist/docx/ui/index.d.ts.map +1 -0
  60. package/dist/docx/ui/index.mjs +2317 -0
  61. package/dist/docx/ui/inline-content-schema.d.ts +15 -0
  62. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -0
  63. package/dist/docx/ui/ligature-style.d.ts +4 -0
  64. package/dist/docx/ui/ligature-style.d.ts.map +1 -0
  65. package/dist/docx/ui/node-numbering.d.ts +8 -0
  66. package/dist/docx/ui/node-numbering.d.ts.map +1 -0
  67. package/dist/docx/ui/review-schema.d.ts +90 -0
  68. package/dist/docx/ui/review-schema.d.ts.map +1 -0
  69. package/dist/docx/ui/ribbon-action-ids.d.ts +26 -0
  70. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -0
  71. package/dist/docx/ui/ribbon-colors.d.ts +3 -0
  72. package/dist/docx/ui/ribbon-colors.d.ts.map +1 -0
  73. package/dist/docx/ui/ribbon-legacy-labels.d.ts +6 -0
  74. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -0
  75. package/dist/docx/ui/run-compare.d.ts +5 -0
  76. package/dist/docx/ui/run-compare.d.ts.map +1 -0
  77. package/dist/docx/ui/run-extra-mark.d.ts +17 -0
  78. package/dist/docx/ui/run-extra-mark.d.ts.map +1 -0
  79. package/dist/docx/ui/schema-marks.d.ts +273 -0
  80. package/dist/docx/ui/schema-marks.d.ts.map +1 -0
  81. package/dist/docx/ui/smartart-theme.d.ts +21 -0
  82. package/dist/docx/ui/smartart-theme.d.ts.map +1 -0
  83. package/dist/docx/ui/table-render.d.ts +24 -0
  84. package/dist/docx/ui/table-render.d.ts.map +1 -0
  85. package/dist/docx/ui/table-visuals.d.ts +3 -0
  86. package/dist/docx/ui/table-visuals.d.ts.map +1 -0
  87. package/dist/docx/ui/theme/css-vars.d.ts +6 -0
  88. package/dist/docx/ui/theme/css-vars.d.ts.map +1 -0
  89. package/dist/docx/ui/theme/defaults.d.ts +12 -0
  90. package/dist/docx/ui/theme/defaults.d.ts.map +1 -0
  91. package/dist/docx/ui/theme/element.d.ts +9 -0
  92. package/dist/docx/ui/theme/element.d.ts.map +1 -0
  93. package/dist/docx/ui/theme/index.d.ts +5 -0
  94. package/dist/docx/ui/theme/index.d.ts.map +1 -0
  95. package/dist/docx/ui/theme/types.d.ts +42 -0
  96. package/dist/docx/ui/theme/types.d.ts.map +1 -0
  97. package/dist/docx/ui/word-count.d.ts +3 -0
  98. package/dist/docx/ui/word-count.d.ts.map +1 -0
  99. package/dist/docx/ui/zoom-fit.d.ts +16 -0
  100. package/dist/docx/ui/zoom-fit.d.ts.map +1 -0
  101. package/dist/docx/validate-paragraph.d.ts.map +1 -1
  102. package/dist/index.cjs +169 -1
  103. package/dist/index.mjs +169 -1
  104. package/dist/math/index.cjs +2 -1
  105. package/dist/math/index.mjs +2 -1
  106. package/dist/opc/index.cjs +2 -1
  107. package/dist/opc/index.mjs +2 -1
  108. package/dist/pptx/automation/index.cjs +1572 -863
  109. package/dist/pptx/automation/index.d.ts +4 -3
  110. package/dist/pptx/automation/index.d.ts.map +1 -1
  111. package/dist/pptx/automation/index.mjs +1572 -863
  112. package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts +42 -0
  113. package/dist/pptx/chunks/color-ref-BM66NGFP.d.ts.map +1 -0
  114. package/dist/pptx/chunks/{index-D0yGoLyw.d.ts → index-CcQTCBnT.d.ts} +63 -479
  115. package/dist/pptx/chunks/index-CcQTCBnT.d.ts.map +1 -0
  116. package/dist/pptx/chunks/{index-BtBj3VG1.d.ts → index-DHoPgFcH.d.ts} +529 -11
  117. package/dist/pptx/chunks/index-DHoPgFcH.d.ts.map +1 -0
  118. package/dist/pptx/chunks/{text-operations-GuisjlbR.d.ts → text-operations-BzdehTeY.d.ts} +50 -51
  119. package/dist/pptx/chunks/text-operations-BzdehTeY.d.ts.map +1 -0
  120. package/dist/pptx/cli/index.cjs +1204 -489
  121. package/dist/pptx/cli/index.d.ts +1 -1
  122. package/dist/pptx/cli/index.mjs +1204 -489
  123. package/dist/pptx/converter/index.cjs +8 -5
  124. package/dist/pptx/converter/index.d.ts +1 -1
  125. package/dist/pptx/converter/index.mjs +8 -5
  126. package/dist/pptx/index.cjs +1699 -989
  127. package/dist/pptx/index.d.ts +5 -4
  128. package/dist/pptx/index.mjs +1698 -990
  129. package/dist/pptx/ui/index.cjs +510 -0
  130. package/dist/pptx/ui/index.d.ts +80 -0
  131. package/dist/pptx/ui/index.d.ts.map +1 -0
  132. package/dist/pptx/ui/index.mjs +499 -0
  133. package/dist/visio/index.cjs +2 -1
  134. package/dist/visio/index.mjs +2 -1
  135. package/dist/visio/ui/contract.d.ts +33 -0
  136. package/dist/visio/ui/contract.d.ts.map +1 -0
  137. package/dist/visio/ui/demo-document.d.ts +4 -0
  138. package/dist/visio/ui/demo-document.d.ts.map +1 -0
  139. package/dist/visio/ui/diagnostics.d.ts +10 -0
  140. package/dist/visio/ui/diagnostics.d.ts.map +1 -0
  141. package/dist/visio/ui/document-history.d.ts +43 -0
  142. package/dist/visio/ui/document-history.d.ts.map +1 -0
  143. package/dist/visio/ui/document-text-search.d.ts +45 -0
  144. package/dist/visio/ui/document-text-search.d.ts.map +1 -0
  145. package/dist/visio/ui/edit-commands.d.ts +4 -0
  146. package/dist/visio/ui/edit-commands.d.ts.map +1 -0
  147. package/dist/visio/ui/edit-error.d.ts +5 -0
  148. package/dist/visio/ui/edit-error.d.ts.map +1 -0
  149. package/dist/visio/ui/foreign-vector-budget.d.ts +25 -0
  150. package/dist/visio/ui/foreign-vector-budget.d.ts.map +1 -0
  151. package/dist/visio/ui/index.cjs +1523 -0
  152. package/dist/visio/ui/index.d.ts +12 -0
  153. package/dist/visio/ui/index.d.ts.map +1 -0
  154. package/dist/visio/ui/index.mjs +1498 -0
  155. package/dist/visio/ui/scene-details.d.ts +8 -0
  156. package/dist/visio/ui/scene-details.d.ts.map +1 -0
  157. package/dist/visio/ui/scene-validation.d.ts +5 -0
  158. package/dist/visio/ui/scene-validation.d.ts.map +1 -0
  159. package/dist/visio/ui/snapshot-scene.d.ts +9 -0
  160. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -0
  161. package/dist/xlsx/index.cjs +100 -98
  162. package/dist/xlsx/index.mjs +100 -98
  163. package/dist/xlsx/load/index.cjs +68 -66
  164. package/dist/xlsx/load/index.mjs +68 -66
  165. package/dist/xlsx/ui/backstage/templates.d.ts +16 -0
  166. package/dist/xlsx/ui/backstage/templates.d.ts.map +1 -0
  167. package/dist/xlsx/ui/commands/alignment.d.ts +4 -0
  168. package/dist/xlsx/ui/commands/alignment.d.ts.map +1 -0
  169. package/dist/xlsx/ui/commands/cells.d.ts +3 -0
  170. package/dist/xlsx/ui/commands/cells.d.ts.map +1 -0
  171. package/dist/xlsx/ui/commands/cf-presets.d.ts +15 -0
  172. package/dist/xlsx/ui/commands/cf-presets.d.ts.map +1 -0
  173. package/dist/xlsx/ui/commands/clipboard.d.ts +22 -0
  174. package/dist/xlsx/ui/commands/clipboard.d.ts.map +1 -0
  175. package/dist/xlsx/ui/commands/contextual.d.ts +13 -0
  176. package/dist/xlsx/ui/commands/contextual.d.ts.map +1 -0
  177. package/dist/xlsx/ui/commands/data.d.ts +3 -0
  178. package/dist/xlsx/ui/commands/data.d.ts.map +1 -0
  179. package/dist/xlsx/ui/commands/editing.d.ts +13 -0
  180. package/dist/xlsx/ui/commands/editing.d.ts.map +1 -0
  181. package/dist/xlsx/ui/commands/font.d.ts +21 -0
  182. package/dist/xlsx/ui/commands/font.d.ts.map +1 -0
  183. package/dist/xlsx/ui/commands/formulas.d.ts +15 -0
  184. package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -0
  185. package/dist/xlsx/ui/commands/i18n/core-features.d.ts +3 -0
  186. package/dist/xlsx/ui/commands/i18n/core-features.d.ts.map +1 -0
  187. package/dist/xlsx/ui/commands/i18n/format-cells.d.ts +3 -0
  188. package/dist/xlsx/ui/commands/i18n/format-cells.d.ts.map +1 -0
  189. package/dist/xlsx/ui/commands/i18n/index.d.ts +4 -0
  190. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -0
  191. package/dist/xlsx/ui/commands/i18n/messages.d.ts +3 -0
  192. package/dist/xlsx/ui/commands/i18n/messages.d.ts.map +1 -0
  193. package/dist/xlsx/ui/commands/i18n/navigation.d.ts +3 -0
  194. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -0
  195. package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts +3 -0
  196. package/dist/xlsx/ui/commands/i18n/ribbon-home.d.ts.map +1 -0
  197. package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts +3 -0
  198. package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -0
  199. package/dist/xlsx/ui/commands/i18n/rules.d.ts +3 -0
  200. package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -0
  201. package/dist/xlsx/ui/commands/i18n/tools.d.ts +3 -0
  202. package/dist/xlsx/ui/commands/i18n/tools.d.ts.map +1 -0
  203. package/dist/xlsx/ui/commands/i18n/types.d.ts +5 -0
  204. package/dist/xlsx/ui/commands/i18n/types.d.ts.map +1 -0
  205. package/dist/xlsx/ui/commands/icons.d.ts +4 -0
  206. package/dist/xlsx/ui/commands/icons.d.ts.map +1 -0
  207. package/dist/xlsx/ui/commands/number.d.ts +11 -0
  208. package/dist/xlsx/ui/commands/number.d.ts.map +1 -0
  209. package/dist/xlsx/ui/commands/page-layout.d.ts +10 -0
  210. package/dist/xlsx/ui/commands/page-layout.d.ts.map +1 -0
  211. package/dist/xlsx/ui/commands/select-special.d.ts +12 -0
  212. package/dist/xlsx/ui/commands/select-special.d.ts.map +1 -0
  213. package/dist/xlsx/ui/commands/sort-filter.d.ts +3 -0
  214. package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -0
  215. package/dist/xlsx/ui/commands/style-presets.d.ts +21 -0
  216. package/dist/xlsx/ui/commands/style-presets.d.ts.map +1 -0
  217. package/dist/xlsx/ui/commands/util.d.ts +59 -0
  218. package/dist/xlsx/ui/commands/util.d.ts.map +1 -0
  219. package/dist/xlsx/ui/commands.d.ts +36 -0
  220. package/dist/xlsx/ui/commands.d.ts.map +1 -0
  221. package/dist/xlsx/ui/context-menu/items.d.ts +36 -0
  222. package/dist/xlsx/ui/context-menu/items.d.ts.map +1 -0
  223. package/dist/xlsx/ui/context.d.ts +65 -0
  224. package/dist/xlsx/ui/context.d.ts.map +1 -0
  225. package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts +28 -0
  226. package/dist/xlsx/ui/dialogs/format-cells/number-categories.d.ts.map +1 -0
  227. package/dist/xlsx/ui/dialogs/format-cells/types.d.ts +40 -0
  228. package/dist/xlsx/ui/dialogs/format-cells/types.d.ts.map +1 -0
  229. package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts +9 -0
  230. package/dist/xlsx/ui/dialogs/insert-chart-model.d.ts.map +1 -0
  231. package/dist/xlsx/ui/dialogs.d.ts +9 -0
  232. package/dist/xlsx/ui/dialogs.d.ts.map +1 -0
  233. package/dist/xlsx/ui/dirty-state.d.ts +9 -0
  234. package/dist/xlsx/ui/dirty-state.d.ts.map +1 -0
  235. package/dist/xlsx/ui/formula-bar/name-resolve.d.ts +23 -0
  236. package/dist/xlsx/ui/formula-bar/name-resolve.d.ts.map +1 -0
  237. package/dist/xlsx/ui/grid/cell-items.d.ts +42 -0
  238. package/dist/xlsx/ui/grid/cell-items.d.ts.map +1 -0
  239. package/dist/xlsx/ui/grid/cell-paint.d.ts +26 -0
  240. package/dist/xlsx/ui/grid/cell-paint.d.ts.map +1 -0
  241. package/dist/xlsx/ui/grid/edit-bridge.d.ts +47 -0
  242. package/dist/xlsx/ui/grid/edit-bridge.d.ts.map +1 -0
  243. package/dist/xlsx/ui/grid/geometry.d.ts +76 -0
  244. package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -0
  245. package/dist/xlsx/ui/grid/icon-sets.d.ts +3 -0
  246. package/dist/xlsx/ui/grid/icon-sets.d.ts.map +1 -0
  247. package/dist/xlsx/ui/grid/number-fit.d.ts +3 -0
  248. package/dist/xlsx/ui/grid/number-fit.d.ts.map +1 -0
  249. package/dist/xlsx/ui/grid/selection-ops.d.ts +32 -0
  250. package/dist/xlsx/ui/grid/selection-ops.d.ts.map +1 -0
  251. package/dist/xlsx/ui/grid/view-cache.d.ts +15 -0
  252. package/dist/xlsx/ui/grid/view-cache.d.ts.map +1 -0
  253. package/dist/xlsx/ui/index.cjs +28484 -0
  254. package/dist/xlsx/ui/index.d.ts +56 -0
  255. package/dist/xlsx/ui/index.d.ts.map +1 -0
  256. package/dist/xlsx/ui/index.mjs +28290 -0
  257. package/dist/xlsx/ui/locales/de/commands.d.ts +2 -0
  258. package/dist/xlsx/ui/locales/de/commands.d.ts.map +1 -0
  259. package/dist/xlsx/ui/locales/de/grid.d.ts +2 -0
  260. package/dist/xlsx/ui/locales/de/grid.d.ts.map +1 -0
  261. package/dist/xlsx/ui/locales/de/index.d.ts +2 -0
  262. package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -0
  263. package/dist/xlsx/ui/locales/de/shell.d.ts +2 -0
  264. package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -0
  265. package/dist/xlsx/ui/locales/en/commands.d.ts +2 -0
  266. package/dist/xlsx/ui/locales/en/commands.d.ts.map +1 -0
  267. package/dist/xlsx/ui/locales/en/grid.d.ts +2 -0
  268. package/dist/xlsx/ui/locales/en/grid.d.ts.map +1 -0
  269. package/dist/xlsx/ui/locales/en/index.d.ts +2 -0
  270. package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -0
  271. package/dist/xlsx/ui/locales/en/shell.d.ts +2 -0
  272. package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -0
  273. package/dist/xlsx/ui/locales/es/commands.d.ts +2 -0
  274. package/dist/xlsx/ui/locales/es/commands.d.ts.map +1 -0
  275. package/dist/xlsx/ui/locales/es/grid.d.ts +2 -0
  276. package/dist/xlsx/ui/locales/es/grid.d.ts.map +1 -0
  277. package/dist/xlsx/ui/locales/es/index.d.ts +2 -0
  278. package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -0
  279. package/dist/xlsx/ui/locales/es/shell.d.ts +2 -0
  280. package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -0
  281. package/dist/xlsx/ui/locales/fr/commands.d.ts +2 -0
  282. package/dist/xlsx/ui/locales/fr/commands.d.ts.map +1 -0
  283. package/dist/xlsx/ui/locales/fr/grid.d.ts +2 -0
  284. package/dist/xlsx/ui/locales/fr/grid.d.ts.map +1 -0
  285. package/dist/xlsx/ui/locales/fr/index.d.ts +2 -0
  286. package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -0
  287. package/dist/xlsx/ui/locales/fr/shell.d.ts +2 -0
  288. package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -0
  289. package/dist/xlsx/ui/locales/merge.d.ts +7 -0
  290. package/dist/xlsx/ui/locales/merge.d.ts.map +1 -0
  291. package/dist/xlsx/ui/locales/zh-CN/commands.d.ts +2 -0
  292. package/dist/xlsx/ui/locales/zh-CN/commands.d.ts.map +1 -0
  293. package/dist/xlsx/ui/locales/zh-CN/grid.d.ts +2 -0
  294. package/dist/xlsx/ui/locales/zh-CN/grid.d.ts.map +1 -0
  295. package/dist/xlsx/ui/locales/zh-CN/index.d.ts +2 -0
  296. package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -0
  297. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts +2 -0
  298. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -0
  299. package/dist/xlsx/ui/localization.d.ts +23 -0
  300. package/dist/xlsx/ui/localization.d.ts.map +1 -0
  301. package/dist/xlsx/ui/ribbon/icon-paths.d.ts +9 -0
  302. package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -0
  303. package/dist/xlsx/ui/ribbon/parts.d.ts +88 -0
  304. package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -0
  305. package/dist/xlsx/ui/ribbon/tab-api.d.ts +21 -0
  306. package/dist/xlsx/ui/ribbon/tab-api.d.ts.map +1 -0
  307. package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts +5 -0
  308. package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -0
  309. package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts +8 -0
  310. package/dist/xlsx/ui/ribbon/tabs/theme-palette.d.ts.map +1 -0
  311. package/dist/xlsx/ui/ribbon/tell-me.d.ts +16 -0
  312. package/dist/xlsx/ui/ribbon/tell-me.d.ts.map +1 -0
  313. package/dist/xlsx/ui/selection.d.ts +34 -0
  314. package/dist/xlsx/ui/selection.d.ts.map +1 -0
  315. package/dist/xlsx/ui/theme/css-vars.d.ts +6 -0
  316. package/dist/xlsx/ui/theme/css-vars.d.ts.map +1 -0
  317. package/dist/xlsx/ui/theme/defaults.d.ts +6 -0
  318. package/dist/xlsx/ui/theme/defaults.d.ts.map +1 -0
  319. package/dist/xlsx/ui/theme/element.d.ts +9 -0
  320. package/dist/xlsx/ui/theme/element.d.ts.map +1 -0
  321. package/dist/xlsx/ui/theme/types.d.ts +54 -0
  322. package/dist/xlsx/ui/theme/types.d.ts.map +1 -0
  323. package/dist/xml/index.cjs +2 -1
  324. package/dist/xml/index.mjs +2 -1
  325. package/package.json +42 -4
  326. package/dist/pptx/chunks/index-BtBj3VG1.d.ts.map +0 -1
  327. package/dist/pptx/chunks/index-D0yGoLyw.d.ts.map +0 -1
  328. package/dist/pptx/chunks/text-operations-GuisjlbR.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/icons.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4IxD,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,IAAI,SAAU,MAAM,OAAO,WAAW,KAAG,MAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Command } from '../commands.js';
2
+ import type { EditorContext } from '../context.js';
3
+ /** Accounting formats by currency (the Accounting split's menu). */
4
+ export declare const ACCOUNTING_FORMATS: ReadonlyArray<readonly [id: string, label: string, format: string]>;
5
+ /** The ribbon's number format options: the core presets plus the current custom code. */
6
+ export declare function numberFormatOptions(ctx: EditorContext): {
7
+ value: string;
8
+ label: string;
9
+ }[];
10
+ export declare function numberCommands(): Command[];
11
+ //# sourceMappingURL=number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/number.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAKnD,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAC7C,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAuBpD,CAAC;AAIF,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAM1F;AAQD,wBAAgB,cAAc,IAAI,OAAO,EAAE,CAwF1C"}
@@ -0,0 +1,10 @@
1
+ import type { PageSetup } from '../../index.js';
2
+ import type { Command } from '../commands.js';
3
+ type Margins = NonNullable<PageSetup['margins']>;
4
+ /** Excel's margin presets, in inches. */
5
+ export declare const MARGIN_PRESETS: ReadonlyArray<readonly [id: string, label: string, margins: Margins]>;
6
+ /** SpreadsheetML paper size codes Excel's Size menu lists first. */
7
+ export declare const PAPER_SIZES: ReadonlyArray<readonly [code: number, label: string]>;
8
+ export declare function pageLayoutCommands(): Command[];
9
+ export {};
10
+ //# sourceMappingURL=page-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-layout.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/page-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,KAAK,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAEjD,yCAAyC;AACzC,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAa/F,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAU7E,CAAC;AASF,wBAAgB,kBAAkB,IAAI,OAAO,EAAE,CAqI9C"}
@@ -0,0 +1,12 @@
1
+ import { type CellRange } from '../../index.js';
2
+ import type { EditorContext } from '../context.js';
3
+ export type SpecialKind = 'formulas' | 'constants' | 'blanks' | 'comments' | 'conditional' | 'validation' | 'currentRegion' | 'lastCell';
4
+ export interface SpecialQuery {
5
+ kind: SpecialKind;
6
+ /** For formulas / constants: which value types (all when absent). */
7
+ types?: ReadonlyArray<'numbers' | 'text' | 'logicals' | 'errors'>;
8
+ }
9
+ /** Selects the matching cells; false (and no change) when nothing matches. */
10
+ export declare function selectSpecial(ctx: EditorContext, query: SpecialQuery): boolean;
11
+ export declare function findSpecial(ctx: EditorContext, query: SpecialQuery): CellRange[];
12
+ //# sourceMappingURL=select-special.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-special.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/select-special.ts"],"names":[],"mappings":"AAGA,OAAO,EAEN,KAAK,SAAS,EAOd,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,MAAM,MAAM,WAAW,GACpB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,aAAa,GACb,YAAY,GACZ,eAAe,GACf,UAAU,CAAC;AAEd,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,qEAAqE;IACrE,KAAK,CAAC,EAAE,aAAa,CAAC,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC,CAAC;CAClE;AAID,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAO9E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,GAAG,SAAS,EAAE,CA6EhF"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from '../commands.js';
2
+ export declare function sortCommands(): Command[];
3
+ //# sourceMappingURL=sort-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-filter.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/sort-filter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAuB9C,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAyExC"}
@@ -0,0 +1,21 @@
1
+ import { type ThemePalette, type Workbook } from '../../index.js';
2
+ export interface TableStyleInfo {
3
+ name: string;
4
+ family: 'Light' | 'Medium' | 'Dark';
5
+ index: number;
6
+ }
7
+ export declare const TABLE_STYLES: readonly TableStyleInfo[];
8
+ /** The accent a built-in table style uses (`000000`-ish for the first of each group of seven). */
9
+ export declare function tableStyleColor(info: TableStyleInfo, theme: ThemePalette): string;
10
+ /** A 40x30 SVG swatch: header row, banded body. */
11
+ export declare function tableStylePreview(info: TableStyleInfo, theme: ThemePalette): string;
12
+ /**
13
+ * Gallery items: the workbook's own named styles first (they win by name), then the core's
14
+ * built-in styles. The id is the style name `applyCellStyle` takes.
15
+ */
16
+ export declare function cellStyleItems(workbook: Workbook | undefined): {
17
+ id: string;
18
+ label: string;
19
+ preview?: string;
20
+ }[];
21
+ //# sourceMappingURL=style-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-presets.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/style-presets.ts"],"names":[],"mappings":"AAEA,OAAO,EAMN,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,cAAc,EAgBjD,CAAC;AAEF,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAIjF;AAID,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAenF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAC5B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAwBnD"}
@@ -0,0 +1,59 @@
1
+ import type { CellAddress, CellRange, CellStyle, EditSession, Workbook, Worksheet } from '../../index.js';
2
+ import type { Command } from '../commands.js';
3
+ import type { EditorContext } from '../context.js';
4
+ /** Everything an editing command needs: the session, sheet and normalized selection. */
5
+ export interface Target {
6
+ session: EditSession;
7
+ workbook: Workbook;
8
+ sheet: number;
9
+ ws: Worksheet;
10
+ ranges: CellRange[];
11
+ /** The first range (the one Excel's single-range commands act on). */
12
+ range: CellRange;
13
+ active: CellAddress;
14
+ }
15
+ export declare function target(ctx: EditorContext): Target | undefined;
16
+ /** Runs `fn` with the target when a workbook is open; a no-op otherwise. */
17
+ export declare function withTarget<T>(ctx: EditorContext, fn: (t: Target) => T): T | undefined;
18
+ export declare const hasWorkbook: (ctx: EditorContext) => boolean;
19
+ /** The resolved format of the active cell (or its row or column format when the cell is empty). */
20
+ export declare function activeStyle(ctx: EditorContext): CellStyle | undefined;
21
+ /** Whether a range spans whole columns (every row). */
22
+ export declare const wholeColumns: (r: CellRange) => boolean;
23
+ export declare const wholeRows: (r: CellRange) => boolean;
24
+ /** Inclusive integer span. */
25
+ export declare function span(from: number, to: number): number[];
26
+ /** Distinct rows (or columns) covered by the ranges, sorted. */
27
+ export declare function rowsOf(ranges: CellRange[]): number[];
28
+ export declare function colsOf(ranges: CellRange[]): number[];
29
+ /** The selection, or its current region when only one cell is selected (Excel's sort / filter). */
30
+ export declare function regionOf(t: Target): CellRange;
31
+ /**
32
+ * A simplified version of Excel's header guess for sort and tables: the first row is a header
33
+ * when it holds text and nothing but text (blanks allowed).
34
+ */
35
+ export declare function guessHeader(ws: Worksheet, range: CellRange): boolean;
36
+ /** The table containing a cell. */
37
+ export declare function tableAt(ws: Worksheet, at: CellAddress): import("../../model.js").Table | undefined;
38
+ /** The sheet is protected and does not allow `action` (`formatCells`, `insertRows`, ...). */
39
+ export declare function sheetLocked(ctx: EditorContext, action?: string): boolean;
40
+ /** The workbook structure is protected (no adding, deleting, moving or renaming sheets). */
41
+ export declare const structureLocked: (ctx: EditorContext) => boolean;
42
+ /** Builds an editing command (disabled in read-only and without a workbook). */
43
+ export declare function editing(command: Omit<Command, 'editing'> & {
44
+ lock?: string | false;
45
+ }): Command;
46
+ /** Builds a view command (allowed in read-only, needs a workbook). */
47
+ export declare function viewing(command: Command): Command;
48
+ /** Repaints after a change the session does not report (direct workbook-level edits). */
49
+ export declare function refresh(ctx: EditorContext): void;
50
+ /** Picks the cell CSS font shorthand of a style for text measurement. */
51
+ export declare function styleCssFont(style: CellStyle): string;
52
+ /** A text measure for `setColumnWidth('auto')`, backed by the grid when it is mounted. */
53
+ export declare function measure(ctx: EditorContext): ((text: string, style: CellStyle) => number) | undefined;
54
+ /**
55
+ * Clears a key in a `StylePatch` (`patchStyle` drops keys patched to undefined). Typed `never` so
56
+ * it satisfies `exactOptionalPropertyTypes`.
57
+ */
58
+ export declare const UNSET: never;
59
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/commands/util.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,gBAAgB,CAAC;AASxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,wFAAwF;AACxF,MAAM,WAAW,MAAM;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,SAAS,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,sEAAsE;IACtE,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAsB7D;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAGrF;AAED,eAAO,MAAM,WAAW,QAAS,aAAa,KAAG,OAAsC,CAAC;AAExF,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,GAAG,SAAS,CAUrE;AAED,uDAAuD;AACvD,eAAO,MAAM,YAAY,MAAO,SAAS,KAAG,OAAoD,CAAC;AACjG,eAAO,MAAM,SAAS,MAAO,SAAS,KAAG,OAAoD,CAAC;AAE9F,8BAA8B;AAC9B,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAIvD;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAEpD;AACD,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAEpD;AAED,mGAAmG;AACnG,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAI7C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAUpE;AAED,mCAAmC;AACnC,wBAAgB,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,8CAQrD;AAED,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAKxE;AAED,4FAA4F;AAC5F,eAAO,MAAM,eAAe,QAAS,aAAa,KAAG,OACZ,CAAC;AAE1C,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;CAAE,GAAG,OAAO,CAU9F;AAED,sEAAsE;AACtE,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAGjD;AAED,yFAAyF;AACzF,wBAAgB,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAGhD;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAGrD;AAED,0FAA0F;AAC1F,wBAAgB,OAAO,CACtB,GAAG,EAAE,aAAa,GAChB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,GAAG,SAAS,CAG1D;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAgB,KAAK,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { EditorContext } from './context.js';
2
+ export interface Command {
3
+ /** Stable kebab id: 'home.bold', 'home.merge-center', 'view.freeze-panes'. */
4
+ id: string;
5
+ /** English text (translation key). */
6
+ label: string;
7
+ /** An ooxml-ui icon name or a local icon registered with `registerIcon`. */
8
+ icon?: string;
9
+ /** Display text, for example 'Ctrl+B'. */
10
+ shortcut?: string;
11
+ /** True: disabled in read-only mode. */
12
+ editing?: boolean;
13
+ enabled?(ctx: EditorContext): boolean;
14
+ /** Toggle state (bold of the active cell, ...). */
15
+ checked?(ctx: EditorContext): boolean;
16
+ /** Value for select-like controls (font name, size, number format). */
17
+ value?(ctx: EditorContext): string;
18
+ run(ctx: EditorContext, arg?: unknown): void | Promise<void>;
19
+ }
20
+ export interface CommandRegistry {
21
+ register(command: Command): void;
22
+ registerAll(commands: Command[]): void;
23
+ get(id: string): Command | undefined;
24
+ list(): Command[];
25
+ /** False when the command is missing or disabled; emits 'ribbon-action'. */
26
+ run(id: string, arg?: unknown): Promise<boolean>;
27
+ isEnabled(id: string): boolean;
28
+ }
29
+ export interface CommandRegistryOptions {
30
+ /** Called when a command throws, so the shell can show a toast. */
31
+ onError?(id: string, error: unknown): void;
32
+ /** Ids hidden by the host (`hiddenActions`) never run. */
33
+ isHidden?(id: string): boolean;
34
+ }
35
+ export declare function createCommandRegistry(context: () => EditorContext, options?: CommandRegistryOptions): CommandRegistry;
36
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/xlsx/ui/commands.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,OAAO;IACvB,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC;IACtC,mDAAmD;IACnD,OAAO,CAAC,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC;IACtC,uEAAuE;IACvE,KAAK,CAAC,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC;IACnC,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACvC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,IAAI,IAAI,OAAO,EAAE,CAAC;IAClB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACtC,mEAAmE;IACnE,OAAO,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3C,0DAA0D;IAC1D,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,aAAa,EAC5B,OAAO,GAAE,sBAA2B,GAClC,eAAe,CAsCjB"}
@@ -0,0 +1,36 @@
1
+ export interface MenuEntry {
2
+ id: string;
3
+ /** English key, translated with `ctx.t` when rendering. */
4
+ label: string;
5
+ command?: string;
6
+ arg?: unknown;
7
+ action?: () => void | Promise<void>;
8
+ disabled?: boolean;
9
+ separatorBefore?: boolean;
10
+ shortcut?: string;
11
+ checked?: boolean;
12
+ }
13
+ export interface CellMenuState {
14
+ readOnly: boolean;
15
+ hasComment: boolean;
16
+ hasLink: boolean;
17
+ hasList: boolean;
18
+ }
19
+ export declare function cellMenu(state: CellMenuState): MenuEntry[];
20
+ export interface HeaderMenuState {
21
+ readOnly: boolean;
22
+ hiddenInSelection: boolean;
23
+ }
24
+ export declare const rowHeaderMenu: (state: HeaderMenuState) => MenuEntry[];
25
+ export declare const columnHeaderMenu: (state: HeaderMenuState) => MenuEntry[];
26
+ export interface TabMenuState {
27
+ readOnly: boolean;
28
+ structureLocked: boolean;
29
+ visibleSheets: number;
30
+ hiddenSheets: number;
31
+ protected: boolean;
32
+ }
33
+ export declare function tabMenu(state: TabMenuState, actions: {
34
+ rename(): void;
35
+ }): MenuEntry[];
36
+ //# sourceMappingURL=items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/context-menu/items.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AA4BD,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAAE,CA4C1D;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;CAC3B;AA2CD,eAAO,MAAM,aAAa,UAAW,eAAe,KAAG,SAAS,EAA+B,CAAC;AAChG,eAAO,MAAM,gBAAgB,UAAW,eAAe,KAAG,SAAS,EACtC,CAAC;AAE9B,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE;IAAE,MAAM,IAAI,IAAI,CAAA;CAAE,GAAG,SAAS,EAAE,CA6BrF"}
@@ -0,0 +1,65 @@
1
+ import type { CellAddress, CellRange, EditSession, Workbook } from '../index.js';
2
+ import type { CommandRegistry } from './commands.js';
3
+ import type { DialogRegistry } from './dialogs.js';
4
+ export interface Selection {
5
+ sheet: number;
6
+ active: CellAddress;
7
+ anchor: CellAddress;
8
+ ranges: CellRange[];
9
+ /**
10
+ * Index in the sheet's drawings of the selected picture or chart. While set, the drawing (not
11
+ * the cells) is the selection: the Chart Design tab follows it and Delete removes it. Any
12
+ * cell selection change clears it.
13
+ */
14
+ drawing?: number | undefined;
15
+ }
16
+ export interface SelectionModel {
17
+ get(): Selection;
18
+ set(next: Partial<Selection> & {
19
+ ranges?: CellRange[];
20
+ }): void;
21
+ onChange(listener: (selection: Selection) => void): () => void;
22
+ }
23
+ /** Implemented by the grid module and attached through `ctx.attachGrid`. */
24
+ export interface GridController {
25
+ focus(): void;
26
+ scrollTo(address: CellAddress): void;
27
+ /** Repaints after a model change. */
28
+ invalidate(): void;
29
+ /** Starts the in-cell editor (F2 or typing). */
30
+ beginEdit(initialText?: string): void;
31
+ commitEdit(): boolean;
32
+ cancelEdit(): void;
33
+ isEditing(): boolean;
34
+ /** Width in CSS pixels of `text` drawn with a CSS font shorthand. */
35
+ measureText(text: string, font: string): number;
36
+ zoom(): number;
37
+ setZoom(percent: number): void;
38
+ }
39
+ export interface EditorContext {
40
+ readonly host: HTMLElement;
41
+ readonly root: ShadowRoot;
42
+ /** Undefined until a workbook is loaded. */
43
+ session(): EditSession | undefined;
44
+ workbook(): Workbook | undefined;
45
+ activeSheet(): number;
46
+ setActiveSheet(index: number): void;
47
+ readonly selection: SelectionModel;
48
+ readOnly(): boolean;
49
+ /** English text is the key, like the Word editor. */
50
+ t(key: string, vars?: Record<string, string | number>): string;
51
+ readonly commands: CommandRegistry;
52
+ readonly dialogs: DialogRegistry;
53
+ grid(): GridController | undefined;
54
+ attachGrid(grid: GridController): void;
55
+ /** Fires after every session change, load and sheet switch. */
56
+ onModelChange(listener: (change: unknown) => void): () => void;
57
+ /** Refreshes ribbon and status bar state (debounced). */
58
+ requestRender(): void;
59
+ toast(message: string, kind?: 'info' | 'warning' | 'error'): void;
60
+ /** Dispatches a public CustomEvent on the host; returns `!defaultPrevented`. */
61
+ emit(type: string, detail: unknown): boolean;
62
+ authorName(): string;
63
+ locale(): string;
64
+ }
65
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/xlsx/ui/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC9B,GAAG,IAAI,SAAS,CAAC;IACjB,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/D,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CAC/D;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC9B,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,qCAAqC;IACrC,UAAU,IAAI,IAAI,CAAC;IACnB,gDAAgD;IAChD,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,UAAU,IAAI,OAAO,CAAC;IACtB,UAAU,IAAI,IAAI,CAAC;IACnB,SAAS,IAAI,OAAO,CAAC;IACrB,qEAAqE;IACrE,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAChD,IAAI,IAAI,MAAM,CAAC;IACf,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,4CAA4C;IAC5C,OAAO,IAAI,WAAW,GAAG,SAAS,CAAC;IACnC,QAAQ,IAAI,QAAQ,GAAG,SAAS,CAAC;IACjC,WAAW,IAAI,MAAM,CAAC;IACtB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IACnC,QAAQ,IAAI,OAAO,CAAC;IACpB,qDAAqD;IACrD,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;IAC/D,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,IAAI,IAAI,cAAc,GAAG,SAAS,CAAC;IACnC,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,+DAA+D;IAC/D,aAAa,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC/D,yDAAyD;IACzD,aAAa,IAAI,IAAI,CAAC;IACtB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IAClE,gFAAgF;IAChF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7C,UAAU,IAAI,MAAM,CAAC;IACrB,MAAM,IAAI,MAAM,CAAC;CACjB"}
@@ -0,0 +1,28 @@
1
+ export type CategoryId = 'general' | 'number' | 'currency' | 'accounting' | 'date' | 'time' | 'percentage' | 'fraction' | 'scientific' | 'text' | 'special' | 'custom';
2
+ export declare const CATEGORIES: ReadonlyArray<readonly [CategoryId, string]>;
3
+ export interface NumberOptions {
4
+ decimals: number;
5
+ thousands: boolean;
6
+ /** Index into SYMBOLS. */
7
+ symbol: number;
8
+ /** Index into the four negative number styles. */
9
+ negative: number;
10
+ /** The chosen code of a list category (date, time, fraction, special) or the custom code. */
11
+ code: string;
12
+ }
13
+ /** Currency symbols: [label, quoted code prefix]. */
14
+ export declare const SYMBOLS: ReadonlyArray<readonly [string, string]>;
15
+ export declare const DATE_CODES: readonly ['m/d/yyyy', 'dddd, mmmm d, yyyy', 'm/d', 'm/d/yy', 'mm/dd/yy', 'd-mmm', 'd-mmm-yy', 'dd-mmm-yy', 'mmm-yy', 'mmmm-yy', 'mmmm d, yyyy', 'm/d/yy h:mm AM/PM', 'm/d/yy h:mm', 'mmmmm', 'mmmmm-yy', 'd-mmm-yyyy', 'yyyy-mm-dd'];
16
+ export declare const TIME_CODES: readonly ['h:mm:ss AM/PM', 'h:mm', 'h:mm AM/PM', 'h:mm:ss', 'mm:ss', 'mm:ss.0', '[h]:mm:ss', 'm/d/yy h:mm AM/PM', 'm/d/yy h:mm'];
17
+ export declare const FRACTION_CODES: ReadonlyArray<readonly [string, string]>;
18
+ export declare const SPECIAL_CODES: ReadonlyArray<readonly [string, string]>;
19
+ /** The four negative number styles of a positive code: -1234, red, (1234), red (1234). */
20
+ export declare function negativeCodes(base: string): string[];
21
+ export declare function buildCode(category: CategoryId, o: NumberOptions): string;
22
+ export declare const DEFAULT_OPTIONS: NumberOptions;
23
+ /** The category and options for an existing code (Custom when no option set reproduces it). */
24
+ export declare function detectCategory(code: string): {
25
+ category: CategoryId;
26
+ options: NumberOptions;
27
+ };
28
+ //# sourceMappingURL=number-categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-categories.d.ts","sourceRoot":"","sources":["../../../../../src/xlsx/ui/dialogs/format-cells/number-categories.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GACnB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,MAAM,GACN,MAAM,GACN,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,MAAM,GACN,SAAS,GACT,QAAQ,CAAC;AAEZ,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAanE,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;CACb;AAED,qDAAqD;AACrD,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAM5D,CAAC;AAEF,eAAO,MAAM,UAAU,YACtB,UAAU,EACV,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,CACH,CAAC;AAEX,eAAO,MAAM,UAAU,YACtB,eAAe,EACf,MAAM,EACN,YAAY,EACZ,SAAS,EACT,OAAO,EACP,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,aAAa,CACJ,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAUnE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE,CAAC;AAIF,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,CAuBxE;AAED,eAAO,MAAM,eAAe,EAAE,aAM7B,CAAC;AAEF,+FAA+F;AAC/F,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,CAqB7F"}
@@ -0,0 +1,40 @@
1
+ import type { CellStyle, CellValue, DifferentialStyle, StylePatch } from '../../../index.js';
2
+ import type { Target } from '../../commands/util.js';
3
+ import type { EditorContext } from '../../context.js';
4
+ export type FormatTabId = 'number' | 'alignment' | 'font' | 'border' | 'fill' | 'protection';
5
+ export interface FormatCellsProps {
6
+ tab?: FormatTabId;
7
+ /** Initial Number category id (`accounting`, `date`, ...). */
8
+ category?: string;
9
+ /** Edit a conditional-format style instead of the selection; resolves with the new style. */
10
+ dxf?: DifferentialStyle;
11
+ }
12
+ export interface TabInit {
13
+ ctx: EditorContext;
14
+ /** The resolved starting format (the active cell's, or the dxf as a cell style). */
15
+ style: CellStyle;
16
+ /** Editing a differential style (conditional formatting). */
17
+ dxf: boolean;
18
+ /** The active cell's value, for samples. */
19
+ value: CellValue;
20
+ date1904: boolean;
21
+ props: FormatCellsProps;
22
+ /** The selection, in cell mode. */
23
+ target?: Target;
24
+ }
25
+ export interface FormatTab {
26
+ id: FormatTabId;
27
+ label: string;
28
+ panel: HTMLElement;
29
+ /** The user changed something on this tab. */
30
+ dirty(): boolean;
31
+ /** Style changes for `applyStyle` (cell mode), only the changed fields. */
32
+ patch?(): StylePatch;
33
+ /** Direct session edits (borders, merge) inside the dialog's batch, cell mode. */
34
+ apply?(target: Target): void;
35
+ /** Writes the tab's changes into a differential style (dxf mode). */
36
+ toDxf?(dxf: DifferentialStyle): void;
37
+ /** Focus target when the tab opens. */
38
+ focus?(): void;
39
+ }
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/xlsx/ui/dialogs/format-cells/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,CAAC;AAE7F,MAAM,WAAW,gBAAgB;IAChC,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACvB,GAAG,EAAE,aAAa,CAAC;IACnB,oFAAoF;IACpF,KAAK,EAAE,SAAS,CAAC;IACjB,6DAA6D;IAC7D,GAAG,EAAE,OAAO,CAAC;IACb,4CAA4C;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,gBAAgB,CAAC;IACxB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,WAAW,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,8CAA8C;IAC9C,KAAK,IAAI,OAAO,CAAC;IACjB,2EAA2E;IAC3E,KAAK,CAAC,IAAI,UAAU,CAAC;IACrB,kFAAkF;IAClF,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qEAAqE;IACrE,KAAK,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACrC,uCAAuC;IACvC,KAAK,CAAC,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,9 @@
1
+ import { type CellRange, type CellValue, type ChartObject, type ChartType, type Workbook } from '../../index.js';
2
+ /** A chart over `range`: text in the first row names the series, text in the first column labels the categories. */
3
+ export declare function buildChart(workbook: Workbook, sheetIndex: number, range: CellRange, type: ChartType, options?: {
4
+ grouping?: ChartObject['grouping'];
5
+ title?: string;
6
+ }): ChartObject;
7
+ /** Resolves `Sheet1!$B$2:$B$5` (or a bare range on `sheetIndex`) to the cells' values. */
8
+ export declare function evaluateRef(workbook: Workbook, sheetIndex: number, ref: string): CellValue[];
9
+ //# sourceMappingURL=insert-chart-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insert-chart-model.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/dialogs/insert-chart-model.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAEhB,KAAK,SAAS,EACd,KAAK,QAAQ,EAOb,MAAM,gBAAgB,CAAC;AAcxB,oHAAoH;AACpH,wBAAgB,UAAU,CACzB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,SAAS,EACf,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAClE,WAAW,CAiFb;AAED,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,CAa5F"}
@@ -0,0 +1,9 @@
1
+ import type { EditorContext } from './context.js';
2
+ export type DialogOpener = (ctx: EditorContext, props?: unknown) => Promise<unknown>;
3
+ export interface DialogRegistry {
4
+ register(name: string, open: DialogOpener): void;
5
+ /** Resolves undefined when cancelled or when no dialog has that name. */
6
+ open<T = unknown>(name: string, props?: unknown): Promise<T | undefined>;
7
+ }
8
+ export declare function createDialogRegistry(context: () => EditorContext, onError?: (name: string, error: unknown) => void): DialogRegistry;
9
+ //# sourceMappingURL=dialogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialogs.d.ts","sourceRoot":"","sources":["../../../src/xlsx/ui/dialogs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAErF,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IACjD,yEAAyE;IACzE,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACzE;AAED,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,MAAM,aAAa,EAC5B,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,GAC9C,cAAc,CAkBhB"}
@@ -0,0 +1,9 @@
1
+ /** Unsaved-changes flag behind `element.dirty`; reports only real transitions. */
2
+ export declare class DirtyState {
3
+ private readonly changed;
4
+ private value;
5
+ constructor(changed: (dirty: boolean) => void);
6
+ get dirty(): boolean;
7
+ set(dirty: boolean): void;
8
+ }
9
+ //# sourceMappingURL=dirty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dirty-state.d.ts","sourceRoot":"","sources":["../../../src/xlsx/ui/dirty-state.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,qBAAa,UAAU;IAGV,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAS;IAEtB,YAA6B,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAAI;IAElE,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIxB;CACD"}
@@ -0,0 +1,23 @@
1
+ import { type CellRange, type DefinedName, type Workbook } from '../../index.js';
2
+ export interface NameTarget {
3
+ sheet: number;
4
+ range: CellRange;
5
+ }
6
+ export type NameBoxResult = ({
7
+ kind: 'go';
8
+ } & NameTarget) | {
9
+ kind: 'define';
10
+ name: string;
11
+ } | {
12
+ kind: 'invalid';
13
+ };
14
+ /** Parses `A1`, `B2:C5`, `A:C`, `1:3`, `Sheet2!A1`, `'My sheet'!$A$1:$B$2`. */
15
+ export declare function parseSheetReference(workbook: Workbook, activeSheet: number, text: string): NameTarget | undefined;
16
+ /** The defined name visible from `sheet` (sheet-scoped names win over workbook names). */
17
+ export declare function findDefinedName(workbook: Workbook, sheet: number, name: string): DefinedName | undefined;
18
+ export declare function resolveNameBox(workbook: Workbook, activeSheet: number, text: string): NameBoxResult;
19
+ /** `Sheet1!$A$1:$B$2` (one cell: `Sheet1!$A$1`). */
20
+ export declare function absoluteReference(sheetName: string, range: CellRange): string;
21
+ /** A defined name whose reference is exactly this range on this sheet. */
22
+ export declare function nameForRange(workbook: Workbook, sheet: number, range: CellRange): string | undefined;
23
+ //# sourceMappingURL=name-resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"name-resolve.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/formula-bar/name-resolve.ts"],"names":[],"mappings":"AAEA,OAAO,EAON,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GACtB,CAAC;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,UAAU,CAAC,GAC7B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEvB,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACV,UAAU,GAAG,SAAS,CAaxB;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAC9B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACV,WAAW,GAAG,SAAS,CAMzB;AAED,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACV,aAAa,CAaf;AAID,oDAAoD;AACpD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,MAAM,CAM7E;AAQD,0EAA0E;AAC1E,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,GACd,MAAM,GAAG,SAAS,CAQpB"}
@@ -0,0 +1,42 @@
1
+ import { type CellView, type GridMetrics, type Worksheet } from '../../index.js';
2
+ export interface CellItem {
3
+ key: string;
4
+ row: number;
5
+ col: number;
6
+ /** Plane pixels (merge-sized). */
7
+ x: number;
8
+ y: number;
9
+ w: number;
10
+ h: number;
11
+ view: CellView;
12
+ text: string;
13
+ /** Text box relative to the cell's left edge (wider than the cell when text overflows). */
14
+ textLeft: number;
15
+ textWidth: number;
16
+ overflowing: boolean;
17
+ /** Font scale for shrink-to-fit (1 = none). */
18
+ fontScale: number;
19
+ merged: boolean;
20
+ errorMark: boolean;
21
+ }
22
+ export interface BuildInput {
23
+ sheet: Worksheet;
24
+ metrics: GridMetrics;
25
+ zoom: number;
26
+ rows: readonly number[];
27
+ cols: readonly number[];
28
+ /** Cached core cell view; null when the cell paints nothing. */
29
+ view(row: number, col: number): CellView | null;
30
+ measure(text: string, font: string): number;
31
+ /** Formula cells with an error value get Excel's green error-check corner. */
32
+ hasFormula(row: number, col: number): boolean;
33
+ /**
34
+ * The number's text fitted to `width` CSS px as Excel does (General drops decimals or goes
35
+ * scientific, anything else becomes `###`), from the core's `formatValue` width option.
36
+ */
37
+ fitNumber?(row: number, col: number, width: number, font: string): string | undefined;
38
+ }
39
+ /** True when a view paints nothing at all (no node needed). */
40
+ export declare function isBlankView(view: CellView): boolean;
41
+ export declare function buildItems(input: BuildInput): CellItem[];
42
+ //# sourceMappingURL=cell-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-items.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/grid/cell-items.ts"],"names":[],"mappings":"AAGA,OAAO,EAGN,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,gEAAgE;IAChE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IAChD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5C,8EAA8E;IAC9E,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9C;;;OAGG;IACH,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACtF;AAID,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CASnD;AAuFD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,EAAE,CA2CxD"}
@@ -0,0 +1,26 @@
1
+ import type { BordersView, EdgeView, FillView, FontView, PatternType } from '../../index.js';
2
+ /** A CSS font-family list for a workbook font name. */
3
+ export declare function cssFontFamily(name: string): string;
4
+ /** CSS `font` shorthand for a font at a zoom (percent). */
5
+ export declare function cssFont(font: FontView, zoom?: number): string;
6
+ export declare function textDecoration(font: FontView): string;
7
+ /** A repeating background image for a pattern fill, or undefined for solid / none. */
8
+ export declare function patternImage(pattern: PatternType, fg: string): string | undefined;
9
+ export interface FillPaint {
10
+ background?: string;
11
+ image?: string;
12
+ }
13
+ export declare function fillPaint(fill: FillView | undefined): FillPaint | undefined;
14
+ export declare const edgeCss: (edge: EdgeView | undefined) => string;
15
+ export declare const hasBorders: (b: BordersView) => boolean;
16
+ /** SVG for diagonal borders across a w x h cell. */
17
+ export declare function diagonalSvg(b: BordersView, w: number, h: number): string | undefined;
18
+ /** CSS flex alignment for the text box. */
19
+ export declare function justify(hAlign: string): string;
20
+ export declare function alignItems(vAlign: string): string;
21
+ export declare function textAlign(hAlign: string): string;
22
+ /** Excel's `fill` alignment repeats the text across the cell width. */
23
+ export declare function repeatToFill(text: string, textWidth: number, cellWidth: number): string;
24
+ /** Excel shows `#` across a cell when a number does not fit. */
25
+ export declare function hashes(cellInnerWidth: number, hashWidth: number): string;
26
+ //# sourceMappingURL=cell-paint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-paint.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/grid/cell-paint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,MAAM,gBAAgB,CAAC;AAYxB,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,SAAM,GAAG,MAAM,CAG1D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAKrD;AAyBD,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWjF;AAED,MAAM,WAAW,SAAS;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAQ3E;AAED,eAAO,MAAM,OAAO,SAAU,QAAQ,GAAG,SAAS,KAAG,MAG/C,CAAC;AAEP,eAAO,MAAM,UAAU,MAAO,WAAW,KAAG,OACsC,CAAC;AAEnF,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAepF;AAED,2CAA2C;AAC3C,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK9C;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKhD;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAIvF;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxE"}
@@ -0,0 +1,47 @@
1
+ import type { CellAddress } from '../../index.js';
2
+ import type { EditorContext } from '../context.js';
3
+ /** Excel's status-bar modes: Ready, Enter (typing replaces), Edit (F2, arrows move the caret), Point. */
4
+ export type EditMode = 'ready' | 'enter' | 'edit' | 'point';
5
+ export type EditSource = 'cell' | 'bar';
6
+ export type CommitMove = 'down' | 'up' | 'right' | 'left' | 'none';
7
+ export interface EditState {
8
+ editing: boolean;
9
+ mode: EditMode;
10
+ text: string;
11
+ /** Caret (selection end) in `text`. */
12
+ caret: number;
13
+ /** Where the user is typing. */
14
+ source: EditSource;
15
+ sheet: number;
16
+ address: CellAddress;
17
+ }
18
+ export interface BeginOptions {
19
+ text?: string;
20
+ source?: EditSource;
21
+ /** 'enter' replaces the content (typing), 'edit' keeps it (F2, formula bar click). */
22
+ mode?: 'enter' | 'edit';
23
+ caret?: number;
24
+ }
25
+ /** Implemented by the grid's editor controller. */
26
+ export interface EditDriver {
27
+ begin(options: BeginOptions): boolean;
28
+ commit(move: CommitMove, allSelected: boolean): boolean;
29
+ cancel(): void;
30
+ /** Called after the text changed from `source` (the other view must follow). */
31
+ changed(source: EditSource): void;
32
+ }
33
+ export interface EditBridge {
34
+ state(): Readonly<EditState>;
35
+ onChange(listener: (state: Readonly<EditState>, origin: EditSource | 'grid') => void): () => void;
36
+ begin(options?: BeginOptions): boolean;
37
+ update(text: string, caret: number, source: EditSource): void;
38
+ commit(move?: CommitMove, allSelected?: boolean): boolean;
39
+ cancel(): void;
40
+ /** Grid side: replaces the whole state and notifies. */
41
+ set(next: Partial<EditState>, origin: EditSource | 'grid'): void;
42
+ attach(driver: EditDriver): () => void;
43
+ }
44
+ export declare function createEditBridge(): EditBridge;
45
+ /** The bridge of an editor context (created on first use). */
46
+ export declare function editBridge(ctx: EditorContext): EditBridge;
47
+ //# sourceMappingURL=edit-bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-bridge.d.ts","sourceRoot":"","sources":["../../../../src/xlsx/ui/grid/edit-bridge.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,yGAAyG;AACzG,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,sFAAsF;IACtF,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,UAAU;IAC1B,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;IACtC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC;IACxD,MAAM,IAAI,IAAI,CAAC;IACf,gFAAgF;IAChF,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,UAAU;IAC1B,KAAK,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAClG,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;IACvC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9D,MAAM,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1D,MAAM,IAAI,IAAI,CAAC;IACf,wDAAwD;IACxD,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;IACjE,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,IAAI,CAAC;CACvC;AAID,wBAAgB,gBAAgB,IAAI,UAAU,CAyC7C;AAED,8DAA8D;AAC9D,wBAAgB,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,CAOzD"}