@a3s-lab/office 0.1.0 → 0.2.2

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 (69) hide show
  1. package/README.md +101 -24
  2. package/dist/0~2582.js +485 -0
  3. package/dist/0~4595.js +14 -7
  4. package/dist/0~4750.js +939 -0
  5. package/dist/{0~work-document-paragraph-formatting.js → 0~5861.js} +174 -3
  6. package/dist/0~7048.js +8 -6
  7. package/dist/0~9512.js +7 -4
  8. package/dist/0~document-editor.js +3147 -531
  9. package/dist/0~markdown-editor.js +26 -1
  10. package/dist/0~presentation-editor.js +68 -12
  11. package/dist/0~spreadsheet-editor.js +37 -17
  12. package/dist/0~work-document-extensions.js +588 -13
  13. package/dist/0~work-document-model-codec.js +1 -1
  14. package/dist/0~work-docx-bibliography.js +1 -1
  15. package/dist/0~work-docx-export.js +116 -55
  16. package/dist/0~work-docx-import.js +766 -107
  17. package/dist/0~work-office-diagnostics.js +2 -2
  18. package/dist/{4704.js → 2881.js} +162 -71
  19. package/dist/4104.js +2 -62
  20. package/dist/internal/features/work/editors/document-comment-window.d.ts +37 -0
  21. package/dist/internal/features/work/editors/document-navigation-panel.d.ts +3 -1
  22. package/dist/internal/features/work/editors/document-navigation-window.d.ts +64 -0
  23. package/dist/internal/features/work/editors/document-outline-navigation.d.ts +11 -0
  24. package/dist/internal/features/work/editors/document-page-navigation.d.ts +11 -1
  25. package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +31 -0
  26. package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +28 -0
  27. package/dist/internal/features/work/editors/document-picture-properties-dialog.d.ts +4 -0
  28. package/dist/internal/features/work/editors/document-search-navigation.d.ts +12 -0
  29. package/dist/internal/features/work/editors/document-table-margins-popover.d.ts +4 -0
  30. package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +51 -0
  31. package/dist/internal/features/work/editors/document-table-properties-dialog-sections.d.ts +19 -0
  32. package/dist/internal/features/work/editors/document-table-properties-dialog.d.ts +8 -0
  33. package/dist/internal/features/work/editors/office-task-pane.d.ts +1 -1
  34. package/dist/internal/features/work/editors/presentation-chart-panel.d.ts +2 -1
  35. package/dist/internal/features/work/editors/presentation-comments-panel.d.ts +2 -1
  36. package/dist/internal/features/work/editors/spreadsheet-workbook-panel.d.ts +2 -1
  37. package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -0
  38. package/dist/internal/features/work/editors/use-presentation-review-commands.d.ts +1 -1
  39. package/dist/internal/features/work/work-document-image-layout.d.ts +11 -0
  40. package/dist/internal/features/work/work-document-page-capture.d.ts +15 -0
  41. package/dist/internal/features/work/work-document-paragraph-formatting.d.ts +4 -0
  42. package/dist/internal/features/work/work-document-section.d.ts +3 -1
  43. package/dist/internal/features/work/work-document-table-borders.d.ts +20 -0
  44. package/dist/internal/features/work/work-document-table-cell-formatting.d.ts +8 -5
  45. package/dist/internal/features/work/work-document-table-geometry.d.ts +41 -0
  46. package/dist/internal/features/work/work-document-table-property-changes.d.ts +25 -0
  47. package/dist/internal/features/work/work-document-table-sizing.d.ts +15 -2
  48. package/dist/internal/features/work/work-document-word-line-metrics.d.ts +11 -0
  49. package/dist/internal/features/work/work-docx-document-layout.d.ts +2 -0
  50. package/dist/internal/features/work/work-docx-paragraph-alignment-import.d.ts +2 -1
  51. package/dist/internal/features/work/work-docx-paragraph-direction-import.d.ts +2 -1
  52. package/dist/internal/features/work/work-docx-paragraph-indent-import.d.ts +2 -1
  53. package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +2 -1
  54. package/dist/internal/features/work/work-docx-paragraph-spacing-import.d.ts +3 -2
  55. package/dist/internal/features/work/work-docx-paragraph-styles.d.ts +2 -2
  56. package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +8 -1
  57. package/dist/internal/features/work/work-docx-tab-stop-import.d.ts +2 -1
  58. package/dist/internal/features/work/work-docx-table-cell-export.d.ts +1 -1
  59. package/dist/internal/features/work/work-docx-table-cell-import.d.ts +14 -4
  60. package/dist/internal/features/work/work-docx-table-sizing-export.d.ts +1 -1
  61. package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +4 -3
  62. package/dist/internal/features/work/work-docx-table-styles.d.ts +22 -0
  63. package/dist/internal/features/work/work-types.d.ts +6 -0
  64. package/dist/office-kernel.wasm +0 -0
  65. package/dist/styles.css +1288 -233
  66. package/docs/{browser-editor-architecture.md → latest/en/browser-editor-architecture.md} +144 -35
  67. package/package.json +9 -5
  68. package/dist/0~6552.js +0 -787
  69. package/dist/0~8155.js +0 -299
