@rowsncolumns/rnc-yrs-store 0.29.8 → 0.30.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.
@@ -492,6 +492,35 @@ export class SpreadsheetEngine {
492
492
  * [`YrsStore::shift_log_frontier`]).
493
493
  */
494
494
  shiftLogFrontier(): string;
495
+ /**
496
+ * The commit a load returns, WITHOUT ITS CELLS: every channel of `loadFromUpdate`'s answer
497
+ * but `changes` (`styleChanges`: the formats cells hold of their own; `noteChanges`;
498
+ * `rowChanges` / `columnChanges`; `merges`; `chartChanges`; `pivotChanges`;
499
+ * `conditionalFormats`; `dataValidations`; `citations`), read from the document as it stands
500
+ * now. No cell is read to build it, so it costs what those channels hold, not what the room
501
+ * holds: load with `loadFromUpdateQuiet`, take this, and read the cells in bands
502
+ * (`readWindowCells`) or not at all. A windowed load followed by `takeOmittedCells` returns
503
+ * the same channels and every cell of the room with them.
504
+ *
505
+ * Two exceptions. On a sheet with a filter applied it lists one `rowChanges` entry per row
506
+ * of the filter and reads the filtered column to do so, as a load's commit does. In a room
507
+ * imported from xlsx the formats and the notes are on the cells and are not listed here:
508
+ * read them with the cells (`readWindowCells`).
509
+ *
510
+ * The per-cell channels are whole whatever `setCommitWindows` says. Taking this moves no
511
+ * value and takes nothing: `takeOmittedCells` still hands over what the last commit left
512
+ * out, and the load's capped formulas stay to be taken. It does derive the rows a filter
513
+ * hides if nothing had derived them yet, as `documentFacets` does: on a sheet with a filter
514
+ * and no formula, a later retype of a filtered cell can then hide other rows than it would
515
+ * have. And a session that goes on afterwards can list its answers and send its updates in
516
+ * another order. A session that loads quietly, reads and ends has nothing later to change.
517
+ *
518
+ * Formats, notes, charts and pivots are listed in a fixed order (by place, by id), where a
519
+ * load's commit lists them in the order its maps iterate. Like a load's commit it carries no
520
+ * `validations` and no `derivedFormatChanges`: a load reports no cell's validity, even for
521
+ * a cell that breaks its rule (the rules themselves are in `dataValidations`).
522
+ */
523
+ snapshotWithoutCells(): string;
495
524
  /**
496
525
  * The `rncCells` key (`"{sheetId}:{rowId}:{colId}"`) of 1-based `(row, col)`; `undefined`
497
526
  * while the row or column is unnamed (past the sheet's named extent). Never names lines.
@@ -719,6 +748,7 @@ export interface InitOutput {
719
748
  readonly spreadsheetengine_sheetMetas: (a: number) => [number, number];
720
749
  readonly spreadsheetengine_sheetStats: (a: number) => [number, number];
721
750
  readonly spreadsheetengine_sheets: (a: number) => [number, number];
751
+ readonly spreadsheetengine_snapshotWithoutCells: (a: number) => [number, number, number, number];
722
752
  readonly spreadsheetengine_staleFormulaCells: (a: number, b: number) => [number, number];
723
753
  readonly spreadsheetengine_styleLogStats: (a: number) => [number, number];
724
754
  readonly spreadsheetengine_syncRemote: (a: number) => [number, number];
@@ -738,13 +768,13 @@ export interface InitOutput {
738
768
  readonly yrssheetdoc_setCell: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
739
769
  readonly spreadsheetengine_stateAsUpdate: (a: number) => [number, number];
740
770
  readonly convertToStableIds: (a: number, b: number, c: number, d: number) => [number, number, number, number];
741
- readonly spreadsheetengine_anchorRange: (a: number, b: number, c: number, d: number) => [number, number, number, number];
742
771
  readonly spreadsheetengine_columnIds: (a: number, b: number) => [number, number];
743
772
  readonly spreadsheetengine_parseStableCellKey: (a: number, b: number, c: number) => [number, number];
744
- readonly spreadsheetengine_resolveAnchor: (a: number, b: number, c: number) => [number, number, number, number];
745
773
  readonly spreadsheetengine_rowIds: (a: number, b: number) => [number, number];
746
- readonly spreadsheetengine_shiftLogFrontier: (a: number) => [number, number];
747
774
  readonly spreadsheetengine_stableCellKey: (a: number, b: number, c: number, d: number) => [number, number];
775
+ readonly spreadsheetengine_anchorRange: (a: number, b: number, c: number, d: number) => [number, number, number, number];
776
+ readonly spreadsheetengine_resolveAnchor: (a: number, b: number, c: number) => [number, number, number, number];
777
+ readonly spreadsheetengine_shiftLogFrontier: (a: number) => [number, number];
748
778
  readonly spreadsheetengine_transformRange: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
749
779
  readonly transformRangeThroughOps: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
750
780
  readonly __wbindgen_malloc: (a: number, b: number) => number;
@@ -1510,6 +1510,53 @@ export class SpreadsheetEngine {
1510
1510
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1511
1511
  }
1512
1512
  }
1513
+ /**
1514
+ * The commit a load returns, WITHOUT ITS CELLS: every channel of `loadFromUpdate`'s answer
1515
+ * but `changes` (`styleChanges`: the formats cells hold of their own; `noteChanges`;
1516
+ * `rowChanges` / `columnChanges`; `merges`; `chartChanges`; `pivotChanges`;
1517
+ * `conditionalFormats`; `dataValidations`; `citations`), read from the document as it stands
1518
+ * now. No cell is read to build it, so it costs what those channels hold, not what the room
1519
+ * holds: load with `loadFromUpdateQuiet`, take this, and read the cells in bands
1520
+ * (`readWindowCells`) or not at all. A windowed load followed by `takeOmittedCells` returns
1521
+ * the same channels and every cell of the room with them.
1522
+ *
1523
+ * Two exceptions. On a sheet with a filter applied it lists one `rowChanges` entry per row
1524
+ * of the filter and reads the filtered column to do so, as a load's commit does. In a room
1525
+ * imported from xlsx the formats and the notes are on the cells and are not listed here:
1526
+ * read them with the cells (`readWindowCells`).
1527
+ *
1528
+ * The per-cell channels are whole whatever `setCommitWindows` says. Taking this moves no
1529
+ * value and takes nothing: `takeOmittedCells` still hands over what the last commit left
1530
+ * out, and the load's capped formulas stay to be taken. It does derive the rows a filter
1531
+ * hides if nothing had derived them yet, as `documentFacets` does: on a sheet with a filter
1532
+ * and no formula, a later retype of a filtered cell can then hide other rows than it would
1533
+ * have. And a session that goes on afterwards can list its answers and send its updates in
1534
+ * another order. A session that loads quietly, reads and ends has nothing later to change.
1535
+ *
1536
+ * Formats, notes, charts and pivots are listed in a fixed order (by place, by id), where a
1537
+ * load's commit lists them in the order its maps iterate. Like a load's commit it carries no
1538
+ * `validations` and no `derivedFormatChanges`: a load reports no cell's validity, even for
1539
+ * a cell that breaks its rule (the rules themselves are in `dataValidations`).
1540
+ * @returns {string}
1541
+ */
1542
+ snapshotWithoutCells() {
1543
+ let deferred2_0;
1544
+ let deferred2_1;
1545
+ try {
1546
+ const ret = wasm.spreadsheetengine_snapshotWithoutCells(this.__wbg_ptr);
1547
+ var ptr1 = ret[0];
1548
+ var len1 = ret[1];
1549
+ if (ret[3]) {
1550
+ ptr1 = 0; len1 = 0;
1551
+ throw takeFromExternrefTable0(ret[2]);
1552
+ }
1553
+ deferred2_0 = ptr1;
1554
+ deferred2_1 = len1;
1555
+ return getStringFromWasm0(ptr1, len1);
1556
+ } finally {
1557
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1558
+ }
1559
+ }
1513
1560
  /**
1514
1561
  * The `rncCells` key (`"{sheetId}:{rowId}:{colId}"`) of 1-based `(row, col)`; `undefined`
1515
1562
  * while the row or column is unnamed (past the sheet's named extent). Never names lines.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowsncolumns/rnc-yrs-store",
3
- "version": "0.29.8",
3
+ "version": "0.30.0",
4
4
  "author": "Vinay M",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "description": "Document-backed Rust→WASM spreadsheet calc engine (yrs/CRDT, canonical sheetDataV3). Ships the `SpreadsheetEngine` (a `Store<YrsStore>`): applyCommand / undo / redo / canUndo + the Yjs collaboration surface (applyUpdate / takePendingUpdates / loadFromUpdate / stateAsUpdate) the Keryx update-pump binds to. This is the 1,000,000-row engine the demo-app ships today — previously vendored, now a versioned package. The PREBUILT wasm is included (consumers need NO Rust/wasm toolchain); the glue's default init REQUIRES an explicit `module_or_path` — pass the URL of the served `rnc_yrs_store_bg.wasm` (webpack/Turbopack statically resolve a bundled `new URL`, which would 404 from this package, so the inline-default branch is intentionally a throw).",