gobstones-blockly 0.19.1 → 0.19.2

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: d6d790d47121537377bf9aa54d561ea22b34c87a24538554ae19ef5832a4b29a
4
- data.tar.gz: da3e0f1d59826ba2029218fa78221673bf2facb892d93530472310e944c11ad5
3
+ metadata.gz: 5ea3b4b8c8c5a9a5626424759cfb545fe3aeb06bbdba73fe7f5b41f813899ad2
4
+ data.tar.gz: 7ea186db0def9c8f28ec00d66df72090cd61989403f8f75fa83ce863b19c2522
5
5
  SHA512:
6
- metadata.gz: c11eebd1376f93bd34e51ec5cecaa2d3e496a3ef7f6d86d11ae30f4d799634c04bfabc028c88a802adeced360a8a295bbad6e9b0b96702df5bc86bfe10b3eb13
7
- data.tar.gz: c42fc89857e4591aa2b7c014e8dd91e1caf74c9a5b7e0ab20c4ecc41713f95faea590e0d00a995dda43884f96adb5496b1458c11b8d95bad46b96deb2d4ce8b0
6
+ metadata.gz: f580833b194e9adb2346b643e2b839bb58ddc6269a56b6c36a88b81e40419c12a7e70e77ebdd19d8397941bf88697c16a1ad42599fe1fae26af38669d52f3d11
7
+ data.tar.gz: eb8fa9c88a4a94779ba7dc13105b45ef45166269dcb605cc0d73d2711b6be8fd78933b36427ecfd6d97cfc1b2f2560c8c764536987d8a1d454239869e8ac395e
@@ -4039,13 +4039,18 @@ window.initProcedsBlockly = function(customStatementType) {
4039
4039
 
4040
4040
  Blockly.CUSTOM_COLORS = {"globalHsvSaturation":0.45,"globalHsvValue":0.65,"primitiveCommand":"#1d3c99","assignation":"#051d66","controlStructure":"#0f2b80","literalExpression":"#1d992c","primitiveExpression":"#1d992c","operator":"#0f801c","program":"#8d1bb3","interactiveProgram":"#6e158c","interactiveBinding":"#a11fcc","procedure":"#935ba6","function":"#745380","primitiveProcedure":"#2e4fb3","primitiveFunction":"#2eb33e","procedure_call":"#355bcc","function_call":"#35cc47","variable":"#056610","parameter":"#056610","complete":"#ff0000","H":{"commands":225,"expressions":127,"definitions":285},"S":{"assignation":95,"variable":95,"parameter":95,"primitiveCommand":81,"literalExpression":81,"primitiveExpression":81,"controlStructure":88,"operator":88,"procedure_call":74,"function_call":74,"primitiveProcedure":74,"primitiveFunction":74,"program":85,"interactiveProgram":85,"interactiveBinding":85,"procedure":45,"function":35,"complete":99},"V":{"assignation":40,"variable":40,"parameter":40,"primitiveCommand":60,"literalExpression":60,"primitiveExpression":60,"controlStructure":50,"operator":50,"procedure_call":80,"function_call":80,"primitiveProcedure":70,"primitiveFunction":70,"program":70,"interactiveProgram":55,"interactiveBinding":80,"procedure":65,"function":50,"complete":99}};
4041
4041
  Blockly.AVAILABLE_ICONS = ["bool-false.svg","bool-true.svg","clean.png","color-azul.svg","color-negro.svg","color-rojo.svg","color-verde.svg","direccion-este.svg","direccion-norte.svg","direccion-oeste.svg","direccion-sur.svg","hand.png","minus.png","plus.png"];
4042
+ const EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
4042
4043
 
4043
4044
  const getOptions = (block) => {
4044
4045
  const parentWorkspace = block.workspace.options.parentWorkspace;
4045
4046
  return parentWorkspace && parentWorkspace.options || block.workspace.options
4046
4047
  }
4047
- const getLocalMediaUrl = (block, name) => getOptions(block).localMedia + name;
4048
- const getLocalMediaSize = (name) => Blockly.AVAILABLE_ICONS.includes(name) ? 16 : 0;
4048
+ const hasLocalMedia = (name) => Blockly.AVAILABLE_ICONS.includes(name)
4049
+ const getLocalMediaUrl = (block, name) =>
4050
+ hasLocalMedia(name)
4051
+ ? getOptions(block).localMedia + name + (getOptions(block).localMediaSuffix || "")
4052
+ : EMPTY_GIF;
4053
+ const getLocalMediaSize = (name) => hasLocalMedia(name) ? 16 : 0;
4049
4054
 
4050
4055
  /**
4051
4056
  * Create the svg representation of a block and render
@@ -5964,6 +5969,14 @@ Blockly.ErrorInforming.CssContent = [
5964
5969
  value: "../media/"
5965
5970
  },
5966
5971
 
5972
+ /*
5973
+ * URL suffix (e.g. to tell Github RAW CDN to serve the right content type)
5974
+ */
5975
+ localMediaSuffix: {
5976
+ type: String,
5977
+ value: "?sanitize=true"
5978
+ },
5979
+
5967
5980
  /*
5968
5981
  * `readOnly` Use blockly in readOnly mode.
5969
5982
  */
@@ -6642,6 +6655,7 @@ Blockly.ErrorInforming.CssContent = [
6642
6655
  }
6643
6656
  });
6644
6657
  this.workspace.options.localMedia = this.localMedia;
6658
+ this.workspace.options.localMediaSuffix = this.localMediaSuffix;
6645
6659
 
6646
6660
  var _this = this;
6647
6661
  this.workspace.addChangeListener(function (a, b, c) {
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module Blockly
3
- VERSION = "0.19.1"
3
+ VERSION = "0.19.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobstones-blockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso