logic-mesh 0.1.6 → 0.1.7
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/logic_mesh.d.ts +3 -1
- package/logic_mesh_bg.js +27 -23
- package/logic_mesh_bg.wasm +0 -0
- package/package.json +1 -1
package/logic_mesh.d.ts
CHANGED
|
@@ -168,14 +168,16 @@ export class EngineCommand {
|
|
|
168
168
|
* # Arguments
|
|
169
169
|
* * `block_name` - The name of the block to evaluate
|
|
170
170
|
* * `inputs` - The input values to the block
|
|
171
|
+
* * `lib` - Optional, the library to load the block from, defaults to "core"
|
|
171
172
|
*
|
|
172
173
|
* # Returns
|
|
173
174
|
* A list of values representing the outputs of the block
|
|
174
175
|
* @param {string} block_name
|
|
175
176
|
* @param {any[]} inputs
|
|
177
|
+
* @param {string | undefined} [lib]
|
|
176
178
|
* @returns {Promise<any>}
|
|
177
179
|
*/
|
|
178
|
-
evalBlock(block_name: string, inputs: any[]): Promise<any>;
|
|
180
|
+
evalBlock(block_name: string, inputs: any[], lib?: string): Promise<any>;
|
|
179
181
|
/**
|
|
180
182
|
* Creates a watch on block changes
|
|
181
183
|
* @param {Function} callback
|
package/logic_mesh_bg.js
CHANGED
|
@@ -234,6 +234,20 @@ function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
|
234
234
|
wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
/**
|
|
238
|
+
* @returns {BlocksEngine}
|
|
239
|
+
*/
|
|
240
|
+
export function initEngine() {
|
|
241
|
+
const ret = wasm.initEngine();
|
|
242
|
+
return BlocksEngine.__wrap(ret);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
*/
|
|
247
|
+
export function start() {
|
|
248
|
+
wasm.start();
|
|
249
|
+
}
|
|
250
|
+
|
|
237
251
|
let cachedUint32Memory0 = null;
|
|
238
252
|
|
|
239
253
|
function getUint32Memory0() {
|
|
@@ -252,20 +266,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
252
266
|
WASM_VECTOR_LEN = array.length;
|
|
253
267
|
return ptr;
|
|
254
268
|
}
|
|
255
|
-
/**
|
|
256
|
-
* @returns {BlocksEngine}
|
|
257
|
-
*/
|
|
258
|
-
export function initEngine() {
|
|
259
|
-
const ret = wasm.initEngine();
|
|
260
|
-
return BlocksEngine.__wrap(ret);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
*/
|
|
265
|
-
export function start() {
|
|
266
|
-
wasm.start();
|
|
267
|
-
}
|
|
268
|
-
|
|
269
269
|
/**
|
|
270
270
|
*/
|
|
271
271
|
export function init_panic_hook() {
|
|
@@ -567,19 +567,23 @@ export class EngineCommand {
|
|
|
567
567
|
* # Arguments
|
|
568
568
|
* * `block_name` - The name of the block to evaluate
|
|
569
569
|
* * `inputs` - The input values to the block
|
|
570
|
+
* * `lib` - Optional, the library to load the block from, defaults to "core"
|
|
570
571
|
*
|
|
571
572
|
* # Returns
|
|
572
573
|
* A list of values representing the outputs of the block
|
|
573
574
|
* @param {string} block_name
|
|
574
575
|
* @param {any[]} inputs
|
|
576
|
+
* @param {string | undefined} [lib]
|
|
575
577
|
* @returns {Promise<any>}
|
|
576
578
|
*/
|
|
577
|
-
evalBlock(block_name, inputs) {
|
|
579
|
+
evalBlock(block_name, inputs, lib) {
|
|
578
580
|
const ptr0 = passStringToWasm0(block_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
579
581
|
const len0 = WASM_VECTOR_LEN;
|
|
580
582
|
const ptr1 = passArrayJsValueToWasm0(inputs, wasm.__wbindgen_export_0);
|
|
581
583
|
const len1 = WASM_VECTOR_LEN;
|
|
582
|
-
|
|
584
|
+
var ptr2 = isLikeNone(lib) ? 0 : passStringToWasm0(lib, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
585
|
+
var len2 = WASM_VECTOR_LEN;
|
|
586
|
+
const ret = wasm.enginecommand_evalBlock(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
583
587
|
return takeObject(ret);
|
|
584
588
|
}
|
|
585
589
|
/**
|
|
@@ -641,11 +645,6 @@ export function __wbindgen_string_new(arg0, arg1) {
|
|
|
641
645
|
return addHeapObject(ret);
|
|
642
646
|
};
|
|
643
647
|
|
|
644
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
645
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
646
|
-
return addHeapObject(ret);
|
|
647
|
-
};
|
|
648
|
-
|
|
649
648
|
export function __wbindgen_is_undefined(arg0) {
|
|
650
649
|
const ret = getObject(arg0) === undefined;
|
|
651
650
|
return ret;
|
|
@@ -704,6 +703,11 @@ export function __wbindgen_bigint_from_u64(arg0) {
|
|
|
704
703
|
return addHeapObject(ret);
|
|
705
704
|
};
|
|
706
705
|
|
|
706
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
707
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
708
|
+
return addHeapObject(ret);
|
|
709
|
+
};
|
|
710
|
+
|
|
707
711
|
export function __wbindgen_object_clone_ref(arg0) {
|
|
708
712
|
const ret = getObject(arg0);
|
|
709
713
|
return addHeapObject(ret);
|
|
@@ -1089,8 +1093,8 @@ export function __wbindgen_memory() {
|
|
|
1089
1093
|
return addHeapObject(ret);
|
|
1090
1094
|
};
|
|
1091
1095
|
|
|
1092
|
-
export function
|
|
1093
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1096
|
+
export function __wbindgen_closure_wrapper3486(arg0, arg1, arg2) {
|
|
1097
|
+
const ret = makeMutClosure(arg0, arg1, 1194, __wbg_adapter_50);
|
|
1094
1098
|
return addHeapObject(ret);
|
|
1095
1099
|
};
|
|
1096
1100
|
|
package/logic_mesh_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED