ooxml-ui 0.27.2 → 0.29.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 (424) hide show
  1. package/dist/chunk-A56QI2OA.js +57 -0
  2. package/dist/{chunk-LE4FTRWB.js → chunk-AJ2J734X.js} +619 -3
  3. package/dist/{chunk-4PBFBPOH.js → chunk-G4ZGQYBH.js} +2 -1
  4. package/dist/controls.js +1 -1
  5. package/dist/docx/backstage-home.d.ts +3 -0
  6. package/dist/docx/backstage-options.d.ts +13 -0
  7. package/dist/docx/backstage-pages.d.ts +41 -0
  8. package/dist/docx/backstage.d.ts +18 -0
  9. package/dist/docx/binding-labels.d.ts +9 -0
  10. package/dist/docx/bookmark-commands.d.ts +20 -0
  11. package/dist/docx/bookmark-dialog.d.ts +4 -0
  12. package/dist/docx/borders-dialog.d.ts +4 -0
  13. package/dist/docx/canvas-measurer.d.ts +7 -0
  14. package/dist/docx/caption-commands.d.ts +31 -0
  15. package/dist/docx/caption-dialog.d.ts +5 -0
  16. package/dist/docx/change-case.d.ts +5 -0
  17. package/dist/docx/character-style-picker.d.ts +12 -0
  18. package/dist/docx/chrome-icons.d.ts +25 -0
  19. package/dist/docx/collaboration-model.d.ts +4 -0
  20. package/dist/docx/collaboration-session.d.ts +18 -0
  21. package/dist/docx/columns-dialog.d.ts +10 -0
  22. package/dist/docx/comment-commands.d.ts +21 -0
  23. package/dist/docx/comments-panel.d.ts +19 -0
  24. package/dist/docx/component.d.ts +70 -0
  25. package/dist/docx/context-menu-actions.d.ts +10 -0
  26. package/dist/docx/context-menu-items.d.ts +36 -0
  27. package/dist/docx/context-menu.d.ts +25 -0
  28. package/dist/docx/contextual-tabs.d.ts +8 -0
  29. package/dist/docx/cover-page.d.ts +14 -0
  30. package/dist/docx/cross-reference-commands.d.ts +30 -0
  31. package/dist/docx/cross-reference-dialog.d.ts +5 -0
  32. package/dist/docx/dialog-fields.d.ts +22 -0
  33. package/dist/docx/dialog-shell.d.ts +19 -0
  34. package/dist/docx/drop-cap-command.d.ts +20 -0
  35. package/dist/docx/drop-cap-dialog.d.ts +4 -0
  36. package/dist/docx/editor-attributes.d.ts +26 -0
  37. package/dist/docx/editor-chrome.d.ts +59 -0
  38. package/dist/docx/editor-commands.d.ts +7 -0
  39. package/dist/docx/editor-controls.d.ts +10 -0
  40. package/dist/docx/editor-core.d.ts +78 -0
  41. package/dist/docx/editor-host.d.ts +19 -0
  42. package/dist/docx/editor-interactions.d.ts +2 -0
  43. package/dist/docx/editor-plugins.d.ts +16 -0
  44. package/dist/docx/editor-presence.d.ts +20 -0
  45. package/dist/docx/editor-render.d.ts +3 -0
  46. package/dist/docx/editor-shell.d.ts +11 -0
  47. package/dist/docx/element-api.d.ts +35 -0
  48. package/dist/docx/equation-schema.d.ts +4 -0
  49. package/dist/docx/events.d.ts +45 -0
  50. package/dist/docx/field-update.d.ts +16 -0
  51. package/dist/docx/file-commands.d.ts +15 -0
  52. package/dist/docx/focus-view.d.ts +3 -0
  53. package/dist/docx/font-advanced.d.ts +18 -0
  54. package/dist/docx/font-dialog-tabs.d.ts +8 -0
  55. package/dist/docx/font-dialog.d.ts +11 -0
  56. package/dist/docx/font-format-batch.d.ts +3 -0
  57. package/dist/docx/font-format.d.ts +38 -0
  58. package/dist/docx/font-step.d.ts +5 -0
  59. package/dist/docx/font-sync.d.ts +9 -0
  60. package/dist/docx/format-dialogs.d.ts +37 -0
  61. package/dist/docx/format-painter.d.ts +12 -0
  62. package/dist/docx/go-to-panel.d.ts +4 -0
  63. package/dist/docx/go-to.d.ts +23 -0
  64. package/dist/docx/hard-break-command.d.ts +3 -0
  65. package/dist/docx/header-footer-commands.d.ts +19 -0
  66. package/dist/docx/header-footer-editor.d.ts +40 -0
  67. package/dist/docx/header-footer-link.d.ts +6 -0
  68. package/dist/docx/header-footer-navigation.d.ts +6 -0
  69. package/dist/docx/header-footer-position.d.ts +3 -0
  70. package/dist/docx/header-footer-ribbon.d.ts +9 -0
  71. package/dist/docx/header-footer-view.d.ts +5 -0
  72. package/dist/docx/heading-commands.d.ts +11 -0
  73. package/dist/docx/heading-navigator.d.ts +33 -0
  74. package/dist/docx/image-media.d.ts +29 -0
  75. package/dist/docx/indent-commands.d.ts +9 -0
  76. package/dist/docx/index.d.ts +23 -0
  77. package/dist/docx/inline-commands.d.ts +4 -0
  78. package/dist/docx/insert-controller.d.ts +46 -0
  79. package/dist/docx/insert-text-commands.d.ts +8 -0
  80. package/dist/docx/keyboard.d.ts +68 -0
  81. package/dist/docx/line-number-dialog.d.ts +11 -0
  82. package/dist/docx/link-commands.d.ts +31 -0
  83. package/dist/docx/link-dialog.d.ts +15 -0
  84. package/dist/docx/list-commands.d.ts +35 -0
  85. package/dist/docx/list-marker-display.d.ts +8 -0
  86. package/dist/docx/locales/columns.d.ts +15 -0
  87. package/dist/docx/locales/de-app.d.ts +8 -0
  88. package/dist/docx/locales/de-ribbon.d.ts +8 -0
  89. package/dist/docx/locales/de.d.ts +2 -0
  90. package/dist/docx/locales/drop-cap.d.ts +10 -0
  91. package/dist/docx/locales/en-app.d.ts +247 -0
  92. package/dist/docx/locales/en-ribbon.d.ts +394 -0
  93. package/dist/docx/locales/en.d.ts +746 -0
  94. package/dist/docx/locales/es-app.d.ts +8 -0
  95. package/dist/docx/locales/es-ribbon.d.ts +8 -0
  96. package/dist/docx/locales/es.d.ts +2 -0
  97. package/dist/docx/locales/font-advanced.d.ts +14 -0
  98. package/dist/docx/locales/fr-app.d.ts +2 -0
  99. package/dist/docx/locales/fr-ribbon.d.ts +2 -0
  100. package/dist/docx/locales/fr.d.ts +2 -0
  101. package/dist/docx/locales/ligatures.d.ts +5 -0
  102. package/dist/docx/locales/line-numbers.d.ts +16 -0
  103. package/dist/docx/locales/multilevel-list.d.ts +5 -0
  104. package/dist/docx/locales/navigation.d.ts +13 -0
  105. package/dist/docx/locales/table-properties.d.ts +29 -0
  106. package/dist/docx/locales/zh-CN-app.d.ts +8 -0
  107. package/dist/docx/locales/zh-CN-ribbon.d.ts +8 -0
  108. package/dist/docx/locales/zh-CN.d.ts +2 -0
  109. package/dist/docx/localization-strings.d.ts +745 -0
  110. package/dist/docx/localization.d.ts +24 -0
  111. package/dist/docx/model-adapter.d.ts +6 -0
  112. package/dist/docx/multilevel-list-dialog.d.ts +5 -0
  113. package/dist/docx/multilingual-commands.d.ts +14 -0
  114. package/dist/docx/multilingual-ribbon.d.ts +6 -0
  115. package/dist/docx/note-commands.d.ts +17 -0
  116. package/dist/docx/note-editor.d.ts +10 -0
  117. package/dist/docx/notes-view.d.ts +3 -0
  118. package/dist/docx/page-borders-dialog.d.ts +16 -0
  119. package/dist/docx/page-break-command.d.ts +5 -0
  120. package/dist/docx/page-controller.d.ts +66 -0
  121. package/dist/docx/page-navigator.d.ts +64 -0
  122. package/dist/docx/page-setup-change.d.ts +7 -0
  123. package/dist/docx/page-setup-dialog.d.ts +12 -0
  124. package/dist/docx/page-sync.d.ts +22 -0
  125. package/dist/docx/paragraph-decoration.d.ts +29 -0
  126. package/dist/docx/paragraph-dialog.d.ts +5 -0
  127. package/dist/docx/paragraph-format.d.ts +37 -0
  128. package/dist/docx/paragraph-styles.d.ts +5 -0
  129. package/dist/docx/paragraph-toggle-sync.d.ts +8 -0
  130. package/dist/docx/parts-controller.d.ts +52 -0
  131. package/dist/docx/picture-commands.d.ts +35 -0
  132. package/dist/docx/picture-dialog.d.ts +11 -0
  133. package/dist/docx/presence-decorations.d.ts +6 -0
  134. package/dist/docx/presence.d.ts +63 -0
  135. package/dist/docx/preview-run-styles.d.ts +4 -0
  136. package/dist/docx/preview-scale-fonts.d.ts +3 -0
  137. package/dist/docx/print-fragment-hit.d.ts +7 -0
  138. package/dist/docx/print-header-footer.d.ts +28 -0
  139. package/dist/docx/print-layout-cursor.d.ts +9 -0
  140. package/dist/docx/print-layout-view.d.ts +38 -0
  141. package/dist/docx/print-layout.d.ts +32 -0
  142. package/dist/docx/print-line-numbers.d.ts +13 -0
  143. package/dist/docx/print-page-borders.d.ts +18 -0
  144. package/dist/docx/print-table.d.ts +8 -0
  145. package/dist/docx/read-aloud.d.ts +11 -0
  146. package/dist/docx/review-commands.d.ts +24 -0
  147. package/dist/docx/review-controller.d.ts +30 -0
  148. package/dist/docx/review-display.d.ts +11 -0
  149. package/dist/docx/review-ribbon.d.ts +2 -0
  150. package/dist/docx/ribbon-action.d.ts +183 -0
  151. package/dist/docx/ribbon-behavior.d.ts +7 -0
  152. package/dist/docx/ribbon-color-grid.d.ts +11 -0
  153. package/dist/docx/ribbon-combo.d.ts +23 -0
  154. package/dist/docx/ribbon-commands.d.ts +13 -0
  155. package/dist/docx/ribbon-controls.d.ts +4 -0
  156. package/dist/docx/ribbon-gallery-menu.d.ts +26 -0
  157. package/dist/docx/ribbon-home.d.ts +4 -0
  158. package/dist/docx/ribbon-icons.d.ts +126 -0
  159. package/dist/docx/ribbon-keytips.d.ts +11 -0
  160. package/dist/docx/ribbon-overflow.d.ts +3 -0
  161. package/dist/docx/ribbon-parts.d.ts +53 -0
  162. package/dist/docx/ribbon-popover.d.ts +16 -0
  163. package/dist/docx/ribbon-router.d.ts +4 -0
  164. package/dist/docx/ribbon-tab-api.d.ts +29 -0
  165. package/dist/docx/ribbon-tabs.d.ts +2 -0
  166. package/dist/docx/ribbon-visibility.d.ts +8 -0
  167. package/dist/docx/ribbon.d.ts +5 -0
  168. package/dist/docx/ruler-sync.d.ts +7 -0
  169. package/dist/docx/ruler.d.ts +36 -0
  170. package/dist/docx/run-adapter.d.ts +9 -0
  171. package/dist/docx/run-marks.d.ts +4 -0
  172. package/dist/docx/run-scale.d.ts +11 -0
  173. package/dist/docx/run-styles.d.ts +19 -0
  174. package/dist/docx/scaled-paragraph-breaks.d.ts +7 -0
  175. package/dist/docx/schema.d.ts +6 -0
  176. package/dist/docx/script-state.d.ts +4 -0
  177. package/dist/docx/search-controller.d.ts +32 -0
  178. package/dist/docx/search-panel.d.ts +14 -0
  179. package/dist/docx/section-commands.d.ts +14 -0
  180. package/dist/docx/shell-labels.d.ts +3 -0
  181. package/dist/docx/shortcut-help.d.ts +16 -0
  182. package/dist/docx/smartart-node-view.d.ts +26 -0
  183. package/dist/docx/sort-commands.d.ts +9 -0
  184. package/dist/docx/spelling.d.ts +6 -0
  185. package/dist/docx/status-bar.d.ts +23 -0
  186. package/dist/docx/style-gallery.d.ts +22 -0
  187. package/dist/docx/styles/index.d.ts +6 -0
  188. package/dist/docx/styles-group.d.ts +7 -0
  189. package/dist/docx/styles-pane.d.ts +15 -0
  190. package/dist/docx/styles-popover.d.ts +24 -0
  191. package/dist/docx/tab-stops-view.d.ts +8 -0
  192. package/dist/docx/table-border-commands.d.ts +51 -0
  193. package/dist/docx/table-cell-alignment-dialog.d.ts +8 -0
  194. package/dist/docx/table-cell-margins-dialog.d.ts +9 -0
  195. package/dist/docx/table-commands.d.ts +6 -0
  196. package/dist/docx/table-model-adapter.d.ts +15 -0
  197. package/dist/docx/table-picker.d.ts +10 -0
  198. package/dist/docx/table-properties-dialog.d.ts +3 -0
  199. package/dist/docx/table-properties.d.ts +28 -0
  200. package/dist/docx/table-shading.d.ts +6 -0
  201. package/dist/docx/test-support.d.ts +24 -0
  202. package/dist/docx/text-box-commands.d.ts +17 -0
  203. package/dist/docx/text-box-dialog.d.ts +4 -0
  204. package/dist/docx/title-bar.d.ts +25 -0
  205. package/dist/docx/toc-commands.d.ts +17 -0
  206. package/dist/docx/toggle-commands.d.ts +8 -0
  207. package/dist/docx/track-changes-mode.d.ts +20 -0
  208. package/dist/docx/view-options.d.ts +10 -0
  209. package/dist/docx/watermark-commands.d.ts +9 -0
  210. package/dist/docx/watermark-dialog.d.ts +11 -0
  211. package/dist/docx/word-count-panel.d.ts +12 -0
  212. package/dist/docx/zoom-dialog.d.ts +16 -0
  213. package/dist/docx.js +21371 -0
  214. package/dist/edit-worker.js +18 -0
  215. package/dist/index.js +4 -60
  216. package/dist/parse-worker.js +16 -0
  217. package/dist/teams/app/bind.d.ts +28 -0
  218. package/dist/teams/app/controller.d.ts +13 -0
  219. package/dist/teams/app/index.d.ts +6 -0
  220. package/dist/teams/app/storage.d.ts +11 -0
  221. package/dist/teams/app/store.d.ts +4 -0
  222. package/dist/teams/app/teams-app.d.ts +110 -0
  223. package/dist/teams/app/teams-settings.d.ts +34 -0
  224. package/dist/teams/index.d.ts +1 -0
  225. package/dist/teams.js +3 -1
  226. package/dist/visio/arrowheads.d.ts +3 -0
  227. package/dist/visio/backstage.d.ts +15 -0
  228. package/dist/visio/binding.d.ts +27 -0
  229. package/dist/visio/controller.d.ts +71 -0
  230. package/dist/visio/edit-worker.d.ts +1 -0
  231. package/dist/visio/export-svg.d.ts +25 -0
  232. package/dist/visio/index.d.ts +16 -0
  233. package/dist/visio/office-ui.d.ts +2 -0
  234. package/dist/visio/paragraph-layout.d.ts +18 -0
  235. package/dist/visio/parse-worker.d.ts +1 -0
  236. package/dist/visio/print-snapshot.d.ts +87 -0
  237. package/dist/visio/render-fill.d.ts +2 -0
  238. package/dist/visio/render-foreign-vector-shape.d.ts +4 -0
  239. package/dist/visio/render-foreign-vector.d.ts +3 -0
  240. package/dist/visio/render-image.d.ts +4 -0
  241. package/dist/visio/render-resources.d.ts +10 -0
  242. package/dist/visio/render-svg.d.ts +17 -0
  243. package/dist/visio/render-text.d.ts +4 -0
  244. package/dist/visio/ribbon-action.d.ts +41 -0
  245. package/dist/visio/ribbon-home-format.d.ts +2 -0
  246. package/dist/visio/ribbon-home.d.ts +6 -0
  247. package/dist/visio/ribbon-keytips.d.ts +2 -0
  248. package/dist/visio/ribbon-other-tabs.d.ts +12 -0
  249. package/dist/visio/ribbon-parts.d.ts +60 -0
  250. package/dist/visio/ribbon-router.d.ts +19 -0
  251. package/dist/visio/ribbon-view.d.ts +5 -0
  252. package/dist/visio/ribbon.d.ts +13 -0
  253. package/dist/visio/shape-inspector.d.ts +5 -0
  254. package/dist/visio/shapes-window.d.ts +28 -0
  255. package/dist/visio/status-bar.d.ts +10 -0
  256. package/dist/visio/styles/index.d.ts +5 -0
  257. package/dist/visio/styles.d.ts +2 -0
  258. package/dist/visio/text-layout.d.ts +45 -0
  259. package/dist/visio/viewer-backstage.d.ts +33 -0
  260. package/dist/visio/viewer-canvas.d.ts +21 -0
  261. package/dist/visio/viewer-chrome.d.ts +22 -0
  262. package/dist/visio/viewer-commands.d.ts +34 -0
  263. package/dist/visio/viewer-context-menu.d.ts +8 -0
  264. package/dist/visio/viewer-draw-tool.d.ts +33 -0
  265. package/dist/visio/viewer-edit-controls.d.ts +12 -0
  266. package/dist/visio/viewer-element.d.ts +51 -0
  267. package/dist/visio/viewer-fit.d.ts +6 -0
  268. package/dist/visio/viewer-geometry-controls.d.ts +14 -0
  269. package/dist/visio/viewer-input.d.ts +10 -0
  270. package/dist/visio/viewer-layer-controls.d.ts +5 -0
  271. package/dist/visio/viewer-layers.d.ts +22 -0
  272. package/dist/visio/viewer-options.d.ts +22 -0
  273. package/dist/visio/viewer-pan-zoom.d.ts +19 -0
  274. package/dist/visio/viewer-ruler.d.ts +13 -0
  275. package/dist/visio/viewer-search.d.ts +18 -0
  276. package/dist/visio/viewer-share.d.ts +20 -0
  277. package/dist/visio/viewer-stencil.d.ts +6 -0
  278. package/dist/visio/viewer-tell-me.d.ts +4 -0
  279. package/dist/visio/worker-editor.d.ts +23 -0
  280. package/dist/visio/worker-parser.d.ts +13 -0
  281. package/dist/visio.js +6618 -0
  282. package/dist/xlsx/backstage/index.d.ts +14 -0
  283. package/dist/xlsx/backstage/pages-file.d.ts +6 -0
  284. package/dist/xlsx/backstage/pages-info.d.ts +10 -0
  285. package/dist/xlsx/backstage/pages-options.d.ts +7 -0
  286. package/dist/xlsx/backstage/parts.d.ts +53 -0
  287. package/dist/xlsx/backstage/properties-custom.d.ts +4 -0
  288. package/dist/xlsx/clipboard.d.ts +26 -0
  289. package/dist/xlsx/commands/index.d.ts +11 -0
  290. package/dist/xlsx/commands/insert-now.d.ts +4 -0
  291. package/dist/xlsx/commands/insert.d.ts +7 -0
  292. package/dist/xlsx/commands/register-icons.d.ts +2 -0
  293. package/dist/xlsx/commands/review.d.ts +6 -0
  294. package/dist/xlsx/commands/styles.d.ts +17 -0
  295. package/dist/xlsx/commands/test-support.d.ts +25 -0
  296. package/dist/xlsx/commands/view.d.ts +7 -0
  297. package/dist/xlsx/component.d.ts +66 -0
  298. package/dist/xlsx/context-menu/index.d.ts +2 -0
  299. package/dist/xlsx/context-menu/menu.d.ts +14 -0
  300. package/dist/xlsx/dialogs/cell-shift.d.ts +5 -0
  301. package/dist/xlsx/dialogs/cf-common.d.ts +29 -0
  302. package/dist/xlsx/dialogs/cf-manager.d.ts +8 -0
  303. package/dist/xlsx/dialogs/cf-quick.d.ts +10 -0
  304. package/dist/xlsx/dialogs/cf-rule-panels.d.ts +20 -0
  305. package/dist/xlsx/dialogs/cf-rule-scale.d.ts +3 -0
  306. package/dist/xlsx/dialogs/cf-rule.d.ts +13 -0
  307. package/dist/xlsx/dialogs/comments-list.d.ts +2 -0
  308. package/dist/xlsx/dialogs/create-names.d.ts +8 -0
  309. package/dist/xlsx/dialogs/create-table.d.ts +6 -0
  310. package/dist/xlsx/dialogs/data-validation.d.ts +3 -0
  311. package/dist/xlsx/dialogs/define-name.d.ts +9 -0
  312. package/dist/xlsx/dialogs/fields.d.ts +47 -0
  313. package/dist/xlsx/dialogs/fill-series.d.ts +10 -0
  314. package/dist/xlsx/dialogs/find-replace.d.ts +8 -0
  315. package/dist/xlsx/dialogs/format-cells/alignment-tab.d.ts +5 -0
  316. package/dist/xlsx/dialogs/format-cells/border-tab.d.ts +4 -0
  317. package/dist/xlsx/dialogs/format-cells/color-swatches.d.ts +10 -0
  318. package/dist/xlsx/dialogs/format-cells/fill-tab.d.ts +11 -0
  319. package/dist/xlsx/dialogs/format-cells/font-tab.d.ts +2 -0
  320. package/dist/xlsx/dialogs/format-cells/index.d.ts +6 -0
  321. package/dist/xlsx/dialogs/format-cells/number-tab.d.ts +7 -0
  322. package/dist/xlsx/dialogs/format-cells/protection-tab.d.ts +2 -0
  323. package/dist/xlsx/dialogs/format-cells/tab-color.d.ts +6 -0
  324. package/dist/xlsx/dialogs/frame.d.ts +27 -0
  325. package/dist/xlsx/dialogs/go-to.d.ts +12 -0
  326. package/dist/xlsx/dialogs/help-dialogs.d.ts +5 -0
  327. package/dist/xlsx/dialogs/host.d.ts +6 -0
  328. package/dist/xlsx/dialogs/hyperlink.d.ts +16 -0
  329. package/dist/xlsx/dialogs/index.d.ts +2 -0
  330. package/dist/xlsx/dialogs/insert-chart.d.ts +7 -0
  331. package/dist/xlsx/dialogs/insert-function.d.ts +10 -0
  332. package/dist/xlsx/dialogs/move-copy-sheet.d.ts +5 -0
  333. package/dist/xlsx/dialogs/name-manager.d.ts +9 -0
  334. package/dist/xlsx/dialogs/package-password.d.ts +3 -0
  335. package/dist/xlsx/dialogs/page-setup-tabs.d.ts +23 -0
  336. package/dist/xlsx/dialogs/page-setup.d.ts +6 -0
  337. package/dist/xlsx/dialogs/paste-special.d.ts +3 -0
  338. package/dist/xlsx/dialogs/prompts.d.ts +42 -0
  339. package/dist/xlsx/dialogs/protect-sheet.d.ts +8 -0
  340. package/dist/xlsx/dialogs/register-navigation.d.ts +2 -0
  341. package/dist/xlsx/dialogs/register-rules.d.ts +2 -0
  342. package/dist/xlsx/dialogs/register-tools.d.ts +2 -0
  343. package/dist/xlsx/dialogs/remove-duplicates.d.ts +2 -0
  344. package/dist/xlsx/dialogs/simple.d.ts +2 -0
  345. package/dist/xlsx/dialogs/sort-dialog.d.ts +6 -0
  346. package/dist/xlsx/dialogs/statistics.d.ts +12 -0
  347. package/dist/xlsx/dialogs/styles.d.ts +1 -0
  348. package/dist/xlsx/dialogs/symbol.d.ts +6 -0
  349. package/dist/xlsx/dialogs/text-to-columns.d.ts +9 -0
  350. package/dist/xlsx/dialogs/zoom.d.ts +2 -0
  351. package/dist/xlsx/editor-attributes.d.ts +26 -0
  352. package/dist/xlsx/editor-core.d.ts +91 -0
  353. package/dist/xlsx/editor-files.d.ts +28 -0
  354. package/dist/xlsx/editor-shell.d.ts +29 -0
  355. package/dist/xlsx/element-api.d.ts +34 -0
  356. package/dist/xlsx/events.d.ts +64 -0
  357. package/dist/xlsx/file-commands.d.ts +24 -0
  358. package/dist/xlsx/formula-bar/formula-input.d.ts +11 -0
  359. package/dist/xlsx/formula-bar/index.d.ts +3 -0
  360. package/dist/xlsx/formula-bar/name-box.d.ts +10 -0
  361. package/dist/xlsx/formula-bar/styles.d.ts +1 -0
  362. package/dist/xlsx/grid/alert.d.ts +4 -0
  363. package/dist/xlsx/grid/cell-editor.d.ts +29 -0
  364. package/dist/xlsx/grid/cell-layer.d.ts +14 -0
  365. package/dist/xlsx/grid/dom.d.ts +19 -0
  366. package/dist/xlsx/grid/drawing-keys.d.ts +7 -0
  367. package/dist/xlsx/grid/drawings.d.ts +12 -0
  368. package/dist/xlsx/grid/formula-field.d.ts +11 -0
  369. package/dist/xlsx/grid/function-assist.d.ts +16 -0
  370. package/dist/xlsx/grid/grid-a11y.d.ts +12 -0
  371. package/dist/xlsx/grid/grid-commands.d.ts +19 -0
  372. package/dist/xlsx/grid/grid-keys.d.ts +19 -0
  373. package/dist/xlsx/grid/grid-menus.d.ts +8 -0
  374. package/dist/xlsx/grid/grid-pointer.d.ts +16 -0
  375. package/dist/xlsx/grid/grid-selection.d.ts +22 -0
  376. package/dist/xlsx/grid/grid-view.d.ts +75 -0
  377. package/dist/xlsx/grid/gridlines.d.ts +7 -0
  378. package/dist/xlsx/grid/header-resize.d.ts +8 -0
  379. package/dist/xlsx/grid/headers.d.ts +9 -0
  380. package/dist/xlsx/grid/index.d.ts +8 -0
  381. package/dist/xlsx/grid/indicators.d.ts +5 -0
  382. package/dist/xlsx/grid/measure.d.ts +9 -0
  383. package/dist/xlsx/grid/pane-chrome.d.ts +22 -0
  384. package/dist/xlsx/grid/point-mode.d.ts +27 -0
  385. package/dist/xlsx/grid/selection-layer.d.ts +32 -0
  386. package/dist/xlsx/grid/smartart.d.ts +10 -0
  387. package/dist/xlsx/grid/styles.d.ts +1 -0
  388. package/dist/xlsx/grid/test-context.d.ts +14 -0
  389. package/dist/xlsx/grid/validation-list.d.ts +13 -0
  390. package/dist/xlsx/index.d.ts +10 -0
  391. package/dist/xlsx/keyboard.d.ts +41 -0
  392. package/dist/xlsx/modules.d.ts +4 -0
  393. package/dist/xlsx/print.d.ts +22 -0
  394. package/dist/xlsx/ribbon/caption.d.ts +4 -0
  395. package/dist/xlsx/ribbon/color-grid.d.ts +18 -0
  396. package/dist/xlsx/ribbon/controls-input.d.ts +22 -0
  397. package/dist/xlsx/ribbon/controls.d.ts +28 -0
  398. package/dist/xlsx/ribbon/icons.d.ts +8 -0
  399. package/dist/xlsx/ribbon/keytips.d.ts +12 -0
  400. package/dist/xlsx/ribbon/overflow.d.ts +3 -0
  401. package/dist/xlsx/ribbon/popover.d.ts +30 -0
  402. package/dist/xlsx/ribbon/ribbon.d.ts +24 -0
  403. package/dist/xlsx/ribbon/tabs/contextual.d.ts +3 -0
  404. package/dist/xlsx/ribbon/tabs/formulas-data.d.ts +3 -0
  405. package/dist/xlsx/ribbon/tabs/home-groups.d.ts +6 -0
  406. package/dist/xlsx/ribbon/tabs/home.d.ts +3 -0
  407. package/dist/xlsx/ribbon/tabs/index.d.ts +2 -0
  408. package/dist/xlsx/ribbon/tabs/insert-layout.d.ts +3 -0
  409. package/dist/xlsx/ribbon/visibility.d.ts +1 -0
  410. package/dist/xlsx/sheet-tabs/drag.d.ts +12 -0
  411. package/dist/xlsx/sheet-tabs/index.d.ts +4 -0
  412. package/dist/xlsx/sheet-tabs/rename.d.ts +8 -0
  413. package/dist/xlsx/sheet-tabs/render.d.ts +15 -0
  414. package/dist/xlsx/sheet-tabs/styles.d.ts +1 -0
  415. package/dist/xlsx/shell-commands.d.ts +13 -0
  416. package/dist/xlsx/shortcut-help.d.ts +15 -0
  417. package/dist/xlsx/status-bar.d.ts +26 -0
  418. package/dist/xlsx/test-support/shell.d.ts +19 -0
  419. package/dist/xlsx/theme/index.d.ts +5 -0
  420. package/dist/xlsx/theme/styles.d.ts +7 -0
  421. package/dist/xlsx/title-bar.d.ts +17 -0
  422. package/dist/xlsx/toast.d.ts +8 -0
  423. package/dist/xlsx.js +14188 -0
  424. package/package.json +27 -2
