@a3s-lab/office 0.12.0 → 0.13.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 (111) hide show
  1. package/README.md +99 -6
  2. package/dist/0~1403.js +20 -12
  3. package/dist/0~2805.js +241 -241
  4. package/dist/0~4980.js +1 -1
  5. package/dist/0~5050.js +1 -20
  6. package/dist/0~5093.js +547 -547
  7. package/dist/0~7048.js +31 -29
  8. package/dist/0~document-editor.js +694 -90
  9. package/dist/0~pdf-viewer.js +41 -10
  10. package/dist/0~presentation-editor.js +8 -6
  11. package/dist/0~spreadsheet-editor.js +11528 -10094
  12. package/dist/0~work-document-import-worker-client.js +237 -0
  13. package/dist/0~work-docx-export.js +1 -1
  14. package/dist/0~work-docx-import.js +1 -1
  15. package/dist/0~work-docx-large-document-import.js +559 -0
  16. package/dist/0~work-office-diagnostics.js +46 -32
  17. package/dist/4104.js +4092 -3210
  18. package/dist/432.js +51 -7
  19. package/dist/4476.js +201 -7
  20. package/dist/5184.js +24 -2
  21. package/dist/{8928.js → 6282.js} +2338 -93
  22. package/dist/8715.js +895 -888
  23. package/dist/9356.js +3 -1
  24. package/dist/core.js +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/internal/features/work/editors/document-editor-support.d.ts +1 -9
  27. package/dist/internal/features/work/editors/document-external-content.d.ts +1 -1
  28. package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +3 -1
  29. package/dist/internal/features/work/editors/presentation-slide-thumbnail.d.ts +3 -2
  30. package/dist/internal/features/work/editors/presentation-thumbnail-rail.d.ts +2 -1
  31. package/dist/internal/features/work/editors/presentation-workspace.d.ts +2 -1
  32. package/dist/internal/features/work/editors/spreadsheet-border-ribbon.d.ts +5 -0
  33. package/dist/internal/features/work/editors/spreadsheet-calculation-projection.d.ts +10 -0
  34. package/dist/internal/features/work/editors/spreadsheet-cell-border-command.d.ts +3 -0
  35. package/dist/internal/features/work/editors/spreadsheet-cell-border.d.ts +14 -0
  36. package/dist/internal/features/work/editors/spreadsheet-cell-fill-command.d.ts +3 -0
  37. package/dist/internal/features/work/editors/spreadsheet-cell-fill.d.ts +12 -0
  38. package/dist/internal/features/work/editors/spreadsheet-cell-range.d.ts +14 -0
  39. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +159 -0
  40. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +8 -4
  41. package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +8 -2
  42. package/dist/internal/features/work/editors/spreadsheet-home-format-ribbon.d.ts +10 -0
  43. package/dist/internal/features/work/editors/spreadsheet-in-place-workbook-sync.d.ts +10 -0
  44. package/dist/internal/features/work/editors/spreadsheet-operation-projection.d.ts +14 -0
  45. package/dist/internal/features/work/editors/spreadsheet-structure-selection.d.ts +7 -0
  46. package/dist/internal/features/work/editors/use-document-pagination.d.ts +5 -0
  47. package/dist/internal/features/work/editors/use-presentation-design-commands.d.ts +2 -1
  48. package/dist/internal/features/work/editors/use-spreadsheet-workbook-sync.d.ts +2 -1
  49. package/dist/internal/features/work/spreadsheet-history-value.d.ts +1 -0
  50. package/dist/internal/features/work/spreadsheet-sparse.d.ts +6 -1
  51. package/dist/internal/features/work/work-document-chunk-geometry.d.ts +28 -0
  52. package/dist/internal/features/work/work-document-chunk-node.d.ts +23 -0
  53. package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
  54. package/dist/internal/features/work/work-document-html-fingerprint.d.ts +15 -0
  55. package/dist/internal/features/work/work-document-import-worker-client.d.ts +13 -0
  56. package/dist/internal/features/work/work-document-import-worker-protocol.d.ts +36 -0
  57. package/dist/internal/features/work/work-document-import.worker.d.ts +1 -0
  58. package/dist/internal/features/work/work-document-incremental-layout.d.ts +1 -1
  59. package/dist/internal/features/work/work-document-integrity-index.d.ts +14 -0
  60. package/dist/internal/features/work/work-document-lazy-block.d.ts +3 -0
  61. package/dist/internal/features/work/work-document-lazy-html.d.ts +21 -0
  62. package/dist/internal/features/work/work-document-lazy-model.d.ts +29 -0
  63. package/dist/internal/features/work/work-document-lazy-pagination-measurement.d.ts +3 -0
  64. package/dist/internal/features/work/work-document-lazy-preview.d.ts +21 -0
  65. package/dist/internal/features/work/work-document-lazy-update.d.ts +14 -0
  66. package/dist/internal/features/work/work-document-model.d.ts +18 -2
  67. package/dist/internal/features/work/work-document-page-surface-registry.d.ts +16 -0
  68. package/dist/internal/features/work/work-document-pagination-dom.d.ts +1 -0
  69. package/dist/internal/features/work/work-document-pagination-types.d.ts +1 -0
  70. package/dist/internal/features/work/work-document-pagination.d.ts +1 -1
  71. package/dist/internal/features/work/work-document-text-statistics.d.ts +25 -0
  72. package/dist/internal/features/work/work-document-windowing.d.ts +23 -0
  73. package/dist/internal/features/work/work-docx-large-document-import.d.ts +35 -0
  74. package/dist/internal/features/work/work-docx-large-document-parser.d.ts +29 -0
  75. package/dist/internal/features/work/work-file-import.d.ts +5 -0
  76. package/dist/internal/features/work/work-file-io.d.ts +3 -3
  77. package/dist/internal/features/work/work-file-kind.d.ts +5 -0
  78. package/dist/internal/features/work/work-office-diagnostics.d.ts +10 -1
  79. package/dist/internal/features/work/work-ooxml-package.d.ts +8 -0
  80. package/dist/internal/features/work/work-presentation-layouts.d.ts +7 -1
  81. package/dist/internal/features/work/work-repository.d.ts +1 -0
  82. package/dist/internal/features/work/work-spreadsheet-compatibility-summary.d.ts +10 -0
  83. package/dist/internal/features/work/work-spreadsheet-file-export.d.ts +2 -0
  84. package/dist/internal/features/work/work-spreadsheet-file-import.d.ts +3 -0
  85. package/dist/internal/features/work/work-spreadsheet-import-diagnostics.d.ts +2 -0
  86. package/dist/internal/features/work/work-spreadsheet-import-worker-client.d.ts +6 -0
  87. package/dist/internal/features/work/work-spreadsheet-import-worker-protocol.d.ts +32 -0
  88. package/dist/internal/features/work/work-spreadsheet-import.worker.d.ts +1 -0
  89. package/dist/internal/features/work/work-spreadsheet-matrix-profile.d.ts +64 -0
  90. package/dist/internal/features/work/work-spreadsheet-package-scan-worker-client.d.ts +6 -0
  91. package/dist/internal/features/work/work-spreadsheet-package-scan-worker-protocol.d.ts +49 -0
  92. package/dist/internal/features/work/work-spreadsheet-package-scan.worker.d.ts +1 -0
  93. package/dist/internal/features/work/work-xlsx-formula-diagnostics.d.ts +3 -1
  94. package/dist/internal/features/work/work-xlsx-formulas.d.ts +2 -1
  95. package/dist/internal/features/work/work-xlsx-interop.d.ts +6 -5
  96. package/dist/internal/features/work/work-xlsx-pivot-diagnostics.d.ts +2 -1
  97. package/dist/internal/features/work/work-xlsx-plain-fast-path.d.ts +54 -0
  98. package/dist/internal/features/work/work-xlsx-style-gate.d.ts +1 -0
  99. package/dist/internal/features/work/work-xlsx-worksheet-scan.d.ts +12 -0
  100. package/dist/internal/features/work/work-xlsx-worksheet.d.ts +12 -0
  101. package/dist/office-kernel.wasm +0 -0
  102. package/dist/office-kernel.worker.js +31 -29
  103. package/dist/react.d.ts +7 -1
  104. package/dist/styles.css +440 -3
  105. package/dist/work-document-import.worker.js +558 -0
  106. package/dist/work-spreadsheet-import.worker.js +24745 -0
  107. package/dist/work-spreadsheet-import.worker.js.LICENSE.txt +3 -0
  108. package/dist/work-spreadsheet-package-scan.worker.js +4157 -0
  109. package/dist/work-spreadsheet-package-scan.worker.js.LICENSE.txt +11 -0
  110. package/docs/latest/en/browser-editor-architecture.md +351 -15
  111. package/package.json +19 -1
