Comparing version 0.2.5 to 0.3.0
@@ -13,22 +13,23 @@ let wasm; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
@@ -55,13 +56,24 @@ | ||
let heap_next = heap.length; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
let cachedFloat64Memory0 = null; | ||
heap[idx] = obj; | ||
return idx; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -124,14 +136,2 @@ | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
function debugString(val) { | ||
@@ -231,3 +231,3 @@ // primitive types | ||
function __wbg_adapter_32(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1864656f6612215f(arg0, arg1, addHeapObject(arg2)); | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h749b6be6dbaff178(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
@@ -912,2 +912,9 @@ | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get length() { | ||
const ret = wasm.lorolist_length(this.ptr); | ||
return ret >>> 0; | ||
} | ||
} | ||
@@ -1160,2 +1167,9 @@ | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get size() { | ||
const ret = wasm.loromap_size(this.ptr); | ||
return ret >>> 0; | ||
} | ||
} | ||
@@ -1603,54 +1617,48 @@ | ||
export function __wbindgen_is_undefined(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
export function __wbindgen_object_drop_ref(arg0) { | ||
takeObject(arg0); | ||
}; | ||
export function __wbindgen_number_get(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
export function __wbindgen_object_clone_ref(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_is_null(arg0) { | ||
const ret = getObject(arg0) === null; | ||
export function __wbindgen_cb_drop(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
}; | ||
export function __wbindgen_string_new(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
export function __wbg_event_new(arg0) { | ||
const ret = Event.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_string_get(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
export function __wbindgen_is_undefined(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
export function __wbindgen_is_object(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
export function __wbindgen_is_null(arg0) { | ||
const ret = getObject(arg0) === null; | ||
return ret; | ||
}; | ||
export function __wbindgen_object_clone_ref(arg0) { | ||
const ret = getObject(arg0); | ||
export function __wbindgen_string_new(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_event_new(arg0) { | ||
const ret = Event.__wrap(arg0); | ||
return addHeapObject(ret); | ||
export function __wbindgen_number_get(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
}; | ||
export function __wbg_transaction_new(arg0) { | ||
const ret = Transaction.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_lorotext_new(arg0) { | ||
@@ -1671,20 +1679,22 @@ const ret = LoroText.__wrap(arg0); | ||
export function __wbindgen_cb_drop(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
export function __wbindgen_string_get(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}; | ||
export function __wbg_error_f851667af71bcfc6(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
export function __wbg_transaction_new(arg0) { | ||
const ret = Transaction.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_is_object(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
return ret; | ||
}; | ||
export function __wbg_new_abda76e883ba8a5f() { | ||
@@ -1703,6 +1713,15 @@ const ret = new Error(); | ||
export function __wbindgen_object_drop_ref(arg0) { | ||
takeObject(arg0); | ||
export function __wbg_error_f851667af71bcfc6(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
}; | ||
export function __wbindgen_is_string(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
export function __wbindgen_boolean_get(arg0) { | ||
@@ -1719,7 +1738,2 @@ const v = getObject(arg0); | ||
export function __wbindgen_is_string(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
export function __wbg_instanceof_Window_e266f02eee43b570(arg0) { | ||
@@ -1746,12 +1760,57 @@ let result; | ||
export function __wbg_newwithlength_0da6f12fbc1ab6eb(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
export function __wbg_get_27fe3dac1c4d0224(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_get_27fe3dac1c4d0224(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
export function __wbg_length_e498fbc24f9c1d4f(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
export function __wbg_newnoargs_2b8b6bd7753c76ba(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_get_baf4855f9a986186() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_call_95d1ea488d03e4e8() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_new_f9876326328f45ed() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_self_e7c1f827057f6584() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_window_a09ec664e14b1b81() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_globalThis_87cbb8506fecf3a9() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_global_c85a9259e621f3db() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_newwithlength_0da6f12fbc1ab6eb(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_set_17224bc548dd1d7b(arg0, arg1, arg2) { | ||
@@ -1771,17 +1830,2 @@ getObject(arg0)[arg1 >>> 0] = takeObject(arg2); | ||
export function __wbg_length_e498fbc24f9c1d4f(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
export function __wbg_newnoargs_2b8b6bd7753c76ba(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_call_95d1ea488d03e4e8() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_call_9495de66fdbe016b() { return handleError(function (arg0, arg1, arg2) { | ||
@@ -1817,7 +1861,2 @@ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
export function __wbg_new_f9876326328f45ed() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbg_resolve_fd40f858d9db1a04(arg0) { | ||
@@ -1833,22 +1872,7 @@ const ret = Promise.resolve(getObject(arg0)); | ||
export function __wbg_globalThis_87cbb8506fecf3a9() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
export function __wbg_buffer_cf65c07de34b9a08(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
}; | ||
export function __wbg_self_e7c1f827057f6584() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_window_a09ec664e14b1b81() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_global_c85a9259e621f3db() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_new_537b7341ce90bb31(arg0) { | ||
@@ -1859,2 +1883,6 @@ const ret = new Uint8Array(getObject(arg0)); | ||
export function __wbg_set_17499e8aa4003ebd(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
export function __wbg_length_27a2afe8ab42b09f(arg0) { | ||
@@ -1865,11 +1893,2 @@ const ret = getObject(arg0).length; | ||
export function __wbg_set_17499e8aa4003ebd(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
export function __wbg_get_baf4855f9a986186() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
export function __wbg_ownKeys_9efe69be404540aa() { return handleError(function (arg0) { | ||
@@ -1887,7 +1906,2 @@ const ret = Reflect.ownKeys(getObject(arg0)); | ||
export function __wbg_buffer_cf65c07de34b9a08(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
export function __wbindgen_debug_string(arg0, arg1) { | ||
@@ -1910,6 +1924,6 @@ const ret = debugString(getObject(arg1)); | ||
export function __wbindgen_closure_wrapper1004(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 71, __wbg_adapter_32); | ||
export function __wbindgen_closure_wrapper263(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 33, __wbg_adapter_32); | ||
return addHeapObject(ret); | ||
}; | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function setPanicHook(): void; | ||
export function __wbg_loro_free(a: number): void; | ||
@@ -32,3 +31,2 @@ export function loro_new(): number; | ||
export function transaction_commit(a: number, b: number): void; | ||
export function __wbg_lorotext_free(a: number): void; | ||
export function lorotext___loro_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
@@ -44,3 +42,2 @@ export function lorotext___loro_delete(a: number, b: number, c: number, d: number, e: number): void; | ||
export function lorotext_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function __wbg_loromap_free(a: number): void; | ||
export function loromap___loro_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
@@ -59,2 +56,3 @@ export function loromap___txn_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function loromap_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function loromap_size(a: number): number; | ||
export function __wbg_lorolist_free(a: number): void; | ||
@@ -74,2 +72,6 @@ export function lorolist___loro_insert(a: number, b: number, c: number, d: number, e: number): void; | ||
export function lorolist_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function lorolist_length(a: number): number; | ||
export function __wbg_lorotext_free(a: number): void; | ||
export function __wbg_loromap_free(a: number): void; | ||
export function setPanicHook(): void; | ||
export function __wbg_prelimtext_free(a: number): void; | ||
@@ -94,5 +96,5 @@ export function prelimtext_new(a: number, b: number): number; | ||
export const __wbindgen_export_2: WebAssembly.Table; | ||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1864656f6612215f(a: number, b: number, c: number): void; | ||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h749b6be6dbaff178(a: number, b: number, c: number): void; | ||
export function __wbindgen_add_to_stack_pointer(a: number): number; | ||
export function __wbindgen_free(a: number, b: number): void; | ||
export function __wbindgen_exn_store(a: number): void; |
@@ -184,2 +184,5 @@ /* tslint:disable */ | ||
*/ | ||
readonly length: number; | ||
/** | ||
*/ | ||
readonly value: any; | ||
@@ -258,2 +261,5 @@ } | ||
*/ | ||
readonly size: number; | ||
/** | ||
*/ | ||
readonly value: any; | ||
@@ -260,0 +266,0 @@ } |
@@ -5,8 +5,3 @@ { | ||
"dev": "deno run -A ./scripts/build.ts dev" | ||
}, | ||
"test": { | ||
"files": { | ||
"include": ["deno_test/"] | ||
} | ||
} | ||
} |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function setPanicHook(): void; | ||
export function __wbg_loro_free(a: number): void; | ||
@@ -32,3 +31,2 @@ export function loro_new(): number; | ||
export function transaction_commit(a: number, b: number): void; | ||
export function __wbg_lorotext_free(a: number): void; | ||
export function lorotext___loro_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
@@ -44,3 +42,2 @@ export function lorotext___loro_delete(a: number, b: number, c: number, d: number, e: number): void; | ||
export function lorotext_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function __wbg_loromap_free(a: number): void; | ||
export function loromap___loro_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
@@ -59,2 +56,3 @@ export function loromap___txn_insert(a: number, b: number, c: number, d: number, e: number, f: number): void; | ||
export function loromap_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function loromap_size(a: number): number; | ||
export function __wbg_lorolist_free(a: number): void; | ||
@@ -74,2 +72,6 @@ export function lorolist___loro_insert(a: number, b: number, c: number, d: number, e: number): void; | ||
export function lorolist_unsubscribe(a: number, b: number, c: number, d: number): void; | ||
export function lorolist_length(a: number): number; | ||
export function __wbg_lorotext_free(a: number): void; | ||
export function __wbg_loromap_free(a: number): void; | ||
export function setPanicHook(): void; | ||
export function __wbg_prelimtext_free(a: number): void; | ||
@@ -94,5 +96,5 @@ export function prelimtext_new(a: number, b: number): number; | ||
export const __wbindgen_export_2: WebAssembly.Table; | ||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1864656f6612215f(a: number, b: number, c: number): void; | ||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h749b6be6dbaff178(a: number, b: number, c: number): void; | ||
export function __wbindgen_add_to_stack_pointer(a: number): number; | ||
export function __wbindgen_free(a: number, b: number): void; | ||
export function __wbindgen_exn_store(a: number): void; |
@@ -184,2 +184,5 @@ /* tslint:disable */ | ||
*/ | ||
readonly length: number; | ||
/** | ||
*/ | ||
readonly value: any; | ||
@@ -258,2 +261,5 @@ } | ||
*/ | ||
readonly size: number; | ||
/** | ||
*/ | ||
readonly value: any; | ||
@@ -260,0 +266,0 @@ } |
@@ -12,22 +12,23 @@ let imports = {}; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
@@ -52,13 +53,24 @@ | ||
let heap_next = heap.length; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
let cachedFloat64Memory0 = null; | ||
heap[idx] = obj; | ||
return idx; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -119,14 +131,2 @@ | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
function debugString(val) { | ||
@@ -226,3 +226,3 @@ // primitive types | ||
function __wbg_adapter_32(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1864656f6612215f(arg0, arg1, addHeapObject(arg2)); | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h749b6be6dbaff178(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
@@ -909,2 +909,9 @@ | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get length() { | ||
const ret = wasm.lorolist_length(this.ptr); | ||
return ret >>> 0; | ||
} | ||
} | ||
@@ -1158,2 +1165,9 @@ module.exports.LoroList = LoroList; | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get size() { | ||
const ret = wasm.loromap_size(this.ptr); | ||
return ret >>> 0; | ||
} | ||
} | ||
@@ -1607,54 +1621,48 @@ module.exports.LoroMap = LoroMap; | ||
module.exports.__wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
module.exports.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
module.exports.__wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_null = function(arg0) { | ||
const ret = getObject(arg0) === null; | ||
module.exports.__wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
module.exports.__wbg_event_new = function(arg0) { | ||
const ret = Event.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
module.exports.__wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_is_object = function(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
module.exports.__wbindgen_is_null = function(arg0) { | ||
const ret = getObject(arg0) === null; | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_object_clone_ref = function(arg0) { | ||
const ret = getObject(arg0); | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_event_new = function(arg0) { | ||
const ret = Event.__wrap(arg0); | ||
return addHeapObject(ret); | ||
module.exports.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
}; | ||
module.exports.__wbg_transaction_new = function(arg0) { | ||
const ret = Transaction.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_lorotext_new = function(arg0) { | ||
@@ -1675,20 +1683,22 @@ const ret = LoroText.__wrap(arg0); | ||
module.exports.__wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'string' ? obj : undefined; | ||
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len0 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len0; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr0; | ||
}; | ||
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
module.exports.__wbg_transaction_new = function(arg0) { | ||
const ret = Transaction.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_object = function(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
return ret; | ||
}; | ||
module.exports.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -1707,6 +1717,15 @@ const ret = new Error(); | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) { | ||
try { | ||
console.error(getStringFromWasm0(arg0, arg1)); | ||
} finally { | ||
wasm.__wbindgen_free(arg0, arg1); | ||
} | ||
}; | ||
module.exports.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_boolean_get = function(arg0) { | ||
@@ -1723,7 +1742,2 @@ const v = getObject(arg0); | ||
module.exports.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
module.exports.__wbg_instanceof_Window_e266f02eee43b570 = function(arg0) { | ||
@@ -1750,12 +1764,57 @@ let result; | ||
module.exports.__wbg_newwithlength_0da6f12fbc1ab6eb = function(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_new_f9876326328f45ed = function() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_newwithlength_0da6f12fbc1ab6eb = function(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) { | ||
@@ -1775,17 +1834,2 @@ getObject(arg0)[arg1 >>> 0] = takeObject(arg2); | ||
module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) { | ||
@@ -1821,7 +1865,2 @@ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
module.exports.__wbg_new_f9876326328f45ed = function() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_resolve_fd40f858d9db1a04 = function(arg0) { | ||
@@ -1837,22 +1876,7 @@ const ret = Promise.resolve(getObject(arg0)); | ||
module.exports.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
}; | ||
module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) { | ||
@@ -1863,2 +1887,6 @@ const ret = new Uint8Array(getObject(arg0)); | ||
module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
module.exports.__wbg_length_27a2afe8ab42b09f = function(arg0) { | ||
@@ -1869,11 +1897,2 @@ const ret = getObject(arg0).length; | ||
module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
module.exports.__wbg_ownKeys_9efe69be404540aa = function() { return handleError(function (arg0) { | ||
@@ -1891,7 +1910,2 @@ const ret = Reflect.ownKeys(getObject(arg0)); | ||
module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_debug_string = function(arg0, arg1) { | ||
@@ -1914,4 +1928,4 @@ const ret = debugString(getObject(arg1)); | ||
module.exports.__wbindgen_closure_wrapper1004 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 71, __wbg_adapter_32); | ||
module.exports.__wbindgen_closure_wrapper263 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 33, __wbg_adapter_32); | ||
return addHeapObject(ret); | ||
@@ -1918,0 +1932,0 @@ }; |
{ | ||
"name": "loro-wasm", | ||
"version": "0.2.5", | ||
"version": "0.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "nodejs/loro_wasm.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4617
2397048