@@ -100,6 +100,13 @@ keeping the pane open; a second Escape closes the clean pane. Field-level
100
100
  numeric drafts still consume Escape before the pane-level draft, so incomplete
101
101
  input cannot trigger either a workbook mutation or an accidental close.
102
102
 
103
+ Shared editor context menus keep their pointer or keyboard-selection anchor on
104
+ desktop. Below 640 px they use a safe-area-aware bottom action sheet instead:
105
+ every action is at least 44 px tall, long command sets scroll inside a bounded
106
+ surface, and Escape retains the same exact editing-target focus restoration.
107
+ The responsive change is presentation-only; command ordering, shortcuts, and
108
+ host-provided actions remain identical.
109
+
103
110
  Review actions distinguish reversible, local decisions from broad destructive
104
111
  ones. Individual revision decisions remain direct commands. Accepting or
105
112
  rejecting every revision requires confirmation, and an empty revision pane does
@@ -151,7 +158,7 @@ focus restoration.
151
158
  | Product | Implemented browser surface | Implemented kernel boundary | Next fidelity gate |
152
159
  | --- | --- | --- | --- |
153
160
  | 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/top-and-bottom image layout, 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 offsets and layering, complex table flow, searchable/vector PDF output, and loss-preserving OOXML package state |
154
- | 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, optional visual or source-only views, and a stacked phone layout | No kernel required for normal editing | CommonMark differential fixtures, multi-megabyte profiling, and an off-main-thread parser boundary when measurements justify it |
161
+ | 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 |
155
162
  | Spreadsheet | Fortune Sheet grid integrated with the shared Office shell, 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 |
156
163
  | 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 |
157
164
  | 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 |
@@ -192,6 +199,47 @@ removes editing-only state, and crops exact physical pages from bounded capture
192
199
  batches. Explicit descriptor pages remain a fallback for surfaces without a
193
200
  registered live document.
194
201
 
