ooxml-ui 0.27.2 → 0.28.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 +14 -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,24 @@
1
+ /** Display-language strings for the shared editor UI. This locale never changes DOCX language marks. */
2
+ import { EDITOR_LOCALES, type LocalizationKey } from './localization-strings';
3
+ export type EditorLocale = (typeof EDITOR_LOCALES)[number];
4
+ /** A locale code a host may pass: a canonical code (autocompleted) or any BCP 47 tag such as `de-DE`. */
5
+ export type EditorLocaleInput = EditorLocale | (string & {});
6
+ export { EDITOR_LOCALES };
7
+ export type { LocalizationKey };
8
+ /**
9
+ * Maps any BCP 47 tag to a supported display locale, falling back to English. Region variants
10
+ * resolve to their language (`fr-CA`, `de-DE`, `es-MX`); `zh`, `zh-CN`, `zh-Hans` and `zh-SG` use
11
+ * Simplified Chinese, while Traditional tags (`zh-TW`, `zh-HK`, `zh-Hant`) are unsupported.
12
+ */
13
+ export declare function normalizeEditorLocale(value: string | null | undefined): EditorLocale;
14
+ export declare function translate(locale: EditorLocale, key: LocalizationKey): string;
15
+ /** Translates a `{name}` template key and fills its placeholders. */
16
+ export declare function translateTemplate(locale: EditorLocale, key: LocalizationKey, values: Record<string, string | number>): string;
17
+ export declare function translateUiText(root: HTMLElement, englishText: string): string;
18
+ export declare function formatWordCount(locale: EditorLocale, count: number): string;
19
+ export declare function formatPageStatus(locale: EditorLocale, current: number, total: number): string;
20
+ /** The display locale of the editor chrome that contains `element`. */
21
+ export declare function localeOf(element: Element): EditorLocale;
22
+ /** Translate literal UI labels in-place while retaining action data and current control state. */
23
+ export declare function localizeElement(root: HTMLElement, locale: EditorLocale): void;
24
+ export declare function findLocalizedControl<T extends HTMLElement>(root: ParentNode, label: string): T | null;
@@ -0,0 +1,6 @@
1
+ import { EditorState, Transaction } from 'prosemirror-state';
2
+ import type { DocumentModel } from 'ooxml-core/docx';
3
+ import type { Node as ProseMirrorNode } from 'prosemirror-model';
4
+ export declare function modelToDoc(model: DocumentModel): ProseMirrorNode;
5
+ export declare function docToModel(doc: ReturnType<typeof modelToDoc>, prior: DocumentModel): DocumentModel;
6
+ export declare function assignMissingParagraphIds(state: EditorState): Transaction | null;
@@ -0,0 +1,5 @@
1
+ import { type DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import type { FormatDialog } from './font-dialog';
4
+ /** Creates a fresh definition for the selection; imported definitions remain untouched. */
5
+ export declare function createMultilevelListDialog(getView: () => EditorView | undefined, getModel: () => DocumentModel, canEdit?: () => boolean): FormatDialog;
@@ -0,0 +1,14 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ export type LanguageField = 'language' | 'eastAsiaLanguage' | 'bidiLanguage';
3
+ export type MultilingualAction = {
4
+ type: 'paragraphDirection';
5
+ value: 'inherit' | 'ltr' | 'rtl';
6
+ } | {
7
+ type: 'language';
8
+ key: LanguageField;
9
+ value: string;
10
+ } | {
11
+ type: 'runRtl';
12
+ value: 'inherit' | 'on' | 'off';
13
+ };
14
+ export declare function applyMultilingualAction(view: EditorView, action: MultilingualAction): void;
@@ -0,0 +1,6 @@
1
+ import type { EditorState } from 'prosemirror-state';
2
+ import type { LanguageField, MultilingualAction } from './multilingual-commands';
3
+ export type { LanguageField, MultilingualAction };
4
+ export { applyMultilingualAction } from './multilingual-commands';
5
+ export declare function createMultilingualControls(locale?: string): HTMLElement;
6
+ export declare function syncMultilingualControls(toolbar: HTMLElement, state: EditorState): void;
@@ -0,0 +1,17 @@
1
+ import { Plugin } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import { type DocumentModel, type Note } from 'ooxml-core/docx';
4
+ export type NoteKind = 'footnote' | 'endnote';
5
+ /** The next free note id: Word numbers user notes from 1 (separators use -1 and 0). */
6
+ export declare function nextNoteId(notes: Note[] | undefined): string;
7
+ /**
8
+ * Word's Insert Footnote/Endnote: adds a note (number mark plus a space, in the note text style
9
+ * when the document defines one) and inserts its superscript reference at the selection.
10
+ * Returns the updated model and the new note's id.
11
+ */
12
+ export declare function insertNote(view: EditorView, model: DocumentModel, kind: NoteKind): {
13
+ model: DocumentModel;
14
+ id: string;
15
+ };
16
+ /** Keeps note reference numbers in document order, as Word renumbers notes after every change. */
17
+ export declare function noteNumberingPlugin(): Plugin;
@@ -0,0 +1,10 @@
1
+ import type { Block, Note } from 'ooxml-core/docx';
2
+ import { type InlineEditorOptions } from './header-footer-editor';
3
+ export interface NoteEditingOptions {
4
+ editor?: InlineEditorOptions;
5
+ note(id: string): Note | undefined;
6
+ change(id: string, blocks: Block[]): void;
7
+ editable(): boolean;
8
+ }
9
+ /** Double-click a footnote or endnote to edit its text in place. */
10
+ export declare function attachNoteEditing(root: HTMLElement, options: NoteEditingOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ /** Footnotes then endnotes, read-only, rendered at the end of the continuous surface. */
3
+ export declare function buildNotesElement(model: DocumentModel, locale: string): HTMLElement | null;
@@ -0,0 +1,16 @@
1
+ import type { PageBorders, SectionProperties } from 'ooxml-core/docx';
2
+ import type { FormatDialog } from './font-dialog';
3
+ export interface PageBordersHost {
4
+ section(): SectionProperties | undefined;
5
+ canEdit(): boolean;
6
+ /** Replaces the current section's page borders; undefined removes them. */
7
+ apply(borders: PageBorders | undefined): void;
8
+ restoreFocus(): void;
9
+ }
10
+ /**
11
+ * Word's Page Borders for the section holding the selection: the sides, one pen, where the lines
12
+ * are measured from, and which pages show them. They print in Print Layout; the continuous editing
13
+ * surface has no pages to put them on. Art borders are not offered, and a pen chosen here replaces an
14
+ * imported art side with a plain line.
15
+ */
16
+ export declare function createPageBordersDialog(host: PageBordersHost): FormatDialog;
@@ -0,0 +1,5 @@
1
+ import type { Command } from 'prosemirror-state';
2
+ /** Inserts a visible, editable Word page or column break marker (Ctrl+Enter for a page break). */
3
+ export declare function insertBreakCommand(kind: 'page' | 'column'): Command;
4
+ export declare const insertPageBreak: Command;
5
+ export declare const insertColumnBreak: Command;
@@ -0,0 +1,66 @@
1
+ import type { SectionProperties, WatermarkSpec } from 'ooxml-core/docx';
2
+ import { type PageSetupValues } from 'ooxml-core/docx';
3
+ import type { EditorHost } from './editor-host';
4
+ import type { PrintLayoutController } from './print-layout-view';
5
+ import type { RibbonAction } from './ribbon';
6
+ import type { StatusBar } from './status-bar';
7
+ import { type ZoomFit } from 'ooxml-core/docx/ui';
8
+ export interface PageControllerHost extends EditorHost {
9
+ paper(): HTMLElement | undefined;
10
+ toolbar(): HTMLElement | undefined;
11
+ statusBar(): StatusBar | undefined;
12
+ printLayout(): PrintLayoutController | undefined;
13
+ refreshControls(): void;
14
+ }
15
+ /** Page setup, section breaks, zoom, Web/Print Layout and printing. */
16
+ export declare class PageController {
17
+ private readonly host;
18
+ zoom: number;
19
+ viewMode: 'draft' | 'print';
20
+ constructor(host: PageControllerHost);
21
+ /** Page setup applies to the section holding the selection, as in Word, and is undoable. */
22
+ changePageSetup(key: Extract<RibbonAction, {
23
+ type: 'page';
24
+ }>['key'], value: string): void;
25
+ /** Shows the selection's section settings in the Layout tab. */
26
+ syncControls(): void;
27
+ /** The section holding the selection, for the Page Setup dialog. */
28
+ currentSection(): SectionProperties | undefined;
29
+ /** Applies the Page Setup dialog to the current section as one undoable step. */
30
+ applyPageSetupValues(values: PageSetupValues): void;
31
+ /** Layout > More Columns, recorded as one undoable section edit. */
32
+ applyColumns(columns: SectionProperties['columns']): void;
33
+ /** Layout > Line Numbers options, recorded as one undoable section edit. */
34
+ applyLineNumberSettings(settings: SectionProperties['lineNumberSettings']): void;
35
+ /** Layout > Watermark: a text watermark in every header (or none), one undoable step. */
36
+ applyWatermark(spec: WatermarkSpec | undefined): void;
37
+ /** The document's current watermark, for the Watermark dialog. */
38
+ currentWatermark(): WatermarkSpec | undefined;
39
+ /** Layout > Page Borders, recorded as one undoable section edit. */
40
+ applyPageBorders(borders: SectionProperties['pageBorders']): void;
41
+ /** Insert > Page Number: a PAGE field in the header or footer, creating the part when needed. */
42
+ insertPageNumber(position: 'top' | 'bottom', align: 'left' | 'center' | 'right', style?: 'plain' | 'pageOfTotal', slot?: 'default' | 'first' | 'even'): boolean;
43
+ /** Insert > Header / Footer: an empty part when the document has none. */
44
+ insertHeaderFooter(kind: 'header' | 'footer', slot?: 'default' | 'first' | 'even'): boolean;
45
+ private changeHeaderFooter;
46
+ /** Layout > Page Color (document-wide, undoable): hex with or without `#`, or `none` to clear. */
47
+ setPageColor(value: string): void;
48
+ /** Layout > Hyphenation: `auto` sets `w:autoHyphenation`, `none` clears it (document-wide, undoable). */
49
+ setHyphenation(value: string): void;
50
+ /** Header & Footer > Different Odd & Even Pages (document-wide, undoable). */
51
+ toggleEvenOddHeaders(): void;
52
+ insertSectionBreak(kind: 'nextPage' | 'continuous' | 'evenPage' | 'oddPage'): void;
53
+ /** Records page geometry and section layout on the editor document as one undoable step. */
54
+ private dispatchSections;
55
+ /** Page size and margins from the model; one multi-column section also shows its columns. */
56
+ refreshPageStyles(): void;
57
+ /** Zoom to 100%, the page width or a whole page, from the section holding the selection. */
58
+ zoomTo(mode: ZoomFit): void;
59
+ /** `sideBySide` lays Print Layout's pages out two across (View > Multiple Pages). */
60
+ setZoom(percent: number, sideBySide?: boolean): void;
61
+ /** Switches between the continuous editing surface and the paginated Print Layout render. */
62
+ setViewMode(mode: 'draft' | 'print'): void;
63
+ /** Re-lays out Print Layout after a model change (debounced by the layout view). */
64
+ relayout(): void;
65
+ print(): void;
66
+ }
@@ -0,0 +1,64 @@
1
+ import { type EditorLocale } from './localization';
2
+ /** What the navigator needs from the Print Layout view and the element. */
3
+ export interface PageNavigatorHost {
4
+ /** Laid-out page sheets in order; empty until a layout exists. */
5
+ pages(): HTMLElement[];
6
+ /** Changes whenever the layout was rebuilt. */
7
+ version(): number;
8
+ goTo(page: number): void;
9
+ close(): void;
10
+ }
11
+ export interface PageNavigatorState {
12
+ /** Print Layout is the active view. */
13
+ active: boolean;
14
+ /** Current page and total, or null while no layout exists. */
15
+ status: {
16
+ current: number;
17
+ total: number;
18
+ } | null;
19
+ locale: EditorLocale;
20
+ }
21
+ export declare const THUMBNAIL_WIDTH = 120;
22
+ /**
23
+ * Collapsible left rail of scaled page thumbnails. Thumbnails are clones of the Print Layout
24
+ * sheets, drawn only while near the rail's viewport, so large documents stay cheap. Pagination
25
+ * comes from the approximate layout engine, so the rail says so rather than implying Word parity.
26
+ */
27
+ export declare class PageNavigator {
28
+ private readonly host;
29
+ readonly element: HTMLElement;
30
+ private readonly heading;
31
+ private readonly closeButton;
32
+ private readonly message;
33
+ private readonly list;
34
+ private thumbs;
35
+ private observer?;
36
+ private open;
37
+ private built;
38
+ private marked;
39
+ private labels;
40
+ private state;
41
+ constructor(host: PageNavigatorHost);
42
+ get isOpen(): boolean;
43
+ get pageCount(): number;
44
+ /** The 1-based page currently marked, or 0 when no thumbnails exist. */
45
+ get currentPage(): number;
46
+ setOpen(open: boolean): void;
47
+ /** Called after every layout, scroll and locale change; cheap when nothing moved. */
48
+ sync(state: PageNavigatorState): void;
49
+ private render;
50
+ private relabelChrome;
51
+ private relabelThumbs;
52
+ private clear;
53
+ private rebuild;
54
+ private createThumb;
55
+ private draw;
56
+ private hasFocus;
57
+ /** Highlights `page` and, unless focus is inside the rail, makes it the tab stop and scrolls to it. */
58
+ private mark;
59
+ private setStop;
60
+ /** Scrolls only the rail's own list, never an ancestor (`scrollIntoView` would move the page). */
61
+ private reveal;
62
+ private indexOf;
63
+ private onKey;
64
+ }
@@ -0,0 +1,7 @@
1
+ import { type DocumentModel, type SectionProperties } from 'ooxml-core/docx';
2
+ import type { RibbonAction } from './ribbon-action';
3
+ export type PageSetupKey = Extract<RibbonAction, {
4
+ type: 'page';
5
+ }>['key'];
6
+ /** The model with one Layout-tab page setting changed for section `index`. */
7
+ export declare function pageSetupChange(model: DocumentModel, index: number, section: SectionProperties, key: PageSetupKey, value: string): DocumentModel;
@@ -0,0 +1,12 @@
1
+ import type { SectionProperties } from 'ooxml-core/docx';
2
+ import type { FormatDialog } from './font-dialog';
3
+ import { type PageSetupValues } from 'ooxml-core/docx';
4
+ export interface PageSetupHost {
5
+ /** The section holding the selection, or undefined when there is none to edit. */
6
+ section(): SectionProperties | undefined;
7
+ canEdit(): boolean;
8
+ apply(values: PageSetupValues): void;
9
+ restoreFocus(): void;
10
+ }
11
+ /** Word's Page Setup dialog: margins, gutter, header and footer distances, orientation and paper. */
12
+ export declare function createPageSetupDialog(host: PageSetupHost): FormatDialog;
@@ -0,0 +1,22 @@
1
+ import type { EditorCore } from './editor-core';
2
+ /** Payload of the `page-change` event. Pages are 1-based and come from the approximate layout. */
3
+ export interface PageChangeDetail {
4
+ page: number;
5
+ pageCount: number;
6
+ }
7
+ /** Emits `page-change` only when the page or the page count really changed. */
8
+ export declare class PageTracker {
9
+ private readonly target;
10
+ private last?;
11
+ constructor(target: EventTarget);
12
+ report(status: {
13
+ current: number;
14
+ total: number;
15
+ } | null): void;
16
+ }
17
+ /**
18
+ * Single source for page state: Print Layout's `pageStatus()` feeds the navigator rail, the
19
+ * `page-change` event and (through `refreshControls`) the status bar. Outside Print Layout there is
20
+ * no pagination, so nothing is reported and the rail explains why.
21
+ */
22
+ export declare function syncPageState(core: EditorCore): void;
@@ -0,0 +1,29 @@
1
+ import { type EditorState } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ export type BorderPreset = 'horizontal' | 'none' | 'bottom' | 'top' | 'left' | 'right' | 'all' | 'outside' | 'insideH' | 'insideV';
4
+ /** Sets the shading fill of the selected paragraphs to `#rrggbb`, or with `null` removes it. */
5
+ export declare function setShading(view: EditorView, value: string | null): boolean;
6
+ /**
7
+ * Borders > Horizontal Line: a new empty paragraph with a bottom border after the current one,
8
+ * followed by an empty paragraph for the caret. It is saved as an ordinary paragraph border.
9
+ */
10
+ export declare function insertHorizontalLine(view: EditorView): boolean;
11
+ /**
12
+ * Word's Borders menu. A side preset toggles: when every selected paragraph already has all of its
13
+ * sides the borders are removed, otherwise they are added. `none` removes every border.
14
+ */
15
+ export declare function setBorders(view: EditorView, preset: BorderPreset): boolean;
16
+ export interface BordersAndShading {
17
+ /** Sides to draw; the other sides lose their border. */
18
+ sides: Partial<Record<'top' | 'bottom' | 'left' | 'right', boolean>>;
19
+ style: 'single' | 'double' | 'dotted' | 'dashed';
20
+ sizeEighthPoints: number;
21
+ /** `#rrggbb`, or `null` for automatic. */
22
+ color: string | null;
23
+ /** `#rrggbb`, or `null` for no shading. */
24
+ fill: string | null;
25
+ }
26
+ /** What the Borders and Shading dialog shows: the first selected paragraph's pen, sides and fill. */
27
+ export declare function readBordersAndShading(state: EditorState): BordersAndShading;
28
+ /** Borders and Shading dialog: one pen for the chosen sides plus a fill, on every selected paragraph. */
29
+ export declare function applyBordersAndShading(view: EditorView, settings: BordersAndShading): boolean;
@@ -0,0 +1,5 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import type { FormatDialog } from './font-dialog';
4
+ /** Word's Paragraph dialog: alignment, indentation, spacing, line spacing and pagination. */
5
+ export declare function createParagraphDialog(getView: () => EditorView | undefined, getModel: () => DocumentModel): FormatDialog;
@@ -0,0 +1,37 @@
1
+ import { type DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorState } from 'prosemirror-state';
3
+ import type { EditorView } from 'prosemirror-view';
4
+ export type Alignment = 'left' | 'center' | 'right' | 'justify';
5
+ export type Special = 'none' | 'firstLine' | 'hanging';
6
+ export type LineRule = 'single' | 'oneAndHalf' | 'double' | 'atLeast' | 'exactly' | 'multiple';
7
+ /** Everything Word's Paragraph dialog edits, in the units it shows (inches for indents, points for spacing). */
8
+ export interface ParagraphFormat {
9
+ align: Alignment;
10
+ leftInches: number;
11
+ rightInches: number;
12
+ special: Special;
13
+ specialInches: number;
14
+ beforePt: number;
15
+ afterPt: number;
16
+ lineRule: LineRule;
17
+ /** Points for `atLeast` and `exactly`, a line multiple for `multiple`. */
18
+ lineAt: number;
19
+ contextualSpacing: boolean;
20
+ widowControl: boolean;
21
+ keepNext: boolean;
22
+ keepLines: boolean;
23
+ pageBreakBefore: boolean;
24
+ suppressLineNumbers: boolean;
25
+ }
26
+ /** A selection's paragraph format, with `null` for a field that differs between paragraphs. */
27
+ export type ParagraphFormatState = {
28
+ [K in keyof ParagraphFormat]: ParagraphFormat[K] | null;
29
+ };
30
+ type Attrs = Record<string, unknown>;
31
+ /** Direct paragraph attributes with the style chain and document defaults resolved beneath them. */
32
+ export declare function resolvedAttrs(attrs: Attrs, model: DocumentModel | undefined): Attrs;
33
+ /** The selected paragraphs' format, with `null` where they disagree. */
34
+ export declare function readParagraphFormat(state: EditorState, model: DocumentModel | undefined): ParagraphFormatState;
35
+ /** Applies the fields present in `changes` to every selected paragraph as one undoable step. */
36
+ export declare function applyParagraphFormat(view: EditorView, changes: Partial<ParagraphFormat>): boolean;
37
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'prosemirror-state';
2
+ import { type DocumentModel } from 'ooxml-core/docx';
3
+ /** Derived display formatting stays out of document attributes and collaboration steps. */
4
+ export declare function paragraphStylesPlugin(getModel: () => DocumentModel): Plugin<any>;
5
+ export { resetStylePicker, syncStylePicker } from './styles-group';
@@ -0,0 +1,8 @@
1
+ import type { DocumentModel } from 'ooxml-core/docx';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ /**
4
+ * Reflects the selection in the toggle-style Home buttons: which alignment applies (only when every
5
+ * selected paragraph agrees), whether the selection is a bulleted or numbered list, and which
6
+ * clipboard commands have something to act on.
7
+ */
8
+ export declare function syncParagraphToggles(toolbar: HTMLElement, view: EditorView, model: DocumentModel): void;
@@ -0,0 +1,52 @@
1
+ import { type Plugin } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import type { EditorHost } from './editor-host';
4
+ import { type HeaderFooterSlotName } from './header-footer-editor';
5
+ import { type ImageMediaCache } from './image-media';
6
+ import { type NoteKind } from './note-commands';
7
+ import type { HeaderFooterContext } from './header-footer-ribbon';
8
+ export interface PartsControllerHost extends EditorHost {
9
+ images(): ImageMediaCache;
10
+ /** Plugins shared with in-place editors (e.g. Ctrl+K). */
11
+ plugins(): Plugin[];
12
+ /** Where focus may go without closing an in-place editor: the ribbon and dialogs. */
13
+ keepOpenWithin(): (Element | undefined)[];
14
+ sectionIndex?(): number;
15
+ refreshControls?(): void;
16
+ }
17
+ /** Headers, footers, footnotes and endnotes around the continuous editing surface. */
18
+ export declare class PartsController {
19
+ private readonly host;
20
+ private headerEl?;
21
+ private footerEl?;
22
+ private notesEl?;
23
+ private active?;
24
+ private closeActive?;
25
+ private headerContext?;
26
+ private shownSection;
27
+ private renderingContext?;
28
+ constructor(host: PartsControllerHost);
29
+ /** The in-place header/footer/note editor currently open, which the ribbon then targets. */
30
+ activeView(): EditorView | undefined;
31
+ /** Page-number insertion follows the first/even/default story currently being edited. */
32
+ activeHeaderFooterSlot(): HeaderFooterSlotName | undefined;
33
+ headerFooterContext(): HeaderFooterContext | undefined;
34
+ closeHeaderFooter(canvas?: HTMLElement, paper?: HTMLElement): void;
35
+ navigate(target: 'header' | 'footer' | 'previous' | 'next', canvas?: HTMLElement, paper?: HTMLElement): void;
36
+ toggleLink(): void;
37
+ /** Sets picture sources in a read-only preview from the package media. */
38
+ private readonly decorate;
39
+ private editorOptions;
40
+ /** Header/footer typing and insertion use the body history; notes retain their local stack. */
41
+ runHistory(key: 'undo' | 'redo'): boolean;
42
+ usesBodyHistory(): boolean;
43
+ syncSection(canvas?: HTMLElement, paper?: HTMLElement): void;
44
+ /** Rebuilds the header/footer/note previews and wires in-place editing. */
45
+ render(canvas: HTMLElement | undefined, paper: HTMLElement | undefined, keepEditor?: boolean): void;
46
+ /** Inserts a footnote or endnote reference at the selection and opens the new note for typing. */
47
+ insertNote(kind: NoteKind, canvas?: HTMLElement, paper?: HTMLElement): void;
48
+ /** Replaces one footnote's or endnote's blocks. */
49
+ private updateNote;
50
+ /** Applies header/footer edits to every section slot that shares the edited part. */
51
+ private updateHeaderFooter;
52
+ }
@@ -0,0 +1,35 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import type { InlineImage, PendingMediaPart } from 'ooxml-core/docx';
3
+ /** Raster formats Word stores directly; SVG would need a PNG fallback part, which is not produced. */
4
+ export declare const PICTURE_TYPES: Record<string, string>;
5
+ /** A package part name for a newly inserted picture that cannot collide with existing media. */
6
+ export declare function newPicturePartName(contentType: string): string;
7
+ /** Scales `width`×`height` down (never up) to fit `maxWidth`, keeping the aspect ratio. */
8
+ export declare function fitPicture(width: number, height: number, maxWidth: number): {
9
+ widthPx: number;
10
+ heightPx: number;
11
+ };
12
+ /** Reads a Blob's bytes, falling back to FileReader where `Blob.arrayBuffer` is unavailable. */
13
+ export declare function readBytes(file: Blob): Promise<Uint8Array>;
14
+ /** Reads a picture's natural pixel size in the browser. */
15
+ export declare function pictureSize(file: Blob): Promise<{
16
+ width: number;
17
+ height: number;
18
+ }>;
19
+ /** Prepares an inline picture and the media bytes that must be written with it on save. */
20
+ /** Draws an SVG to a PNG (Word keeps a raster fallback beside every SVG picture). */
21
+ export declare function rasterizeSvg(svg: Uint8Array): Promise<{
22
+ png: Uint8Array;
23
+ width: number;
24
+ height: number;
25
+ }>;
26
+ export interface StagedPicture {
27
+ image: InlineImage;
28
+ media: PendingMediaPart;
29
+ /** For SVG pictures: the SVG original, stored alongside the PNG fallback in `media`. */
30
+ svg?: PendingMediaPart;
31
+ }
32
+ /** Prepares an inline picture and the media bytes that must be written with it on save. */
33
+ export declare function stagePicture(file: File, maxWidthPx: number): Promise<StagedPicture>;
34
+ /** Inserts an inline picture at the selection, replacing any selected content. */
35
+ export declare function insertPicture(view: EditorView, image: InlineImage): boolean;
@@ -0,0 +1,11 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ import { type EditorLocale } from './localization';
3
+ export interface PictureDialog {
4
+ element: HTMLElement;
5
+ open(pos: number): void;
6
+ close(): void;
7
+ setLocale(locale: EditorLocale): void;
8
+ readonly isOpen: boolean;
9
+ }
10
+ /** Word's Format Picture essentials: alt text and size (px) with an aspect-ratio lock. */
11
+ export declare function createPictureDialog(getView: () => EditorView | undefined): PictureDialog;
@@ -0,0 +1,6 @@
1
+ import { DecorationSet } from 'prosemirror-view';
2
+ import type { EditorState } from 'prosemirror-state';
3
+ import { type EditorLocale } from './localization';
4
+ import type { PeerPresence } from './presence';
5
+ /** Inline selection highlights and labelled cursors for remote peers. */
6
+ export declare function peerDecorations(doc: EditorState['doc'], peers: Map<string, PeerPresence>, locale: EditorLocale): DecorationSet;
@@ -0,0 +1,63 @@
1
+ import { DecorationSet } from 'prosemirror-view';
2
+ import { Plugin, type EditorState, type Transaction } from 'prosemirror-state';
3
+ import type { EditorLocale } from './localization';
4
+ export declare const PRESENCE_PALETTE: readonly ['#2563eb', '#c2410c', '#15803d', '#a21caf', '#0e7490', '#b91c1c', '#4f46e5', '#a16207'];
5
+ export declare function validatePresenceProfile(profile: {
6
+ name: string;
7
+ color: string;
8
+ }): {
9
+ name: string;
10
+ color: string;
11
+ };
12
+ export interface PresenceConfig {
13
+ sessionId: string;
14
+ clientId: string;
15
+ /** Display locale of peer labels; English when omitted. */
16
+ locale?: () => EditorLocale;
17
+ }
18
+ export interface PresenceMessage {
19
+ protocol: 1;
20
+ sessionId: string;
21
+ clientId: string;
22
+ kind: 'selection' | 'leave';
23
+ sequence: number;
24
+ version: number;
25
+ name?: string;
26
+ color?: string;
27
+ anchor?: number;
28
+ head?: number;
29
+ }
30
+ export type PresenceReceiveResult = {
31
+ status: 'applied';
32
+ transaction: Transaction;
33
+ } | {
34
+ status: 'duplicate' | 'stale' | 'out-of-order' | 'wrong-session' | 'invalid';
35
+ reason?: string;
36
+ };
37
+ export interface PeerPresence {
38
+ clientId: string;
39
+ name: string;
40
+ color: (typeof PRESENCE_PALETTE)[number];
41
+ anchor: number;
42
+ head: number;
43
+ fingerprint: string;
44
+ sequence: number;
45
+ }
46
+ /** A no-op transaction that makes the presence plugin recompute its localized labels. */
47
+ export declare function refreshPresenceLabels(state: EditorState): Transaction;
48
+ export declare function getPresenceDecorations(state: EditorState, locale?: EditorLocale): DecorationSet;
49
+ /** Transient selection sharing for a host-provided transport; it does not send data itself. */
50
+ export declare class PresenceClient {
51
+ readonly plugin: Plugin;
52
+ readonly sessionId: string;
53
+ readonly clientId: string;
54
+ private readonly received;
55
+ private sequence;
56
+ constructor(config: PresenceConfig);
57
+ publish(state: EditorState, profile: {
58
+ name: string;
59
+ color: string;
60
+ }): PresenceMessage | null;
61
+ leave(state: EditorState): PresenceMessage;
62
+ receive(state: EditorState, input: unknown): PresenceReceiveResult;
63
+ }
@@ -0,0 +1,4 @@
1
+ import { type Block, type DocumentModel } from 'ooxml-core/docx';
2
+ import { DOMSerializer } from 'prosemirror-model';
3
+ /** Read-only story previews resolve styles for display without changing the source runs. */
4
+ export declare function stylePreviewRuns(element: HTMLElement, block: Block, model: DocumentModel, serializer: DOMSerializer): void;
@@ -0,0 +1,3 @@
1
+ import type { RunFormatting } from 'ooxml-core/docx';
2
+ /** Closed previews have no editor lifecycle. Keep only weak element references while fonts load. */
3
+ export declare function refreshPreviewScaleWithFonts(element: HTMLElement, text: string, formatting: RunFormatting, family: string | undefined): void;
@@ -0,0 +1,7 @@
1
+ import type { LayoutFragment } from 'ooxml-core/docx/layout';
2
+ export interface PrintFragmentHit {
3
+ element: HTMLElement;
4
+ fragment: LayoutFragment;
5
+ }
6
+ /** Returns undefined for old layout results that do not include fragment source ranges. */
7
+ export declare function resolveFragmentClick(fragments: PrintFragmentHit[], clientX: number): number | undefined;
@@ -0,0 +1,28 @@
1
+ import { type DocumentModel, type HeaderFooterContent, type TextRun } from 'ooxml-core/docx';
2
+ import { type LayoutPageBox } from 'ooxml-core/docx/layout';
3
+ import type { PictureUrl } from './print-layout';
4
+ /** Page facts a header or footer field can show. */
5
+ export interface PageFieldValues {
6
+ page: string;
7
+ numPages: string;
8
+ sectionPages: string;
9
+ /** When the layout was produced; DATE and TIME fields update to it, as Word updates them. */
10
+ now?: Date;
11
+ /** Resolves header/footer pictures to displayable URLs. */
12
+ pictureUrl?: PictureUrl;
13
+ }
14
+ /** Word page numbers per laid-out page, honoring each section's restart value and number format. */
15
+ export declare function pageNumbers(model: DocumentModel, pages: LayoutPageBox[]): string[];
16
+ /**
17
+ * The header or footer Word shows on a page: the first-page slot on a section's first page when
18
+ * `titlePg` is set, the even slot on even pages when `evenAndOddHeaders` is on, else the default.
19
+ * Sections without their own reference inherit the previous section's.
20
+ */
21
+ export declare function headerFooterForPage(model: DocumentModel, page: LayoutPageBox, pageNumber: number, kind: 'headers' | 'footers'): HeaderFooterContent | undefined;
22
+ /** Recalculates page fields; other fields keep the result Word last saved. */
23
+ export declare function fieldDisplayText(run: TextRun, values: PageFieldValues): string;
24
+ /** Renders read-only header/footer content with page fields filled in for one page. */
25
+ export declare function renderHeaderFooter(content: HeaderFooterContent, values: PageFieldValues, kind: 'header' | 'footer'): HTMLElement;
26
+ /** The header's text watermark as a centered, rotated layer behind the page text, or null. */
27
+ export declare function watermarkElement(content: HeaderFooterContent, page: Pick<LayoutPageBox, 'widthPx' | 'heightPx'>): HTMLElement | null;
28
+ export declare function decoratePages(model: DocumentModel, pages: LayoutPageBox[], sheets: HTMLElement[], now?: Date, pictureUrl?: PictureUrl): void;
@@ -0,0 +1,9 @@
1
+ import type { EditorView } from 'prosemirror-view';
2
+ /**
3
+ * Maps a Print Layout click (`{ blockId, offset }`, from `print-layout.ts`'s
4
+ * `resolveClick`) back to a ProseMirror document position: finds the
5
+ * paragraph node whose `id` attribute matches, then clamps `offset` into its
6
+ * content. Print Layout resolves the fragment/glyph boundary first; this
7
+ * function clamps it to a valid editor position before focusing the editor.
8
+ */
9
+ export declare function moveCursorToBlock(view: EditorView, blockId: string, offset: number): boolean;