@a3s-lab/office 0.2.2 → 0.4.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 (277) hide show
  1. package/COLLABORATION_ROADMAP.md +426 -0
  2. package/README.md +649 -10
  3. package/dist/0~1403.js +1 -1
  4. package/dist/0~2805.js +1279 -0
  5. package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
  6. package/dist/0~3539.js +1 -1
  7. package/dist/0~3557.js +1 -1
  8. package/dist/0~3635.js +1 -1
  9. package/dist/0~4595.js +123 -12
  10. package/dist/0~4980.js +154 -0
  11. package/dist/0~5050.js +124 -113
  12. package/dist/{0~9512.js → 0~6090.js} +540 -3
  13. package/dist/0~7048.js +92 -66
  14. package/dist/0~7614.js +2 -1
  15. package/dist/0~7754.js +5653 -0
  16. package/dist/0~9445.js +1 -1
  17. package/dist/0~document-editor.js +4992 -3323
  18. package/dist/0~markdown-editor.js +250 -44
  19. package/dist/0~pdf-viewer.js +1016 -24
  20. package/dist/0~presentation-editor.js +179 -8
  21. package/dist/0~spreadsheet-editor.js +3371 -578
  22. package/dist/0~work-docx-export.js +6801 -658
  23. package/dist/0~work-docx-import.js +1388 -795
  24. package/dist/0~work-office-diagnostics.js +524 -30
  25. package/dist/0~work-pptx-export.js +2 -1
  26. package/dist/0~work-pptx-import.js +1 -2
  27. package/dist/0~work-presentation-charts.js +1 -1
  28. package/dist/2591.js +197 -0
  29. package/dist/3818.js +1090 -0
  30. package/dist/4104.js +970 -60
  31. package/dist/432.js +171 -14
  32. package/dist/4476.js +2008 -0
  33. package/dist/4560.js +674 -0
  34. package/dist/4650.js +70 -0
  35. package/dist/{1134.js → 5184.js} +183 -1
  36. package/dist/6489.js +18 -18
  37. package/dist/7060.js +132 -0
  38. package/dist/8715.js +2 -136
  39. package/dist/8928.js +16778 -0
  40. package/dist/9787.js +209 -0
  41. package/dist/core.d.ts +29 -9
  42. package/dist/core.js +10 -2
  43. package/dist/index.js +13 -3
  44. package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
  45. package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
  46. package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
  47. package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
  48. package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
  49. package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
  50. package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
  51. package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
  52. package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
  53. package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
  54. package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
  55. package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
  56. package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
  57. package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
  58. package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
  59. package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
  60. package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
  61. package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
  62. package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
  63. package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
  64. package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
  65. package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
  66. package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
  67. package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
  68. package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
  69. package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
  70. package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
  71. package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
  72. package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
  73. package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
  74. package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
  75. package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
  76. package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
  77. package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
  78. package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
  79. package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
  80. package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
  81. package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
  82. package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
  83. package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
  84. package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
  85. package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
  86. package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
  87. package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
  88. package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
  89. package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
  90. package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
  91. package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
  92. package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
  93. package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
  94. package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
  95. package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
  96. package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
  97. package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
  98. package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
  99. package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
  100. package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
  101. package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
  102. package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
  103. package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
  104. package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
  105. package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
  106. package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
  107. package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
  108. package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
  109. package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
  110. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
  111. package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
  112. package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
  113. package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
  114. package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
  115. package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
  116. package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
  117. package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
  118. package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
  119. package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
  120. package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
  121. package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
  122. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
  123. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
  124. package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
  125. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
  126. package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
  127. package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
  128. package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
  129. package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
  130. package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
  131. package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
  132. package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
  133. package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
  134. package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
  135. package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
  136. package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
  137. package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
  138. package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
  139. package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
  140. package/dist/internal/features/work/work-document-comments.d.ts +1 -1
  141. package/dist/internal/features/work/work-document-equations.d.ts +513 -0
  142. package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
  143. package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
  144. package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
  145. package/dist/internal/features/work/work-document-fields.d.ts +7 -0
  146. package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
  147. package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
  148. package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
  149. package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
  150. package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
  151. package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
  152. package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
  153. package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
  154. package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
  155. package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
  156. package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
  157. package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
  158. package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
  159. package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
  160. package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
  161. package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
  162. package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
  163. package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
  164. package/dist/internal/features/work/work-document-section.d.ts +4 -0
  165. package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
  166. package/dist/internal/features/work/work-document-source.d.ts +23 -0
  167. package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
  168. package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
  169. package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
  170. package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
  171. package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
  172. package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
  173. package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
  174. package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
  175. package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
  176. package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
  177. package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
  178. package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
  179. package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
  180. package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
  181. package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
  182. package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
  183. package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
  184. package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
  185. package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
  186. package/dist/internal/features/work/work-docx-export.d.ts +1 -1
  187. package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
  188. package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
  189. package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
  190. package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
  191. package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
  192. package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
  193. package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
  194. package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
  195. package/dist/internal/features/work/work-docx-import.d.ts +13 -3
  196. package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
  197. package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
  198. package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
  199. package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
  200. package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
  201. package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
  202. package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
  203. package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
  204. package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
  205. package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
  206. package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
  207. package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
  208. package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
  209. package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
  210. package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
  211. package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
  212. package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
  213. package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
  214. package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
  215. package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
  216. package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
  217. package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
  218. package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
  219. package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
  220. package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
  221. package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
  222. package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
  223. package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
  224. package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
  225. package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
  226. package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
  227. package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
  228. package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
  229. package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
  230. package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
  231. package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
  232. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
  233. package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
  234. package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
  235. package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
  236. package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
  237. package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
  238. package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
  239. package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
  240. package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
  241. package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
  242. package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
  243. package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
  244. package/dist/internal/features/work/work-file-contract.d.ts +1 -0
  245. package/dist/internal/features/work/work-file-io.d.ts +1 -1
  246. package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
  247. package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
  248. package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
  249. package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
  250. package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
  251. package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
  252. package/dist/internal/features/work/work-repository.d.ts +2 -0
  253. package/dist/internal/features/work/work-types.d.ts +15 -2
  254. package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
  255. package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
  256. package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
  257. package/dist/office-kernel.wasm +0 -0
  258. package/dist/office-kernel.worker.js +93 -41
  259. package/dist/react.d.ts +18 -12
  260. package/dist/react.js +1 -1
  261. package/dist/styles.css +1367 -16
  262. package/dist/vue.d.ts +48 -5
  263. package/dist/vue.js +42 -3
  264. package/dist/web-component.d.ts +24 -2
  265. package/dist/web-component.js +101 -2
  266. package/docs/latest/en/browser-editor-architecture.md +262 -47
  267. package/package.json +29 -4
  268. package/dist/0~152.js +0 -94
  269. package/dist/0~2582.js +0 -485
  270. package/dist/0~4750.js +0 -939
  271. package/dist/0~5861.js +0 -596
  272. package/dist/0~work-document-extensions.js +0 -3045
  273. package/dist/0~work-document-model-codec.js +0 -42
  274. package/dist/0~work-docx-bibliography.js +0 -347
  275. package/dist/0~work-docx-page-color.js +0 -42
  276. package/dist/2881.js +0 -1455
  277. package/dist/8728.js +0 -723