202
+ The Word navigation pane uses that same capture boundary for real physical-page
203
+ thumbnails instead of reconstructing an approximate text card. The current and
204
+ adjacent pages are admitted first; the remaining captures use an
205
+ `IntersectionObserver` window, one serialized queue, debounced source-mutation
206
+ refresh, and off-screen image release. Each capture clones the already measured
207
+ live page, strips editing state, and crops one exact page offset. It deliberately
208
+ does not wait for the document-wide font set or a browser animation frame:
209
+ pagination readiness is the layout authority, while unrelated fonts and
210
+ background agent tabs must not stall a preview. Text excerpts remain a bounded
211
+ loading or failure fallback. Above 48 pages, the navigation pane mounts a
212
+ contiguous window of at most 24 page buttons, plus the selected and roving pages
213
+ when either falls outside that window. Variable-height spacers preserve the
214
+ physical scroll range, while Home and End materialize and focus their sparse
215
+ destinations without relying on a browser animation frame. A deterministic
216
+ 120-page DOCX A3S Test proves bounded mounting, first/last-page keyboard access,
217
+ selection, focus retention, and spacer geometry. Raster work and page-button
218
+ DOM are therefore bounded.
219
+
220
+ The page list, heading outline, and full-text results reuse one navigation
221
+ window model. Heading and result collections switch to a window above 48 rows,
222
+ mount at most 32 contiguous rows, and add only sparse active, selected, or
223
+ keyboard-roving rows outside that range. Physical before, between, and after
224
+ spacers retain native scroll geometry; global `aria-posinset` and `aria-setsize`
225
+ values remain truthful even when most rows are not mounted. Home and End mount
226
+ their destination without an animation-frame dependency. A real 120-page DOCX
227
+ with 120 built-in headings and 120 text matches proves bounded outline and
228
+ result mounting, first/last keyboard access, exact result selection, and an
229
+ error-free browser run. Programmatic long-distance selection temporarily uses
230
+ instant document scrolling through the next paint, then restores the surface's
231
+ normal smooth-scroll style so the selected result is visible in the same frame.
232
+
233
+ Revision review reuses this window model above 48 tracked changes. It mounts at
234
+ most 32 contiguous revision cards, retains the keyboard-roving card as a sparse
235
+ pin, and represents every omitted range with a physical spacer. Arrow,
236
+ PageUp/PageDown, Home, and End can therefore reach the complete queue without
237
+ mounting it. Accepting or rejecting a revision transfers focus to the same
238
+ decision on the adjacent surviving item. A deterministic A3S Test imports a
239
+ real DOCX with 120 native OOXML insertions and proves bounded mounting,
240
+ first/last focus, the 120-to-119 decision transition, spacer geometry, and zero
241
+ console or page errors.
242
+
195
243
  Spreadsheet now uses a persistent browser Rust/WASM calculation session. The
196
244
  editor initializes it with a sparse workbook replacement, sends bounded cell
197
245
  patches from stable Fortune cell operations, and requests only the dirty
@@ -345,8 +393,14 @@ stable ProseMirror position, and distribute list-container height without
345
393
  double-counting nested content.
346
394
 
347
395
  Document image nodes carry typed layout, alignment, wrap-distance, alternative
348
- text, and size attributes. The selected image exposes the same operations
349
- through a contextual Picture ribbon. Inline images stay in normal flow;
396
+ text, size, and per-image aspect-ratio-lock attributes. The contextual Picture
397
+ ribbon keeps fast layout actions and opens one responsive Picture Properties
398
+ dialog for centimeter width and height, aspect-ratio locking, wrapping,
399
+ alignment, text distance, and alternative text. Applying the complete draft
400
+ updates only changed attributes in one separated TipTap history entry; cancel
401
+ and Escape preserve the node and return focus to the exact invoker. Dimensions
402
+ that were only projected into rounded centimeter fields retain their exact
403
+ imported pixel values when untouched. Inline images stay in normal flow;
350
404
  supported left- or right-aligned square images use browser floats, and
351
405
  top-and-bottom images clear surrounding text. Paragraphs following a square
352
406
  float remain on the DOM visual-line path because the available line width
@@ -396,6 +450,13 @@ both a monotonic document revision and an independent layout revision,
396
450
  allowing font, viewport, or page-size work to supersede an older layout without
397
451
  changing the document identity.
398
452
 
453
+ The same safe prefix is also the cache boundary for page descriptors. Stable
454
+ descriptors retain their resolved first/default/even header and footer content,
455
+ page number, preview text, and navigation target; only the rewound boundary and
456
+ new suffix are derived again. Runtime diagnostics expose reused and derived
457
+ page-chrome counts so long-document browser tests can enforce the incremental
458
+ budget instead of inferring it from elapsed time.
459
+
399
460
  It also supports explicit page and section breaks, keep-together blocks,
400
461
  keep-with-next headings, cancellation, stale-revision rejection, and automatic
401
462
  reflow after editing, resizing, font loading, or zoom changes. Page view uses
@@ -434,11 +495,12 @@ pagination and the paper ruler.
434
495
 
435
496
  Run-format import uses the same style index. It merges document run defaults,
436
497
  paragraph-style run properties, direct paragraph run properties, bounded