@@ -0,0 +1,11 @@
1
+ /*!
2
+
3
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
4
+ <http://stuartk.com/jszip>
5
+
6
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
7
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
8
+
9
+ JSZip uses the library pako released under the MIT license :
10
+ https://github.com/nodeca/pako/blob/main/LICENSE
11
+ */
@@ -9,7 +9,7 @@ grid, slide canvas, or PDF page.
9
9
 
10
10
  | Product | Interaction surface | TipTap responsibility | Kernel responsibility |
11
11
  | --- | --- | --- | --- |
12
- | Document | TipTap and ProseMirror | Complete logical document, selection, commands, history, comments, and collaboration boundary | Page layout, style and font resolution, OOXML semantics, and serialization |
12
+ | Document | TipTap and ProseMirror | Canonical structured model plus an equal-position lazy live tree for eligible giant DOCX files; selection, commands, history, comments, and collaboration boundary | Page layout, style and font resolution, OOXML semantics, and serialization |
13
13
  | Spreadsheet | Virtualized grid and canvas | Rich text inside a cell or floating text object | Formula calculation, workbook semantics, print layout, OOXML, and serialization |
14
14
  | Presentation | Scene graph and slide canvas | Text inside an individual text box | Masters, layouts, themes, object geometry, OOXML, and serialization |
15
15
  | PDF | PDFium page surface | None | PDF parsing, rendering, annotation serialization, and document save |
@@ -17,6 +17,15 @@ grid, slide canvas, or PDF page.
17
17
  This separation prevents an editor framework from becoming a false abstraction
18
18
  over products with different selection, layout, and performance requirements.
19
19
 
20
+ TipTap and ProseMirror are not competing choices in this stack. TipTap owns the
21
+ extension, command, schema, React integration, and public customization layer;
22
+ ProseMirror is the model and view engine underneath it. Ordinary document
23
+ features stay at the TipTap layer. Position-sensitive infrastructure such as
24
+ pagination decorations, transaction mapping, collaboration bindings, and
25
+ large-document NodeViews uses ProseMirror primitives through TipTap extensions
26
+ because those primitives expose the exact model positions and view lifecycle
27
+ that the higher-level API intentionally abstracts.
28
+
20
29
  ## Shared platform layers
21
30
 
22
31
  The products share infrastructure without sharing a false universal document
@@ -280,7 +289,7 @@ focus restoration.
280
289
  | --- | --- | --- | --- |
281
290
  | Document | One TipTap/ProseMirror body tree retained across editing and read-only preview, controlled TipTap header/footer surfaces with direct paper-margin editing and a contextual ribbon, one typography and page-chrome baseline across editing, preview, and PDF surfaces, a persistent typed heading-navigation pane with active-selection tracking, filtering and collapsible keyboard traversal, host-owned selected-text menus with full document context and range-mapped async commands, responsive and keyboard-operated paragraph-style and list galleries, typed bullet and numbering commands with restart/continue/start controls, typed physical-page and section-page descriptors, repeated first/default/even page chrome, a versioned structured model with an HTML compatibility representation, prefix-reused visual-line measurement and pages, page decorations, page-aware horizontal and vertical rulers for page margins, paragraph indents and typed tab stops, structured list-item pagination, explicit paragraph and list-item direction, compact spacing and pagination controls, typed inline/square/tight/through/top-and-bottom/no-wrap image layout and floating-image drawing layers, imported style-inherited paragraph properties, structured inline tabs, and theme-aware run font/size/color/background import | Worker plus resumable Rust/WASM flow pagination and Rustybuzz shaping across CSS-matched registered text runs; the same live result remains mounted in read-only preview and is consumed by bounded browser PDF capture, including eligible list paragraphs, Unicode bidi level segmentation, ordered per-grapheme font fallback, packaged Latin/CJK/Arabic/Hebrew faces, and structured left-to-right tabs, with explicit DOM and JavaScript fallbacks for text affected by supported floats | Language-complete font substitution, complete Word style and numbering coverage, locale-complete and bidirectional tabs, arbitrary floating-object geometry and non-image drawing layers, complex table flow, searchable/vector PDF output, and loss-preserving OOXML package state |
282
291
  | Markdown | TipTap visual editing with a resizable source-and-preview split view by default, source-aware ribbon formatting and shortcuts, bounded source-native history with coalesced typing and selection restoration, host-defined selection menus across both editing surfaces, GFM tables, strikethrough, autolinks and nested task lists, controlled source state, coalesced preview rebuilds, proportional pane scrolling, keyboard-adjustable pane sizing, a flat measure-bounded reading surface, optional visual or source-only views, and a full-workspace Source/Preview switch on phones | No kernel required for normal editing | CommonMark differential fixtures, multi-megabyte profiling, and an off-main-thread parser boundary when measurements justify it |
