x-block-lib 0.6.44 → 0.6.45

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3805,7 +3805,9 @@ const Vf = {
3805
3805
  console.assert(!1);
3806
3806
  return;
3807
3807
  }
3808
- this.func.id = t.id, this.func.inputs = t.inputs, this.func.outputs = t.outputs;
3808
+ this.func.id = t.id, this.func.inputs = t.inputs, this.func.outputs = t.outputs, this.updateShape_(), this.updateCheck_(), this.updateShadow_(), setTimeout(() => {
3809
+ this.rebuildBlocks_(), this.checkWarning_();
3810
+ }, 0);
3809
3811
  },
3810
3812
  updateShape_: function() {
3811
3813
  var e, t, n, o;
@@ -3825,8 +3827,8 @@ const Vf = {
3825
3827
  s && s.dispose(), this.removeInput("INPUT" + i);
3826
3828
  }
3827
3829
  for (let i = 0; i < this.func.inputs.length; i++) {
3828
- const { name: s } = this.func.inputs[i];
3829
- 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"));
3830
+ const { name: s } = this.func.inputs[i], a = this.getInput("INPUT" + i);
3831
+ a ? (this.setFieldValue(s, "NAME" + i), a.setCheck(null)) : (this.appendValueInput("INPUT" + i).setAlign(te.Align.RIGHT).appendField(s, "NAME" + i).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + i, "OUTPUT0") : this.moveInputBefore("INPUT" + i, "CALLBACK"));
3830
3832
  }
3831
3833
  },
3832
3834
  updateCheck_: function() {
@@ -3989,7 +3991,9 @@ const Ff = {
3989
3991
  console.assert(!1);
3990
3992
  return;
3991
3993
  }
3992
- this.func.id = t.id, this.func.inputs = t.inputs, this.func.outputs = t.outputs;
3994
+ this.func.id = t.id, this.func.inputs = t.inputs, this.func.outputs = t.outputs, this.updateShape_(), this.updateCheck_(), this.updateShadow_(), setTimeout(() => {
3995
+ this.rebuildBlocks_(), this.checkWarning_();
3996
+ }, 0);
3993
3997
  },
3994
3998
  updateShape_: function() {
3995
3999
  var e, t, n, o;
@@ -4009,8 +4013,8 @@ const Ff = {
4009
4013
  s && s.dispose(), this.removeInput("INPUT" + i);
4010
4014
  }
4011
4015
  for (let i = 0; i < this.func.inputs.length; i++) {
4012
- const { name: s } = this.func.inputs[i];
4013
- 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"));
4016
+ const { name: s } = this.func.inputs[i], a = this.getInput("INPUT" + i);
4017
+ a ? (this.setFieldValue(s, "NAME" + i), a.setCheck(null)) : (this.appendValueInput("INPUT" + i).setAlign(te.Align.RIGHT).appendField(s, "NAME" + i).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + i, "OUTPUT0") : this.moveInputBefore("INPUT" + i, "CALLBACK"));
4014
4018
  }
4015
4019
  },
4016
4020
  updateCheck_: function() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.6.44",
4
+ "version": "0.6.45",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",