gobstones-blockly 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 891585669cd266e97df6ffd8181937289f509807199bb7e934ff66912d0736fb
4
- data.tar.gz: 8d8d8930bf62bec7c4fff979550e434899fe5384c5e10474676e230554c6dc76
3
+ metadata.gz: 5df4f3cb3085b99b2ab4961e794ce837134096999868a450215dfd0d074d3144
4
+ data.tar.gz: d2038c6e78c197d2d440de7d570ad3786995d782c43edfa35939067aca23b078
5
5
  SHA512:
6
- metadata.gz: fd46da04329bf1b411e4019abcaf8f9d08b0d2a2ffdb73566b5148d03092d869219534b9abbda36cd377f447bd2cfcce2c0f8118a47d74cd9b415421850915b5
7
- data.tar.gz: ec38226415b998814c5efa693285391078d1206d02a0a82d02fefda81eea45738dd8181a4340cdf54d9bde6e43e0dd8b8397dc3ab1458b7f56ae9a25f07673db
6
+ metadata.gz: 7f59e43a5bd79c13e53a4fb6129253f3b1aae0d8d740e249d67d1c82cb30a08d851aa1bbb4f7a0d15f7559d9f24cebe95461ee7104c6809cd6ba3482c9f1d76f
7
+ data.tar.gz: b6004a73a82b3f898a0905e941c65cd4136c3d5b9a47d9e8f1630d0b757e23ff7eb9a149edf7768d17a1dcc09e0b120a73e6451e7732e640c398460e7d85f652
@@ -87,6 +87,8 @@ Example:
87
87
  <category name="Programas">
88
88
  <block type="Program"></block>
89
89
  <block type="InteractiveProgram"></block>
90
+ </category>
91
+ <category name="Asociaciones">
90
92
  <block type="InteractiveLetterBinding"></block>
91
93
  <block type="InteractiveNumberBinding"></block>
92
94
  <block type="InteractiveKeyBinding"></block>
@@ -3310,7 +3312,7 @@ Blockly.Blocks['procedures_ifreturn'] = {
3310
3312
  };</script>
3311
3313
  <script>var PLUS = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAQAAAD2e2DtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6Jg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AAASUVORK5CYII=";
3313
- var WAND = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB41BMVEUAAACrhwmsiArFmQTtxjftxjjOnwThrQrirQvOmQToxETpxkfUnwS2hQLYohPYoxW/igOXagHKjgPNkQXUnxzfsjngtDzVoR/NkgbLjwOkcwHIiwbov1PJjQnAggPiskDkulXBgwO8fATnuEjpwVq9fgeCUwC3eAW4eAOLWQCQVwDGjBLIiQKWWwC9fgHBhAFlOgBhNQDCggHHigFwPQBoNQDIhgHDqADBqQDOkAF4PgBjLwDIhwLFjAGUUgCJRACIQgCSTwDCiwHNkAJ2OABSJgCcWgqPQgCCOgB8OACPQgCcWgthLQD06Xj16nn47YT14Hv35YD14Xzx1G744Hv44Xvy1m/00nX31nj32Hb323b43Xb43nb43Hb32nb313f103bpwlz2zG/30W/31W/42W/422/43W/43G/42m/412/302/3z2/3zmj402j42Gj43Gj53mj53Wj42mj41mj30WjswEr401/52V/53V/54F/64V/531/522H4zErtsir4yD350j352Tn63TL63Cj61Bn4xQL3twD3tgD4xgD61QD73wD74QD72wD5zgD3vgD3uAD5ywD73AD86wD97wD85AD61AD4wgD2tQD5yQD01gDz3AD60wD4vwDsrgHqswH////vUbxMAAAATXRSTlMABAQHwMIIen0c8fIeCa6yCgI5e7Hp67WAPwOD/otJ/PxLev7+fAKSlQIG3OEIy9IBA+HpBAj1/v77DAr58ZMtKo3u/Q4BcGcTEGJzAcqMNfMAAAABYktHRKBe076gAAAAB3RJTUUH4QwFFBQHSAc27gAAANRJREFUGNNjYIAARiYGFMDMwsqGIsDu68eBzOfk8vfn5kHwefkCAgOD+AXAHEEhYRHR4JDQ0JAwMXEJSSkGaZnwiMio6JiY6Ni4+IREWQY5+aTklNS09PSMzKzsHAVFBgYl5dy8/ILCwqLiklIVVaAhaupl5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VDA0OjQwOjIzLTAzOjAw5hdZgAAAAABJRU5ErkJggg==";
3314
3316
 
