@a3s-lab/office 0.25.0 → 0.27.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 (93) hide show
  1. package/README.md +76 -2
  2. package/dist/0~4595.js +16 -2
  3. package/dist/0~5093.js +463 -201
  4. package/dist/0~6090.js +77 -77
  5. package/dist/{0~2805.js → 0~7043.js} +305 -2
  6. package/dist/0~document-editor.js +2451 -985
  7. package/dist/0~spreadsheet-editor.js +22113 -20117
  8. package/dist/0~work-docx-export.js +492 -10
  9. package/dist/0~work-docx-import.js +171 -98
  10. package/dist/0~work-office-diagnostics.js +198 -4
  11. package/dist/{164.js → 1544.js} +1412 -1055
  12. package/dist/4104.js +145 -29
  13. package/dist/6282.js +1920 -544
  14. package/dist/9424.js +16 -0
  15. package/dist/core.js +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/internal/features/work/editors/document-command-catalog.d.ts +102 -0
  18. package/dist/internal/features/work/editors/document-font-dialog-model.d.ts +83 -0
  19. package/dist/internal/features/work/editors/document-font-dialog-script-font-model.d.ts +18 -0
  20. package/dist/internal/features/work/editors/document-font-dialog.d.ts +9 -0
  21. package/dist/internal/features/work/editors/document-home-ribbon.d.ts +2 -1
  22. package/dist/internal/features/work/editors/document-page-chrome-editor.d.ts +6 -0
  23. package/dist/internal/features/work/editors/document-page-chrome-ribbon.d.ts +2 -1
  24. package/dist/internal/features/work/editors/document-strike-ribbon.d.ts +7 -0
  25. package/dist/internal/features/work/editors/document-text-case-ribbon.d.ts +4 -0
  26. package/dist/internal/features/work/editors/document-toolbar.d.ts +3 -1
  27. package/dist/internal/features/work/editors/document-underline-ribbon.d.ts +9 -0
  28. package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +1 -0
  29. package/dist/internal/features/work/editors/spreadsheet-cell-fill-format.d.ts +11 -0
  30. package/dist/internal/features/work/editors/spreadsheet-cell-format.d.ts +2 -1
  31. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +18 -9
  32. package/dist/internal/features/work/editors/spreadsheet-format-cells-dialog-model.d.ts +13 -2
  33. package/dist/internal/features/work/editors/spreadsheet-format-cells-fill-panel.d.ts +13 -0
  34. package/dist/internal/features/work/editors/spreadsheet-format-cells-fill-preview.d.ts +6 -0
  35. package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +1 -1
  36. package/dist/internal/features/work/editors/spreadsheet-operation-projection.d.ts +6 -0
  37. package/dist/internal/features/work/editors/spreadsheet-rich-text-dom-selection.d.ts +11 -0
  38. package/dist/internal/features/work/editors/spreadsheet-rich-text-paste.d.ts +22 -0
  39. package/dist/internal/features/work/editors/spreadsheet-rich-text-selection-controller.d.ts +38 -0
  40. package/dist/internal/features/work/editors/spreadsheet-rich-text-selection-format.d.ts +26 -0
  41. package/dist/internal/features/work/editors/work-office-chrome.d.ts +9 -1
  42. package/dist/internal/features/work/work-css-color.d.ts +1 -0
  43. package/dist/internal/features/work/work-document-character-formatting.d.ts +16 -1
  44. package/dist/internal/features/work/work-document-character-position.d.ts +9 -0
  45. package/dist/internal/features/work/work-document-character-scale.d.ts +8 -0
  46. package/dist/internal/features/work/work-document-character-spacing.d.ts +8 -0
  47. package/dist/internal/features/work/work-document-emphasis.d.ts +7 -0
  48. package/dist/internal/features/work/work-document-equations.d.ts +2 -1
  49. package/dist/internal/features/work/work-document-format-changes.d.ts +16 -2
  50. package/dist/internal/features/work/work-document-hidden-text.d.ts +5 -0
  51. package/dist/internal/features/work/work-document-kerning.d.ts +10 -0
  52. package/dist/internal/features/work/work-document-paragraph-shading.d.ts +1 -1
  53. package/dist/internal/features/work/work-document-script-font-extension.d.ts +2 -0
  54. package/dist/internal/features/work/work-document-script-fonts.d.ts +51 -0
  55. package/dist/internal/features/work/work-document-strike.d.ts +21 -0
  56. package/dist/internal/features/work/work-document-text-case.d.ts +10 -0
  57. package/dist/internal/features/work/work-document-underline.d.ts +37 -0
  58. package/dist/internal/features/work/work-document-word-line-metrics.d.ts +12 -0
  59. package/dist/internal/features/work/work-docx-character-position.d.ts +2 -0
  60. package/dist/internal/features/work/work-docx-character-scale.d.ts +2 -0
  61. package/dist/internal/features/work/work-docx-character-spacing.d.ts +4 -0
  62. package/dist/internal/features/work/work-docx-emphasis-diagnostics.d.ts +3 -0
  63. package/dist/internal/features/work/work-docx-emphasis.d.ts +14 -0
  64. package/dist/internal/features/work/work-docx-hidden-text-diagnostics.d.ts +3 -0
  65. package/dist/internal/features/work/work-docx-hidden-text-export.d.ts +16 -0
  66. package/dist/internal/features/work/work-docx-hidden-text.d.ts +11 -0
  67. package/dist/internal/features/work/work-docx-kerning-diagnostics.d.ts +3 -0
  68. package/dist/internal/features/work/work-docx-kerning.d.ts +14 -0
  69. package/dist/internal/features/work/work-docx-run-fonts-diagnostics.d.ts +3 -0
  70. package/dist/internal/features/work/work-docx-run-fonts-export.d.ts +14 -0
  71. package/dist/internal/features/work/work-docx-run-fonts.d.ts +13 -0
  72. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +23 -2
  73. package/dist/internal/features/work/work-docx-run-script-font-import.d.ts +9 -0
  74. package/dist/internal/features/work/work-docx-strike.d.ts +8 -0
  75. package/dist/internal/features/work/work-docx-theme-reference.d.ts +1 -1
  76. package/dist/internal/features/work/work-docx-twips.d.ts +6 -0
  77. package/dist/internal/features/work/work-docx-underline.d.ts +3 -0
  78. package/dist/internal/features/work/work-spreadsheet-gradient-fill-canvas.d.ts +10 -0
  79. package/dist/internal/features/work/work-spreadsheet-native-fill-canvas.d.ts +8 -0
  80. package/dist/internal/features/work/work-spreadsheet-pattern-fill-canvas.d.ts +8 -0
  81. package/dist/internal/features/work/work-xlsx-cell-style-origin.d.ts +2 -1
  82. package/dist/internal/features/work/work-xlsx-cell-style-writer.d.ts +3 -0
  83. package/dist/internal/features/work/work-xlsx-cell-styles.d.ts +4 -0
  84. package/dist/internal/features/work/work-xlsx-gradient-fill.d.ts +31 -0
  85. package/dist/internal/features/work/work-xlsx-native-fill.d.ts +17 -0
  86. package/dist/internal/features/work/work-xlsx-pattern-fill.d.ts +21 -0
  87. package/dist/internal/features/work/work-xlsx-rich-text-edit.d.ts +28 -0
  88. package/dist/internal/features/work/work-xlsx-rich-text-model.d.ts +40 -0
  89. package/dist/internal/features/work/work-xlsx-rich-text.d.ts +4 -18
  90. package/dist/office-kernel.wasm +0 -0
  91. package/dist/styles.css +770 -80
  92. package/docs/latest/en/browser-editor-architecture.md +37 -0
  93. package/package.json +32 -1