@@ -0,0 +1,59 @@
1
+ import { type DocumentModel } from 'ooxml-core/docx';
2
+ import { type Backstage } from './backstage';
3
+ import type { BackstageOptions, BackstageOptionKey } from './backstage-options';
4
+ import { type FileCommand } from './file-commands';
5
+ import { type EditorLocale } from './localization';
6
+ import { type StatusBar } from './status-bar';
7
+ import { type SaveState, type TitleBar } from './title-bar';
8
+ /** What the chrome needs from the editor element; keeps component.ts free of chrome details. */
9
+ export interface ChromeHost {
10
+ element: HTMLElement;
11
+ model(): DocumentModel;
12
+ ribbon(): HTMLElement | undefined;
13
+ wordCount(): number;
14
+ locale(): EditorLocale;
15
+ readOnly(): boolean;
16
+ setReadOnly(readOnly: boolean): void;
17
+ newDocument(): void;
18
+ load(bytes: Uint8Array): Promise<void>;
19
+ save(): Promise<Uint8Array>;
20
+ print(): void;
21
+ history(key: 'undo' | 'redo'): void;
22
+ toggleComments(): void;
23
+ setViewMode(mode: 'draft' | 'print'): void;
24
+ setZoom(percent: number): void;
25
+ reportError(error: Error): void;
26
+ /** Mirrors the title bar's save state into `element.dirty`. */
27
+ saveStateChanged?(state: SaveState): void;
28
+ /** Editor options shown on File > Options. */
29
+ options(): BackstageOptions;
30
+ setOption(key: BackstageOptionKey, value: string): void;
31
+ hiddenActions(): readonly string[];
32
+ setHiddenActions(ids: string[]): void;
33
+ }
34
+ export declare const DEFAULT_FILE_NAME = "Document1.docx";
35
+ /** Title bar, File tab/backstage, status bar and the default browser file workflow. */
36
+ export declare class EditorChrome {
37
+ private readonly host;
38
+ readonly titleBar: TitleBar;
39
+ readonly backstage: Backstage;
40
+ readonly statusBar: StatusBar;
41
+ readonly fileInput: HTMLInputElement;
42
+ private ribbon;
43
+ private _fileName;
44
+ private state;
45
+ constructor(host: ChromeHost);
46
+ /** Adds the chrome around an existing frame: title bar first, status bar and backstage last. */
47
+ mount(frame: HTMLElement, ribbon: HTMLElement): void;
48
+ get fileName(): string;
49
+ set fileName(value: string);
50
+ get isDirty(): boolean;
51
+ setSaveState(state: SaveState): void;
52
+ setLocale(locale: EditorLocale): void;
53
+ refresh(pageText: string, wordText: string): void;
54
+ closeBackstage(): void;
55
+ /** Runs a file command unless a host cancels the `file-command` event to handle it itself. */
56
+ run(command: FileCommand, fileName?: string): Promise<void>;
57
+ private newDocument;
58
+ private openSelectedFile;
59
+ }
@@ -0,0 +1,7 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import type { RibbonAction } from './ribbon';
4
+ /** ProseMirror bindings the editor adds on top of the base keymap; the help dialog lists these. */
5
+ export declare const editorBindings: Record<string, Command>;
6
+ export declare function editorKeymap(showSearch: () => void): import("prosemirror-state").Plugin<any>;
7
+ export declare function runRibbonCommand(view: EditorView, action: RibbonAction, nextId?: (kind: string) => string): void;
@@ -0,0 +1,10 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import type { DocumentModel } from 'ooxml-core/docx';
3
+ import type { EditorLocale } from './localization';
4
+ export declare function refreshEditorControls(toolbar: HTMLElement | undefined, view: EditorView | undefined, model: DocumentModel, readOnly: boolean, collaboration: boolean, locale: EditorLocale, language: string, printPageStatus?: {
5
+ current: number;
6
+ total: number;
7
+ } | null, commentsOpen?: boolean): {
8
+ pageText: string;
9
+ wordText: string;
10
+ } | undefined;
@@ -0,0 +1,78 @@
1
+ import { FormatDialogs } from './format-dialogs';
2
+ import type { EditorState, Transaction } from 'prosemirror-state';
3
+ import type { EditorView } from 'prosemirror-view';
4
+ import type { DocumentModel } from 'ooxml-core/docx';
5
+ import type { loadDocument } from 'ooxml-core/docx/load';
6
+ import type { SearchPanelHandle } from './search-panel';
7
+ import { CollaborationSession } from './collaboration-session';
8
+ import type { EditorTheme, EditorThemeMode } from 'ooxml-core/docx/ui';
9
+ import type { EditorLocale } from './localization';
10
+ import type { PrintLayoutController } from './print-layout-view';
11
+ import type { ReviewDisplayMode } from './review-display';
12
+ import type { ReviewController } from './review-controller';
13
+ import { ImageMediaCache } from './image-media';
14
+ import type { EditorChrome } from './editor-chrome';
15
+ import { type EditorHost } from './editor-host';
16
+ import { PartsController } from './parts-controller';
17
+ import { PageController } from './page-controller';
18
+ import { InsertController } from './insert-controller';
19
+ import { DirtyState } from 'ooxml-core/docx/ui';
20
+ import { PageTracker } from './page-sync';
21
+ import type { PageNavigator } from './page-navigator';
22
+ import type { HeadingNavigator } from './heading-navigator';
23
+ import { ViewOptions } from './view-options';
24
+ export type LoadedDocument = Awaited<ReturnType<typeof loadDocument>>;
25
+ /** DOM pieces created by the shell once the element connects. */
26
+ export interface ShellParts {
27
+ toolbar?: HTMLElement;
28
+ canvas?: HTMLElement;
29
+ paper?: HTMLElement;
30
+ searchPanel?: SearchPanelHandle;
31
+ review?: ReviewController;
32
+ chrome?: EditorChrome;
33
+ printLayout?: PrintLayoutController;
34
+ navigator?: PageNavigator;
35
+ headings?: HeadingNavigator;
36
+ }
37
+ /**
38
+ * Mutable editor state and the controllers that share it. `<docx-editor>` is a thin facade over
39
+ * this object; the shell, render, ribbon and chrome modules take it instead of reaching into the
40
+ * element's private fields.
41
+ */
42
+ export declare class EditorCore {
43
+ readonly element: HTMLElement;
44
+ model: DocumentModel;
45
+ view?: EditorView | undefined;
46
+ loaded?: LoadedDocument | undefined;
47
+ loadGeneration: number;
48
+ readOnly: boolean;
49
+ locale: EditorLocale;
50
+ reviewAuthor: string;
51
+ theme: EditorThemeMode;
52
+ themeColors?: Partial<EditorTheme> | undefined;
53
+ appliedThemeVars: string[];
54
+ reviewDisplayMode: ReviewDisplayMode;
55
+ detachedState?: EditorState | undefined;
56
+ pendingFileName?: string;
57
+ readonly shell: ShellParts;
58
+ readonly collab: CollaborationSession;
59
+ readonly inserts: InsertController;
60
+ readonly formatDialogs: FormatDialogs;
61
+ readonly imageMedia: ImageMediaCache;
62
+ readonly host: EditorHost;
63
+ readonly parts: PartsController;
64
+ readonly pages: PageController;
65
+ readonly viewOptions: ViewOptions;
66
+ readonly dirtyState: DirtyState;
67
+ readonly pageTracker: PageTracker;
68
+ constructor(element: HTMLElement);
69
+ contentWidth(): number;
70
+ /** The ribbon acts on an open header/footer/note editor, otherwise on the main text. */
71
+ targetView(): EditorView | undefined;
72
+ notifyChange(): void;
73
+ markEditedOutsideBody(): void;
74
+ scheduleCollaborationSend(): void;
75
+ pendingCollaboration(): import("ooxml-core/docx/ui").StepBatch | null;
76
+ applyTransaction(transaction: Transaction, remote?: boolean): void;
77
+ refreshControls(): void;
78
+ }
@@ -0,0 +1,19 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import type { DocumentModel } from 'ooxml-core/docx';
3
+ import type { EditorLocale } from './localization';
4
+ /** What feature controllers need from the editor element, without reaching into its internals. */
5
+ export interface EditorHost {
6
+ readonly element: HTMLElement;
7
+ view(): EditorView | undefined;
8
+ model(): DocumentModel;
9
+ /** Replaces the model for edits made outside the main editing surface. */
10
+ setModel(model: DocumentModel): void;
11
+ locale(): EditorLocale;
12
+ /** Editable and not in a collaboration session (parts and page setup aren't synced). */
13
+ canEditOutsideBody(): boolean;
14
+ /** Marks the document changed after an edit outside the main surface. */
15
+ edited(): void;
16
+ reportError(cause: unknown): void;
17
+ }
18
+ /** Raises the editor's `document-error` event for any thrown value. */
19
+ export declare function dispatchDocumentError(element: HTMLElement, cause: unknown): void;
@@ -0,0 +1,2 @@
1
+ import type { EditorCore } from './editor-core';
2
+ export declare function attachEditorInteractions(core: EditorCore, frame: HTMLElement): void;
@@ -0,0 +1,16 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { Plugin } from 'prosemirror-state';
3
+ import { type ReviewDisplayMode } from './review-display';
4
+ /** What the body editor's plugins read from the editor element. */
5
+ export interface BodyPluginHost {
6
+ model(): DocumentModel;
7
+ reviewAuthor(): string;
8
+ reviewDisplayMode(): ReviewDisplayMode;
9
+ insertNote(kind: 'footnote' | 'endnote'): void;
10
+ showSearch(): void;
11
+ /** Controller and collaboration plugins, in the order they apply. */
12
+ extraPlugins: Plugin[];
13
+ collaborationPlugins: Plugin[];
14
+ }
15
+ /** The main body editor's plugins: history, structure guards, style decorations, review and keys. */
16
+ export declare function bodyPlugins(host: BodyPluginHost): Plugin[];
@@ -0,0 +1,20 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import { PresenceClient, type PresenceConfig, type PresenceMessage, type PresenceReceiveResult } from './presence';
3
+ export declare class EditorPresence {
4
+ private element;
5
+ private view;
6
+ readonly client: PresenceClient;
7
+ private profile?;
8
+ private scheduled;
9
+ constructor(config: PresenceConfig, element: HTMLElement, view: () => EditorView | undefined);
10
+ publish(profile: {
11
+ name: string;
12
+ color: string;
13
+ }): PresenceMessage | null;
14
+ receive(input: unknown): PresenceReceiveResult['status'];
15
+ leave(): PresenceMessage | null;
16
+ /** Re-renders peer labels after a display-locale change. */
17
+ relocalize(): void;
18
+ schedule(): void;
19
+ private emit;
20
+ }
@@ -0,0 +1,3 @@
1
+ import type { EditorCore } from './editor-core';
2
+ /** Rebuilds the ProseMirror view for the current model (or the detached state kept while unmounted). */
3
+ export declare function renderDocument(core: EditorCore): void;
@@ -0,0 +1,11 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorCore } from './editor-core';
3
+ /** Element-level operations the chrome needs; they stay on the element because they are public API. */
4
+ export interface ShellApi {
5
+ setReadOnly(readOnly: boolean): void;
6
+ setDocumentModel(model: DocumentModel): void;
7
+ load(bytes: Uint8Array | ArrayBuffer): Promise<void>;
8
+ saveBytes(): Promise<Uint8Array>;
9
+ }
10
+ /** Builds the shadow-DOM shell (ribbon, canvas, panels, chrome) once; later calls are no-ops. */
11
+ export declare function buildShell(core: EditorCore, api: ShellApi): void;
@@ -0,0 +1,35 @@
1
+ import type { EditorCore } from './editor-core';
2
+ import { type RibbonActionId, type RibbonActionInput } from 'ooxml-core/docx/ui';
3
+ declare const HTMLElementBase: typeof HTMLElement;
4
+ /**
5
+ * Save, dirty-tracking and UI-customisation surface of `<docx-editor>`. It only reads and writes
6
+ * the shared `EditorCore`, so the element class stays a thin lifecycle facade.
7
+ */
8
+ export declare abstract class DocxEditorApi extends HTMLElementBase {
9
+ protected abstract readonly core: EditorCore;
10
+ abstract fileName: string;
11
+ /** Shows the left rail of page thumbnails. Needs Print Layout; reflected to `show-thumbnails`. */
12
+ get showThumbnails(): boolean;
13
+ set showThumbnails(value: boolean);
14
+ /** Hides the ribbon (the title bar and status bar stay). Default true; `show-toolbar="false"`. */
15
+ get showToolbar(): boolean;
16
+ set showToolbar(value: boolean);
17
+ /**
18
+ * Ribbon controls to hide, by stable id (`RIBBON_ACTION_IDS`, e.g. `'bold'`). Unknown ids are
19
+ * ignored. The old English labels (`'Bold'`) are still accepted for one release: they are mapped
20
+ * to ids and reported through a `document-warning` event. Reading returns ids only.
21
+ */
22
+ get hiddenActions(): readonly RibbonActionId[];
23
+ set hiddenActions(value: readonly RibbonActionInput[]);
24
+ /** True after an edit until the document is saved through File > Save, `download()`, loaded or `markClean()`. */
25
+ get dirty(): boolean;
26
+ /** Declares the current content saved, for hosts that persist the result of `save()` themselves. */
27
+ markClean(): void;
28
+ /** Serialized document bytes: the loaded package's own writer, else a fresh DOCX from the model. */
29
+ saveBytes(): Promise<Uint8Array>;
30
+ /** The saved document as a Blob. Does not change `dirty`; call `markClean()` after persisting it. */
31
+ save(): Promise<Blob>;
32
+ /** Saves and starts a browser download, then marks the document clean. */
33
+ download(fileName?: string): Promise<void>;
34
+ }
35
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { NodeSpec } from 'prosemirror-model';
2
+ /** Read-only native MathML display. The source OMML stays in the atom for saving. */
3
+ export declare function equationDom(omml: string, display: boolean): HTMLElement;
4
+ export declare const equationNodeSpec: NodeSpec;
@@ -0,0 +1,45 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { StepBatch } from 'ooxml-core/docx/ui';
3
+ import type { FileCommandDetail } from './file-commands';
4
+ import type { PageChangeDetail } from './page-sync';
5
+ import type { PresenceMessage } from './presence';
6
+ import type { RibbonAction } from './ribbon';
7
+ /** Every CustomEvent the `<docx-editor>` element (and its controllers) dispatches, with its detail. */
8
+ export interface DocxEditorEventMap {
9
+ /** The document changed through editing, review actions or edits outside the main surface. */
10
+ 'document-change': CustomEvent<DocumentModel>;
11
+ /** Loading, saving, printing or an edit failed. */
12
+ 'document-error': CustomEvent<Error>;
13
+ /** Non-fatal notice, for example that a print layout could not be produced faithfully. */
14
+ 'document-warning': CustomEvent<string>;
15
+ /** The user toggled read-only from the editor chrome. */
16
+ 'readonly-change': CustomEvent<boolean>;
17
+ /** A ribbon control was activated. Bubbles from inside the shadow tree. */
18
+ 'ribbon-action': CustomEvent<RibbonAction>;
19
+ /** The user changed which ribbon commands are shown (File > Customize Ribbon); persist the ids if you want them kept. */
20
+ 'ribbon-customize': CustomEvent<readonly string[]>;
21
+ /** Cancelable: call `preventDefault()` to handle a File command (open/save/…) yourself. */
22
+ 'file-command': CustomEvent<FileCommandDetail>;
23
+ /** Print Layout's current page or page count changed (approximate pagination, not Word's). */
24
+ 'page-change': CustomEvent<PageChangeDetail>;
25
+ /** Unsaved-changes state flipped: true after an edit, false after save, load or `markClean()`. */
26
+ 'dirty-change': CustomEvent<boolean>;
27
+ /** Local presence changed; transport it to other clients. */
28
+ 'presence-send': CustomEvent<PresenceMessage>;
29
+ /** Local steps are pending; transport the batch to the collaboration authority. */
30
+ 'collaboration-send': CustomEvent<StepBatch>;
31
+ }
32
+ export type DocxEditorEventName = keyof DocxEditorEventMap;
33
+ /** Detail payload type of the named event. */
34
+ export type DocxEditorEventDetail<K extends DocxEditorEventName> = DocxEditorEventMap[K] extends CustomEvent<infer D> ? D : never;
35
+ /** Runtime list of every event name; the `satisfies` check keeps it a subset of the map. */
36
+ export declare const DOCX_EDITOR_EVENTS: readonly ["document-change", "document-error", "document-warning", "readonly-change", "ribbon-action", "ribbon-customize", "file-command", "page-change", "dirty-change", "presence-send", "collaboration-send"];
37
+ /** Typed listener for plain elements (such as the ribbon) that are not a `<docx-editor>`. */
38
+ export declare function on<K extends DocxEditorEventName>(target: EventTarget, name: K, listener: (event: DocxEditorEventMap[K]) => void): void;
39
+ /**
40
+ * Dispatches a typed, bubbling, composed CustomEvent. Returns false when a cancelable event was
41
+ * canceled by a listener (same contract as `EventTarget.dispatchEvent`).
42
+ */
43
+ export declare function emit<K extends DocxEditorEventName>(target: EventTarget, name: K, detail: DocxEditorEventDetail<K>, options?: {
44
+ cancelable?: boolean;
45
+ }): boolean;
@@ -0,0 +1,16 @@
1
+ import type { Transaction } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ /**
4
+ * Word's Update Field for the whole body: every `SEQ` caption is renumbered, then `REF` results
5
+ * follow their bookmarked paragraph and `PAGEREF` results take the page from `pageOf`. A REF that
6
+ * pointed at a caption's label and number keeps showing the label; a longer result is treated as
7
+ * the entire caption. Fields with other switches or a missing bookmark are left as they are.
8
+ * One undoable step; returns whether anything changed.
9
+ */
10
+ export declare function updateFields(view: EditorView, pageOf: (id: string) => string | undefined): boolean;
11
+ /**
12
+ * The refresh behind `updateFields`, applied to `tr` so other commands (a new caption) can include
13
+ * it in their own undo step. Without `pageOf`, `PAGEREF` results are left alone: pages need a layout.
14
+ * With `captionsOnly`, only references that quote a caption are refreshed.
15
+ */
16
+ export declare function refreshFieldResults(tr: Transaction, pageOf?: (id: string) => string | undefined, captionsOnly?: boolean): Transaction;
@@ -0,0 +1,15 @@
1
+ export type FileCommand = 'new' | 'open' | 'save' | 'saveAs' | 'export' | 'exportText' | 'print';
2
+ export interface FileCommandDetail {
3
+ command: FileCommand;
4
+ /** Save As: the name the user chose. */
5
+ fileName?: string;
6
+ }
7
+ export declare function announceFileCommand(host: HTMLElement, command: FileCommand, fileName?: string): boolean;
8
+ /** Wraps saved bytes in a Blob typed from the file name's extension (docx unless `.doc`). */
9
+ export declare function wordBlob(bytes: Uint8Array, fileName: string): Blob;
10
+ /** Starts a browser download of `bytes` named `fileName`. */
11
+ export declare function downloadBytes(bytes: Uint8Array, fileName: string): void;
12
+ /** Starts a browser download of `text` as a UTF-8 plain-text file. */
13
+ export declare function downloadText(text: string, fileName: string): void;
14
+ /** Replaces the extension of `fileName` (or appends one). */
15
+ export declare function withExtension(fileName: string, extension: string): string;
@@ -0,0 +1,3 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ /** Returns focus to the editor where the platform supports it (jsdom and SSR do not). */
3
+ export declare function focusView(view: EditorView | undefined): void;
@@ -0,0 +1,18 @@
1
+ import type { FontFormat, FontFormatState } from './font-format';
2
+ /** Word's Advanced character spacing controls. Untouched mixed values stay mixed. */
3
+ export declare function createFontAdvanced(mark: (...fields: Array<keyof FontFormat>) => void): {
4
+ element: HTMLFieldSetElement;
5
+ spacingKind: HTMLSelectElement;
6
+ spacingBy: HTMLInputElement;
7
+ reset(state: FontFormatState): void;
8
+ valid(dirty: Set<keyof FontFormat>, reveal?: () => void): boolean;
9
+ collect(dirty: Set<keyof FontFormat>): Partial<FontFormat>;
10
+ previewStyle(size: number): {
11
+ fontVariantLigatures: string;
12
+ transform: string;
13
+ letterSpacing: string;
14
+ position: string;
15
+ top: string;
16
+ fontKerning: string;
17
+ };
18
+ };
@@ -0,0 +1,8 @@
1
+ /** Accessible Font/Advanced tabs, with roving keyboard focus. */
2
+ export declare function createFontDialogTabs(): {
3
+ list: HTMLDivElement;
4
+ basic: HTMLDivElement;
5
+ advanced: HTMLDivElement;
6
+ reset: () => void;
7
+ showAdvanced: () => void;
8
+ };
@@ -0,0 +1,11 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import { type EditorLocale } from './localization';
3
+ export interface FormatDialog {
4
+ element: HTMLElement;
5
+ open(): void;
6
+ close(): void;
7
+ setLocale(locale: EditorLocale): void;
8
+ readonly isOpen: boolean;
9
+ }
10
+ /** Word's Font dialog: family, style, size, colour, underline, effects and character spacing. */
11
+ export declare function createFontDialog(getView: () => EditorView | undefined, getHistoryView?: () => EditorView | undefined): FormatDialog;
@@ -0,0 +1,3 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ /** Runs Font's existing commands against a draft state, then dispatches one atomic change. */
3
+ export declare function batchFontFormat(view: EditorView, apply: (draft: EditorView) => void): void;
@@ -0,0 +1,38 @@
1
+ import { type Ligatures } from 'ooxml-core/docx';
2
+ import type { EditorState } from 'prosemirror-state';
3
+ import type { EditorView } from 'prosemirror-view';
4
+ export type UnderlineKind = 'none' | 'single' | 'double' | 'dotted' | 'dash' | 'wave';
5
+ export type Script = 'none' | 'superscript' | 'subscript';
6
+ /** Formatting edited by the Font dialog, in UI units (points instead of twips). */
7
+ export interface FontFormat {
8
+ family: string;
9
+ size: number;
10
+ color: string;
11
+ bold: boolean;
12
+ italic: boolean;
13
+ underline: UnderlineKind;
14
+ /** `null` is Word's "Automatic" (the text colour). */
15
+ underlineColor: string | null;
16
+ strike: boolean;
17
+ doubleStrike: boolean;
18
+ script: Script;
19
+ smallCaps: boolean;
20
+ caps: boolean;
21
+ hidden: boolean;
22
+ /** Expanded (positive) or condensed (negative) character spacing in points. */
23
+ spacing: number;
24
+ scale: number;
25
+ /** Baseline displacement in points; positive raises, negative lowers. */
26
+ position: number;
27
+ /** Minimum point size for kerning; zero means off. */
28
+ kerning: number;
29
+ ligatures: Ligatures;
30
+ }
31
+ /** A selection's format, with `null` for a field whose value differs across the selection. */
32
+ export type FontFormatState = {
33
+ [K in keyof FontFormat]: FontFormat[K] | null;
34
+ };
35
+ /** The selection's font format (or the caret's), with `null` where the selection mixes values. */
36
+ export declare function readFontFormat(state: EditorState): FontFormatState;
37
+ /** Applies the fields present in `changes` to the selection; untouched fields keep their values. */
38
+ export declare function applyFontFormat(view: EditorView, changes: Partial<FontFormat>): void;
@@ -0,0 +1,5 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ /** The next size on Word's ladder above or below `size`; beyond the ends it steps by 2 pt. */
3
+ export declare function steppedFontSize(size: number, direction: 'grow' | 'shrink'): number;
4
+ /** Grows or shrinks the font size of the selection (or of the next typed text) by one step. */
5
+ export declare function stepFontSize(view: EditorView, direction: 'grow' | 'shrink'): void;
@@ -0,0 +1,9 @@
1
+ import type { Node as ProseMirrorNode } from 'prosemirror-model';
2
+ import type { EditorState } from 'prosemirror-state';
3
+ /** The family and size text shows in the editor: direct marks, then character/paragraph style and theme. */
4
+ export declare function effectiveFont(state: EditorState, text: ProseMirrorNode, paragraph: ProseMirrorNode): {
5
+ family: string;
6
+ size: number;
7
+ };
8
+ /** Shows the selection's font family and size in the two combo boxes (blank when they differ). */
9
+ export declare function syncFontControls(toolbar: HTMLElement, state: EditorState): void;
@@ -0,0 +1,37 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import { type FormatDialog } from './font-dialog';
4
+ import type { EditorLocale } from './localization';
5
+ import { type WatermarkHost } from './watermark-dialog';
6
+ import { type PageBordersHost } from './page-borders-dialog';
7
+ import { type PageSetupHost } from './page-setup-dialog';
8
+ import { type ZoomHost } from './zoom-dialog';
9
+ import { type LineNumberHost } from './line-number-dialog';
10
+ import { type ColumnsHost } from './columns-dialog';
11
+ export type FormatDialogKind = 'font' | 'paragraph' | 'bookmark' | 'pageSetup' | 'caption' | 'crossReference' | 'zoom' | 'borders' | 'tableProperties' | 'lineNumbers' | 'textBox' | 'pageBorders' | 'watermark' | 'dropCap' | 'columns' | 'multilevelList';
12
+ export interface FormatDialogsHost {
13
+ view(): EditorView | undefined;
14
+ /** Header/footer edits use the main document's history; notes use their own. */
15
+ historyView?(): EditorView | undefined;
16
+ model(): DocumentModel;
17
+ canDefineList?(): boolean;
18
+ /** Page Setup edits the section holding the selection. */
19
+ pageSetup?: Omit<PageSetupHost, 'restoreFocus'>;
20
+ /** View > Zoom: the current zoom and how to change it. */
21
+ zoom?: Omit<ZoomHost, 'restoreFocus'>;
22
+ lineNumbers?: Omit<LineNumberHost, 'restoreFocus'>;
23
+ pageBorders?: Omit<PageBordersHost, 'restoreFocus'>;
24
+ watermark?: Omit<WatermarkHost, 'restoreFocus'>;
25
+ columns?: Omit<ColumnsHost, 'restoreFocus'>;
26
+ }
27
+ /** The Font and Paragraph dialogs opened from the ribbon's group launchers. */
28
+ export declare class FormatDialogs {
29
+ private readonly dialogs;
30
+ constructor(host: FormatDialogsHost);
31
+ get elements(): HTMLElement[];
32
+ get list(): FormatDialog[];
33
+ /** Opens `kind`, closing the other one first. */
34
+ open(kind: FormatDialogKind): void;
35
+ closeAll(): void;
36
+ setLocale(locale: EditorLocale): void;
37
+ }
@@ -0,0 +1,12 @@
1
+ import type { Mark } from 'prosemirror-model';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ export declare function isFormatPainterArmed(view: EditorView): boolean;
4
+ /** Replaces the character formatting of `[from, to]` with `marks`. */
5
+ export declare function paintMarks(view: EditorView, marks: readonly Mark[], from: number, to: number): void;
6
+ /**
7
+ * Word's Format Painter: the first call copies the character formatting at the selection and arms
8
+ * the painter; the next non-empty selection made with the mouse or keyboard receives it. Calling it
9
+ * again, pressing Escape or editing cancels it. Paragraph formatting is not carried.
10
+ * Returns whether the painter is now armed.
11
+ */
12
+ export declare function toggleFormatPainter(view: EditorView, onChange: (armed: boolean) => void): boolean;
@@ -0,0 +1,4 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ /** Word's Go To, as a panel under the Find menu: pick what to go to, then pick the item. */
4
+ export declare function openGoToPanel(anchor: HTMLElement, view: EditorView, model: DocumentModel, onClose: () => void): void;
@@ -0,0 +1,23 @@
1
+ import { type DocumentModel } from 'ooxml-core/docx';
2
+ import type { Node as ProseMirrorNode } from 'prosemirror-model';
3
+ import type { EditorView } from 'prosemirror-view';
4
+ export type GoToKind = 'heading' | 'bookmark' | 'table' | 'graphic';
5
+ export interface GoToTarget {
6
+ label: string;
7
+ /** Document position to select: a text position, or a node position for a picture. */
8
+ pos: number;
9
+ /** Set when the target is a picture (an inline atom that gets a node selection). */
10
+ node?: boolean;
11
+ }
12
+ /**
13
+ * Everything Word's Go To can jump to that this editor models: headings (by style), bookmarks,
14
+ * tables and pictures, in document order. Bookmarks are listed once, at their paragraph.
15
+ */
16
+ export declare function goToTargets(doc: ProseMirrorNode, model: DocumentModel, kind: GoToKind): GoToTarget[];
17
+ /** Selects `target` and scrolls it into view. Returns false when the position no longer exists. */
18
+ export declare function goToTarget(view: EditorView, target: GoToTarget): boolean;
19
+ /**
20
+ * Word's Select > Select Objects: selects the next picture after the selection, wrapping to the
21
+ * first one. Returns false when the document has no pictures.
22
+ */
23
+ export declare function selectNextObject(view: EditorView): boolean;
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ /** Replaces the current selection with an inline Word-style line break. */
3
+ export declare const insertHardBreak: Command;
@@ -0,0 +1,19 @@
1
+ import type { DocumentModel, Paragraph } from 'ooxml-core/docx';
2
+ export type HeaderFooterKind = 'headers' | 'footers';
3
+ export type PageNumberAlign = 'left' | 'center' | 'right';
4
+ export type PageNumberStyle = 'plain' | 'pageOfTotal';
5
+ export type HeaderFooterSlot = 'default' | 'first' | 'even';
6
+ /** A block id for new header/footer content, unique within this session and the document. */
7
+ export declare const newHeaderFooterId: () => string;
8
+ /** The first free `word/headerN.xml` / `word/footerN.xml` name among the parts the model uses. */
9
+ export declare function nextPartName(model: DocumentModel, kind: HeaderFooterKind): string;
10
+ /** A paragraph holding Word's PAGE field (`fldSimple`), showing 1 until Print Layout recalculates. */
11
+ export declare function pageNumberParagraph(id: string, align: PageNumberAlign, style?: PageNumberStyle): Paragraph;
12
+ /**
13
+ * Insert > Page Number: puts a PAGE field at the given position of the selected section's header or
14
+ * footer, creating that part when the document has none. An existing header or footer keeps its
15
+ * content; its page-number paragraph is re-aligned, or one is added at the end.
16
+ */
17
+ export declare function withPageNumber(model: DocumentModel, position: 'top' | 'bottom', align: PageNumberAlign, newId: () => string, sectionIndex?: number, style?: PageNumberStyle, slot?: HeaderFooterSlot): DocumentModel;
18
+ /** Insert > Header or Footer > Blank: creates an empty part when there is none; otherwise a no-op. */
19
+ export declare function withBlankHeaderFooter(model: DocumentModel, kind: HeaderFooterKind, newId: () => string, sectionIndex?: number, slot?: HeaderFooterSlot): DocumentModel;
@@ -0,0 +1,40 @@
1
+ import { type Plugin } from 'prosemirror-state';
2
+ import { EditorView, type EditorProps } from 'prosemirror-view';
3
+ import { type Block, type DocumentModel, type HeaderFooterContent } from 'ooxml-core/docx';
4
+ export type HeaderFooterSlotName = 'default' | 'first' | 'even';
5
+ /** Picture support for in-place editors: node views, and a hook to finish previews after closing. */
6
+ export interface InlineEditorOptions {
7
+ /** Owner document formatting for the preview after this editor closes. */
8
+ contextModel?(): DocumentModel;
9
+ nodeViews?: EditorProps['nodeViews'];
10
+ decorate?(preview: HTMLElement): void;
11
+ /** Extra plugins, e.g. the editor's Ctrl+K link shortcut. */
12
+ plugins?: Plugin[];
13
+ /** Reports the editor becoming the ribbon's target, and closing. */
14
+ activate?(view: EditorView): void;
15
+ deactivate?(view: EditorView): void;
16
+ /** Focus moving into these (the ribbon, dialogs) keeps the editor open. */
17
+ keepOpenWithin?(): (Element | undefined)[];
18
+ /** Header/footer editors share the body document's undo stack. Notes may keep local history. */
19
+ history?(key: 'undo' | 'redo'): boolean;
20
+ registerClose?(close: () => void): void;
21
+ }
22
+ export interface HeaderFooterEditingOptions {
23
+ editor?: InlineEditorOptions;
24
+ /** The content currently shown in `slot`, if any. */
25
+ content(slot: HeaderFooterSlotName): HeaderFooterContent | undefined;
26
+ /** Called with the slot's new blocks after every edit. */
27
+ change(slot: HeaderFooterSlotName, blocks: Block[]): void;
28
+ /** Header/footer editing is off in Viewing mode and during collaboration. */
29
+ editable(): boolean;
30
+ }
31
+ /**
32
+ * Word-style header/footer editing on the continuous surface: double-click a header or footer
33
+ * slot to edit it in place; Escape or moving focus elsewhere returns to the read-only preview.
34
+ */
35
+ export declare function attachHeaderFooterEditing(root: HTMLElement, options: HeaderFooterEditingOptions): void;
36
+ /**
37
+ * Replaces `body` with an in-place editor for `blocks` (same schema, history and formatting keys as
38
+ * the main editor). Escape or moving focus elsewhere closes it and re-renders a read-only preview.
39
+ */
40
+ export declare function openBlocksEditor(container: HTMLElement, body: HTMLElement, blocks: Block[], change: (blocks: Block[]) => void, options?: InlineEditorOptions): void;
@@ -0,0 +1,6 @@
1
+ import type { DocumentModel, HeaderFooterContent, HeaderFooterSlots } from 'ooxml-core/docx';
2
+ import { type HeaderFooterKind, type HeaderFooterSlot } from './header-footer-commands';
3
+ /** Missing references inherit independently for each story, as in Word. */
4
+ export declare function effectiveHeaderFooter(model: DocumentModel, index: number, kind: HeaderFooterKind, slot: HeaderFooterSlot): HeaderFooterContent | undefined;
5
+ export declare function effectiveSlots(model: DocumentModel, index: number, kind: HeaderFooterKind): HeaderFooterSlots;
6
+ export declare function withHeaderFooterLink(model: DocumentModel, index: number, kind: HeaderFooterKind, slot: HeaderFooterSlot, linked: boolean): DocumentModel;