437
- character-style `basedOn` chains, and direct run properties. Unique sentinels
438
- survive Mammoth conversion and become ordinary inline spans before the
439
- TipTap/ProseMirror model is created. This currently preserves visible font
440
- families, half-point sizes, direct hexadecimal colors, Word highlights, and
441
- run shading. The importer also reads the DOCX font and color schemes, resolves
498
+ character-style `basedOn` chains, contextual table-style properties, and direct
499
+ run properties. Unique sentinels survive Mammoth conversion and become
500
+ ordinary inline semantics before the TipTap/ProseMirror model is created. This
501
+ currently preserves visible bold, italic, underline, strikethrough, font
502
+ families, half-point sizes, direct hexadecimal colors, Word highlights, and run
503
+ shading. The importer also reads the DOCX font and color schemes, resolves
442
504
  major/minor theme font references, system or sRGB theme colors, and tint/shade
443
505
  transforms. Superscript and subscript remain structured, mutually exclusive
444
506
  TipTap marks; their ribbon and keyboard commands switch vertical position
@@ -463,13 +525,20 @@ numbering settings. Reversed lists, per-item `value` overrides, native Word
463
525
  list-identity continuation, arbitrary multilevel templates, and loss-preserving
464
526
  custom numbering formats remain later fidelity gates.
465
527
 
466
- This slice is not yet a Microsoft Word or WPS line-layout fidelity claim.
467
- Language-complete font substitution, variable font axes, the remaining
468
- character and table style properties, arbitrary floating-object offsets,
469
- cropping, contour wrapping and layering, row-internal table splitting inside a
470
- single paragraph or an oversized multi-page row, nested tables, footnote
471
- balancing, multi-column flow, and mixed-size sections require the later layout
472
- stages below.
528
+ The declared direct-formatting layout slice now has a real WPS Writer reference
529
+ gate. Its deterministic A4 fixture uses installed Arial runs, explicit OOXML
530
+ paragraph spacing, a fixed centered table, direct cell fills and borders, and
531
+ physical cell margins. Automatic `w:line` values retain their original OOXML
532
+ multiples for export while the browser applies the measured WPS single-line
533
+ font metric; imported tables no longer receive editor-only block margins. The
534
+ Windows parity workflow exports the same fixture through WPS, captures both
535
+ 794 by 1123 CSS-pixel pages, and rejects page-size, landmark, or bounded pixel
536
+ differences. Language-complete font substitution, variable font axes, the
537
+ remaining character and table style properties, arbitrary floating-object
538
+ offsets, cropping, contour wrapping and layering, row-internal table splitting
539
+ inside a single long paragraph or complex merged-cell flow, nested tables,
540
+ footnote balancing, multi-column flow, and mixed-size sections require the
541
+ later layout stages below.
473
542
 
474
543
  Top-level tables now enter pagination as row flows. DOM measurement supplies
475
544
  row heights and stable ProseMirror positions; the Worker/Rust-WASM kernel keeps
@@ -478,31 +547,71 @@ height on continuation pages. A table-aware widget creates the paper gap and
478
547
  an `aria-hidden`, non-editable copy of the rendered header with the original
479
548
  column group. The editable row remains the only canonical content. TipTap row
480
549
  attributes preserve `cantSplit` and `tblHeader` through structured HTML and
481
- DOCX import/export. Ordinary rows whose full height fits a continuation page
482
- can split at synchronized boundaries between direct cell blocks. One
550
+ DOCX import/export. Eligible rows, including rows taller than a complete body
551
+ page, split at synchronized boundaries between direct cell blocks. One
483
552
  non-editable widget per cell aligns the page gap and paints a clipped slice of
484
553
  the same measured header overlay. The leading cell alone extends the paper-gap
485
- paint across the page margins. `cantSplit` rows, single long paragraphs, and
486
- oversized rows are still atomic and may overflow.
554
+ paint across the page margins. `cantSplit` rows and a single indivisible long
555
+ paragraph remain atomic and may overflow; nested tables and complex merged-cell
556
+ flows require a later fragmentation model.
487
557
 
488
558
  Table creation is selection-safe: a non-empty text selection is preserved and
489
559
  the chosen table is inserted after its containing block instead of replacing
490
560
  the selected content. The insert ribbon exposes a keyboard-navigable 8 by 10
491
561
  size picker. Entering a table opens separate Design and Layout contextual tabs.
492
562
  Design owns keyboard-operated style presets, the header row, multi-cell
