blockly-fluid 1.4.26 → 1.4.28

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/index.js +6 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -59,7 +59,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
59
59
 
60
60
  valueInput.setCheck(input.check);
61
61
  } else {
62
- valueInput.connection.setShadowDom(new DOMParser().parseFromString(`<shadow type="shadow_string"><field name="TEXT"></field></shadow>`, "text/xml").firstChild);
62
+ valueInput.connection.setShadowDom(new DOMParser().parseFromString(`<shadow type="shadow_string"></shadow>`, "text/xml").firstChild);
63
63
  };
64
64
 
65
65
  if (input.options) {
@@ -200,7 +200,10 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
200
200
  if ((typeof next === "function") ? next() : next) this.setNextStatement(true, null);
201
201
  } else {
202
202
  if (output === "Color") (output = "Colour");
203
- if ((typeof output === "function") && ![String, Number, Boolean, Array, Object].includes(output)) (output = output());
203
+ if ((typeof output === "function") && ![String, Number, Boolean, Array, Object].includes(output)) {
204
+ output = output();
205
+ console.log(output, [String, Number, Boolean, Array, Object].includes(output));
206
+ };
204
207
 
205
208
  this.setPreviousStatement(false);
206
209
  this.setNextStatement(false);
@@ -216,7 +219,7 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
216
219
  this.inputList.forEach((input) => {
217
220
  if (input.connection?.shadowDom || !Array.isArray(input.connection?.check) || input.connection.check.every((check) => !["String", "Number"].includes(check))) return;
218
221
 
219
- input.connection.setShadowDom(new DOMParser().parseFromString(`<shadow type="shadow_${((input.connection.check?.length === 1) && (input.connection.check[0] === "Number")) ? "number" : "string"}"><field name="${((input.connection.check?.length === 1) && (input.connection.check[0] === "Number")) ? "NUMBER" : "TEXT"}"></field></shadow>`, "text/xml").firstChild);
222
+ input.connection.setShadowDom(new DOMParser().parseFromString(`<shadow type="shadow_${((input.connection.check?.length === 1) && (input.connection.check[0] === "Number")) ? "number" : "string"}"></shadow>`, "text/xml").firstChild);
220
223
  });
221
224
  }
222
225
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockly-fluid",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "description": "A flexible proxy wrapper for Blockly blocks.",
5
5
  "main": "index.js",
6
6
  "scripts": {