blockly 9.0.0 → 9.1.0-beta.0

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 (189) hide show
  1. package/README.md +2 -2
  2. package/blockly.js +1 -1
  3. package/blockly.min.js +397 -374
  4. package/blockly_compressed.js +376 -368
  5. package/blockly_compressed.js.map +1 -1
  6. package/blocks.js +1 -1
  7. package/blocks_compressed.js +1 -1
  8. package/blocks_compressed.js.map +1 -1
  9. package/browser.js +1 -1
  10. package/core/block_drag_surface.d.ts +15 -8
  11. package/core/block_svg.d.ts +10 -4
  12. package/core/blockly.d.ts +8 -20
  13. package/core/bubble.d.ts +32 -32
  14. package/core/comment.d.ts +15 -19
  15. package/core/field.d.ts +10 -1
  16. package/core/field_angle.d.ts +15 -2
  17. package/core/field_dropdown.d.ts +19 -24
  18. package/core/field_variable.d.ts +3 -3
  19. package/core/generator.d.ts +4 -4
  20. package/core/interfaces/i_ast_node_location_with_block.d.ts +1 -1
  21. package/core/interfaces/i_parameter_model.d.ts +39 -0
  22. package/core/interfaces/i_procedure_block.d.ts +13 -0
  23. package/core/interfaces/i_procedure_map.d.ts +16 -0
  24. package/core/interfaces/i_procedure_model.d.ts +57 -0
  25. package/core/menu.d.ts +19 -19
  26. package/core/menuitem.d.ts +8 -8
  27. package/core/mutator.d.ts +13 -13
  28. package/core/procedures/observable_parameter_model.d.ts +45 -0
  29. package/core/procedures/observable_procedure_map.d.ts +35 -0
  30. package/core/procedures/observable_procedure_model.d.ts +62 -0
  31. package/core/procedures/update_procedures.d.ts +13 -0
  32. package/core/procedures.d.ts +5 -1
  33. package/core/rendered_connection.d.ts +1 -1
  34. package/core/renderers/common/constants.d.ts +1 -6
  35. package/core/scrollbar.d.ts +68 -39
  36. package/core/serialization/blocks.d.ts +38 -0
  37. package/core/serialization/priorities.d.ts +4 -0
  38. package/core/serialization/procedures.d.ts +78 -0
  39. package/core/serialization/variables.d.ts +33 -0
  40. package/core/serialization.d.ts +15 -0
  41. package/core/theme.d.ts +5 -5
  42. package/core/touch.d.ts +3 -3
  43. package/core/warning.d.ts +4 -4
  44. package/core/workspace.d.ts +9 -5
  45. package/core/workspace_svg.d.ts +26 -26
  46. package/core/zoom_controls.d.ts +18 -18
  47. package/core-browser.js +1 -1
  48. package/core.js +1 -1
  49. package/dart.js +1 -1
  50. package/dart_compressed.js +2 -2
  51. package/dart_compressed.js.map +1 -1
  52. package/index.js +1 -1
  53. package/javascript.js +1 -1
  54. package/javascript_compressed.js +4 -5
  55. package/javascript_compressed.js.map +1 -1
  56. package/lua.js +1 -1
  57. package/lua_compressed.js +2 -3
  58. package/lua_compressed.js.map +1 -1
  59. package/msg/ab.js +1 -1
  60. package/msg/ace.js +1 -1
  61. package/msg/af.js +1 -1
  62. package/msg/am.js +1 -1
  63. package/msg/ar.js +1 -1
  64. package/msg/ast.js +1 -1
  65. package/msg/az.js +1 -1
  66. package/msg/ba.js +1 -1
  67. package/msg/bcc.js +1 -1
  68. package/msg/be-tarask.js +1 -1
  69. package/msg/be.js +1 -1
  70. package/msg/bg.js +1 -1
  71. package/msg/bn.js +1 -1
  72. package/msg/br.js +1 -1
  73. package/msg/bs.js +1 -1
  74. package/msg/ca.js +1 -1
  75. package/msg/cdo.js +1 -1
  76. package/msg/cs.js +1 -1
  77. package/msg/da.js +1 -1
  78. package/msg/de.js +1 -1
  79. package/msg/diq.js +1 -1
  80. package/msg/dty.js +1 -1
  81. package/msg/ee.js +1 -1
  82. package/msg/el.js +1 -1
  83. package/msg/en-gb.js +1 -1
  84. package/msg/en.js +1 -1
  85. package/msg/eo.js +1 -1
  86. package/msg/es.js +1 -1
  87. package/msg/et.js +1 -1
  88. package/msg/eu.js +1 -1
  89. package/msg/fa.js +1 -1
  90. package/msg/fi.js +1 -1
  91. package/msg/fo.js +1 -1
  92. package/msg/fr.js +1 -1
  93. package/msg/frr.js +1 -1
  94. package/msg/gl.js +1 -1
  95. package/msg/gn.js +1 -1
  96. package/msg/gor.js +1 -1
  97. package/msg/ha.js +1 -1
  98. package/msg/hak.js +1 -1
  99. package/msg/he.js +1 -1
  100. package/msg/hi.js +1 -1
  101. package/msg/hr.js +1 -1
  102. package/msg/hrx.js +1 -1
  103. package/msg/hu.js +1 -1
  104. package/msg/hy.js +1 -1
  105. package/msg/ia.js +1 -1
  106. package/msg/id.js +1 -1
  107. package/msg/ig.js +1 -1
  108. package/msg/inh.js +1 -1
  109. package/msg/is.js +1 -1
  110. package/msg/it.js +1 -1
  111. package/msg/ja.js +1 -1
  112. package/msg/ka.js +1 -1
  113. package/msg/kab.js +1 -1
  114. package/msg/kbd-cyrl.js +1 -1
  115. package/msg/km.js +1 -1
  116. package/msg/kn.js +1 -1
  117. package/msg/ko.js +1 -1
  118. package/msg/ksh.js +1 -1
  119. package/msg/ku-latn.js +1 -1
  120. package/msg/ky.js +1 -1
  121. package/msg/la.js +1 -1
  122. package/msg/lb.js +1 -1
  123. package/msg/lki.js +1 -1
  124. package/msg/lo.js +1 -1
  125. package/msg/lrc.js +1 -1
  126. package/msg/lt.js +1 -1
  127. package/msg/lv.js +1 -1
  128. package/msg/mg.js +1 -1
  129. package/msg/mk.js +1 -1
  130. package/msg/ml.js +1 -1
  131. package/msg/mnw.js +1 -1
  132. package/msg/ms.js +1 -1
  133. package/msg/my.js +1 -1
  134. package/msg/mzn.js +1 -1
  135. package/msg/nb.js +1 -1
  136. package/msg/ne.js +1 -1
  137. package/msg/nl.js +1 -1
  138. package/msg/oc.js +1 -1
  139. package/msg/olo.js +1 -1
  140. package/msg/pa.js +1 -1
  141. package/msg/pl.js +1 -1
  142. package/msg/pms.js +1 -1
  143. package/msg/ps.js +1 -1
  144. package/msg/pt-br.js +1 -1
  145. package/msg/pt.js +1 -1
  146. package/msg/ro.js +1 -1
  147. package/msg/ru.js +1 -1
  148. package/msg/sc.js +1 -1
  149. package/msg/sco.js +1 -1
  150. package/msg/sd.js +1 -1
  151. package/msg/shn.js +1 -1
  152. package/msg/si.js +1 -1
  153. package/msg/sk.js +1 -1
  154. package/msg/skr-arab.js +1 -1
  155. package/msg/sl.js +1 -1
  156. package/msg/smn.js +1 -1
  157. package/msg/sq.js +1 -1
  158. package/msg/sr-latn.js +1 -1
  159. package/msg/sr.js +1 -1
  160. package/msg/sv.js +1 -1
  161. package/msg/sw.js +1 -1
  162. package/msg/ta.js +1 -1
  163. package/msg/tcy.js +1 -1
  164. package/msg/tdd.js +1 -1
  165. package/msg/te.js +1 -1
  166. package/msg/th.js +1 -1
  167. package/msg/ti.js +1 -1
  168. package/msg/tl.js +1 -1
  169. package/msg/tlh.js +1 -1
  170. package/msg/tr.js +1 -1
  171. package/msg/ug-arab.js +1 -1
  172. package/msg/uk.js +1 -1
  173. package/msg/ur.js +1 -1
  174. package/msg/uz.js +1 -1
  175. package/msg/vi.js +1 -1
  176. package/msg/xmf.js +1 -1
  177. package/msg/yo.js +1 -1
  178. package/msg/yue.js +1 -1
  179. package/msg/zgh.js +1 -1
  180. package/msg/zh-hans.js +1 -1
  181. package/msg/zh-hant.js +1 -1
  182. package/node.js +1 -1
  183. package/package.json +13 -8
  184. package/php.js +1 -1
  185. package/php_compressed.js +2 -3
  186. package/php_compressed.js.map +1 -1
  187. package/python.js +1 -1
  188. package/python_compressed.js +2 -2
  189. package/python_compressed.js.map +1 -1