493
- shading, and uniform borders. Layout owns row and column insertion or deletion,
494
- cell merge and split, horizontal and vertical alignment, repeated headers,
563
+ shading, and a reusable border pen with whole-selection, outside, inside, side,
564
+ inside-horizontal, and inside-vertical targets. Layout owns row and column
565
+ insertion or deletion, cell merge and split, horizontal and vertical alignment, repeated headers,
495
566
  atomic rows, centimeter-based column width and row height fields, equal row and
496
- column distribution, content/window autofit, and table deletion. Physical
567
+ column distribution, content/window autofit, table alignment, four-edge cell
568
+ margins, and table deletion. Physical
497
569
  column widths remain coherent across merged cells through ProseMirror's table
498
- map; explicit row heights and the table layout mode are typed attributes rather
499
- than transient DOM measurements. Edit, preview, print, and DOCX import/export
500
- share those attributes. Fixed DOCX tables round-trip `tblGrid`, `tcW`,
501
- `tblLayout`, and `trHeight`, while window/content autofit remains responsive in
502
- the browser. Command availability comes from the ProseMirror table state, so
503
- actions that cannot apply to the current selection remain disabled. Per-edge
504
- and theme borders, percentage-width column authoring, nested-table editing, and
505
- arbitrary table-style inheritance remain explicit fidelity gaps.
570
+ map. The layout algorithm, auto/percentage/pixel preferred width, alignment,
571
+ indent, table-level cell margins, cell-level margin overrides, and explicit row
572
+ heights are independent typed attributes rather than transient DOM
573
+ measurements. Edit, preview, print, and DOCX import/export share that geometry.
574
+ Table, row, column, and cell properties are edited through one four-tab Table
575
+ Properties dialog instead of disconnected immediate commands. The dialog owns
576
+ preferred width, placement, indent, selected-row height and pagination,
577
+ current-column width, selected-cell vertical alignment, and cell margins. It
578
+ reads imported geometry without approximation, validates the complete draft,
579
+ and dispatches one TipTap transaction and one undo record. Draft fields are
580
+ display projections only: unchanged pixel values and partial per-cell margin
581
+ inheritance are copied from the typed source instead of being quantized through
582
+ the two-decimal centimeter UI. Cancel and Escape leave the model untouched and
583
+ restore the exact ribbon invoker. At compact widths the four tabs, choices,
584
+ steppers, and commit targets remain inside the viewport with touch-sized hit
585
+ areas.
586
+ DOCX tables independently round-trip `tblGrid`, `tcW`, `tblLayout`, `tblW`,
587
+ `jc`, `tblInd`, `tblCellMar`, `tcMar`, and `trHeight`; numeric fiftieth-percent
588
+ and string percentage widths keep their actual size instead of collapsing to a
589
+ full-width table. Window/content autofit remains responsive in the browser.
590
+ Independent top, right, bottom, and left cell-border attributes
591
+ render identically in edit and preview, export as independent `w:tcBorders`,
592
+ and reopen without being flattened. Explicit table-level outer and inside
593
+ borders resolve onto their owning cell edges during import. Direct
594
+ `themeColor`/`themeFill` values and their tint or shade transforms resolve from
595
+ the DOCX package theme into stable edit, preview, and export RGB values. A
596
+ default or referenced `w:style w:type="table"` resolves through a bounded,
597
+ cycle-safe `w:basedOn` chain. `w:tblLook` flags or bitmasks, row and column band
598
+ sizes, `gridSpan`, and `gridBefore`/`gridAfter` select `wholeTable`, row/column
599
+ bands, first/last rows or columns, and corner-cell conditions in Word precedence
600
+ order. Their cell fills, per-edge borders, run emphasis, fonts, and colors, plus
601
+ paragraph alignment, direction, indents, spacing and line rules, pagination
602
+ rules, and tab stops enter the marker pipeline after paragraph styles and before
603
+ direct paragraph, character-style, or run formatting. Direct table and cell
604
+ properties remain higher-priority layers for cell presentation. Theme-derived
605
+ conditional presentation is materialized as stable RGB for editing, preview,
606
+ and regenerated DOCX output.
607
+ The real styled-table fixture exercises a centered 62.5% table, table margins,
608
+ a first-cell margin override, and matching edit/preview geometry through A3S
609
+ Test.
610
+ Command availability comes from the ProseMirror table state, so actions that
611
+ cannot apply to the current selection remain disabled. Loss-preserving semantic
612
+ theme references, less-common conditional paragraph properties outside the
613
+ supported layout set, percentage-width column authoring, nested-table editing,
614
+ and complex merged-cell conditional flow remain explicit fidelity gaps.
506
615
 