@@ -0,0 +1,27 @@
1
+ import type { Cell } from '@fortune-sheet/core';
2
+ export declare const spreadsheetCellFormatAttributes: readonly ["bl", "it", "ff", "fs", "fc", "ht", "vt", "tb", "cl", "un", "tr", "ct", "bg"];
3
+ export type SpreadsheetCellFormatAttribute = (typeof spreadsheetCellFormatAttributes)[number];
4
+ export type SpreadsheetFormatPainterMode = 'once' | 'locked';
5
+ export type SpreadsheetCellFormatSnapshot = Record<SpreadsheetCellFormatAttribute, unknown>;
6
+ export interface SpreadsheetFormatPattern {
7
+ cells: readonly (readonly SpreadsheetCellFormatSnapshot[])[];
8
+ columnCount: number;
9
+ rowCount: number;
10
+ }
11
+ export interface SpreadsheetFormatPainterRange {
12
+ column: number[];
13
+ row: number[];
14
+ }
15
+ export interface SpreadsheetFormatPainterSheetBounds {
16
+ columnCount: number;
17
+ rowCount: number;
18
+ }
19
+ export interface SpreadsheetFormatPainterBatch {
20
+ attribute: SpreadsheetCellFormatAttribute;
21
+ ranges: SpreadsheetFormatPainterRange[];
22
+ value: unknown;
23
+ }
24
+ export declare function captureSpreadsheetFormatPattern(cells: readonly (readonly (Cell | null)[])[]): SpreadsheetFormatPattern | null;
25
+ export declare function spreadsheetFormatPainterTargetRange(target: SpreadsheetFormatPainterRange, pattern: Pick<SpreadsheetFormatPattern, 'columnCount' | 'rowCount'>, bounds: SpreadsheetFormatPainterSheetBounds): SpreadsheetFormatPainterRange | null;
26
+ export declare function spreadsheetFormatPainterCellCount(range: SpreadsheetFormatPainterRange): number;
27
+ export declare function spreadsheetFormatPainterBatches(pattern: SpreadsheetFormatPattern, target: SpreadsheetFormatPainterRange): SpreadsheetFormatPainterBatch[];
@@ -0,0 +1,14 @@
1
+ import { type Selection } from '@fortune-sheet/core';
2
+ import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
3
+ export type SpreadsheetFreezePanePreset = 'selection' | 'topRow' | 'firstColumn' | 'none';
4
+ type SpreadsheetFrozenPane = NonNullable<WorkSpreadsheetSheet['frozen']>;
5
+ export interface SpreadsheetFreezePaneBoundary {
6
+ columns: number;
7
+ rows: number;
8
+ }
9
+ export declare function spreadsheetFreezePaneForSelection(selection: Selection): SpreadsheetFrozenPane | null;
10
+ export declare function spreadsheetFreezePanesSelectionLabel(selection: Selection): string;
11
+ export declare function spreadsheetFreezePaneBoundary(frozen: WorkSpreadsheetSheet['frozen']): SpreadsheetFreezePaneBoundary;
12
+ export declare function spreadsheetFreezePanesStatus(frozen: WorkSpreadsheetSheet['frozen']): string;
13
+ export declare function updateSpreadsheetFreezePanes(content: WorkSpreadsheetContent, sheetId: string, preset: SpreadsheetFreezePanePreset, selection: Selection): WorkSpreadsheetContent | null;
14
+ export {};
@@ -1,7 +1,7 @@
1
1
  import type { Editor } from '@tiptap/core';