@@ -319,6 +319,33 @@ materialization. Fortune row/column operations are reconciled back into table
319
319
  ranges, column identities, filter offsets, and canonical header cells, while
320
320
  merge and worksheet AutoFilter commands reject intersecting ownership.
321
321
 
322
+ Native XLSX rich-text editing is reconciled at the controlled Fortune boundary,
323
+ not inside the rendering engine. A pure model normalizes at most 512 runs and
324
+ 32,767 UTF-16 code units, derives one contiguous replacement, uses binary run
325
+ lookup for inherited styles, and coalesces only semantically identical adjacent
326
+ runs. Authenticated `data[row][column]` operations permit text changes at exact
327
+ coordinates. In the full-projection compatibility path, a non-structural batch
328
+ without a cell coordinate may restore prior runs only when the visible text is
329
+ exactly unchanged; structural operations disable coordinate inference. This
330
+ keeps formula-bar and F2 commits to one host revision and one Undo record while
331
+ discarding Fortune focus callbacks that merely flatten or strip run metadata.
332
+
333
+ Formatted paste adds a separate one-shot authority instead of trusting live
334
+ DOM markup. A paste event in the formula bar or F2 editor records the exact
335
+ sheet object, coordinate, controlled source text, UTF-16 selection, sanitized
336
+ clipboard runs, and plain text before the browser mutates the editor. The
337
+ incremental and full projection paths may consume that authority only when an
338
+ authenticated cell operation emits the exact predicted replacement. Prefix
339
+ and suffix runs always come from the controlled source; only the inserted
340
+ range may use clipboard font family, point size, RGB color, bold, italic,
341
+ strikethrough, or underline. This also converts eligible plain or empty cells
342
+ to native inline strings without granting structural callbacks a coordinate.
343
+ The parser never retains clipboard HTML, ignores active/non-content elements,
344
+ and rejects mismatched text, invalid UTF-16, more than 256,000 HTML characters,
345
+ 32,767 cell characters, or 512 resulting runs. Imported semantic color
346
+ identities remain attached to untouched runs; pasted colors are explicit RGB
347
+ unless a future package-level source can prove a native palette identity.
348
+
322
349
  The table is a fidelity statement, not a marketing capability list. The
