x-block-lib 0.6.40 → 0.6.41
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/dist/index.js +16 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3764,8 +3764,8 @@ const Vf = {
|
|
|
3764
3764
|
},
|
|
3765
3765
|
loadExtraState: function(e) {
|
|
3766
3766
|
var t, n, o, i, s, a;
|
|
3767
|
-
this.space.id = ((t = e.space) == null ? void 0 : t.id) ?? "", this.space.name = ((n = e.space) == null ? void 0 : n.name) ?? "", this.func.id = ((o = e.func) == null ? void 0 : o.id) ?? "", this.func.name = ((i = e.func) == null ? void 0 : i.name) ?? "", this.func.inputs = ((s = e.func) == null ? void 0 : s.inputs) ?? [], this.func.outputs = ((a = e.func) == null ? void 0 : a.outputs) ?? [], this.updateShape_(), setTimeout(() => {
|
|
3768
|
-
this.
|
|
3767
|
+
this.space.id = ((t = e.space) == null ? void 0 : t.id) ?? "", this.space.name = ((n = e.space) == null ? void 0 : n.name) ?? "", this.func.id = ((o = e.func) == null ? void 0 : o.id) ?? "", this.func.name = ((i = e.func) == null ? void 0 : i.name) ?? "", this.func.inputs = ((s = e.func) == null ? void 0 : s.inputs) ?? [], this.func.outputs = ((a = e.func) == null ? void 0 : a.outputs) ?? [], this.updateShape_(), this.updateCheck_(), this.updateShadow_(), setTimeout(() => {
|
|
3768
|
+
this.rebuildBlocks_(), this.checkWarning_();
|
|
3769
3769
|
}, 0);
|
|
3770
3770
|
},
|
|
3771
3771
|
genSpaceOpts_: function() {
|
|
@@ -3801,6 +3801,12 @@ const Vf = {
|
|
|
3801
3801
|
this.getInput("INPUT" + i) || (this.appendValueInput("INPUT" + i).setAlign(te.Align.RIGHT).appendField(s), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + i, "OUTPUT0") : this.moveInputBefore("INPUT" + i, "CALLBACK"));
|
|
3802
3802
|
}
|
|
3803
3803
|
},
|
|
3804
|
+
updateCheck_: function() {
|
|
3805
|
+
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
3806
|
+
const { type: t } = this.func.inputs[e], n = this.getInput("INPUT" + e);
|
|
3807
|
+
t === "string" ? n.setCheck("String") : t === "number" ? n.setCheck("Number") : t === "boolean" ? n.setCheck("Boolean") : t === "list" ? n.setCheck("Array") : t === "object" && n.setCheck("Object");
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3804
3810
|
updateShadow_: function() {
|
|
3805
3811
|
if (!this.isInsertionMarker())
|
|
3806
3812
|
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
@@ -3869,8 +3875,8 @@ r.forBlock.call_func_v1 = function(e) {
|
|
|
3869
3875
|
}), a += `${t}};`;
|
|
3870
3876
|
const c = n(o.space.name + "/" + o.func.name);
|
|
3871
3877
|
let l = "";
|
|
3872
|
-
o.func.outputs.forEach(({ id: h }
|
|
3873
|
-
l += `${t}var __output_${h}
|
|
3878
|
+
o.func.outputs.forEach(({ id: h }) => {
|
|
3879
|
+
l += `${t}var __output_${h}__ = result[${n(h)}];
|
|
3874
3880
|
`;
|
|
3875
3881
|
});
|
|
3876
3882
|
const _ = r.statementToCode(o, "CALLBACK");
|
|
@@ -4095,8 +4101,8 @@ const Ff = {
|
|
|
4095
4101
|
return;
|
|
4096
4102
|
const e = [];
|
|
4097
4103
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
4098
|
-
const {
|
|
4099
|
-
e.push(["INPUT" + t, n
|
|
4104
|
+
const { id: n, name: o } = this.func.inputs[t];
|
|
4105
|
+
e.push(["INPUT" + t, `__input_${n}__`, o, !1]);
|
|
4100
4106
|
}
|
|
4101
4107
|
Ge(this, e);
|
|
4102
4108
|
},
|
|
@@ -4112,9 +4118,9 @@ const Ff = {
|
|
|
4112
4118
|
k.func_entry_v1 = Ff;
|
|
4113
4119
|
r.forBlock.func_entry_v1 = function(e) {
|
|
4114
4120
|
const t = e, n = r.statementToCode(t, "HANDLE"), o = [];
|
|
4115
|
-
for (let
|
|
4116
|
-
const
|
|
4117
|
-
o.push(
|
|
4121
|
+
for (let s = 0; s < t.func.inputs.length; s++) {
|
|
4122
|
+
const { id: a } = t.func.inputs[s];
|
|
4123
|
+
o.push(`__input_${a}__`);
|
|
4118
4124
|
}
|
|
4119
4125
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
4120
4126
|
${n}}`;
|
|
@@ -4207,7 +4213,7 @@ const Hf = {
|
|
|
4207
4213
|
};
|
|
4208
4214
|
k.set_func_output_v1 = Hf;
|
|
4209
4215
|
r.forBlock.set_func_output_v1 = function(e) {
|
|
4210
|
-
const t = r.quote_, n = e, {
|
|
4216
|
+
const t = r.quote_, n = e, { id: o, type: i } = n.output;
|
|
4211
4217
|
let s = r.valueToCode(n, "VALUE", u.ATOMIC);
|
|
4212
4218
|
if (s === void 0)
|
|
4213
4219
|
switch (i) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.41",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vue-draggable-plus": "^0.6.0",
|
|
33
33
|
"vuetify": "^3.8.1",
|
|
34
34
|
"x-essential-lib": "^0.8.7",
|
|
35
|
-
"x-runtime-lib": "^0.6.
|
|
35
|
+
"x-runtime-lib": "^0.6.47",
|
|
36
36
|
"x-state-lib": "^0.2.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|