283
- | Spreadsheet | Fortune Sheet grid integrated with the shared Office shell, a WPS-oriented command catalog and tab order, quick-access Undo and Redo, a priority-aware adaptive and collapsible ribbon with temporary tab expansion, Home and Styles Conditional Formatting, Home and Cells row/column insertion and deletion through the shared typed structure commands, Home and Alignment Merge and Center plus Merge Cells, Merge Across, Unmerge Cells, and Unmerge and Fill through one native-model-backed controlled batch per intent and the WPS `Ctrl+M` shortcut, Home and Editing Clear All, Formats, Contents, Comments, and Hyperlinks with Delete/Backspace mapped to content-only clearing and merge geometry retained, Data sorting and AutoFilter with bounded current-region discovery, controlled filter state, WPS toggle and header-menu shortcuts, and accessible vendor menu semantics, View and Window Freeze Panes with WPS current-cell, top-row, first-column, and unfreeze patterns backed by controlled state and native XLSX frozen panes, Formulas and F9 workbook recalculation, an executable Home clipboard group with permission-resilient Paste, Cut, and Copy plus a WPS-style one-shot and locked Format Painter for bounded cross-sheet native-style patterns, shared grid/formula/footer visual tokens and one spreadsheet accent across selection, sheet tabs, menus, and zoom, an A3S-owned accessible single-row workbook footer for creation, activation, rename, duplicate, color, hide, reorder, delete, selection status, and zoom, a resize-observed worksheet viewport that keeps the active tab and its touch action visible across desktop, compact, and phone-width changes, one cell/worksheet context-menu surface whose displayed accelerators remain executable while the menu owns focus, Arrow/Home/End tab navigation plus Shift+F10 and native context-menu access, typed editing and calculation command ports, A3S-owned deterministic Arrow, Enter, Tab, Home, PageUp/PageDown, extended-selection, row, column, and all-cells keyboard commands, selection-preserving focus restoration across controlled workbook remounts and F2/Escape editing transitions, Cmd/Ctrl formatting, undo/redo, clear, a permission-resilient editor-local clipboard fallback, Shift+F11 sheet creation, and Ctrl/Cmd+PageUp/PageDown sheet-navigation shortcuts, direct font-family, horizontal/vertical-alignment, text-wrap, general/number/percent, and decimal-place controls backed by native cell-style keys, live count/sum/average selection summaries, operation-driven sparse-workbook projection, guarded controlled-value remounts that reject stale engine callbacks, and no-history result patches with cell-scoped Fortune fallback | Versioned, cancellable Worker/Rust-WASM calculation sessions using the shared bounded Rust formula parser, retained formula ASTs, incremental forward/reverse dependency graphs, dirty-subgraph recalculation, cross-sheet references, and a dynamically loaded JavaScript fallback | A3S-owned virtual grid, moving replacement projection off the main thread, broader Excel formula semantics, A3S-owned custom number-format evaluation, and print layout |
292
+ | Spreadsheet | Fortune Sheet grid integrated with the shared Office shell, a WPS-oriented command catalog and tab order, quick-access Undo and Redo, a priority-aware adaptive and collapsible ribbon with temporary tab expansion, Home and Styles Conditional Formatting, Home and Cells row/column insertion and deletion through the shared typed structure commands, Home and Alignment Merge and Center plus Merge Cells, Merge Across, Unmerge Cells, and Unmerge and Fill through one native-model-backed controlled batch per intent and the WPS `Ctrl+M` shortcut, Home and Font native strikethrough through the same typed formatting command and WPS `Cmd/Ctrl+5`, Home and Editing Clear All, Formats, Contents, Comments, and Hyperlinks with Delete/Backspace mapped to content-only clearing and merge geometry retained, Data sorting and AutoFilter with bounded current-region discovery, controlled filter state, WPS toggle and header-menu shortcuts, and accessible vendor menu semantics, View and Window Freeze Panes with WPS current-cell, top-row, first-column, and unfreeze patterns backed by controlled state and native XLSX frozen panes, Formulas and F9 workbook recalculation, an executable Home clipboard group with permission-resilient Paste, Cut, and Copy plus a WPS-style one-shot and locked Format Painter for bounded cross-sheet native-style patterns, shared grid/formula/footer visual tokens and one spreadsheet accent across selection, sheet tabs, menus, and zoom, an A3S-owned accessible single-row workbook footer for creation, activation, rename, duplicate, color, hide, reorder, delete, selection status, and zoom, a resize-observed worksheet viewport that keeps the active tab and its touch action visible across desktop, compact, and phone-width changes, one cell/worksheet context-menu surface whose displayed accelerators remain executable while the menu owns focus, Arrow/Home/End tab navigation plus Shift+F10 and native context-menu access, typed editing and calculation command ports, A3S-owned deterministic Arrow, Enter, Tab, Home, PageUp/PageDown, extended-selection, row, column, and all-cells keyboard commands, selection-preserving focus restoration across controlled workbook remounts and F2/Escape editing transitions, Cmd/Ctrl formatting, undo/redo, clear, a permission-resilient editor-local clipboard fallback, Shift+F11 sheet creation, and Ctrl/Cmd+PageUp/PageDown sheet-navigation shortcuts, direct font-family, horizontal/vertical-alignment, text-wrap, general/number/percent, and decimal-place controls backed by native cell-style keys, live count/sum/average selection summaries, operation-driven sparse-workbook projection, guarded controlled-value remounts that reject stale engine callbacks, and no-history result patches with cell-scoped Fortune fallback | Versioned, cancellable Worker/Rust-WASM calculation sessions using the shared bounded Rust formula parser, retained formula ASTs, incremental forward/reverse dependency graphs, dirty-subgraph recalculation, cross-sheet references, and a dynamically loaded JavaScript fallback | A3S-owned virtual grid, moving replacement projection off the main thread, broader Excel formula semantics, A3S-owned custom number-format evaluation, and print layout |
284
293
  | Presentation | Scene canvas with ordered typed multi-selection, persistent nested browser groups, native PPTX group-node export, exact keyboard-accessible table-dimension insertion, native slide/object context actions with optional AI actions, a separate object/content editing state, one on-demand TipTap instance, collective move/scale/nudge/clipboard/delete/layer commands, selection-bound alignment and distribution, typed group/ungroup commands, one typed dispatcher for ribbon commands, editor-scoped shortcuts with post-command selection focus, direct beginning/current-slide playback with fullscreen fallback, frame-coalesced transactional move/resize previews that commit once on pointer release, two-level thumbnail node and scene windowing, and a phone stage that top-aligns the primary canvas while retaining one readable slide indicator beside view and zoom controls | Revisioned, cancellable Worker/Rust-WASM slide-relative alignment and object-set snapping with typed visual guides and a JavaScript fallback | Arbitrary rotated or reflected PPTX group transforms, connectors, theme resolution, text fitting, kernel-owned thumbnail layout, and slide serialization |
285
294
  | PDF | PDFium-backed page rendering with an A3S-owned responsive toolbar, a scrollable page-thumbnail rail with active-page synchronization and bounded bitmap/DOM windowing, a focus-contained phone page drawer, and typed capability controllers for navigation, zoom, search, basic annotations, annotation color, opacity, compatible stroke-width defaults and selection updates, history, and save; page and search drafts cancel without accidental commands, shortcuts remain scoped to the PDF root, and compact widths retain page status while exposing search-result traversal, navigation, zoom, and history through the keyboard-operated overflow menu | PDFium WebAssembly | Forms, redaction review, page organization, and reopen fixtures |
286
295
 
@@ -321,6 +330,96 @@ batches when their geometry is uniform or from exact per-page viewports when
321
330
  it differs. Explicit descriptor pages remain a fallback for surfaces without a
322
331
  registered live document.
323
332
 
333
+ Eligible structurally plain large DOCX files take a narrow import path in a
334
+ dedicated Worker. The main thread inflates `word/document.xml` once and
335
+ transfers its exact `ArrayBuffer`; the Worker decodes it, performs the strict
336
+ WordprocessingML tag and envelope checks, and streams paragraphs or table rows
337
+ in batches of 2,048. Table messages carry one text vector plus transferable
338
+ `Uint32Array` bands for row-to-cell and cell-to-paragraph counts, so neither
339
+ side clones a 100,000-row nested object graph. The main thread constructs the
340
+ complete, schema-validated `WorkDocumentModel` and canonical HTML from those
341
+ bounded messages, but it does not create the complete live ProseMirror tree.
342
+ The TipTap source initially materializes
343
+ only the first two leaf chunks. Every later leaf contains an internal
344
+ `documentLazyBlock` whose position tape has exactly the same `nodeSize`, text
345
+ offsets, and block boundaries as the canonical payload. Ordinary text uses
346
+ 128-block leaves above 2,048 blocks, while tables use 16-row leaves above 512
347
+ rows. Runs longer than 32 table leaves are nested under geometry containers, so
348
+ a 100,000-row table exposes 6,250 logical leaves through only 196 top-level
349
+ containers without changing any canonical position.
350
+
351
+ The Worker boundary is deliberately fail-closed. An explicit `ineligible`
352
+ result continues to the complete Mammoth and OOXML-marker importer. Worker
353
+ creation, execution, message-validation, or timeout failure terminates that
354
+ exact Worker and retries the same narrow parser synchronously; cancellation
355
+ terminates it and propagates `AbortError`. The production import Worker is
356
+ 23.9 kB uncompressed, about 97.4 percent smaller than the earlier
357
+ dependency-heavy prototype, and contains neither JSZip nor the rich
358
+ section-normalization pipeline. Envelope counting uses one scan, and the row
359
+ parser emits the same columnar shape that the Worker protocol consumes.
360
+
361
+ Hosts may reserve an artifact ID before starting import. The Playground mounts
362
+ a blank editor shell under that ID while the Worker parses, then applies the
363
+ final controlled model to the already mounted editor. Parsing and editor
364
+ initialization are therefore parallel critical paths rather than serial work;
365
+ source-backed export is rekeyed atomically to the reserved identity. A failed
366
+ or cancelled import removes only its own placeholder and restores the previous
367
+ workspace.
368
+
369
+ The chunk NodeView omits descendant DOM for an off-screen leaf. A visible lazy
370
+ leaf receives a read-only semantic preview from a structure-keyed DOM pool;
371
+ paragraph and table nodes are updated in place and returned to the pool as the
372
+ window moves. Pointer selection, search, model-boundary navigation, or a real
373
+ edit hydrates only the selected chunk from its canonical payload before the
374
+ selection is applied. Hydration is history-free, does not publish a controlled
375
+ edit, and transfers cached document statistics because its logical content is
376
+ unchanged. The placeholder retains estimated content height plus indexed
377
+ pagination spacer height, and nested leaf heights aggregate into the collapsed
378
+ container. Expanding, collapsing, and pooling therefore do not change the
379
+ scroll range. A cumulative geometry index and binary search map the viewport
380
+ to its exact leaves. `Ctrl+Home`, `Ctrl+End`, and the macOS equivalents operate
381
+ on model positions first and never depend on mounted DOM.
382
+
383
+ Pagination reads the canonical JSON payloads of lazy chunks without hydrating
384
+ them into ProseMirror. A text edit reuses the measured block and page prefix
385
+ before the first changed position, locates the current page with a binary
386
+ search, and shapes only real paragraph or heading nodes. This prevents a local
387
+ tail edit from filtering, comparing, or recreating all 100,000 prior blocks.
388
+ Selection, IME, undo, comments, revisions, and exported model positions remain
389
+ model-authoritative throughout this process.
390
+
391
+ Controlled ownership remains intact. Text-only transactions in an eligible
392
+ lazy document are coalesced to one animation-frame publication. The editor
393
+ finds the changed persistent chunk, updates document statistics by subtree
394
+ delta, materializes the complete JSON model from the payload registry, serializes
395
+ only that chunk, and patches its indexed range in the canonical HTML. The host
396
+ still receives complete `html` and `model` values. A composable polynomial
397
+ fingerprint hashes the changed chunk and combines its cached prefix, chunk, and
398
+ suffix segments, so consecutive publications do not rescan the complete HTML
399
+ string. Process-local schema trust admits that precomputed fingerprint only for
400
+ the exact live model snapshot; cloned or persisted models still rescan and
401
+ verify the complete HTML, including fingerprints written by earlier releases.
402
+ Formatting, structure, or unsupported edits deliberately fall back to complete
403
+ schema serialization. The lazy projection is process-local and
404
+ parser-authenticated; rich compatibility imports, cloned untrusted models, and
405
+ collaboration bindings retain the complete TipTap path.
406
+
407
+ Physical page chrome has a separate React window above 24 pages and mounts only
408
+ the nearby sheets. A WeakMap-backed page-surface registry retains all page
409
+ frames for PDF geometry without recreating thousands of page-sheet elements.
410
+ Pagination widgets are indexed by leaf chunk and appear only with a mounted
411
+ leaf; logical spacer height remains in the chunk geometry when the widget DOM
412
+ is absent. Single-column sections deliberately use ordinary block flow rather
413
+ than CSS Multi-column, while true multi-column sections retain the column
414
+ algorithm. Word content-autofit tables ignore TipTap's inline grid widths at
415
+ render time so the browser sizes them from content; fixed and percentage table
416
+ geometry remains unchanged.
417
+
418
+ This path is not a claim that every rich 100,000-block DOCX is already bounded.
419
+ Unsupported tags, relationships, tracked structures, drawings, or other rich
420
+ features route to the complete compatibility importer. Extending the same
421
+ model-preserving window to those paths remains a performance gate.
422
+
324
423
  The Word navigation pane uses that same capture boundary for real physical-page
325
424
  thumbnails instead of reconstructing an approximate text card. The current and
326
425
  adjacent pages are admitted first; the remaining captures use an
@@ -852,6 +951,48 @@ use Fortune coercion and eager-branch evaluation for formulas beyond the
852
951
  shared parity fixtures; this is an explicit first-slice compatibility limit,
853
952
  not a cross-engine equivalence claim.
854
953
 
954
+ XLSX file import starts two bounded, one-shot Workers before the calculation
955
+ session. The general Worker runs SheetJS off the main thread and streams dense
956
+ worksheets in 512-row chunks or sparse worksheets in 8,192-cell chunks. In
957
+ parallel, the package Worker decompresses each worksheet XML part once and
958
+ builds the feature and style gates used by the rest of the importer.
959
+
960
+ The package Worker also owns a deliberately narrow, fail-closed path for plain
961
+ OOXML workbooks. It first authenticates an exact package envelope: workbook,
962
+ content types, relationships, and worksheet ownership must form a closed set
963
+ with no styles, shared strings, external targets, or unknown parts. It then
964
+ parses only ordered primitive numeric, Boolean, error, and simple inline-string
965
+ cells. A worksheet-start message authenticates its declared range before any
966
+ cell is accepted. Each later transferable columnar chunk covers at most 256
967
+ rows and 4,096 cells and carries packed coordinates, value kinds, numeric
968
+ values, and the remaining text vector instead of a million nested cell
969
+ objects. The hot cursor validates row and cell coordinates in place with
970
+ bounded character-code arithmetic; it creates neither an address substring nor
971
+ a regular-expression match per cell. The main thread treats those chunks as
972
+ provisional until the complete worksheet XML has been consumed.
973
+ A formula, style index, rich/shared string, unknown element or attribute,
974
+ malformed entity, invalid address, relationship, or trailing payload rejects
975
+ the candidate instead of guessing. Package authentication cancels the
976
+ speculative SheetJS Worker early; a later cell-level rejection discards every
977
+ provisional row and restarts SheetJS with the original private bytes. Worker
978
+ creation, protocol, timeout, and cancellation failures retain the synchronous
979
+ parser as the final compatibility fallback. This removes the second complete
980
+ worksheet decompression and SheetJS object-materialization pass for eligible
981
+ million-cell files without weakening the full XLSX path.
982
+
983
+ Primitive imported cells and their sparse rows are frozen once, and an
984
+ identity-keyed profile authenticates the resulting matrix as directly
985
+ consumable by Fortune. A host may reserve worksheet IDs while the Playground
986
+ mounts a blank workbook shell. If the final workbook is editable, preserves
987
+ the same sheet count and identities, and contains no stateful structure such
988
+ as charts, protection, merged geometry, filters, validation, images, or custom
989
+ view state, the editor replaces that certified matrix through the existing
990
+ Fortune instance. Fortune adopts the frozen matrix and rebuilds only its
991
+ formula index; it does not clone every populated cell or remount the workbook.
992
+ Any failed predicate or update exception returns to the complete controlled
993
+ remount path. This narrow eligibility gate preserves correctness for rich and
994
+ multi-sheet imports while removing the simple million-cell first-mount task.
995
+
855
996
  The browser pagination implementation is split by capability instead of
856
997
  accumulating in one editor module. `work-document-pagination.ts` owns only the
857
998
  TipTap extension and public facade; dedicated modules own block measurement,
@@ -1145,6 +1286,26 @@ change. Environments without `IntersectionObserver` render complete scenes for
1145
1286
  the bounded mounted window. Kernel-owned thumbnail layout remains a separate
1146
1287
  performance gate.
1147
1288
 
1289
+ Presentation design metadata is memoized per controlled content identity.
1290
+ Thumbnail scenes consume that prepared master/layout catalog directly, and the
1291
+ editor does not copy the complete slide array merely to resolve one visible
1292
+ scene. The deterministic performance fixture contains 1,000 slides and 9,000
1293
+ scene elements. In five fresh headless Chrome 149 processes on the recorded
1294
+ 10-logical-core host, normal mode mounted 18 thumbnail buttons, rendered 13
1295
+ full thumbnail scenes, retained 1,006 DOM nodes and a median 10.9 MiB
1296
+ JavaScript heap, reached the final slide in 6.1–13.4 ms, and recorded zero Long
1297
+ Tasks during import, final-slide navigation, and ten object nudges. The median
1298
+ keydown-to-object-commit time was 4.5 ms.
1299
+
1300
+ `content-visibility: auto` remains a benchmark mode rather than a production
1301
+ rail rule. The interleaved five-process comparison reduced median editor-ready
1302
+ time only from 1,637.6 ms to 1,600.3 ms, while increasing median object-commit
1303
+ time from 4.5 ms to 5.9 ms and median nudge script time from 8.0 ms to 11.5 ms,
1304
+ with no retained-heap improvement. The rail therefore uses actual DOM and
1305
+ scene virtualization; CSS skipped rendering cannot replace the JavaScript and
1306
+ data-processing bounds and can add invalidation cost to the already bounded
1307
+ window.
1308
+
1148
1309
  Exit criteria: object drag and resize stay interactive on complex slides;