package/lua.js CHANGED
@@ -19,4 +19,4 @@
19
19
  */
20
20
 
21
21
  return BlocklyLua;
22
- }));
22
+ }));
package/lua_compressed.js CHANGED
@@ -13,12 +13,11 @@
13
13
  }
14
14
  }(this, function(__parent__) {
15
15
  var $=__parent__.__namespace__;
16
- var module$exports$Blockly$Lua={},module$contents$Blockly$Lua_objectUtils=$.module$build$src$core$utils$object,module$contents$Blockly$Lua_stringUtils=$.module$build$src$core$utils$string,module$contents$Blockly$Lua_Generator=$.Generator$$module$build$src$core$generator,module$contents$Blockly$Lua_inputTypes=$.module$build$src$core$input_types.inputTypes,module$contents$Blockly$Lua_Names=$.module$build$src$core$names.Names;module$exports$Blockly$Lua.luaGenerator=new $.Generator$$module$build$src$core$generator("Lua");
17
- module$exports$Blockly$Lua.luaGenerator.addReservedWords("_,__inext,assert,bit,colors,colours,coroutine,disk,dofile,error,fs,fetfenv,getmetatable,gps,help,io,ipairs,keys,loadfile,loadstring,math,native,next,os,paintutils,pairs,parallel,pcall,peripheral,print,printError,rawequal,rawget,rawset,read,rednet,redstone,rs,select,setfenv,setmetatable,sleep,string,table,term,textutils,tonumber,tostring,turtle,type,unpack,vector,write,xpcall,_VERSION,__indext,HTTP,and,break,do,else,elseif,end,false,for,function,if,in,local,nil,not,or,repeat,return,then,true,until,while,add,sub,mul,div,mod,pow,unm,concat,len,eq,lt,le,index,newindex,call,assert,collectgarbage,dofile,error,_G,getmetatable,inpairs,load,loadfile,next,pairs,pcall,print,rawequal,rawget,rawlen,rawset,select,setmetatable,tonumber,tostring,type,_VERSION,xpcall,require,package,string,table,math,bit32,io,file,os,debug");
16
+ var module$exports$Blockly$Lua={},module$contents$Blockly$Lua_stringUtils=$.module$build$src$core$utils$string,module$contents$Blockly$Lua_CodeGenerator=$.CodeGenerator$$module$build$src$core$generator,module$contents$Blockly$Lua_inputTypes=$.module$build$src$core$input_types.inputTypes,module$contents$Blockly$Lua_Names=$.module$build$src$core$names.Names;module$exports$Blockly$Lua.luaGenerator=new $.CodeGenerator$$module$build$src$core$generator("Lua");module$exports$Blockly$Lua.luaGenerator.addReservedWords("_,__inext,assert,bit,colors,colours,coroutine,disk,dofile,error,fs,fetfenv,getmetatable,gps,help,io,ipairs,keys,loadfile,loadstring,math,native,next,os,paintutils,pairs,parallel,pcall,peripheral,print,printError,rawequal,rawget,rawset,read,rednet,redstone,rs,select,setfenv,setmetatable,sleep,string,table,term,textutils,tonumber,tostring,turtle,type,unpack,vector,write,xpcall,_VERSION,__indext,HTTP,and,break,do,else,elseif,end,false,for,function,if,in,local,nil,not,or,repeat,return,then,true,until,while,add,sub,mul,div,mod,pow,unm,concat,len,eq,lt,le,index,newindex,call,assert,collectgarbage,dofile,error,_G,getmetatable,inpairs,load,loadfile,next,pairs,pcall,print,rawequal,rawget,rawlen,rawset,select,setmetatable,tonumber,tostring,type,_VERSION,xpcall,require,package,string,table,math,bit32,io,file,os,debug");
18
17
  module$exports$Blockly$Lua.luaGenerator.ORDER_ATOMIC=0;module$exports$Blockly$Lua.luaGenerator.ORDER_HIGH=1;module$exports$Blockly$Lua.luaGenerator.ORDER_EXPONENTIATION=2;module$exports$Blockly$Lua.luaGenerator.ORDER_UNARY=3;module$exports$Blockly$Lua.luaGenerator.ORDER_MULTIPLICATIVE=4;module$exports$Blockly$Lua.luaGenerator.ORDER_ADDITIVE=5;module$exports$Blockly$Lua.luaGenerator.ORDER_CONCATENATION=6;module$exports$Blockly$Lua.luaGenerator.ORDER_RELATIONAL=7;
19
18
  module$exports$Blockly$Lua.luaGenerator.ORDER_AND=8;module$exports$Blockly$Lua.luaGenerator.ORDER_OR=9;module$exports$Blockly$Lua.luaGenerator.ORDER_NONE=99;module$exports$Blockly$Lua.luaGenerator.isInitialized=!1;
20
19
  module$exports$Blockly$Lua.luaGenerator.init=function(a){Object.getPrototypeOf(this).init.call(this);this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.module$build$src$core$names.Names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);this.isInitialized=!0};
21
- module$exports$Blockly$Lua.luaGenerator.finish=function(a){const b=$.module$build$src$core$utils$object.values(this.definitions_);a=Object.getPrototypeOf(this).finish.call(this,a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a};module$exports$Blockly$Lua.luaGenerator.scrubNakedValue=function(a){return"local _ = "+a+"\n"};module$exports$Blockly$Lua.luaGenerator.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};
20
+ module$exports$Blockly$Lua.luaGenerator.finish=function(a){const b=Object.values(this.definitions_);a=Object.getPrototypeOf(this).finish.call(this,a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a};module$exports$Blockly$Lua.luaGenerator.scrubNakedValue=function(a){return"local _ = "+a+"\n"};module$exports$Blockly$Lua.luaGenerator.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};
22
21
  module$exports$Blockly$Lua.luaGenerator.multiline_quote_=function(a){return a.split(/\n/g).map(this.quote_).join(" .. '\\n' ..\n")};
23
22
  module$exports$Blockly$Lua.luaGenerator.scrub_=function(a,b,c){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.module$build$src$core$utils$string.wrap(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e,"-- ")+"\n");for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===$.module$build$src$core$input_types.inputTypes.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&(d+=this.prefixLines(e,"-- "))}a=a.nextConnection&&
24
23
  a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c};var module$exports$Blockly$Lua$variables={},module$contents$Blockly$Lua$variables_NameType=$.NameType$$module$build$src$core$names;module$exports$Blockly$Lua.luaGenerator.variables_get=function(a){return[module$exports$Blockly$Lua.luaGenerator.nameDB_.getName(a.getFieldValue("VAR"),$.NameType$$module$build$src$core$names.VARIABLE),module$exports$Blockly$Lua.luaGenerator.ORDER_ATOMIC]};