loro-crdt 1.10.4 → 1.10.5
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/CHANGELOG.md +6 -0
- package/base64/index.js +69 -68
- package/base64/loro_wasm.d.ts +16 -16
- package/bundler/loro_wasm.d.ts +16 -16
- package/bundler/loro_wasm_bg.js +65 -64
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/loro_wasm.d.ts +16 -16
- package/nodejs/loro_wasm.js +65 -64
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +18 -18
- package/web/loro_wasm.js +63 -62
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +2 -2
package/web/loro_wasm.js
CHANGED
|
@@ -232,37 +232,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
232
232
|
wasm.__externref_drop_slice(ptr, len);
|
|
233
233
|
return result;
|
|
234
234
|
}
|
|
235
|
-
/**
|
|
236
|
-
* Decode the metadata of the import blob.
|
|
237
|
-
*
|
|
238
|
-
* This method is useful to get the following metadata of the import blob:
|
|
239
|
-
*
|
|
240
|
-
* - startVersionVector
|
|
241
|
-
* - endVersionVector
|
|
242
|
-
* - startTimestamp
|
|
243
|
-
* - endTimestamp
|
|
244
|
-
* - mode
|
|
245
|
-
* - changeNum
|
|
246
|
-
* @param {Uint8Array} blob
|
|
247
|
-
* @param {boolean} check_checksum
|
|
248
|
-
* @returns {ImportBlobMetadata}
|
|
249
|
-
*/
|
|
250
|
-
export function decodeImportBlobMeta(blob, check_checksum) {
|
|
251
|
-
const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
const ret = wasm.decodeImportBlobMeta(ptr0, len0, check_checksum);
|
|
254
|
-
if (ret[2]) {
|
|
255
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
256
|
-
}
|
|
257
|
-
return takeFromExternrefTable0(ret[0]);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* Enable debug info of Loro
|
|
262
|
-
*/
|
|
263
|
-
export function setDebug() {
|
|
264
|
-
wasm.setDebug();
|
|
265
|
-
}
|
|
266
235
|
|
|
267
236
|
export function callPendingEvents() {
|
|
268
237
|
wasm.callPendingEvents();
|
|
@@ -282,29 +251,11 @@ export function decodeFrontiers(bytes) {
|
|
|
282
251
|
return takeFromExternrefTable0(ret[0]);
|
|
283
252
|
}
|
|
284
253
|
|
|
285
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
286
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
287
|
-
for (let i = 0; i < array.length; i++) {
|
|
288
|
-
const add = addToExternrefTable0(array[i]);
|
|
289
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
290
|
-
}
|
|
291
|
-
WASM_VECTOR_LEN = array.length;
|
|
292
|
-
return ptr;
|
|
293
|
-
}
|
|
294
254
|
/**
|
|
295
|
-
*
|
|
296
|
-
* @returns {Uint8Array}
|
|
255
|
+
* Enable debug info of Loro
|
|
297
256
|
*/
|
|
298
|
-
export function
|
|
299
|
-
|
|
300
|
-
const len0 = WASM_VECTOR_LEN;
|
|
301
|
-
const ret = wasm.encodeFrontiers(ptr0, len0);
|
|
302
|
-
if (ret[3]) {
|
|
303
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
304
|
-
}
|
|
305
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
306
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
307
|
-
return v2;
|
|
257
|
+
export function setDebug() {
|
|
258
|
+
wasm.setDebug();
|
|
308
259
|
}
|
|
309
260
|
|
|
310
261
|
/**
|
|
@@ -354,16 +305,66 @@ export function LORO_VERSION() {
|
|
|
354
305
|
}
|
|
355
306
|
}
|
|
356
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Decode the metadata of the import blob.
|
|
310
|
+
*
|
|
311
|
+
* This method is useful to get the following metadata of the import blob:
|
|
312
|
+
*
|
|
313
|
+
* - startVersionVector
|
|
314
|
+
* - endVersionVector
|
|
315
|
+
* - startTimestamp
|
|
316
|
+
* - endTimestamp
|
|
317
|
+
* - mode
|
|
318
|
+
* - changeNum
|
|
319
|
+
* @param {Uint8Array} blob
|
|
320
|
+
* @param {boolean} check_checksum
|
|
321
|
+
* @returns {ImportBlobMetadata}
|
|
322
|
+
*/
|
|
323
|
+
export function decodeImportBlobMeta(blob, check_checksum) {
|
|
324
|
+
const ptr0 = passArray8ToWasm0(blob, wasm.__wbindgen_malloc);
|
|
325
|
+
const len0 = WASM_VECTOR_LEN;
|
|
326
|
+
const ret = wasm.decodeImportBlobMeta(ptr0, len0, check_checksum);
|
|
327
|
+
if (ret[2]) {
|
|
328
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
329
|
+
}
|
|
330
|
+
return takeFromExternrefTable0(ret[0]);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
334
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
335
|
+
for (let i = 0; i < array.length; i++) {
|
|
336
|
+
const add = addToExternrefTable0(array[i]);
|
|
337
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
338
|
+
}
|
|
339
|
+
WASM_VECTOR_LEN = array.length;
|
|
340
|
+
return ptr;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* @param {({ peer: PeerID, counter: number })[]} frontiers
|
|
344
|
+
* @returns {Uint8Array}
|
|
345
|
+
*/
|
|
346
|
+
export function encodeFrontiers(frontiers) {
|
|
347
|
+
const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
|
|
348
|
+
const len0 = WASM_VECTOR_LEN;
|
|
349
|
+
const ret = wasm.encodeFrontiers(ptr0, len0);
|
|
350
|
+
if (ret[3]) {
|
|
351
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
352
|
+
}
|
|
353
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
354
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
355
|
+
return v2;
|
|
356
|
+
}
|
|
357
|
+
|
|
357
358
|
export function run() {
|
|
358
359
|
wasm.run();
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
362
|
-
wasm.
|
|
363
|
+
wasm.closure9_externref_shim(arg0, arg1, arg2);
|
|
363
364
|
}
|
|
364
365
|
|
|
365
366
|
function __wbg_adapter_65(arg0, arg1) {
|
|
366
|
-
wasm.
|
|
367
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h423c5eefcad13156(arg0, arg1);
|
|
367
368
|
}
|
|
368
369
|
|
|
369
370
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5559,6 +5560,9 @@ function __wbg_get_imports() {
|
|
|
5559
5560
|
const ret = arg0.entries();
|
|
5560
5561
|
return ret;
|
|
5561
5562
|
};
|
|
5563
|
+
imports.wbg.__wbg_error_1cb1bf0bb7e0da2b = function(arg0, arg1) {
|
|
5564
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
5565
|
+
};
|
|
5562
5566
|
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
5563
5567
|
let deferred0_0;
|
|
5564
5568
|
let deferred0_1;
|
|
@@ -5570,9 +5574,6 @@ function __wbg_get_imports() {
|
|
|
5570
5574
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5571
5575
|
}
|
|
5572
5576
|
};
|
|
5573
|
-
imports.wbg.__wbg_error_fb60fcc2bf54ad8d = function(arg0, arg1) {
|
|
5574
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
5575
|
-
};
|
|
5576
5577
|
imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
5577
5578
|
const ret = Array.from(arg0);
|
|
5578
5579
|
return ret;
|
|
@@ -5660,6 +5661,9 @@ function __wbg_get_imports() {
|
|
|
5660
5661
|
const ret = arg0.length;
|
|
5661
5662
|
return ret;
|
|
5662
5663
|
};
|
|
5664
|
+
imports.wbg.__wbg_log_0671e6aa34e04626 = function(arg0, arg1) {
|
|
5665
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
5666
|
+
};
|
|
5663
5667
|
imports.wbg.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
5664
5668
|
let deferred0_0;
|
|
5665
5669
|
let deferred0_1;
|
|
@@ -5671,9 +5675,6 @@ function __wbg_get_imports() {
|
|
|
5671
5675
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5672
5676
|
}
|
|
5673
5677
|
};
|
|
5674
|
-
imports.wbg.__wbg_log_c442f7198a667311 = function(arg0, arg1) {
|
|
5675
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
5676
|
-
};
|
|
5677
5678
|
imports.wbg.__wbg_log_cb9e190acc5753fb = function(arg0, arg1) {
|
|
5678
5679
|
let deferred0_0;
|
|
5679
5680
|
let deferred0_1;
|
|
@@ -5874,7 +5875,7 @@ function __wbg_get_imports() {
|
|
|
5874
5875
|
const ret = VersionVector.__wrap(arg0);
|
|
5875
5876
|
return ret;
|
|
5876
5877
|
};
|
|
5877
|
-
imports.wbg.
|
|
5878
|
+
imports.wbg.__wbg_warn_90235b184e422485 = function(arg0, arg1) {
|
|
5878
5879
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5879
5880
|
};
|
|
5880
5881
|
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
@@ -5913,7 +5914,7 @@ function __wbg_get_imports() {
|
|
|
5913
5914
|
const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_62);
|
|
5914
5915
|
return ret;
|
|
5915
5916
|
};
|
|
5916
|
-
imports.wbg.
|
|
5917
|
+
imports.wbg.__wbindgen_closure_wrapper721 = function(arg0, arg1, arg2) {
|
|
5917
5918
|
const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_65);
|
|
5918
5919
|
return ret;
|
|
5919
5920
|
};
|
package/web/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -325,6 +325,6 @@ export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
|
325
325
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
326
326
|
export const __externref_table_dealloc: (a: number) => void;
|
|
327
327
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
328
|
-
export const
|
|
329
|
-
export const
|
|
328
|
+
export const closure9_externref_shim: (a: number, b: number, c: any) => void;
|
|
329
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h423c5eefcad13156: (a: number, b: number) => void;
|
|
330
330
|
export const __wbindgen_start: () => void;
|