@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
package/README.md CHANGED
@@ -91,8 +91,12 @@ The images below are committed visual-regression baselines from the real
91
91
  - **Product-native UI** — Complete Office-style surfaces with no required
92
92
  backend, account system, or storage model.
93
93
  - **Accessible responsive shell** — Compact sidebars, slide navigation, AI
94
- panes, dialogs, menus, and popovers share bounded keyboard navigation,
95
- background isolation, topmost Escape handling, and focus restoration.
94
+ panes, responsive chart inspectors, dialogs, menus, and popovers share
95
+ bounded keyboard navigation, background isolation, topmost Escape handling,
96
+ and focus restoration.
97
+ Persistent desktop navigation and the temporary phone drawer keep separate
98
+ open states, so live breakpoint changes never turn a desktop sidebar into an
99
+ unexpected blocking modal or steal focus from the workspace.
96
100
  Shared color palettes expand to an eight-column touch layout on phones while
97
101
  preserving spatial arrow-key navigation.
98
102
  - **Editor-scoped zoom** — Status controls and Ctrl/Cmd + mouse-wheel gestures
@@ -246,20 +250,79 @@ interaction model.
246
250
 
247
251
  - **Document** — Pagination, sections, focused page-setup tabs, clean page
248
252
  margins with on-demand header/footer editing, outline navigation with
249
- contextual full-text results, styles,
253
+ contextual full-text results, keyboard-operated live physical-page raster
254
+ thumbnails with viewport-bounded capture, and shared virtualized
255
+ long-document windows for page buttons, heading rows, full-text results, and
256
+ tracked-revision and anchored-comment review that preserve native scroll
257
+ distance, sparse current/selection/draft pins, and Home/End reachability;
258
+ paragraph styles and phone-sized paragraph-spacing and pagination controls
259
+ with touch targets and exact invoker-focus restoration; stable compact-ribbon
260
+ edge paging and viewport-bounded list galleries with touch-sized numbering
261
+ actions, selection-preserving bullet and numbering commands, and explicit
262
+ Escape-to-invoker focus restoration;
250
263
  grouped bundled, common system, monospace, imported, and host-provided font
251
- choices with live typeface previews, precision table sizing and autofit,
252
- viewport-safe comment drafting,
253
- focus-preserving comment review and citation drafts, tracked changes, notes,
264
+ choices with live typeface previews, independent table layout algorithms,
265
+ auto, percentage, or pixel preferred widths, left/center/right placement,
266
+ indentation, table-level cell margins, cell-level margin overrides, and
267
+ rendered column measurements for autofit tables. One Table Properties dialog
268
+ presents table, row, column, and cell tabs. It combines preferred width,
269
+ placement, and indent with selected-row height and pagination, current-column
270
+ width, and selected-cell vertical alignment and margins. The complete draft
271
+ commits in one TipTap transaction and one undo record while untouched imported
272
+ measurements and partial margin inheritance retain their exact source values.
273
+ Cancel and Escape discard the draft and restore the exact ribbon invoker;
274
+ compact layouts keep tabs, numeric steppers, and footer actions touch-sized. A
275
+ contextual Picture Properties workflow combines centimeter width and height,
276
+ a per-image aspect-ratio lock, inline/square/top-and-bottom wrapping,
277
+ alignment, text distance, and alternative text. It commits only changed
278
+ fields in one TipTap history entry, preserves untouched imported dimensions
279
+ exactly, and retains the image selection and invoker focus after apply,
280
+ cancel, or Escape on desktop and phone layouts. A
281
+ reusable table-border pen with all, outside, inside, and individual-edge
282
+ targets, per-edge DOCX border preservation, and bounded `basedOn` table-style
283
+ inheritance with whole-table, banded row or column, first/last row or column,
284
+ and corner-cell formatting. Conditional fills, borders, bold, italic,
285
+ underline, strikethrough, fonts, and text colors are materialized before
286
+ direct table, cell, paragraph, and run formatting. Conditional paragraph
287
+ alignment, direction, indents, spacing and line rules, pagination rules, and
288
+ tab stops use the same precedence chain. Theme tint and shade values resolve
289
+ for table borders and cell fills across edit, preview, and RGB-stable export.
290
+ Splittable table rows that exceed a full physical page
291
+ continue at paragraph boundaries with repeated heading rows on every page,
292
+ viewport-safe comment drafting and focus-preserving citation drafts, tracked
293
+ changes, notes,
254
294
  pointer- and Shift+F10-accessible host-defined selection menus, and shared
