@a3s-lab/office 0.15.0 → 0.17.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 (35) hide show
  1. package/COLLABORATION_ROADMAP.md +15 -5
  2. package/README.md +28 -2
  3. package/dist/0~6090.js +7 -8
  4. package/dist/0~spreadsheet-editor.js +2347 -406
  5. package/dist/2180.js +370 -34
  6. package/dist/4104.js +657 -22
  7. package/dist/5184.js +1 -1
  8. package/dist/8715.js +156 -156
  9. package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +2 -0
  10. package/dist/internal/collaboration/office-spreadsheet-collaboration-validation-support.d.ts +6 -0
  11. package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +1 -0
  12. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +59 -1
  13. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +12 -0
  14. package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +4 -2
  15. package/dist/internal/features/work/editors/spreadsheet-font-size-command.d.ts +18 -0
  16. package/dist/internal/features/work/editors/spreadsheet-font-size.d.ts +4 -0
  17. package/dist/internal/features/work/editors/spreadsheet-table-command.d.ts +3 -0
  18. package/dist/internal/features/work/editors/spreadsheet-table-conversion.d.ts +7 -0
  19. package/dist/internal/features/work/editors/spreadsheet-table-dialog.d.ts +8 -0
  20. package/dist/internal/features/work/editors/spreadsheet-table-limits.d.ts +1 -0
  21. package/dist/internal/features/work/editors/spreadsheet-table-reconciliation.d.ts +21 -0
  22. package/dist/internal/features/work/editors/spreadsheet-table-render.d.ts +16 -0
  23. package/dist/internal/features/work/editors/spreadsheet-table-ribbon.d.ts +8 -0
  24. package/dist/internal/features/work/editors/spreadsheet-table-style.d.ts +31 -0
  25. package/dist/internal/features/work/editors/spreadsheet-table.d.ts +55 -0
  26. package/dist/internal/features/work/editors/use-spreadsheet-table.d.ts +23 -0
  27. package/dist/internal/features/work/work-types.d.ts +100 -0
  28. package/dist/internal/features/work/work-xlsx-interop.d.ts +2 -0
  29. package/dist/internal/features/work/work-xlsx-table-filters.d.ts +3 -0
  30. package/dist/internal/features/work/work-xlsx-tables.d.ts +4 -0
  31. package/dist/office-kernel.wasm +0 -0
  32. package/dist/styles.css +204 -3
  33. package/dist/work-spreadsheet-package-scan.worker.js +3 -2
  34. package/docs/latest/en/browser-editor-architecture.md +43 -0
  35. package/package.json +6 -1
@@ -271,9 +271,10 @@ comments, and delete-vs-edit cases converge and survive PPTX round trips.
271
271
 
272
272
  ### Phase 4: Spreadsheet
273
273
 
274
- Status: browser collaboration foundation plus native conflict-local single-cell
275
- and atomic batch-cell mutations implemented; structural operations, native
276
- recalculation parity, and XLSX concurrency coverage are pending.
274
+ Status: browser collaboration foundation, ordered ID-keyed native table
275
+ records, and native conflict-local single-cell plus atomic batch-cell mutations
276
+ implemented; broader structural operations, native recalculation parity, and
277
+ XLSX concurrency coverage are pending.
277
278
 
278
279
  - Stable sheet/named-range order arrays, ID-keyed records, and append-only
279
280
  creation claims avoid a serialized workbook or dense worksheet root.
@@ -285,6 +286,12 @@ recalculation parity, and XLSX concurrency coverage are pending.
285
286
  and dynamic-array metadata leaves do not replace their containing object.
286
287
  - Images, charts, pivot tables, defined names, calculation settings, print
287
288
  areas/titles, page breaks, and page setup have conflict-local typed roots.
289
+ - Native Tables/ListObjects use a per-sheet ID-keyed record map plus an explicit
290
+ order array. Immutable parent-scoped creation claims prevent ID reuse;
291
+ recursively patched name, range, column, filter, style, header/totals, and
292
+ stripe fields let independent browser design edits converge. Shared-input
293
+ validation rejects duplicate table/defined names, overlaps, invalid styles,
294
+ malformed columns or filters, and out-of-sheet ranges before projection.
288
295
  - Snapshot writes are translated into `previous -> next` patches. Unrelated
289
296
  stale snapshots preserve remote cells and records; a delete that would
290
297
  discard a remote edit fails closed and asks the caller to refresh.
@@ -316,8 +323,11 @@ recalculation parity, and XLSX concurrency coverage are pending.
316
323
 
317
324
  Remaining:
318
325
 
319
- - Add stable structural operations and reference transforms for row/column
320
- insertion/deletion, merged ranges, tables, sort, and named references.
326
+ - Add native typed structural operations and reference transforms for
327
+ row/column insertion/deletion, merged ranges, sort, and named references;
328
+ bridge the existing native table add/set/remove file mutations into the
329
+ browser-convergent table records, then add collaboration-aware conversion,
330
+ calculated-column, totals, and structured-reference operations.
321
331
  - Treat calculated values as derived once browser and native recalculation are
322
332
  deterministic and source formulas remain the only canonical formula state.
323
333
  - Add offline/reordered-update property tests plus merged XLSX export/reopen.
package/README.md CHANGED
@@ -192,6 +192,9 @@ through the CLI, standard MCP server, or A3S Code.
192
192
  The host owns rooms, authentication, authorization, network delivery, offline
193
193
  buffering, persistence, and the `Y.Doc`; A3S Office owns format-specific
194
194
  bindings, local undo, validated presence, and conflict-local typed mutations.
