@a3s-lab/office 0.1.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 (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +470 -0
  3. package/THIRD_PARTY_NOTICES.md +33 -0
  4. package/dist/0~1403.js +245 -0
  5. package/dist/0~152.js +94 -0
  6. package/dist/0~3539.js +1856 -0
  7. package/dist/0~3557.js +179 -0
  8. package/dist/0~3635.js +302 -0
  9. package/dist/0~4595.js +1162 -0
  10. package/dist/0~5050.js +308 -0
  11. package/dist/0~6552.js +787 -0
  12. package/dist/0~7048.js +2110 -0
  13. package/dist/0~7614.js +1037 -0
  14. package/dist/0~8155.js +299 -0
  15. package/dist/0~9445.js +283 -0
  16. package/dist/0~9512.js +743 -0
  17. package/dist/0~document-editor.js +10967 -0
  18. package/dist/0~markdown-editor.js +2260 -0
  19. package/dist/0~pdf-viewer.js +2156 -0
  20. package/dist/0~presentation-editor.js +8359 -0
  21. package/dist/0~rslib-runtime.js +27 -0
  22. package/dist/0~spreadsheet-editor.js +10388 -0
  23. package/dist/0~use-office-draft.js +46 -0
  24. package/dist/0~work-document-extensions.js +2470 -0
  25. package/dist/0~work-document-links.js +14 -0
  26. package/dist/0~work-document-model-codec.js +42 -0
  27. package/dist/0~work-document-page-color.js +11 -0
  28. package/dist/0~work-document-paragraph-formatting.js +425 -0
  29. package/dist/0~work-docx-bibliography.js +347 -0
  30. package/dist/0~work-docx-export.js +1151 -0
  31. package/dist/0~work-docx-import.js +3116 -0
  32. package/dist/0~work-docx-page-color.js +42 -0
  33. package/dist/0~work-office-diagnostics.js +1377 -0
  34. package/dist/0~work-pptx-export.js +1009 -0
  35. package/dist/0~work-pptx-import.js +1138 -0
  36. package/dist/0~work-presentation-charts.js +442 -0
  37. package/dist/0~work-presentation-transition.js +38 -0
  38. package/dist/0~work-presentation-visual-scale.js +38 -0
  39. package/dist/0~work-spreadsheet-formula-support.js +9 -0
  40. package/dist/1134.js +445 -0
  41. package/dist/4104.js +5786 -0
  42. package/dist/432.js +211 -0
  43. package/dist/4704.js +1364 -0
  44. package/dist/6489.js +182 -0
  45. package/dist/8715.js +3959 -0
  46. package/dist/8728.js +723 -0
  47. package/dist/9356.js +10 -0
  48. package/dist/core.d.ts +15 -0
  49. package/dist/core.js +4 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/index.js +5 -0
  52. package/dist/internal/design-system/primitives/button/button.d.ts +9 -0
  53. package/dist/internal/design-system/primitives/button/icon-button.d.ts +7 -0
  54. package/dist/internal/design-system/primitives/dialog/dialog.d.ts +12 -0
  55. package/dist/internal/design-system/primitives/feedback/collection-state.d.ts +9 -0
  56. package/dist/internal/design-system/primitives/feedback/inline-notice.d.ts +10 -0
  57. package/dist/internal/design-system/primitives/feedback/state-view.d.ts +13 -0
  58. package/dist/internal/design-system/primitives/form/field.d.ts +19 -0
  59. package/dist/internal/design-system/primitives/index.d.ts +14 -0
  60. package/dist/internal/design-system/primitives/layout/split-handle.d.ts +17 -0
  61. package/dist/internal/design-system/primitives/navigation/segmented-control.d.ts +19 -0
  62. package/dist/internal/design-system/primitives/navigation/tab-navigation.d.ts +13 -0
  63. package/dist/internal/design-system/primitives/navigation/tabs.d.ts +21 -0
  64. package/dist/internal/design-system/primitives/overlay/dialog-focus-scope.d.ts +17 -0
  65. package/dist/internal/design-system/primitives/overlay/popover.d.ts +34 -0
  66. package/dist/internal/design-system/primitives/overlay/portal-root.d.ts +1 -0
  67. package/dist/internal/design-system/primitives/status/status-badge.d.ts +6 -0
  68. package/dist/internal/features/work/components/work-document-pages.d.ts +4 -0
  69. package/dist/internal/features/work/components/work-editor-agent-menus.d.ts +12 -0
  70. package/dist/internal/features/work/components/work-editor-loading-state.d.ts +3 -0
  71. package/dist/internal/features/work/editors/document-changes-panel.d.ts +9 -0
  72. package/dist/internal/features/work/editors/document-citation-source-form.d.ts +33 -0
  73. package/dist/internal/features/work/editors/document-citations-panel.d.ts +8 -0
  74. package/dist/internal/features/work/editors/document-columns-panel.d.ts +5 -0
  75. package/dist/internal/features/work/editors/document-comment-composer.d.ts +13 -0
  76. package/dist/internal/features/work/editors/document-comments-panel.d.ts +17 -0
  77. package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -0
  78. package/dist/internal/features/work/editors/document-editor-pagination.d.ts +3 -0
  79. package/dist/internal/features/work/editors/document-editor-support.d.ts +34 -0
  80. package/dist/internal/features/work/editors/document-editor.d.ts +20 -0
  81. package/dist/internal/features/work/editors/document-find-highlight.d.ts +8 -0
  82. package/dist/internal/features/work/editors/document-find-replace-panel.d.ts +10 -0
  83. package/dist/internal/features/work/editors/document-formatting-options.d.ts +113 -0
  84. package/dist/internal/features/work/editors/document-home-ribbon.d.ts +9 -0
  85. package/dist/internal/features/work/editors/document-layout-panel.d.ts +10 -0
  86. package/dist/internal/features/work/editors/document-list-gallery.d.ts +4 -0
  87. package/dist/internal/features/work/editors/document-navigation-panel.d.ts +9 -0
  88. package/dist/internal/features/work/editors/document-page-chrome-editor.d.ts +39 -0
  89. package/dist/internal/features/work/editors/document-page-chrome-panel.d.ts +5 -0
  90. package/dist/internal/features/work/editors/document-page-chrome-ribbon.d.ts +10 -0
  91. package/dist/internal/features/work/editors/document-page-navigation.d.ts +14 -0
  92. package/dist/internal/features/work/editors/document-page-stack.d.ts +8 -0
  93. package/dist/internal/features/work/editors/document-pagination-popover.d.ts +4 -0
  94. package/dist/internal/features/work/editors/document-paragraph-spacing-popover.d.ts +4 -0
  95. package/dist/internal/features/work/editors/document-picture-ribbon.d.ts +4 -0
  96. package/dist/internal/features/work/editors/document-ruler-tab-stops.d.ts +12 -0
  97. package/dist/internal/features/work/editors/document-ruler.d.ts +15 -0
  98. package/dist/internal/features/work/editors/document-selection-context-menu.d.ts +22 -0
  99. package/dist/internal/features/work/editors/document-selection-toolbar.d.ts +8 -0
  100. package/dist/internal/features/work/editors/document-status-bar.d.ts +19 -0
  101. package/dist/internal/features/work/editors/document-style-gallery.d.ts +4 -0
  102. package/dist/internal/features/work/editors/document-table-insert-popover.d.ts +4 -0
  103. package/dist/internal/features/work/editors/document-table-ribbon.d.ts +7 -0
  104. package/dist/internal/features/work/editors/document-task-pane.d.ts +11 -0
  105. package/dist/internal/features/work/editors/document-toolbar.d.ts +100 -0
  106. package/dist/internal/features/work/editors/document-vertical-ruler.d.ts +6 -0
  107. package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +2 -0
  108. package/dist/internal/features/work/editors/markdown-editor.d.ts +16 -0
  109. package/dist/internal/features/work/editors/markdown-insert-dialog.d.ts +19 -0
  110. package/dist/internal/features/work/editors/markdown-selection-context-menu.d.ts +14 -0
  111. package/dist/internal/features/work/editors/markdown-source-commands.d.ts +41 -0
  112. package/dist/internal/features/work/editors/markdown-status.d.ts +7 -0
  113. package/dist/internal/features/work/editors/markdown-toolbar.d.ts +22 -0
  114. package/dist/internal/features/work/editors/markdown-workspace.d.ts +26 -0
  115. package/dist/internal/features/work/editors/office-checkbox.d.ts +9 -0
  116. package/dist/internal/features/work/editors/office-color-picker.d.ts +11 -0
  117. package/dist/internal/features/work/editors/office-controls.d.ts +7 -0
  118. package/dist/internal/features/work/editors/office-dialog.d.ts +35 -0
  119. package/dist/internal/features/work/editors/office-editor-extension.d.ts +86 -0
  120. package/dist/internal/features/work/editors/office-file-data.d.ts +1 -0
  121. package/dist/internal/features/work/editors/office-font-families.d.ts +187 -0
  122. package/dist/internal/features/work/editors/office-menu-keyboard.d.ts +2 -0
  123. package/dist/internal/features/work/editors/office-number-field.d.ts +21 -0
  124. package/dist/internal/features/work/editors/office-number-normalization.d.ts +9 -0
  125. package/dist/internal/features/work/editors/office-select.d.ts +19 -0
  126. package/dist/internal/features/work/editors/office-shortcuts.d.ts +1 -0
  127. package/dist/internal/features/work/editors/office-slider.d.ts +10 -0
  128. package/dist/internal/features/work/editors/office-table-dimensions.d.ts +4 -0
  129. package/dist/internal/features/work/editors/office-table-insert-popover.d.ts +7 -0
  130. package/dist/internal/features/work/editors/office-task-pane.d.ts +7 -0
  131. package/dist/internal/features/work/editors/office-text-field.d.ts +20 -0
  132. package/dist/internal/features/work/editors/office-tiptap-extensions.d.ts +2 -0
  133. package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +23 -0
  134. package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +36 -0
  135. package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +26 -0
  136. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +23 -0
  137. package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +48 -0
  138. package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -0
  139. package/dist/internal/features/work/editors/presentation-arrangement-controller.d.ts +19 -0
  140. package/dist/internal/features/work/editors/presentation-chart-analysis-canvas.d.ts +21 -0
  141. package/dist/internal/features/work/editors/presentation-chart-axis-canvas.d.ts +33 -0
  142. package/dist/internal/features/work/editors/presentation-chart-axis-editor.d.ts +5 -0
  143. package/dist/internal/features/work/editors/presentation-chart-canvas.d.ts +5 -0
  144. package/dist/internal/features/work/editors/presentation-chart-cartesian-canvas.d.ts +3 -0
  145. package/dist/internal/features/work/editors/presentation-chart-data-label-editor.d.ts +6 -0
  146. package/dist/internal/features/work/editors/presentation-chart-data-labels.d.ts +26 -0
  147. package/dist/internal/features/work/editors/presentation-chart-layout-editor.d.ts +5 -0
  148. package/dist/internal/features/work/editors/presentation-chart-legend-canvas.d.ts +15 -0
  149. package/dist/internal/features/work/editors/presentation-chart-panel.d.ts +7 -0
  150. package/dist/internal/features/work/editors/presentation-chart-series-analysis-editor.d.ts +6 -0
  151. package/dist/internal/features/work/editors/presentation-chart-series-canvas.d.ts +15 -0
  152. package/dist/internal/features/work/editors/presentation-command-controller.d.ts +3 -0
  153. package/dist/internal/features/work/editors/presentation-command-types.d.ts +206 -0
  154. package/dist/internal/features/work/editors/presentation-comments-panel.d.ts +9 -0
  155. package/dist/internal/features/work/editors/presentation-context-menu.d.ts +11 -0
  156. package/dist/internal/features/work/editors/presentation-design-panel.d.ts +13 -0
  157. package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +12 -0
  158. package/dist/internal/features/work/editors/presentation-editor-operations.d.ts +10 -0
  159. package/dist/internal/features/work/editors/presentation-editor-types.d.ts +22 -0
  160. package/dist/internal/features/work/editors/presentation-editor.d.ts +3 -0
  161. package/dist/internal/features/work/editors/presentation-keyboard-extension.d.ts +3 -0
  162. package/dist/internal/features/work/editors/presentation-player.d.ts +7 -0
  163. package/dist/internal/features/work/editors/presentation-presenter-view.d.ts +15 -0
  164. package/dist/internal/features/work/editors/presentation-selection.d.ts +21 -0
  165. package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +26 -0
  166. package/dist/internal/features/work/editors/presentation-slide-thumbnail.d.ts +18 -0
  167. package/dist/internal/features/work/editors/presentation-status-bar.d.ts +10 -0
  168. package/dist/internal/features/work/editors/presentation-text-editor.d.ts +22 -0
  169. package/dist/internal/features/work/editors/presentation-text-formatting.d.ts +3 -0
  170. package/dist/internal/features/work/editors/presentation-thumbnail-rail.d.ts +20 -0
  171. package/dist/internal/features/work/editors/presentation-toolbar.d.ts +19 -0
  172. package/dist/internal/features/work/editors/presentation-transition-panel.d.ts +9 -0
  173. package/dist/internal/features/work/editors/presentation-workspace.d.ts +38 -0
  174. package/dist/internal/features/work/editors/spreadsheet-calculation-model.d.ts +8 -0
  175. package/dist/internal/features/work/editors/spreadsheet-calculation-projection.d.ts +32 -0
  176. package/dist/internal/features/work/editors/spreadsheet-chart-axis-editor.d.ts +9 -0
  177. package/dist/internal/features/work/editors/spreadsheet-chart-draft.d.ts +17 -0
  178. package/dist/internal/features/work/editors/spreadsheet-chart-layout-editor.d.ts +13 -0
  179. package/dist/internal/features/work/editors/spreadsheet-chart-panel.d.ts +10 -0
  180. package/dist/internal/features/work/editors/spreadsheet-chart-series-style-editor.d.ts +9 -0
  181. package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +9 -0
  182. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +121 -0
  183. package/dist/internal/features/work/editors/spreadsheet-conditional-comparison-fields.d.ts +7 -0
  184. package/dist/internal/features/work/editors/spreadsheet-conditional-format-model.d.ts +72 -0
  185. package/dist/internal/features/work/editors/spreadsheet-conditional-format-panel.d.ts +7 -0
  186. package/dist/internal/features/work/editors/spreadsheet-conditional-threshold-fields.d.ts +10 -0
  187. package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +36 -0
  188. package/dist/internal/features/work/editors/spreadsheet-data-label-editor.d.ts +9 -0
  189. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +46 -0
  190. package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +31 -0
  191. package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +16 -0
  192. package/dist/internal/features/work/editors/spreadsheet-error-bar-editor.d.ts +10 -0
  193. package/dist/internal/features/work/editors/spreadsheet-find-bar.d.ts +8 -0
  194. package/dist/internal/features/work/editors/spreadsheet-find.d.ts +9 -0
  195. package/dist/internal/features/work/editors/spreadsheet-formula-panel.d.ts +10 -0
  196. package/dist/internal/features/work/editors/spreadsheet-header-footer-fields.d.ts +5 -0
  197. package/dist/internal/features/work/editors/spreadsheet-keyboard-navigation.d.ts +18 -0
  198. package/dist/internal/features/work/editors/spreadsheet-number-format.d.ts +11 -0
  199. package/dist/internal/features/work/editors/spreadsheet-pivot-panel.d.ts +10 -0
  200. package/dist/internal/features/work/editors/spreadsheet-print-settings-panel.d.ts +6 -0
  201. package/dist/internal/features/work/editors/spreadsheet-protection-panel.d.ts +7 -0
  202. package/dist/internal/features/work/editors/spreadsheet-sheet-bar.d.ts +17 -0
  203. package/dist/internal/features/work/editors/spreadsheet-sheet-model.d.ts +13 -0
  204. package/dist/internal/features/work/editors/spreadsheet-trendline-editor.d.ts +8 -0
  205. package/dist/internal/features/work/editors/spreadsheet-workbook-panel.d.ts +16 -0
  206. package/dist/internal/features/work/editors/use-document-comments.d.ts +26 -0
  207. package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +19 -0
  208. package/dist/internal/features/work/editors/use-document-layout-fonts.d.ts +2 -0
  209. package/dist/internal/features/work/editors/use-document-page-chrome.d.ts +33 -0
  210. package/dist/internal/features/work/editors/use-document-pagination.d.ts +46 -0
  211. package/dist/internal/features/work/editors/use-markdown-source-history.d.ts +16 -0
  212. package/dist/internal/features/work/editors/use-office-draft.d.ts +10 -0
  213. package/dist/internal/features/work/editors/use-office-editor-keyboard-shortcuts.d.ts +9 -0
  214. package/dist/internal/features/work/editors/use-office-editor-runtime.d.ts +6 -0
  215. package/dist/internal/features/work/editors/use-office-editor-wheel-zoom.d.ts +19 -0
  216. package/dist/internal/features/work/editors/use-office-history.d.ts +10 -0
  217. package/dist/internal/features/work/editors/use-presentation-clipboard.d.ts +22 -0
  218. package/dist/internal/features/work/editors/use-presentation-design-commands.d.ts +33 -0
  219. package/dist/internal/features/work/editors/use-presentation-element-commands.d.ts +29 -0
  220. package/dist/internal/features/work/editors/use-presentation-geometry.d.ts +17 -0
  221. package/dist/internal/features/work/editors/use-presentation-history.d.ts +12 -0
  222. package/dist/internal/features/work/editors/use-presentation-review-commands.d.ts +22 -0
  223. package/dist/internal/features/work/editors/use-presentation-selection.d.ts +11 -0
  224. package/dist/internal/features/work/editors/use-presentation-slide-commands.d.ts +18 -0
  225. package/dist/internal/features/work/editors/use-presentation-thumbnail-visibility.d.ts +4 -0
  226. package/dist/internal/features/work/editors/use-presentation-thumbnail-window.d.ts +17 -0
  227. package/dist/internal/features/work/editors/use-presentation-transform.d.ts +53 -0
  228. package/dist/internal/features/work/editors/use-spreadsheet-calculation.d.ts +17 -0
  229. package/dist/internal/features/work/editors/use-spreadsheet-workbook-sync.d.ts +10 -0
  230. package/dist/internal/features/work/editors/work-office-chrome.d.ts +61 -0
  231. package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +18 -0
  232. package/dist/internal/features/work/work-agent-proposal-apply.d.ts +8 -0
  233. package/dist/internal/features/work/work-agent-proposal.d.ts +55 -0
  234. package/dist/internal/features/work/work-agent-request.d.ts +6 -0
  235. package/dist/internal/features/work/work-chart-series-analysis-context.d.ts +3 -0
  236. package/dist/internal/features/work/work-document-caption-nodes.d.ts +13 -0
  237. package/dist/internal/features/work/work-document-captions.d.ts +14 -0
  238. package/dist/internal/features/work/work-document-changes.d.ts +35 -0
  239. package/dist/internal/features/work/work-document-character-formatting.d.ts +13 -0
  240. package/dist/internal/features/work/work-document-citation-nodes.d.ts +25 -0
  241. package/dist/internal/features/work/work-document-citations.d.ts +21 -0
  242. package/dist/internal/features/work/work-document-columns.d.ts +15 -0
  243. package/dist/internal/features/work/work-document-comments.d.ts +48 -0
  244. package/dist/internal/features/work/work-document-extensions.d.ts +11 -0
  245. package/dist/internal/features/work/work-document-field-node.d.ts +12 -0
  246. package/dist/internal/features/work/work-document-fields.d.ts +15 -0
  247. package/dist/internal/features/work/work-document-file-io.d.ts +4 -0
  248. package/dist/internal/features/work/work-document-fonts.d.ts +16 -0
  249. package/dist/internal/features/work/work-document-image-layout.d.ts +29 -0
  250. package/dist/internal/features/work/work-document-incremental-layout.d.ts +17 -0
  251. package/dist/internal/features/work/work-document-layout.d.ts +5 -0
  252. package/dist/internal/features/work/work-document-line-measurement.d.ts +24 -0
  253. package/dist/internal/features/work/work-document-links.d.ts +2 -0
  254. package/dist/internal/features/work/work-document-lists.d.ts +25 -0
  255. package/dist/internal/features/work/work-document-model-codec.d.ts +3 -0
  256. package/dist/internal/features/work/work-document-model.d.ts +12 -0
  257. package/dist/internal/features/work/work-document-note-nodes.d.ts +11 -0
  258. package/dist/internal/features/work/work-document-notes.d.ts +18 -0
  259. package/dist/internal/features/work/work-document-outline.d.ts +14 -0
  260. package/dist/internal/features/work/work-document-page-break.d.ts +2 -0
  261. package/dist/internal/features/work/work-document-page-chrome-commands.d.ts +15 -0
  262. package/dist/internal/features/work/work-document-page-chrome.d.ts +19 -0
  263. package/dist/internal/features/work/work-document-page-color.d.ts +3 -0
  264. package/dist/internal/features/work/work-document-pages.d.ts +19 -0
  265. package/dist/internal/features/work/work-document-pagination-decorations.d.ts +3 -0
  266. package/dist/internal/features/work/work-document-pagination-dom.d.ts +35 -0
  267. package/dist/internal/features/work/work-document-pagination-measurement.d.ts +9 -0
  268. package/dist/internal/features/work/work-document-pagination-types.d.ts +88 -0
  269. package/dist/internal/features/work/work-document-pagination.d.ts +17 -0
  270. package/dist/internal/features/work/work-document-paragraph-formatting.d.ts +61 -0
  271. package/dist/internal/features/work/work-document-search.d.ts +11 -0
  272. package/dist/internal/features/work/work-document-section-editor.d.ts +20 -0
  273. package/dist/internal/features/work/work-document-section-node.d.ts +13 -0
  274. package/dist/internal/features/work/work-document-section.d.ts +34 -0
  275. package/dist/internal/features/work/work-document-selection-menu.d.ts +54 -0
  276. package/dist/internal/features/work/work-document-tab-node.d.ts +6 -0
  277. package/dist/internal/features/work/work-document-tab-stops.d.ts +29 -0
  278. package/dist/internal/features/work/work-document-table-cell-formatting.d.ts +46 -0
  279. package/dist/internal/features/work/work-document-table-commands.d.ts +17 -0
  280. package/dist/internal/features/work/work-document-table-pagination.d.ts +5 -0
  281. package/dist/internal/features/work/work-document-table-row.d.ts +37 -0
  282. package/dist/internal/features/work/work-document-table-sizing.d.ts +27 -0
  283. package/dist/internal/features/work/work-document-text-layout.d.ts +14 -0
  284. package/dist/internal/features/work/work-docx-bibliography.d.ts +12 -0
  285. package/dist/internal/features/work/work-docx-caption-diagnostics.d.ts +6 -0
  286. package/dist/internal/features/work/work-docx-caption-export.d.ts +4 -0
  287. package/dist/internal/features/work/work-docx-caption-fields.d.ts +5 -0
  288. package/dist/internal/features/work/work-docx-caption-import.d.ts +20 -0
  289. package/dist/internal/features/work/work-docx-change-import.d.ts +12 -0
  290. package/dist/internal/features/work/work-docx-citation-diagnostics.d.ts +3 -0
  291. package/dist/internal/features/work/work-docx-citation-export.d.ts +3 -0
  292. package/dist/internal/features/work/work-docx-citation-import.d.ts +23 -0
  293. package/dist/internal/features/work/work-docx-column-export.d.ts +14 -0
  294. package/dist/internal/features/work/work-docx-column-import.d.ts +2 -0
  295. package/dist/internal/features/work/work-docx-comment-import.d.ts +14 -0
  296. package/dist/internal/features/work/work-docx-export-formatting.d.ts +30 -0
  297. package/dist/internal/features/work/work-docx-export-image.d.ts +2 -0
  298. package/dist/internal/features/work/work-docx-export.d.ts +2 -0
  299. package/dist/internal/features/work/work-docx-field-export.d.ts +2 -0
  300. package/dist/internal/features/work/work-docx-field-import.d.ts +16 -0
  301. package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
  302. package/dist/internal/features/work/work-docx-image-layout-import.d.ts +12 -0
  303. package/dist/internal/features/work/work-docx-import.d.ts +50 -0
  304. package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
  305. package/dist/internal/features/work/work-docx-note-diagnostics.d.ts +3 -0
  306. package/dist/internal/features/work/work-docx-note-import.d.ts +3 -0
  307. package/dist/internal/features/work/work-docx-page-chrome-diagnostics.d.ts +3 -0
  308. package/dist/internal/features/work/work-docx-page-chrome-import.d.ts +11 -0
  309. package/dist/internal/features/work/work-docx-page-color.d.ts +2 -0
  310. package/dist/internal/features/work/work-docx-paragraph-alignment-import.d.ts +12 -0
  311. package/dist/internal/features/work/work-docx-paragraph-direction-import.d.ts +12 -0
  312. package/dist/internal/features/work/work-docx-paragraph-indent-import.d.ts +12 -0
  313. package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +12 -0
  314. package/dist/internal/features/work/work-docx-paragraph-spacing-import.d.ts +12 -0
  315. package/dist/internal/features/work/work-docx-paragraph-styles.d.ts +18 -0
  316. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +19 -0
  317. package/dist/internal/features/work/work-docx-tab-stop-import.d.ts +13 -0
  318. package/dist/internal/features/work/work-docx-table-cell-export.d.ts +4 -0
  319. package/dist/internal/features/work/work-docx-table-cell-import.d.ts +16 -0
  320. package/dist/internal/features/work/work-docx-table-row-import.d.ts +13 -0
  321. package/dist/internal/features/work/work-docx-table-sizing-export.d.ts +8 -0
  322. package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +12 -0
  323. package/dist/internal/features/work/work-docx-theme.d.ts +9 -0
  324. package/dist/internal/features/work/work-file-data.d.ts +1 -0
  325. package/dist/internal/features/work/work-file-download.d.ts +3 -0
  326. package/dist/internal/features/work/work-file-io.d.ts +8 -0
  327. package/dist/internal/features/work/work-markdown-extensions.d.ts +19 -0
  328. package/dist/internal/features/work/work-markdown-file-io.d.ts +3 -0
  329. package/dist/internal/features/work/work-markdown-selection-menu.d.ts +57 -0
  330. package/dist/internal/features/work/work-office-diagnostics.d.ts +9 -0
  331. package/dist/internal/features/work/work-ooxml-package.d.ts +28 -0
  332. package/dist/internal/features/work/work-pdf-export.d.ts +23 -0
  333. package/dist/internal/features/work/work-pptx-chart-axes.d.ts +3 -0
  334. package/dist/internal/features/work/work-pptx-chart-axis-diagnostics.d.ts +5 -0
  335. package/dist/internal/features/work/work-pptx-chart-data-labels.d.ts +12 -0
  336. package/dist/internal/features/work/work-pptx-chart-import.d.ts +11 -0
  337. package/dist/internal/features/work/work-pptx-chart-layout-style.d.ts +15 -0
  338. package/dist/internal/features/work/work-pptx-chart-series-analysis.d.ts +13 -0
  339. package/dist/internal/features/work/work-pptx-chart-xy.d.ts +3 -0
  340. package/dist/internal/features/work/work-pptx-comments.d.ts +17 -0
  341. package/dist/internal/features/work/work-pptx-export.d.ts +4 -0
  342. package/dist/internal/features/work/work-pptx-groups.d.ts +19 -0
  343. package/dist/internal/features/work/work-pptx-import.d.ts +6 -0
  344. package/dist/internal/features/work/work-pptx-layout-export.d.ts +13 -0
  345. package/dist/internal/features/work/work-pptx-layout-import.d.ts +30 -0
  346. package/dist/internal/features/work/work-pptx-style.d.ts +13 -0
  347. package/dist/internal/features/work/work-pptx-transition.d.ts +13 -0
  348. package/dist/internal/features/work/work-presentation-agent-context.d.ts +6 -0
  349. package/dist/internal/features/work/work-presentation-chart-axes.d.ts +14 -0
  350. package/dist/internal/features/work/work-presentation-charts.d.ts +37 -0
  351. package/dist/internal/features/work/work-presentation-clipboard.d.ts +26 -0
  352. package/dist/internal/features/work/work-presentation-file-io.d.ts +15 -0
  353. package/dist/internal/features/work/work-presentation-groups.d.ts +17 -0
  354. package/dist/internal/features/work/work-presentation-layouts.d.ts +13 -0
  355. package/dist/internal/features/work/work-presentation-transition.d.ts +4 -0
  356. package/dist/internal/features/work/work-presentation-visual-scale.d.ts +2 -0
  357. package/dist/internal/features/work/work-repository.d.ts +4 -0
  358. package/dist/internal/features/work/work-spreadsheet-agent-context.d.ts +15 -0
  359. package/dist/internal/features/work/work-spreadsheet-chart-axis.d.ts +42 -0
  360. package/dist/internal/features/work/work-spreadsheet-chart-layout.d.ts +29 -0
  361. package/dist/internal/features/work/work-spreadsheet-chart-legend-svg.d.ts +18 -0
  362. package/dist/internal/features/work/work-spreadsheet-chart-series-layout.d.ts +24 -0
  363. package/dist/internal/features/work/work-spreadsheet-chart-series-style.d.ts +29 -0
  364. package/dist/internal/features/work/work-spreadsheet-chart-svg-utils.d.ts +7 -0
  365. package/dist/internal/features/work/work-spreadsheet-chart-svg.d.ts +3 -0
  366. package/dist/internal/features/work/work-spreadsheet-chart-types.d.ts +147 -0
  367. package/dist/internal/features/work/work-spreadsheet-chart-validation.d.ts +2 -0
  368. package/dist/internal/features/work/work-spreadsheet-charts.d.ts +17 -0
  369. package/dist/internal/features/work/work-spreadsheet-combination-chart-svg.d.ts +9 -0
  370. package/dist/internal/features/work/work-spreadsheet-comments.d.ts +7 -0
  371. package/dist/internal/features/work/work-spreadsheet-conditional-canvas.d.ts +5 -0
  372. package/dist/internal/features/work/work-spreadsheet-conditional-colors.d.ts +9 -0
  373. package/dist/internal/features/work/work-spreadsheet-conditional-comparisons.d.ts +4 -0
  374. package/dist/internal/features/work/work-spreadsheet-conditional-data-bar.d.ts +8 -0
  375. package/dist/internal/features/work/work-spreadsheet-conditional-format.d.ts +10 -0
  376. package/dist/internal/features/work/work-spreadsheet-conditional-icons.d.ts +107 -0
  377. package/dist/internal/features/work/work-spreadsheet-conditional-values.d.ts +19 -0
  378. package/dist/internal/features/work/work-spreadsheet-data-label-svg.d.ts +27 -0
  379. package/dist/internal/features/work/work-spreadsheet-error-bar-svg.d.ts +5 -0
  380. package/dist/internal/features/work/work-spreadsheet-error-bars.d.ts +8 -0
  381. package/dist/internal/features/work/work-spreadsheet-formula-analysis.d.ts +30 -0
  382. package/dist/internal/features/work/work-spreadsheet-formula-support.d.ts +1 -0
  383. package/dist/internal/features/work/work-spreadsheet-formulas.d.ts +19 -0
  384. package/dist/internal/features/work/work-spreadsheet-header-footer.d.ts +14 -0
  385. package/dist/internal/features/work/work-spreadsheet-line-chart-svg.d.ts +10 -0
  386. package/dist/internal/features/work/work-spreadsheet-page-breaks.d.ts +4 -0
  387. package/dist/internal/features/work/work-spreadsheet-page-setup.d.ts +26 -0
  388. package/dist/internal/features/work/work-spreadsheet-pivot-engine.d.ts +21 -0
  389. package/dist/internal/features/work/work-spreadsheet-pivot-values.d.ts +7 -0
  390. package/dist/internal/features/work/work-spreadsheet-pivots.d.ts +27 -0
  391. package/dist/internal/features/work/work-spreadsheet-protection.d.ts +55 -0
  392. package/dist/internal/features/work/work-spreadsheet-ranges.d.ts +25 -0
  393. package/dist/internal/features/work/work-spreadsheet-trendline-svg.d.ts +9 -0
  394. package/dist/internal/features/work/work-spreadsheet-trendlines.d.ts +11 -0
  395. package/dist/internal/features/work/work-spreadsheet-xy-chart-axes-svg.d.ts +10 -0
  396. package/dist/internal/features/work/work-templates.d.ts +4 -0
  397. package/dist/internal/features/work/work-types.d.ts +513 -0
  398. package/dist/internal/features/work/work-xlsx-chart-axes.d.ts +4 -0
  399. package/dist/internal/features/work/work-xlsx-chart-diagnostics.d.ts +3 -0
  400. package/dist/internal/features/work/work-xlsx-chart-layout.d.ts +16 -0
  401. package/dist/internal/features/work/work-xlsx-chart-series-style.d.ts +6 -0
  402. package/dist/internal/features/work/work-xlsx-chart-values.d.ts +10 -0
  403. package/dist/internal/features/work/work-xlsx-charts.d.ts +32 -0
  404. package/dist/internal/features/work/work-xlsx-conditional-format-diagnostics.d.ts +6 -0
  405. package/dist/internal/features/work/work-xlsx-conditional-format-write.d.ts +11 -0
  406. package/dist/internal/features/work/work-xlsx-conditional-format.d.ts +29 -0
  407. package/dist/internal/features/work/work-xlsx-defined-names.d.ts +4 -0
  408. package/dist/internal/features/work/work-xlsx-drawing-geometry.d.ts +27 -0
  409. package/dist/internal/features/work/work-xlsx-formula-diagnostics.d.ts +3 -0
  410. package/dist/internal/features/work/work-xlsx-formulas.d.ts +40 -0
  411. package/dist/internal/features/work/work-xlsx-header-footer.d.ts +12 -0
  412. package/dist/internal/features/work/work-xlsx-images.d.ts +17 -0
  413. package/dist/internal/features/work/work-xlsx-interop.d.ts +39 -0
  414. package/dist/internal/features/work/work-xlsx-page-breaks.d.ts +7 -0
  415. package/dist/internal/features/work/work-xlsx-page-setup-diagnostics.d.ts +2 -0
  416. package/dist/internal/features/work/work-xlsx-page-setup.d.ts +5 -0
  417. package/dist/internal/features/work/work-xlsx-pivot-diagnostics.d.ts +3 -0
  418. package/dist/internal/features/work/work-xlsx-pivot-xml.d.ts +9 -0
  419. package/dist/internal/features/work/work-xlsx-pivots.d.ts +32 -0
  420. package/dist/internal/features/work/work-xlsx-protection.d.ts +24 -0
  421. package/dist/internal/features/workspace/components/workspace-context-menu.d.ts +29 -0
  422. package/dist/internal/features/workspace/components/workspace-text-control-selection.d.ts +7 -0
  423. package/dist/internal/kernel/office-kernel-client-types.d.ts +40 -0
  424. package/dist/internal/kernel/office-kernel-client.d.ts +4 -0
  425. package/dist/internal/kernel/office-kernel-fallback.d.ts +2 -0
  426. package/dist/internal/kernel/office-kernel-presentation-fallback.d.ts +2 -0
  427. package/dist/internal/kernel/office-kernel-protocol.d.ts +229 -0
  428. package/dist/internal/kernel/office-kernel-spreadsheet-fallback-formula.d.ts +3 -0
  429. package/dist/internal/kernel/office-kernel-spreadsheet-fallback-validation.d.ts +5 -0
  430. package/dist/internal/kernel/office-kernel-spreadsheet-fallback-value.d.ts +6 -0
  431. package/dist/internal/kernel/office-kernel-spreadsheet-fallback.d.ts +2 -0
  432. package/dist/internal/kernel/office-kernel-spreadsheet-protocol.d.ts +112 -0
  433. package/dist/internal/kernel/office-kernel-spreadsheet-session-fallback.d.ts +8 -0
  434. package/dist/internal/kernel/office-kernel-text-fallback.d.ts +10 -0
  435. package/dist/internal/kernel/office-kernel-version.d.ts +1 -0
  436. package/dist/internal/kernel/office-kernel.worker.d.ts +1 -0
  437. package/dist/internal/keyboard-shortcuts.d.ts +2 -0
  438. package/dist/internal/state/app-state.d.ts +8 -0
  439. package/dist/noto-naskh-arabic-regular.ttf +0 -0
  440. package/dist/noto-naskh-arabic.LICENSE.txt +94 -0
  441. package/dist/noto-sans-hans-regular.otf +0 -0
  442. package/dist/noto-sans-hans.LICENSE.txt +94 -0
  443. package/dist/noto-sans-hebrew-regular.ttf +0 -0
  444. package/dist/noto-sans-hebrew.LICENSE.txt +94 -0
  445. package/dist/noto-sans-regular.ttf +0 -0
  446. package/dist/noto-sans.LICENSE.txt +94 -0
  447. package/dist/office-kernel.wasm +0 -0
  448. package/dist/office-kernel.worker.js +14605 -0
  449. package/dist/office-surface.d.ts +10 -0
  450. package/dist/pdfium.LICENSE.txt +196 -0
  451. package/dist/pdfium.wasm +0 -0
  452. package/dist/pptxgen.LICENSE.txt +21 -0
  453. package/dist/pptxgen.bundle.js +11244 -0
  454. package/dist/react.d.ts +51 -0
  455. package/dist/react.js +1 -0
  456. package/dist/styles.css +17435 -0
  457. package/dist/styles.js +0 -0
  458. package/dist/vue.d.ts +282 -0
  459. package/dist/vue.js +231 -0
  460. package/dist/web-component.d.ts +98 -0
  461. package/dist/web-component.js +335 -0
  462. package/docs/browser-editor-architecture.md +947 -0
  463. package/package.json +165 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 A3S Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,470 @@
1
+ <p align="center">
2
+ <img src="assets/readme/hero.svg" width="1200" alt="A3S Office — five browser editors behind one typed boundary">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>AI-native Office surfaces for the browser, backed by deterministic native automation.</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ Edit documents, Markdown, spreadsheets, presentations, and PDFs inside your product.<br>
11
+ Keep persistence, identity, collaboration, authorization, and AI in your host application.
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://github.com/A3S-Lab/Office/actions/workflows/ci.yml"><img alt="CI status" src="https://img.shields.io/github/actions/workflow/status/A3S-Lab/Office/ci.yml?branch=main&amp;style=flat-square&amp;label=CI"></a>
16
+ <a href="https://a3s-lab.github.io/Office/"><img alt="Open the live Playground" src="https://img.shields.io/badge/Live_Playground-open-2f6fed?style=flat-square"></a>
17
+ <a href="#project-status"><img alt="Project status: pre-1.0" src="https://img.shields.io/badge/status-pre--1.0-7a5bd6?style=flat-square"></a>
18
+ <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-159469?style=flat-square"></a>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://a3s-lab.github.io/Office/">Playground</a> ·
23
+ <a href="https://a3s-lab.github.io/Office/docs/">Documentation</a> ·
24
+ <a href="#quick-start">Quick start</a> ·
25
+ <a href="#five-format-native-surfaces">Editors</a> ·
26
+ <a href="#native-automation">Automation</a> ·
27
+ <a href="#architecture">Architecture</a> ·
28
+ <a href="CONTRIBUTING.md">Contributing</a>
29
+ </p>
30
+
31
+ ---
32
+
33
+ A3S Office is an open-source Office engine for product teams that need rich
34
+ browser editing and agent-ready file automation without adopting an A3S
35
+ backend. It ships complete editor surfaces, typed host contracts, browser file
36
+ workflows, and a separate Rust automation plane.
37
+
38
+ - **Embed complete editors** through React, Vue 3, Web Components, or the
39
+ framework-neutral Core API.
40
+ - **Keep format-native behavior** instead of forcing every file through one
41
+ lowest-common-denominator model.
42
+ - **Own the product boundary**: your application controls content, storage,
43
+ permissions, collaboration, and model providers.
44
+ - **Automate deterministically** through the native CLI, standard MCP server,
45
+ or packaged Office Skill.
46
+
47
+ ## See it working
48
+
49
+ The images below are committed visual-regression baselines from the real
50
+ [Playground](https://a3s-lab.github.io/Office/), not conceptual mockups.
51
+
52
+ <p align="center">
53
+ <a href="visual-tests/__snapshots__/linux/desktop-1280/document.png">
54
+ <img src="visual-tests/__snapshots__/linux/desktop-1280/document.png" alt="A3S Office document editor with a ribbon and paginated project brief" width="1280">
55
+ </a>
56
+ </p>
57
+
58
+ <table>
59
+ <tr>
60
+ <td width="50%" valign="top">
61
+ <a href="visual-tests/__snapshots__/linux/desktop-1280/spreadsheet.png">
62
+ <img src="visual-tests/__snapshots__/linux/desktop-1280/spreadsheet.png" alt="A3S Office spreadsheet editor showing a quarterly execution plan">
63
+ </a>
64
+ <br><sub><strong>Spreadsheet</strong> — workbook editing and formula workflows</sub>
65
+ </td>
66
+ <td width="50%" valign="top">
67
+ <a href="visual-tests/__snapshots__/linux/desktop-1280/presentation.png">
68
+ <img src="visual-tests/__snapshots__/linux/desktop-1280/presentation.png" alt="A3S Office presentation editor with slide thumbnails and a slide canvas">
69
+ </a>
70
+ <br><sub><strong>Presentation</strong> — structured slides, objects, and presenter flows</sub>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td width="50%" valign="top">
75
+ <a href="visual-tests/__snapshots__/linux/desktop-1280/markdown.png">
76
+ <img src="visual-tests/__snapshots__/linux/desktop-1280/markdown.png" alt="A3S Office Markdown editor in synchronized source and preview mode">
77
+ </a>
78
+ <br><sub><strong>Markdown</strong> — GFM source and synchronized preview</sub>
79
+ </td>
80
+ <td width="50%" valign="top">
81
+ <a href="visual-tests/__snapshots__/linux/desktop-1280/pdf.png">
82
+ <img src="visual-tests/__snapshots__/linux/desktop-1280/pdf.png" alt="A3S Office PDF editor with search, annotation, save, and download controls">
83
+ </a>
84
+ <br><sub><strong>PDF</strong> — PDFium rendering, forms, annotations, and save</sub>
85
+ </td>
86
+ </tr>
87
+ </table>
88
+
89
+ ## Why A3S Office
90
+
91
+ - **Product-native UI** — Complete Office-style surfaces with no required
92
+ backend, account system, or storage model.
93
+ - **Accessible responsive shell** — Compact sidebars, slide navigation, AI
94
+ panes, dialogs, menus, and popovers share bounded keyboard navigation,
95
+ background isolation, topmost Escape handling, and focus restoration.
96
+ Shared color palettes expand to an eight-column touch layout on phones while
97
+ preserving spatial arrow-key navigation.
98
+ - **Editor-scoped zoom** — Status controls and Ctrl/Cmd + mouse-wheel gestures
99
+ share each surface's bounded zoom model without changing the host browser's
100
+ page scale.
101
+ - **Predictable state** — Controlled content values, typed callbacks, explicit
102
+ file actions, conflict-aware document edits, and one document typography
103
+ baseline across editing, preview, and PDF rendering. Word editing and
104
+ read-only preview retain the same canonical TipTap tree, while browser PDF
105
+ export captures that same Worker/WASM page layout instead of rebuilding
106
+ content from compatibility HTML. Caption numbering and cross-reference
107
+ validity also update in that same transaction graph, including a truthful
108
+ missing-target state after deletion.
109
+ - **Framework choice** — React components, Vue 3 adapters, Custom Elements,
110
+ and a framework-neutral Core API over the same engine.
111
+ - **Responsive computation** — Lazy editor chunks, cancellable Workers,
112
+ CSS-compatible font-weight matching, Rust WebAssembly layout and
113
+ calculation, and PDFium rendering.
114
+ - **AI without UI scraping** — Typed agent ports and host-defined selection
115
+ actions receive structured context and editing commands.
116
+ - **Automation outside the browser** — The native Rust CLI, standard MCP
117
+ server, and Office Skill share bounded mutation contracts.
118
+
119
+ ## Quick start
120
+
121
+ ### Try the product locally
122
+
123
+ Node.js 20+, Bun 1.3+, and Rust 1.85+ are required.
124
+
125
+ ```bash
126
+ git clone https://github.com/A3S-Lab/Office.git
127
+ cd Office
128
+ bun install --frozen-lockfile
129
+ bun run playground
130
+ ```
131
+
132
+ Then open the local URL printed by the development server. For a zero-install
133
+ tour, use the [live Playground](https://a3s-lab.github.io/Office/).
134
+
135
+ ### Embed a controlled React editor
136
+
137
+ Install the public package with its React peers:
138
+
139
+ ```bash
140
+ bun add @a3s-lab/office react react-dom
141
+ ```
142
+
143
+ Import the stylesheet once, give the editor an explicit-height host, and store
144
+ the complete value emitted by `onChange`:
145
+
146
+ ```tsx
147
+ import { useState } from 'react';
148
+ import type { DocumentContent } from '@a3s-lab/office/core';
149
+ import { DocumentEditor } from '@a3s-lab/office/react';
150
+ import '@a3s-lab/office/styles.css';
151
+
152
+ const initialContent: DocumentContent = {
153
+ type: 'document',
154
+ html: '<h1>Project brief</h1><p>Start editing here.</p>',
155
+ pageSize: 'a4',
156
+ pageColor: '#ffffff',
157
+ };
158
+
159
+ export function ProjectBrief() {
160
+ const [content, setContent] = useState(initialContent);
161
+
162
+ return (
163
+ <main style={{ height: '100dvh', minHeight: 0 }}>
164
+ <DocumentEditor
165
+ content={content}
166
+ onChange={setContent}
167
+ theme="system"
168
+ />
169
+ </main>
170
+ );
171
+ }
172
+ ```
173
+
174
+ The editor owns editing, layout, import/export, and browser rendering. The host
175
+ owns persistence and decides when, where, and how the emitted content is saved.
176
+
177
+ ### Export the live Word layout to PDF
178
+
179
+ Give each mounted document a stable `artifactId`, then pass the matching,
180
+ current artifact to `downloadArtifactPdf`. Export waits for the live pagination
181
+ surface and crops the physical pages computed by the editor:
182
+
183
+ ```tsx
184
+ import { useState } from 'react';
185
+ import {
186
+ createArtifact,
187
+ downloadArtifactPdf,
188
+ } from '@a3s-lab/office/core';
189
+ import { DocumentEditor } from '@a3s-lab/office/react';
190
+
191
+ export function DocumentWithPdfExport() {
192
+ const [artifact, setArtifact] = useState(() =>
193
+ createArtifact('blank-document'),
194
+ );
195
+
196
+ if (artifact.content.type !== 'document') return null;
197
+
198
+ return (
199
+ <main style={{ display: 'flex', height: '100dvh', flexDirection: 'column' }}>
200
+ <button
201
+ type="button"
202
+ onClick={() => void downloadArtifactPdf(artifact)}
203
+ >
204
+ Export PDF
205
+ </button>
206
+ <section style={{ flex: 1, minHeight: 0 }}>
207
+ <DocumentEditor
208
+ artifactId={artifact.id}
209
+ content={artifact.content}
210
+ onChange={(content) =>
211
+ setArtifact((current) => ({
212
+ ...current,
213
+ content,
214
+ revision: current.revision + 1,
215
+ updatedAt: Date.now(),
216
+ }))
217
+ }
218
+ />
219
+ </section>
220
+ </main>
221
+ );
222
+ }
223
+ ```
224
+
225
+ The live path preserves automatic page-break decorations, shaped text, table
226
+ continuations, and page chrome. It currently rasterizes each physical page
227
+ into the PDF; searchable text and vector output remain future fidelity work.
228
+
229
+ ### Choose an entry point
230
+
231
+ - `@a3s-lab/office/react` — Lazy React editor components and preload helpers.
232
+ - `@a3s-lab/office/vue` — Vue 3 adapters with `v-model:content`.
233
+ - `@a3s-lab/office/web-component` — Custom Elements for framework-agnostic UI
234
+ composition.
235
+ - `@a3s-lab/office/core` — Typed models, templates, import, export, and browser
236
+ file workflows.
237
+ - `@a3s-lab/office/styles.css` — Shared editor and interaction-system styles.
238
+
239
+ Copyable React, Vue, and Web Component examples live in the
240
+ [component documentation](https://a3s-lab.github.io/Office/docs/components/).
241
+
242
+ ## Five format-native surfaces
243
+
244
+ Each surface keeps a canonical model that matches its file format and user
245
+ interaction model.
246
+
247
+ - **Document** — Pagination, sections, focused page-setup tabs, clean page
248
+ margins with on-demand header/footer editing, outline navigation with
249
+ contextual full-text results, styles,
250
+ grouped bundled, common system, monospace, imported, and host-provided font
251
+ choices with live typeface previews, precision table sizing and autofit,
252
+ viewport-safe comment drafting,
253
+ focus-preserving comment review and citation drafts, tracked changes, notes,
254
+ pointer- and Shift+F10-accessible host-defined selection menus, and shared
255
+ edit/preview/PDF typography and page-chrome placement. Editing, read-only
256
+ preview, and browser PDF export share one live pagination result.
257
+ _DOCX import/export; PDF export._
258
+ - **Markdown** — GFM source, visual editing, synchronized and resizable split
259
+ preview, source-native undo/redo with typing coalescing and selection restore,
260
+ source-aware ribbon formatting and shortcuts, empty-source guidance, task
261
+ lists, tables, links, images, code, and keyboard-accessible host-defined
262
+ selection menus across both editing surfaces. _Markdown import/export._
263
+ - **Spreadsheet** — Multiple sheets, formulas, dependency-aware recalculation,
264
+ live selection statistics, an A3S-owned worksheet bar with lifecycle and
265
+ color controls, safe deletion confirmation, in-place rename validation, a
266
+ grid-aligned single-row responsive workbook footer that keeps the active
267
+ worksheet and its actions visible across window and phone-width changes,
268
+ selection-preserving undo/redo, deterministic Arrow, Enter, Tab, Home,
269
+ PageUp/PageDown, row, column, and all-cells selection shortcuts, Cmd/Ctrl
270
+ formatting through root-scoped capture before vendor grid listeners, an
271
+ editor-owned Cmd/Ctrl+F search bar that finds displayed values, raw values,
272
+ formulas, and sparse cells without opening browser Find,
273
+ Shift+F11 creation, Ctrl/Cmd+PageUp/PageDown switching in edit and read-only
274
+ preview,
275
+ one shared cell/worksheet context-menu surface with executable shortcut
276
+ hints, keyboard-operated cells and sheet tabs, direct type-to-edit,
277
+ permission-resilient multi-cell cut/copy/paste, clear, F2 editing, and
278
+ focus-safe Escape behavior, direct
279
+ font-family, vertical-alignment, text-wrap, number/percent, and decimal
280
+ controls, charts, validation, protection, comments, and print settings.
281
+ _XLSX, XLS, ODS, and CSV import; XLSX and PDF export._
282
+ - **Presentation** — Typed slide scene graph, multi-selection, groups, object
283
+ transforms, keyboard-accessible table-size insertion, Shift+F10-accessible
284
+ native slide and object context actions, guides, comments, transitions,
285
+ editor-scoped formatting and clipboard shortcuts that restore the selected
286
+ object, a dismissible phone slide navigator, a top-aligned phone canvas with
287
+ a priority-aware status bar, one-step slideshow from the beginning or current
288
+ slide, keyboard-complete playback, and a responsive presenter view with one
289
+ navigation strip, current/next context, speaker notes, and a session timer.
290
+ _PPTX import/export; PDF export._
291
+ - **PDF** — PDFium rendering, navigation, search, form filling, annotations,
292
+ annotation color, opacity, compatible stroke-width controls, history,
293
+ a scrollable page-thumbnail rail with current-page synchronization and
294
+ focus-synchronized Arrow/Home/End navigation, bounded rendering for long
295
+ files, and a dismissible page drawer whose phone trigger stays in the page
296
+ controls instead of covering PDF content,
297
+ focus-safe page and search drafts, responsive search-result, navigation, and
298
+ zoom controls, editor-scoped shortcuts, and a keyboard-operated overflow menu
299
+ that retains secondary annotation tools and appearance settings on phones.
300
+ _PDF open/save._
301
+
302
+ Document and Markdown accept public TipTap Extensions. Spreadsheet,
303
+ Presentation, and PDF expose stable host ports rather than their internal
304
+ command contexts. Editor engines and large runtime assets load only when that
305
+ surface is requested.
306
+
307
+ ## Controlled by design
308
+
309
+ A3S Office is headless at the product boundary, not at the UI boundary. The
310
+ package includes complete toolbars, ribbons, panes, popovers, and dialogs while
311
+ leaving product infrastructure to the host.
312
+
313
+ **A3S Office owns:** editing models and commands; import, export, layout, and
314
+ rendering; editor UI and responsive interactions; typed selection and agent
315
+ ports.
316
+
317
+ **Your host owns:** persistence and version history; identity, permissions,
318
+ and collaboration; the application shell and navigation; AI providers,
319
+ prompts, policy, and request lifecycle.
320
+
321
+ Document and Markdown selection menus can be replaced with host-defined typed
322
+ actions. Each action receives an immutable selection snapshot, nearby text,
323
+ the complete controlled content, and conflict-aware `replaceText`,
324
+ `insertBefore`, `insertAfter`, and `copyText` commands. Markdown snapshots also
325
+ identify whether the source or visual surface owns the selection. Async edits
326
+ track unrelated visual-editor transactions and fail with `stale-selection`
327
+ instead of changing the wrong text. The Playground's open-ended question action
328
+ enters a focused draft before dispatch, so a host never receives an unfinished
329
+ “Question:” request; attached context stays available without dominating the
330
+ assistant surface.
331
+
332
+ ## Browser file workflows
333
+
334
+ The Core API creates typed blank artifacts and performs browser-side import or
335
+ export without mounting an editor:
336
+
337
+ ```ts
338
+ import {
339
+ createArtifact,
340
+ createArtifactBlob,
341
+ importOfficeFile,
342
+ } from '@a3s-lab/office/core';
343
+
344
+ const imported = await importOfficeFile(file);
345
+ const output = await createArtifactBlob(imported);
346
+ const blankDeck = createArtifact('blank-presentation');
347
+ ```
348
+
349
+ Use `downloadArtifact` to start a browser download or
350
+ `createArtifactBlob` when your application owns upload and persistence.
351
+
352
+ ## Native automation
353
+
354
+ The repository also contains a native Rust engine for deterministic reads,
355
+ validation, mutation, batch operations, exact natural-unit inventories,
356
+ sibling-isolated semantic previews, screenshots, file watching, and a
357
+ source-bound exact-layout raster boundary across Office packages. The first
358
+ layout-authoritative route supports image-only PPTX slides whose single opaque
359
+ PNG exactly covers the declared slide surface. The optional Rust `pdfium`
360
+ feature adds bounded, one-based PDF page inventory and exact page PNGs through
361
+ an explicit host-supplied PDFium 7881 library. It records media/crop boxes,
362
+ rotation, physical and pixel geometry, source and engine hashes, and never
363
+ downloads a runtime or introduces a Browser dependency. Consumers can inspect
364
+ selected pages from one previously validated complete inventory without
365
+ rescanning the full document; render still revalidates the immutable source and
366
+ actual page profile before publication. The same retained inventory now
367
+ authorizes bounded native PDF text-layer extraction with source-order Unicode,
368
+ exact UTF-8/UTF-16 ranges, optional glyph boxes in PDF coordinates, and bounded
369
+ document outlines with exact page targets. Text and outline calls revalidate
370
+ the immutable source, reuse inventory authority, and return typed limit or
371
+ unsupported failures without OCR or Browser access. Richer slides and formats
372
+ without an authoritative provider remain typed unsupported instead of being
373
+ relabeled semantic previews.
374
+ Native DOCX and PPTX table reads also normalize merged cells into one-based
375
+ logical row and column coordinates, row and column spans, and stable anchor
376
+ references for covered physical cells.
377
+
378
+ ```bash
379
+ # Run from the repository root
380
+ cargo run -p a3s-office-cli -- validate report.docx --json
381
+ cargo run -p a3s-office-cli -- view report.docx outline --json
382
+ cargo run -p a3s-office-cli -- set report.docx /body --find Draft --replace Final --json
383
+
384
+ # Start the standard MCP server
385
+ cargo run -p a3s-office-cli -- mcp
386
+ ```
387
+
388
+ CLI, MCP, the typed Rust API, and the packaged Office Skill share the same
389
+ bounded contracts. They inspect and modify files without launching desktop
390
+ Office or scraping editor UI.
391
+
392
+ Read the [native engine design](docs/native-office-engine.md), the complete
393
+ [CLI reference](docs/cli-reference.md), or the published
394
+ [CLI and Skill guide](https://a3s-lab.github.io/Office/docs/automation/).
395
+
396
+ ## Architecture
397
+
398
+ <p align="center">
399
+ <a href="assets/readme/architecture.svg">
400
+ <img src="assets/readme/architecture.svg" width="1200" alt="A3S Office architecture with browser editing and native automation planes controlled by the host product">
401
+ </a>
402
+ </p>
403
+
404
+ The browser plane combines controlled editor surfaces, framework adapters,
405
+ Workers, Rust WebAssembly, and PDFium. The native plane keeps filesystem and
406
+ OOXML package concerns in a separate Rust core, with a host-injected optional
407
+ PDFium provider for read-only PDF page evidence. Both planes expose typed
408
+ contracts; neither requires an A3S backend.
409
+
410
+ For engine ownership, Worker/WASM boundaries, delivery stages, and performance
411
+ gates, see [Browser editor architecture](docs/browser-editor-architecture.md).
412
+
413
+ ## Project status
414
+
415
+ A3S Office is pre-1.0. Content models and component props are public, but a
416
+ minor release may still include breaking model changes. Required migrations
417
+ will be called out in the [changelog](CHANGELOG.md).
418
+
419
+ The project targets predictable browser editing and file preservation, not
420
+ pixel parity with every Microsoft Office or WPS feature. Unsupported OOXML
421
+ semantics and fidelity gaps remain explicit compatibility boundaries instead
422
+ of being silently approximated. Track product depth and release evidence in
423
+ the [editor quality roadmap](docs/editor-quality-roadmap.md).
424
+
425
+ ## Development
426
+
427
+ Run focused checks from the repository root:
428
+
429
+ ```bash
430
+ bun install --frozen-lockfile
431
+ bun run format:check
432
+ bun run lint
433
+ bun run typecheck
434
+ bun run test
435
+ bun run build
436
+ ```
437
+
438
+ Start the integration Playground with `bun run playground`. The full pull
439
+ request checklist also covers the Rust workspace, browser bundle budget, and
440
+ committed visual contracts; see [CONTRIBUTING.md](CONTRIBUTING.md).
441
+
442
+ ## Documentation
443
+
444
+ The published website keeps the interactive Playground at its root and builds
445
+ the searchable Rspress documentation center under `/docs/`. Both surfaces use
446
+ the same deployment base, so preview, Pages, and fork deployments keep working
447
+ without hard-coded return URLs.
448
+
449
+ - [Live Playground](https://a3s-lab.github.io/Office/)
450
+ - [Documentation center](https://a3s-lab.github.io/Office/docs/)
451
+ - [React, Vue, and Web Component integration](https://a3s-lab.github.io/Office/docs/components/)
452
+ - [Office CLI and coding-agent Skill](https://a3s-lab.github.io/Office/docs/automation/)
453
+ - [Browser editor architecture](docs/browser-editor-architecture.md)
454
+ - [Native Office engine](docs/native-office-engine.md)
455
+ - [CLI reference](docs/cli-reference.md)
456
+ - [Editor quality roadmap](docs/editor-quality-roadmap.md)
457
+ - [Changelog](CHANGELOG.md)
458
+
459
+ ## Community and security
460
+
461
+ Contributions are welcome. Read the [contribution guide](CONTRIBUTING.md) and
462
+ [Code of Conduct](CODE_OF_CONDUCT.md) before opening a change. Report suspected
463
+ vulnerabilities through the private process in [SECURITY.md](SECURITY.md), not
464
+ through a public issue.
465
+
466
+ ## License
467
+
468
+ A3S Office is available under the [MIT License](LICENSE). Bundled PDFium and
469
+ other third-party assets carry additional notices in
470
+ [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,33 @@
1
+ # Third-Party Notices
2
+
3
+ A3S Office depends on third-party open-source packages listed in
4
+ `package.json`. Those packages retain their respective copyrights and licenses.
5
+
6
+ The browser Office WebAssembly kernel includes Rust dependencies recorded in
7
+ `Cargo.lock`, including Serde and serde_json. Those dependencies retain their
8
+ respective MIT or Apache-2.0 licenses.
9
+
10
+ The published package also redistributes `pdfium.wasm` from
11
+ `@embedpdf/pdfium`. Its complete upstream notice file is included as
12
+ `dist/pdfium.LICENSE.txt` in every build and npm package.
13
+
14
+ Deterministic document layout redistributes Noto Sans Hans Regular from
15
+ `@embedpdf/fonts-sc` under the SIL Open Font License 1.1. Its complete license
16
+ is included as `dist/noto-sans-hans.LICENSE.txt`.
17
+
18
+ Deterministic document layout also redistributes Noto Sans Regular from
19
+ `@embedpdf/fonts-latin` under the SIL Open Font License 1.1. Its complete
20
+ license is included as `dist/noto-sans.LICENSE.txt`.
21
+
22
+ Deterministic document layout also redistributes Noto Naskh Arabic Regular from
23
+ `@embedpdf/fonts-arabic` under the SIL Open Font License 1.1. Its complete
24
+ license is included as `dist/noto-naskh-arabic.LICENSE.txt`.
25
+
26
+ Deterministic document layout also redistributes Noto Sans Hebrew Regular from
27
+ `@embedpdf/fonts-hebrew` under the SIL Open Font License 1.1. Its complete
28
+ license is included as `dist/noto-sans-hebrew.LICENSE.txt`.
29
+
30
+ PPTX export redistributes the browser bundle from `pptxgenjs`. Its upstream
31
+ license is included as `dist/pptxgen.LICENSE.txt`.
32
+
33
+ The A3S Office source code remains licensed under the MIT License in `LICENSE`.