scratch-blocks 2.0.0-beta.1 → 2.0.0-spork.1

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 (1065) hide show
  1. package/CHANGELOG.md +16 -16
  2. package/package.json +1 -1
  3. package/release.config.js +4 -0
  4. package/blockly-rc/.eslintignore +0 -28
  5. package/blockly-rc/.eslintrc.js +0 -187
  6. package/blockly-rc/.gitattributes +0 -1
  7. package/blockly-rc/.github/CODEOWNERS +0 -1
  8. package/blockly-rc/.github/CONTRIBUTING.md +0 -46
  9. package/blockly-rc/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -58
  10. package/blockly-rc/.github/ISSUE_TEMPLATE/config.yml +0 -7
  11. package/blockly-rc/.github/ISSUE_TEMPLATE/documentation.yaml +0 -38
  12. package/blockly-rc/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -39
  13. package/blockly-rc/.github/PULL_REQUEST_TEMPLATE.md +0 -42
  14. package/blockly-rc/.github/dependabot.yml +0 -27
  15. package/blockly-rc/.github/release.yml +0 -32
  16. package/blockly-rc/.github/workflows/appengine_deploy.yml +0 -54
  17. package/blockly-rc/.github/workflows/assign_reviewers.yml +0 -41
  18. package/blockly-rc/.github/workflows/browser_test.yml +0 -55
  19. package/blockly-rc/.github/workflows/build.yml +0 -86
  20. package/blockly-rc/.github/workflows/conventional-label.yml +0 -17
  21. package/blockly-rc/.github/workflows/develop_freeze.yml +0 -26
  22. package/blockly-rc/.github/workflows/tag_module_cleanup.yml +0 -37
  23. package/blockly-rc/.github/workflows/welcome_new_contributors.yml +0 -36
  24. package/blockly-rc/.prettierignore +0 -30
  25. package/blockly-rc/.prettierrc.js +0 -13
  26. package/blockly-rc/CHANGELOG.md +0 -77
  27. package/blockly-rc/LICENSE +0 -202
  28. package/blockly-rc/README.md +0 -80
  29. package/blockly-rc/_config.yml +0 -1
  30. package/blockly-rc/api-extractor.json +0 -385
  31. package/blockly-rc/appengine/.gcloudignore +0 -20
  32. package/blockly-rc/appengine/README.txt +0 -42
  33. package/blockly-rc/appengine/add_timestamps.py +0 -69
  34. package/blockly-rc/appengine/app.yaml +0 -104
  35. package/blockly-rc/appengine/apple-touch-icon.png +0 -0
  36. package/blockly-rc/appengine/blockly_compressed.js +0 -11
  37. package/blockly-rc/appengine/expiration.py +0 -52
  38. package/blockly-rc/appengine/favicon.ico +0 -0
  39. package/blockly-rc/appengine/index.yaml +0 -11
  40. package/blockly-rc/appengine/main.py +0 -39
  41. package/blockly-rc/appengine/redirect.html +0 -107
  42. package/blockly-rc/appengine/requirements.txt +0 -1
  43. package/blockly-rc/appengine/robots.txt +0 -2
  44. package/blockly-rc/appengine/storage.js +0 -190
  45. package/blockly-rc/appengine/storage.py +0 -125
  46. package/blockly-rc/blocks/blocks.ts +0 -44
  47. package/blockly-rc/blocks/lists.ts +0 -1085
  48. package/blockly-rc/blocks/logic.ts +0 -712
  49. package/blockly-rc/blocks/loops.ts +0 -408
  50. package/blockly-rc/blocks/math.ts +0 -591
  51. package/blockly-rc/blocks/procedures.ts +0 -1364
  52. package/blockly-rc/blocks/text.ts +0 -1007
  53. package/blockly-rc/blocks/variables.ts +0 -183
  54. package/blockly-rc/blocks/variables_dynamic.ts +0 -194
  55. package/blockly-rc/core/any_aliases.ts +0 -8
  56. package/blockly-rc/core/block.ts +0 -2523
  57. package/blockly-rc/core/block_animations.ts +0 -225
  58. package/blockly-rc/core/block_flyout_inflater.ts +0 -262
  59. package/blockly-rc/core/block_svg.ts +0 -1768
  60. package/blockly-rc/core/blockly.ts +0 -605
  61. package/blockly-rc/core/blockly_options.ts +0 -71
  62. package/blockly-rc/core/blocks.ts +0 -18
  63. package/blockly-rc/core/browser_events.ts +0 -244
  64. package/blockly-rc/core/bubbles/bubble.ts +0 -658
  65. package/blockly-rc/core/bubbles/mini_workspace_bubble.ts +0 -280
  66. package/blockly-rc/core/bubbles/text_bubble.ts +0 -103
  67. package/blockly-rc/core/bubbles/textinput_bubble.ts +0 -344
  68. package/blockly-rc/core/bubbles.ts +0 -12
  69. package/blockly-rc/core/bump_objects.ts +0 -192
  70. package/blockly-rc/core/button_flyout_inflater.ts +0 -63
  71. package/blockly-rc/core/clipboard/block_paster.ts +0 -142
  72. package/blockly-rc/core/clipboard/registry.ts +0 -31
  73. package/blockly-rc/core/clipboard/workspace_comment_paster.ts +0 -94
  74. package/blockly-rc/core/clipboard.ts +0 -113
  75. package/blockly-rc/core/comments/comment_view.ts +0 -899
  76. package/blockly-rc/core/comments/rendered_workspace_comment.ts +0 -297
  77. package/blockly-rc/core/comments/workspace_comment.ts +0 -237
  78. package/blockly-rc/core/comments.ts +0 -9
  79. package/blockly-rc/core/common.ts +0 -305
  80. package/blockly-rc/core/component_manager.ts +0 -235
  81. package/blockly-rc/core/config.ts +0 -65
  82. package/blockly-rc/core/connection.ts +0 -793
  83. package/blockly-rc/core/connection_checker.ts +0 -348
  84. package/blockly-rc/core/connection_db.ts +0 -297
  85. package/blockly-rc/core/connection_type.ts +0 -21
  86. package/blockly-rc/core/constants.ts +0 -23
  87. package/blockly-rc/core/contextmenu.ts +0 -268
  88. package/blockly-rc/core/contextmenu_items.ts +0 -700
  89. package/blockly-rc/core/contextmenu_registry.ts +0 -194
  90. package/blockly-rc/core/css.ts +0 -481
  91. package/blockly-rc/core/delete_area.ts +0 -77
  92. package/blockly-rc/core/dialog.ts +0 -121
  93. package/blockly-rc/core/drag_target.ts +0 -97
  94. package/blockly-rc/core/dragging/block_drag_strategy.ts +0 -454
  95. package/blockly-rc/core/dragging/bubble_drag_strategy.ts +0 -52
  96. package/blockly-rc/core/dragging/comment_drag_strategy.ts +0 -91
  97. package/blockly-rc/core/dragging/dragger.ts +0 -163
  98. package/blockly-rc/core/dragging.ts +0 -12
  99. package/blockly-rc/core/dropdowndiv.ts +0 -768
  100. package/blockly-rc/core/events/events.ts +0 -163
  101. package/blockly-rc/core/events/events_abstract.ts +0 -130
  102. package/blockly-rc/core/events/events_block_base.ts +0 -88
  103. package/blockly-rc/core/events/events_block_change.ts +0 -259
  104. package/blockly-rc/core/events/events_block_create.ts +0 -185
  105. package/blockly-rc/core/events/events_block_delete.ts +0 -182
  106. package/blockly-rc/core/events/events_block_drag.ts +0 -116
  107. package/blockly-rc/core/events/events_block_field_intermediate_change.ts +0 -167
  108. package/blockly-rc/core/events/events_block_move.ts +0 -307
  109. package/blockly-rc/core/events/events_bubble_open.ts +0 -120
  110. package/blockly-rc/core/events/events_click.ts +0 -110
  111. package/blockly-rc/core/events/events_comment_base.ts +0 -126
  112. package/blockly-rc/core/events/events_comment_change.ts +0 -161
  113. package/blockly-rc/core/events/events_comment_collapse.ts +0 -103
  114. package/blockly-rc/core/events/events_comment_create.ts +0 -118
  115. package/blockly-rc/core/events/events_comment_delete.ts +0 -117
  116. package/blockly-rc/core/events/events_comment_drag.ts +0 -99
  117. package/blockly-rc/core/events/events_comment_move.ts +0 -207
  118. package/blockly-rc/core/events/events_comment_resize.ts +0 -174
  119. package/blockly-rc/core/events/events_marker_move.ts +0 -134
  120. package/blockly-rc/core/events/events_selected.ts +0 -98
  121. package/blockly-rc/core/events/events_theme_change.ts +0 -84
  122. package/blockly-rc/core/events/events_toolbox_item_select.ts +0 -96
  123. package/blockly-rc/core/events/events_trashcan_open.ts +0 -88
  124. package/blockly-rc/core/events/events_ui_base.ts +0 -47
  125. package/blockly-rc/core/events/events_var_base.ts +0 -89
  126. package/blockly-rc/core/events/events_var_create.ts +0 -129
  127. package/blockly-rc/core/events/events_var_delete.ts +0 -124
  128. package/blockly-rc/core/events/events_var_rename.ts +0 -133
  129. package/blockly-rc/core/events/events_var_type_change.ts +0 -122
  130. package/blockly-rc/core/events/events_viewport.ts +0 -149
  131. package/blockly-rc/core/events/utils.ts +0 -595
  132. package/blockly-rc/core/events/workspace_events.ts +0 -46
  133. package/blockly-rc/core/extensions.ts +0 -491
  134. package/blockly-rc/core/field.ts +0 -1471
  135. package/blockly-rc/core/field_checkbox.ts +0 -271
  136. package/blockly-rc/core/field_dropdown.ts +0 -857
  137. package/blockly-rc/core/field_image.ts +0 -297
  138. package/blockly-rc/core/field_input.ts +0 -755
  139. package/blockly-rc/core/field_label.ts +0 -150
  140. package/blockly-rc/core/field_label_serializable.ts +0 -73
  141. package/blockly-rc/core/field_number.ts +0 -381
  142. package/blockly-rc/core/field_registry.ts +0 -115
  143. package/blockly-rc/core/field_textinput.ts +0 -117
  144. package/blockly-rc/core/field_variable.ts +0 -651
  145. package/blockly-rc/core/flyout_base.ts +0 -968
  146. package/blockly-rc/core/flyout_button.ts +0 -416
  147. package/blockly-rc/core/flyout_horizontal.ts +0 -374
  148. package/blockly-rc/core/flyout_metrics_manager.ts +0 -90
  149. package/blockly-rc/core/flyout_separator.ts +0 -61
  150. package/blockly-rc/core/flyout_vertical.ts +0 -353
  151. package/blockly-rc/core/generator.ts +0 -611
  152. package/blockly-rc/core/gesture.ts +0 -1191
  153. package/blockly-rc/core/grid.ts +0 -252
  154. package/blockly-rc/core/icons/comment_icon.ts +0 -435
  155. package/blockly-rc/core/icons/exceptions.ts +0 -23
  156. package/blockly-rc/core/icons/icon.ts +0 -147
  157. package/blockly-rc/core/icons/icon_types.ts +0 -32
  158. package/blockly-rc/core/icons/mutator_icon.ts +0 -354
  159. package/blockly-rc/core/icons/registry.ts +0 -33
  160. package/blockly-rc/core/icons/warning_icon.ts +0 -219
  161. package/blockly-rc/core/icons.ts +0 -24
  162. package/blockly-rc/core/inject.ts +0 -428
  163. package/blockly-rc/core/inputs/align.ts +0 -14
  164. package/blockly-rc/core/inputs/dummy_input.ts +0 -26
  165. package/blockly-rc/core/inputs/end_row_input.ts +0 -31
  166. package/blockly-rc/core/inputs/input.ts +0 -318
  167. package/blockly-rc/core/inputs/input_types.ts +0 -27
  168. package/blockly-rc/core/inputs/statement_input.ts +0 -34
  169. package/blockly-rc/core/inputs/value_input.ts +0 -30
  170. package/blockly-rc/core/inputs.ts +0 -23
  171. package/blockly-rc/core/insertion_marker_manager.ts +0 -742
  172. package/blockly-rc/core/insertion_marker_previewer.ts +0 -254
  173. package/blockly-rc/core/interfaces/i_ast_node_location.ts +0 -12
  174. package/blockly-rc/core/interfaces/i_ast_node_location_svg.ts +0 -28
  175. package/blockly-rc/core/interfaces/i_ast_node_location_with_block.ts +0 -22
  176. package/blockly-rc/core/interfaces/i_autohideable.ts +0 -22
  177. package/blockly-rc/core/interfaces/i_bounded_element.ts +0 -30
  178. package/blockly-rc/core/interfaces/i_bubble.ts +0 -63
  179. package/blockly-rc/core/interfaces/i_collapsible_toolbox_item.ts +0 -33
  180. package/blockly-rc/core/interfaces/i_comment_icon.ts +0 -47
  181. package/blockly-rc/core/interfaces/i_component.ts +0 -19
  182. package/blockly-rc/core/interfaces/i_connection_checker.ts +0 -100
  183. package/blockly-rc/core/interfaces/i_connection_previewer.ts +0 -50
  184. package/blockly-rc/core/interfaces/i_contextmenu.ts +0 -16
  185. package/blockly-rc/core/interfaces/i_copyable.ts +0 -31
  186. package/blockly-rc/core/interfaces/i_deletable.ts +0 -34
  187. package/blockly-rc/core/interfaces/i_delete_area.ts +0 -28
  188. package/blockly-rc/core/interfaces/i_drag_target.ts +0 -69
  189. package/blockly-rc/core/interfaces/i_draggable.ts +0 -72
  190. package/blockly-rc/core/interfaces/i_dragger.ts +0 -35
  191. package/blockly-rc/core/interfaces/i_flyout.ts +0 -189
  192. package/blockly-rc/core/interfaces/i_flyout_inflater.ts +0 -41
  193. package/blockly-rc/core/interfaces/i_has_bubble.ts +0 -20
  194. package/blockly-rc/core/interfaces/i_icon.ts +0 -114
  195. package/blockly-rc/core/interfaces/i_keyboard_accessible.ts +0 -21
  196. package/blockly-rc/core/interfaces/i_legacy_procedure_blocks.ts +0 -50
  197. package/blockly-rc/core/interfaces/i_metrics_manager.ts +0 -149
  198. package/blockly-rc/core/interfaces/i_movable.ts +0 -19
  199. package/blockly-rc/core/interfaces/i_observable.ts +0 -24
  200. package/blockly-rc/core/interfaces/i_parameter_model.ts +0 -51
  201. package/blockly-rc/core/interfaces/i_paster.ts +0 -25
  202. package/blockly-rc/core/interfaces/i_positionable.ts +0 -33
  203. package/blockly-rc/core/interfaces/i_procedure_block.ts +0 -27
  204. package/blockly-rc/core/interfaces/i_procedure_map.ts +0 -18
  205. package/blockly-rc/core/interfaces/i_procedure_model.ts +0 -71
  206. package/blockly-rc/core/interfaces/i_registrable.ts +0 -12
  207. package/blockly-rc/core/interfaces/i_rendered_element.ts +0 -22
  208. package/blockly-rc/core/interfaces/i_selectable.ts +0 -34
  209. package/blockly-rc/core/interfaces/i_selectable_toolbox_item.ts +0 -63
  210. package/blockly-rc/core/interfaces/i_serializable.ts +0 -28
  211. package/blockly-rc/core/interfaces/i_serializer.ts +0 -55
  212. package/blockly-rc/core/interfaces/i_styleable.ts +0 -26
  213. package/blockly-rc/core/interfaces/i_toolbox.ts +0 -112
  214. package/blockly-rc/core/interfaces/i_toolbox_item.ts +0 -81
  215. package/blockly-rc/core/interfaces/i_variable_backed_parameter_model.ts +0 -23
  216. package/blockly-rc/core/interfaces/i_variable_map.ts +0 -65
  217. package/blockly-rc/core/interfaces/i_variable_model.ts +0 -57
  218. package/blockly-rc/core/internal_constants.ts +0 -47
  219. package/blockly-rc/core/keyboard_nav/ast_node.ts +0 -884
  220. package/blockly-rc/core/keyboard_nav/basic_cursor.ts +0 -223
  221. package/blockly-rc/core/keyboard_nav/cursor.ts +0 -138
  222. package/blockly-rc/core/keyboard_nav/marker.ts +0 -113
  223. package/blockly-rc/core/keyboard_nav/tab_navigate_cursor.ts +0 -46
  224. package/blockly-rc/core/label_flyout_inflater.ts +0 -59
  225. package/blockly-rc/core/layer_manager.ts +0 -186
  226. package/blockly-rc/core/layers.ts +0 -17
  227. package/blockly-rc/core/main.ts +0 -31
  228. package/blockly-rc/core/marker_manager.ts +0 -189
  229. package/blockly-rc/core/menu.ts +0 -463
  230. package/blockly-rc/core/menuitem.ts +0 -221
  231. package/blockly-rc/core/metrics_manager.ts +0 -486
  232. package/blockly-rc/core/msg.ts +0 -27
  233. package/blockly-rc/core/names.ts +0 -275
  234. package/blockly-rc/core/observable_procedure_map.ts +0 -66
  235. package/blockly-rc/core/options.ts +0 -377
  236. package/blockly-rc/core/positionable_helpers.ts +0 -186
  237. package/blockly-rc/core/procedures.ts +0 -510
  238. package/blockly-rc/core/registry.ts +0 -400
  239. package/blockly-rc/core/render_management.ts +0 -193
  240. package/blockly-rc/core/rendered_connection.ts +0 -571
  241. package/blockly-rc/core/renderers/common/block_rendering.ts +0 -120
  242. package/blockly-rc/core/renderers/common/constants.ts +0 -1198
  243. package/blockly-rc/core/renderers/common/drawer.ts +0 -518
  244. package/blockly-rc/core/renderers/common/i_path_object.ts +0 -137
  245. package/blockly-rc/core/renderers/common/info.ts +0 -767
  246. package/blockly-rc/core/renderers/common/marker_svg.ts +0 -765
  247. package/blockly-rc/core/renderers/common/path_object.ts +0 -324
  248. package/blockly-rc/core/renderers/common/renderer.ts +0 -281
  249. package/blockly-rc/core/renderers/geras/constants.ts +0 -46
  250. package/blockly-rc/core/renderers/geras/drawer.ts +0 -167
  251. package/blockly-rc/core/renderers/geras/geras.ts +0 -31
  252. package/blockly-rc/core/renderers/geras/highlight_constants.ts +0 -342
  253. package/blockly-rc/core/renderers/geras/highlighter.ts +0 -313
  254. package/blockly-rc/core/renderers/geras/info.ts +0 -478
  255. package/blockly-rc/core/renderers/geras/measurables/inline_input.ts +0 -37
  256. package/blockly-rc/core/renderers/geras/measurables/statement_input.ts +0 -36
  257. package/blockly-rc/core/renderers/geras/path_object.ts +0 -135
  258. package/blockly-rc/core/renderers/geras/renderer.ts +0 -124
  259. package/blockly-rc/core/renderers/measurables/base.ts +0 -41
  260. package/blockly-rc/core/renderers/measurables/bottom_row.ts +0 -104
  261. package/blockly-rc/core/renderers/measurables/connection.ts +0 -43
  262. package/blockly-rc/core/renderers/measurables/external_value_input.ts +0 -53
  263. package/blockly-rc/core/renderers/measurables/field.ts +0 -50
  264. package/blockly-rc/core/renderers/measurables/hat.ts +0 -33
  265. package/blockly-rc/core/renderers/measurables/icon.ts +0 -42
  266. package/blockly-rc/core/renderers/measurables/in_row_spacer.ts +0 -29
  267. package/blockly-rc/core/renderers/measurables/inline_input.ts +0 -63
  268. package/blockly-rc/core/renderers/measurables/input_connection.ts +0 -57
  269. package/blockly-rc/core/renderers/measurables/input_row.ts +0 -67
  270. package/blockly-rc/core/renderers/measurables/jagged_edge.ts +0 -28
  271. package/blockly-rc/core/renderers/measurables/next_connection.ts +0 -34
  272. package/blockly-rc/core/renderers/measurables/output_connection.ts +0 -43
  273. package/blockly-rc/core/renderers/measurables/previous_connection.ts +0 -34
  274. package/blockly-rc/core/renderers/measurables/round_corner.ts +0 -34
  275. package/blockly-rc/core/renderers/measurables/row.ts +0 -191
  276. package/blockly-rc/core/renderers/measurables/spacer_row.ts +0 -44
  277. package/blockly-rc/core/renderers/measurables/square_corner.ts +0 -32
  278. package/blockly-rc/core/renderers/measurables/statement_input.ts +0 -41
  279. package/blockly-rc/core/renderers/measurables/top_row.ts +0 -110
  280. package/blockly-rc/core/renderers/measurables/types.ts +0 -319
  281. package/blockly-rc/core/renderers/thrasos/info.ts +0 -328
  282. package/blockly-rc/core/renderers/thrasos/renderer.ts +0 -40
  283. package/blockly-rc/core/renderers/thrasos/thrasos.ts +0 -14
  284. package/blockly-rc/core/renderers/zelos/constants.ts +0 -877
  285. package/blockly-rc/core/renderers/zelos/drawer.ts +0 -274
  286. package/blockly-rc/core/renderers/zelos/info.ts +0 -652
  287. package/blockly-rc/core/renderers/zelos/marker_svg.ts +0 -145
  288. package/blockly-rc/core/renderers/zelos/measurables/bottom_row.ts +0 -44
  289. package/blockly-rc/core/renderers/zelos/measurables/inputs.ts +0 -41
  290. package/blockly-rc/core/renderers/zelos/measurables/row_elements.ts +0 -29
  291. package/blockly-rc/core/renderers/zelos/measurables/top_row.ts +0 -50
  292. package/blockly-rc/core/renderers/zelos/path_object.ts +0 -209
  293. package/blockly-rc/core/renderers/zelos/renderer.ts +0 -143
  294. package/blockly-rc/core/renderers/zelos/zelos.ts +0 -33
  295. package/blockly-rc/core/scrollbar.ts +0 -898
  296. package/blockly-rc/core/scrollbar_pair.ts +0 -349
  297. package/blockly-rc/core/separator_flyout_inflater.ts +0 -69
  298. package/blockly-rc/core/serialization/blocks.ts +0 -868
  299. package/blockly-rc/core/serialization/exceptions.ts +0 -112
  300. package/blockly-rc/core/serialization/priorities.ts +0 -25
  301. package/blockly-rc/core/serialization/procedures.ts +0 -158
  302. package/blockly-rc/core/serialization/registry.ts +0 -30
  303. package/blockly-rc/core/serialization/variables.ts +0 -68
  304. package/blockly-rc/core/serialization/workspace_comments.ts +0 -143
  305. package/blockly-rc/core/serialization/workspaces.ts +0 -94
  306. package/blockly-rc/core/serialization.ts +0 -32
  307. package/blockly-rc/core/shortcut_items.ts +0 -338
  308. package/blockly-rc/core/shortcut_registry.ts +0 -368
  309. package/blockly-rc/core/sprites.ts +0 -15
  310. package/blockly-rc/core/theme/classic.ts +0 -40
  311. package/blockly-rc/core/theme/themes.ts +0 -12
  312. package/blockly-rc/core/theme/zelos.ts +0 -80
  313. package/blockly-rc/core/theme.ts +0 -232
  314. package/blockly-rc/core/theme_manager.ts +0 -192
  315. package/blockly-rc/core/toolbox/category.ts +0 -739
  316. package/blockly-rc/core/toolbox/collapsible_category.ts +0 -288
  317. package/blockly-rc/core/toolbox/separator.ts +0 -105
  318. package/blockly-rc/core/toolbox/toolbox.ts +0 -1134
  319. package/blockly-rc/core/toolbox/toolbox_item.ts +0 -152
  320. package/blockly-rc/core/tooltip.ts +0 -466
  321. package/blockly-rc/core/touch.ts +0 -155
  322. package/blockly-rc/core/trashcan.ts +0 -748
  323. package/blockly-rc/core/utils/aria.ts +0 -144
  324. package/blockly-rc/core/utils/array.ts +0 -24
  325. package/blockly-rc/core/utils/colour.ts +0 -265
  326. package/blockly-rc/core/utils/coordinate.ts +0 -129
  327. package/blockly-rc/core/utils/deprecation.ts +0 -47
  328. package/blockly-rc/core/utils/dom.ts +0 -356
  329. package/blockly-rc/core/utils/idgenerator.ts +0 -70
  330. package/blockly-rc/core/utils/keycodes.ts +0 -154
  331. package/blockly-rc/core/utils/math.ts +0 -50
  332. package/blockly-rc/core/utils/metrics.ts +0 -86
  333. package/blockly-rc/core/utils/object.ts +0 -28
  334. package/blockly-rc/core/utils/parsing.ts +0 -287
  335. package/blockly-rc/core/utils/rect.ts +0 -69
  336. package/blockly-rc/core/utils/size.ts +0 -62
  337. package/blockly-rc/core/utils/string.ts +0 -289
  338. package/blockly-rc/core/utils/style.ts +0 -219
  339. package/blockly-rc/core/utils/svg.ts +0 -84
  340. package/blockly-rc/core/utils/svg_math.ts +0 -208
  341. package/blockly-rc/core/utils/svg_paths.ts +0 -133
  342. package/blockly-rc/core/utils/toolbox.ts +0 -419
  343. package/blockly-rc/core/utils/useragent.ts +0 -86
  344. package/blockly-rc/core/utils/xml.ts +0 -165
  345. package/blockly-rc/core/utils.ts +0 -59
  346. package/blockly-rc/core/variable_map.ts +0 -437
  347. package/blockly-rc/core/variable_model.ts +0 -149
  348. package/blockly-rc/core/variables.ts +0 -773
  349. package/blockly-rc/core/variables_dynamic.ts +0 -142
  350. package/blockly-rc/core/widgetdiv.ts +0 -319
  351. package/blockly-rc/core/workspace.ts +0 -957
  352. package/blockly-rc/core/workspace_audio.ts +0 -171
  353. package/blockly-rc/core/workspace_dragger.ts +0 -97
  354. package/blockly-rc/core/workspace_svg.ts +0 -2519
  355. package/blockly-rc/core/xml.ts +0 -1133
  356. package/blockly-rc/core/zoom_controls.ts +0 -492
  357. package/blockly-rc/demos/blockfactory/analytics.js +0 -195
  358. package/blockly-rc/demos/blockfactory/app_controller.js +0 -726
  359. package/blockly-rc/demos/blockfactory/block_definition_extractor.js +0 -742
  360. package/blockly-rc/demos/blockfactory/block_exporter_controller.js +0 -311
  361. package/blockly-rc/demos/blockfactory/block_exporter_tools.js +0 -212
  362. package/blockly-rc/demos/blockfactory/block_exporter_view.js +0 -101
  363. package/blockly-rc/demos/blockfactory/block_library_controller.js +0 -325
  364. package/blockly-rc/demos/blockfactory/block_library_storage.js +0 -149
  365. package/blockly-rc/demos/blockfactory/block_library_view.js +0 -178
  366. package/blockly-rc/demos/blockfactory/block_option.js +0 -151
  367. package/blockly-rc/demos/blockfactory/blocks.js +0 -916
  368. package/blockly-rc/demos/blockfactory/cp.css +0 -46
  369. package/blockly-rc/demos/blockfactory/cp.js +0 -179
  370. package/blockly-rc/demos/blockfactory/factory.css +0 -586
  371. package/blockly-rc/demos/blockfactory/factory.js +0 -337
  372. package/blockly-rc/demos/blockfactory/factory_utils.js +0 -1036
  373. package/blockly-rc/demos/blockfactory/icon.png +0 -0
  374. package/blockly-rc/demos/blockfactory/index.html +0 -767
  375. package/blockly-rc/demos/blockfactory/link.png +0 -0
  376. package/blockly-rc/demos/blockfactory/standard_categories.js +0 -384
  377. package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_controller.js +0 -1332
  378. package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_generator.js +0 -224
  379. package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_init.js +0 -541
  380. package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_model.js +0 -548
  381. package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_view.js +0 -424
  382. package/blockly-rc/demos/code/code.js +0 -626
  383. package/blockly-rc/demos/code/icon.png +0 -0
  384. package/blockly-rc/demos/code/icons.png +0 -0
  385. package/blockly-rc/demos/code/index.html +0 -359
  386. package/blockly-rc/demos/code/msg/ar.js +0 -24
  387. package/blockly-rc/demos/code/msg/be-tarask.js +0 -24
  388. package/blockly-rc/demos/code/msg/br.js +0 -24
  389. package/blockly-rc/demos/code/msg/ca.js +0 -24
  390. package/blockly-rc/demos/code/msg/cs.js +0 -24
  391. package/blockly-rc/demos/code/msg/da.js +0 -24
  392. package/blockly-rc/demos/code/msg/de.js +0 -24
  393. package/blockly-rc/demos/code/msg/el.js +0 -24
  394. package/blockly-rc/demos/code/msg/en.js +0 -24
  395. package/blockly-rc/demos/code/msg/es.js +0 -24
  396. package/blockly-rc/demos/code/msg/et.js +0 -24
  397. package/blockly-rc/demos/code/msg/fa.js +0 -24
  398. package/blockly-rc/demos/code/msg/fr.js +0 -24
  399. package/blockly-rc/demos/code/msg/he.js +0 -24
  400. package/blockly-rc/demos/code/msg/hr.js +0 -24
  401. package/blockly-rc/demos/code/msg/hrx.js +0 -24
  402. package/blockly-rc/demos/code/msg/hu.js +0 -24
  403. package/blockly-rc/demos/code/msg/ia.js +0 -24
  404. package/blockly-rc/demos/code/msg/is.js +0 -24
  405. package/blockly-rc/demos/code/msg/it.js +0 -24
  406. package/blockly-rc/demos/code/msg/ja.js +0 -24
  407. package/blockly-rc/demos/code/msg/kab.js +0 -24
  408. package/blockly-rc/demos/code/msg/ko.js +0 -24
  409. package/blockly-rc/demos/code/msg/mk.js +0 -24
  410. package/blockly-rc/demos/code/msg/ms.js +0 -24
  411. package/blockly-rc/demos/code/msg/nb.js +0 -24
  412. package/blockly-rc/demos/code/msg/nl.js +0 -24
  413. package/blockly-rc/demos/code/msg/oc.js +0 -24
  414. package/blockly-rc/demos/code/msg/pl.js +0 -24
  415. package/blockly-rc/demos/code/msg/pms.js +0 -24
  416. package/blockly-rc/demos/code/msg/pt-br.js +0 -24
  417. package/blockly-rc/demos/code/msg/ro.js +0 -24
  418. package/blockly-rc/demos/code/msg/ru.js +0 -24
  419. package/blockly-rc/demos/code/msg/sc.js +0 -24
  420. package/blockly-rc/demos/code/msg/sk.js +0 -24
  421. package/blockly-rc/demos/code/msg/sr.js +0 -24
  422. package/blockly-rc/demos/code/msg/sv.js +0 -24
  423. package/blockly-rc/demos/code/msg/ta.js +0 -24
  424. package/blockly-rc/demos/code/msg/th.js +0 -24
  425. package/blockly-rc/demos/code/msg/tlh.js +0 -24
  426. package/blockly-rc/demos/code/msg/tr.js +0 -24
  427. package/blockly-rc/demos/code/msg/uk.js +0 -24
  428. package/blockly-rc/demos/code/msg/vi.js +0 -24
  429. package/blockly-rc/demos/code/msg/zh-hans.js +0 -24
  430. package/blockly-rc/demos/code/msg/zh-hant.js +0 -24
  431. package/blockly-rc/demos/code/style.css +0 -184
  432. package/blockly-rc/demos/index.html +0 -68
  433. package/blockly-rc/demos/minimap/icon.png +0 -0
  434. package/blockly-rc/demos/minimap/index.html +0 -91
  435. package/blockly-rc/demos/minimap/minimap.js +0 -302
  436. package/blockly-rc/demos/mobile/README.md +0 -53
  437. package/blockly-rc/demos/mobile/android/README.md +0 -45
  438. package/blockly-rc/demos/mobile/android/app/build.gradle +0 -64
  439. package/blockly-rc/demos/mobile/android/app/proguard-rules.pro +0 -21
  440. package/blockly-rc/demos/mobile/android/app/src/androidTest/java/com/example/blocklywebview/ExampleInstrumentedTest.java +0 -26
  441. package/blockly-rc/demos/mobile/android/app/src/main/AndroidManifest.xml +0 -21
  442. package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/BlocklyWebViewFragment.java +0 -40
  443. package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java +0 -150
  444. package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/WebChromeClient.java +0 -32
  445. package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/demo/MainActivity.java +0 -18
  446. package/blockly-rc/demos/mobile/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -74
  447. package/blockly-rc/demos/mobile/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
  448. package/blockly-rc/demos/mobile/android/app/src/main/res/layout/activity_main.xml +0 -17
  449. package/blockly-rc/demos/mobile/android/app/src/main/res/layout/js_prompt.xml +0 -37
  450. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
  451. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
  452. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  453. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  454. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  455. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  456. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  457. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  458. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  459. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  460. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  461. package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  462. package/blockly-rc/demos/mobile/android/app/src/main/res/values/colors.xml +0 -6
  463. package/blockly-rc/demos/mobile/android/app/src/main/res/values/js_dialog_helper.xml +0 -7
  464. package/blockly-rc/demos/mobile/android/app/src/main/res/values/strings.xml +0 -3
  465. package/blockly-rc/demos/mobile/android/app/src/main/res/values/styles.xml +0 -11
  466. package/blockly-rc/demos/mobile/android/app/src/test/java/com/example/blocklywebview/ExampleUnitTest.java +0 -17
  467. package/blockly-rc/demos/mobile/android/build.gradle +0 -27
  468. package/blockly-rc/demos/mobile/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  469. package/blockly-rc/demos/mobile/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  470. package/blockly-rc/demos/mobile/android/gradle.properties +0 -13
  471. package/blockly-rc/demos/mobile/android/gradlew +0 -172
  472. package/blockly-rc/demos/mobile/android/gradlew.bat +0 -84
  473. package/blockly-rc/demos/mobile/android/settings.gradle +0 -1
  474. package/blockly-rc/demos/mobile/html/index.html +0 -31
  475. package/blockly-rc/demos/mobile/html/ln_resources.sh +0 -22
  476. package/blockly-rc/demos/mobile/html/toolbox_standard.js +0 -333
  477. package/blockly-rc/demos/mobile/ios/Blockly WebView/AppDelegate.swift +0 -46
  478. package/blockly-rc/demos/mobile/ios/Blockly WebView/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  479. package/blockly-rc/demos/mobile/ios/Blockly WebView/Assets.xcassets/Contents.json +0 -6
  480. package/blockly-rc/demos/mobile/ios/Blockly WebView/Base.lproj/LaunchScreen.storyboard +0 -25
  481. package/blockly-rc/demos/mobile/ios/Blockly WebView/Base.lproj/Main.storyboard +0 -44
  482. package/blockly-rc/demos/mobile/ios/Blockly WebView/Info.plist +0 -45
  483. package/blockly-rc/demos/mobile/ios/Blockly WebView/ViewController.swift +0 -110
  484. package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.pbxproj +0 -390
  485. package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  486. package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  487. package/blockly-rc/demos/mobile/ios/cp_resources.sh +0 -21
  488. package/blockly-rc/demos/storage/icon.png +0 -0
  489. package/blockly-rc/demos/storage/index.html +0 -104
  490. package/blockly-rc/generators/dart/dart_generator.ts +0 -321
  491. package/blockly-rc/generators/dart/lists.ts +0 -525
  492. package/blockly-rc/generators/dart/logic.ts +0 -155
  493. package/blockly-rc/generators/dart/loops.ts +0 -217
  494. package/blockly-rc/generators/dart/math.ts +0 -559
  495. package/blockly-rc/generators/dart/procedures.ts +0 -138
  496. package/blockly-rc/generators/dart/text.ts +0 -405
  497. package/blockly-rc/generators/dart/variables.ts +0 -32
  498. package/blockly-rc/generators/dart/variables_dynamic.ts +0 -17
  499. package/blockly-rc/generators/dart.ts +0 -50
  500. package/blockly-rc/generators/javascript/javascript_generator.ts +0 -346
  501. package/blockly-rc/generators/javascript/lists.ts +0 -465
  502. package/blockly-rc/generators/javascript/logic.ts +0 -153
  503. package/blockly-rc/generators/javascript/loops.ts +0 -245
  504. package/blockly-rc/generators/javascript/math.ts +0 -450
  505. package/blockly-rc/generators/javascript/procedures.ts +0 -142
  506. package/blockly-rc/generators/javascript/text.ts +0 -418
  507. package/blockly-rc/generators/javascript/variables.ts +0 -32
  508. package/blockly-rc/generators/javascript/variables_dynamic.ts +0 -17
  509. package/blockly-rc/generators/javascript.ts +0 -46
  510. package/blockly-rc/generators/lua/lists.ts +0 -445
  511. package/blockly-rc/generators/lua/logic.ts +0 -142
  512. package/blockly-rc/generators/lua/loops.ts +0 -192
  513. package/blockly-rc/generators/lua/lua_generator.ts +0 -225
  514. package/blockly-rc/generators/lua/math.ts +0 -473
  515. package/blockly-rc/generators/lua/procedures.ts +0 -144
  516. package/blockly-rc/generators/lua/text.ts +0 -380
  517. package/blockly-rc/generators/lua/variables.ts +0 -31
  518. package/blockly-rc/generators/lua/variables_dynamic.ts +0 -17
  519. package/blockly-rc/generators/lua.ts +0 -44
  520. package/blockly-rc/generators/php/lists.ts +0 -585
  521. package/blockly-rc/generators/php/logic.ts +0 -155
  522. package/blockly-rc/generators/php/loops.ts +0 -218
  523. package/blockly-rc/generators/php/math.ts +0 -408
  524. package/blockly-rc/generators/php/php_generator.ts +0 -320
  525. package/blockly-rc/generators/php/procedures.ts +0 -159
  526. package/blockly-rc/generators/php/text.ts +0 -315
  527. package/blockly-rc/generators/php/variables.ts +0 -32
  528. package/blockly-rc/generators/php/variables_dynamic.ts +0 -17
  529. package/blockly-rc/generators/php.ts +0 -46
  530. package/blockly-rc/generators/python/lists.ts +0 -398
  531. package/blockly-rc/generators/python/logic.ts +0 -148
  532. package/blockly-rc/generators/python/loops.ts +0 -251
  533. package/blockly-rc/generators/python/math.ts +0 -434
  534. package/blockly-rc/generators/python/procedures.ts +0 -159
  535. package/blockly-rc/generators/python/python_generator.ts +0 -355
  536. package/blockly-rc/generators/python/text.ts +0 -338
  537. package/blockly-rc/generators/python/variables.ts +0 -31
  538. package/blockly-rc/generators/python/variables_dynamic.ts +0 -17
  539. package/blockly-rc/generators/python.ts +0 -51
  540. package/blockly-rc/gulpfile.js +0 -54
  541. package/blockly-rc/jsconfig.json +0 -7
  542. package/blockly-rc/media/1x1.gif +0 -0
  543. package/blockly-rc/media/click.mp3 +0 -0
  544. package/blockly-rc/media/click.ogg +0 -0
  545. package/blockly-rc/media/click.wav +0 -0
  546. package/blockly-rc/media/delete-icon.svg +0 -1
  547. package/blockly-rc/media/delete.mp3 +0 -0
  548. package/blockly-rc/media/delete.ogg +0 -0
  549. package/blockly-rc/media/delete.wav +0 -0
  550. package/blockly-rc/media/disconnect.mp3 +0 -0
  551. package/blockly-rc/media/disconnect.ogg +0 -0
  552. package/blockly-rc/media/disconnect.wav +0 -0
  553. package/blockly-rc/media/dropdown-arrow.svg +0 -1
  554. package/blockly-rc/media/foldout-icon.svg +0 -1
  555. package/blockly-rc/media/handclosed.cur +0 -0
  556. package/blockly-rc/media/handdelete.cur +0 -0
  557. package/blockly-rc/media/handopen.cur +0 -0
  558. package/blockly-rc/media/pilcrow.png +0 -0
  559. package/blockly-rc/media/quote0.png +0 -0
  560. package/blockly-rc/media/quote1.png +0 -0
  561. package/blockly-rc/media/resize-handle.svg +0 -3
  562. package/blockly-rc/media/sprites.png +0 -0
  563. package/blockly-rc/media/sprites.svg +0 -74
  564. package/blockly-rc/msg/json/README.md +0 -33
  565. package/blockly-rc/msg/json/ab.json +0 -222
  566. package/blockly-rc/msg/json/ace.json +0 -7
  567. package/blockly-rc/msg/json/af.json +0 -34
  568. package/blockly-rc/msg/json/am.json +0 -30
  569. package/blockly-rc/msg/json/ar.json +0 -355
  570. package/blockly-rc/msg/json/ast.json +0 -10
  571. package/blockly-rc/msg/json/az.json +0 -332
  572. package/blockly-rc/msg/json/ba.json +0 -211
  573. package/blockly-rc/msg/json/bcc.json +0 -290
  574. package/blockly-rc/msg/json/be-tarask.json +0 -334
  575. package/blockly-rc/msg/json/be.json +0 -324
  576. package/blockly-rc/msg/json/bg.json +0 -345
  577. package/blockly-rc/msg/json/bn.json +0 -189
  578. package/blockly-rc/msg/json/br.json +0 -334
  579. package/blockly-rc/msg/json/bs.json +0 -166
  580. package/blockly-rc/msg/json/ca.json +0 -341
  581. package/blockly-rc/msg/json/cdo.json +0 -6
  582. package/blockly-rc/msg/json/ce.json +0 -326
  583. package/blockly-rc/msg/json/constants.json +0 -12
  584. package/blockly-rc/msg/json/cs.json +0 -343
  585. package/blockly-rc/msg/json/da.json +0 -346
  586. package/blockly-rc/msg/json/de.json +0 -369
  587. package/blockly-rc/msg/json/diq.json +0 -258
  588. package/blockly-rc/msg/json/dtp.json +0 -198
  589. package/blockly-rc/msg/json/dty.json +0 -97
  590. package/blockly-rc/msg/json/ee.json +0 -160
  591. package/blockly-rc/msg/json/el.json +0 -356
  592. package/blockly-rc/msg/json/en-gb.json +0 -199
  593. package/blockly-rc/msg/json/en.json +0 -400
  594. package/blockly-rc/msg/json/eo.json +0 -337
  595. package/blockly-rc/msg/json/es.json +0 -358
  596. package/blockly-rc/msg/json/et.json +0 -326
  597. package/blockly-rc/msg/json/eu.json +0 -219
  598. package/blockly-rc/msg/json/fa.json +0 -341
  599. package/blockly-rc/msg/json/fi.json +0 -350
  600. package/blockly-rc/msg/json/fo.json +0 -46
  601. package/blockly-rc/msg/json/fr.json +0 -373
  602. package/blockly-rc/msg/json/frr.json +0 -6
  603. package/blockly-rc/msg/json/gl.json +0 -338
  604. package/blockly-rc/msg/json/gn.json +0 -54
  605. package/blockly-rc/msg/json/gor.json +0 -87
  606. package/blockly-rc/msg/json/ha.json +0 -313
  607. package/blockly-rc/msg/json/hak.json +0 -17
  608. package/blockly-rc/msg/json/he.json +0 -354
  609. package/blockly-rc/msg/json/hi.json +0 -318
  610. package/blockly-rc/msg/json/hr.json +0 -327
  611. package/blockly-rc/msg/json/hrx.json +0 -287
  612. package/blockly-rc/msg/json/hsb.json +0 -128
  613. package/blockly-rc/msg/json/hu.json +0 -349
  614. package/blockly-rc/msg/json/hy.json +0 -337
  615. package/blockly-rc/msg/json/ia.json +0 -337
  616. package/blockly-rc/msg/json/id.json +0 -335
  617. package/blockly-rc/msg/json/ig.json +0 -323
  618. package/blockly-rc/msg/json/inh.json +0 -80
  619. package/blockly-rc/msg/json/is.json +0 -331
  620. package/blockly-rc/msg/json/it.json +0 -346
  621. package/blockly-rc/msg/json/ja.json +0 -361
  622. package/blockly-rc/msg/json/ka.json +0 -14
  623. package/blockly-rc/msg/json/kab.json +0 -323
  624. package/blockly-rc/msg/json/kbd-cyrl.json +0 -84
  625. package/blockly-rc/msg/json/km.json +0 -29
  626. package/blockly-rc/msg/json/kn.json +0 -332
  627. package/blockly-rc/msg/json/ko.json +0 -372
  628. package/blockly-rc/msg/json/ksh.json +0 -43
  629. package/blockly-rc/msg/json/ku-latn.json +0 -41
  630. package/blockly-rc/msg/json/ky.json +0 -71
  631. package/blockly-rc/msg/json/la.json +0 -6
  632. package/blockly-rc/msg/json/lb.json +0 -156
  633. package/blockly-rc/msg/json/lki.json +0 -282
  634. package/blockly-rc/msg/json/lo.json +0 -92
  635. package/blockly-rc/msg/json/lrc.json +0 -123
  636. package/blockly-rc/msg/json/lt.json +0 -321
  637. package/blockly-rc/msg/json/lv.json +0 -324
  638. package/blockly-rc/msg/json/mg.json +0 -58
  639. package/blockly-rc/msg/json/mk.json +0 -178
  640. package/blockly-rc/msg/json/ml.json +0 -35
  641. package/blockly-rc/msg/json/mnw.json +0 -90
  642. package/blockly-rc/msg/json/ms.json +0 -300
  643. package/blockly-rc/msg/json/my.json +0 -57
  644. package/blockly-rc/msg/json/mzn.json +0 -6
  645. package/blockly-rc/msg/json/nb.json +0 -330
  646. package/blockly-rc/msg/json/ne.json +0 -247
  647. package/blockly-rc/msg/json/nl.json +0 -357
  648. package/blockly-rc/msg/json/oc.json +0 -194
  649. package/blockly-rc/msg/json/olo.json +0 -37
  650. package/blockly-rc/msg/json/pa.json +0 -69
  651. package/blockly-rc/msg/json/pl.json +0 -357
  652. package/blockly-rc/msg/json/pms.json +0 -324
  653. package/blockly-rc/msg/json/ps.json +0 -50
  654. package/blockly-rc/msg/json/pt-br.json +0 -369
  655. package/blockly-rc/msg/json/pt.json +0 -358
  656. package/blockly-rc/msg/json/qqq.json +0 -406
  657. package/blockly-rc/msg/json/ro.json +0 -333
  658. package/blockly-rc/msg/json/ru.json +0 -363
  659. package/blockly-rc/msg/json/sc.json +0 -283
  660. package/blockly-rc/msg/json/sco.json +0 -11
  661. package/blockly-rc/msg/json/sd.json +0 -158
  662. package/blockly-rc/msg/json/shn.json +0 -109
  663. package/blockly-rc/msg/json/si.json +0 -16
  664. package/blockly-rc/msg/json/sk.json +0 -332
  665. package/blockly-rc/msg/json/skr-arab.json +0 -117
  666. package/blockly-rc/msg/json/sl.json +0 -355
  667. package/blockly-rc/msg/json/smn.json +0 -133
  668. package/blockly-rc/msg/json/sq.json +0 -343
  669. package/blockly-rc/msg/json/sr-latn.json +0 -324
  670. package/blockly-rc/msg/json/sr.json +0 -348
  671. package/blockly-rc/msg/json/sv.json +0 -347
  672. package/blockly-rc/msg/json/sw.json +0 -12
  673. package/blockly-rc/msg/json/synonyms.json +0 -22
  674. package/blockly-rc/msg/json/ta.json +0 -306
  675. package/blockly-rc/msg/json/tcy.json +0 -316
  676. package/blockly-rc/msg/json/tdd.json +0 -109
  677. package/blockly-rc/msg/json/te.json +0 -101
  678. package/blockly-rc/msg/json/th.json +0 -333
  679. package/blockly-rc/msg/json/ti.json +0 -50
  680. package/blockly-rc/msg/json/tl.json +0 -129
  681. package/blockly-rc/msg/json/tlh.json +0 -179
  682. package/blockly-rc/msg/json/tr.json +0 -369
  683. package/blockly-rc/msg/json/ug-arab.json +0 -132
  684. package/blockly-rc/msg/json/uk.json +0 -345
  685. package/blockly-rc/msg/json/ur.json +0 -117
  686. package/blockly-rc/msg/json/uz.json +0 -36
  687. package/blockly-rc/msg/json/vi.json +0 -345
  688. package/blockly-rc/msg/json/xmf.json +0 -96
  689. package/blockly-rc/msg/json/yo.json +0 -316
  690. package/blockly-rc/msg/json/zgh.json +0 -83
  691. package/blockly-rc/msg/json/zh-hans.json +0 -372
  692. package/blockly-rc/msg/json/zh-hant.json +0 -362
  693. package/blockly-rc/msg/messages.js +0 -1616
  694. package/blockly-rc/package-lock.json +0 -12324
  695. package/blockly-rc/package.json +0 -149
  696. package/blockly-rc/patches/@microsoft+api-documenter+7.22.4.patch +0 -81
  697. package/blockly-rc/scripts/goog_module/convert-file.sh +0 -406
  698. package/blockly-rc/scripts/gulpfiles/appengine_tasks.js +0 -195
  699. package/blockly-rc/scripts/gulpfiles/build_tasks.js +0 -752
  700. package/blockly-rc/scripts/gulpfiles/config.js +0 -41
  701. package/blockly-rc/scripts/gulpfiles/docs_tasks.js +0 -147
  702. package/blockly-rc/scripts/gulpfiles/git_tasks.js +0 -181
  703. package/blockly-rc/scripts/gulpfiles/helper_tasks.js +0 -19
  704. package/blockly-rc/scripts/gulpfiles/package_tasks.js +0 -262
  705. package/blockly-rc/scripts/gulpfiles/release_tasks.js +0 -183
  706. package/blockly-rc/scripts/gulpfiles/test_tasks.js +0 -405
  707. package/blockly-rc/scripts/helpers.js +0 -74
  708. package/blockly-rc/scripts/i18n/common.py +0 -233
  709. package/blockly-rc/scripts/i18n/create_messages.py +0 -167
  710. package/blockly-rc/scripts/i18n/dedup_json.py +0 -72
  711. package/blockly-rc/scripts/i18n/js_to_json.py +0 -135
  712. package/blockly-rc/scripts/i18n/tests.py +0 -46
  713. package/blockly-rc/scripts/migration/cjs2esm +0 -162
  714. package/blockly-rc/scripts/migration/js2ts +0 -168
  715. package/blockly-rc/scripts/migration/renamings.json5 +0 -1599
  716. package/blockly-rc/scripts/package/README.md +0 -93
  717. package/blockly-rc/scripts/package/core-node.js +0 -31
  718. package/blockly-rc/scripts/package/index.js +0 -23
  719. package/blockly-rc/scripts/package/templates/umd-msg.template +0 -16
  720. package/blockly-rc/scripts/package/templates/umd.template +0 -13
  721. package/blockly-rc/scripts/themes/blockStyles_example.json +0 -11
  722. package/blockly-rc/scripts/themes/create_blockStyles.py +0 -181
  723. package/blockly-rc/scripts/tsick.js +0 -86
  724. package/blockly-rc/tests/.eslintrc.json +0 -10
  725. package/blockly-rc/tests/browser/.eslintrc.json +0 -29
  726. package/blockly-rc/tests/browser/.mocharc.js +0 -6
  727. package/blockly-rc/tests/browser/test/basic_block_factory_test.mjs +0 -44
  728. package/blockly-rc/tests/browser/test/basic_block_test.mjs +0 -39
  729. package/blockly-rc/tests/browser/test/basic_playground_test.mjs +0 -198
  730. package/blockly-rc/tests/browser/test/block_undo_test.mjs +0 -50
  731. package/blockly-rc/tests/browser/test/delete_blocks_test.mjs +0 -211
  732. package/blockly-rc/tests/browser/test/extensive_test.mjs +0 -195
  733. package/blockly-rc/tests/browser/test/field_edits_test.mjs +0 -61
  734. package/blockly-rc/tests/browser/test/hooks.mjs +0 -23
  735. package/blockly-rc/tests/browser/test/mutator_test.mjs +0 -88
  736. package/blockly-rc/tests/browser/test/procedure_test.mjs +0 -109
  737. package/blockly-rc/tests/browser/test/test_setup.mjs +0 -589
  738. package/blockly-rc/tests/browser/test/toolbox_drag_test.mjs +0 -207
  739. package/blockly-rc/tests/browser/test/workspace_comment_test.mjs +0 -224
  740. package/blockly-rc/tests/compile/index.html +0 -43
  741. package/blockly-rc/tests/compile/main.js +0 -53
  742. package/blockly-rc/tests/compile/test_blocks.js +0 -47
  743. package/blockly-rc/tests/compile/webdriver.js +0 -81
  744. package/blockly-rc/tests/generators/functions.xml +0 -561
  745. package/blockly-rc/tests/generators/golden/generated.dart +0 -1604
  746. package/blockly-rc/tests/generators/golden/generated.js +0 -1552
  747. package/blockly-rc/tests/generators/golden/generated.lua +0 -1828
  748. package/blockly-rc/tests/generators/golden/generated.php +0 -1611
  749. package/blockly-rc/tests/generators/golden/generated.py +0 -1407
  750. package/blockly-rc/tests/generators/index.html +0 -405
  751. package/blockly-rc/tests/generators/lists.xml +0 -8675
  752. package/blockly-rc/tests/generators/logic.xml +0 -1019
  753. package/blockly-rc/tests/generators/loops1.xml +0 -345
  754. package/blockly-rc/tests/generators/loops2.xml +0 -891
  755. package/blockly-rc/tests/generators/loops3.xml +0 -735
  756. package/blockly-rc/tests/generators/math.xml +0 -2077
  757. package/blockly-rc/tests/generators/text.xml +0 -4651
  758. package/blockly-rc/tests/generators/unittest.js +0 -103
  759. package/blockly-rc/tests/generators/unittest_dart.js +0 -163
  760. package/blockly-rc/tests/generators/unittest_javascript.js +0 -167
  761. package/blockly-rc/tests/generators/unittest_lua.js +0 -165
  762. package/blockly-rc/tests/generators/unittest_php.js +0 -154
  763. package/blockly-rc/tests/generators/unittest_python.js +0 -138
  764. package/blockly-rc/tests/generators/variables.xml +0 -68
  765. package/blockly-rc/tests/generators/webdriver.js +0 -123
  766. package/blockly-rc/tests/media/200px.png +0 -0
  767. package/blockly-rc/tests/media/30px.png +0 -0
  768. package/blockly-rc/tests/media/50px.png +0 -0
  769. package/blockly-rc/tests/media/a.png +0 -0
  770. package/blockly-rc/tests/media/arrow.png +0 -0
  771. package/blockly-rc/tests/media/b.png +0 -0
  772. package/blockly-rc/tests/media/c.png +0 -0
  773. package/blockly-rc/tests/media/d.png +0 -0
  774. package/blockly-rc/tests/media/e.png +0 -0
  775. package/blockly-rc/tests/media/f.png +0 -0
  776. package/blockly-rc/tests/media/g.png +0 -0
  777. package/blockly-rc/tests/media/h.png +0 -0
  778. package/blockly-rc/tests/media/i.png +0 -0
  779. package/blockly-rc/tests/media/j.png +0 -0
  780. package/blockly-rc/tests/media/k.png +0 -0
  781. package/blockly-rc/tests/media/l.png +0 -0
  782. package/blockly-rc/tests/media/m.png +0 -0
  783. package/blockly-rc/tests/migration/renamings.schema.json +0 -59
  784. package/blockly-rc/tests/migration/validate-renamings.mjs +0 -60
  785. package/blockly-rc/tests/mocha/.eslintrc.json +0 -21
  786. package/blockly-rc/tests/mocha/.mocharc.js +0 -6
  787. package/blockly-rc/tests/mocha/astnode_test.js +0 -850
  788. package/blockly-rc/tests/mocha/block_json_test.js +0 -777
  789. package/blockly-rc/tests/mocha/block_test.js +0 -2743
  790. package/blockly-rc/tests/mocha/blocks/lists_test.js +0 -196
  791. package/blockly-rc/tests/mocha/blocks/logic_ternary_test.js +0 -320
  792. package/blockly-rc/tests/mocha/blocks/loops_test.js +0 -56
  793. package/blockly-rc/tests/mocha/blocks/procedures_test.js +0 -2495
  794. package/blockly-rc/tests/mocha/blocks/variables_test.js +0 -311
  795. package/blockly-rc/tests/mocha/clipboard_test.js +0 -136
  796. package/blockly-rc/tests/mocha/comment_deserialization_test.js +0 -122
  797. package/blockly-rc/tests/mocha/comment_test.js +0 -170
  798. package/blockly-rc/tests/mocha/comment_view_test.js +0 -188
  799. package/blockly-rc/tests/mocha/connection_checker_test.js +0 -666
  800. package/blockly-rc/tests/mocha/connection_db_test.js +0 -362
  801. package/blockly-rc/tests/mocha/connection_test.js +0 -3738
  802. package/blockly-rc/tests/mocha/contextmenu_items_test.js +0 -488
  803. package/blockly-rc/tests/mocha/contextmenu_test.js +0 -71
  804. package/blockly-rc/tests/mocha/cursor_test.js +0 -134
  805. package/blockly-rc/tests/mocha/dropdowndiv_test.js +0 -116
  806. package/blockly-rc/tests/mocha/event_block_change_test.js +0 -126
  807. package/blockly-rc/tests/mocha/event_block_create_test.js +0 -109
  808. package/blockly-rc/tests/mocha/event_block_delete_test.js +0 -55
  809. package/blockly-rc/tests/mocha/event_block_drag_test.js +0 -36
  810. package/blockly-rc/tests/mocha/event_block_field_intermediate_change_test.js +0 -67
  811. package/blockly-rc/tests/mocha/event_block_move_test.js +0 -39
  812. package/blockly-rc/tests/mocha/event_bubble_open_test.js +0 -42
  813. package/blockly-rc/tests/mocha/event_click_test.js +0 -40
  814. package/blockly-rc/tests/mocha/event_comment_change_test.js +0 -39
  815. package/blockly-rc/tests/mocha/event_comment_collapse_test.js +0 -34
  816. package/blockly-rc/tests/mocha/event_comment_create_test.js +0 -38
  817. package/blockly-rc/tests/mocha/event_comment_delete_test.js +0 -38
  818. package/blockly-rc/tests/mocha/event_comment_drag_test.js +0 -35
  819. package/blockly-rc/tests/mocha/event_comment_move_test.js +0 -40
  820. package/blockly-rc/tests/mocha/event_comment_resize_test.js +0 -38
  821. package/blockly-rc/tests/mocha/event_marker_move_test.js +0 -44
  822. package/blockly-rc/tests/mocha/event_selected_test.js +0 -41
  823. package/blockly-rc/tests/mocha/event_test.js +0 -1578
  824. package/blockly-rc/tests/mocha/event_theme_change_test.js +0 -36
  825. package/blockly-rc/tests/mocha/event_toolbox_item_select_test.js +0 -64
  826. package/blockly-rc/tests/mocha/event_trashcan_open_test.js +0 -36
  827. package/blockly-rc/tests/mocha/event_var_create_test.js +0 -54
  828. package/blockly-rc/tests/mocha/event_var_delete_test.js +0 -54
  829. package/blockly-rc/tests/mocha/event_var_rename_test.js +0 -39
  830. package/blockly-rc/tests/mocha/event_var_type_change_test.js +0 -43
  831. package/blockly-rc/tests/mocha/event_viewport_test.js +0 -39
  832. package/blockly-rc/tests/mocha/extensions_test.js +0 -613
  833. package/blockly-rc/tests/mocha/field_checkbox_test.js +0 -299
  834. package/blockly-rc/tests/mocha/field_colour_test.js +0 -395
  835. package/blockly-rc/tests/mocha/field_dropdown_test.js +0 -282
  836. package/blockly-rc/tests/mocha/field_image_test.js +0 -241
  837. package/blockly-rc/tests/mocha/field_label_serializable_test.js +0 -252
  838. package/blockly-rc/tests/mocha/field_label_test.js +0 -226
  839. package/blockly-rc/tests/mocha/field_number_test.js +0 -505
  840. package/blockly-rc/tests/mocha/field_registry_test.js +0 -116
  841. package/blockly-rc/tests/mocha/field_test.js +0 -822
  842. package/blockly-rc/tests/mocha/field_textinput_test.js +0 -297
  843. package/blockly-rc/tests/mocha/field_variable_test.js +0 -611
  844. package/blockly-rc/tests/mocha/flyout_test.js +0 -638
  845. package/blockly-rc/tests/mocha/generator_test.js +0 -233
  846. package/blockly-rc/tests/mocha/gesture_test.js +0 -97
  847. package/blockly-rc/tests/mocha/icon_test.js +0 -369
  848. package/blockly-rc/tests/mocha/index.html +0 -229
  849. package/blockly-rc/tests/mocha/input_test.js +0 -296
  850. package/blockly-rc/tests/mocha/insertion_marker_manager_test.js +0 -443
  851. package/blockly-rc/tests/mocha/insertion_marker_test.js +0 -432
  852. package/blockly-rc/tests/mocha/jso_deserialization_test.js +0 -849
  853. package/blockly-rc/tests/mocha/jso_serialization_test.js +0 -1067
  854. package/blockly-rc/tests/mocha/json_test.js +0 -315
  855. package/blockly-rc/tests/mocha/keydown_test.js +0 -364
  856. package/blockly-rc/tests/mocha/layering_test.js +0 -95
  857. package/blockly-rc/tests/mocha/metrics_test.js +0 -671
  858. package/blockly-rc/tests/mocha/mutator_test.js +0 -87
  859. package/blockly-rc/tests/mocha/names_test.js +0 -97
  860. package/blockly-rc/tests/mocha/old_workspace_comment_test.js +0 -256
  861. package/blockly-rc/tests/mocha/procedure_map_test.js +0 -57
  862. package/blockly-rc/tests/mocha/registry_test.js +0 -281
  863. package/blockly-rc/tests/mocha/render_management_test.js +0 -127
  864. package/blockly-rc/tests/mocha/serializer_test.js +0 -2104
  865. package/blockly-rc/tests/mocha/shortcut_registry_test.js +0 -450
  866. package/blockly-rc/tests/mocha/test_helpers/block_definitions.js +0 -204
  867. package/blockly-rc/tests/mocha/test_helpers/code_generation.js +0 -115
  868. package/blockly-rc/tests/mocha/test_helpers/common.js +0 -106
  869. package/blockly-rc/tests/mocha/test_helpers/events.js +0 -290
  870. package/blockly-rc/tests/mocha/test_helpers/fields.js +0 -310
  871. package/blockly-rc/tests/mocha/test_helpers/icon_mocks.js +0 -81
  872. package/blockly-rc/tests/mocha/test_helpers/procedures.js +0 -302
  873. package/blockly-rc/tests/mocha/test_helpers/serialization.js +0 -124
  874. package/blockly-rc/tests/mocha/test_helpers/setup_teardown.js +0 -209
  875. package/blockly-rc/tests/mocha/test_helpers/toolbox_definitions.js +0 -271
  876. package/blockly-rc/tests/mocha/test_helpers/user_input.js +0 -62
  877. package/blockly-rc/tests/mocha/test_helpers/variables.js +0 -23
  878. package/blockly-rc/tests/mocha/test_helpers/warnings.js +0 -83
  879. package/blockly-rc/tests/mocha/test_helpers/workspace.js +0 -1691
  880. package/blockly-rc/tests/mocha/theme_test.js +0 -307
  881. package/blockly-rc/tests/mocha/toolbox_test.js +0 -761
  882. package/blockly-rc/tests/mocha/tooltip_test.js +0 -276
  883. package/blockly-rc/tests/mocha/touch_test.js +0 -109
  884. package/blockly-rc/tests/mocha/trashcan_test.js +0 -375
  885. package/blockly-rc/tests/mocha/utils_test.js +0 -536
  886. package/blockly-rc/tests/mocha/variable_map_test.js +0 -509
  887. package/blockly-rc/tests/mocha/variable_model_test.js +0 -85
  888. package/blockly-rc/tests/mocha/webdriver.js +0 -96
  889. package/blockly-rc/tests/mocha/widget_div_test.js +0 -272
  890. package/blockly-rc/tests/mocha/workspace_comment_test.js +0 -171
  891. package/blockly-rc/tests/mocha/workspace_svg_test.js +0 -414
  892. package/blockly-rc/tests/mocha/workspace_test.js +0 -27
  893. package/blockly-rc/tests/mocha/xml_test.js +0 -951
  894. package/blockly-rc/tests/mocha/zoom_controls_test.js +0 -81
  895. package/blockly-rc/tests/multi_playground.html +0 -482
  896. package/blockly-rc/tests/node/.eslintrc.json +0 -12
  897. package/blockly-rc/tests/node/.mocharc.js +0 -6
  898. package/blockly-rc/tests/node/run_node_test.mjs +0 -72
  899. package/blockly-rc/tests/playground.html +0 -1280
  900. package/blockly-rc/tests/playgrounds/advanced_playground.html +0 -158
  901. package/blockly-rc/tests/playgrounds/iframe.html +0 -40
  902. package/blockly-rc/tests/playgrounds/screenshot.js +0 -123
  903. package/blockly-rc/tests/scripts/check_metadata.sh +0 -166
  904. package/blockly-rc/tests/scripts/compile_typings.sh +0 -32
  905. package/blockly-rc/tests/scripts/load.mjs +0 -140
  906. package/blockly-rc/tests/scripts/setup_linux_env.sh +0 -7
  907. package/blockly-rc/tests/scripts/update_metadata.sh +0 -46
  908. package/blockly-rc/tests/themes/test_themes.js +0 -62
  909. package/blockly-rc/tests/typescript/README.md +0 -4
  910. package/blockly-rc/tests/typescript/src/field/different_user_input.ts +0 -81
  911. package/blockly-rc/tests/typescript/src/generators/dart.ts +0 -24
  912. package/blockly-rc/tests/typescript/src/generators/javascript.ts +0 -28
  913. package/blockly-rc/tests/typescript/src/generators/lua.ts +0 -24
  914. package/blockly-rc/tests/typescript/src/generators/php.ts +0 -24
  915. package/blockly-rc/tests/typescript/src/generators/python.ts +0 -24
  916. package/blockly-rc/tests/typescript/src/generators.ts +0 -31
  917. package/blockly-rc/tests/typescript/src/msg.ts +0 -20
  918. package/blockly-rc/tests/typescript/tsconfig.json +0 -20
  919. package/blockly-rc/tests/xml/README.txt +0 -11
  920. package/blockly-rc/tests/xml/blockly.xsd +0 -178
  921. package/blockly-rc/tests/xml/invalid.xml +0 -6
  922. package/blockly-rc/tests/xml/toolbox.xml +0 -311
  923. package/blockly-rc/tests/xml/workspace.xml +0 -114
  924. package/blockly-rc/tsconfig.json +0 -37
  925. package/blockly-rc/tsdoc.json +0 -35
  926. package/blockly-rc/typings/README.md +0 -5
  927. package/blockly-rc/typings/blocks.d.ts +0 -17
  928. package/blockly-rc/typings/core.d.ts +0 -7
  929. package/blockly-rc/typings/dart.d.ts +0 -7
  930. package/blockly-rc/typings/index.d.ts +0 -10
  931. package/blockly-rc/typings/javascript.d.ts +0 -7
  932. package/blockly-rc/typings/lua.d.ts +0 -7
  933. package/blockly-rc/typings/msg/ab.d.ts +0 -8
  934. package/blockly-rc/typings/msg/ace.d.ts +0 -8
  935. package/blockly-rc/typings/msg/af.d.ts +0 -8
  936. package/blockly-rc/typings/msg/am.d.ts +0 -8
  937. package/blockly-rc/typings/msg/ar.d.ts +0 -8
  938. package/blockly-rc/typings/msg/ast.d.ts +0 -8
  939. package/blockly-rc/typings/msg/az.d.ts +0 -8
  940. package/blockly-rc/typings/msg/ba.d.ts +0 -8
  941. package/blockly-rc/typings/msg/bcc.d.ts +0 -8
  942. package/blockly-rc/typings/msg/be-tarask.d.ts +0 -8
  943. package/blockly-rc/typings/msg/be.d.ts +0 -8
  944. package/blockly-rc/typings/msg/bg.d.ts +0 -8
  945. package/blockly-rc/typings/msg/bn.d.ts +0 -8
  946. package/blockly-rc/typings/msg/br.d.ts +0 -8
  947. package/blockly-rc/typings/msg/bs.d.ts +0 -8
  948. package/blockly-rc/typings/msg/ca.d.ts +0 -8
  949. package/blockly-rc/typings/msg/cdo.d.ts +0 -8
  950. package/blockly-rc/typings/msg/ce.d.ts +0 -8
  951. package/blockly-rc/typings/msg/cs.d.ts +0 -8
  952. package/blockly-rc/typings/msg/da.d.ts +0 -8
  953. package/blockly-rc/typings/msg/de.d.ts +0 -8
  954. package/blockly-rc/typings/msg/diq.d.ts +0 -8
  955. package/blockly-rc/typings/msg/dtp.d.ts +0 -8
  956. package/blockly-rc/typings/msg/dty.d.ts +0 -8
  957. package/blockly-rc/typings/msg/ee.d.ts +0 -8
  958. package/blockly-rc/typings/msg/el.d.ts +0 -8
  959. package/blockly-rc/typings/msg/en-gb.d.ts +0 -8
  960. package/blockly-rc/typings/msg/en.d.ts +0 -8
  961. package/blockly-rc/typings/msg/eo.d.ts +0 -8
  962. package/blockly-rc/typings/msg/es.d.ts +0 -8
  963. package/blockly-rc/typings/msg/et.d.ts +0 -8
  964. package/blockly-rc/typings/msg/eu.d.ts +0 -8
  965. package/blockly-rc/typings/msg/fa.d.ts +0 -8
  966. package/blockly-rc/typings/msg/fi.d.ts +0 -8
  967. package/blockly-rc/typings/msg/fo.d.ts +0 -8
  968. package/blockly-rc/typings/msg/fr.d.ts +0 -8
  969. package/blockly-rc/typings/msg/frr.d.ts +0 -8
  970. package/blockly-rc/typings/msg/gl.d.ts +0 -8
  971. package/blockly-rc/typings/msg/gn.d.ts +0 -8
  972. package/blockly-rc/typings/msg/gor.d.ts +0 -8
  973. package/blockly-rc/typings/msg/ha.d.ts +0 -8
  974. package/blockly-rc/typings/msg/hak.d.ts +0 -8
  975. package/blockly-rc/typings/msg/he.d.ts +0 -8
  976. package/blockly-rc/typings/msg/hi.d.ts +0 -8
  977. package/blockly-rc/typings/msg/hr.d.ts +0 -8
  978. package/blockly-rc/typings/msg/hrx.d.ts +0 -8
  979. package/blockly-rc/typings/msg/hsb.d.ts +0 -8
  980. package/blockly-rc/typings/msg/hu.d.ts +0 -8
  981. package/blockly-rc/typings/msg/hy.d.ts +0 -8
  982. package/blockly-rc/typings/msg/ia.d.ts +0 -8
  983. package/blockly-rc/typings/msg/id.d.ts +0 -8
  984. package/blockly-rc/typings/msg/ig.d.ts +0 -8
  985. package/blockly-rc/typings/msg/inh.d.ts +0 -8
  986. package/blockly-rc/typings/msg/is.d.ts +0 -8
  987. package/blockly-rc/typings/msg/it.d.ts +0 -8
  988. package/blockly-rc/typings/msg/ja.d.ts +0 -8
  989. package/blockly-rc/typings/msg/ka.d.ts +0 -8
  990. package/blockly-rc/typings/msg/kab.d.ts +0 -8
  991. package/blockly-rc/typings/msg/kbd-cyrl.d.ts +0 -8
  992. package/blockly-rc/typings/msg/km.d.ts +0 -8
  993. package/blockly-rc/typings/msg/kn.d.ts +0 -8
  994. package/blockly-rc/typings/msg/ko.d.ts +0 -8
  995. package/blockly-rc/typings/msg/ksh.d.ts +0 -8
  996. package/blockly-rc/typings/msg/ku-latn.d.ts +0 -8
  997. package/blockly-rc/typings/msg/ky.d.ts +0 -8
  998. package/blockly-rc/typings/msg/la.d.ts +0 -8
  999. package/blockly-rc/typings/msg/lb.d.ts +0 -8
  1000. package/blockly-rc/typings/msg/lki.d.ts +0 -8
  1001. package/blockly-rc/typings/msg/lo.d.ts +0 -8
  1002. package/blockly-rc/typings/msg/lrc.d.ts +0 -8
  1003. package/blockly-rc/typings/msg/lt.d.ts +0 -8
  1004. package/blockly-rc/typings/msg/lv.d.ts +0 -8
  1005. package/blockly-rc/typings/msg/mg.d.ts +0 -8
  1006. package/blockly-rc/typings/msg/mk.d.ts +0 -8
  1007. package/blockly-rc/typings/msg/ml.d.ts +0 -8
  1008. package/blockly-rc/typings/msg/mnw.d.ts +0 -8
  1009. package/blockly-rc/typings/msg/ms.d.ts +0 -8
  1010. package/blockly-rc/typings/msg/msg.d.ts +0 -440
  1011. package/blockly-rc/typings/msg/my.d.ts +0 -8
  1012. package/blockly-rc/typings/msg/mzn.d.ts +0 -8
  1013. package/blockly-rc/typings/msg/nb.d.ts +0 -8
  1014. package/blockly-rc/typings/msg/ne.d.ts +0 -8
  1015. package/blockly-rc/typings/msg/nl.d.ts +0 -8
  1016. package/blockly-rc/typings/msg/oc.d.ts +0 -8
  1017. package/blockly-rc/typings/msg/olo.d.ts +0 -8
  1018. package/blockly-rc/typings/msg/pa.d.ts +0 -8
  1019. package/blockly-rc/typings/msg/pl.d.ts +0 -8
  1020. package/blockly-rc/typings/msg/pms.d.ts +0 -8
  1021. package/blockly-rc/typings/msg/ps.d.ts +0 -8
  1022. package/blockly-rc/typings/msg/pt-br.d.ts +0 -8
  1023. package/blockly-rc/typings/msg/pt.d.ts +0 -8
  1024. package/blockly-rc/typings/msg/ro.d.ts +0 -8
  1025. package/blockly-rc/typings/msg/ru.d.ts +0 -8
  1026. package/blockly-rc/typings/msg/sc.d.ts +0 -8
  1027. package/blockly-rc/typings/msg/sco.d.ts +0 -8
  1028. package/blockly-rc/typings/msg/sd.d.ts +0 -8
  1029. package/blockly-rc/typings/msg/shn.d.ts +0 -8
  1030. package/blockly-rc/typings/msg/si.d.ts +0 -8
  1031. package/blockly-rc/typings/msg/sk.d.ts +0 -8
  1032. package/blockly-rc/typings/msg/skr-arab.d.ts +0 -8
  1033. package/blockly-rc/typings/msg/sl.d.ts +0 -8
  1034. package/blockly-rc/typings/msg/smn.d.ts +0 -8
  1035. package/blockly-rc/typings/msg/sq.d.ts +0 -8
  1036. package/blockly-rc/typings/msg/sr-latn.d.ts +0 -8
  1037. package/blockly-rc/typings/msg/sr.d.ts +0 -8
  1038. package/blockly-rc/typings/msg/sv.d.ts +0 -8
  1039. package/blockly-rc/typings/msg/sw.d.ts +0 -8
  1040. package/blockly-rc/typings/msg/ta.d.ts +0 -8
  1041. package/blockly-rc/typings/msg/tcy.d.ts +0 -8
  1042. package/blockly-rc/typings/msg/tdd.d.ts +0 -8
  1043. package/blockly-rc/typings/msg/te.d.ts +0 -8
  1044. package/blockly-rc/typings/msg/th.d.ts +0 -8
  1045. package/blockly-rc/typings/msg/ti.d.ts +0 -8
  1046. package/blockly-rc/typings/msg/tl.d.ts +0 -8
  1047. package/blockly-rc/typings/msg/tlh.d.ts +0 -8
  1048. package/blockly-rc/typings/msg/tr.d.ts +0 -8
  1049. package/blockly-rc/typings/msg/ug-arab.d.ts +0 -8
  1050. package/blockly-rc/typings/msg/uk.d.ts +0 -8
  1051. package/blockly-rc/typings/msg/ur.d.ts +0 -8
  1052. package/blockly-rc/typings/msg/uz.d.ts +0 -8
  1053. package/blockly-rc/typings/msg/vi.d.ts +0 -8
  1054. package/blockly-rc/typings/msg/xmf.d.ts +0 -8
  1055. package/blockly-rc/typings/msg/yo.d.ts +0 -8
  1056. package/blockly-rc/typings/msg/zgh.d.ts +0 -8
  1057. package/blockly-rc/typings/msg/zh-hans.d.ts +0 -8
  1058. package/blockly-rc/typings/msg/zh-hant.d.ts +0 -8
  1059. package/blockly-rc/typings/php.d.ts +0 -7
  1060. package/blockly-rc/typings/python.d.ts +0 -7
  1061. package/blockly-rc/typings/templates/blockly-header.template +0 -11
  1062. package/blockly-rc/typings/templates/blockly-interfaces.template +0 -83
  1063. package/blockly-rc/typings/templates/msg.template +0 -15
  1064. package/blockly-rc/typings/tsconfig.json +0 -23
  1065. package/temp-use-blockly-v12-rc.sh +0 -26