1149
1310
  partial rich-text formatting survives PPTX round trips; masters, layouts,
1150
1311
  themes, tables, charts, links, and notes have compatibility fixtures for
@@ -1169,8 +1330,27 @@ their direct toolbar controls are hidden. The product-owned thumbnail rail uses
1169
1330
  PDFium thumbnail capabilities without enabling the embedded sidebar, keeps page
1170
1331
  numbers and active-page state synchronized with the main scroll controller,
1171
1332
  automatically reveals the current page, and mounts only a bounded page window
1172
- for long files. At phone widths the same navigation becomes a focus-contained,
1173
- dismissible drawer rather than reducing the document canvas.
1333
+ for long files. Files above 48 pages retain virtual spacers and mount only the
1334
+ viewport plus five items of overscan on either side, with a hard ceiling of 32
1335
+ thumbnail buttons. Leaving the window aborts the exact pending PDFium thumbnail
1336
+ task and revokes its object URL. Long-distance Home and End navigation uses an
1337
+ instant rail jump so intermediate windows do not start disposable bitmap work
1338
+ or unmount the keyboard destination after it receives focus. At phone widths
1339
+ the same navigation becomes a focus-contained, dismissible drawer rather than
1340
+ reducing the document canvas.
1341
+
1342
+ `preloadOfficeEditor('pdf', { preloadRuntimeAssets: true })` can move the PDF
1343
+ editor chunk and PDFium response body ahead of a high-confidence navigation.
1344
+ Runtime-asset loading is opt-in because the unpacked binary is about 4.4 MiB,
1345
+ and the helper does not initialize the PDFium Worker. Runtime fetching is best
1346
+ effort: a failure leaves editor opening unaffected and clears the request cache
1347
+ so a later intent can retry. The reference benchmark therefore treats
1348
+ module/asset availability and Worker-side initialization as separate
1349
+ boundaries. Host CSS `content-visibility` is not applied to the internal PDF
1350
+ pages: EmbedPDF already mounts only six to seven pages behind its Shadow DOM
1351
+ boundary, while CSS containment cannot cancel PDFium tasks or release bitmap
1352
+ memory.
1353
+
1174
1354
  Existing PDF password handling remains in the PDF document lifecycle rather
1175
1355
  than the removed toolbar. Form-authoring controls, redaction review, page
1176
1356
  organization, and compatibility fixtures remain part of this stage.
@@ -1212,9 +1392,145 @@ repeatable fixtures. The targets below are release gates, not current claims:
1212
1392
  - Every editor has fixture-based memory, interaction-latency, load-time, and
1213
1393
  output-size budgets in CI before it can be called production-ready.
1214
1394
 