3315
3317
  window.initProcedsBlockly = function(customStatementType) {
3316
3318
  Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = 'Describe el procedimiento...';
@@ -3444,7 +3446,7 @@ window.initProcedsBlockly = function(customStatementType) {
3444
3446
  }
3445
3447
 
3446
3448
  var createCallButton = new Blockly.FieldImage(
3447
- WAND,
3449
+ HAND,
3448
3450
  16,
3449
3451
  16,
3450
3452
  Blockly.Msg.VARIABLES_SET_CREATE_GET.replace('%1', name),
@@ -3587,24 +3589,27 @@ window.initProcedsBlockly = function(customStatementType) {
3587
3589
  // if (!withParametersMutator) this.updateParams_();
3588
3590
 
3589
3591
  // [!] adding create call button
3590
- // TODO: Hacer esto
3591
- // var xmlMutation = goog.dom.createDom('mutation');
3592
- // xmlMutation.setAttribute('name', name);
3593
- // for (var i = 0; i < self.arguments_.length; i++) {
3594
- // var xmlArg = goog.dom.createDom('arg');
3595
- // xmlArg.setAttribute('name', self.arguments_[i]);
3596
- // xmlMutation.appendChild(xmlArg);
3597
- // }
3598
- // var xmlBlock = goog.dom.createDom('block', null, xmlMutation);
3599
- // xmlBlock.setAttribute('type', self.callType_);
3600
- // var createCallButton = new Blockly.FieldImage(
3601
- // WAND,
3602
- // 16,
3603
- // 16,
3604
- // "",
3605
- // Blockly.ContextMenu.callbackFactory(self, xmlBlock)
3606
- // );
3607
- // input.appendField(createCallButton);
3592
+ var createCallButton = new Blockly.FieldImage(
3593
+ HAND,
3594
+ 16,
3595
+ 16,
3596
+ "",
3597
+ function() {
3598
+ var name = self.getFieldValue('NAME');
3599
+ var xmlMutation = goog.dom.createDom('mutation');
3600
+ xmlMutation.setAttribute('name', name);
3601
+ for (var i = 0; i < self.arguments_.length; i++) {
3602
+ var xmlArg = goog.dom.createDom('arg');
3603
+ xmlArg.setAttribute('name', self.arguments_[i]);
3604
+ xmlMutation.appendChild(xmlArg);
3605
+ }
3606
+ var xmlBlock = goog.dom.createDom('block', null, xmlMutation);
3607
+ xmlBlock.setAttribute('type', self.callType_);
3608
+
3609
+ Blockly.ContextMenu.callbackFactory(self, xmlBlock)();
3610
+ }
3611
+ );
3612
+ input.appendField(createCallButton);
3608
3613
  };
3609
3614
  };
3610
3615
 
@@ -4030,8 +4035,10 @@ window.initProcedsBlockly = function(customStatementType) {
4030
4035
  }
4031
4036
  </script>
4032
4037
  <script>initProcedsBlockly("Statement");</script>
4033
- <script>var MINUS = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAQAAAD2e2DtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAHdElNRQfhDAUCCi+xWH4JAAABcUlEQVR42u3c7ZGCMBSG0etuYcTKls7AyrSEVWd4+bjnUECMeSbhD6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBzu4XHm2rUvPekD2yutR57/4itTLXU0/Pvs9SUW5TcDrDUyE3r9Na6ZwZKBWD5PxVKIBPAVGtknGsZibeBTADPyCjXE1idn8A0/gJjXFPgn0sEwIEljgAHwPc2Xx87QHMCaE4AzQmgOQE0J4DmBNCcAJoTQHMCaE4AzQmgOQE0J4DmBNCcAJoTQHMCaE4AzQmgOQE0J4DmBNDcb2SUsfc0T2re/utAO0BzPg49sot8HOoI+M5IDJIJ4OF+gI+F7gpyRcwxxa6Iyb0E3mvYB96y1kgtv2vijubS18QBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAWXq7xrTQhKAi3AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTEyLTA1VDAyOjEwOjQ3LTA1OjAwdZLI/gAAACV0RVh0ZGF0ZT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sxEqldb3EGlnECuW/BYs2tf8clcpDTcxy/sR6N3GrO/+L/Tox4h3vfxfVSrs/mUMmtGzm8yq0/GpXkn/E8tf4Dx6D38eIbrrQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDQtMDlUMjA6MDc6MDUtMDc6MDDtLVEkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA0LTA5VDIwOjA3OjA1LTA3OjAwnHDpmAAAAABJRU5ErkJggg==";
4035
4042
 
4036
4043
  /* global Blockly */
4037
4044
 
@@ -4233,7 +4240,7 @@ const modifiers = [
4233
4240
  [ 'ALT', 'ALT' ]
4234
4241
  ];
4235
4242
 
4236
- const getModifiersInput = (block) => block.inputList[0];
4243
+ const getModifiersInput = (block) => block.inputList[1];
4237
4244
  const getModifierFields = (block) => getModifiersInput(block).fieldRow.slice(2);
4238
4245
  const getModifierDropdownFields = (block) => getModifierFields(block).filter(it => it.constructor === Blockly.FieldDropdown);
4239
4246
  const getModifierValues = (block) => getModifierDropdownFields(block).map(it => it.getValue());
@@ -4261,7 +4268,7 @@ createInteractiveBinding = (name, keys) => {
4261
4268
  return {
4262
4269
  init: function () {
4263
4270
  this.jsonInit({
4264
- message0: "%1 %2",
4271
+ message0: "%1 %2 %3 %4",
4265
4272
  type: "InteractiveBinding",
4266
4273
  previousStatement: "InteractiveBinding",
4267
4274
  nextStatement: "InteractiveBinding",
@@ -4270,6 +4277,11 @@ createInteractiveBinding = (name, keys) => {
4270
4277
  "type": "field_label",
4271
4278
  "text": "Al apretar " + name
4272
4279
  },
4280
+ { "type": "input_dummy" },
4281
+ {
4282
+ "type": "field_label",
4283
+ "text": "➣"
4284
+ },
4273
4285
  {
4274
4286
  type: "field_dropdown",
4275
4287
  name: "InteractiveBindingDropdownKey",
@@ -4280,7 +4292,31 @@ createInteractiveBinding = (name, keys) => {
4280
4292
  tooltip: "Escoger una entrada",
4281
4293
  });
4282
4294
 
4283
- this.appendStatementInput('block').setCheck(["Statement"]);
4295
+ this.appendStatementInput('block').setCheck(["Statement"]);
4296
+
4297
+ const self = this;
4298
+ const input = this.inputList[0];
4299
+ input.appendField(new Blockly.FieldImage(
4300
+ PLUS,
4301
+ 16,
4302
+ 16,
4303
+ "Agregar modificador",
4304
+ function() {
4305
+ const modifiersCount = getModifierFields(self).length / 2;
4306
+ if (modifiersCount >= modifiers.length) return;
4307
+
4308
+ self._addModifier();
4309
+ }
4310
+ ));
4311
+ input.appendField(new Blockly.FieldImage(
4312
+ CLEAN,
4313
+ 16,
4314
+ 16,
4315
+ "Limpiar modificadores",
4316
+ function() {
4317
+ self._cleanModifiers();
4318
+ }
4319
+ ));
4284
4320
  },
4285
4321
 
4286
4322
  customContextMenu: function(options) {
@@ -5278,12 +5314,12 @@ Blockly.GobstonesLanguage.init = function () {
5278
5314
  } else {
5279
5315
  Blockly.GobstonesLanguage.variableDB_ =
5280
5316
  new Blockly.Names(Blockly.GobstonesLanguage.RESERVED_WORDS_);
5281
-
5317
+
5282
5318
  // Gobstones lets ñáéíóú, so Blockly's safeName should be rewritten.
5283
5319
  // In the process, makes everything CamelCase which is Gobstones' default.
5284
5320
  Blockly.GobstonesLanguage.variableDB_.safeName_ = function(name) {
5285
5321
  if (!name) return 'unnamed';
5286
-
5322
+
5287
5323
  //Get rid of unwanted chars
5288
5324
  var safe = name.replace(/[^\wáéíóúÁÉÍÓÚñÑ ]/g, '')
5289
5325
 
@@ -5295,7 +5331,7 @@ Blockly.GobstonesLanguage.init = function () {
5295
5331
  safe = safe.split(' ').map((word, i) =>
5296
5332
  !word | i == 0 ? word : word[0].toUpperCase() + word.slice(1)
5297
5333
  ).join('');
5298
-
5334
+
5299
5335
  return safe;
5300
5336
  };
5301
5337
  }
@@ -5390,7 +5426,7 @@ Blockly.GobstonesLanguage.Program = function (block) {
5390
5426
 
5391
5427
  Blockly.GobstonesLanguage.InteractiveProgram = function (block) {
5392
5428
  let program = Blockly.GobstonesLanguage.statementToCode(block, 'interactiveprogram');
5393
-
5429
+
5394
5430
  let init = '';
5395
5431
  if (block.$init)
5396
5432
  init = ` INIT -> {\n${Blockly.GobstonesLanguage.statementToCode(block, 'init')} }\n`;
@@ -5407,7 +5443,7 @@ Blockly.GobstonesLanguage.InteractiveLetterBinding = function (block) {
5407
5443
  let key = block.getFieldValue('InteractiveBindingDropdownKey');
5408
5444
 
5409
5445
  const order = ["CTRL", "ALT", "SHIFT"];
5410
- const modifier = block.inputList[0]
5446
+ const modifier = block.inputList[1]
5411
5447
  .fieldRow
5412
5448
  .slice(2)
5413
5449
  .filter(it => it.constructor === Blockly.FieldDropdown)
@@ -5490,7 +5526,7 @@ var formatCallName = function (name, capitalizeFirst, type = Blockly.PROCEDURE_C
5490
5526
  var makeParameterList = function (block) {
5491
5527
  return block.arguments_
5492
5528
  .map(arg => formatCallName(arg, false, Blockly.VARIABLE_CATEGORY_NAME))
5493
- .join(', ');
5529
+ .join(', ');
5494
5530
  };
5495
5531
 
5496
5532
  Blockly.GobstonesLanguage.procedures_defnoreturn = function (block) {
@@ -5553,7 +5589,7 @@ Blockly.GobstonesLanguage.variables_get = function (block) {
5553
5589
 
5554
5590
  Blockly.GobstonesLanguage.Asignacion = function(block) {
5555
5591
  var varValue = Blockly.GobstonesLanguage.valueToCode(block, 'varValue', Blockly.GobstonesLanguage.ORDER_ASSIGNMENT);
5556
- var code = formatCallName(block.getFieldValue('varName'),false,Blockly.VARIABLE_CATEGORY_NAME) +
5592
+ var code = formatCallName(block.getFieldValue('varName'),false,Blockly.VARIABLE_CATEGORY_NAME) +
5557
5593
  ' := ' + varValue + '\n';
5558
5594
  return code;
5559
5595
  };
@@ -5736,7 +5772,7 @@ Blockly.ErrorInforming.CssContent = [
5736
5772
  'stroke-width: 3px;',
5737
5773
  '}',
5738
5774
  ];</script>
5739
-
5775
+
5740
5776
  <script>
5741
5777
  const BLOCKLY_PRIMITIVE_PROCEDURES = "Procedimientos primitivos";
5742
5778
  const BLOCKLY_PRIMITIVE_FUNCTIONS = "Funciones primitivas";
@@ -6112,7 +6148,7 @@ Blockly.ErrorInforming.CssContent = [
6112
6148
  init: function () {
6113
6149
  let argsIndex = 1;
6114
6150
  this.setColour(Blockly.CUSTOM_COLORS.primitiveProcedure);
6115
-
6151
+
6116
6152
  if (icon) {
6117
6153
  this.appendDummyInput().appendField(new Blockly.FieldImage(
6118
6154
  icon,
@@ -6270,7 +6306,7 @@ Blockly.ErrorInforming.CssContent = [
6270
6306
  if (program && interactiveProgram) {
6271
6307
  program.setDeletable(true);
6272
6308
  interactiveProgram.setDeletable(true);
6273
-
6309
+
6274
6310
  const important = program.$timestamp > interactiveProgram.$timestamp ? program : interactiveProgram;
6275
6311
  const unimportant = program.$timestamp > interactiveProgram.$timestamp ? interactiveProgram : program;
6276
6312
 
@@ -6296,7 +6332,7 @@ Blockly.ErrorInforming.CssContent = [
6296
6332
  if (block.type === "variables_get" && block.$parent) {
6297
6333
  const parentBlock = this.workspace.getBlockById(block.$parent);
6298
6334
  const varField = block.getField("VAR");
6299
-
6335
+
6300
6336
  if (
6301
6337
  parentBlock &&
6302
6338
  (
@@ -6515,7 +6551,7 @@ Blockly.ErrorInforming.CssContent = [
6515
6551
  /**
6516
6552
  * Generate gobstones code from the blocks in the workspace.
6517
6553
  * It removes all highlighting and errors if already present.
6518
- *
6554
+ *
6519
6555
  * There is an additional option which if provided adds pragma BEGIN/END REGION
6520
6556
  * to the output.
6521
6557
  * * `element.generateCode( {withRegions: true, clearErrors: false} );`
@@ -6547,12 +6583,12 @@ Blockly.ErrorInforming.CssContent = [
6547
6583
 
6548
6584
  /**
6549
6585
  * Highlight a given block, telling the user it has an error
6550
- *
6586
+ *
6551
6587
  * `blockId` is the block ID where the error should appear
6552
- *
6588
+ *
6553
6589
  * `errorKind` is either a string with the description or an object with a kind of error.
6554
6590
  * Next are examples with the existent error kinds.
6555
- *
6591
+ *
6556
6592
  * Examples:
6557
6593
  * * `element.showBlockError('a1s2', 'Hey, here is an error')`
6558
6594
  * * `element.showBlockError('a1s2', { kind: 'INCOMPLETE_ERROR'} )`
@@ -6565,10 +6601,10 @@ Blockly.ErrorInforming.CssContent = [
6565
6601
 
6566
6602
  testColors(colors) {
6567
6603
  Blockly.CUSTOM_COLORS = colors;
6568
- Blockly.HSV_SATURATION = colors.globalHsvSaturation;
6604
+ Blockly.HSV_SATURATION = colors.globalHsvSaturation;
6569
6605
  Blockly.HSV_VALUE = colors.globalHsvValue;
6570
6606
  Blockly.Blocks.procedures.HUE = colors.procedure;
6571
-
6607
+
6572
6608
  var xmlDom = Blockly.Xml.workspaceToDom(this.workspace);
6573
6609
  const xml = Blockly.Xml.domToText(xmlDom);
6574
6610
  this.resetWorkspace();
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module Blockly
3
- VERSION = "0.11.2"
3
+ VERSION = "0.12.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobstones-blockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-09 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler