@a3s-lab/office 0.8.1 → 0.9.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.
@@ -247,9 +247,9 @@ comments, and delete-vs-edit cases converge and survive PPTX round trips.
247
247
 
248
248
  ### Phase 4: Spreadsheet
249
249
 
250
- Status: browser collaboration foundation and native conflict-local cell
251
- mutations implemented; structural operations, native recalculation parity, and
252
- XLSX concurrency coverage are pending.
250
+ Status: browser collaboration foundation plus native conflict-local single-cell
251
+ and atomic batch-cell mutations implemented; structural operations, native
252
+ recalculation parity, and XLSX concurrency coverage are pending.
253
253
 
254
254
  - Stable sheet/named-range order arrays, ID-keyed records, and append-only
255
255
  creation claims avoid a serialized workbook or dense worksheet root.
@@ -282,11 +282,16 @@ XLSX concurrency coverage are pending.
282
282
  and an empty sheet's first write stays sparse. Native restart, real CLI/MCP
283
283
  subprocesses, and browser Yjs duplicate/reordered delivery cover the same
284
284
  update contract.
285
+ - `spreadsheet-batch-cells` translates one paste, fill, or other bounded user
286
+ gesture into 1 to 4,096 distinct coordinates in one sheet and one Yjs
287
+ transaction. Set/create changes retain recursive optimistic guards; delete
288
+ changes require an exact complete observed cell. Every change is preflighted
289
+ against one shared sheet snapshot, so one conflict rejects the entire batch
290
+ without partial fields, presence markers, dense dimensions, or durable log
291
+ growth. Single-cell mutations use this same kernel.
285
292
 
286
293
  Remaining:
287
294
 
288
- - Translate one user gesture into one transaction; batch paste/fill/sort/filter
289
- without emitting a document-sized replacement.
290
295
  - Add stable structural operations and reference transforms for row/column
291
296
  insertion/deletion, merged ranges, tables, sort, and named references.
292
297
  - Treat calculated values as derived once browser and native recalculation are
@@ -461,9 +466,10 @@ are pending.
461
466
  without replacing the full document.
462
467
  - Spreadsheet cell mutations create or recursively patch one zero-based
463
468
  coordinate after matching the caller's observed cell, or delete it only after
464
- an exact complete-cell match. They preserve the browser's field-addressed
465
- representation, dense/sparse projection mode, and atomic fail-closed
466
- semantics without replacing a worksheet or workbook.
469
+ an exact complete-cell match. `spreadsheet-batch-cells` applies 1 to 4,096
470
+ distinct changes from one sheet snapshot in one transaction. They preserve
471
+ the browser's field-addressed representation, dense/sparse projection mode,
472
+ and atomic fail-closed semantics without replacing a worksheet or workbook.
467
473
  - Presentation scene-element mutations create, update, move, or tombstone one
468
474
  stable object inside a slide, master, or layout. Canonical creation claims
469
475
  prevent conflicting same-ID reuse, optimistic top-level field guards merge
package/README.md CHANGED
@@ -144,7 +144,7 @@ The images below are committed visual-regression baselines from the real
144
144
  - **Automation outside the browser** — The native Rust CLI, standard MCP
145
145
  server, and Office Skill share bounded mutation contracts. Coding agents can
146
146
  also keep a durable Yrs replica, exchange standard Yjs v1 updates and state
147
- vectors, perform authorized typed Markdown, Document, Spreadsheet cell,
147
+ vectors, perform authorized typed Markdown, Document, Spreadsheet cell/batch,
148
148
  Presentation scene-element and z-order, and PDF annotation, form-value, and
149
149
  review changes, including attributable Document selection comments, replies,
150
150
  text suggestions, and atomic final decisions, retain browser/native actor
@@ -1109,6 +1109,13 @@ cargo run -p a3s-office-cli -- collab mutate .a3s/plan.replica \
1109
1109
  --operation-id edit-45 \
1110
1110
  --mutation '{"type":"spreadsheet-set-cell","sheetId":"sheet-data","row":1,"column":0,"expectedCell":{"v":10,"m":"10"},"nextCell":{"v":12,"m":"12","f":"=6*2"}}' --json
1111
1111
 
1112
+ # Apply one bounded Spreadsheet gesture atomically. Coordinates must be unique;
1113
+ # nextCell:null is an exact guarded delete.
1114
+ cargo run -p a3s-office-cli -- collab mutate .a3s/plan.replica \
1115
+ --artifact-id plan --kind spreadsheet --actor-id agent-7 --mode edit \
1116
+ --operation-id paste-46 \
1117
+ --mutation '{"type":"spreadsheet-batch-cells","sheetId":"sheet-data","changes":[{"row":1,"column":0,"expectedCell":{"v":12,"m":"12","f":"=6*2"},"nextCell":{"v":14,"m":"14","f":"=7*2"}},{"row":1,"column":1,"expectedCell":null,"nextCell":{"v":20,"m":"20"}},{"row":2,"column":0,"expectedCell":{"v":"obsolete","m":"obsolete"},"nextCell":null}]}' --json
1118
+
1112
1119
  # Update one Presentation scene element after matching the complete observed
1113
1120
  # record. Create/delete use presentation-create/delete-element.
1114
1121
  cargo run -p a3s-office-cli -- collab mutate .a3s/deck.replica \
@@ -1197,7 +1204,11 @@ write only changed leaves, so unrelated concurrent value, formula, style,
1197
1204
  hyperlink, note, and metadata edits merge. Use `expectedCell: null` only when
1198
1205
  creating an observed blank coordinate. Spreadsheet deletion requires the exact
1199
1206
  complete current cell, dense projections keep their dimensions, and sparse or
1200
- empty sheets remain sparse. Presentation creation writes one complete element
1207
+ empty sheets remain sparse. `spreadsheet-batch-cells` applies 1 to 4,096
1208
+ distinct coordinates in one sheet after checking every guard against the same
1209
+ snapshot, then writes fields, presence markers, and dense dimensions in one
1210
+ Yjs transaction. One conflict rejects the complete gesture without a durable
1211
+ event. Presentation creation writes one complete element
1201
1212
  plus a canonical immutable claim inside a slide, master, or layout and can
1202
1213
  place it after a stable active element. Presentation update compares complete
1203
1214
  expected/current/next elements and writes only changed top-level fields, so
@@ -1309,6 +1320,7 @@ without hard-coded return URLs.
1309
1320
 
1310
1321
  - [Live Playground](https://a3s-lab.github.io/Office/)
1311
1322
  - [Documentation center](https://a3s-lab.github.io/Office/docs/)
1323
+ - [A3S Office 0.9.0 documentation](https://a3s-lab.github.io/Office/docs/0.9.0/)
1312
1324
  - [A3S Office 0.8.1 documentation](https://a3s-lab.github.io/Office/docs/0.8.1/)
1313
1325
  - [A3S Office 0.8.0 documentation](https://a3s-lab.github.io/Office/docs/0.8.0/)
1314
1326
  - [A3S Office 0.7.3 documentation](https://a3s-lab.github.io/Office/docs/0.7.3/)
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",