index.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. <!-- TODO(quachtina96): move the CSS out to a separate file -->
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="target-densitydpi=device-dpi, height=660, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  7. <title>Blockly Demo: Blockly Developer Tools</title>
  8. <script src="../../blockly_compressed.js"></script>
  9. <script src="../../javascript_compressed.js"></script>
  10. <script src="../../msg/js/en.js"></script>
  11. <script src="../../blocks_compressed.js"></script>
  12. <script src="../../../closure-library/closure/goog/base.js"></script>
  13. <script src="factory_utils.js"></script>
  14. <script src="workspacefactory/wfactory_model.js"></script>
  15. <script src="standard_categories.js"></script>
  16. <script src="workspacefactory/wfactory_controller.js"></script>
  17. <script src="workspacefactory/wfactory_view.js"></script>
  18. <script src="workspacefactory/wfactory_generator.js"></script>
  19. <script src="workspacefactory/wfactory_init.js"></script>
  20. <script src="block_option.js"></script>
  21. <script src="factory.js"></script>
  22. <script src="block_library_view.js"></script>
  23. <script src="block_library_storage.js"></script>
  24. <script src="block_library_controller.js"></script>
  25. <script src="block_exporter_tools.js"></script>
  26. <script src="block_exporter_view.js"></script>
  27. <script src="block_exporter_controller.js"></script>
  28. <script src="blocks.js"></script>
  29. <script src="app_controller.js"></script>
  30. <script src="/storage.js"></script>
  31. <link rel="stylesheet" href="factory.css">
  32. <link rel="stylesheet" href="../prettify.css">
  33. <script src="../prettify.js"></script>
  34. <script>
  35. var blocklyFactory;
  36. var init = function() {
  37. blocklyFactory = new AppController();
  38. blocklyFactory.init();
  39. };
  40. window.addEventListener('load', init);
  41. </script>
  42. </head>
  43. <body onbeforeunload="return blocklyFactory.confirmLeavePage()">
  44. <h1><a href="https://developers.google.com/blockly/">Blockly</a> &gt;
  45. <a href="../index.html">Demos</a> &gt; Blockly Developer Tools
  46. <button id="helpButton" title="View documentation in new window.">
  47. <span>Help</span>
  48. </button>
  49. </h1>
  50. <div id="tabContainer">
  51. <div id="blockFactory_tab" class="tab tabon">Block Factory</div>
  52. <div id="blocklibraryExporter_tab" class="tab taboff">Block Exporter</div>
  53. <div id="workspaceFactory_tab" class="tab taboff">Workspace Factory</div>
  54. </div>
  55. <!-- Exporter tab -->
  56. <div id="blockLibraryExporter">
  57. <br>
  58. <p>
  59. First, select blocks from your block library by clicking on them. Then, use the Export Settings form to download starter code for selected blocks.
  60. </p>
  61. <div id="exportSelector">
  62. <br>
  63. <h3>Block Selector</h3>
  64. <div class="dropdown">
  65. <button id="button_setBlocks">Select</button>
  66. <div id="dropdownDiv_setBlocks" class="dropdown-content">
  67. <a id="dropdown_addAllFromLib" title="Select all block library blocks.">All Stored in Block Library</a>
  68. <a id="dropdown_addAllUsed" title="Select all block library blocks used in workspace factory.">All Used in Workspace Factory</a>
  69. </div>
  70. <button id="clearSelectedButton" title="Clear selected blocks.">Clear Selected</a>
  71. </div>
  72. <div id="blockSelector"></div>
  73. </div>
  74. <!-- Users may customize export settings through this form -->
  75. <div id="exportSettings">
  76. <br>
  77. <h3> Export Settings </h3>
  78. <form id="exportSettingsForm">
  79. <div id="selectedBlocksTextContainer">
  80. <p>Currently Selected:</p>
  81. <p id="selectedBlocksText"></p>
  82. </div>
  83. <label><input type="checkbox" id="blockDefCheck">Block Definition(s)</label><br>
  84. <div id="blockDefSettings" class="subsettings">
  85. <label>Format:
  86. <select id="exportFormat">
  87. <option value="JSON">JSON</option>
  88. <option value="JavaScript">JavaScript</option>
  89. </select></label>
  90. <br>
  91. <label>File Name:<br>
  92. <input type="text" id="blockDef_filename"></label>
  93. </div>
  94. <br>
  95. <label><input type="checkbox" id="genStubCheck">Generator Stub(s)</label><br>
  96. <div id="genStubSettings" class="subsettings">
  97. <label>Language:
  98. <select id="exportLanguage">
  99. <option value="JavaScript">JavaScript</option>
  100. <option value="Python">Python</option>
  101. <option value="PHP">PHP</option>
  102. <option value="Lua">Lua</option>
  103. <option value="Dart">Dart</option>
  104. </select></label>
  105. <br>
  106. <label>File Name:<br>
  107. <input type="text" id="generatorStub_filename"></label><br>
  108. </div>
  109. <br>
  110. </form>
  111. <button id="exporterSubmitButton" title="Download block starter code as specified in export settings.">Export</button>
  112. </div>
  113. <div id="exportPreview">
  114. <br>
  115. <h3>Export Preview</h3>
  116. <div id="blockDefs" class="exportPreviewTextArea">
  117. <p id="blockDefs_label">Block Definitions:</p>
  118. <pre id="blockDefs_textArea"></pre>
  119. </div>
  120. <div id="genStubs" class="exportPreviewTextArea">
  121. <p id="genStubs_label">Generator Stubs:</p>
  122. <pre id="genStubs_textArea"></pre>
  123. </div>
  124. </div>
  125. </div>
  126. <!-- Workspace Factory tab -->
  127. <div id="workspaceFactoryContent">
  128. <div id="factoryHeader">
  129. <p>
  130. <div class="dropdown">
  131. <button id="button_importBlocks">Import Custom Blocks</button>
  132. <div id="dropdownDiv_importBlocks" class="dropdown-content">
  133. <input type="file" id="input_importBlocksJson" accept=".js, .json, .txt" class="inputfile"</input>
  134. <label for="input_importBlocksJson">From JSON</label>
  135. <input type="file" id="input_importBlocksJs" accept=".js, .txt" class="inputfile"</input>
  136. <label for="input_importBlocksJs">From Javascript</label>
  137. </div>
  138. </div>
  139. <div class="dropdown">
  140. <button id="button_load">Load to Edit</button>
  141. <div id="dropdownDiv_load" class="dropdown-content">
  142. <input type="file" id="input_loadToolbox" accept=".xml" class="inputfile"></input>
  143. <label for="input_loadToolbox">Toolbox</label>
  144. <input type="file" id="input_loadPreload" accept=".xml" class="inputfile"</input>
  145. <label for="input_loadPreload">Workspace Blocks</label>
  146. </div>
  147. </div>
  148. <div class="dropdown">
  149. <button id="button_export">Export</button>
  150. <div id="dropdownDiv_export" class="dropdown-content">
  151. <a id="dropdown_exportOptions">Starter Code</a>
  152. <a id="dropdown_exportToolbox">Toolbox</a>
  153. <a id="dropdown_exportPreload">Workspace Blocks</a>
  154. <a id="dropdown_exportAll">All</a>
  155. </div>
  156. </div>
  157. <button id="button_clear">Clear</button>
  158. </p>
  159. </div>
  160. <section id="createDiv">
  161. <div id="createHeader">
  162. <h3>Edit</h3>
  163. <p id="editHelpText">Drag blocks into the workspace to configure the toolbox in your custom workspace.</p>
  164. </div>
  165. <table id="workspaceTabs" style="width:auto; height:auto">
  166. <tr>
  167. <td id="tab_toolbox" class="tabon">Toolbox</td>
  168. <td id="tab_preload" class="taboff">Workspace</td>
  169. </tr>
  170. </table>
  171. <section id="toolbox_section">
  172. <div id="toolbox_blocks"></div>
  173. </section>
  174. <aside id="toolbox_div">
  175. <p id="categoryHeader">You currently have no categories.</p>
  176. <table id="categoryTable" style="width:auto; height:auto">
  177. </table>
  178. <p>&nbsp;</p>
  179. <div class="dropdown">
  180. <button id="button_add" class="large">+</button>
  181. <div id="dropdownDiv_add" class="dropdown-content">
  182. <a id="dropdown_newCategory">New Category</a>
  183. <a id="dropdown_loadCategory">Standard Category</a>
  184. <a id="dropdown_separator">Separator</a>
  185. <a id="dropdown_loadStandardToolbox">Standard Toolbox</a>
  186. </div>
  187. </div>
  188. <button id="button_remove" class="large">-</button>
  189. <button id="button_up" class="large">&#8593;</button>
  190. <button id="button_down" class="large">&#8595;</button>
  191. <br>
  192. <div class="dropdown">
  193. <button id="button_editCategory">Edit Category</button>
  194. <div id="dropdownDiv_editCategory" class="dropdown-content">
  195. <a id='dropdown_name'>Name</a>
  196. <a id='dropdown_color'>Colour</a>
  197. </div>
  198. </div>
  199. </aside>
  200. <button id="button_addShadow" style="display: none">Make Shadow</button>
  201. <button id="button_removeShadow" style="display: none">Remove Shadow</button>
  202. <aside id="preload_div" style="display:none">
  203. <div id="preloadHelp">
  204. <p>Configure the options for your Blockly inject call.</p>
  205. <button id="button_optionsHelp">Help</button>
  206. <button class="small" id="button_standardOptions">Reset to Default</button>
  207. </div>
  208. <div id="workspace_options">
  209. <label><input type="checkbox" id="option_readOnly_checkbox">Read Only</label><br>
  210. <label><input type="checkbox" id="option_grid_checkbox">Use Grid</label><br>
  211. <div id="grid_options" style="display: none">
  212. <label>Spacing <input type="number" id="gridOption_spacing_number" style="width: 3em"></label><br>
  213. <label>Length <input type="number" id="gridOption_length_number" style="width: 3em"></label><br>
  214. <label>Colour <input type="text" id="gridOption_colour_text" style="width: 8em"></label><br>
  215. <div id="readonly1">
  216. <label><input type="checkbox" id="gridOption_snap_checkbox">Snap</label><br>
  217. </div>
  218. </div>
  219. <label>Path to Blockly Media <input type="text" id="option_media_text" style="width: 90%"></label><br>
  220. <label><input type="checkbox" id="option_rtl_checkbox">Layout with RTL</label><br>
  221. <label><input type="checkbox" id="option_scrollbars_checkbox">Scrollbars</label><br>
  222. <label><input type="checkbox" id="option_zoom_checkbox">Zoom</label><br>
  223. <div id="zoom_options" style="display: none">
  224. <label><input type="checkbox" id="zoomOption_controls_checkbox">Zoom Controls</label><br>
  225. <label><input type="checkbox" id="zoomOption_wheel_checkbox">Zoom Wheel</label><br>
  226. <label>Start Scale <input type="number" id="zoomOption_startScale_number" style="width: 4em"></label><br>
  227. <label>Max Scale <input type="number" id="zoomOption_maxScale_number" style="width: 4em"></label><br>
  228. <label>Min Scale <input type="number" id="zoomOption_minScale_number" style="width: 4em"></label><br>
  229. <label>Scale Speed <input type="number" id="zoomOption_scaleSpeed_number" style="width: 4em"></label><br>
  230. </div>
  231. <label><input type="checkbox" id="option_css_checkbox">Use Blockly CSS</label><br>
  232. <div id="readonly2">
  233. <label><input type="checkbox" id="option_collapse_checkbox">Collapsible Blocks</label><br>
  234. <label><input type="checkbox" id="option_comments_checkbox">Comments for Blocks</label><br>
  235. <label><input type="checkbox" id="option_disable_checkbox">Disabled Blocks</label><br>
  236. <label><input type="checkbox" id="option_infiniteBlocks_checkbox">Infinite Blocks</label><br>
  237. <div id="maxBlockNumber_option" style="display: none">
  238. <label>Max Blocks <input type="number" id="option_maxBlocks_number" style="width: 5em"></label><br>
  239. </div>
  240. <label><input type="checkbox" id="option_horizontalLayout_checkbox">Horizontal Toolbox</label><br>
  241. <label><input type="checkbox" id="option_toolboxPosition_checkbox">Toolbox End</label><br>
  242. <label><input type="checkbox" id="option_oneBasedIndex_checkbox">One-based index</label><br>
  243. <label><input type="checkbox" id="option_sounds_checkbox">Sounds<br>
  244. <label><input type="checkbox" id="option_trashcan_checkbox">Trashcan</label><br>
  245. </div>
  246. </div>
  247. </aside>
  248. </section>
  249. <aside id="previewDiv">
  250. <div id="previewBorder">
  251. <div id="previewHelp">
  252. <h3>Preview</h3>
  253. <p>This is what your custom workspace will look like.</p>
  254. </div>
  255. <div id="preview_blocks" class="content"></div>
  256. </div>
  257. </aside>
  258. </div>
  259. <!-- Blockly Factory Tab -->
  260. <table id="blockFactoryContent">
  261. <tr width="100%" height="10%">
  262. <td width="50%" height="5%">
  263. <table>
  264. <tr id="blockLibrary">
  265. <td id="blockLibraryContainer">
  266. <span>
  267. <div class="dropdown">
  268. <button id="button_blockLib">Block Library</button>
  269. <div id="dropdownDiv_blockLib" class="dropdown-content">
  270. <a id="createNewBlockButton">Create New Block</a>
  271. </div>
  272. </div>
  273. <select id="blockLibraryDropdown" style="display:none">
  274. </select>
  275. </span>
  276. </td>
  277. <td id="blockLibraryControls">
  278. <button id="saveToBlockLibraryButton" title="Save block to Block Library.">
  279. Save "block_type"
  280. </button>
  281. <button id="removeBlockFromLibraryButton" title="Remove block from Block Library.">
  282. Delete "block_type"
  283. </button>
  284. </td>
  285. </tr>
  286. </table>
  287. </td>
  288. <td height="5%">
  289. <table id="blockFactoryPreview">
  290. <tr>
  291. <td id="previewContainer">
  292. <h3>Preview:
  293. <select id="direction">
  294. <option value="ltr">LTR</option>
  295. <option value="rtl">RTL</option>
  296. </select>
  297. </h3>
  298. </td>
  299. <td id="buttonContainer">
  300. <button id="linkButton" title="Save and link to blocks.">
  301. <img src="link.png" height="21" width="21">
  302. </button>
  303. <button id="clearBlockLibraryButton" title="Clear Block Library.">
  304. <span>Clear Library</span>
  305. </button>
  306. <label for="files" class="buttonStyle">
  307. <span class=>Import Block Library</span>
  308. </label>
  309. <input id="files" type="file" name="files"
  310. accept="application/xml">
  311. <button id="localSaveButton" title="Save block library XML to a local file.">
  312. <span>Download Block Library</span>
  313. </button>
  314. </td>
  315. </tr>
  316. </table>
  317. </td>
  318. </tr>
  319. <tr height="80%">
  320. <td id="blocklyWorkspaceContainer">
  321. <div id="blockly"></div>
  322. <div id="blocklyMask"></div>
  323. </td>
  324. <td width="50%">
  325. <table id="blocklyPreviewContainer">
  326. <tr>
  327. <td height="30%">
  328. <div id="preview"></div>
  329. </td>
  330. </tr>
  331. <tr>
  332. <td height="5%">
  333. <h3>Block Definition:
  334. <select id="format">
  335. <option value="JSON">JSON</option>
  336. <option value="JavaScript">JavaScript</option>
  337. <option value="Manual">Manual edit&hellip;</option>
  338. </select>
  339. </h3>
  340. </td>
  341. </tr>
  342. <tr>
  343. <td height="30%">
  344. <pre id="languagePre"></pre>
  345. <textarea id="languageTA"></textarea>
  346. </td>
  347. </tr>
  348. <tr>
  349. <td height="5%">
  350. <h3>Generator stub:
  351. <select id="language">
  352. <option value="JavaScript">JavaScript</option>
  353. <option value="Python">Python</option>
  354. <option value="PHP">PHP</option>
  355. <option value="Lua">Lua</option>
  356. <option value="Dart">Dart</option>
  357. </select>
  358. </h3>
  359. </td>
  360. </tr>
  361. <tr>
  362. <td height="30%">
  363. <pre id="generatorPre"></pre>
  364. </td>
  365. </tr>
  366. </table>
  367. </td>
  368. </tr>
  369. </table>
  370. <div id="modalShadow"></div>
  371. <xml id="blockfactory_toolbox" class="toolbox">
  372. <category name="Input">
  373. <block type="input_value">
  374. <value name="TYPE">
  375. <shadow type="type_null"></shadow>
  376. </value>
  377. </block>
  378. <block type="input_statement">
  379. <value name="TYPE">
  380. <shadow type="type_null"></shadow>
  381. </value>
  382. </block>
  383. <block type="input_dummy"></block>
  384. </category>
  385. <category name="Field">
  386. <block type="field_static"></block>
  387. <block type="field_input"></block>
  388. <block type="field_number"></block>
  389. <block type="field_angle"></block>
  390. <block type="field_dropdown"></block>
  391. <block type="field_checkbox"></block>
  392. <block type="field_colour"></block>
  393. <!--
  394. Date picker commented out since it increases footprint by 60%.
  395. Add it only if you need it. See also goog.require in blockly.js.
  396. <block type="field_date"></block>
  397. -->
  398. <block type="field_variable"></block>
  399. <block type="field_image"></block>
  400. </category>
  401. <category name="Type">
  402. <block type="type_group"></block>
  403. <block type="type_null"></block>
  404. <block type="type_boolean"></block>
  405. <block type="type_number"></block>
  406. <block type="type_string"></block>
  407. <block type="type_list"></block>
  408. <block type="type_other"></block>
  409. </category>
  410. <category name="Colour" id="colourCategory">
  411. <block type="colour_hue"><mutation colour="20"></mutation><field name="HUE">20</field></block>
  412. <block type="colour_hue"><mutation colour="65"></mutation><field name="HUE">65</field></block>
  413. <block type="colour_hue"><mutation colour="120"></mutation><field name="HUE">120</field></block>
  414. <block type="colour_hue"><mutation colour="160"></mutation><field name="HUE">160</field></block>
  415. <block type="colour_hue"><mutation colour="210"></mutation><field name="HUE">210</field></block>
  416. <block type="colour_hue"><mutation colour="230"></mutation><field name="HUE">230</field></block>
  417. <block type="colour_hue"><mutation colour="260"></mutation><field name="HUE">260</field></block>
  418. <block type="colour_hue"><mutation colour="290"></mutation><field name="HUE">290</field></block>
  419. <block type="colour_hue"><mutation colour="330"></mutation><field name="HUE">330</field></block>
  420. </category>
  421. </xml>
  422. <xml id="workspacefactory_toolbox" class="toolbox">
  423. <category name="Logic" colour="210">
  424. <block type="controls_if"></block>
  425. <block type="logic_compare"></block>
  426. <block type="logic_operation"></block>
  427. <block type="logic_negate"></block>
  428. <block type="logic_boolean"></block>
  429. <block type="logic_null"></block>
  430. <block type="logic_ternary"></block>
  431. </category>
  432. <category name="Loops" colour="120">
  433. <block type="controls_repeat_ext">
  434. <value name="TIMES">
  435. <shadow type="math_number">
  436. <field name="NUM">10</field>
  437. </shadow>
  438. </value>
  439. </block>
  440. <block type="controls_whileUntil"></block>
  441. <block type="controls_for">
  442. <value name="FROM">
  443. <shadow type="math_number">
  444. <field name="NUM">1</field>
  445. </shadow>
  446. </value>
  447. <value name="TO">
  448. <shadow type="math_number">
  449. <field name="NUM">10</field>
  450. </shadow>
  451. </value>
  452. <value name="BY">
  453. <shadow type="math_number">
  454. <field name="NUM">1</field>
  455. </shadow>
  456. </value>
  457. </block>
  458. <block type="controls_forEach"></block>
  459. <block type="controls_flow_statements"></block>
  460. </category>
  461. <category name="Math" colour="230">
  462. <block type="math_number"></block>
  463. <block type="math_arithmetic">
  464. <value name="A">
  465. <shadow type="math_number">
  466. <field name="NUM">1</field>
  467. </shadow>
  468. </value>
  469. <value name="B">
  470. <shadow type="math_number">
  471. <field name="NUM">1</field>
  472. </shadow>
  473. </value>
  474. </block>
  475. <block type="math_single">
  476. <value name="NUM">
  477. <shadow type="math_number">
  478. <field name="NUM">9</field>
  479. </shadow>
  480. </value>
  481. </block>
  482. <block type="math_trig">
  483. <value name="NUM">
  484. <shadow type="math_number">
  485. <field name="NUM">45</field>
  486. </shadow>
  487. </value>
  488. </block>
  489. <block type="math_constant"></block>
  490. <block type="math_number_property">
  491. <value name="NUMBER_TO_CHECK">
  492. <shadow type="math_number">
  493. <field name="NUM">0</field>
  494. </shadow>
  495. </value>
  496. </block>
  497. <block type="math_round">
  498. <value name="NUM">
  499. <shadow type="math_number">
  500. <field name="NUM">3.1</field>
  501. </shadow>
  502. </value>
  503. </block>
  504. <block type="math_on_list"></block>
  505. <block type="math_modulo">
  506. <value name="DIVIDEND">
  507. <shadow type="math_number">
  508. <field name="NUM">64</field>
  509. </shadow>
  510. </value>
  511. <value name="DIVISOR">
  512. <shadow type="math_number">
  513. <field name="NUM">10</field>
  514. </shadow>
  515. </value>
  516. </block>
  517. <block type="math_constrain">
  518. <value name="VALUE">
  519. <shadow type="math_number">
  520. <field name="NUM">50</field>
  521. </shadow>
  522. </value>
  523. <value name="LOW">
  524. <shadow type="math_number">
  525. <field name="NUM">1</field>
  526. </shadow>
  527. </value>
  528. <value name="HIGH">
  529. <shadow type="math_number">
  530. <field name="NUM">100</field>
  531. </shadow>
  532. </value>
  533. </block>
  534. <block type="math_random_int">
  535. <value name="FROM">
  536. <shadow type="math_number">
  537. <field name="NUM">1</field>
  538. </shadow>
  539. </value>
  540. <value name="TO">
  541. <shadow type="math_number">
  542. <field name="NUM">100</field>
  543. </shadow>
  544. </value>
  545. </block>
  546. <block type="math_random_float"></block>
  547. </category>
  548. <category name="Text" colour="160">
  549. <block type="text"></block>
  550. <block type="text_join"></block>
  551. <block type="text_append">
  552. <value name="TEXT">
  553. <shadow type="text"></shadow>
  554. </value>
  555. </block>
  556. <block type="text_length">
  557. <value name="VALUE">
  558. <shadow type="text">
  559. <field name="TEXT">abc</field>
  560. </shadow>
  561. </value>
  562. </block>
  563. <block type="text_isEmpty">
  564. <value name="VALUE">
  565. <shadow type="text">
  566. <field name="TEXT"></field>
  567. </shadow>
  568. </value>
  569. </block>
  570. <block type="text_indexOf">
  571. <value name="VALUE">
  572. <block type="variables_get">
  573. <field name="VAR">text</field>
  574. </block>
  575. </value>
  576. <value name="FIND">
  577. <shadow type="text">
  578. <field name="TEXT">abc</field>
  579. </shadow>
  580. </value>
  581. </block>
  582. <block type="text_charAt">
  583. <value name="VALUE">
  584. <block type="variables_get">
  585. <field name="VAR">text</field>
  586. </block>
  587. </value>
  588. </block>
  589. <block type="text_getSubstring">
  590. <value name="STRING">
  591. <block type="variables_get">
  592. <field name="VAR">text</field>
  593. </block>
  594. </value>
  595. </block>
  596. <block type="text_changeCase">
  597. <value name="TEXT">
  598. <shadow type="text">
  599. <field name="TEXT">abc</field>
  600. </shadow>
  601. </value>
  602. </block>
  603. <block type="text_trim">
  604. <value name="TEXT">
  605. <shadow type="text">
  606. <field name="TEXT">abc</field>
  607. </shadow>
  608. </value>
  609. </block>
  610. <block type="text_print">
  611. <value name="TEXT">
  612. <shadow type="text">
  613. <field name="TEXT">abc</field>
  614. </shadow>
  615. </value>
  616. </block>
  617. <block type="text_prompt_ext">
  618. <value name="TEXT">
  619. <shadow type="text">
  620. <field name="TEXT">abc</field>
  621. </shadow>
  622. </value>
  623. </block>
  624. </category>
  625. <category name="Lists" colour="260">
  626. <block type="lists_create_with">
  627. <mutation items="0"></mutation>
  628. </block>
  629. <block type="lists_create_with"></block>
  630. <block type="lists_repeat">
  631. <value name="NUM">
  632. <shadow type="math_number">
  633. <field name="NUM">5</field>
  634. </shadow>
  635. </value>
  636. </block>
  637. <block type="lists_length"></block>
  638. <block type="lists_isEmpty"></block>
  639. <block type="lists_indexOf">
  640. <value name="VALUE">
  641. <block type="variables_get">
  642. <field name="VAR">list</field>
  643. </block>
  644. </value>
  645. </block>
  646. <block type="lists_getIndex">
  647. <value name="VALUE">
  648. <block type="variables_get">
  649. <field name="VAR">list</field>
  650. </block>
  651. </value>
  652. </block>
  653. <block type="lists_setIndex">
  654. <value name="LIST">
  655. <block type="variables_get">
  656. <field name="VAR">list</field>
  657. </block>
  658. </value>
  659. </block>
  660. <block type="lists_getSublist">
  661. <value name="LIST">
  662. <block type="variables_get">
  663. <field name="VAR">list</field>
  664. </block>
  665. </value>
  666. </block>
  667. <block type="lists_split">
  668. <value name="DELIM">
  669. <shadow type="text">
  670. <field name="TEXT">,</field>
  671. </shadow>
  672. </value>
  673. </block>
  674. <block type="lists_sort"></block>
  675. </category>
  676. <category name="Colour" colour="20">
  677. <block type="colour_picker"></block>
  678. <block type="colour_random"></block>
  679. <block type="colour_rgb">
  680. <value name="RED">
  681. <shadow type="math_number">
  682. <field name="NUM">100</field>
  683. </shadow>
  684. </value>
  685. <value name="GREEN">
  686. <shadow type="math_number">
  687. <field name="NUM">50</field>
  688. </shadow>
  689. </value>
  690. <value name="BLUE">
  691. <shadow type="math_number">
  692. <field name="NUM">0</field>
  693. </shadow>
  694. </value>
  695. </block>
  696. <block type="colour_blend">
  697. <value name="COLOUR1">
  698. <shadow type="colour_picker">
  699. <field name="COLOUR">#ff0000</field>
  700. </shadow>
  701. </value>
  702. <value name="COLOUR2">
  703. <shadow type="colour_picker">
  704. <field name="COLOUR">#3333ff</field>
  705. </shadow>
  706. </value>
  707. <value name="RATIO">
  708. <shadow type="math_number">
  709. <field name="NUM">0.5</field>
  710. </shadow>
  711. </value>
  712. </block>
  713. </category>
  714. <sep></sep>
  715. <category name="Variables" colour="330" custom="VARIABLE"></category>
  716. <category name="Functions" colour="290" custom="PROCEDURE"></category>
  717. <sep></sep>
  718. <category name="Block Library" colour="260" id="blockLibCategory"></category>
  719. </xml>
  720. </body>
  721. </html>