1395
+ ### Current 100,000-unit evidence
1396
+
1397
+ The following cold local Playground measurements were captured on 2026-08-19
1398
+ on an Apple M2 Pro with 16 GB of memory, Playwright 1.61.1, headless Chrome 149,
1399
+ and a 1,440 × 1,000 viewport. Document values are the median and range of three
1400
+ fresh browser processes; Spreadsheet values use five. The benchmark drains
1401
+ diagnostic memory-counter work before starting the scroll profile so
1402
+ DevTools-triggered V8 cleanup is not charged to the product. These measurements
1403
+ are evidence of current limits, not universal release targets. The spreadsheet
1404
+ readiness milestone is observed inside the page on animation frames; automation
1405
+ runner polling backoff is therefore excluded from the load time.
1406
+
1407
+ | Fixture | Editor visible | Pagination ready | Longest task before visible |
1408
+ | --- | ---: | ---: | ---: |
1409
+ | DOCX, 100,000 text paragraphs, 4.50 million characters | 0.397 s (0.396–0.480) | 1.460 s (1.381–1.525), 3,125 pages | 131 ms (128–140) |
1410
+ | DOCX table, 100,000 rows × 3 columns | 0.813 s (0.810–0.814) | 1.747 s (1.739–1.749), 2,381 pages | 96 ms (88–144) |
1411
+ | XLSX table, 100,000 rows × 10 columns, 1 million populated cells | 0.480 s (0.474–0.494) | n/a | No task ≥50 ms in any of five runs |
1412
+
1413
+ The median text phases were 121.6 ms for the complete import, 76.1 ms inside
1414
+ the Worker, and 56.6 ms for Worker parsing. The table phases were 462.6 ms,
1415
+ 377.6 ms, and 311.6 ms respectively; the already mounted editor applied that
1416
+ 100,000-row controlled model in 32.3 ms. Editor-shell initialization overlaps
1417
+ these import phases instead of extending the critical path. Against the prior
1418
+ Worker/windowing baseline, median editor visibility improved from 0.815 to
1419
+ 0.397 seconds for text and from 1.316 to 0.813 seconds for the table;
1420
+ pagination readiness improved from 1.749 to 1.460 seconds and from 2.366 to
1421
+ 1.747 seconds respectively.
1422
+
1423
+ For the XLSX fixture, the complete import measured 375.8 ms (372.3–386.4).
1424
+ The authenticated package Worker fast path owned 345.5 ms (343.6–355.8), while
1425
+ main-thread canonical conversion took 13.8 ms (12.7–15.4). The hot worksheet
1426
+ cursor now authenticates row and cell coordinates directly in the 35.7 MB XML
1427
+ string instead of allocating and matching one million address substrings. Its
1428
+ isolated median fell from 178.3 to 124.3 ms (30.3%). Against the immediately
1429
+ preceding corrected end-to-end baseline, editor visibility improved from 536.7
1430
+ to 480.2 ms (10.5%), complete import from 432.0 to 375.8 ms (13.0%), and the
1431
+ Worker fast path from 403.5 to 345.5 ms (14.4%). No import Long Task, browser
1432
+ error, page error, or console error occurred in the retained five-run result.
1433
+
1434
+ These values supersede the earlier 830.5 ms visibility figure. Page-local
1435
+ observation showed that Fortune had become visible before Playwright's next
1436
+ progressively backed-off locator poll; the old figure therefore included test
1437
+ runner latency rather than product work.
1438
+
1439
+ | Fixture | Continuous scroll | p95 frame interval | Scroll long tasks | Retained browser state | Bounded render state |
1440
+ | --- | ---: | ---: | ---: | ---: | --- |
1441
+ | 100,000 text paragraphs | 120.0 FPS in every run | 10.7 ms (10.2–10.8) | 0 in every run | 70.4 MiB; 2,867 median DOM nodes | 1 of 782 content chunks at readiness, 2 after end navigation, and 4 of 3,125 page sheets mounted |
1442
+ | 100,000 table rows | 120.6 FPS (120.5–120.9) | 10.1 ms (9.9–10.4) | 0 in every run | 145.8 MiB; 3,106 DOM nodes | 4 of 6,250 leaves at readiness, 1 after end navigation; 196 outer containers; 4 of 2,381 page sheets mounted |
1443
+ | 100,000 × 10 spreadsheet cells | 120.1 FPS (120.0–120.2) | 12.9 ms (12.9–13.0) | 0 in every run | 38.41 MiB; 903 DOM nodes | Fortune Canvas paints only the visible row and column range; Ctrl+End reached `J100000` in 77.3 ms (76.0–79.7) |
1444
+
1445
+ The controlled-edit benchmark sends one browser text-insertion event at the
1446
+ exact final paragraph or cell, waits for the complete host publication, then
1447
+ does it again against the new controlled revision. A page-local `beforeinput`
1448
+ listener starts `Wall latency`, and a `MutationObserver` stops it when the
1449
+ publication counter changes. This excludes Playwright input transport and
1450
+ polling backoff while retaining the input transaction, React and pagination
1451
+ scheduling, and publication. `Publish CPU` measures only construction of the
1452
+ complete `html` and `model` values. Document values below are the median and
1453
+ range of five fresh browser processes.
1454
+
1455
+ | Fixture | First edit wall / publish CPU | Second edit wall / publish CPU | Publication path |
1456
+ | --- | ---: | ---: | --- |
1457
+ | 100,000 text paragraphs | 70.3 ms (69.0–115.4) / 21.8 ms (20.0–54.7) | 53.9 ms (22.5–56.4) / 10.0 ms (9.4–16.8) | `lazy-chunk` in all ten publications |
1458
+ | 100,000 table rows × 3 columns | 102.3 ms (93.8–121.0) / 57.8 ms (53.5–70.1) | 85.1 ms (78.2–93.3) / 41.2 ms (36.9–45.7) | `lazy-chunk` in all ten publications |
1459
+ | 100,000 × 10 spreadsheet cells | 52.5 ms (49.6–56.4) / 2.5 ms (2.5–2.6) | 45.9 ms (45.9–47.0) / 2.3 ms (2.2–2.3) | Incremental 3-operation projection of one changed cell; 0 Long Tasks |
1460
+
1461
+ Every run reached the exact final paragraph or row, both consecutive edit
1462
+ markers survived in the final controlled value, and no browser, page, or
1463
+ console error was recorded. Pooled previews reduced detached scroll DOM by
1464
+ about 92 percent during profiling. Cached statistics removed the previous
1465
+ 233–246 ms scroll task, while early non-paragraph rejection, binary page
1466
+ lookup, and measured-prefix reuse removed document-sized work from tail edits.
1467
+
1468
+ The earlier document wall figures used a Node-side clock around Playwright
1469
+ input and polling. They therefore measured runner scheduling as product work
1470
+ and are superseded by the page-local figures above. Against the same page-local
1471
+ five-run baseline, cached segment fingerprints reduced the median second text
1472
+ edit from 101.4 to 53.9 ms and the second table edit from 170.8 to 85.1 ms;
1473
+ their publication CPU fell from 56.0 to 10.0 ms and from 123.2 to 41.2 ms.
1474
+
1475
+ The remaining cold-open boundary is the 100,000-row Worker's approximately
1476
+ 222 ms content scan plus main-thread construction and retention of the
1477
+ canonical model. The live ProseMirror tree and strict OOXML inspection are no
1478
+ longer document-sized main-thread constructors. A WASM parser is justified
1479
+ only if it consumes the transferred bytes directly and emits the same columnar
1480
+ protocol without adding a second complete copy or JSON serialization step.
1481
+ During editing, controlled ownership intentionally requires a complete HTML
1482
+ string; the indexed chunk patch and segment fingerprint avoid complete
1483
+ semantic serialization and repeat hashing, but allocating that host value
1484
+ remains a measurable lower bound. A future optional patch callback may remove
1485
+ that copy only if the complete `onChange` contract remains available.
1486
+
1487
+ The million-cell XLSX path now retains about 38.41 MiB after collection and has
1488
+ neither import nor continuous-scroll Long Tasks in any run. The remaining
1489
+ cold-open boundary is the package Worker's approximately 344 ms XML scan and
1490
+ columnar cell construction; canonical main-thread conversion is already about
1491
+ 13.8 ms. A WASM parser is justified only if it consumes the transferred bytes
1492
+ directly, emits the same bounded columnar protocol, and improves that Worker
1493
+ phase without introducing another complete copy. Fortune Canvas still owns
1494
+ painting, but imported matrix adoption is now outside the rich-workbook remount
1495
+ path for the strictly authenticated simple case.
1496
+
1497
+ ### Current 1,000-page PDF evidence
1498
+
1499
+ The deterministic PDF fixture is 412,852 bytes with SHA-256
1500
+ `eb86216416a633ce86dd4b31c1c0d9e42792e7bb802946cc0bb6e2b395ae79cb`.
1501
+ It contains 1,000 A4 pages with stable page markers. The measurements below
1502
+ combine two counterbalanced three-run batches on the same 2026-08-19 reference
1503
+ machine and browser described above. Every value is the median and complete
1504
+ range of six fresh browser processes. `Runtime preloaded` waits for the editor
1505
+ module and PDFium response body before starting the file-open clock.
1506
+
1507
+ | Mode | Editor shell | Viewer ready | First page bitmap | End to page 1,000 | Retained heap |
1508
+ | --- | ---: | ---: | ---: | ---: | ---: |
1509
+ | Import-time warm-up | 410.7 ms (399.4–433.1) | 7.430 s (4.403–13.742) | 7.626 s (4.611–13.944) | 21.7 ms (19.6–28.7) | 10.04 MiB (9.48–10.52) |
1510
+ | Runtime preloaded | 369.1 ms (322.8–428.6) | 9.464 s (5.286–12.390) | 9.655 s (5.478–12.580) | 23.5 ms (18.0–33.9) | 9.72 MiB (9.61–10.47) |
1511
+
1512
+ Runtime preloading moved the shell median forward by 41.6 ms (10.1%) but did
1513
+ not improve viewer-ready or first-bitmap medians on the local server. The
1514
+ dominant and highly variable boundary is PDFium Worker initialization, not
1515
+ main-thread layout or local transfer. Runtime preloading remains an explicit
1516
+ network-latency tool rather than a claimed local-startup acceleration.
1517
+
1518
+ All twelve runs mounted exactly seven main-view pages and 15 thumbnail buttons
1519
+ at readiness. The final window contained pages 986–1,000, page-local End
1520
+ navigation produced no Long Task, and no browser, page, or console error was
1521
+ recorded. Cold import produced no task at or above 50 ms. Three runtime-preload
1522
+ runs recorded one import task each, between 59 and 89 ms; this remains a gate
1523
+ for later Worker-initialization work rather than being hidden by the preload
1524
+ API. The deterministic A3S Test suite independently verifies the 15-item first
1525
+ and final windows, retained keyboard focus on page 1,000, the page counter,
1526
+ accessibility output, and empty console/page-error evidence.
1527
+
1215
1528
  ## Performance and safety rules
1216
1529
 
1217
- - Editing and selection stay on the main thread; parsing and layout do not.
1530
+ - Editing and selection stay on the main thread. XLSX parsing, eligible
1531
+ large-DOCX inspection/parsing, and document layout use dedicated Workers;
1532
+ canonical large-document model assembly remains a measured main-thread
1533
+ boundary.
1218
1534
  - The public React entry loads editor engines as independent asynchronous
1219
1535
  chunks. `preloadOfficeEditor` may warm one engine from hover or keyboard
1220
1536
  focus without mounting it.
@@ -1227,7 +1543,8 @@ repeatable fixtures. The targets below are release gates, not current claims:
1227
1543
  CI against the scripts referenced by the generated `index.html`.
1228
1544
  - One active layout request exists per editor. A newer revision cancels the
1229
1545
  previous request.
1230
- - Requests reject invalid dimensions and more than 10,000 layout blocks.
1546
+ - Requests reject invalid dimensions and more than 200,000 layout blocks.
1547
+ Page-style tables remain bounded to 10,000 entries.
1231
1548
  - Text requests are bounded to 1,024 paragraphs and 1 MiB of UTF-8 text.
1232
1549
  They accept at most 16,384 contiguous runs, with no more than 4,096 in one
1233
1550
  paragraph and no more than eight ordered faces per run. Font registration is
@@ -1255,18 +1572,20 @@ The browser kernel is covered at four boundaries:
1255
1572
  1. Rust unit tests for deterministic pagination, Unicode line breaking,
1256
1573
  grapheme-safe emergency wrapping, whitespace modes, shared formula parsing,
1257
1574
  scalar dependency calculation, cycles, targets, and validation.