@@ -1,773 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2012 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
-
7
- // Former goog.module ID: Blockly.Variables
8
-
9
- import type {Block} from './block.js';
10
- import {Blocks} from './blocks.js';
11
- import * as dialog from './dialog.js';
12
- import {isVariableBackedParameterModel} from './interfaces/i_variable_backed_parameter_model.js';
13
- import {Msg} from './msg.js';
14
- import {isLegacyProcedureDefBlock} from './interfaces/i_legacy_procedure_blocks.js';
15
- import * as utilsXml from './utils/xml.js';
16
- import {IVariableModel, IVariableState} from './interfaces/i_variable_model.js';
17
- import type {Workspace} from './workspace.js';
18
- import type {WorkspaceSvg} from './workspace_svg.js';
19
-
20
- /**
21
- * String for use in the "custom" attribute of a category in toolbox XML.
22
- * This string indicates that the category should be dynamically populated with
23
- * variable blocks.
24
- * See also Blockly.Procedures.CATEGORY_NAME and
25
- * Blockly.VariablesDynamic.CATEGORY_NAME.
26
- */
27
- export const CATEGORY_NAME = 'VARIABLE';
28
-
29
- /**
30
- * Find all user-created variables that are in use in the workspace.
31
- * For use by generators.
32
- * To get a list of all variables on a workspace, including unused variables,
33
- * call Workspace.getAllVariables.
34
- *
35
- * @param ws The workspace to search for variables.
36
- * @returns Array of variable models.
37
- */
38
- export function allUsedVarModels(
39
- ws: Workspace,
40
- ): IVariableModel<IVariableState>[] {
41
- const blocks = ws.getAllBlocks(false);
42
- const variables = new Set<IVariableModel<IVariableState>>();
43
- // Iterate through every block and add each variable to the set.
44
- for (let i = 0; i < blocks.length; i++) {
45
- const blockVariables = blocks[i].getVarModels();
46
- if (blockVariables) {
47
- for (let j = 0; j < blockVariables.length; j++) {
48
- const variable = blockVariables[j];
49
- const id = variable.getId();
50
- if (id) {
51
- variables.add(variable);
52
- }
53
- }
54
- }
55
- }
56
- // Convert the set into a list.
57
- return Array.from(variables.values());
58
- }
59
-
60
- /**
61
- * Find all developer variables used by blocks in the workspace.
62
- * Developer variables are never shown to the user, but are declared as global
63
- * variables in the generated code.
64
- * To declare developer variables, define the getDeveloperVariables function on
65
- * your block and return a list of variable names.
66
- * For use by generators.
67
- *
68
- * @param workspace The workspace to search.
69
- * @returns A list of non-duplicated variable names.
70
- */
71
- export function allDeveloperVariables(workspace: Workspace): string[] {
72
- const blocks = workspace.getAllBlocks(false);
73
- const variables = new Set<string>();
74
- for (let i = 0, block; (block = blocks[i]); i++) {
75
- const getDeveloperVariables = block.getDeveloperVariables;
76
- if (getDeveloperVariables) {
77
- const devVars = getDeveloperVariables();
78
- for (let j = 0; j < devVars.length; j++) {
79
- variables.add(devVars[j]);
80
- }
81
- }
82
- }
83
- // Convert the set into a list.
84
- return Array.from(variables.values());
85
- }
86
-
87
- /**
88
- * Construct the elements (blocks and button) required by the flyout for the
89
- * variable category.
90
- *
91
- * @param workspace The workspace containing variables.
92
- * @returns Array of XML elements.
93
- */
94
- export function flyoutCategory(workspace: WorkspaceSvg): Element[] {
95
- let xmlList = new Array<Element>();
96
- const button = document.createElement('button');
97
- button.setAttribute('text', '%{BKY_NEW_VARIABLE}');
98
- button.setAttribute('callbackKey', 'CREATE_VARIABLE');
99
-
100
- workspace.registerButtonCallback('CREATE_VARIABLE', function (button) {
101
- createVariableButtonHandler(button.getTargetWorkspace());
102
- });
103
-
104
- xmlList.push(button);
105
-
106
- const blockList = flyoutCategoryBlocks(workspace);
107
- xmlList = xmlList.concat(blockList);
108
- return xmlList;
109
- }
110
-
111
- /**
112
- * Construct the blocks required by the flyout for the variable category.
113
- *
114
- * @param workspace The workspace containing variables.
115
- * @returns Array of XML block elements.
116
- */
117
- export function flyoutCategoryBlocks(workspace: Workspace): Element[] {
118
- const variableModelList = workspace.getVariablesOfType('');
119
-
120
- const xmlList = [];
121
- if (variableModelList.length > 0) {
122
- // New variables are added to the end of the variableModelList.
123
- const mostRecentVariable = variableModelList[variableModelList.length - 1];
124
- if (Blocks['variables_set']) {
125
- const block = utilsXml.createElement('block');
126
- block.setAttribute('type', 'variables_set');
127
- block.setAttribute('gap', Blocks['math_change'] ? '8' : '24');
128
- block.appendChild(generateVariableFieldDom(mostRecentVariable));
129
- xmlList.push(block);
130
- }
131
- if (Blocks['math_change']) {
132
- const block = utilsXml.createElement('block');
133
- block.setAttribute('type', 'math_change');
134
- block.setAttribute('gap', Blocks['variables_get'] ? '20' : '8');
135
- block.appendChild(generateVariableFieldDom(mostRecentVariable));
136
- const value = utilsXml.textToDom(
137
- '<value name="DELTA">' +
138
- '<shadow type="math_number">' +
139
- '<field name="NUM">1</field>' +
140
- '</shadow>' +
141
- '</value>',
142
- );
143
- block.appendChild(value);
144
- xmlList.push(block);
145
- }
146
-
147
- if (Blocks['variables_get']) {
148
- variableModelList.sort(compareByName);
149
- for (let i = 0, variable; (variable = variableModelList[i]); i++) {
150
- const block = utilsXml.createElement('block');
151
- block.setAttribute('type', 'variables_get');
152
- block.setAttribute('gap', '8');
153
- block.appendChild(generateVariableFieldDom(variable));
154
- xmlList.push(block);
155
- }
156
- }
157
- }
158
- return xmlList;
159
- }
160
-
161
- export const VAR_LETTER_OPTIONS = 'ijkmnopqrstuvwxyzabcdefgh';
162
-
163
- /**
164
- * Return a new variable name that is not yet being used. This will try to
165
- * generate single letter variable names in the range 'i' to 'z' to start with.
166
- * If no unique name is located it will try 'i' to 'z', 'a' to 'h',
167
- * then 'i2' to 'z2' etc. Skip 'l'.
168
- *
169
- * @param workspace The workspace to be unique in.
170
- * @returns New variable name.
171
- */
172
- export function generateUniqueName(workspace: Workspace): string {
173
- return TEST_ONLY.generateUniqueNameInternal(workspace);
174
- }
175
-
176
- /**
177
- * Private version of generateUniqueName for stubbing in tests.
178
- */
179
- function generateUniqueNameInternal(workspace: Workspace): string {
180
- return generateUniqueNameFromOptions(
181
- VAR_LETTER_OPTIONS.charAt(0),
182
- workspace.getAllVariableNames(),
183
- );
184
- }
185
-
186
- /**
187
- * Returns a unique name that is not present in the usedNames array. This
188
- * will try to generate single letter names in the range a - z (skip l). It
189
- * will start with the character passed to startChar.
190
- *
191
- * @param startChar The character to start the search at.
192
- * @param usedNames A list of all of the used names.
193
- * @returns A unique name that is not present in the usedNames array.
194
- */
195
- export function generateUniqueNameFromOptions(
196
- startChar: string,
197
- usedNames: string[],
198
- ): string {
199
- if (!usedNames.length) {
200
- return startChar;
201
- }
202
-
203
- const letters = VAR_LETTER_OPTIONS;
204
- let suffix = '';
205
- let letterIndex = letters.indexOf(startChar);
206
- let potName = startChar;
207
-
208
- // eslint-disable-next-line no-constant-condition
209
- while (true) {
210
- let inUse = false;
211
- for (let i = 0; i < usedNames.length; i++) {
212
- if (usedNames[i].toLowerCase() === potName) {
213
- inUse = true;
214
- break;
215
- }
216
- }
217
- if (!inUse) {
218
- break;
219
- }
220
-
221
- letterIndex++;
222
- if (letterIndex === letters.length) {
223
- // Reached the end of the character sequence so back to 'i'.
224
- letterIndex = 0;
225
- suffix = `${Number(suffix) + 1}`;
226
- }
227
- potName = letters.charAt(letterIndex) + suffix;
228
- }
229
- return potName;
230
- }
231
-
232
- /**
233
- * Handles "Create Variable" button in the default variables toolbox category.
234
- * It will prompt the user for a variable name, including re-prompts if a name
235
- * is already in use among the workspace's variables.
236
- *
237
- * Custom button handlers can delegate to this function, allowing variables
238
- * types and after-creation processing. More complex customization (e.g.,
239
- * prompting for variable type) is beyond the scope of this function.
240
- *
241
- * @param workspace The workspace on which to create the variable.
242
- * @param opt_callback A callback. It will be passed an acceptable new variable
243
- * name, or null if change is to be aborted (cancel button), or undefined if
244
- * an existing variable was chosen.
245
- * @param opt_type The type of the variable like 'int', 'string', or ''. This
246
- * will default to '', which is a specific type.
247
- */
248
- export function createVariableButtonHandler(
249
- workspace: Workspace,
250
- opt_callback?: (p1?: string | null) => void,
251
- opt_type?: string,
252
- ) {
253
- const type = opt_type || '';
254
- // This function needs to be named so it can be called recursively.
255
- function promptAndCheckWithAlert(defaultName: string) {
256
- promptName(Msg['NEW_VARIABLE_TITLE'], defaultName, function (text) {
257
- if (!text) {
258
- // User canceled prompt.
259
- if (opt_callback) opt_callback(null);
260
- return;
261
- }
262
-
263
- const existing = nameUsedWithAnyType(text, workspace);
264
- if (!existing) {
265
- // No conflict
266
- workspace.createVariable(text, type);
267
- if (opt_callback) opt_callback(text);
268
- return;
269
- }
270
-
271
- let msg;
272
- if (existing.getType() === type) {
273
- msg = Msg['VARIABLE_ALREADY_EXISTS'].replace('%1', existing.getName());
274
- } else {
275
- msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE'];
276
- msg = msg
277
- .replace('%1', existing.getName())
278
- .replace('%2', existing.getType());
279
- }
280
- dialog.alert(msg, function () {
281
- promptAndCheckWithAlert(text);
282
- });
283
- });
284
- }
285
- promptAndCheckWithAlert('');
286
- }
287
-
288
- /**
289
- * Opens a prompt that allows the user to enter a new name for a variable.
290
- * Triggers a rename if the new name is valid. Or re-prompts if there is a
291
- * collision.
292
- *
293
- * @param workspace The workspace on which to rename the variable.
294
- * @param variable Variable to rename.
295
- * @param opt_callback A callback. It will be passed an acceptable new variable
296
- * name, or null if change is to be aborted (cancel button), or undefined if
297
- * an existing variable was chosen.
298
- */
299
- export function renameVariable(
300
- workspace: Workspace,
301
- variable: IVariableModel<IVariableState>,
302
- opt_callback?: (p1?: string | null) => void,
303
- ) {
304
- // This function needs to be named so it can be called recursively.
305
- function promptAndCheckWithAlert(defaultName: string) {
306
- const promptText = Msg['RENAME_VARIABLE_TITLE'].replace(
307
- '%1',
308
- variable.getName(),
309
- );
310
- promptName(promptText, defaultName, function (newName) {
311
- if (!newName) {
312
- // User canceled prompt.
313
- if (opt_callback) opt_callback(null);
314
- return;
315
- }
316
-
317
- const existing = nameUsedWithOtherType(
318
- newName,
319
- variable.getType(),
320
- workspace,
321
- );
322
- const procedure = nameUsedWithConflictingParam(
323
- variable.getName(),
324
- newName,
325
- workspace,
326
- );
327
- if (!existing && !procedure) {
328
- // No conflict.
329
- workspace.renameVariableById(variable.getId(), newName);
330
- if (opt_callback) opt_callback(newName);
331
- return;
332
- }
333
-
334
- let msg = '';
335
- if (existing) {
336
- msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE']
337
- .replace('%1', existing.getName())
338
- .replace('%2', existing.getType());
339
- } else if (procedure) {
340
- msg = Msg['VARIABLE_ALREADY_EXISTS_FOR_A_PARAMETER']
341
- .replace('%1', newName)
342
- .replace('%2', procedure);
343
- }
344
- dialog.alert(msg, function () {
345
- promptAndCheckWithAlert(newName);
346
- });
347
- });
348
- }
349
- promptAndCheckWithAlert('');
350
- }
351
-
352
- /**
353
- * Prompt the user for a new variable name.
354
- *
355
- * @param promptText The string of the prompt.
356
- * @param defaultText The default value to show in the prompt's field.
357
- * @param callback A callback. It will be passed the new variable name, or null
358
- * if the user picked something illegal.
359
- */
360
- export function promptName(
361
- promptText: string,
362
- defaultText: string,
363
- callback: (p1: string | null) => void,
364
- ) {
365
- dialog.prompt(promptText, defaultText, function (newVar) {
366
- // Merge runs of whitespace. Strip leading and trailing whitespace.
367
- // Beyond this, all names are legal.
368
- if (newVar) {
369
- newVar = newVar.replace(/[\s\xa0]+/g, ' ').trim();
370
- if (newVar === Msg['RENAME_VARIABLE'] || newVar === Msg['NEW_VARIABLE']) {
371
- // Ok, not ALL names are legal...
372
- newVar = null;
373
- }
374
- }
375
- callback(newVar);
376
- });
377
- }
378
- /**
379
- * Check whether there exists a variable with the given name but a different
380
- * type.
381
- *
382
- * @param name The name to search for.
383
- * @param type The type to exclude from the search.
384
- * @param workspace The workspace to search for the variable.
385
- * @returns The variable with the given name and a different type, or null if
386
- * none was found.
387
- */
388
- function nameUsedWithOtherType(
389
- name: string,
390
- type: string,
391
- workspace: Workspace,
392
- ): IVariableModel<IVariableState> | null {
393
- const allVariables = workspace.getVariableMap().getAllVariables();
394
-
395
- name = name.toLowerCase();
396
- for (let i = 0, variable; (variable = allVariables[i]); i++) {
397
- if (
398
- variable.getName().toLowerCase() === name &&
399
- variable.getType() !== type
400
- ) {
401
- return variable;
402
- }
403
- }
404
- return null;
405
- }
406
-
407
- /**
408
- * Check whether there exists a variable with the given name of any type.
409
- *
410
- * @param name The name to search for.
411
- * @param workspace The workspace to search for the variable.
412
- * @returns The variable with the given name, or null if none was found.
413
- */
414
- export function nameUsedWithAnyType(
415
- name: string,
416
- workspace: Workspace,
417
- ): IVariableModel<IVariableState> | null {
418
- const allVariables = workspace.getVariableMap().getAllVariables();
419
-
420
- name = name.toLowerCase();
421
- for (let i = 0, variable; (variable = allVariables[i]); i++) {
422
- if (variable.getName().toLowerCase() === name) {
423
- return variable;
424
- }
425
- }
426
- return null;
427
- }
428
-
429
- /**
430
- * Returns the name of the procedure with a conflicting parameter name, or null
431
- * if one does not exist.
432
- *
433
- * This checks the procedure map if it contains models, and the legacy procedure
434
- * blocks otherwise.
435
- *
436
- * @param oldName The old name of the variable.
437
- * @param newName The proposed name of the variable.
438
- * @param workspace The workspace to search for conflicting parameters.
439
- * @internal
440
- */
441
- export function nameUsedWithConflictingParam(
442
- oldName: string,
443
- newName: string,
444
- workspace: Workspace,
445
- ): string | null {
446
- return workspace.getProcedureMap().getProcedures().length
447
- ? checkForConflictingParamWithProcedureModels(oldName, newName, workspace)
448
- : checkForConflictingParamWithLegacyProcedures(oldName, newName, workspace);
449
- }
450
-
451
- /**
452
- * Returns the name of the procedure model with a conflicting param name, or
453
- * null if one does not exist.
454
- */
455
- function checkForConflictingParamWithProcedureModels(
456
- oldName: string,
457
- newName: string,
458
- workspace: Workspace,
459
- ): string | null {
460
- oldName = oldName.toLowerCase();
461
- newName = newName.toLowerCase();
462
-
463
- const procedures = workspace.getProcedureMap().getProcedures();
464
- for (const procedure of procedures) {
465
- const params = procedure
466
- .getParameters()
467
- .filter(isVariableBackedParameterModel)
468
- .map((param) => param.getVariableModel().getName());
469
- if (!params) continue;
470
- const procHasOld = params.some((param) => param.toLowerCase() === oldName);
471
- const procHasNew = params.some((param) => param.toLowerCase() === newName);
472
- if (procHasOld && procHasNew) return procedure.getName();
473
- }
474
- return null;
475
- }
476
-
477
- /**
478
- * Returns the name of the procedure block with a conflicting param name, or
479
- * null if one does not exist.
480
- */
481
- function checkForConflictingParamWithLegacyProcedures(
482
- oldName: string,
483
- newName: string,
484
- workspace: Workspace,
485
- ): string | null {
486
- oldName = oldName.toLowerCase();
487
- newName = newName.toLowerCase();
488
-
489
- const blocks = workspace.getAllBlocks(false);
490
- for (const block of blocks) {
491
- if (!isLegacyProcedureDefBlock(block)) continue;
492
- const def = block.getProcedureDef();
493
- const params = def[1];
494
- const blockHasOld = params.some((param) => param.toLowerCase() === oldName);
495
- const blockHasNew = params.some((param) => param.toLowerCase() === newName);
496
- if (blockHasOld && blockHasNew) return def[0];
497
- }
498
- return null;
499
- }
500
-
501
- /**
502
- * Generate DOM objects representing a variable field.
503
- *
504
- * @param variableModel The variable model to represent.
505
- * @returns The generated DOM.
506
- */
507
- export function generateVariableFieldDom(
508
- variableModel: IVariableModel<IVariableState>,
509
- ): Element {
510
- /* Generates the following XML:
511
- * <field name="VAR" id="goKTKmYJ8DhVHpruv" variabletype="int">foo</field>
512
- */
513
- const field = utilsXml.createElement('field');
514
- field.setAttribute('name', 'VAR');
515
- field.setAttribute('id', variableModel.getId());
516
- field.setAttribute('variabletype', variableModel.getType());
517
- const name = utilsXml.createTextNode(variableModel.getName());
518
- field.appendChild(name);
519
- return field;
520
- }
521
-
522
- /**
523
- * Helper function to look up or create a variable on the given workspace.
524
- * If no variable exists, creates and returns it.
525
- *
526
- * @param workspace The workspace to search for the variable. It may be a
527
- * flyout workspace or main workspace.
528
- * @param id The ID to use to look up or create the variable, or null.
529
- * @param opt_name The string to use to look up or create the variable.
530
- * @param opt_type The type to use to look up or create the variable.
531
- * @returns The variable corresponding to the given ID or name + type
532
- * combination.
533
- */
534
- export function getOrCreateVariablePackage(
535
- workspace: Workspace,
536
- id: string | null,
537
- opt_name?: string,
538
- opt_type?: string,
539
- ): IVariableModel<IVariableState> {
540
- let variable = getVariable(workspace, id, opt_name, opt_type);
541
- if (!variable) {
542
- variable = createVariable(workspace, id, opt_name, opt_type);
543
- }
544
- return variable;
545
- }
546
-
547
- /**
548
- * Look up a variable on the given workspace.
549
- * Always looks in the main workspace before looking in the flyout workspace.
550
- * Always prefers lookup by ID to lookup by name + type.
551
- *
552
- * @param workspace The workspace to search for the variable. It may be a
553
- * flyout workspace or main workspace.
554
- * @param id The ID to use to look up the variable, or null.
555
- * @param opt_name The string to use to look up the variable.
556
- * Only used if lookup by ID fails.
557
- * @param opt_type The type to use to look up the variable.
558
- * Only used if lookup by ID fails.
559
- * @returns The variable corresponding to the given ID or name + type
560
- * combination, or null if not found.
561
- */
562
- export function getVariable(
563
- workspace: Workspace,
564
- id: string | null,
565
- opt_name?: string,
566
- opt_type?: string,
567
- ): IVariableModel<IVariableState> | null {
568
- const potentialVariableMap = workspace.getPotentialVariableMap();
569
- let variable = null;
570
- // Try to just get the variable, by ID if possible.
571
- if (id) {
572
- // Look in the real variable map before checking the potential variable map.
573
- variable = workspace.getVariableById(id);
574
- if (!variable && potentialVariableMap) {
575
- variable = potentialVariableMap.getVariableById(id);
576
- }
577
- if (variable) {
578
- return variable;
579
- }
580
- }
581
- // If there was no ID, or there was an ID but it didn't match any variables,
582
- // look up by name and type.
583
- if (opt_name) {
584
- if (opt_type === undefined) {
585
- throw Error('Tried to look up a variable by name without a type');
586
- }
587
- // Otherwise look up by name and type.
588
- variable = workspace.getVariable(opt_name, opt_type);
589
- if (!variable && potentialVariableMap) {
590
- variable = potentialVariableMap.getVariable(opt_name, opt_type);
591
- }
592
- }
593
- return variable;
594
- }
595
-
596
- /**
597
- * Helper function to create a variable on the given workspace.
598
- *
599
- * @param workspace The workspace in which to create the variable. It may be a
600
- * flyout workspace or main workspace.
601
- * @param id The ID to use to create the variable, or null.
602
- * @param opt_name The string to use to create the variable.
603
- * @param opt_type The type to use to create the variable.
604
- * @returns The variable corresponding to the given ID or name + type
605
- * combination.
606
- */
607
- function createVariable(
608
- workspace: Workspace,
609
- id: string | null,
610
- opt_name?: string,
611
- opt_type?: string,
612
- ): IVariableModel<IVariableState> {
613
- const potentialVariableMap = workspace.getPotentialVariableMap();
614
- // Variables without names get uniquely named for this workspace.
615
- if (!opt_name) {
616
- const ws = workspace.isFlyout
617
- ? (workspace as WorkspaceSvg).targetWorkspace
618
- : workspace;
619
- opt_name = generateUniqueName(ws!);
620
- }
621
-
622
- // Create a potential variable if in the flyout.
623
- let variable = null;
624
- if (potentialVariableMap) {
625
- variable = potentialVariableMap.createVariable(
626
- opt_name,
627
- opt_type,
628
- id ?? undefined,
629
- );
630
- } else {
631
- // In the main workspace, create a real variable.
632
- variable = workspace.createVariable(opt_name, opt_type, id);
633
- }
634
- return variable;
635
- }
636
-
637
- /**
638
- * Helper function to get the list of variables that have been added to the
639
- * workspace after adding a new block, using the given list of variables that
640
- * were in the workspace before the new block was added.
641
- *
642
- * @param workspace The workspace to inspect.
643
- * @param originalVariables The array of variables that existed in the workspace
644
- * before adding the new block.
645
- * @returns The new array of variables that were freshly added to the workspace
646
- * after creating the new block, or [] if no new variables were added to the
647
- * workspace.
648
- * @internal
649
- */
650
- export function getAddedVariables(
651
- workspace: Workspace,
652
- originalVariables: IVariableModel<IVariableState>[],
653
- ): IVariableModel<IVariableState>[] {
654
- const allCurrentVariables = workspace.getAllVariables();
655
- const addedVariables = [];
656
- if (originalVariables.length !== allCurrentVariables.length) {
657
- for (let i = 0; i < allCurrentVariables.length; i++) {
658
- const variable = allCurrentVariables[i];
659
- // For any variable that is present in allCurrentVariables but not
660
- // present in originalVariables, add the variable to addedVariables.
661
- if (!originalVariables.includes(variable)) {
662
- addedVariables.push(variable);
663
- }
664
- }
665
- }
666
- return addedVariables;
667
- }
668
-
669
- /**
670
- * A custom compare function for the VariableModel objects.
671
- *
672
- * @param var1 First variable to compare.
673
- * @param var2 Second variable to compare.
674
- * @returns -1 if name of var1 is less than name of var2, 0 if equal, and 1 if
675
- * greater.
676
- * @internal
677
- */
678
- export function compareByName(
679
- var1: IVariableModel<IVariableState>,
680
- var2: IVariableModel<IVariableState>,
681
- ): number {
682
- return var1
683
- .getName()
684
- .localeCompare(var2.getName(), undefined, {sensitivity: 'base'});
685
- }
686
-
687
- /**
688
- * Find all the uses of a named variable.
689
- *
690
- * @param workspace The workspace to search for the variable.
691
- * @param id ID of the variable to find.
692
- * @returns Array of block usages.
693
- */
694
- export function getVariableUsesById(workspace: Workspace, id: string): Block[] {
695
- const uses = [];
696
- const blocks = workspace.getAllBlocks(false);
697
- // Iterate through every block and check the name.
698
- for (let i = 0; i < blocks.length; i++) {
699
- const blockVariables = blocks[i].getVarModels();
700
- if (blockVariables) {
701
- for (let j = 0; j < blockVariables.length; j++) {
702
- if (blockVariables[j].getId() === id) {
703
- uses.push(blocks[i]);
704
- }
705
- }
706
- }
707
- }
708
- return uses;
709
- }
710
-
711
- /**
712
- * Delete a variable and all of its uses from the given workspace. May prompt
713
- * the user for confirmation.
714
- *
715
- * @param workspace The workspace from which to delete the variable.
716
- * @param variable The variable to delete.
717
- * @param triggeringBlock The block from which this deletion was triggered, if
718
- * any. Used to exclude it from checking and warning about blocks
719
- * referencing the variable being deleted.
720
- */
721
- export function deleteVariable(
722
- workspace: Workspace,
723
- variable: IVariableModel<IVariableState>,
724
- triggeringBlock?: Block,
725
- ) {
726
- // Check whether this variable is a function parameter before deleting.
727
- const variableName = variable.getName();
728
- const uses = getVariableUsesById(workspace, variable.getId());
729
- for (let i = uses.length - 1; i >= 0; i--) {
730
- const block = uses[i];
731
- if (
732
- block.type === 'procedures_defnoreturn' ||
733
- block.type === 'procedures_defreturn'
734
- ) {
735
- const procedureName = String(block.getFieldValue('NAME'));
736
- const deleteText = Msg['CANNOT_DELETE_VARIABLE_PROCEDURE']
737
- .replace('%1', variableName)
738
- .replace('%2', procedureName);
739
- dialog.alert(deleteText);
740
- return;
741
- }
742
- if (block === triggeringBlock) {
743
- uses.splice(i, 1);
744
- }
745
- }
746
-
747
- if ((triggeringBlock && uses.length) || uses.length > 1) {
748
- // Confirm before deleting multiple blocks.
749
- const confirmText = Msg['DELETE_VARIABLE_CONFIRMATION']
750
- .replace(
751
- '%1',
752
- String(
753
- uses.length +
754
- (triggeringBlock && !triggeringBlock.workspace.isFlyout ? 1 : 0),
755
- ),
756
- )
757
- .replace('%2', variableName);
758
- dialog.confirm(confirmText, (ok) => {
759
- if (ok && variable) {
760
- workspace.getVariableMap().deleteVariable(variable);
761
- }
762
- });
763
- } else {
764
- // No confirmation necessary when the block that triggered the deletion is
765
- // the only block referencing this variable or if only one block referencing
766
- // this variable exists and the deletion was triggered programmatically.
767
- workspace.getVariableMap().deleteVariable(variable);
768
- }
769
- }
770
-
771
- export const TEST_ONLY = {
772
- generateUniqueNameInternal,
773
- };