195
+ Spreadsheet table state uses ordered, ID-keyed records with creation claims;
196
+ independent table name, style, stripe, column, and filter fields can converge
197
+ without replacing a serialized worksheet.
195
198
  An authenticated Document `comment` session can select text, create a durable
196
199
  thread, reply, resolve or reopen it, and delete only review records owned by
197
200
  its actor while canonical content remains read-only. The server independently
@@ -543,13 +546,25 @@ interaction model.
543
546
  multiple ranges, compact rule writes and removal, input messages,
544
547
  invalid-input blocking, 1900/1904-aware XLSX date round trips, exact focus
545
548
  restoration, one-step Undo, and fail-closed protected, merged, pivot,
546
- read-only, invalid, out-of-bounds, or over-10,000-cell targets, a WPS-style
549
+ read-only, invalid, out-of-bounds, or over-10,000-cell targets, native
550
+ Spreadsheet Tables/ListObjects through Insert and grid-scoped `Cmd/Ctrl+T`,
551
+ bounded current-region or explicit-range creation, canonical unique headers,
552
+ a contextual Table Design ribbon with editable names, 60 OOXML
553
+ Light/Medium/Dark styles, first/last-column emphasis and row/column stripes,
554
+ visible-range Canvas styling, sparse-safe Convert to Range, row/column
555
+ reconciliation, native XLSX table parts and supported filters, one-step Undo,
556
+ browser/Yjs record convergence, and fail-closed overlap, merge, AutoFilter,
557
+ protection, pivot, invalid, or over-100,000-cell targets, a WPS-style
547
558
  Format Painter with
548
559
  single-use and double-click locked
549
560
  sessions, cross-sheet range-pattern tiling, Escape cancellation, and native
550
- style-only writes, a Home and Font cell-border split control with side, all,
561
+ style-only writes, Home and Font Grow/Shrink Font commands with
562
+ `Cmd/Ctrl+Shift+.` / `Cmd/Ctrl+]` and `Cmd/Ctrl+Shift+,` / `Cmd/Ctrl+[` aliases,
563
+ per-cell mixed-size stepping, native rectangle compaction, a 10,000-cell
564
+ bound, and one-step Undo, plus a cell-border split control with side, all,
551
565
  outside, inside, horizontal, vertical, clear, and diagonal targets, ten
552
566
  native line styles, exact color selection, compact overlapping range writes,
567
+ `Cmd/Ctrl+Shift+&` Outside Borders and `Cmd/Ctrl+Shift+_` Clear Borders,
553
568
  single-update undo, and grid-focus restoration, Conditional Formatting under
554
569
  Home and Styles, executable
555
570
  sorting plus WPS-style AutoFilter under Data, finite current-region discovery,
@@ -734,6 +749,15 @@ Protection ranges, passwordless editable ranges, and conditional formatting
734
749
  also remain compact and round-trip through native XLSX records without
735
750
  allocating every covered cell.
736
751
 
752
+ Worksheet Tables/ListObjects live in `sheet.tables` as semantic records with
753
+ stable IDs, workbook-unique names, zero-based ranges, ordered columns, filters,
754
+ header/totals flags, and built-in style identity. XLSX import and export keep
755
+ native table parts and relationships. Table styling is resolved only for the
756
+ visible Canvas cells; converting a table to a range materializes the confirmed
757
+ appearance without densifying unrelated worksheet space. Structured-reference
758
+ calculation, calculated columns, complete totals authoring, slicers, and
759
+ external/query tables are not yet claimed.
760
+
737
761
  Use `downloadArtifact` to start a browser download or
738
762
  `createArtifactBlob` when your application owns upload and persistence.
739
763
  Imported DOCX artifacts are source-backed: safe source-only OPC parts,
@@ -1495,6 +1519,8 @@ without hard-coded return URLs.
1495
1519
 
1496
1520
  - [Live Playground](https://a3s-lab.github.io/Office/)
1497
1521
  - [Documentation center](https://a3s-lab.github.io/Office/docs/)
1522
+ - [A3S Office 0.17.0 documentation](https://a3s-lab.github.io/Office/docs/0.17.0/)
1523
+ - [A3S Office 0.16.0 documentation](https://a3s-lab.github.io/Office/docs/0.16.0/)
1498
1524
  - [A3S Office 0.15.0 documentation](https://a3s-lab.github.io/Office/docs/0.15.0/)
1499
1525
  - [A3S Office 0.14.0 documentation](https://a3s-lab.github.io/Office/docs/0.14.0/)
1500
1526
  - [A3S Office 0.13.1 documentation](https://a3s-lab.github.io/Office/docs/0.13.1/)
package/dist/0~6090.js CHANGED
@@ -571,17 +571,16 @@ function Popover({ label, panelLabel, trigger, children, disabled = false, class
571
571
  portal,
572
572
  updateFloatingPosition
573
573
  ]);
574
- useEffect(()=>{
575
- if (!open || !focusFirstOnOpen) return;
576
- const frame = requestAnimationFrame(()=>{
577
- firstFocusableElement(panelElementRef.current)?.focus({
578
- preventScroll: true
579
- });
574
+ const panelReadyForFocus = !portal || null !== floatingPosition;
575
+ useLayoutEffect(()=>{
576
+ if (!open || !focusFirstOnOpen || !panelReadyForFocus) return;
577
+ firstFocusableElement(panelElementRef.current)?.focus({
578
+ preventScroll: true
580
579
  });
581
- return ()=>cancelAnimationFrame(frame);
582
580
  }, [
583
581
  focusFirstOnOpen,
584
- open
582
+ open,
583
+ panelReadyForFocus
585
584
  ]);
586
585
  const triggerProps = {
587
586
  ref: (element)=>{