1258
- 2. JavaScript fallback tests for protocol parity, safe page-prefix reuse,
1259
- no-Worker operation, cancellation, sparse Spreadsheet calculation,
1260
- revisioned session fallback, and the shared Spreadsheet parity fixtures.
1575
+ 2. JavaScript fallback tests for protocol parity, 100,000-block linear
1576
+ pagination, safe page-prefix reuse, no-Worker operation, cancellation,
1577
+ sparse Spreadsheet calculation, revisioned session fallback, dense and
1578
+ sparse worksheet iteration, and the shared Spreadsheet parity fixtures.
1261
1579
  3. A raw generated-WASM ABI smoke test that registers both shipped fonts,
1262
1580
  proves the Latin face lacks CJK glyphs, resolves them through the ordered
1263
1581
  fallback face, verifies mixed-face line metrics, initializes a Spreadsheet
1264
1582
  session, and recalculates a dirty formula chain from a cell patch.
1265
- 4. Browser checks for real Worker/WASM/font loading, shaped-line parity with
1266
- browser line boxes at non-100% zoom, real per-grapheme fallback diagnostics,
1267
- explicit unresolved-glyph fallback, page-view reflow, web-view clearing,
1268
- page counts, one physical sheet per measured page, visible page gaps, nested
1269
- and RTL list flow, undo behavior, and slide-relative element alignment.
1583
+ 4. Browser checks for real layout and XLSX-import Worker/WASM/font loading,
1584
+ shaped-line parity with browser line boxes at non-100% zoom, real
1585
+ per-grapheme fallback diagnostics, explicit unresolved-glyph fallback,
1586
+ page-view reflow, web-view clearing, page counts, one physical sheet per
1587
+ measured page, visible page gaps, nested and RTL list flow, undo behavior,
1588
+ and slide-relative element alignment.
1270
1589
 
1271
1590
  Presentation group serialization tests inspect generated slide and layout
1272
1591
  OOXML, nested group order, identity child-coordinate transforms, unique
@@ -1278,7 +1597,10 @@ Presentation thumbnail tests use a controlled intersection observer to prove
1278
1597
  that long decks retain absolute keyboard reachability while bounding mounted
1279
1598
  buttons and full scenes, releasing scenes that leave the window, preserving
1280
1599
  focus after deletion, and reconnecting the observer when switching between
1281
- normal and sorter views.
1600
+ normal and sorter views. A deterministic A3S Test suite imports the 1,000-slide
1601
+ fixture, proves the 18-button first and final windows, reaches slide 1,000 with
1602
+ `End`, performs two object nudges, and captures final focus, accessibility,
1603
+ console, and page-error evidence.
1282
1604
 
1283
1605
  Run the focused kernel checks with:
1284
1606
 
@@ -1293,4 +1615,18 @@ Build and verify the Playground performance boundary with:
1293
1615
  bun run playground:build
1294
1616
  bun run playground:bundle-check
1295
1617
  bun run playground:visual
1618
+ bun run test:e2e:large-documents:check
1619
+ bun run test:e2e:large-documents
1620
+ bun run performance:large-documents
1621
+ bun run performance:large-document-edits
1622
+ bun run test:e2e:spreadsheet-large:check
1623
+ bun run test:e2e:spreadsheet-large
1624
+ bun run performance:large-spreadsheets
1625
+ bun run performance:large-spreadsheet-edits
1626
+ bun run test:e2e:large-pdf:check
1627
+ bun run test:e2e:large-pdf
1628
+ bun run performance:pdf
1629
+ bun run test:e2e:large-presentation:check
1630
+ bun run test:e2e:large-presentation
1631
+ bun run performance:presentation
1296
1632
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",
@@ -89,10 +89,23 @@
89
89
  "playground:visual": "playwright test --config playwright.config.ts",
90
90
  "playground:visual:spreadsheet-ribbon": "playwright test visual-tests/spreadsheet-ribbon.functional.spec.ts --config playwright.config.ts",
91
91
  "playground:visual:update": "playwright test --config playwright.config.ts --update-snapshots",
92
+ "performance:fixtures": "bun .a3s-test/performance/generate-fixtures.ts",
93
+ "performance:large-document-edits": "bun .a3s-test/performance/generate-fixtures.ts --documents-only && bun .a3s-test/performance/benchmark-document-edit.ts http://127.0.0.1:4175/ 3",
94
+ "performance:large-documents": "bun .a3s-test/performance/generate-fixtures.ts --documents-only && bun .a3s-test/performance/benchmark.ts --url http://127.0.0.1:4175/ --scenarios document-text,document-table --runs 3 --timeout-ms 180000",
95
+ "performance:large-spreadsheet-edits": "bun .a3s-test/performance/generate-fixtures.ts --spreadsheets-only && bun .a3s-test/performance/benchmark-spreadsheet-edit.ts http://127.0.0.1:4175/ 3",
96
+ "performance:large-spreadsheets": "bun .a3s-test/performance/generate-fixtures.ts --spreadsheets-only && bun .a3s-test/performance/benchmark.ts --url http://127.0.0.1:4175/ --scenarios spreadsheet --runs 5 --timeout-ms 180000",
97
+ "performance:pdf": "bun .a3s-test/performance/generate-fixtures.ts --pdf-only && bun .a3s-test/performance/benchmark-pdf.ts --url http://127.0.0.1:4175/ --runs 3 --timeout-ms 120000",
98
+ "performance:presentation": "bun .a3s-test/performance/generate-fixtures.ts --presentations-only && bun .a3s-test/performance/benchmark-presentation.ts --url http://127.0.0.1:4175/ --runs 3 --timeout-ms 120000 --modes default,content-visibility",
92
99
  "test": "rstest",
93
100
  "test:e2e": "bun run test:e2e:fixtures && a3s-test run tests/e2e/word-page-color.acl --json && a3s-test run tests/e2e/word-page-setup-phone.acl --json && a3s-test run tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test run tests/e2e/word-list-formatting-phone.acl --json && a3s-test run tests/e2e/word-font-picker-phone.acl --json && a3s-test run tests/e2e/word-comments-drawer.acl --json && a3s-test run tests/e2e/word-comment-windowing.acl --json && a3s-test run tests/e2e/word-citations-phone.acl --json && a3s-test run tests/e2e/word-navigation-search.acl --json && a3s-test run tests/e2e/word-navigation-windowing.acl --json && a3s-test run tests/e2e/word-find-replace-phone.acl --json && a3s-test run tests/e2e/word-page-navigation.acl --json && a3s-test run tests/e2e/word-page-windowing.acl --json && a3s-test run tests/e2e/word-ai-question.acl --json && a3s-test run tests/e2e/word-picture-insert.acl --json && a3s-test run tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test run tests/e2e/word-track-changes-phone.acl --json && a3s-test run tests/e2e/word-formatting-revision.acl --json && a3s-test run tests/e2e/word-paragraph-formatting-revision.acl --json && a3s-test run tests/e2e/word-review-conflict-phone.acl --json && a3s-test run tests/e2e/word-revision-windowing.acl --json && a3s-test run tests/e2e/word-table-phone.acl --json && a3s-test run tests/e2e/word-table-borders.acl --json && a3s-test run tests/e2e/word-theme-table.acl --json && a3s-test run tests/e2e/word-styled-table.acl --json && a3s-test run tests/e2e/word-multi-page-table.acl --json && a3s-test run tests/e2e/word-cross-reference-phone.acl --json && a3s-test run tests/e2e/word-bookmark-links-phone.acl --json && a3s-test run tests/e2e/word-notes-phone.acl --json && a3s-test run tests/e2e/word-fields-phone.acl --json && a3s-test run tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test run tests/e2e/spreadsheet-phone-find.acl --json && a3s-test run tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test run tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test run tests/e2e/spreadsheet-maximum-sparse.acl --json && a3s-test run tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test run tests/e2e/presentation-presenter-view.acl --json && a3s-test run tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test run tests/e2e/presentation-phone-comments.acl --json && a3s-test run tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test run tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test run tests/e2e/markdown-phone-modes.acl --json && a3s-test run tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test run tests/e2e/office-docs-navigation.acl --json && a3s-test run tests/e2e/collaboration-playground-entry.acl --json && a3s-test run tests/e2e/collaboration-document-comments.acl --command-timeout-ms 120000 --json && a3s-test run tests/e2e/collaboration-document-suggestions.acl --command-timeout-ms 120000 --json && a3s-test run tests/e2e/collaboration-participants.acl --json && a3s-test run tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test run tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test run tests/e2e/collaboration-presentation-elements.acl --json",
