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.
- package/README.md +2 -2
- package/blockly.js +1 -1
- package/blockly.min.js +397 -374
- package/blockly_compressed.js +376 -368
- package/blockly_compressed.js.map +1 -1
- package/blocks.js +1 -1
- package/blocks_compressed.js +1 -1
- package/blocks_compressed.js.map +1 -1
- package/browser.js +1 -1
- package/core/block_drag_surface.d.ts +15 -8
- package/core/block_svg.d.ts +10 -4
- package/core/blockly.d.ts +8 -20
- package/core/bubble.d.ts +32 -32
- package/core/comment.d.ts +15 -19
- package/core/field.d.ts +10 -1
- package/core/field_angle.d.ts +15 -2
- package/core/field_dropdown.d.ts +19 -24
- package/core/field_variable.d.ts +3 -3
- package/core/generator.d.ts +4 -4
- package/core/interfaces/i_ast_node_location_with_block.d.ts +1 -1
- package/core/interfaces/i_parameter_model.d.ts +39 -0
- package/core/interfaces/i_procedure_block.d.ts +13 -0
- package/core/interfaces/i_procedure_map.d.ts +16 -0
- package/core/interfaces/i_procedure_model.d.ts +57 -0
- package/core/menu.d.ts +19 -19
- package/core/menuitem.d.ts +8 -8
- package/core/mutator.d.ts +13 -13
- package/core/procedures/observable_parameter_model.d.ts +45 -0
- package/core/procedures/observable_procedure_map.d.ts +35 -0
- package/core/procedures/observable_procedure_model.d.ts +62 -0
- package/core/procedures/update_procedures.d.ts +13 -0
- package/core/procedures.d.ts +5 -1
- package/core/rendered_connection.d.ts +1 -1
- package/core/renderers/common/constants.d.ts +1 -6
- package/core/scrollbar.d.ts +68 -39
- package/core/serialization/blocks.d.ts +38 -0
- package/core/serialization/priorities.d.ts +4 -0
- package/core/serialization/procedures.d.ts +78 -0
- package/core/serialization/variables.d.ts +33 -0
- package/core/serialization.d.ts +15 -0
- package/core/theme.d.ts +5 -5
- package/core/touch.d.ts +3 -3
- package/core/warning.d.ts +4 -4
- package/core/workspace.d.ts +9 -5
- package/core/workspace_svg.d.ts +26 -26
- package/core/zoom_controls.d.ts +18 -18
- package/core-browser.js +1 -1
- package/core.js +1 -1
- package/dart.js +1 -1
- package/dart_compressed.js +2 -2
- package/dart_compressed.js.map +1 -1
- package/index.js +1 -1
- package/javascript.js +1 -1
- package/javascript_compressed.js +4 -5
- package/javascript_compressed.js.map +1 -1
- package/lua.js +1 -1
- package/lua_compressed.js +2 -3
- package/lua_compressed.js.map +1 -1
- package/msg/ab.js +1 -1
- package/msg/ace.js +1 -1
- package/msg/af.js +1 -1
- package/msg/am.js +1 -1
- package/msg/ar.js +1 -1
- package/msg/ast.js +1 -1
- package/msg/az.js +1 -1
- package/msg/ba.js +1 -1
- package/msg/bcc.js +1 -1
- package/msg/be-tarask.js +1 -1
- package/msg/be.js +1 -1
- package/msg/bg.js +1 -1
- package/msg/bn.js +1 -1
- package/msg/br.js +1 -1
- package/msg/bs.js +1 -1
- package/msg/ca.js +1 -1
- package/msg/cdo.js +1 -1
- package/msg/cs.js +1 -1
- package/msg/da.js +1 -1
- package/msg/de.js +1 -1
- package/msg/diq.js +1 -1
- package/msg/dty.js +1 -1
- package/msg/ee.js +1 -1
- package/msg/el.js +1 -1
- package/msg/en-gb.js +1 -1
- package/msg/en.js +1 -1
- package/msg/eo.js +1 -1
- package/msg/es.js +1 -1
- package/msg/et.js +1 -1
- package/msg/eu.js +1 -1
- package/msg/fa.js +1 -1
- package/msg/fi.js +1 -1
- package/msg/fo.js +1 -1
- package/msg/fr.js +1 -1
- package/msg/frr.js +1 -1
- package/msg/gl.js +1 -1
- package/msg/gn.js +1 -1
- package/msg/gor.js +1 -1
- package/msg/ha.js +1 -1
- package/msg/hak.js +1 -1
- package/msg/he.js +1 -1
- package/msg/hi.js +1 -1
- package/msg/hr.js +1 -1
- package/msg/hrx.js +1 -1
- package/msg/hu.js +1 -1
- package/msg/hy.js +1 -1
- package/msg/ia.js +1 -1
- package/msg/id.js +1 -1
- package/msg/ig.js +1 -1
- package/msg/inh.js +1 -1
- package/msg/is.js +1 -1
- package/msg/it.js +1 -1
- package/msg/ja.js +1 -1
- package/msg/ka.js +1 -1
- package/msg/kab.js +1 -1
- package/msg/kbd-cyrl.js +1 -1
- package/msg/km.js +1 -1
- package/msg/kn.js +1 -1
- package/msg/ko.js +1 -1
- package/msg/ksh.js +1 -1
- package/msg/ku-latn.js +1 -1
- package/msg/ky.js +1 -1
- package/msg/la.js +1 -1
- package/msg/lb.js +1 -1
- package/msg/lki.js +1 -1
- package/msg/lo.js +1 -1
- package/msg/lrc.js +1 -1
- package/msg/lt.js +1 -1
- package/msg/lv.js +1 -1
- package/msg/mg.js +1 -1
- package/msg/mk.js +1 -1
- package/msg/ml.js +1 -1
- package/msg/mnw.js +1 -1
- package/msg/ms.js +1 -1
- package/msg/my.js +1 -1
- package/msg/mzn.js +1 -1
- package/msg/nb.js +1 -1
- package/msg/ne.js +1 -1
- package/msg/nl.js +1 -1
- package/msg/oc.js +1 -1
- package/msg/olo.js +1 -1
- package/msg/pa.js +1 -1
- package/msg/pl.js +1 -1
- package/msg/pms.js +1 -1
- package/msg/ps.js +1 -1
- package/msg/pt-br.js +1 -1
- package/msg/pt.js +1 -1
- package/msg/ro.js +1 -1
- package/msg/ru.js +1 -1
- package/msg/sc.js +1 -1
- package/msg/sco.js +1 -1
- package/msg/sd.js +1 -1
- package/msg/shn.js +1 -1
- package/msg/si.js +1 -1
- package/msg/sk.js +1 -1
- package/msg/skr-arab.js +1 -1
- package/msg/sl.js +1 -1
- package/msg/smn.js +1 -1
- package/msg/sq.js +1 -1
- package/msg/sr-latn.js +1 -1
- package/msg/sr.js +1 -1
- package/msg/sv.js +1 -1
- package/msg/sw.js +1 -1
- package/msg/ta.js +1 -1
- package/msg/tcy.js +1 -1
- package/msg/tdd.js +1 -1
- package/msg/te.js +1 -1
- package/msg/th.js +1 -1
- package/msg/ti.js +1 -1
- package/msg/tl.js +1 -1
- package/msg/tlh.js +1 -1
- package/msg/tr.js +1 -1
- package/msg/ug-arab.js +1 -1
- package/msg/uk.js +1 -1
- package/msg/ur.js +1 -1
- package/msg/uz.js +1 -1
- package/msg/vi.js +1 -1
- package/msg/xmf.js +1 -1
- package/msg/yo.js +1 -1
- package/msg/yue.js +1 -1
- package/msg/zgh.js +1 -1
- package/msg/zh-hans.js +1 -1
- package/msg/zh-hant.js +1 -1
- package/node.js +1 -1
- package/package.json +13 -8
- package/php.js +1 -1
- package/php_compressed.js +2 -3
- package/php_compressed.js.map +1 -1
- package/python.js +1 -1
- package/python_compressed.js +2 -2
- package/python_compressed.js.map +1 -1
package/lua.js
CHANGED
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$
|
|
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
|
|
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]};
|