loro-crdt 1.4.2 → 1.4.3
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 +7 -0
- package/base64/index.js +63 -2
- package/base64/loro_wasm.d.ts +24 -0
- package/base64/loro_wasm_bg-231c2a2e.js +64 -0
- package/bundler/loro_wasm.d.ts +24 -0
- package/bundler/loro_wasm_bg.js +60 -0
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +5 -0
- package/nodejs/loro_wasm.d.ts +24 -0
- package/nodejs/loro_wasm.js +60 -0
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +5 -0
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +29 -0
- package/web/loro_wasm.js +60 -0
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +5 -0
- package/base64/loro_wasm_bg-b04f3476.js +0 -64
package/CHANGELOG.md
CHANGED
package/base64/index.js
CHANGED
|
@@ -276,6 +276,27 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
276
276
|
}
|
|
277
277
|
return result;
|
|
278
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Get the version of Loro
|
|
281
|
+
* @returns {string}
|
|
282
|
+
*/
|
|
283
|
+
function LORO_VERSION() {
|
|
284
|
+
let deferred1_0;
|
|
285
|
+
let deferred1_1;
|
|
286
|
+
try {
|
|
287
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
288
|
+
wasm.LORO_VERSION(retptr);
|
|
289
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
290
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
291
|
+
deferred1_0 = r0;
|
|
292
|
+
deferred1_1 = r1;
|
|
293
|
+
return getStringFromWasm0(r0, r1);
|
|
294
|
+
} finally {
|
|
295
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
296
|
+
wasm.__wbindgen_export_5(deferred1_0, deferred1_1, 1);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
279
300
|
/**
|
|
280
301
|
*/
|
|
281
302
|
function run() {
|
|
@@ -1719,6 +1740,45 @@ class LoroDoc {
|
|
|
1719
1740
|
wasm.lorodoc_setNextCommitMessage(this.__wbg_ptr, ptr0, len0);
|
|
1720
1741
|
}
|
|
1721
1742
|
/**
|
|
1743
|
+
* Set the origin of the next commit
|
|
1744
|
+
* @param {string} origin
|
|
1745
|
+
*/
|
|
1746
|
+
setNextCommitOrigin(origin) {
|
|
1747
|
+
const ptr0 = passStringToWasm0(origin, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1749
|
+
wasm.lorodoc_setNextCommitOrigin(this.__wbg_ptr, ptr0, len0);
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* Set the timestamp of the next commit
|
|
1753
|
+
* @param {number} timestamp
|
|
1754
|
+
*/
|
|
1755
|
+
setNextCommitTimestamp(timestamp) {
|
|
1756
|
+
wasm.lorodoc_setNextCommitTimestamp(this.__wbg_ptr, timestamp);
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* Set the options of the next commit
|
|
1760
|
+
* @param {{ origin?: string, timestamp?: number, message?: string }} options
|
|
1761
|
+
*/
|
|
1762
|
+
setNextCommitOptions(options) {
|
|
1763
|
+
try {
|
|
1764
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1765
|
+
wasm.lorodoc_setNextCommitOptions(retptr, this.__wbg_ptr, addHeapObject(options));
|
|
1766
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1767
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1768
|
+
if (r1) {
|
|
1769
|
+
throw takeObject(r0);
|
|
1770
|
+
}
|
|
1771
|
+
} finally {
|
|
1772
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* Clear the options of the next commit
|
|
1777
|
+
*/
|
|
1778
|
+
clearNextCommitOptions() {
|
|
1779
|
+
wasm.lorodoc_clearNextCommitOptions(this.__wbg_ptr);
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1722
1782
|
* Get deep value of the document with container id
|
|
1723
1783
|
* @returns {any}
|
|
1724
1784
|
*/
|
|
@@ -6559,6 +6619,7 @@ var imports = /*#__PURE__*/Object.freeze({
|
|
|
6559
6619
|
__proto__: null,
|
|
6560
6620
|
AwarenessWasm: AwarenessWasm,
|
|
6561
6621
|
Cursor: Cursor,
|
|
6622
|
+
LORO_VERSION: LORO_VERSION,
|
|
6562
6623
|
LoroCounter: LoroCounter,
|
|
6563
6624
|
LoroDoc: LoroDoc,
|
|
6564
6625
|
LoroList: LoroList,
|
|
@@ -6689,7 +6750,7 @@ var imports = /*#__PURE__*/Object.freeze({
|
|
|
6689
6750
|
// Without this patch, Cloudflare Worker would raise issue like: "Uncaught TypeError: wasm2.__wbindgen_start is not a function"
|
|
6690
6751
|
|
|
6691
6752
|
|
|
6692
|
-
import loro_wasm_bg_js from './loro_wasm_bg-
|
|
6753
|
+
import loro_wasm_bg_js from './loro_wasm_bg-231c2a2e.js';
|
|
6693
6754
|
const instance = new WebAssembly.Instance(loro_wasm_bg_js(), {
|
|
6694
6755
|
"./loro_wasm_bg.js": imports,
|
|
6695
6756
|
});
|
|
@@ -6894,4 +6955,4 @@ LoroDoc.prototype.toJsonWithReplacer = function (replacer) {
|
|
|
6894
6955
|
return run(layer);
|
|
6895
6956
|
};
|
|
6896
6957
|
|
|
6897
|
-
export { Awareness, AwarenessWasm, Cursor, Loro, LoroCounter, LoroDoc, LoroList, LoroMap, LoroMovableList, LoroText, LoroTree, LoroTreeNode, UndoManager, VersionVector, __wbg_String_b9412f8799faab3e, __wbg_apply_0a5aa603881e6d79, __wbg_buffer_12d079cc21e14bdb, __wbg_call_27c0f87801dedf93, __wbg_call_8e7cb608789c2528, __wbg_call_938992c832f74314, __wbg_call_b3ca7c6051f9bec1, __wbg_crypto_1d1f22824a6a080c, __wbg_cursor_new, __wbg_done_298b57d23c0fc80c, __wbg_entries_95cc2c823b285a09, __wbg_entries_ce844941d0c51880, __wbg_error_9384d761bf46409d, __wbg_error_f851667af71bcfc6, __wbg_from_89e3fc3ba5e6fb48, __wbg_getRandomValues_3aa56aa6edec874c, __wbg_get_bd8e338fbd5f5cc8, __wbg_get_e3c254076557e348, __wbg_getindex_03d06b4e7ea3475e, __wbg_getwithrefkey_edc2c8960f0f1191, __wbg_globalThis_d1e6af4856ba331b, __wbg_global_207b558942527489, __wbg_instanceof_ArrayBuffer_836825be07d4c9d2, __wbg_instanceof_Map_87917e0a7aaf4012, __wbg_instanceof_Object_71ca3c0a59266746, __wbg_instanceof_Uint8Array_2b3bbecd033d19f6, __wbg_isArray_2ab64d95e09ea0ae, __wbg_isSafeInteger_f7b04ef02296c4d2, __wbg_iterator_2cee6dadfd956dfa, __wbg_length_c20a40f15020d68a, __wbg_length_cd7af8117672b8b8, __wbg_log_aba5996d9bde071f, __wbg_log_c86c3e1bf097ba35, __wbg_log_c9486ca5d8e2cbe8, __wbg_lorocounter_new, __wbg_lorolist_new, __wbg_loromap_new, __wbg_loromovablelist_new, __wbg_lorotext_new, __wbg_lorotree_new, __wbg_lorotreenode_new, __wbg_mark_40e050a77cc39fea, __wbg_measure_aa7a73f17813f708, __wbg_msCrypto_eb05e62b530a1508, __wbg_new_16b304a2cfa7ff4a, __wbg_new_63b92bc8671ed464, __wbg_new_72fb9a18b5ae2624, __wbg_new_abda76e883ba8a5f, __wbg_new_d9bc3a0147634640, __wbg_newnoargs_e258087cd0daa0ea, __wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb, __wbg_newwithlength_66ae46612e7f0234, __wbg_newwithlength_e9b4878cebadb3d3, __wbg_next_196c84450b364254, __wbg_next_40fc327bfc8770e6, __wbg_node_104a2ff8d6ea03a2, __wbg_now_cd30a09c9b727b65, __wbg_ownKeys_658942b7f28d1fe9, __wbg_process_4a72847cc503995b, __wbg_push_a5b05aedc7234f9f, __wbg_randomFillSync_5c9c955aa56b6049, __wbg_require_cca90b1a94a0255b, __wbg_resolve_b0083a7967828ec8, __wbg_self_ce0dbfc45cf2f5be, __wbg_set_1f9b04f170055d33, __wbg_set_8417257aaedc936b, __wbg_set_a47bac70306a19a7, __wbg_set_d4638f722068f043, __wbg_set_f975102236d3c502, __wbg_set_wasm, __wbg_setindex_0b7ede192dc5eca8, __wbg_stack_658279fe44541cf6, __wbg_subarray_a1f73cd4b5b42fe1, __wbg_then_0c86a60e8fcfe9f6, __wbg_value_d93c65011f51a456, __wbg_versions_f686565e586dd935, __wbg_versionvector_new, __wbg_window_c6fb939a7f436783, __wbindgen_as_number, __wbindgen_bigint_from_i64, __wbindgen_bigint_from_u64, __wbindgen_bigint_get_as_i64, __wbindgen_boolean_get, __wbindgen_cb_drop, __wbindgen_closure_wrapper482, __wbindgen_closure_wrapper485, __wbindgen_debug_string, __wbindgen_error_new, __wbindgen_in, __wbindgen_is_array, __wbindgen_is_bigint, __wbindgen_is_falsy, __wbindgen_is_function, __wbindgen_is_null, __wbindgen_is_object, __wbindgen_is_string, __wbindgen_is_undefined, __wbindgen_jsval_eq, __wbindgen_jsval_loose_eq, __wbindgen_memory, __wbindgen_number_get, __wbindgen_number_new, __wbindgen_object_clone_ref, __wbindgen_object_drop_ref, __wbindgen_rethrow, __wbindgen_string_get, __wbindgen_string_new, __wbindgen_throw, __wbindgen_typeof, decodeFrontiers, decodeImportBlobMeta, encodeFrontiers, getType, isContainer, isContainerId, newContainerID, newRootContainerID, run, setDebug };
|
|
6958
|
+
export { Awareness, AwarenessWasm, Cursor, LORO_VERSION, Loro, LoroCounter, LoroDoc, LoroList, LoroMap, LoroMovableList, LoroText, LoroTree, LoroTreeNode, UndoManager, VersionVector, __wbg_String_b9412f8799faab3e, __wbg_apply_0a5aa603881e6d79, __wbg_buffer_12d079cc21e14bdb, __wbg_call_27c0f87801dedf93, __wbg_call_8e7cb608789c2528, __wbg_call_938992c832f74314, __wbg_call_b3ca7c6051f9bec1, __wbg_crypto_1d1f22824a6a080c, __wbg_cursor_new, __wbg_done_298b57d23c0fc80c, __wbg_entries_95cc2c823b285a09, __wbg_entries_ce844941d0c51880, __wbg_error_9384d761bf46409d, __wbg_error_f851667af71bcfc6, __wbg_from_89e3fc3ba5e6fb48, __wbg_getRandomValues_3aa56aa6edec874c, __wbg_get_bd8e338fbd5f5cc8, __wbg_get_e3c254076557e348, __wbg_getindex_03d06b4e7ea3475e, __wbg_getwithrefkey_edc2c8960f0f1191, __wbg_globalThis_d1e6af4856ba331b, __wbg_global_207b558942527489, __wbg_instanceof_ArrayBuffer_836825be07d4c9d2, __wbg_instanceof_Map_87917e0a7aaf4012, __wbg_instanceof_Object_71ca3c0a59266746, __wbg_instanceof_Uint8Array_2b3bbecd033d19f6, __wbg_isArray_2ab64d95e09ea0ae, __wbg_isSafeInteger_f7b04ef02296c4d2, __wbg_iterator_2cee6dadfd956dfa, __wbg_length_c20a40f15020d68a, __wbg_length_cd7af8117672b8b8, __wbg_log_aba5996d9bde071f, __wbg_log_c86c3e1bf097ba35, __wbg_log_c9486ca5d8e2cbe8, __wbg_lorocounter_new, __wbg_lorolist_new, __wbg_loromap_new, __wbg_loromovablelist_new, __wbg_lorotext_new, __wbg_lorotree_new, __wbg_lorotreenode_new, __wbg_mark_40e050a77cc39fea, __wbg_measure_aa7a73f17813f708, __wbg_msCrypto_eb05e62b530a1508, __wbg_new_16b304a2cfa7ff4a, __wbg_new_63b92bc8671ed464, __wbg_new_72fb9a18b5ae2624, __wbg_new_abda76e883ba8a5f, __wbg_new_d9bc3a0147634640, __wbg_newnoargs_e258087cd0daa0ea, __wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb, __wbg_newwithlength_66ae46612e7f0234, __wbg_newwithlength_e9b4878cebadb3d3, __wbg_next_196c84450b364254, __wbg_next_40fc327bfc8770e6, __wbg_node_104a2ff8d6ea03a2, __wbg_now_cd30a09c9b727b65, __wbg_ownKeys_658942b7f28d1fe9, __wbg_process_4a72847cc503995b, __wbg_push_a5b05aedc7234f9f, __wbg_randomFillSync_5c9c955aa56b6049, __wbg_require_cca90b1a94a0255b, __wbg_resolve_b0083a7967828ec8, __wbg_self_ce0dbfc45cf2f5be, __wbg_set_1f9b04f170055d33, __wbg_set_8417257aaedc936b, __wbg_set_a47bac70306a19a7, __wbg_set_d4638f722068f043, __wbg_set_f975102236d3c502, __wbg_set_wasm, __wbg_setindex_0b7ede192dc5eca8, __wbg_stack_658279fe44541cf6, __wbg_subarray_a1f73cd4b5b42fe1, __wbg_then_0c86a60e8fcfe9f6, __wbg_value_d93c65011f51a456, __wbg_versions_f686565e586dd935, __wbg_versionvector_new, __wbg_window_c6fb939a7f436783, __wbindgen_as_number, __wbindgen_bigint_from_i64, __wbindgen_bigint_from_u64, __wbindgen_bigint_get_as_i64, __wbindgen_boolean_get, __wbindgen_cb_drop, __wbindgen_closure_wrapper482, __wbindgen_closure_wrapper485, __wbindgen_debug_string, __wbindgen_error_new, __wbindgen_in, __wbindgen_is_array, __wbindgen_is_bigint, __wbindgen_is_falsy, __wbindgen_is_function, __wbindgen_is_null, __wbindgen_is_object, __wbindgen_is_string, __wbindgen_is_undefined, __wbindgen_jsval_eq, __wbindgen_jsval_loose_eq, __wbindgen_memory, __wbindgen_number_get, __wbindgen_number_new, __wbindgen_object_clone_ref, __wbindgen_object_drop_ref, __wbindgen_rethrow, __wbindgen_string_get, __wbindgen_string_new, __wbindgen_throw, __wbindgen_typeof, decodeFrontiers, decodeImportBlobMeta, encodeFrontiers, getType, isContainer, isContainerId, newContainerID, newRootContainerID, run, setDebug };
|
package/base64/loro_wasm.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* Get the version of Loro
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function LORO_VERSION(): string;
|
|
8
|
+
/**
|
|
4
9
|
*/
|
|
5
10
|
export function run(): void;
|
|
6
11
|
/**
|
|
@@ -1916,6 +1921,25 @@ export class LoroDoc {
|
|
|
1916
1921
|
*/
|
|
1917
1922
|
setNextCommitMessage(msg: string): void;
|
|
1918
1923
|
/**
|
|
1924
|
+
* Set the origin of the next commit
|
|
1925
|
+
* @param {string} origin
|
|
1926
|
+
*/
|
|
1927
|
+
setNextCommitOrigin(origin: string): void;
|
|
1928
|
+
/**
|
|
1929
|
+
* Set the timestamp of the next commit
|
|
1930
|
+
* @param {number} timestamp
|
|
1931
|
+
*/
|
|
1932
|
+
setNextCommitTimestamp(timestamp: number): void;
|
|
1933
|
+
/**
|
|
1934
|
+
* Set the options of the next commit
|
|
1935
|
+
* @param {{ origin?: string, timestamp?: number, message?: string }} options
|
|
1936
|
+
*/
|
|
1937
|
+
setNextCommitOptions(options: { origin?: string, timestamp?: number, message?: string }): void;
|
|
1938
|
+
/**
|
|
1939
|
+
* Clear the options of the next commit
|
|
1940
|
+
*/
|
|
1941
|
+
clearNextCommitOptions(): void;
|
|
1942
|
+
/**
|
|
1919
1943
|
* Get deep value of the document with container id
|
|
1920
1944
|
* @returns {any}
|
|
1921
1945
|
*/
|