loro-crdt 1.13.0 → 1.13.2

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.
@@ -263,17 +263,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
263
263
  }
264
264
  return result;
265
265
  }
266
- /**
267
- * Enable debug info of Loro
268
- */
269
- export function setDebug() {
270
- wasm.setDebug();
271
- }
272
-
273
- export function callPendingEvents() {
274
- wasm.callPendingEvents();
275
- }
276
-
277
266
  /**
278
267
  * Decode the metadata of the import blob.
279
268
  *
@@ -307,44 +296,31 @@ export function decodeImportBlobMeta(blob, check_checksum) {
307
296
  }
308
297
  }
309
298
 
310
- export function run() {
311
- wasm.run();
312
- }
313
-
314
- function passArrayJsValueToWasm0(array, malloc) {
315
- const ptr = malloc(array.length * 4, 4) >>> 0;
316
- const mem = getDataViewMemory0();
317
- for (let i = 0; i < array.length; i++) {
318
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
319
- }
320
- WASM_VECTOR_LEN = array.length;
321
- return ptr;
322
- }
323
299
  /**
324
- * @param {({ peer: PeerID, counter: number })[]} frontiers
325
- * @returns {Uint8Array}
300
+ * Get the version of Loro
301
+ * @returns {string}
326
302
  */
327
- export function encodeFrontiers(frontiers) {
303
+ export function LORO_VERSION() {
304
+ let deferred1_0;
305
+ let deferred1_1;
328
306
  try {
329
307
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
330
- const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
331
- const len0 = WASM_VECTOR_LEN;
332
- wasm.encodeFrontiers(retptr, ptr0, len0);
308
+ wasm.LORO_VERSION(retptr);
333
309
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
334
310
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
335
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
336
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
337
- if (r3) {
338
- throw takeObject(r2);
339
- }
340
- var v2 = getArrayU8FromWasm0(r0, r1).slice();
341
- wasm.__wbindgen_free(r0, r1 * 1, 1);
342
- return v2;
311
+ deferred1_0 = r0;
312
+ deferred1_1 = r1;
313
+ return getStringFromWasm0(r0, r1);
343
314
  } finally {
344
315
  wasm.__wbindgen_add_to_stack_pointer(16);
316
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
345
317
  }
346
318
  }
347
319
 
320
+ export function run() {
321
+ wasm.run();
322
+ }
323
+
348
324
  /**
349
325
  * @param {Uint8Array} bytes
350
326
  * @returns {{ peer: PeerID, counter: number }[]}
@@ -367,25 +343,8 @@ export function decodeFrontiers(bytes) {
367
343
  }
368
344
  }
369
345
 
370
- /**
371
- * Get the version of Loro
372
- * @returns {string}
373
- */
374
- export function LORO_VERSION() {
375
- let deferred1_0;
376
- let deferred1_1;
377
- try {
378
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
379
- wasm.LORO_VERSION(retptr);
380
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
381
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
382
- deferred1_0 = r0;
383
- deferred1_1 = r1;
384
- return getStringFromWasm0(r0, r1);
385
- } finally {
386
- wasm.__wbindgen_add_to_stack_pointer(16);
387
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
388
- }
346
+ export function callPendingEvents() {
347
+ wasm.callPendingEvents();
389
348
  }
390
349
 
391
350
  /**
@@ -426,12 +385,53 @@ export function redactJsonUpdates(json_updates, version_range) {
426
385
  }
427
386
  }
428
387
 
388
+ function passArrayJsValueToWasm0(array, malloc) {
389
+ const ptr = malloc(array.length * 4, 4) >>> 0;
390
+ const mem = getDataViewMemory0();
391
+ for (let i = 0; i < array.length; i++) {
392
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
393
+ }
394
+ WASM_VECTOR_LEN = array.length;
395
+ return ptr;
396
+ }
397
+ /**
398
+ * @param {({ peer: PeerID, counter: number })[]} frontiers
399
+ * @returns {Uint8Array}
400
+ */
401
+ export function encodeFrontiers(frontiers) {
402
+ try {
403
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
404
+ const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
405
+ const len0 = WASM_VECTOR_LEN;
406
+ wasm.encodeFrontiers(retptr, ptr0, len0);
407
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
408
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
409
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
410
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
411
+ if (r3) {
412
+ throw takeObject(r2);
413
+ }
414
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
415
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
416
+ return v2;
417
+ } finally {
418
+ wasm.__wbindgen_add_to_stack_pointer(16);
419
+ }
420
+ }
421
+
422
+ /**
423
+ * Enable debug info of Loro
424
+ */
425
+ export function setDebug() {
426
+ wasm.setDebug();
427
+ }
428
+
429
429
  function __wbg_adapter_60(arg0, arg1, arg2) {
430
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5913132a5cb7e31a(arg0, arg1, addHeapObject(arg2));
430
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ca1585fb4938203(arg0, arg1, addHeapObject(arg2));
431
431
  }
432
432
 
433
433
  function __wbg_adapter_63(arg0, arg1) {
434
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h733f684fa1d8b981(arg0, arg1);
434
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbcad774514455511(arg0, arg1);
435
435
  }
436
436
 
437
437
  const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2111,6 +2111,11 @@ export class LoroDoc {
2111
2111
  *
2112
2112
  * If the container does not exist, it returns `undefined`.
2113
2113
  *
2114
+ * A mergeable container (created via `ensureMergeableMap` and friends) is resolvable
2115
+ * right after it has been ensured — even before any op is written into it — for as
2116
+ * long as the parent map's child ref is alive. A mergeable container id that was
2117
+ * never ensured on this doc resolves to `undefined`.
2118
+ *
2114
2119
  * @example
2115
2120
  * ```ts
2116
2121
  * import { LoroDoc } from "loro-crdt";
@@ -7000,7 +7005,7 @@ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
7000
7005
  }
7001
7006
  };
7002
7007
 
7003
- export function __wbg_error_f10209f9aa237eba(arg0, arg1) {
7008
+ export function __wbg_error_eddb9b302feac7d3(arg0, arg1) {
7004
7009
  console.error(getStringFromWasm0(arg0, arg1));
7005
7010
  };
7006
7011
 
@@ -7119,10 +7124,6 @@ export function __wbg_log_0cc1b7768397bcfe(arg0, arg1, arg2, arg3, arg4, arg5, a
7119
7124
  }
7120
7125
  };
7121
7126
 
7122
- export function __wbg_log_173d9edf1ec170a0(arg0, arg1) {
7123
- console.log(getStringFromWasm0(arg0, arg1));
7124
- };
7125
-
7126
7127
  export function __wbg_log_cb9e190acc5753fb(arg0, arg1) {
7127
7128
  let deferred0_0;
7128
7129
  let deferred0_1;
@@ -7135,6 +7136,10 @@ export function __wbg_log_cb9e190acc5753fb(arg0, arg1) {
7135
7136
  }
7136
7137
  };
7137
7138
 
7139
+ export function __wbg_log_d8b98f6c2e2f68e5(arg0, arg1) {
7140
+ console.log(getStringFromWasm0(arg0, arg1));
7141
+ };
7142
+
7138
7143
  export function __wbg_lorocounter_new(arg0) {
7139
7144
  const ret = LoroCounter.__wrap(arg0);
7140
7145
  return addHeapObject(ret);
@@ -7256,7 +7261,7 @@ export function __wbg_node_905d3e251edff8a2(arg0) {
7256
7261
  return addHeapObject(ret);
7257
7262
  };
7258
7263
 
7259
- export function __wbg_now_3f4e95457006a877() {
7264
+ export function __wbg_now_d62d4d41f9f53a76() {
7260
7265
  const ret = Date.now();
7261
7266
  return ret;
7262
7267
  };
@@ -7369,7 +7374,7 @@ export function __wbg_versionvector_new(arg0) {
7369
7374
  return addHeapObject(ret);
7370
7375
  };
7371
7376
 
7372
- export function __wbg_warn_df6c5f8c3202ef75(arg0, arg1) {
7377
+ export function __wbg_warn_a198177f86cf58b2(arg0, arg1) {
7373
7378
  console.warn(getStringFromWasm0(arg0, arg1));
7374
7379
  };
7375
7380
 
@@ -7411,12 +7416,12 @@ export function __wbindgen_cb_drop(arg0) {
7411
7416
  return ret;
7412
7417
  };
7413
7418
 
7414
- export function __wbindgen_closure_wrapper332(arg0, arg1, arg2) {
7419
+ export function __wbindgen_closure_wrapper331(arg0, arg1, arg2) {
7415
7420
  const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_60);
7416
7421
  return addHeapObject(ret);
7417
7422
  };
7418
7423
 
7419
- export function __wbindgen_closure_wrapper334(arg0, arg1, arg2) {
7424
+ export function __wbindgen_closure_wrapper333(arg0, arg1, arg2) {
7420
7425
  const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_63);
7421
7426
  return addHeapObject(ret);
7422
7427
  };
Binary file
@@ -330,6 +330,6 @@ export const __wbindgen_exn_store: (a: number) => void;
330
330
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
331
331
  export const __wbindgen_export_4: WebAssembly.Table;
332
332
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
333
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5913132a5cb7e31a: (a: number, b: number, c: number) => void;
334
- export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h733f684fa1d8b981: (a: number, b: number) => void;
333
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ca1585fb4938203: (a: number, b: number, c: number) => void;
334
+ export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbcad774514455511: (a: number, b: number) => void;
335
335
  export const __wbindgen_start: () => void;
@@ -1,10 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Enable debug info of Loro
5
- */
6
- export function setDebug(): void;
7
- export function callPendingEvents(): void;
8
3
  /**
9
4
  * Decode the metadata of the import blob.
10
5
  *
@@ -18,13 +13,13 @@ export function callPendingEvents(): void;
18
13
  * - changeNum
19
14
  */
20
15
  export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
21
- export function run(): void;
22
- export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
23
- export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
24
16
  /**
25
17
  * Get the version of Loro
26
18
  */
27
19
  export function LORO_VERSION(): string;
20
+ export function run(): void;
21
+ export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
22
+ export function callPendingEvents(): void;
28
23
  /**
29
24
  * Redacts sensitive content in JSON updates within the specified version range.
30
25
  *
@@ -45,6 +40,11 @@ export function LORO_VERSION(): string;
45
40
  * @returns {Object} The redacted JSON updates
46
41
  */
47
42
  export function redactJsonUpdates(json_updates: string | JsonSchema, version_range: any): JsonSchema;
43
+ export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
44
+ /**
45
+ * Enable debug info of Loro
46
+ */
47
+ export function setDebug(): void;
48
48
 
49
49
  /**
50
50
  * Container types supported by loro.
@@ -259,17 +259,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
259
259
  }
260
260
  return result;
261
261
  }
262
- /**
263
- * Enable debug info of Loro
264
- */
265
- module.exports.setDebug = function() {
266
- wasm.setDebug();
267
- };
268
-
269
- module.exports.callPendingEvents = function() {
270
- wasm.callPendingEvents();
271
- };
272
-
273
262
  /**
274
263
  * Decode the metadata of the import blob.
275
264
  *
@@ -303,44 +292,31 @@ module.exports.decodeImportBlobMeta = function(blob, check_checksum) {
303
292
  }
304
293
  };
305
294
 
306
- module.exports.run = function() {
307
- wasm.run();
308
- };
309
-
310
- function passArrayJsValueToWasm0(array, malloc) {
311
- const ptr = malloc(array.length * 4, 4) >>> 0;
312
- const mem = getDataViewMemory0();
313
- for (let i = 0; i < array.length; i++) {
314
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
315
- }
316
- WASM_VECTOR_LEN = array.length;
317
- return ptr;
318
- }
319
295
  /**
320
- * @param {({ peer: PeerID, counter: number })[]} frontiers
321
- * @returns {Uint8Array}
296
+ * Get the version of Loro
297
+ * @returns {string}
322
298
  */
323
- module.exports.encodeFrontiers = function(frontiers) {
299
+ module.exports.LORO_VERSION = function() {
300
+ let deferred1_0;
301
+ let deferred1_1;
324
302
  try {
325
303
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
326
- const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
327
- const len0 = WASM_VECTOR_LEN;
328
- wasm.encodeFrontiers(retptr, ptr0, len0);
304
+ wasm.LORO_VERSION(retptr);
329
305
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
330
306
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
331
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
332
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
333
- if (r3) {
334
- throw takeObject(r2);
335
- }
336
- var v2 = getArrayU8FromWasm0(r0, r1).slice();
337
- wasm.__wbindgen_free(r0, r1 * 1, 1);
338
- return v2;
307
+ deferred1_0 = r0;
308
+ deferred1_1 = r1;
309
+ return getStringFromWasm0(r0, r1);
339
310
  } finally {
340
311
  wasm.__wbindgen_add_to_stack_pointer(16);
312
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
341
313
  }
342
314
  };
343
315
 
316
+ module.exports.run = function() {
317
+ wasm.run();
318
+ };
319
+
344
320
  /**
345
321
  * @param {Uint8Array} bytes
346
322
  * @returns {{ peer: PeerID, counter: number }[]}
@@ -363,25 +339,8 @@ module.exports.decodeFrontiers = function(bytes) {
363
339
  }
364
340
  };
365
341
 
366
- /**
367
- * Get the version of Loro
368
- * @returns {string}
369
- */
370
- module.exports.LORO_VERSION = function() {
371
- let deferred1_0;
372
- let deferred1_1;
373
- try {
374
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
375
- wasm.LORO_VERSION(retptr);
376
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
377
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
378
- deferred1_0 = r0;
379
- deferred1_1 = r1;
380
- return getStringFromWasm0(r0, r1);
381
- } finally {
382
- wasm.__wbindgen_add_to_stack_pointer(16);
383
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
384
- }
342
+ module.exports.callPendingEvents = function() {
343
+ wasm.callPendingEvents();
385
344
  };
386
345
 
387
346
  /**
@@ -422,12 +381,53 @@ module.exports.redactJsonUpdates = function(json_updates, version_range) {
422
381
  }
423
382
  };
424
383
 
384
+ function passArrayJsValueToWasm0(array, malloc) {
385
+ const ptr = malloc(array.length * 4, 4) >>> 0;
386
+ const mem = getDataViewMemory0();
387
+ for (let i = 0; i < array.length; i++) {
388
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
389
+ }
390
+ WASM_VECTOR_LEN = array.length;
391
+ return ptr;
392
+ }
393
+ /**
394
+ * @param {({ peer: PeerID, counter: number })[]} frontiers
395
+ * @returns {Uint8Array}
396
+ */
397
+ module.exports.encodeFrontiers = function(frontiers) {
398
+ try {
399
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
400
+ const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
401
+ const len0 = WASM_VECTOR_LEN;
402
+ wasm.encodeFrontiers(retptr, ptr0, len0);
403
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
404
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
405
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
406
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
407
+ if (r3) {
408
+ throw takeObject(r2);
409
+ }
410
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
411
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
412
+ return v2;
413
+ } finally {
414
+ wasm.__wbindgen_add_to_stack_pointer(16);
415
+ }
416
+ };
417
+
418
+ /**
419
+ * Enable debug info of Loro
420
+ */
421
+ module.exports.setDebug = function() {
422
+ wasm.setDebug();
423
+ };
424
+
425
425
  function __wbg_adapter_60(arg0, arg1, arg2) {
426
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5913132a5cb7e31a(arg0, arg1, addHeapObject(arg2));
426
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ca1585fb4938203(arg0, arg1, addHeapObject(arg2));
427
427
  }
428
428
 
429
429
  function __wbg_adapter_63(arg0, arg1) {
430
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h733f684fa1d8b981(arg0, arg1);
430
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbcad774514455511(arg0, arg1);
431
431
  }
432
432
 
433
433
  const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -2112,6 +2112,11 @@ class LoroDoc {
2112
2112
  *
2113
2113
  * If the container does not exist, it returns `undefined`.
2114
2114
  *
2115
+ * A mergeable container (created via `ensureMergeableMap` and friends) is resolvable
2116
+ * right after it has been ensured — even before any op is written into it — for as
2117
+ * long as the parent map's child ref is alive. A mergeable container id that was
2118
+ * never ensured on this doc resolves to `undefined`.
2119
+ *
2115
2120
  * @example
2116
2121
  * ```ts
2117
2122
  * import { LoroDoc } from "loro-crdt";
@@ -7010,7 +7015,7 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
7010
7015
  }
7011
7016
  };
7012
7017
 
7013
- module.exports.__wbg_error_f10209f9aa237eba = function(arg0, arg1) {
7018
+ module.exports.__wbg_error_eddb9b302feac7d3 = function(arg0, arg1) {
7014
7019
  console.error(getStringFromWasm0(arg0, arg1));
7015
7020
  };
7016
7021
 
@@ -7129,10 +7134,6 @@ module.exports.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg
7129
7134
  }
7130
7135
  };