255
295
  edit/preview/PDF typography and page-chrome placement. Editing, read-only
256
- preview, and browser PDF export share one live pagination result.
296
+ preview, and browser PDF export share one live pagination result. Tail edits
297
+ reuse the stable physical-page prefix, including resolved first/odd/even
298
+ headers, footers, page numbers, and navigation descriptors.
299
+ Real DOCX fixtures provide deterministic A3S Test evidence for inherited
300
+ table styling across edit and preview, a centered 62.5% table with table and
301
+ cell margin overrides, all four Table Properties tabs at 390 px, exact
302
+ preservation of untouched cell-margin edges, a complete 390 px Picture
303
+ Properties flow, and a 120-paragraph row across three physical pages through
304
+ the final table content and following paragraph.
305
+ A direct-formatting A4 fixture also runs through a real WPS Writer PDF export
306
+ and a page-only browser comparison. Its automatic line spacing, paragraph
307
+ gaps, centered fixed table, row heights, borders, fills, and cell margins
308
+ stay within the checked one-pixel layout-landmark budget while preserving
309
+ the original OOXML line multiples for DOCX export.
310
+ Separate 30-row common-font, 36-row CJK-font, 18-row document-grid, and
311
+ 30-row multilingual-script matrices now gate text-band positions against
312
+ WPS. DOCX import selects the Word `ascii`, `hAnsi`, `eastAsia`, or `cs` font
313
+ slot from the run script, including complex-script bold, italic, size, and
314
+ RTL overrides. The browser keeps the measured per-font automatic-line
315
+ advance, while DOCX round trips retain the section `docGrid` type and line
316
+ pitch and each run's `snapToGrid` override.
257
317
  _DOCX import/export; PDF export._
258
318
  - **Markdown** — GFM source, visual editing, synchronized and resizable split
259
319
  preview, source-native undo/redo with typing coalescing and selection restore,
260
320
  source-aware ribbon formatting and shortcuts, empty-source guidance, task
261
- lists, tables, links, images, code, and keyboard-accessible host-defined
262
- selection menus across both editing surfaces. _Markdown import/export._
321
+ lists, tables, links, images, code, a flat reading surface with a comfortable
322
+ line length, and keyboard-accessible host-defined selection menus across both
323
+ editing surfaces. At phone widths, Source and Preview each use the complete
324
+ workspace instead of being compressed into two stacked panes. _Markdown
325
+ import/export._
263
326
  - **Spreadsheet** — Multiple sheets, formulas, dependency-aware recalculation,
264
327
  live selection statistics, an A3S-owned worksheet bar with lifecycle and
265
328
  color controls, safe deletion confirmation, in-place rename validation, a
@@ -269,11 +332,15 @@ interaction model.
269
332
  PageUp/PageDown, row, column, and all-cells selection shortcuts, Cmd/Ctrl
270
333
  formatting through root-scoped capture before vendor grid listeners, an
271
334
  editor-owned Cmd/Ctrl+F search bar that finds displayed values, raw values,
272
- formulas, and sparse cells without opening browser Find,
335
+ formulas, and sparse cells without opening browser Find, with a viewport-safe
336
+ phone layout, touch-sized controls, and exact grid-focus restoration,
337
+ desktop workbook task panes that become focus-contained phone dialogs with
338
+ an inert workbook background and exact ribbon-invoker restoration,
273
339
  Shift+F11 creation, Ctrl/Cmd+PageUp/PageDown switching in edit and read-only
274
340
  preview,
275
341
  one shared cell/worksheet context-menu surface with executable shortcut
276
- hints, keyboard-operated cells and sheet tabs, direct type-to-edit,
342
+ hints that becomes a touch-sized, scrollable bottom action sheet on phones,
343
+ keyboard-operated cells and sheet tabs, direct type-to-edit,
277
344
  permission-resilient multi-cell cut/copy/paste, clear, F2 editing, and
278
345
  focus-safe Escape behavior, direct
279
346
  font-family, vertical-alignment, text-wrap, number/percent, and decimal
@@ -283,9 +350,13 @@ interaction model.
283
350
  transforms, keyboard-accessible table-size insertion, Shift+F10-accessible
284
351
  native slide and object context actions, guides, comments, transitions,
285
352
  editor-scoped formatting and clipboard shortcuts that restore the selected