2
2
  import { type MutableRefObject, type ReactNode } from 'react';
3
3
  import type { WorkDocumentCaptionKind } from '../work-document-captions';
4
- import type { WorkDocumentFieldKind } from '../work-document-fields';
4
+ import type { WorkDocumentFieldContextResolver, WorkDocumentFieldKind } from '../work-document-fields';
5
5
  import type { WorkDocumentNoteKind } from '../work-document-notes';
6
6
  import type { WorkDocumentContent } from '../work-types';
7
7
  export interface DocumentInsertCommands {
@@ -13,7 +13,8 @@ export interface DocumentInsertCommands {
13
13
  insertNote: (kind: WorkDocumentNoteKind) => boolean;
14
14
  refreshFields: () => boolean;
15
15
  }
16
- export declare function useDocumentInsertCommands({ contentRef, editor, }: {
16
+ export declare function useDocumentInsertCommands({ contentRef, editor, resolveFieldContext, }: {
17
17
  contentRef: MutableRefObject<WorkDocumentContent>;
18
18
  editor: Editor | null;
19
+ resolveFieldContext?: WorkDocumentFieldContextResolver | null;
19
20
  }): DocumentInsertCommands;
@@ -1,9 +1,10 @@
1
1
  import type { Editor } from '@tiptap/core';
2
2
  import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
3
3
  import type { OfficeKernelLayoutResult, OfficeKernelPageMetrics } from '../../../kernel/office-kernel-protocol';
4
+ import type { WorkDocumentFieldContextResolver } from '../work-document-fields';
4
5
  import { type WorkDocumentLayoutFont } from '../work-document-fonts';
5
- import { type MeasuredDocumentLayoutBlock } from '../work-document-pagination';
6
6
  import { type ResolvedDocumentPageChrome } from '../work-document-page-chrome';
7
+ import { type MeasuredDocumentLayoutBlock } from '../work-document-pagination';
7
8
  import type { WorkDocumentSectionLayout } from '../work-types';
8
9
  export interface DocumentPaginationResult {
9
10
  layout: OfficeKernelLayoutResult;
@@ -22,6 +23,7 @@ export interface DocumentPaginationPageDescriptor {
22
23
  sectionIndex: number;
23
24
  layout: WorkDocumentSectionLayout;
24
25
  pageChrome: ResolvedDocumentPageChrome;
26
+ page: OfficeKernelPageMetrics;
25
27
  }
26
28
  export interface DocumentPaginationPageDescriptorDerivation {
27
29
  pages: DocumentPaginationPageDescriptor[];
@@ -45,8 +47,11 @@ export interface UseDocumentPaginationValue {
45
47
  pageCount: number | null;
46
48
  pages: readonly DocumentPaginationPageDescriptor[];
47
49
  paginating: boolean;
50
+ resolveFieldContext: WorkDocumentFieldContextResolver | null;
48
51
  }
49
52
  export declare function useDocumentPagination({ editor, documentRevision, enabled, layoutKey, page, selectionVersion, wasmUrl, layoutFonts, loadedLayoutFontIds, }: UseDocumentPaginationOptions): UseDocumentPaginationValue;
53
+ export declare function createDocumentFieldPaginationContextResolver(pagination: DocumentPaginationResult): WorkDocumentFieldContextResolver;
54
+ export declare function documentResizeObservationPositions(blocks: readonly MeasuredDocumentLayoutBlock[]): ReadonlyMap<HTMLElement, number>;
50
55
  export declare function documentPaginationPageDescriptors(layout: OfficeKernelLayoutResult, blocks: readonly MeasuredDocumentLayoutBlock[], documentNode?: ProseMirrorNode): DocumentPaginationPageDescriptor[];
51
56
  export declare function deriveDocumentPaginationPageDescriptors(layout: OfficeKernelLayoutResult, blocks: readonly MeasuredDocumentLayoutBlock[], documentNode?: ProseMirrorNode, previousPages?: readonly DocumentPaginationPageDescriptor[], requestedReusedPageCount?: number): DocumentPaginationPageDescriptorDerivation;
52
57
  export declare function pageForPosition(pagination: DocumentPaginationResult, position: number): number;
@@ -0,0 +1,28 @@
1
+ import type { Editor } from '@tiptap/core';
2
+ import type { WorkDocumentEditorInput } from '../work-document-model';
3
+ import { type WorkDocumentReviewConflict, type WorkDocumentReviewConflictEvent } from '../work-document-review-conflicts';
4
+ import type { WorkDocumentContent } from '../work-types';
5
+ interface MutableValue<T> {
6
+ current: T;
7
+ }
8
+ export interface UseDocumentReviewConflictsOptions {
9
+ activeConflictsRef: MutableValue<WorkDocumentReviewConflict[]>;
10
+ appliedSourceKeyRef: MutableValue<string>;
11
+ artifactId?: string;
12
+ content: WorkDocumentContent;
13
+ editor: Editor | null;
14
+ editorInput: WorkDocumentEditorInput;
15
+ normalizedContent: string;
16
+ onReviewConflict?: (event: WorkDocumentReviewConflictEvent) => void;
17
+ publishedDocumentRef: MutableValue<Editor['state']['doc'] | null>;
18
+ reconcileControlledUpdates?: boolean;
19
+ }
20
+ export declare function useDocumentReviewConflicts({ activeConflictsRef, appliedSourceKeyRef, artifactId, content, editor, editorInput, normalizedContent, onReviewConflict, publishedDocumentRef, reconcileControlledUpdates, }: UseDocumentReviewConflictsOptions): {
21
+ dismiss: () => void;
22
+ visibleConflicts: WorkDocumentReviewConflict[];
23
+ };
24
+ export declare function DocumentReviewConflictNotice({ conflicts, onDismiss, }: {
25
+ conflicts: readonly WorkDocumentReviewConflict[];
26
+ onDismiss: () => void;
27
+ }): import("react").JSX.Element | null;
28
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { Selection } from '@fortune-sheet/core';
2
+ import { type RefObject } from 'react';
3
+ import type { WorkSpreadsheetContent } from '../work-types';
4
+ import type { SpreadsheetAutoFilterCommandPort, SpreadsheetWorkbookCommandPort } from './spreadsheet-command-controller';
5
+ export interface UseSpreadsheetAutoFilterOptions {
6
+ canvasRef: RefObject<HTMLElement | null>;
7
+ content: WorkSpreadsheetContent;
8
+ editable: boolean;
9
+ mountRevision?: number;
10
+ onChange: (content: WorkSpreadsheetContent) => void;
11
+ selection: Selection;
12
+ sheetId: string;
13
+ workbook?: Pick<SpreadsheetWorkbookCommandPort, 'getSelection'> | null;
14
+ }
15
+ export interface SpreadsheetAutoFilterController {
16
+ active: boolean;
17
+ commandPort: SpreadsheetAutoFilterCommandPort;
18
+ reserveAltKey: () => boolean;
19
+ status: string;
20
+ }
21
+ export declare function useSpreadsheetAutoFilter({ canvasRef, content, editable, mountRevision, onChange, selection, sheetId, workbook, }: UseSpreadsheetAutoFilterOptions): SpreadsheetAutoFilterController;
@@ -0,0 +1,27 @@
1
+ import type { Selection } from '@fortune-sheet/core';
2
+ import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
3
+ import type { WorkSpreadsheetContent } from '../work-types';
4
+ export interface SpreadsheetCollaborationHistory {
5
+ canRedo: boolean;
6
+ canUndo: boolean;
7
+ redo: () => boolean;
8
+ undo: () => boolean;
9
+ }
10
+ export interface SpreadsheetCollaborationViewController {
11
+ activateSheet: (sheetId: string) => void;
12
+ select: (sheetId: string, selection: Selection) => void;
13
+ setZoom: (sheetId: string, zoomRatio: number) => void;
14
+ }
15
+ interface UseSpreadsheetCollaborationOptions {
16
+ initialContent: WorkSpreadsheetContent;
17
+ onChange: (content: WorkSpreadsheetContent) => void;
18
+ session: WorkOfficeCollaborationSession;
19
+ }
20
+ export declare function useSpreadsheetCollaboration({ initialContent, onChange, session, }: UseSpreadsheetCollaborationOptions): {
21
+ content: WorkSpreadsheetContent;
22
+ history: SpreadsheetCollaborationHistory;
23
+ onChange: (next: WorkSpreadsheetContent) => void;
24
+ readOnly: boolean;
25
+ view: SpreadsheetCollaborationViewController;
26
+ };
27
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { WorkSpreadsheetContent } from '../work-types';
2
+ import type { SpreadsheetCommandRange, SpreadsheetFormatPainterCommandPort, SpreadsheetWorkbookCommandPort } from './spreadsheet-command-controller';
3
+ import { type SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
4
+ export type { SpreadsheetFormatPainterMode } from './spreadsheet-format-painter';
5
+ export declare const spreadsheetFormatPainterMaximumCells = 50000;
6
+ export interface UseSpreadsheetFormatPainterOptions {
7
+ content: WorkSpreadsheetContent;
8
+ editable: boolean;
9
+ onError: (message: string) => void;
10
+ sourceRange: SpreadsheetCommandRange;
11
+ sourceSheetId: string;
12
+ workbook: SpreadsheetWorkbookCommandPort | null;
13
+ }
14
+ export interface SpreadsheetFormatPainterController {
15
+ commandPort: SpreadsheetFormatPainterCommandPort;
16
+ mode: SpreadsheetFormatPainterMode | null;
17
+ }
18
+ export declare function useSpreadsheetFormatPainter({ content, editable, onError, sourceRange, sourceSheetId, workbook, }: UseSpreadsheetFormatPainterOptions): SpreadsheetFormatPainterController;
@@ -3,6 +3,7 @@ export interface WorkOfficeRibbonTab<T extends string> {
3
3
  id: T;
4
4
  label: string;
5
5
  compactLabel?: string;
6
+ contextual?: boolean;
6
7
  }
7
8
  export interface WorkOfficeFileAction {
8
9
  id: string;
@@ -13,7 +14,16 @@ export interface WorkOfficeFileAction {
13
14
  separatorBefore?: boolean;
14
15
  onSelect: () => void | Promise<void>;
15
16
  }
16
- export declare function WorkOfficeRibbon<T extends string>({ ariaLabel, tabs, defaultTab, activeTab, onTabChange, panels, fileActions, className, toolbarClassName, }: {
17
+ export interface WorkOfficeQuickAccessAction {
18
+ id: string;
19
+ label: string;
20
+ icon: ReactNode;
21
+ shortcut?: string;
22
+ ariaKeyShortcuts?: string;
23
+ disabled?: boolean;
24
+ onSelect: () => void | Promise<void>;
25
+ }
26
+ export declare function WorkOfficeRibbon<T extends string>({ ariaLabel, tabs, defaultTab, activeTab, onTabChange, panels, fileActions, quickAccessActions, adaptive, collapsible, collapsed: controlledCollapsed, defaultCollapsed, onCollapsedChange, className, toolbarClassName, }: {
17
27
  ariaLabel: string;
18
28
  tabs: readonly WorkOfficeRibbonTab<T>[];
19
29
  defaultTab: T;
@@ -21,6 +31,12 @@ export declare function WorkOfficeRibbon<T extends string>({ ariaLabel, tabs, de
21
31
  onTabChange?: (tab: T) => void;
22
32
  panels: Record<T, ReactNode>;
23
33
  fileActions?: readonly WorkOfficeFileAction[];
34
+ quickAccessActions?: readonly WorkOfficeQuickAccessAction[];
35
+ adaptive?: boolean;
36
+ collapsible?: boolean;
37
+ collapsed?: boolean;
38
+ defaultCollapsed?: boolean;
39
+ onCollapsedChange?: (collapsed: boolean) => void;
24
40
  className?: string;
25
41
  toolbarClassName?: string;
26
42
  }): import("react").JSX.Element;
@@ -31,8 +47,9 @@ export declare function WorkOfficePreviewBar({ ariaLabel, label, detail, fileAct
31
47
  fileActions?: readonly WorkOfficeFileAction[];
32
48
  className?: string;
33
49
  }): import("react").JSX.Element;
34
- export declare function WorkOfficeRibbonGroup({ label, children, }: {
50
+ export declare function WorkOfficeRibbonGroup({ label, priority, children, }: {
35
51
  label: string;
52
+ priority?: 'high' | 'normal' | 'low';
36
53
  children: ReactNode;
37
54
  }): import("react").JSX.Element;
38
55
  export declare function WorkOfficeRibbonButton({ label, visibleLabel, badge, active, displayLabel, className, title, children, ...props }: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'children'> & {
@@ -43,9 +60,11 @@ export declare function WorkOfficeRibbonButton({ label, visibleLabel, badge, act
43
60
  displayLabel?: boolean;
44
61
  children: ReactNode;
45
62
  }): import("react").JSX.Element;
46
- export declare function WorkOfficeStatusBar({ children, controls, className, }: {
63
+ export declare function WorkOfficeStatusBar({ ariaLabel, children, controls, controlsLabel, className, }: {
64
+ ariaLabel?: string;
47
65
  children: ReactNode;
48
66
  controls?: ReactNode;
67
+ controlsLabel?: string;
49
68
  className?: string;
50
69
  }): import("react").JSX.Element;
51
70
  export declare function WorkOfficeZoomControls({ zoom, minimum, maximum, step, decreaseLabel, increaseLabel, outputLabel, sliderLabel, onChange, }: {
@@ -1,4 +1,6 @@
1
1
  export declare const WORK_OFFICE_RIBBON_SCROLL_INSET = 34;
2
+ export type WorkOfficeRibbonDensity = 'comfortable' | 'compact-low' | 'compact-normal';
3
+ export declare function calculateRibbonDensity(clientWidth: number): WorkOfficeRibbonDensity;
2
4
  export interface WorkOfficeRibbonItemGeometry {
3
5
  left: number;
4
6
  right: number;
@@ -0,0 +1,37 @@
1
+ import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ import type { EditorState, Transaction } from '@tiptap/pm/state';
3
+ export interface WorkDocumentBookmarkReferenceTarget {
4
+ type: 'bookmark';
5
+ id: string;
6
+ name: string;
7
+ title: string;
8
+ display: string;
9
+ instruction: string;
10
+ }
11
+ export interface WorkDocumentBookmarkReferenceRange {
12
+ id: string;
13
+ name: string;
14
+ from: number;
15
+ to: number;
16
+ }
17
+ export interface WorkDocumentBookmarkReferenceRename {
18
+ from: number;
19
+ to: number;
20
+ previousId: string;
21
+ nextId: string;
22
+ previousName: string;
23
+ nextName: string;
24
+ }
25
+ export declare function docxBookmarkReferenceTarget(instruction: string): string | null;
26
+ export declare function supportedDocxBookmarkReferenceInstruction(instruction: string): boolean;
27
+ export declare function documentBookmarkReferenceInstruction(name: string, source?: string): string;
28
+ export declare function documentBookmarkReferenceDisplay(document: ProseMirrorNode, bookmark: Pick<WorkDocumentBookmarkReferenceRange, 'from' | 'to' | 'name'>): string;
29
+ export declare function synchronizeDocumentBookmarkReferenceNodes(state: EditorState, transaction: Transaction, bookmarks: readonly WorkDocumentBookmarkReferenceRange[], renames: readonly WorkDocumentBookmarkReferenceRename[]): void;
30
+ export declare function normalizeDocumentBookmarkReferencesHtml(source: string): string;
31
+ export declare function retargetDomBookmarkReferences(root: HTMLElement, start: HTMLElement, end: HTMLElement, previous: {
32
+ id: string;
33
+ name: string;
34
+ }, next: {
35
+ id: string;
36
+ name: string;
37
+ }): void;
@@ -0,0 +1,29 @@
1
+ import { type Editor, Node } from '@tiptap/core';
2
+ import { type WorkDocumentBookmarkReferenceTarget } from './work-document-bookmark-references';
3
+ export type WorkDocumentBookmarkBoundaryKind = 'start' | 'end';
4
+ export interface WorkDocumentBookmark {
5
+ id: string;
6
+ name: string;
7
+ nativeId: number;
8
+ from: number;
9
+ to: number;
10
+ }
11
+ export declare const DOCUMENT_BOOKMARK_VALIDATION_MESSAGE = "\u4E66\u7B7E\u540D\u79F0\u9700\u4EE5\u5B57\u6BCD\u5F00\u5934\uFF0C\u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u4E0B\u5212\u7EBF\uFF0C\u4E14\u4E0D\u8D85\u8FC7 40 \u4E2A\u5B57\u7B26\u3002";
12
+ export declare const DOCUMENT_BOOKMARK_DUPLICATE_MESSAGE = "\u6587\u6863\u4E2D\u5DF2\u5B58\u5728\u540C\u540D\u4E66\u7B7E\u3002";
13
+ declare module '@tiptap/core' {
14
+ interface Commands<ReturnType> {
15
+ documentBookmark: {
16
+ insertDocumentBookmark: (name: string) => ReturnType;
17
+ deleteDocumentBookmark: (id: string) => ReturnType;
18
+ };
19
+ }
20
+ }
21
+ export declare const DocumentBookmarkBoundary: Node<any, any>;
22
+ export declare function validateDocumentBookmarkName(value: string): string | null;
23
+ export declare function normalizeDocumentBookmarkName(value: unknown): string | null;
24
+ export declare function normalizeDocumentBookmarkNativeId(value: unknown): number | null;
25
+ export declare function editorDocumentBookmarks(editor: Editor): WorkDocumentBookmark[];
26
+ export declare function editorDocumentBookmarkReferenceTargets(editor: Editor): WorkDocumentBookmarkReferenceTarget[];
27
+ export declare function activeDocumentBookmark(editor: Editor): WorkDocumentBookmark | null;
28
+ export declare function documentBookmarkNameExists(editor: Editor, value: string, exceptId?: string): boolean;
29
+ export declare function normalizeDocumentBookmarksHtml(source: string): string;
@@ -1,13 +1,16 @@
1
1
  import { type Editor, Node } from '@tiptap/core';
2
+ import type { WorkDocumentBookmarkReferenceTarget } from './work-document-bookmark-references';
2
3
  import { type WorkDocumentCaptionKind, type WorkDocumentCaptionTarget } from './work-document-captions';
4
+ type WorkDocumentCrossReferenceTarget = WorkDocumentCaptionTarget | WorkDocumentBookmarkReferenceTarget;
3
5
  declare module '@tiptap/core' {
4
6
  interface Commands<ReturnType> {
5
7
  documentCaption: {
6
8
  insertDocumentCaption: (kind: WorkDocumentCaptionKind, title: string) => ReturnType;
7
- insertDocumentCrossReference: (target: WorkDocumentCaptionTarget) => ReturnType;
9
+ insertDocumentCrossReference: (target: WorkDocumentCrossReferenceTarget) => ReturnType;
8
10
  };
9
11
  }
10
12
  }
11
13
  export declare const DocumentCaption: Node<any, any>;
12
14
  export declare const DocumentCrossReference: Node<any, any>;
13
15
  export declare function editorDocumentCaptionTargets(editor: Editor): WorkDocumentCaptionTarget[];
16
+ export {};
@@ -40,7 +40,7 @@ export declare function canInsertDocumentComment(editor: Editor, range?: WorkDoc
40
40
  export declare function documentCommentDraftRange(editor: Editor): WorkDocumentCommentRange | null;
41
41
  export declare function collectDocumentCommentAnchors(document: ProseMirrorNode): WorkDocumentCommentAnchor[];
42
42
  export declare function documentCommentViews(comments: readonly WorkDocumentComment[], anchors: readonly WorkDocumentCommentAnchor[]): WorkDocumentCommentView[];
43
- export declare function retainAnchoredDocumentComments(comments: readonly WorkDocumentComment[], anchors: readonly WorkDocumentCommentAnchor[]): WorkDocumentComment[];
43
+ export declare function retainAnchoredDocumentComments(comments: readonly WorkDocumentComment[], anchors: readonly WorkDocumentCommentAnchor[], retainedIds?: ReadonlySet<string>): WorkDocumentComment[];
44
44
  export declare function appendDocumentCommentReply(comments: readonly WorkDocumentComment[], id: string, reply: WorkDocumentCommentReply): WorkDocumentComment[];
45
45
  export declare function toggleDocumentCommentResolved(comments: readonly WorkDocumentComment[], id: string): WorkDocumentComment[];
46
46
  export declare function removeDocumentCommentRecord(comments: readonly WorkDocumentComment[], id: string): WorkDocumentComment[];