lebai_sdk 0.1.7 → 0.1.8
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 +0 -12
- package/lebai_sdk_bg.js +79 -123
- package/lebai_sdk_bg.wasm +0 -0
- package/package.json +5 -2
package/lebai_sdk.d.ts
CHANGED
@@ -12,18 +12,6 @@ export function connect(ip: string, simu: boolean): Promise<Robot>;
|
|
12
12
|
*/
|
13
13
|
export function discover_devices(time: number): Promise<any>;
|
14
14
|
/**
|
15
|
-
* @param {bigint} ms
|
16
|
-
* @returns {Promise<void>}
|
17
|
-
*/
|
18
|
-
export function sleep_ms(ms: bigint): Promise<void>;
|
19
|
-
/**
|
20
|
-
* @returns {bigint}
|
21
|
-
*/
|
22
|
-
export function timestamp(): bigint;
|
23
|
-
/**
|
24
|
-
*/
|
25
|
-
export function init(): void;
|
26
|
-
/**
|
27
15
|
* @returns {string}
|
28
16
|
*/
|
29
17
|
export function version(): string;
|
package/lebai_sdk_bg.js
CHANGED
@@ -24,6 +24,15 @@ function takeObject(idx) {
|
|
24
24
|
return ret;
|
25
25
|
}
|
26
26
|
|
27
|
+
function addHeapObject(obj) {
|
28
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
29
|
+
const idx = heap_next;
|
30
|
+
heap_next = heap[idx];
|
31
|
+
|
32
|
+
heap[idx] = obj;
|
33
|
+
return idx;
|
34
|
+
}
|
35
|
+
|
27
36
|
function isLikeNone(x) {
|
28
37
|
return x === undefined || x === null;
|
29
38
|
}
|
@@ -112,15 +121,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
112
121
|
return ptr;
|
113
122
|
}
|
114
123
|
|
115
|
-
function addHeapObject(obj) {
|
116
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
117
|
-
const idx = heap_next;
|
118
|
-
heap_next = heap[idx];
|
119
|
-
|
120
|
-
heap[idx] = obj;
|
121
|
-
return idx;
|
122
|
-
}
|
123
|
-
|
124
124
|
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
125
125
|
|
126
126
|
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
@@ -229,20 +229,20 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
229
229
|
|
230
230
|
return real;
|
231
231
|
}
|
232
|
-
function __wbg_adapter_48(arg0, arg1
|
233
|
-
wasm.
|
232
|
+
function __wbg_adapter_48(arg0, arg1) {
|
233
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h39f5d915b9118494(arg0, arg1);
|
234
234
|
}
|
235
235
|
|
236
|
-
function
|
237
|
-
wasm.
|
236
|
+
function __wbg_adapter_51(arg0, arg1, arg2) {
|
237
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0a70a922144212b1(arg0, arg1, addHeapObject(arg2));
|
238
238
|
}
|
239
239
|
|
240
240
|
function __wbg_adapter_58(arg0, arg1, arg2) {
|
241
|
-
wasm.
|
241
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbaa19d2314244e0e(arg0, arg1, addHeapObject(arg2));
|
242
242
|
}
|
243
243
|
|
244
244
|
function __wbg_adapter_61(arg0, arg1) {
|
245
|
-
wasm.
|
245
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb103ecbb8424f107(arg0, arg1);
|
246
246
|
}
|
247
247
|
|
248
248
|
let cachedUint32Memory0 = null;
|
@@ -281,50 +281,6 @@ export function discover_devices(time) {
|
|
281
281
|
return takeObject(ret);
|
282
282
|
}
|
283
283
|
|
284
|
-
/**
|
285
|
-
* @param {bigint} ms
|
286
|
-
* @returns {Promise<void>}
|
287
|
-
*/
|
288
|
-
export function sleep_ms(ms) {
|
289
|
-
const ret = wasm.sleep_ms(ms);
|
290
|
-
return takeObject(ret);
|
291
|
-
}
|
292
|
-
|
293
|
-
/**
|
294
|
-
* @returns {bigint}
|
295
|
-
*/
|
296
|
-
export function timestamp() {
|
297
|
-
try {
|
298
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
299
|
-
wasm.timestamp(retptr);
|
300
|
-
var r0 = getBigInt64Memory0()[retptr / 8 + 0];
|
301
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
302
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
303
|
-
if (r3) {
|
304
|
-
throw takeObject(r2);
|
305
|
-
}
|
306
|
-
return BigInt.asUintN(64, r0);
|
307
|
-
} finally {
|
308
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
309
|
-
}
|
310
|
-
}
|
311
|
-
|
312
|
-
/**
|
313
|
-
*/
|
314
|
-
export function init() {
|
315
|
-
try {
|
316
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
317
|
-
wasm.init(retptr);
|
318
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
319
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
320
|
-
if (r1) {
|
321
|
-
throw takeObject(r0);
|
322
|
-
}
|
323
|
-
} finally {
|
324
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
325
|
-
}
|
326
|
-
}
|
327
|
-
|
328
284
|
/**
|
329
285
|
* @returns {string}
|
330
286
|
*/
|
@@ -360,8 +316,8 @@ function handleError(f, args) {
|
|
360
316
|
function getArrayU8FromWasm0(ptr, len) {
|
361
317
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
362
318
|
}
|
363
|
-
function
|
364
|
-
wasm.
|
319
|
+
function __wbg_adapter_217(arg0, arg1, arg2, arg3) {
|
320
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hbe1345a0d36fb2f6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
365
321
|
}
|
366
322
|
|
367
323
|
/**
|
@@ -1099,50 +1055,24 @@ export class RobotSubscription {
|
|
1099
1055
|
}
|
1100
1056
|
}
|
1101
1057
|
|
1102
|
-
export function __wbindgen_cb_drop(arg0) {
|
1103
|
-
const obj = takeObject(arg0).original;
|
1104
|
-
if (obj.cnt-- == 1) {
|
1105
|
-
obj.a = 0;
|
1106
|
-
return true;
|
1107
|
-
}
|
1108
|
-
const ret = false;
|
1109
|
-
return ret;
|
1110
|
-
};
|
1111
|
-
|
1112
1058
|
export function __wbindgen_object_drop_ref(arg0) {
|
1113
1059
|
takeObject(arg0);
|
1114
1060
|
};
|
1115
1061
|
|
1116
|
-
export function
|
1117
|
-
const
|
1118
|
-
const ret = typeof(
|
1119
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
1120
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1121
|
-
};
|
1122
|
-
|
1123
|
-
export function __wbindgen_string_get(arg0, arg1) {
|
1124
|
-
const obj = getObject(arg1);
|
1125
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1126
|
-
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1127
|
-
var len0 = WASM_VECTOR_LEN;
|
1128
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1129
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1130
|
-
};
|
1131
|
-
|
1132
|
-
export function __wbindgen_boolean_get(arg0) {
|
1133
|
-
const v = getObject(arg0);
|
1134
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1062
|
+
export function __wbindgen_is_object(arg0) {
|
1063
|
+
const val = getObject(arg0);
|
1064
|
+
const ret = typeof(val) === 'object' && val !== null;
|
1135
1065
|
return ret;
|
1136
1066
|
};
|
1137
1067
|
|
1138
|
-
export function
|
1139
|
-
const ret =
|
1140
|
-
return
|
1068
|
+
export function __wbindgen_is_undefined(arg0) {
|
1069
|
+
const ret = getObject(arg0) === undefined;
|
1070
|
+
return ret;
|
1141
1071
|
};
|
1142
1072
|
|
1143
|
-
export function
|
1144
|
-
const ret =
|
1145
|
-
return
|
1073
|
+
export function __wbindgen_in(arg0, arg1) {
|
1074
|
+
const ret = getObject(arg0) in getObject(arg1);
|
1075
|
+
return ret;
|
1146
1076
|
};
|
1147
1077
|
|
1148
1078
|
export function __wbindgen_number_new(arg0) {
|
@@ -1150,9 +1080,10 @@ export function __wbindgen_number_new(arg0) {
|
|
1150
1080
|
return addHeapObject(ret);
|
1151
1081
|
};
|
1152
1082
|
|
1153
|
-
export function
|
1154
|
-
const
|
1155
|
-
|
1083
|
+
export function __wbindgen_boolean_get(arg0) {
|
1084
|
+
const v = getObject(arg0);
|
1085
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
1086
|
+
return ret;
|
1156
1087
|
};
|
1157
1088
|
|
1158
1089
|
export function __wbindgen_is_bigint(arg0) {
|
@@ -1170,15 +1101,20 @@ export function __wbindgen_jsval_eq(arg0, arg1) {
|
|
1170
1101
|
return ret;
|
1171
1102
|
};
|
1172
1103
|
|
1173
|
-
export function
|
1174
|
-
const
|
1175
|
-
const ret = typeof(
|
1176
|
-
|
1104
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
1105
|
+
const obj = getObject(arg1);
|
1106
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
1107
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
1108
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
1177
1109
|
};
|
1178
1110
|
|
1179
|
-
export function
|
1180
|
-
const
|
1181
|
-
|
1111
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
1112
|
+
const obj = getObject(arg1);
|
1113
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
1114
|
+
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
1115
|
+
var len0 = WASM_VECTOR_LEN;
|
1116
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
1117
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
1182
1118
|
};
|
1183
1119
|
|
1184
1120
|
export function __wbindgen_bigint_from_u64(arg0) {
|
@@ -1186,11 +1122,31 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
1186
1122
|
return addHeapObject(ret);
|
1187
1123
|
};
|
1188
1124
|
|
1189
|
-
export function
|
1190
|
-
const
|
1125
|
+
export function __wbindgen_cb_drop(arg0) {
|
1126
|
+
const obj = takeObject(arg0).original;
|
1127
|
+
if (obj.cnt-- == 1) {
|
1128
|
+
obj.a = 0;
|
1129
|
+
return true;
|
1130
|
+
}
|
1131
|
+
const ret = false;
|
1191
1132
|
return ret;
|
1192
1133
|
};
|
1193
1134
|
|
1135
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
1136
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
1137
|
+
return addHeapObject(ret);
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
export function __wbg_robot_new(arg0) {
|
1141
|
+
const ret = Robot.__wrap(arg0);
|
1142
|
+
return addHeapObject(ret);
|
1143
|
+
};
|
1144
|
+
|
1145
|
+
export function __wbg_robotsubscription_new(arg0) {
|
1146
|
+
const ret = RobotSubscription.__wrap(arg0);
|
1147
|
+
return addHeapObject(ret);
|
1148
|
+
};
|
1149
|
+
|
1194
1150
|
export function __wbindgen_error_new(arg0, arg1) {
|
1195
1151
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
1196
1152
|
return addHeapObject(ret);
|
@@ -1292,12 +1248,12 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
1292
1248
|
return ret;
|
1293
1249
|
};
|
1294
1250
|
|
1295
|
-
export function
|
1251
|
+
export function __wbg_getwithrefkey_5e6d9547403deab8(arg0, arg1) {
|
1296
1252
|
const ret = getObject(arg0)[getObject(arg1)];
|
1297
1253
|
return addHeapObject(ret);
|
1298
1254
|
};
|
1299
1255
|
|
1300
|
-
export function
|
1256
|
+
export function __wbg_set_841ac57cff3d672b(arg0, arg1, arg2) {
|
1301
1257
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
1302
1258
|
};
|
1303
1259
|
|
@@ -1429,7 +1385,7 @@ export function __wbg_new_9d3a9ce4282a18a8(arg0, arg1) {
|
|
1429
1385
|
const a = state0.a;
|
1430
1386
|
state0.a = 0;
|
1431
1387
|
try {
|
1432
|
-
return
|
1388
|
+
return __wbg_adapter_217(a, state0.b, arg0, arg1);
|
1433
1389
|
} finally {
|
1434
1390
|
state0.a = a;
|
1435
1391
|
}
|
@@ -1510,33 +1466,33 @@ export function __wbindgen_memory() {
|
|
1510
1466
|
return addHeapObject(ret);
|
1511
1467
|
};
|
1512
1468
|
|
1513
|
-
export function
|
1514
|
-
const ret = makeMutClosure(arg0, arg1,
|
1469
|
+
export function __wbindgen_closure_wrapper1504(arg0, arg1, arg2) {
|
1470
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_48);
|
1515
1471
|
return addHeapObject(ret);
|
1516
1472
|
};
|
1517
1473
|
|
1518
|
-
export function
|
1519
|
-
const ret = makeMutClosure(arg0, arg1,
|
1474
|
+
export function __wbindgen_closure_wrapper1506(arg0, arg1, arg2) {
|
1475
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1520
1476
|
return addHeapObject(ret);
|
1521
1477
|
};
|
1522
1478
|
|
1523
|
-
export function
|
1524
|
-
const ret = makeMutClosure(arg0, arg1,
|
1479
|
+
export function __wbindgen_closure_wrapper1508(arg0, arg1, arg2) {
|
1480
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1525
1481
|
return addHeapObject(ret);
|
1526
1482
|
};
|
1527
1483
|
|
1528
|
-
export function
|
1529
|
-
const ret = makeMutClosure(arg0, arg1,
|
1484
|
+
export function __wbindgen_closure_wrapper1510(arg0, arg1, arg2) {
|
1485
|
+
const ret = makeMutClosure(arg0, arg1, 570, __wbg_adapter_51);
|
1530
1486
|
return addHeapObject(ret);
|
1531
1487
|
};
|
1532
1488
|
|
1533
|
-
export function
|
1534
|
-
const ret = makeMutClosure(arg0, arg1,
|
1489
|
+
export function __wbindgen_closure_wrapper1989(arg0, arg1, arg2) {
|
1490
|
+
const ret = makeMutClosure(arg0, arg1, 664, __wbg_adapter_58);
|
1535
1491
|
return addHeapObject(ret);
|
1536
1492
|
};
|
1537
1493
|
|
1538
|
-
export function
|
1539
|
-
const ret = makeMutClosure(arg0, arg1,
|
1494
|
+
export function __wbindgen_closure_wrapper2023(arg0, arg1, arg2) {
|
1495
|
+
const ret = makeMutClosure(arg0, arg1, 678, __wbg_adapter_61);
|
1540
1496
|
return addHeapObject(ret);
|
1541
1497
|
};
|
1542
1498
|
|
package/lebai_sdk_bg.wasm
CHANGED
Binary file
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lebai_sdk",
|
3
3
|
"description": "lebai_sdk",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.8",
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
@@ -15,5 +15,8 @@
|
|
15
15
|
],
|
16
16
|
"module": "lebai_sdk.js",
|
17
17
|
"types": "lebai_sdk.d.ts",
|
18
|
-
"sideEffects":
|
18
|
+
"sideEffects": [
|
19
|
+
"./lebai_sdk.js",
|
20
|
+
"./snippets/*"
|
21
|
+
]
|
19
22
|
}
|