@rowsncolumns/rnc-yrs-store 0.21.5 → 0.24.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.
@@ -371,6 +371,12 @@ export class SpreadsheetEngine {
371
371
  * refreshes the cells that read it.
372
372
  */
373
373
  setWorkbookIdentity(directory: string, file_name: string): void;
374
+ /**
375
+ * Page Layout ▸ Background: one sheet's picture (a `data:` URL), or `undefined`. `sheets()`
376
+ * carries only a short `backgroundImageVersion`, so the picture is not re-sent on every
377
+ * commit — read it here when that version changes.
378
+ */
379
+ sheetBackgroundImageUrl(sheet_id: number): string | undefined;
374
380
  /**
375
381
  * `"v5"` while the document runs on the stable-ids store, else `"v3"`.
376
382
  */
@@ -558,6 +564,7 @@ export interface InitOutput {
558
564
  readonly spreadsheetengine_setTimezoneOffsetMinutes: (a: number, b: number) => number;
559
565
  readonly spreadsheetengine_setWindowed: (a: number, b: number) => void;
560
566
  readonly spreadsheetengine_setWorkbookIdentity: (a: number, b: number, c: number, d: number, e: number) => void;
567
+ readonly spreadsheetengine_sheetBackgroundImageUrl: (a: number, b: number) => [number, number];
561
568
  readonly spreadsheetengine_sheetDataVersion: (a: number) => [number, number];
562
569
  readonly spreadsheetengine_sheetExtents: (a: number) => [number, number];
563
570
  readonly spreadsheetengine_sheetIds: (a: number) => [number, number];
@@ -1221,6 +1221,22 @@ export class SpreadsheetEngine {
1221
1221
  const len1 = WASM_VECTOR_LEN;
1222
1222
  wasm.spreadsheetengine_setWorkbookIdentity(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1223
1223
  }
1224
+ /**
1225
+ * Page Layout ▸ Background: one sheet's picture (a `data:` URL), or `undefined`. `sheets()`
1226
+ * carries only a short `backgroundImageVersion`, so the picture is not re-sent on every
1227
+ * commit — read it here when that version changes.
1228
+ * @param {number} sheet_id
1229
+ * @returns {string | undefined}
1230
+ */
1231
+ sheetBackgroundImageUrl(sheet_id) {
1232
+ const ret = wasm.spreadsheetengine_sheetBackgroundImageUrl(this.__wbg_ptr, sheet_id);
1233
+ let v1;
1234
+ if (ret[0] !== 0) {
1235
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1236
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1237
+ }
1238
+ return v1;
1239
+ }
1224
1240
  /**
1225
1241
  * `"v5"` while the document runs on the stable-ids store, else `"v3"`.
1226
1242
  * @returns {string}
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowsncolumns/rnc-yrs-store",
3
- "version": "0.21.5",
3
+ "version": "0.24.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).",