323
350
  current Document path shapes text-flow paragraphs in Rust/WASM when every
324
351
  explicit CSS family resolves to an exact registered face. Each run may carry up
@@ -648,6 +675,16 @@ explicit hard breaks so gradual typing and multiline paste cannot overflow a
648
675
  physical sheet as one atomic block. The Worker/WASM kernel chooses page
649
676
  breaks, keeps a minimum number of line fragments on either side of a break,
650
677
  and returns mapped decorations.
678
+
679
+ Native hidden text is resolved before layout eligibility is chosen. The
680
+ canonical TipTap mark keeps inherited, hidden, and explicit-visible states;
681
+ DOM paint hides `data-office-hidden-text="true"` by default, while the
682
+ editing-only View mode reveals it with a dotted underline. Preview and detached
683
+ PDF snapshots never inherit that view class. A paragraph containing hidden text
684
+ uses browser-authoritative measurement because its invisible run must not
685
+ contribute Worker/WASM advances. This is an explicit per-paragraph fallback,
686
+ not a second document tree or a second pagination model.
687
+
651
688
  Tables, images, code blocks, and other complex content use explicit
652
689
  format-specific measurement. Top-level tables are row flows; eligible rows can
653
690
  additionally expose synchronized direct-cell block fragments. Ordered and bullet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",
@@ -87,6 +87,14 @@
87
87
  "playground:preview": "rsbuild preview --config playground/rsbuild.config.ts --host 127.0.0.1 --port 4175 --strict-port",
88
88
  "playground:typecheck": "tsc --noEmit -p playground/tsconfig.json",
89
89
  "playground:visual": "playwright test --config playwright.config.ts",