286
- object, a dismissible phone slide navigator, a top-aligned phone canvas with
287
- a priority-aware status bar, one-step slideshow from the beginning or current
288
- slide, keyboard-complete playback, and a responsive presenter view with one
353
+ object, a docked desktop chart inspector that becomes a focus-contained modal
354
+ surface whenever it overlays the canvas, docked desktop comment review that
355
+ becomes a readable, touch-sized, focus-contained full-editor modal on phones
356
+ with dirty-draft cancellation and exact invoker restoration, a dismissible
357
+ phone slide navigator, a top-aligned phone canvas with a priority-aware status
358
+ bar, one-step slideshow from the beginning or current slide,
359
+ keyboard-complete playback, and a responsive presenter view with one
289
360
  navigation strip, current/next context, speaker notes, and a session timer.
290
361
  _PPTX import/export; PDF export._
291
362
  - **PDF** — PDFium rendering, navigation, search, form filling, annotations,
@@ -389,8 +460,8 @@ CLI, MCP, the typed Rust API, and the packaged Office Skill share the same
389
460
  bounded contracts. They inspect and modify files without launching desktop
390
461
  Office or scraping editor UI.
391
462
 
392
- Read the [native engine design](docs/native-office-engine.md), the complete
393
- [CLI reference](docs/cli-reference.md), or the published
463
+ Read the [native engine design](docs/latest/en/native-office-engine.md), the
464
+ complete [CLI reference](docs/latest/en/cli-reference.md), or the published
394
465
  [CLI and Skill guide](https://a3s-lab.github.io/Office/docs/automation/).
395
466
 
396
467
  ## Architecture
@@ -408,7 +479,8 @@ PDFium provider for read-only PDF page evidence. Both planes expose typed
408
479
  contracts; neither requires an A3S backend.
409
480
 
410
481
  For engine ownership, Worker/WASM boundaries, delivery stages, and performance
411
- gates, see [Browser editor architecture](docs/browser-editor-architecture.md).
482
+ gates, see
483
+ [Browser editor architecture](docs/latest/en/browser-editor-architecture.md).
412
484
 
413
485
  ## Project status
414
486
 
@@ -420,7 +492,7 @@ The project targets predictable browser editing and file preservation, not
420
492
  pixel parity with every Microsoft Office or WPS feature. Unsupported OOXML
421
493
  semantics and fidelity gaps remain explicit compatibility boundaries instead
422
494
  of being silently approximated. Track product depth and release evidence in
423
- the [editor quality roadmap](docs/editor-quality-roadmap.md).
495
+ the [editor quality roadmap](docs/latest/en/editor-quality-roadmap.md).
424
496
 
425
497
  ## Development
426
498
 
@@ -442,18 +514,23 @@ committed visual contracts; see [CONTRIBUTING.md](CONTRIBUTING.md).
442
514
  ## Documentation
443
515
 
444
516
  The published website keeps the interactive Playground at its root and builds
445
- the searchable Rspress documentation center under `/docs/`. Both surfaces use
446
- the same deployment base, so preview, Pages, and fork deployments keep working
517
+ the searchable Rspress documentation center under `/docs/`. Simplified Chinese
518
+ is the stable default, English remains available from the language menu, and
519
+ the version menu switches between `latest` and frozen release documentation.
520
+ Search is scoped to the active language and version. Both surfaces use the
521
+ same deployment base, so preview, Pages, and fork deployments keep working
447
522
  without hard-coded return URLs.
448
523
 
449
524
  - [Live Playground](https://a3s-lab.github.io/Office/)
450
525
  - [Documentation center](https://a3s-lab.github.io/Office/docs/)
526
+ - [A3S Office 0.2.0 documentation](https://a3s-lab.github.io/Office/docs/0.2.0/)
527
+ - [A3S Office 0.1.0 documentation](https://a3s-lab.github.io/Office/docs/0.1.0/)
451
528
  - [React, Vue, and Web Component integration](https://a3s-lab.github.io/Office/docs/components/)
452
529
  - [Office CLI and coding-agent Skill](https://a3s-lab.github.io/Office/docs/automation/)
453
- - [Browser editor architecture](docs/browser-editor-architecture.md)
454
- - [Native Office engine](docs/native-office-engine.md)
455
- - [CLI reference](docs/cli-reference.md)
456
- - [Editor quality roadmap](docs/editor-quality-roadmap.md)
530
+ - [Browser editor architecture](docs/latest/en/browser-editor-architecture.md)
531
+ - [Native Office engine](docs/latest/en/native-office-engine.md)
532
+ - [CLI reference](docs/latest/en/cli-reference.md)
533
+ - [Editor quality roadmap](docs/latest/en/editor-quality-roadmap.md)
457
534
  - [Changelog](CHANGELOG.md)
458
535
 
459
536
  ## Community and security