@utoo/web 1.2.0-rc.13 → 1.2.0-rc.14

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.
@@ -13,15 +13,15 @@ export function init_pack(): void;
13
13
  * @param {string} filter
14
14
  */
15
15
  export function initLogFilter(filter: string): void;
16
+ /**
17
+ * @param {number} worker_id
18
+ */
19
+ export function workerCreated(worker_id: number): void;
16
20
  /**
17
21
  * @param {Function} creator
18
22
  * @param {Function} terminator
19
23
  */
20
24
  export function registerWorkerScheduler(creator: Function, terminator: Function): void;
21
- /**
22
- * @param {number} worker_id
23
- */
24
- export function workerCreated(worker_id: number): void;
25
25
  /**
26
26
  * Entry point for web workers
27
27
  * @param {number} ptr
package/esm/utoo/index.js CHANGED
@@ -208,15 +208,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
208
208
  CLOSURE_DTORS.register(real, state, state);
209
209
  return real;
210
210
  }
211
- function getArrayJsValueFromWasm0(ptr, len) {
212
- ptr = ptr >>> 0;
213
- const mem = getDataViewMemory0();
214
- const result = [];
215
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
216
- result.push(takeObject(mem.getUint32(i, true)));
217
- }
218
- return result;
219
- }
220
211
  function makeClosure(arg0, arg1, dtor, f) {
221
212
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
222
213
  const real = (...args) => {
@@ -239,6 +230,15 @@ function makeClosure(arg0, arg1, dtor, f) {
239
230
  CLOSURE_DTORS.register(real, state, state);
240
231
  return real;
241
232
  }
233
+ function getArrayJsValueFromWasm0(ptr, len) {
234
+ ptr = ptr >>> 0;
235
+ const mem = getDataViewMemory0();
236
+ const result = [];
237
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
238
+ result.push(takeObject(mem.getUint32(i, true)));
239
+ }
240
+ return result;
241
+ }
242
242
  function _assertClass(instance, klass) {
243
243
  if (!(instance instanceof klass)) {
244
244
  throw new Error(`expected instance of ${klass.name}`);
@@ -271,12 +271,11 @@ export function initLogFilter(filter) {
271
271
  const len0 = WASM_VECTOR_LEN;
272
272
  wasm.initLogFilter(ptr0, len0);
273
273
  }
274
- /**
275
- * @param {Function} creator
276
- * @param {Function} terminator
277
- */
278
- export function registerWorkerScheduler(creator, terminator) {
279
- wasm.registerWorkerScheduler(addHeapObject(creator), addHeapObject(terminator));
274
+ function passArray8ToWasm0(arg, malloc) {
275
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
276
+ getUint8ArrayMemory0().set(arg, ptr / 1);
277
+ WASM_VECTOR_LEN = arg.length;
278
+ return ptr;
280
279
  }
281
280
  /**
282
281
  * @param {number} worker_id
@@ -284,11 +283,12 @@ export function registerWorkerScheduler(creator, terminator) {
284
283
  export function workerCreated(worker_id) {
285
284
  wasm.workerCreated(worker_id);
286
285
  }
287
- function passArray8ToWasm0(arg, malloc) {
288
- const ptr = malloc(arg.length * 1, 1) >>> 0;
289
- getUint8ArrayMemory0().set(arg, ptr / 1);
290
- WASM_VECTOR_LEN = arg.length;
291
- return ptr;
286
+ /**
287
+ * @param {Function} creator
288
+ * @param {Function} terminator
289
+ */
290
+ export function registerWorkerScheduler(creator, terminator) {
291
+ wasm.registerWorkerScheduler(addHeapObject(creator), addHeapObject(terminator));
292
292
  }
293
293
  /**
294
294
  * Entry point for web workers
@@ -297,12 +297,6 @@ function passArray8ToWasm0(arg, malloc) {
297
297
  export function wasm_thread_entry_point(ptr) {
298
298
  wasm.wasm_thread_entry_point(ptr);
299
299
  }
300
- function __wbg_adapter_4(arg0, arg1) {
301
- wasm.__wbindgen_export_6(arg0, arg1);
302
- }
303
- function __wbg_adapter_7(arg0, arg1, arg2) {
304
- wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
305
- }
306
300
  let stack_pointer = 128;
307
301
  function addBorrowedObject(obj) {
308
302
  if (stack_pointer == 1)
@@ -310,14 +304,20 @@ function addBorrowedObject(obj) {
310
304
  heap[--stack_pointer] = obj;
311
305
  return stack_pointer;
312
306
  }
313
- function __wbg_adapter_12(arg0, arg1, arg2) {
307
+ function __wbg_adapter_4(arg0, arg1, arg2) {
314
308
  try {
315
- wasm.__wbindgen_export_8(arg0, arg1, addBorrowedObject(arg2));
309
+ wasm.__wbindgen_export_6(arg0, arg1, addBorrowedObject(arg2));
316
310
  }
317
311
  finally {
318
312
  heap[stack_pointer++] = undefined;
319
313
  }
320
314
  }
315
+ function __wbg_adapter_9(arg0, arg1, arg2) {
316
+ wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
317
+ }
318
+ function __wbg_adapter_12(arg0, arg1) {
319
+ wasm.__wbindgen_export_8(arg0, arg1);
320
+ }
321
321
  function __wbg_adapter_27(arg0, arg1, arg2) {
322
322
  wasm.__wbindgen_export_9(arg0, arg1, addHeapObject(arg2));
323
323
  }
@@ -1736,14 +1736,19 @@ function __wbg_get_imports() {
1736
1736
  return ret;
1737
1737
  }, arguments);
1738
1738
  };
1739
- imports.wbg.__wbindgen_cast_0336f6e3114862a9 = function (arg0, arg1) {
1740
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [], shim_idx: 1993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1741
- const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_4);
1739
+ imports.wbg.__wbindgen_cast_07f92778ebb7194b = function (arg0, arg1) {
1740
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8679, function: Function { arguments: [Externref], shim_idx: 8680, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1741
+ const ret = makeMutClosure(arg0, arg1, 8679, __wbg_adapter_9);
1742
+ return addHeapObject(ret);
1743
+ };
1744
+ imports.wbg.__wbindgen_cast_1a17115a89edae02 = function (arg0, arg1) {
1745
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8663, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8664, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1746
+ const ret = makeClosure(arg0, arg1, 8663, __wbg_adapter_27);
1742
1747
  return addHeapObject(ret);
1743
1748
  };
1744
- imports.wbg.__wbindgen_cast_1fa25394258c7b5c = function (arg0, arg1) {
1745
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1992, function: Function { arguments: [], shim_idx: 1993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1746
- const ret = makeMutClosure(arg0, arg1, 1992, __wbg_adapter_4);
1749
+ imports.wbg.__wbindgen_cast_1ce8880aad03523b = function (arg0, arg1) {
1750
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1994, function: Function { arguments: [], shim_idx: 1995, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1751
+ const ret = makeMutClosure(arg0, arg1, 1994, __wbg_adapter_12);
1747
1752
  return addHeapObject(ret);
1748
1753
  };
1749
1754
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
@@ -1751,9 +1756,9 @@ function __wbg_get_imports() {
1751
1756
  const ret = getStringFromWasm0(arg0, arg1);
1752
1757
  return addHeapObject(ret);
1753
1758
  };
1754
- imports.wbg.__wbindgen_cast_267b46f6d4f9531c = function (arg0, arg1) {
1755
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8678, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1756
- const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_7);
1759
+ imports.wbg.__wbindgen_cast_3c81c10f5ca88e38 = function (arg0, arg1) {
1760
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8679, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8680, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1761
+ const ret = makeMutClosure(arg0, arg1, 8679, __wbg_adapter_9);
1757
1762
  return addHeapObject(ret);
1758
1763
  };
1759
1764
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
@@ -1761,11 +1766,6 @@ function __wbg_get_imports() {
1761
1766
  const ret = BigInt.asUintN(64, arg0);
1762
1767
  return addHeapObject(ret);
1763
1768
  };
1764
- imports.wbg.__wbindgen_cast_71a8823e0cdbb969 = function (arg0, arg1) {
1765
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [Externref], shim_idx: 8678, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1766
- const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_7);
1767
- return addHeapObject(ret);
1768
- };
1769
1769
  imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
1770
1770
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
1771
1771
  wasm.__wbindgen_export_4(arg0, arg1 * 4, 4);
@@ -1785,9 +1785,9 @@ function __wbg_get_imports() {
1785
1785
  const ret = arg0;
1786
1786
  return addHeapObject(ret);
1787
1787
  };
1788
- imports.wbg.__wbindgen_cast_b7dc63dcdfc8d728 = function (arg0, arg1) {
1789
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8682, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8683, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1790
- const ret = makeMutClosure(arg0, arg1, 8682, __wbg_adapter_12);
1788
+ imports.wbg.__wbindgen_cast_ac9494c52c8ec587 = function (arg0, arg1) {
1789
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8684, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8685, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1790
+ const ret = makeMutClosure(arg0, arg1, 8684, __wbg_adapter_4);
1791
1791
  return addHeapObject(ret);
1792
1792
  };
1793
1793
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
@@ -1795,9 +1795,9 @@ function __wbg_get_imports() {
1795
1795
  const ret = arg0;
1796
1796
  return addHeapObject(ret);
1797
1797
  };
1798
- imports.wbg.__wbindgen_cast_ffa04fbd359d627f = function (arg0, arg1) {
1799
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8661, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8662, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1800
- const ret = makeClosure(arg0, arg1, 8661, __wbg_adapter_27);
1798
+ imports.wbg.__wbindgen_cast_dcd82812a61fba21 = function (arg0, arg1) {
1799
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8679, function: Function { arguments: [], shim_idx: 1995, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1800
+ const ret = makeMutClosure(arg0, arg1, 8679, __wbg_adapter_12);
1801
1801
  return addHeapObject(ret);
1802
1802
  };
1803
1803
  imports.wbg.__wbindgen_link_dd5153a359f2e504 = function (arg0) {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/web",
3
- "version": "1.2.0-rc.13",
3
+ "version": "1.2.0-rc.14",
4
4
  "module": "esm/index.js",
5
5
  "types": "esm/index.d.ts",
6
6
  "files": [