90
+ "playground:visual:document-emphasis": "playwright test visual-tests/document-emphasis.functional.spec.ts --config playwright.config.ts",
91
+ "playground:visual:document-hidden-text": "playwright test visual-tests/document-hidden-text.functional.spec.ts --config playwright.config.ts",
92
+ "playground:visual:document-kerning": "playwright test visual-tests/document-kerning.functional.spec.ts --config playwright.config.ts",
93
+ "playground:visual:document-character-scale": "playwright test visual-tests/document-character-scale.functional.spec.ts --config playwright.config.ts",
94
+ "playground:visual:document-character-position": "playwright test visual-tests/document-character-position.functional.spec.ts --config playwright.config.ts",
95
+ "playground:visual:document-character-spacing": "playwright test visual-tests/document-character-spacing.functional.spec.ts --config playwright.config.ts",
96
+ "playground:visual:document-script-fonts": "playwright test visual-tests/document-script-fonts.functional.spec.ts --config playwright.config.ts",
97
+ "playground:visual:document-strike": "playwright test visual-tests/document-strike.functional.spec.ts --config playwright.config.ts",
90
98
  "playground:visual:spreadsheet-data-validation": "playwright test visual-tests/spreadsheet-data-validation.functional.spec.ts --config playwright.config.ts",
91
99
  "playground:visual:spreadsheet-date-time": "playwright test visual-tests/spreadsheet-date-time.functional.spec.ts --config playwright.config.ts",
92
100
  "playground:visual:spreadsheet-copy-from-above": "playwright test visual-tests/spreadsheet-copy-from-above.functional.spec.ts --config playwright.config.ts",
@@ -94,6 +102,8 @@
94
102
  "playground:visual:spreadsheet-diagonal-borders": "playwright test visual-tests/spreadsheet-diagonal-borders.functional.spec.ts --config playwright.config.ts",
95
103
  "playground:visual:spreadsheet-font-colors-shortcuts": "playwright test visual-tests/spreadsheet-font-colors-shortcuts.functional.spec.ts --config playwright.config.ts",
96
104
  "playground:visual:spreadsheet-hyperlink": "playwright test visual-tests/spreadsheet-hyperlink.functional.spec.ts --config playwright.config.ts",
105
+ "playground:visual:spreadsheet-gradient-fill": "playwright test visual-tests/spreadsheet-gradient-fill.functional.spec.ts --config playwright.config.ts",
106
+ "playground:visual:spreadsheet-pattern-fill": "playwright test visual-tests/spreadsheet-pattern-fill.functional.spec.ts --config playwright.config.ts",
97
107
  "playground:visual:spreadsheet-ribbon": "playwright test visual-tests/spreadsheet-ribbon.functional.spec.ts --config playwright.config.ts",
98
108
  "playground:visual:spreadsheet-rich-text": "playwright test visual-tests/spreadsheet-rich-text.functional.spec.ts --config playwright.config.ts",
99
109
  "playground:visual:spreadsheet-underline": "playwright test visual-tests/spreadsheet-underline.functional.spec.ts --config playwright.config.ts",
@@ -158,6 +168,10 @@
158
168
  "test:e2e:spreadsheet-auto-sum:check": "a3s-test check tests/e2e/spreadsheet-auto-sum.acl --json",
159
169
  "test:e2e:spreadsheet-paste-special": "a3s-test run tests/e2e/spreadsheet-paste-special.acl --json",
160
170
  "test:e2e:spreadsheet-paste-special:check": "a3s-test check tests/e2e/spreadsheet-paste-special.acl --json",
171
+ "test:e2e:spreadsheet-pattern-fill": "A3S_TEST_SUITE=tests/e2e/spreadsheet-pattern-fill.acl bash scripts/run-a3s-test-web-gate.sh",
172
+ "test:e2e:spreadsheet-pattern-fill:check": "a3s-test check tests/e2e/spreadsheet-pattern-fill.acl --json",
173
+ "test:e2e:spreadsheet-gradient-fill": "A3S_TEST_SUITE=tests/e2e/spreadsheet-gradient-fill.acl bash scripts/run-a3s-test-web-gate.sh",
174
+ "test:e2e:spreadsheet-gradient-fill:check": "a3s-test check tests/e2e/spreadsheet-gradient-fill.acl --json",
161
175
  "test:e2e:spreadsheet-go-to": "a3s-test run tests/e2e/spreadsheet-go-to.acl --json",
