@rowsncolumns/rnc-yrs-store 0.21.2 → 0.21.4

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.
@@ -465,7 +465,10 @@ export class SpreadsheetEngine {
465
465
  /**
466
466
  * Minimal positional (`sheetDataV3`) sheet doc + yjs v1 transport — the R0 interop spike, kept
467
467
  * for the fixture tooling that reads a room the way the engine reads it. It knows the v3 plane
468
- * only: a v5 document's cells are in `rncCells` (`libs/rnc-yrs-store/docs/v5-document-encoding.md`).
468
+ * only: a v5 document's cells are in `rncCells` (`libs/rnc-yrs-store/docs/v5-document-encoding.md`),
469
+ * so on a v5 document `getCell` and `setCell` throw — a positional read would answer "no cell"
470
+ * for every cell and a positional write is one no v5 reader sees. `applyUpdate` and
471
+ * `encodeStateAsUpdate` carry any document. Read a v5 document through [`SpreadsheetEngine`].
469
472
  */
470
473
  export class YrsSheetDoc {
471
474
  free(): void;
@@ -571,19 +574,19 @@ export interface InitOutput {
571
574
  readonly spreadsheetengine_validationSourceValues: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
572
575
  readonly yrssheetdoc_applyUpdate: (a: number, b: number, c: number) => [number, number];
573
576
  readonly yrssheetdoc_encodeStateAsUpdate: (a: number) => [number, number];
574
- readonly yrssheetdoc_getCell: (a: number, b: number, c: number, d: number) => [number, number];
577
+ readonly yrssheetdoc_getCell: (a: number, b: number, c: number, d: number) => [number, number, number, number];
575
578
  readonly yrssheetdoc_new: () => number;
576
579
  readonly yrssheetdoc_setCell: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
577
580
  readonly spreadsheetengine_stateAsUpdate: (a: number) => [number, number];
578
581
  readonly spreadsheetengine_anchorRange: (a: number, b: number, c: number, d: number) => [number, number, number, number];
579
- readonly spreadsheetengine_columnIds: (a: number, b: number) => [number, number];
580
- readonly spreadsheetengine_parseStableCellKey: (a: number, b: number, c: number) => [number, number];
581
582
  readonly spreadsheetengine_resolveAnchor: (a: number, b: number, c: number) => [number, number, number, number];
582
- readonly spreadsheetengine_rowIds: (a: number, b: number) => [number, number];
583
583
  readonly spreadsheetengine_shiftLogFrontier: (a: number) => [number, number];
584
- readonly spreadsheetengine_stableCellKey: (a: number, b: number, c: number, d: number) => [number, number];
585
584
  readonly spreadsheetengine_transformRange: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
586
585
  readonly transformRangeThroughOps: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
586
+ readonly spreadsheetengine_columnIds: (a: number, b: number) => [number, number];
587
+ readonly spreadsheetengine_parseStableCellKey: (a: number, b: number, c: number) => [number, number];
588
+ readonly spreadsheetengine_rowIds: (a: number, b: number) => [number, number];
589
+ readonly spreadsheetengine_stableCellKey: (a: number, b: number, c: number, d: number) => [number, number];
587
590
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
588
591
  readonly __wbindgen_exn_store: (a: number) => void;
589
592
  readonly __externref_table_alloc: () => number;
@@ -1529,7 +1529,10 @@ if (Symbol.dispose) SpreadsheetEngine.prototype[Symbol.dispose] = SpreadsheetEng
1529
1529
  /**
1530
1530
  * Minimal positional (`sheetDataV3`) sheet doc + yjs v1 transport — the R0 interop spike, kept
1531
1531
  * for the fixture tooling that reads a room the way the engine reads it. It knows the v3 plane
1532
- * only: a v5 document's cells are in `rncCells` (`libs/rnc-yrs-store/docs/v5-document-encoding.md`).
1532
+ * only: a v5 document's cells are in `rncCells` (`libs/rnc-yrs-store/docs/v5-document-encoding.md`),
1533
+ * so on a v5 document `getCell` and `setCell` throw — a positional read would answer "no cell"
1534
+ * for every cell and a positional write is one no v5 reader sees. `applyUpdate` and
1535
+ * `encodeStateAsUpdate` carry any document. Read a v5 document through [`SpreadsheetEngine`].
1533
1536
  */
1534
1537
  export class YrsSheetDoc {
1535
1538
  __destroy_into_raw() {
@@ -1570,6 +1573,9 @@ export class YrsSheetDoc {
1570
1573
  */
1571
1574
  getCell(sheet_id, row, col) {
1572
1575
  const ret = wasm.yrssheetdoc_getCell(this.__wbg_ptr, sheet_id, row, col);
1576
+ if (ret[3]) {
1577
+ throw takeFromExternrefTable0(ret[2]);
1578
+ }
1573
1579
  let v1;
1574
1580
  if (ret[0] !== 0) {
1575
1581
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowsncolumns/rnc-yrs-store",
3
- "version": "0.21.2",
3
+ "version": "0.21.4",
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).",