blockly 8.0.1-beta.0 → 8.0.1
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/blockly.min.js +848 -855
- package/blockly_compressed.js +666 -670
- package/blockly_compressed.js.map +1 -1
- package/blocks/lists.js +5 -11
- package/blocks/logic.js +5 -11
- package/blocks/loops.js +2 -2
- package/blocks/procedures.js +4 -5
- package/blocks/text.js +5 -11
- package/blocks_compressed.js +143 -148
- package/blocks_compressed.js.map +1 -1
- package/core/serialization/blocks.js +7 -1
- package/core/utils/toolbox.js +1 -1
- package/dart_compressed.js +43 -40
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +39 -37
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +42 -39
- package/lua_compressed.js.map +1 -1
- package/msg/ab.js +2 -1
- package/msg/ace.js +2 -1
- package/msg/af.js +2 -1
- package/msg/am.js +2 -1
- package/msg/ar.js +2 -1
- package/msg/ast.js +2 -1
- package/msg/az.js +4 -3
- package/msg/ba.js +2 -1
- package/msg/bcc.js +2 -1
- package/msg/be-tarask.js +2 -1
- package/msg/be.js +6 -5
- package/msg/bg.js +2 -1
- package/msg/bn.js +2 -1
- package/msg/br.js +2 -1
- package/msg/bs.js +2 -1
- package/msg/ca.js +2 -1
- package/msg/cdo.js +2 -1
- package/msg/cs.js +17 -16
- package/msg/da.js +2 -1
- package/msg/de.js +3 -2
- package/msg/diq.js +3 -2
- package/msg/dty.js +2 -1
- package/msg/ee.js +2 -1
- package/msg/el.js +2 -1
- package/msg/en-gb.js +2 -1
- package/msg/en.js +2 -1
- package/msg/eo.js +3 -2
- package/msg/es.js +3 -2
- package/msg/et.js +2 -1
- package/msg/eu.js +2 -1
- package/msg/fa.js +3 -2
- package/msg/fi.js +2 -1
- package/msg/fo.js +2 -1
- package/msg/fr.js +6 -5
- package/msg/frr.js +2 -1
- package/msg/gl.js +2 -1
- package/msg/gn.js +2 -1
- package/msg/gor.js +2 -1
- package/msg/ha.js +2 -1
- package/msg/hak.js +2 -1
- package/msg/he.js +3 -2
- package/msg/hi.js +2 -1
- package/msg/hr.js +4 -3
- package/msg/hrx.js +2 -1
- package/msg/hu.js +2 -1
- package/msg/hy.js +4 -3
- package/msg/ia.js +2 -1
- package/msg/id.js +14 -13
- package/msg/ig.js +2 -1
- package/msg/inh.js +16 -15
- package/msg/is.js +2 -1
- package/msg/it.js +2 -1
- package/msg/ja.js +9 -8
- package/msg/ka.js +2 -1
- package/msg/kab.js +2 -1
- package/msg/kbd-cyrl.js +2 -1
- package/msg/km.js +2 -1
- package/msg/kn.js +2 -1
- package/msg/ko.js +2 -1
- package/msg/ksh.js +2 -1
- package/msg/ku-latn.js +2 -1
- package/msg/ky.js +2 -1
- package/msg/la.js +2 -1
- package/msg/lb.js +2 -1
- package/msg/lki.js +2 -1
- package/msg/lo.js +2 -1
- package/msg/lrc.js +2 -1
- package/msg/lt.js +2 -1
- package/msg/lv.js +31 -30
- package/msg/mg.js +2 -1
- package/msg/mk.js +2 -1
- package/msg/ml.js +2 -1
- package/msg/mnw.js +2 -1
- package/msg/ms.js +2 -1
- package/msg/my.js +2 -1
- package/msg/mzn.js +2 -1
- package/msg/nb.js +2 -1
- package/msg/ne.js +2 -1
- package/msg/nl.js +2 -1
- package/msg/oc.js +2 -1
- package/msg/olo.js +2 -1
- package/msg/pa.js +5 -4
- package/msg/pl.js +2 -1
- package/msg/pms.js +2 -1
- package/msg/ps.js +2 -1
- package/msg/pt-br.js +2 -1
- package/msg/pt.js +2 -1
- package/msg/ro.js +2 -1
- package/msg/ru.js +2 -1
- package/msg/sc.js +2 -1
- package/msg/sco.js +2 -1
- package/msg/sd.js +2 -1
- package/msg/shn.js +2 -1
- package/msg/si.js +2 -1
- package/msg/sk.js +2 -1
- package/msg/skr-arab.js +2 -1
- package/msg/sl.js +2 -1
- package/msg/smn.js +2 -1
- package/msg/sq.js +2 -1
- package/msg/sr-latn.js +2 -1
- package/msg/sr.js +2 -1
- package/msg/sv.js +2 -1
- package/msg/sw.js +2 -1
- package/msg/ta.js +2 -1
- package/msg/tcy.js +2 -1
- package/msg/te.js +3 -2
- package/msg/th.js +2 -1
- package/msg/ti.js +2 -1
- package/msg/tl.js +2 -1
- package/msg/tlh.js +2 -1
- package/msg/tr.js +2 -1
- package/msg/ug-arab.js +2 -1
- package/msg/uk.js +2 -1
- package/msg/ur.js +2 -1
- package/msg/uz.js +2 -1
- package/msg/vi.js +2 -1
- package/msg/xmf.js +2 -1
- package/msg/yo.js +2 -1
- package/msg/yue.js +3 -2
- package/msg/zgh.js +2 -1
- package/msg/zh-hans.js +5 -4
- package/msg/zh-hant.js +5 -4
- package/package.json +1 -1
- package/php_compressed.js +42 -38
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +25 -26
- package/python_compressed.js.map +1 -1
package/blocks/lists.js
CHANGED
|
@@ -198,13 +198,10 @@ blocks['lists_create_with'] = {
|
|
|
198
198
|
let itemBlock = containerBlock.getInputTargetBlock('STACK');
|
|
199
199
|
// Count number of inputs.
|
|
200
200
|
const connections = [];
|
|
201
|
-
while (itemBlock) {
|
|
202
|
-
if (itemBlock.isInsertionMarker()) {
|
|
203
|
-
itemBlock = itemBlock.getNextBlock();
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
201
|
+
while (itemBlock && !itemBlock.isInsertionMarker()) {
|
|
206
202
|
connections.push(itemBlock.valueConnection_);
|
|
207
|
-
itemBlock =
|
|
203
|
+
itemBlock =
|
|
204
|
+
itemBlock.nextConnection && itemBlock.nextConnection.targetBlock();
|
|
208
205
|
}
|
|
209
206
|
// Disconnect any children that don't belong.
|
|
210
207
|
for (let i = 0; i < this.itemCount_; i++) {
|
|
@@ -229,13 +226,10 @@ blocks['lists_create_with'] = {
|
|
|
229
226
|
let itemBlock = containerBlock.getInputTargetBlock('STACK');
|
|
230
227
|
let i = 0;
|
|
231
228
|
while (itemBlock) {
|
|
232
|
-
if (itemBlock.isInsertionMarker()) {
|
|
233
|
-
itemBlock = itemBlock.getNextBlock();
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
229
|
const input = this.getInput('ADD' + i);
|
|
237
230
|
itemBlock.valueConnection_ = input && input.connection.targetConnection;
|
|
238
|
-
itemBlock =
|
|
231
|
+
itemBlock =
|
|
232
|
+
itemBlock.nextConnection && itemBlock.nextConnection.targetBlock();
|
|
239
233
|
i++;
|
|
240
234
|
}
|
|
241
235
|
},
|
package/blocks/logic.js
CHANGED
|
@@ -394,11 +394,7 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
|
|
|
394
394
|
const valueConnections = [null];
|
|
395
395
|
const statementConnections = [null];
|
|
396
396
|
let elseStatementConnection = null;
|
|
397
|
-
while (clauseBlock) {
|
|
398
|
-
if (clauseBlock.isInsertionMarker()) {
|
|
399
|
-
clauseBlock = clauseBlock.getNextBlock();
|
|
400
|
-
continue;
|
|
401
|
-
}
|
|
397
|
+
while (clauseBlock && !clauseBlock.isInsertionMarker()) {
|
|
402
398
|
switch (clauseBlock.type) {
|
|
403
399
|
case 'controls_if_elseif':
|
|
404
400
|
this.elseifCount_++;
|
|
@@ -412,7 +408,8 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
|
|
|
412
408
|
default:
|
|
413
409
|
throw TypeError('Unknown block type: ' + clauseBlock.type);
|
|
414
410
|
}
|
|
415
|
-
clauseBlock = clauseBlock.
|
|
411
|
+
clauseBlock = clauseBlock.nextConnection &&
|
|
412
|
+
clauseBlock.nextConnection.targetBlock();
|
|
416
413
|
}
|
|
417
414
|
this.updateShape_();
|
|
418
415
|
// Reconnect any child blocks.
|
|
@@ -428,10 +425,6 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
|
|
|
428
425
|
let clauseBlock = containerBlock.nextConnection.targetBlock();
|
|
429
426
|
let i = 1;
|
|
430
427
|
while (clauseBlock) {
|
|
431
|
-
if (clauseBlock.isInsertionMarker()) {
|
|
432
|
-
clauseBlock = clauseBlock.getNextBlock();
|
|
433
|
-
continue;
|
|
434
|
-
}
|
|
435
428
|
switch (clauseBlock.type) {
|
|
436
429
|
case 'controls_if_elseif': {
|
|
437
430
|
const inputIf = this.getInput('IF' + i);
|
|
@@ -452,7 +445,8 @@ const CONTROLS_IF_MUTATOR_MIXIN = {
|
|
|
452
445
|
default:
|
|
453
446
|
throw TypeError('Unknown block type: ' + clauseBlock.type);
|
|
454
447
|
}
|
|
455
|
-
clauseBlock = clauseBlock.
|
|
448
|
+
clauseBlock = clauseBlock.nextConnection &&
|
|
449
|
+
clauseBlock.nextConnection.targetBlock();
|
|
456
450
|
}
|
|
457
451
|
},
|
|
458
452
|
/**
|
package/blocks/loops.js
CHANGED
|
@@ -293,8 +293,8 @@ Extensions.register(
|
|
|
293
293
|
* To add a new loop type add this to your code:
|
|
294
294
|
*
|
|
295
295
|
* // If using the Blockly npm package and es6 import syntax:
|
|
296
|
-
* import {
|
|
297
|
-
*
|
|
296
|
+
* import {loopTypes} from 'blockly/blocks';
|
|
297
|
+
* loopTypes.add('custom_loop');
|
|
298
298
|
*
|
|
299
299
|
* // Else if using Closure Compiler and goog.modules:
|
|
300
300
|
* const {loopTypes} = goog.require('Blockly.libraryBlocks.loops');
|
package/blocks/procedures.js
CHANGED
|
@@ -721,10 +721,10 @@ const PROCEDURE_CALL_COMMON = {
|
|
|
721
721
|
if (!mutatorOpen) {
|
|
722
722
|
this.quarkConnections_ = {};
|
|
723
723
|
this.quarkIds_ = null;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
//
|
|
727
|
-
|
|
724
|
+
} else {
|
|
725
|
+
// fix #6091 - this call could cause an error when outside if-else
|
|
726
|
+
// expanding block while mutating prevents another error (ancient fix)
|
|
727
|
+
this.setCollapsed(false);
|
|
728
728
|
}
|
|
729
729
|
// Test arguments (arrays of strings) for changes. '\n' is not a valid
|
|
730
730
|
// argument name character, so it is a valid delimiter here.
|
|
@@ -736,7 +736,6 @@ const PROCEDURE_CALL_COMMON = {
|
|
|
736
736
|
if (paramIds.length !== paramNames.length) {
|
|
737
737
|
throw RangeError('paramNames and paramIds must be the same length.');
|
|
738
738
|
}
|
|
739
|
-
this.setCollapsed(false);
|
|
740
739
|
if (!this.quarkIds_) {
|
|
741
740
|
// Initialize tracking for this block.
|
|
742
741
|
this.quarkConnections_ = {};
|
package/blocks/text.js
CHANGED
|
@@ -781,13 +781,10 @@ const TEXT_JOIN_MUTATOR_MIXIN = {
|
|
|
781
781
|
let itemBlock = containerBlock.getInputTargetBlock('STACK');
|
|
782
782
|
// Count number of inputs.
|
|
783
783
|
const connections = [];
|
|
784
|
-
while (itemBlock) {
|
|
785
|
-
if (itemBlock.isInsertionMarker()) {
|
|
786
|
-
itemBlock = itemBlock.getNextBlock();
|
|
787
|
-
continue;
|
|
788
|
-
}
|
|
784
|
+
while (itemBlock && !itemBlock.isInsertionMarker()) {
|
|
789
785
|
connections.push(itemBlock.valueConnection_);
|
|
790
|
-
itemBlock =
|
|
786
|
+
itemBlock =
|
|
787
|
+
itemBlock.nextConnection && itemBlock.nextConnection.targetBlock();
|
|
791
788
|
}
|
|
792
789
|
// Disconnect any children that don't belong.
|
|
793
790
|
for (let i = 0; i < this.itemCount_; i++) {
|
|
@@ -812,13 +809,10 @@ const TEXT_JOIN_MUTATOR_MIXIN = {
|
|
|
812
809
|
let itemBlock = containerBlock.getInputTargetBlock('STACK');
|
|
813
810
|
let i = 0;
|
|
814
811
|
while (itemBlock) {
|
|
815
|
-
if (itemBlock.isInsertionMarker()) {
|
|
816
|
-
itemBlock = itemBlock.getNextBlock();
|
|
817
|
-
continue;
|
|
818
|
-
}
|
|
819
812
|
const input = this.getInput('ADD' + i);
|
|
820
813
|
itemBlock.valueConnection_ = input && input.connection.targetConnection;
|
|
821
|
-
itemBlock =
|
|
814
|
+
itemBlock =
|
|
815
|
+
itemBlock.nextConnection && itemBlock.nextConnection.targetBlock();
|
|
822
816
|
i++;
|
|
823
817
|
}
|
|
824
818
|
},
|