blockly-fluid 1.0.7 → 1.0.9

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 +9 -0
  2. package/package.json +18 -18
package/index.js CHANGED
@@ -142,6 +142,15 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
142
142
 
143
143
  if (!languageGenerator) return;
144
144
 
145
+ if (!languageGenerator.uniqueVariable) {
146
+ languageGenerator.uniqueVariable = (variable) => {
147
+ return languageGenerator.nameDB_.getDistinctName(
148
+ variable,
149
+ Blockly.VARIABLE_CATEGORY_NAME
150
+ );
151
+ };
152
+ };
153
+
145
154
  languageGenerator.forBlock[name] = (block) => (((code) => {
146
155
  if (!output) return code;
147
156
 
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
- {
2
- "name": "blockly-fluid",
3
- "version": "1.0.7",
4
- "description": "A flexible proxy wrapper for Blockly blocks.",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "blockly",
11
- "blocks",
12
- "fluid",
13
- "proxy",
14
- "wrapper"
15
- ],
16
- "author": "DinoscapeProgramming",
17
- "license": "MIT",
18
- "type": "commonjs"
1
+ {
2
+ "name": "blockly-fluid",
3
+ "version": "1.0.9",
4
+ "description": "A flexible proxy wrapper for Blockly blocks.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "blockly",
11
+ "blocks",
12
+ "fluid",
13
+ "proxy",
14
+ "wrapper"
15
+ ],
16
+ "author": "DinoscapeProgramming",
17
+ "license": "MIT",
18
+ "type": "commonjs"
19
19
  }