162
176
  "test:e2e:spreadsheet-go-to:check": "a3s-test check tests/e2e/spreadsheet-go-to.acl --json",
163
177
  "test:e2e:spreadsheet-data-validation": "a3s-test run tests/e2e/spreadsheet-data-validation.acl --json",
@@ -180,6 +194,22 @@
180
194
  "test:e2e:spreadsheet-large:check": "a3s-test check tests/e2e/spreadsheet-large-controlled-editing.acl --json",
181
195
  "test:e2e:writer-shortcuts": "a3s-test run tests/e2e/word-wps-shortcuts.acl --json",
182
196
  "test:e2e:writer-shortcuts:check": "a3s-test check tests/e2e/word-wps-shortcuts.acl --json",
197
+ "test:e2e:writer-emphasis": "A3S_TEST_SUITE=tests/e2e/word-emphasis.acl bash scripts/run-a3s-test-web-gate.sh",
198
+ "test:e2e:writer-emphasis:check": "a3s-test check tests/e2e/word-emphasis.acl --json",
199
+ "test:e2e:writer-hidden-text": "A3S_TEST_SUITE=tests/e2e/word-hidden-text.acl bash scripts/run-a3s-test-web-gate.sh",
200
+ "test:e2e:writer-hidden-text:check": "a3s-test check tests/e2e/word-hidden-text.acl --json",
201
+ "test:e2e:writer-kerning": "A3S_TEST_SUITE=tests/e2e/word-kerning.acl bash scripts/run-a3s-test-web-gate.sh",
202
+ "test:e2e:writer-kerning:check": "a3s-test check tests/e2e/word-kerning.acl --json",
203
+ "test:e2e:writer-character-scale": "A3S_TEST_SUITE=tests/e2e/word-character-scale.acl bash scripts/run-a3s-test-web-gate.sh",
204
+ "test:e2e:writer-character-scale:check": "a3s-test check tests/e2e/word-character-scale.acl --json",
205
+ "test:e2e:writer-character-position": "A3S_TEST_SUITE=tests/e2e/word-character-position.acl bash scripts/run-a3s-test-web-gate.sh",
206
+ "test:e2e:writer-character-position:check": "a3s-test check tests/e2e/word-character-position.acl --json",
207
+ "test:e2e:writer-character-spacing": "A3S_TEST_SUITE=tests/e2e/word-character-spacing.acl bash scripts/run-a3s-test-web-gate.sh",
208
+ "test:e2e:writer-character-spacing:check": "a3s-test check tests/e2e/word-character-spacing.acl --json",
209
+ "test:e2e:writer-script-fonts": "A3S_TEST_SUITE=tests/e2e/word-script-fonts.acl bash scripts/run-a3s-test-web-gate.sh",
210
+ "test:e2e:writer-script-fonts:check": "a3s-test check tests/e2e/word-script-fonts.acl --json",
211
+ "test:e2e:writer-strike": "A3S_TEST_SUITE=tests/e2e/word-strike-styles.acl bash scripts/run-a3s-test-web-gate.sh",
212
+ "test:e2e:writer-strike:check": "a3s-test check tests/e2e/word-strike-styles.acl --json",
183
213
  "test:e2e:writer-layout": "a3s-test run tests/e2e/word-insert-page-layout.acl --json",
184
214
  "test:e2e:writer-layout:check": "a3s-test check tests/e2e/word-insert-page-layout.acl --json",
185
215
  "test:e2e:writer-review-view": "a3s-test run tests/e2e/word-review-view.acl --json",
@@ -214,6 +244,7 @@
214
244
  "@tiptap/extension-image": "3.28.0",
215
245
  "@tiptap/extension-list": "3.28.0",
216
246
  "@tiptap/extension-placeholder": "3.28.0",
247
+ "@tiptap/extension-strike": "3.28.0",
217
248
  "@tiptap/extension-subscript": "3.28.0",
218
249
  "@tiptap/extension-superscript": "3.28.0",
219
250
  "@tiptap/extension-table": "3.28.0",