94
101
  "test:e2e:check": "bun run test:e2e:fixtures && a3s-test check tests/e2e/word-page-color.acl --json && a3s-test check tests/e2e/word-page-setup-phone.acl --json && a3s-test check tests/e2e/word-paragraph-layout-phone.acl --json && a3s-test check tests/e2e/word-list-formatting-phone.acl --json && a3s-test check tests/e2e/word-font-picker-phone.acl --json && a3s-test check tests/e2e/word-comments-drawer.acl --json && a3s-test check tests/e2e/word-comment-windowing.acl --json && a3s-test check tests/e2e/word-citations-phone.acl --json && a3s-test check tests/e2e/word-navigation-search.acl --json && a3s-test check tests/e2e/word-navigation-windowing.acl --json && a3s-test check tests/e2e/word-find-replace-phone.acl --json && a3s-test check tests/e2e/word-page-navigation.acl --json && a3s-test check tests/e2e/word-page-windowing.acl --json && a3s-test check tests/e2e/word-ai-question.acl --json && a3s-test check tests/e2e/word-picture-insert.acl --json && a3s-test check tests/e2e/word-picture-alt-text-phone.acl --json && a3s-test check tests/e2e/word-track-changes-phone.acl --json && a3s-test check tests/e2e/word-formatting-revision.acl --json && a3s-test check tests/e2e/word-paragraph-formatting-revision.acl --json && a3s-test check tests/e2e/word-review-conflict-phone.acl --json && a3s-test check tests/e2e/word-revision-windowing.acl --json && a3s-test check tests/e2e/word-table-phone.acl --json && a3s-test check tests/e2e/word-table-borders.acl --json && a3s-test check tests/e2e/word-theme-table.acl --json && a3s-test check tests/e2e/word-styled-table.acl --json && a3s-test check tests/e2e/word-multi-page-table.acl --json && a3s-test check tests/e2e/word-cross-reference-phone.acl --json && a3s-test check tests/e2e/word-bookmark-links-phone.acl --json && a3s-test check tests/e2e/word-notes-phone.acl --json && a3s-test check tests/e2e/word-fields-phone.acl --json && a3s-test check tests/e2e/spreadsheet-phone-rename.acl --json && a3s-test check tests/e2e/spreadsheet-phone-find.acl --json && a3s-test check tests/e2e/spreadsheet-phone-context-menu.acl --json && a3s-test check tests/e2e/spreadsheet-phone-task-pane.acl --json && a3s-test check tests/e2e/spreadsheet-maximum-sparse.acl --json && a3s-test check tests/e2e/presentation-cut-paste-focus.acl --json && a3s-test check tests/e2e/presentation-presenter-view.acl --json && a3s-test check tests/e2e/presentation-phone-chart-pane.acl --json && a3s-test check tests/e2e/presentation-phone-comments.acl --json && a3s-test check tests/e2e/pdf-thumbnail-keyboard.acl --json && a3s-test check tests/e2e/pdf-page-drawer-phone.acl --json && a3s-test check tests/e2e/markdown-phone-modes.acl --json && a3s-test check tests/e2e/office-sidebar-breakpoint.acl --json && a3s-test check tests/e2e/office-docs-navigation.acl --json && a3s-test check tests/e2e/collaboration-playground-entry.acl --json && a3s-test check tests/e2e/collaboration-document-comments.acl --json && a3s-test check tests/e2e/collaboration-document-suggestions.acl --json && a3s-test check tests/e2e/collaboration-participants.acl --json && a3s-test check tests/e2e/collaboration-pdf-annotations.acl --json && a3s-test check tests/e2e/collaboration-spreadsheet-cells.acl --json && a3s-test check tests/e2e/collaboration-presentation-elements.acl --json",
95
102
  "test:e2e:fixtures": "bun scripts/create-e2e-fixtures.ts",
103
+ "test:e2e:large-documents": "bun .a3s-test/performance/generate-fixtures.ts --documents-only && a3s-test run tests/e2e/word-large-document-windowing.acl --json",
104
+ "test:e2e:large-documents:check": "a3s-test check tests/e2e/word-large-document-windowing.acl --json",
105
+ "test:e2e:large-pdf": "bun .a3s-test/performance/generate-fixtures.ts --pdf-only && a3s-test run tests/e2e/pdf-large-windowing.acl --json",
106
+ "test:e2e:large-pdf:check": "a3s-test check tests/e2e/pdf-large-windowing.acl --json",
107
+ "test:e2e:large-presentation": "bun .a3s-test/performance/generate-fixtures.ts --presentations-only && a3s-test run tests/e2e/presentation-large-windowing.acl --json",
108
+ "test:e2e:large-presentation:check": "a3s-test check tests/e2e/presentation-large-windowing.acl --json",
96
109
  "test:e2e:initial-focus": "a3s-test run tests/e2e/office-editor-initial-focus.acl --json",
97
110
  "test:e2e:initial-focus:check": "a3s-test check tests/e2e/office-editor-initial-focus.acl --json",
98
111
  "test:e2e:docs": "a3s-test run tests/e2e/office-docs-navigation.acl --json",
@@ -117,8 +130,12 @@
117
130
  "test:e2e:writer-ribbon:check": "a3s-test check tests/e2e/word-ribbon-collapse.acl --json",
118
131
  "test:e2e:spreadsheet-ribbon": "a3s-test run tests/e2e/spreadsheet-ribbon-alignment.acl --json",
119
132
  "test:e2e:spreadsheet-ribbon:check": "a3s-test check tests/e2e/spreadsheet-ribbon-alignment.acl --json",
133
+ "test:e2e:spreadsheet-cell-fill": "a3s-test run tests/e2e/spreadsheet-cell-fill.acl --json",
134
+ "test:e2e:spreadsheet-cell-fill:check": "a3s-test check tests/e2e/spreadsheet-cell-fill.acl --json",
120
135
  "test:e2e:spreadsheet-maximum-sparse": "a3s-test run tests/e2e/spreadsheet-maximum-sparse.acl --json",
121
136
  "test:e2e:spreadsheet-maximum-sparse:check": "a3s-test check tests/e2e/spreadsheet-maximum-sparse.acl --json",
137
+ "test:e2e:spreadsheet-large": "bun .a3s-test/performance/generate-fixtures.ts --spreadsheets-only && a3s-test run tests/e2e/spreadsheet-large-controlled-editing.acl --json",
138
+ "test:e2e:spreadsheet-large:check": "a3s-test check tests/e2e/spreadsheet-large-controlled-editing.acl --json",
122
139
  "test:e2e:writer-shortcuts": "a3s-test run tests/e2e/word-wps-shortcuts.acl --json",
123
140
  "test:e2e:writer-shortcuts:check": "a3s-test check tests/e2e/word-wps-shortcuts.acl --json",
124
141
  "test:e2e:writer-layout": "a3s-test run tests/e2e/word-insert-page-layout.acl --json",
@@ -140,6 +157,7 @@
140
157
  "@embedpdf/fonts-hebrew": "1.0.0",
141
158
  "@embedpdf/fonts-latin": "1.0.0",
142
159
  "@embedpdf/fonts-sc": "1.0.0",
160
+ "@embedpdf/models": "2.14.3",
143
161
  "@embedpdf/pdfium": "2.14.3",
144
162
  "@embedpdf/react-pdf-viewer": "2.14.3",
145
163
  "@fortune-sheet/core": "^1.0.4",