lebai_sdk 0.2.10 → 0.2.12
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/lebai_sdk.d.ts +8 -0
- package/lebai_sdk_bg.js +98 -73
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +1 -1
package/lebai_sdk.d.ts
CHANGED
@@ -29,6 +29,14 @@ export function version(): string;
|
|
29
29
|
export class Robot {
|
30
30
|
free(): void;
|
31
31
|
/**
|
32
|
+
* @returns {Promise<boolean>}
|
33
|
+
*/
|
34
|
+
is_connected(): Promise<boolean>;
|
35
|
+
/**
|
36
|
+
* @returns {Promise<string>}
|
37
|
+
*/
|
38
|
+
wait_disconnect(): Promise<string>;
|
39
|
+
/**
|
32
40
|
* @param {string} method
|
33
41
|
* @param {string | undefined} [param]
|
34
42
|
* @returns {Promise<string>}
|
package/lebai_sdk_bg.js
CHANGED
@@ -10,6 +10,20 @@ heap.push(undefined, null, true, false);
|
|
10
10
|
|
11
11
|
function getObject(idx) { return heap[idx]; }
|
12
12
|
|
13
|
+
let heap_next = heap.length;
|
14
|
+
|
15
|
+
function dropObject(idx) {
|
16
|
+
if (idx < 132) return;
|
17
|
+
heap[idx] = heap_next;
|
18
|
+
heap_next = idx;
|
19
|
+
}
|
20
|
+
|
21
|
+
function takeObject(idx) {
|
22
|
+
const ret = getObject(idx);
|
23
|
+
dropObject(idx);
|
24
|
+
return ret;
|
25
|
+
}
|
26
|
+
|
13
27
|
let WASM_VECTOR_LEN = 0;
|
14
28
|
|
15
29
|
let cachedUint8Memory0 = null;
|
@@ -90,20 +104,6 @@ function getInt32Memory0() {
|
|
90
104
|
return cachedInt32Memory0;
|
91
105
|
}
|
92
106
|
|
93
|
-
let heap_next = heap.length;
|
94
|
-
|
95
|
-
function dropObject(idx) {
|
96
|
-
if (idx < 132) return;
|
97
|
-
heap[idx] = heap_next;
|
98
|
-
heap_next = idx;
|
99
|
-
}
|
100
|
-
|
101
|
-
function takeObject(idx) {
|
102
|
-
const ret = getObject(idx);
|
103
|
-
dropObject(idx);
|
104
|
-
return ret;
|
105
|
-
}
|
106
|
-
|
107
107
|
function addHeapObject(obj) {
|
108
108
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
109
109
|
const idx = heap_next;
|
@@ -238,19 +238,19 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
238
238
|
return real;
|
239
239
|
}
|
240
240
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
241
|
-
wasm.
|
241
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1cb257f3a84aa38b(arg0, arg1, addHeapObject(arg2));
|
242
242
|
}
|
243
243
|
|
244
|
-
function
|
245
|
-
wasm.
|
244
|
+
function __wbg_adapter_55(arg0, arg1) {
|
245
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h24d6faac42ef5dca(arg0, arg1);
|
246
246
|
}
|
247
247
|
|
248
248
|
function __wbg_adapter_60(arg0, arg1, arg2) {
|
249
|
-
wasm.
|
249
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf3ae89a6bef83f1c(arg0, arg1, addHeapObject(arg2));
|
250
250
|
}
|
251
251
|
|
252
252
|
function __wbg_adapter_63(arg0, arg1) {
|
253
|
-
wasm.
|
253
|
+
wasm.wasm_bindgen__convert__closures__invoke0_mut__h032693d939b0fa3a(arg0, arg1);
|
254
254
|
}
|
255
255
|
|
256
256
|
let cachedUint32Memory0 = null;
|
@@ -357,8 +357,8 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
357
357
|
ptr = ptr >>> 0;
|
358
358
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
359
359
|
}
|
360
|
-
function
|
361
|
-
wasm.
|
360
|
+
function __wbg_adapter_258(arg0, arg1, arg2, arg3) {
|
361
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h743e0e03d07bbd79(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
362
362
|
}
|
363
363
|
|
364
364
|
const RobotFinalization = (typeof FinalizationRegistry === 'undefined')
|
@@ -388,6 +388,20 @@ export class Robot {
|
|
388
388
|
wasm.__wbg_robot_free(ptr);
|
389
389
|
}
|
390
390
|
/**
|
391
|
+
* @returns {Promise<boolean>}
|
392
|
+
*/
|
393
|
+
is_connected() {
|
394
|
+
const ret = wasm.robot_is_connected(this.__wbg_ptr);
|
395
|
+
return takeObject(ret);
|
396
|
+
}
|
397
|
+
/**
|
398
|
+
* @returns {Promise<string>}
|
399
|
+
*/
|
400
|
+
wait_disconnect() {
|
401
|
+
const ret = wasm.robot_wait_disconnect(this.__wbg_ptr);
|
402
|
+
return takeObject(ret);
|
403
|
+
}
|
404
|
+
/**
|
391
405
|
* @param {string} method
|
392
406
|
* @param {string | undefined} [param]
|
393
407
|
* @returns {Promise<string>}
|
@@ -1360,6 +1374,10 @@ export class RobotSubscription {
|
|
1360
1374
|
}
|
1361
1375
|
}
|
1362
1376
|
|
1377
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
1378
|
+
takeObject(arg0);
|
1379
|
+
};
|
1380
|
+
|
1363
1381
|
export function __wbindgen_string_get(arg0, arg1) {
|
1364
1382
|
const obj = getObject(arg1);
|
1365
1383
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
@@ -1369,8 +1387,9 @@ export function __wbindgen_string_get(arg0, arg1) {
|
|
1369
1387
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
1370
1388
|
};
|
1371
1389
|
|
1372
|
-
export function
|
1373
|
-
|
1390
|
+
export function __wbg_robot_new(arg0) {
|
1391
|
+
const ret = Robot.__wrap(arg0);
|
1392
|
+
return addHeapObject(ret);
|
1374
1393
|
};
|
1375
1394
|
|
1376
1395
|
export function __wbindgen_number_new(arg0) {
|
@@ -1388,22 +1407,20 @@ export function __wbg_robotsubscription_new(arg0) {
|
|
1388
1407
|
return addHeapObject(ret);
|
1389
1408
|
};
|
1390
1409
|
|
1391
|
-
export function
|
1392
|
-
const ret =
|
1393
|
-
return
|
1410
|
+
export function __wbindgen_as_number(arg0) {
|
1411
|
+
const ret = +getObject(arg0);
|
1412
|
+
return ret;
|
1394
1413
|
};
|
1395
1414
|
|
1396
|
-
export function
|
1397
|
-
const
|
1398
|
-
|
1399
|
-
return ret;
|
1415
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
1416
|
+
const ret = getObject(arg0);
|
1417
|
+
return addHeapObject(ret);
|
1400
1418
|
};
|
1401
1419
|
|
1402
|
-
export function
|
1403
|
-
const
|
1404
|
-
const ret = typeof(
|
1405
|
-
|
1406
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1420
|
+
export function __wbindgen_is_object(arg0) {
|
1421
|
+
const val = getObject(arg0);
|
1422
|
+
const ret = typeof(val) === 'object' && val !== null;
|
1423
|
+
return ret;
|
1407
1424
|
};
|
1408
1425
|
|
1409
1426
|
export function __wbindgen_cb_drop(arg0) {
|
@@ -1421,34 +1438,31 @@ export function __wbindgen_error_new(arg0, arg1) {
|
|
1421
1438
|
return addHeapObject(ret);
|
1422
1439
|
};
|
1423
1440
|
|
1424
|
-
export function
|
1425
|
-
const
|
1426
|
-
const ret = typeof(
|
1427
|
-
return ret;
|
1428
|
-
};
|
1429
|
-
|
1430
|
-
export function __wbindgen_as_number(arg0) {
|
1431
|
-
const ret = +getObject(arg0);
|
1441
|
+
export function __wbindgen_boolean_get(arg0) {
|
1442
|
+
const v = getObject(arg0);
|
1443
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1432
1444
|
return ret;
|
1433
1445
|
};
|
1434
1446
|
|
1435
|
-
export function
|
1436
|
-
const
|
1437
|
-
|
1447
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
1448
|
+
const obj = getObject(arg1);
|
1449
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
1450
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
1451
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1438
1452
|
};
|
1439
1453
|
|
1440
|
-
export function
|
1441
|
-
const ret = getObject(arg0) ===
|
1454
|
+
export function __wbindgen_is_bigint(arg0) {
|
1455
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
1442
1456
|
return ret;
|
1443
1457
|
};
|
1444
1458
|
|
1445
|
-
export function
|
1446
|
-
const ret =
|
1447
|
-
return ret;
|
1459
|
+
export function __wbindgen_bigint_from_u64(arg0) {
|
1460
|
+
const ret = BigInt.asUintN(64, arg0);
|
1461
|
+
return addHeapObject(ret);
|
1448
1462
|
};
|
1449
1463
|
|
1450
|
-
export function
|
1451
|
-
const ret =
|
1464
|
+
export function __wbindgen_jsval_eq(arg0, arg1) {
|
1465
|
+
const ret = getObject(arg0) === getObject(arg1);
|
1452
1466
|
return ret;
|
1453
1467
|
};
|
1454
1468
|
|
@@ -1457,14 +1471,14 @@ export function __wbindgen_bigint_from_i64(arg0) {
|
|
1457
1471
|
return addHeapObject(ret);
|
1458
1472
|
};
|
1459
1473
|
|
1460
|
-
export function
|
1461
|
-
const ret = getObject(arg0)
|
1474
|
+
export function __wbindgen_in(arg0, arg1) {
|
1475
|
+
const ret = getObject(arg0) in getObject(arg1);
|
1462
1476
|
return ret;
|
1463
1477
|
};
|
1464
1478
|
|
1465
|
-
export function
|
1466
|
-
const ret =
|
1467
|
-
return
|
1479
|
+
export function __wbindgen_is_undefined(arg0) {
|
1480
|
+
const ret = getObject(arg0) === undefined;
|
1481
|
+
return ret;
|
1468
1482
|
};
|
1469
1483
|
|
1470
1484
|
export function __wbindgen_is_string(arg0) {
|
@@ -1572,12 +1586,12 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
1572
1586
|
return ret;
|
1573
1587
|
};
|
1574
1588
|
|
1575
|
-
export function
|
1589
|
+
export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
|
1576
1590
|
const ret = getObject(arg0)[getObject(arg1)];
|
1577
1591
|
return addHeapObject(ret);
|
1578
1592
|
};
|
1579
1593
|
|
1580
|
-
export function
|
1594
|
+
export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
|
1581
1595
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
1582
1596
|
};
|
1583
1597
|
|
@@ -1712,6 +1726,17 @@ export function __wbg_call_67f2111acd2dfdb6() { return handleError(function (arg
|
|
1712
1726
|
return addHeapObject(ret);
|
1713
1727
|
}, arguments) };
|
1714
1728
|
|
1729
|
+
export function __wbg_instanceof_Map_879295fe38a28640(arg0) {
|
1730
|
+
let result;
|
1731
|
+
try {
|
1732
|
+
result = getObject(arg0) instanceof Map;
|
1733
|
+
} catch (_) {
|
1734
|
+
result = false;
|
1735
|
+
}
|
1736
|
+
const ret = result;
|
1737
|
+
return ret;
|
1738
|
+
};
|
1739
|
+
|
1715
1740
|
export function __wbg_isSafeInteger_a23a66ee7c41b273(arg0) {
|
1716
1741
|
const ret = Number.isSafeInteger(getObject(arg0));
|
1717
1742
|
return ret;
|
@@ -1729,7 +1754,7 @@ export function __wbg_new_70828a4353259d4b(arg0, arg1) {
|
|
1729
1754
|
const a = state0.a;
|
1730
1755
|
state0.a = 0;
|
1731
1756
|
try {
|
1732
|
-
return
|
1757
|
+
return __wbg_adapter_258(a, state0.b, arg0, arg1);
|
1733
1758
|
} finally {
|
1734
1759
|
state0.a = a;
|
1735
1760
|
}
|
@@ -1810,33 +1835,33 @@ export function __wbindgen_memory() {
|
|
1810
1835
|
return addHeapObject(ret);
|
1811
1836
|
};
|
1812
1837
|
|
1813
|
-
export function
|
1814
|
-
const ret = makeMutClosure(arg0, arg1,
|
1838
|
+
export function __wbindgen_closure_wrapper1810(arg0, arg1, arg2) {
|
1839
|
+
const ret = makeMutClosure(arg0, arg1, 763, __wbg_adapter_50);
|
1815
1840
|
return addHeapObject(ret);
|
1816
1841
|
};
|
1817
1842
|
|
1818
|
-
export function
|
1819
|
-
const ret = makeMutClosure(arg0, arg1,
|
1843
|
+
export function __wbindgen_closure_wrapper1812(arg0, arg1, arg2) {
|
1844
|
+
const ret = makeMutClosure(arg0, arg1, 763, __wbg_adapter_50);
|
1820
1845
|
return addHeapObject(ret);
|
1821
1846
|
};
|
1822
1847
|
|
1823
|
-
export function
|
1824
|
-
const ret = makeMutClosure(arg0, arg1,
|
1848
|
+
export function __wbindgen_closure_wrapper1814(arg0, arg1, arg2) {
|
1849
|
+
const ret = makeMutClosure(arg0, arg1, 763, __wbg_adapter_55);
|
1825
1850
|
return addHeapObject(ret);
|
1826
1851
|
};
|
1827
1852
|
|
1828
|
-
export function
|
1829
|
-
const ret = makeMutClosure(arg0, arg1,
|
1853
|
+
export function __wbindgen_closure_wrapper1816(arg0, arg1, arg2) {
|
1854
|
+
const ret = makeMutClosure(arg0, arg1, 763, __wbg_adapter_50);
|
1830
1855
|
return addHeapObject(ret);
|
1831
1856
|
};
|
1832
1857
|
|
1833
|
-
export function
|
1834
|
-
const ret = makeMutClosure(arg0, arg1,
|
1858
|
+
export function __wbindgen_closure_wrapper2479(arg0, arg1, arg2) {
|
1859
|
+
const ret = makeMutClosure(arg0, arg1, 873, __wbg_adapter_60);
|
1835
1860
|
return addHeapObject(ret);
|
1836
1861
|
};
|
1837
1862
|
|
1838
|
-
export function
|
1839
|
-
const ret = makeMutClosure(arg0, arg1,
|
1863
|
+
export function __wbindgen_closure_wrapper2519(arg0, arg1, arg2) {
|
1864
|
+
const ret = makeMutClosure(arg0, arg1, 890, __wbg_adapter_63);
|
1840
1865
|
return addHeapObject(ret);
|
1841
1866
|
};
|
1842
1867
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|