7131
7136
 
7132
- module.exports.__wbg_log_173d9edf1ec170a0 = function(arg0, arg1) {
7133
- console.log(getStringFromWasm0(arg0, arg1));
7134
- };
7135
-
7136
7137
  module.exports.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
7137
7138
  let deferred0_0;
7138
7139
  let deferred0_1;
@@ -7145,6 +7146,10 @@ module.exports.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
7145
7146
  }
7146
7147
  };
7147
7148
 
7149
+ module.exports.__wbg_log_d8b98f6c2e2f68e5 = function(arg0, arg1) {
7150
+ console.log(getStringFromWasm0(arg0, arg1));
7151
+ };
7152
+
7148
7153
  module.exports.__wbg_lorocounter_new = function(arg0) {
7149
7154
  const ret = LoroCounter.__wrap(arg0);
7150
7155
  return addHeapObject(ret);
@@ -7266,7 +7271,7 @@ module.exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
7266
7271
  return addHeapObject(ret);
7267
7272
  };
7268
7273
 
7269
- module.exports.__wbg_now_3f4e95457006a877 = function() {
7274
+ module.exports.__wbg_now_d62d4d41f9f53a76 = function() {
7270
7275
  const ret = Date.now();
7271
7276
  return ret;
7272
7277
  };
@@ -7379,7 +7384,7 @@ module.exports.__wbg_versionvector_new = function(arg0) {
7379
7384
  return addHeapObject(ret);
7380
7385
  };
7381
7386
 
7382
- module.exports.__wbg_warn_df6c5f8c3202ef75 = function(arg0, arg1) {
7387
+ module.exports.__wbg_warn_a198177f86cf58b2 = function(arg0, arg1) {
7383
7388
  console.warn(getStringFromWasm0(arg0, arg1));
7384
7389
  };
7385
7390
 
@@ -7421,12 +7426,12 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
7421
7426
  return ret;
7422
7427
  };
7423
7428
 
7424
- module.exports.__wbindgen_closure_wrapper332 = function(arg0, arg1, arg2) {
7429
+ module.exports.__wbindgen_closure_wrapper331 = function(arg0, arg1, arg2) {
7425
7430
  const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_60);
7426
7431
  return addHeapObject(ret);
7427
7432
  };
7428
7433
 
7429
- module.exports.__wbindgen_closure_wrapper334 = function(arg0, arg1, arg2) {
7434
+ module.exports.__wbindgen_closure_wrapper333 = function(arg0, arg1, arg2) {
7430
7435
  const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_63);
7431
7436
  return addHeapObject(ret);
7432
7437
  };
Binary file
@@ -330,6 +330,6 @@ export const __wbindgen_exn_store: (a: number) => void;
330
330
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
331
331
  export const __wbindgen_export_4: WebAssembly.Table;
332
332
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
333
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5913132a5cb7e31a: (a: number, b: number, c: number) => void;
334
- export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h733f684fa1d8b981: (a: number, b: number) => void;
333
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ca1585fb4938203: (a: number, b: number, c: number) => void;
334
+ export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbcad774514455511: (a: number, b: number) => void;
335
335
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loro-crdt",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.",
5
5
  "keywords": [
6
6
  "crdt",
@@ -25,6 +25,7 @@
25
25
  "development": "./bundler/index.js",
26
26
  "default": "./browser/index.js"
27
27
  },
28
+ "node": "./nodejs/index.js",
28
29
  "import": "./bundler/index.js",
29
30
  "require": "./nodejs/index.js",
30
31
  "default": "./bundler/index.js"
@@ -1,10 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Enable debug info of Loro
5
- */
6
- export function setDebug(): void;
7
- export function callPendingEvents(): void;
8
3
  /**
9
4
  * Decode the metadata of the import blob.
10
5
  *
@@ -18,13 +13,13 @@ export function callPendingEvents(): void;
18
13
  * - changeNum
19
14
  */
20
15
  export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
21
- export function run(): void;
22
- export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
23
- export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
24
16
  /**
25
17
  * Get the version of Loro
26
18
  */
27
19
  export function LORO_VERSION(): string;
20
+ export function run(): void;
21
+ export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
22
+ export function callPendingEvents(): void;
28
23
  /**
29
24
  * Redacts sensitive content in JSON updates within the specified version range.
30
25
  *
@@ -45,6 +40,11 @@ export function LORO_VERSION(): string;
45
40
  * @returns {Object} The redacted JSON updates
46
41
  */
47
42
  export function redactJsonUpdates(json_updates: string | JsonSchema, version_range: any): JsonSchema;
43
+ export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
44
+ /**
45
+ * Enable debug info of Loro
46
+ */
47
+ export function setDebug(): void;
48
48
 
49
49
  /**
50
50
  * Container types supported by loro.
@@ -4213,8 +4213,8 @@ export interface InitOutput {
4213
4213
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
4214
4214
  readonly __wbindgen_export_4: WebAssembly.Table;
4215
4215
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
4216
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5913132a5cb7e31a: (a: number, b: number, c: number) => void;
4217
- readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h733f684fa1d8b981: (a: number, b: number) => void;
4216
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ca1585fb4938203: (a: number, b: number, c: number) => void;
4217
+ readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbcad774514455511: (a: number, b: number) => void;
4218
4218
  readonly __wbindgen_start: () => void;
4219
4219
  }
4220
4220