@rowsncolumns/rnc-yrs-store 0.10.16 → 0.10.18

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.
@@ -117,6 +117,12 @@ export class SpreadsheetEngine {
117
117
  */
118
118
  filterColors(sheet_id: number, col: number, start_row: number, end_row: number): string;
119
119
  findAll(sheet_id: number, ranges_json: string, find: string, match_case: boolean, whole_word: boolean, use_regex: boolean): string;
120
+ /**
121
+ * `findAll` with a cap: JSON `{"matches": SheetCoordinate[], "truncated": bool}` — the first
122
+ * `limit` matches (row-major) and whether the scan stopped before the last one. `limit = 0`
123
+ * means no cap.
124
+ */
125
+ findAllBounded(sheet_id: number, ranges_json: string, find: string, match_case: boolean, whole_word: boolean, use_regex: boolean, limit: number): string;
120
126
  /**
121
127
  * Recompute and write back the formula results a remote merge may have left stale — the local
122
128
  * dependents of merged cells — and return the `CommitResult` JSON. A local edit does this
@@ -339,6 +345,7 @@ export interface InitOutput {
339
345
  readonly spreadsheetengine_exportXlsxWithOptions: (a: number, b: number, c: number) => [number, number, number, number];
340
346
  readonly spreadsheetengine_filterColors: (a: number, b: number, c: number, d: number, e: number) => [number, number];
341
347
  readonly spreadsheetengine_findAll: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number];
348
+ readonly spreadsheetengine_findAllBounded: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number];
342
349
  readonly spreadsheetengine_flushRemoteDirty: (a: number) => [number, number];
343
350
  readonly spreadsheetengine_hostOwnedCells: (a: number, b: number) => [number, number];
344
351
  readonly spreadsheetengine_importCsv: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
@@ -384,6 +384,35 @@ export class SpreadsheetEngine {
384
384
  wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
385
385
  }
386
386
  }
387
+ /**
388
+ * `findAll` with a cap: JSON `{"matches": SheetCoordinate[], "truncated": bool}` — the first
389
+ * `limit` matches (row-major) and whether the scan stopped before the last one. `limit = 0`
390
+ * means no cap.
391
+ * @param {number} sheet_id
392
+ * @param {string} ranges_json
393
+ * @param {string} find
394
+ * @param {boolean} match_case
395
+ * @param {boolean} whole_word
396
+ * @param {boolean} use_regex
397
+ * @param {number} limit
398
+ * @returns {string}
399
+ */
400
+ findAllBounded(sheet_id, ranges_json, find, match_case, whole_word, use_regex, limit) {
401
+ let deferred3_0;
402
+ let deferred3_1;
403
+ try {
404
+ const ptr0 = passStringToWasm0(ranges_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
405
+ const len0 = WASM_VECTOR_LEN;
406
+ const ptr1 = passStringToWasm0(find, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
407
+ const len1 = WASM_VECTOR_LEN;
408
+ const ret = wasm.spreadsheetengine_findAllBounded(this.__wbg_ptr, sheet_id, ptr0, len0, ptr1, len1, match_case, whole_word, use_regex, limit);
409
+ deferred3_0 = ret[0];
410
+ deferred3_1 = ret[1];
411
+ return getStringFromWasm0(ret[0], ret[1]);
412
+ } finally {
413
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
414
+ }
415
+ }
387
416
  /**
388
417
  * Recompute and write back the formula results a remote merge may have left stale — the local
389
418
  * dependents of merged cells — and return the `CommitResult` JSON. A local edit does this
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowsncolumns/rnc-yrs-store",
3
- "version": "0.10.16",
3
+ "version": "0.10.18",
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).",