@diaryx/wasm-node 1.0.1 → 1.1.0-dev.f6f6c50

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.
package/diaryx_wasm.d.ts CHANGED
@@ -434,6 +434,13 @@ export class WasmSyncClient {
434
434
  * Call this before connecting to join a share session.
435
435
  */
436
436
  setSessionCode(code: string): void;
437
+ /**
438
+ * Request body sync for specific files (lazy sync on demand).
439
+ *
440
+ * Sends SyncBodyFiles event through the session to initiate body
441
+ * SyncStep1 for just the requested files, rather than all files.
442
+ */
443
+ syncBodyFiles(file_paths: string[]): Promise<any>;
437
444
  /**
438
445
  * Send an unfocus message for specific files.
439
446
  */
@@ -459,12 +466,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
459
466
 
460
467
  export interface InitOutput {
461
468
  readonly memory: WebAssembly.Memory;
462
- readonly now_timestamp: () => [number, number];
463
- readonly today_formatted: (a: number, b: number) => [number, number];
464
- readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
465
- readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
466
- readonly jsasyncfilesystem_new: (a: any) => number;
467
- readonly init: () => void;
468
469
  readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
469
470
  readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
470
471
  readonly diaryxbackend_create: (a: number, b: number) => any;
@@ -499,7 +500,14 @@ export interface InitOutput {
499
500
  readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
500
501
  readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
501
502
  readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
503
+ readonly wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
502
504
  readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
505
+ readonly init: () => void;
506
+ readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
507
+ readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
508
+ readonly jsasyncfilesystem_new: (a: any) => number;
509
+ readonly now_timestamp: () => [number, number];
510
+ readonly today_formatted: (a: number, b: number) => [number, number];
503
511
  readonly wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
504
512
  readonly wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
505
513
  readonly wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
package/diaryx_wasm.js CHANGED
@@ -600,6 +600,20 @@ export class WasmSyncClient {
600
600
  const len0 = WASM_VECTOR_LEN;
601
601
  wasm.wasmsyncclient_setSessionCode(this.__wbg_ptr, ptr0, len0);
602
602
  }
603
+ /**
604
+ * Request body sync for specific files (lazy sync on demand).
605
+ *
606
+ * Sends SyncBodyFiles event through the session to initiate body
607
+ * SyncStep1 for just the requested files, rather than all files.
608
+ * @param {string[]} file_paths
609
+ * @returns {Promise<any>}
610
+ */
611
+ syncBodyFiles(file_paths) {
612
+ const ptr0 = passArrayJsValueToWasm0(file_paths, wasm.__wbindgen_malloc);
613
+ const len0 = WASM_VECTOR_LEN;
614
+ const ret = wasm.wasmsyncclient_syncBodyFiles(this.__wbg_ptr, ptr0, len0);
615
+ return ret;
616
+ }
603
617
  /**
604
618
  * Send an unfocus message for specific files.
605
619
  * @param {string[]} files
@@ -1003,7 +1017,7 @@ function __wbg_get_imports() {
1003
1017
  console.warn(arg0, arg1, arg2, arg3);
1004
1018
  },
1005
1019
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1006
- // Cast intrinsic for `Closure(Closure { dtor_idx: 614, function: Function { arguments: [Externref], shim_idx: 615, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1020
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 617, function: Function { arguments: [Externref], shim_idx: 618, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1007
1021
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h358403ff5b31de35, wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a);
1008
1022
  return ret;
1009
1023
  },
Binary file
@@ -1,12 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const now_timestamp: () => [number, number];
5
- export const today_formatted: (a: number, b: number) => [number, number];
6
- export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
7
- export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
8
- export const jsasyncfilesystem_new: (a: any) => number;
9
- export const init: () => void;
10
4
  export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
11
5
  export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
12
6
  export const diaryxbackend_create: (a: number, b: number) => any;
@@ -41,7 +35,14 @@ export const wasmsyncclient_pollOutgoingBinary: (a: number) => any;
41
35
  export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
42
36
  export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
43
37
  export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
38
+ export const wasmsyncclient_syncBodyFiles: (a: number, b: number, c: number) => any;
44
39
  export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
40
+ export const init: () => void;
41
+ export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
42
+ export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
43
+ export const jsasyncfilesystem_new: (a: any) => number;
44
+ export const now_timestamp: () => [number, number];
45
+ export const today_formatted: (a: number, b: number) => [number, number];
45
46
  export const wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
46
47
  export const wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
47
48
  export const wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@diaryx/wasm-node",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for Diaryx core functionality",
5
- "version": "1.0.1",
5
+ "version": "1.1.0-dev.f6f6c50",
6
6
  "license": "SEE LICENSE IN ../../LICENSE.md",
7
7
  "repository": {
8
8
  "type": "git",