507
616
  Paragraph tab stops are typed node attributes with normalized positions,
508
617
  left/center/right/decimal alignment, and leader styles. A leaf
@@ -688,11 +797,11 @@ bundle regression.
688
797
  - Extend the current horizontal and vertical page rulers with bidirectional and
689
798
  locale-complete tab behavior, plus complete style, numbering, and theme
690
799
  inheritance beyond the implemented paragraph slices.
691
- - Complete row-internal splitting for single paragraphs and oversized
692
- multi-page rows, and add nested tables, full floating-object geometry beyond
693
- the supported square/top-and-bottom image anchors, footnote balancing,
694
- columns, and mixed page sections. Row-flow pagination, direct-cell block
695
- splitting, repeating headers, and the initial image-wrapping slice are
800
+ - Complete row-internal splitting for single indivisible paragraphs and
801
+ complex merged-cell flows, and add nested tables, full floating-object
802
+ geometry beyond the supported square/top-and-bottom image anchors, footnote
803
+ balancing, columns, and mixed page sections. Row-flow pagination, direct-cell
804
+ block splitting, repeating headers, and the initial image-wrapping slice are
696
805
  already implemented.
697
806
  - Keep pagination results as mapped ProseMirror decorations so reflow never
698
807
  corrupts selection or undo history.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.1.0",
3
+ "version": "0.2.2",
4
4
  "description": "Open-source browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",
@@ -50,7 +50,7 @@
50
50
  "types": "./dist/index.d.ts",
51
51
  "files": [
52
52
  "dist",
53
- "docs/browser-editor-architecture.md",
53
+ "docs/latest/en/browser-editor-architecture.md",
54
54
  "README.md",
55
55
  "LICENSE",
56
56
  "THIRD_PARTY_NOTICES.md"
@@ -85,9 +85,12 @@
85
85
  "playground:visual": "playwright test --config playwright.config.ts",
86
86
  "playground:visual:update": "playwright test --config playwright.config.ts --update-snapshots",
87
87
  "test": "rstest",
88
- "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-comments-drawer.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-find-replace-phone.acl --json && a3s-test run tests/e2e/word-page-navigation.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-table-phone.acl --json && a3s-test run tests/e2e/word-cross-reference-phone.acl --json && a3s-test run tests/e2e/spreadsheet-phone-rename.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/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-docs-navigation.acl --json",
89
- "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-comments-drawer.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-find-replace-phone.acl --json && a3s-test check tests/e2e/word-page-navigation.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-table-phone.acl --json && a3s-test check tests/e2e/word-cross-reference-phone.acl --json && a3s-test check tests/e2e/spreadsheet-phone-rename.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/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-docs-navigation.acl --json",
88
+ "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-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-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/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/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",
89
+ "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-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-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/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/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",
90
90
  "test:e2e:fixtures": "bun scripts/create-e2e-fixtures.ts",
91
+ "test:e2e:wps-layout": "bun run test:e2e:fixtures && a3s-test run tests/e2e/word-wps-layout-parity.acl --json && a3s-test run tests/e2e/word-wps-font-grid-parity.acl --json",
92
+ "test:e2e:wps-layout:check": "bun run test:e2e:fixtures && a3s-test check tests/e2e/word-wps-layout-parity.acl --json && a3s-test check tests/e2e/word-wps-font-grid-parity.acl --json",
93
+ "test:wps-layout": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/test-wps-layout-parity.ps1",
91
94
  "test:watch": "rstest --watch",
92
95
  "typecheck": "tsc --noEmit"
93
96
  },
@@ -160,6 +163,7 @@
160
163
  },
161
164
  "private": false,
162
165
  "patchedDependencies": {
163
- "@fortune-sheet/react@1.0.4": "patches/@fortune-sheet%2Freact@1.0.4.patch"
166
+ "@fortune-sheet/react@1.0.4": "patches/@fortune-sheet%2Freact@1.0.4.patch",
167
+ "html2canvas@1.4.1": "patches/html2canvas@1.4.1.patch"
164
168
  }
165
169
  }