nodeskini 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklySkini/archive/blocklyControleur.js +87 -0
- package/blocklySkini/archive/blocklySkini.js +84 -0
- package/blocklySkini/archive/blocklyhop.js +75 -0
- package/blocklySkini/archive/clientControleurBlocly.js +170 -0
- package/blocklySkini/archive/index.html +76 -0
- package/blocklySkini/archive/testHHsuspend.txt +89 -0
- package/blocklySkini/archive/testHHtrap.txt +262 -0
- package/blocklySkini/archive/testOrchestration.txt +177 -0
- package/blocklySkini/archive/testOrchestration.xml +447 -0
- package/blocklySkini/archive/testOrchestration2.xml +456 -0
- package/blocklySkini/blockly/README.md +77 -0
- package/blocklySkini/blockly/blockly.d.ts +21480 -0
- package/blocklySkini/blockly/blockly.js +25 -0
- package/blocklySkini/blockly/blockly.min.js +2188 -0
- package/blocklySkini/blockly/blockly_compressed.js +1455 -0
- package/blocklySkini/blockly/blockly_compressed.js.map +1 -0
- package/blocklySkini/blockly/blocks/colour.js +122 -0
- package/blocklySkini/blockly/blocks/lists.js +862 -0
- package/blocklySkini/blockly/blocks/logic.js +635 -0
- package/blocklySkini/blockly/blocks/loops.js +357 -0
- package/blocklySkini/blockly/blocks/math.js +566 -0
- package/blocklySkini/blockly/blocks/procedures.js +1072 -0
- package/blocklySkini/blockly/blocks/text.js +923 -0
- package/blocklySkini/blockly/blocks/variables.js +163 -0
- package/blocklySkini/blockly/blocks/variables_dynamic.js +180 -0
- package/blocklySkini/blockly/blocks.d.ts +15 -0
- package/blocklySkini/blockly/blocks.js +27 -0
- package/blocklySkini/blockly/blocks_compressed.js +182 -0
- package/blocklySkini/blockly/blocks_compressed.js.map +1 -0
- package/blocklySkini/blockly/browser.js +36 -0
- package/blocklySkini/blockly/core/block.js +2010 -0
- package/blocklySkini/blockly/core/block_animations.js +203 -0
- package/blocklySkini/blockly/core/block_drag_surface.js +212 -0
- package/blocklySkini/blockly/core/block_dragger.js +378 -0
- package/blocklySkini/blockly/core/block_events.js +548 -0
- package/blocklySkini/blockly/core/block_svg.js +1763 -0
- package/blocklySkini/blockly/core/blockly.js +674 -0
- package/blocklySkini/blockly/core/blocks.js +23 -0
- package/blocklySkini/blockly/core/bubble.js +880 -0
- package/blocklySkini/blockly/core/bubble_dragger.js +274 -0
- package/blocklySkini/blockly/core/comment.js +439 -0
- package/blocklySkini/blockly/core/components/component.js +554 -0
- package/blocklySkini/blockly/core/components/tree/basenode.js +895 -0
- package/blocklySkini/blockly/core/components/tree/treecontrol.js +332 -0
- package/blocklySkini/blockly/core/components/tree/treenode.js +172 -0
- package/blocklySkini/blockly/core/connection.js +682 -0
- package/blocklySkini/blockly/core/connection_checker.js +285 -0
- package/blocklySkini/blockly/core/connection_db.js +295 -0
- package/blocklySkini/blockly/core/constants.js +277 -0
- package/blocklySkini/blockly/core/contextmenu.js +307 -0
- package/blocklySkini/blockly/core/contextmenu_items.js +534 -0
- package/blocklySkini/blockly/core/contextmenu_registry.js +165 -0
- package/blocklySkini/blockly/core/css.js +549 -0
- package/blocklySkini/blockly/core/dropdowndiv.js +776 -0
- package/blocklySkini/blockly/core/events.js +387 -0
- package/blocklySkini/blockly/core/events_abstract.js +106 -0
- package/blocklySkini/blockly/core/extensions.js +450 -0
- package/blocklySkini/blockly/core/field.js +1162 -0
- package/blocklySkini/blockly/core/field_angle.js +562 -0
- package/blocklySkini/blockly/core/field_checkbox.js +220 -0
- package/blocklySkini/blockly/core/field_colour.js +664 -0
- package/blocklySkini/blockly/core/field_dropdown.js +760 -0
- package/blocklySkini/blockly/core/field_image.js +286 -0
- package/blocklySkini/blockly/core/field_label.js +130 -0
- package/blocklySkini/blockly/core/field_label_serializable.js +69 -0
- package/blocklySkini/blockly/core/field_multilineinput.js +299 -0
- package/blocklySkini/blockly/core/field_number.js +317 -0
- package/blocklySkini/blockly/core/field_registry.js +66 -0
- package/blocklySkini/blockly/core/field_textinput.js +616 -0
- package/blocklySkini/blockly/core/field_variable.js +463 -0
- package/blocklySkini/blockly/core/flyout_base.js +1071 -0
- package/blocklySkini/blockly/core/flyout_button.js +325 -0
- package/blocklySkini/blockly/core/flyout_dragger.js +76 -0
- package/blocklySkini/blockly/core/flyout_horizontal.js +388 -0
- package/blocklySkini/blockly/core/flyout_vertical.js +397 -0
- package/blocklySkini/blockly/core/generator.js +482 -0
- package/blocklySkini/blockly/core/gesture.js +993 -0
- package/blocklySkini/blockly/core/grid.js +222 -0
- package/blocklySkini/blockly/core/icon.js +206 -0
- package/blocklySkini/blockly/core/inject.js +487 -0
- package/blocklySkini/blockly/core/input.js +296 -0
- package/blocklySkini/blockly/core/insertion_marker_manager.js +700 -0
- package/blocklySkini/blockly/core/interfaces/i_accessibility.js +72 -0
- package/blocklySkini/blockly/core/interfaces/i_bounded_element.js +31 -0
- package/blocklySkini/blockly/core/interfaces/i_bubble.js +83 -0
- package/blocklySkini/blockly/core/interfaces/i_connection_checker.js +94 -0
- package/blocklySkini/blockly/core/interfaces/i_contextmenu.js +26 -0
- package/blocklySkini/blockly/core/interfaces/i_copyable.js +40 -0
- package/blocklySkini/blockly/core/interfaces/i_deletable.js +27 -0
- package/blocklySkini/blockly/core/interfaces/i_deletearea.js +28 -0
- package/blocklySkini/blockly/core/interfaces/i_flyout.js +178 -0
- package/blocklySkini/blockly/core/interfaces/i_movable.js +27 -0
- package/blocklySkini/blockly/core/interfaces/i_registrable.js +22 -0
- package/blocklySkini/blockly/core/interfaces/i_registrable_field.js +31 -0
- package/blocklySkini/blockly/core/interfaces/i_selectable.js +43 -0
- package/blocklySkini/blockly/core/interfaces/i_styleable.js +33 -0
- package/blocklySkini/blockly/core/interfaces/i_toolbox.js +131 -0
- package/blocklySkini/blockly/core/interfaces/i_toolbox_item.js +148 -0
- package/blocklySkini/blockly/core/keyboard_nav/action.js +26 -0
- package/blocklySkini/blockly/core/keyboard_nav/ast_node.js +684 -0
- package/blocklySkini/blockly/core/keyboard_nav/basic_cursor.js +208 -0
- package/blocklySkini/blockly/core/keyboard_nav/cursor.js +170 -0
- package/blocklySkini/blockly/core/keyboard_nav/flyout_cursor.js +106 -0
- package/blocklySkini/blockly/core/keyboard_nav/key_map.js +190 -0
- package/blocklySkini/blockly/core/keyboard_nav/marker.js +120 -0
- package/blocklySkini/blockly/core/keyboard_nav/navigation.js +1084 -0
- package/blocklySkini/blockly/core/keyboard_nav/tab_navigate_cursor.js +48 -0
- package/blocklySkini/blockly/core/marker_manager.js +183 -0
- package/blocklySkini/blockly/core/menu.js +465 -0
- package/blocklySkini/blockly/core/menuitem.js +280 -0
- package/blocklySkini/blockly/core/msg.js +31 -0
- package/blocklySkini/blockly/core/mutator.js +555 -0
- package/blocklySkini/blockly/core/names.js +186 -0
- package/blocklySkini/blockly/core/options.js +365 -0
- package/blocklySkini/blockly/core/procedures.js +404 -0
- package/blocklySkini/blockly/core/registry.js +265 -0
- package/blocklySkini/blockly/core/rendered_connection.js +565 -0
- package/blocklySkini/blockly/core/renderers/common/block_rendering.js +81 -0
- package/blocklySkini/blockly/core/renderers/common/constants.js +1256 -0
- package/blocklySkini/blockly/core/renderers/common/debugger.js +431 -0
- package/blocklySkini/blockly/core/renderers/common/drawer.js +468 -0
- package/blocklySkini/blockly/core/renderers/common/i_path_object.js +151 -0
- package/blocklySkini/blockly/core/renderers/common/info.js +775 -0
- package/blocklySkini/blockly/core/renderers/common/marker_svg.js +687 -0
- package/blocklySkini/blockly/core/renderers/common/path_object.js +279 -0
- package/blocklySkini/blockly/core/renderers/common/renderer.js +301 -0
- package/blocklySkini/blockly/core/renderers/geras/constants.js +64 -0
- package/blocklySkini/blockly/core/renderers/geras/drawer.js +205 -0
- package/blocklySkini/blockly/core/renderers/geras/highlight_constants.js +311 -0
- package/blocklySkini/blockly/core/renderers/geras/highlighter.js +256 -0
- package/blocklySkini/blockly/core/renderers/geras/info.js +483 -0
- package/blocklySkini/blockly/core/renderers/geras/measurables/inputs.js +67 -0
- package/blocklySkini/blockly/core/renderers/geras/path_object.js +177 -0
- package/blocklySkini/blockly/core/renderers/geras/renderer.js +138 -0
- package/blocklySkini/blockly/core/renderers/measurables/base.js +44 -0
- package/blocklySkini/blockly/core/renderers/measurables/connections.js +114 -0
- package/blocklySkini/blockly/core/renderers/measurables/inputs.js +160 -0
- package/blocklySkini/blockly/core/renderers/measurables/row_elements.js +185 -0
- package/blocklySkini/blockly/core/renderers/measurables/rows.js +532 -0
- package/blocklySkini/blockly/core/renderers/measurables/types.js +349 -0
- package/blocklySkini/blockly/core/renderers/minimalist/constants.js +29 -0
- package/blocklySkini/blockly/core/renderers/minimalist/drawer.js +32 -0
- package/blocklySkini/blockly/core/renderers/minimalist/info.js +45 -0
- package/blocklySkini/blockly/core/renderers/minimalist/renderer.js +70 -0
- package/blocklySkini/blockly/core/renderers/thrasos/info.js +338 -0
- package/blocklySkini/blockly/core/renderers/thrasos/renderer.js +45 -0
- package/blocklySkini/blockly/core/renderers/zelos/constants.js +1002 -0
- package/blocklySkini/blockly/core/renderers/zelos/drawer.js +233 -0
- package/blocklySkini/blockly/core/renderers/zelos/info.js +587 -0
- package/blocklySkini/blockly/core/renderers/zelos/marker_svg.js +148 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/inputs.js +47 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/row_elements.js +37 -0
- package/blocklySkini/blockly/core/renderers/zelos/measurables/rows.js +108 -0
- package/blocklySkini/blockly/core/renderers/zelos/path_object.js +244 -0
- package/blocklySkini/blockly/core/renderers/zelos/renderer.js +130 -0
- package/blocklySkini/blockly/core/requires.js +84 -0
- package/blocklySkini/blockly/core/scrollbar.js +880 -0
- package/blocklySkini/blockly/core/theme/classic.js +87 -0
- package/blocklySkini/blockly/core/theme/dark.js +33 -0
- package/blocklySkini/blockly/core/theme/deuteranopia.js +104 -0
- package/blocklySkini/blockly/core/theme/highcontrast.js +119 -0
- package/blocklySkini/blockly/core/theme/modern.js +108 -0
- package/blocklySkini/blockly/core/theme/tritanopia.js +103 -0
- package/blocklySkini/blockly/core/theme/zelos.js +106 -0
- package/blocklySkini/blockly/core/theme.js +236 -0
- package/blocklySkini/blockly/core/theme_manager.js +197 -0
- package/blocklySkini/blockly/core/toolbox/category.js +690 -0
- package/blocklySkini/blockly/core/toolbox/collapsible_category.js +294 -0
- package/blocklySkini/blockly/core/toolbox/separator.js +123 -0
- package/blocklySkini/blockly/core/toolbox/toolbox.js +984 -0
- package/blocklySkini/blockly/core/toolbox/toolbox_item.js +145 -0
- package/blocklySkini/blockly/core/toolbox.js +943 -0
- package/blocklySkini/blockly/core/tooltip.js +387 -0
- package/blocklySkini/blockly/core/touch.js +255 -0
- package/blocklySkini/blockly/core/touch_gesture.js +325 -0
- package/blocklySkini/blockly/core/trashcan.js +661 -0
- package/blocklySkini/blockly/core/ui_events.js +85 -0
- package/blocklySkini/blockly/core/utils/aria.js +167 -0
- package/blocklySkini/blockly/core/utils/colour.js +208 -0
- package/blocklySkini/blockly/core/utils/coordinate.js +125 -0
- package/blocklySkini/blockly/core/utils/deprecation.js +34 -0
- package/blocklySkini/blockly/core/utils/dom.js +391 -0
- package/blocklySkini/blockly/core/utils/global.js +37 -0
- package/blocklySkini/blockly/core/utils/idgenerator.js +33 -0
- package/blocklySkini/blockly/core/utils/keycodes.js +164 -0
- package/blocklySkini/blockly/core/utils/math.js +56 -0
- package/blocklySkini/blockly/core/utils/metrics.js +124 -0
- package/blocklySkini/blockly/core/utils/object.js +73 -0
- package/blocklySkini/blockly/core/utils/rect.js +54 -0
- package/blocklySkini/blockly/core/utils/size.js +58 -0
- package/blocklySkini/blockly/core/utils/string.js +284 -0
- package/blocklySkini/blockly/core/utils/style.js +281 -0
- package/blocklySkini/blockly/core/utils/svg.js +181 -0
- package/blocklySkini/blockly/core/utils/svg_paths.js +142 -0
- package/blocklySkini/blockly/core/utils/toolbox.js +401 -0
- package/blocklySkini/blockly/core/utils/useragent.js +110 -0
- package/blocklySkini/blockly/core/utils/xml.js +79 -0
- package/blocklySkini/blockly/core/utils.js +652 -0
- package/blocklySkini/blockly/core/variable_events.js +248 -0
- package/blocklySkini/blockly/core/variable_map.js +414 -0
- package/blocklySkini/blockly/core/variable_model.js +95 -0
- package/blocklySkini/blockly/core/variables.js +571 -0
- package/blocklySkini/blockly/core/variables_dynamic.js +100 -0
- package/blocklySkini/blockly/core/warning.js +200 -0
- package/blocklySkini/blockly/core/widgetdiv.js +241 -0
- package/blocklySkini/blockly/core/workspace.js +786 -0
- package/blocklySkini/blockly/core/workspace_audio.js +153 -0
- package/blocklySkini/blockly/core/workspace_comment.js +373 -0
- package/blocklySkini/blockly/core/workspace_comment_render_svg.js +461 -0
- package/blocklySkini/blockly/core/workspace_comment_svg.js +701 -0
- package/blocklySkini/blockly/core/workspace_drag_surface_svg.js +176 -0
- package/blocklySkini/blockly/core/workspace_dragger.js +85 -0
- package/blocklySkini/blockly/core/workspace_events.js +93 -0
- package/blocklySkini/blockly/core/workspace_svg.js +2661 -0
- package/blocklySkini/blockly/core/ws_comment_events.js +417 -0
- package/blocklySkini/blockly/core/xml.js +827 -0
- package/blocklySkini/blockly/core/zoom_controls.js +449 -0
- package/blocklySkini/blockly/core-browser.js +34 -0
- package/blocklySkini/blockly/core.d.ts +15 -0
- package/blocklySkini/blockly/core.js +38 -0
- package/blocklySkini/blockly/dart.d.ts +15 -0
- package/blocklySkini/blockly/dart.js +27 -0
- package/blocklySkini/blockly/dart_compressed.js +114 -0
- package/blocklySkini/blockly/dart_compressed.js.map +1 -0
- package/blocklySkini/blockly/generators/dart/colour.js +114 -0
- package/blocklySkini/blockly/generators/dart/lists.js +447 -0
- package/blocklySkini/blockly/generators/dart/logic.js +127 -0
- package/blocklySkini/blockly/generators/dart/loops.js +169 -0
- package/blocklySkini/blockly/generators/dart/math.js +485 -0
- package/blocklySkini/blockly/generators/dart/procedures.js +111 -0
- package/blocklySkini/blockly/generators/dart/text.js +339 -0
- package/blocklySkini/blockly/generators/dart/variables.js +32 -0
- package/blocklySkini/blockly/generators/dart/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/dart.js +290 -0
- package/blocklySkini/blockly/generators/javascript/colour.js +89 -0
- package/blocklySkini/blockly/generators/javascript/lists.js +388 -0
- package/blocklySkini/blockly/generators/javascript/logic.js +129 -0
- package/blocklySkini/blockly/generators/javascript/loops.js +184 -0
- package/blocklySkini/blockly/generators/javascript/math.js +409 -0
- package/blocklySkini/blockly/generators/javascript/procedures.js +113 -0
- package/blocklySkini/blockly/generators/javascript/text.js +367 -0
- package/blocklySkini/blockly/generators/javascript/variables.js +32 -0
- package/blocklySkini/blockly/generators/javascript/variables_dynamic.js +23 -0
- package/blocklySkini/blockly/generators/javascript.js +317 -0
- package/blocklySkini/blockly/generators/lua/colour.js +76 -0
- package/blocklySkini/blockly/generators/lua/lists.js +368 -0
- package/blocklySkini/blockly/generators/lua/logic.js +127 -0
- package/blocklySkini/blockly/generators/lua/loops.js +173 -0
- package/blocklySkini/blockly/generators/lua/math.js +423 -0
- package/blocklySkini/blockly/generators/lua/procedures.js +113 -0
- package/blocklySkini/blockly/generators/lua/text.js +353 -0
- package/blocklySkini/blockly/generators/lua/variables.js +32 -0
- package/blocklySkini/blockly/generators/lua/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/lua.js +198 -0
- package/blocklySkini/blockly/generators/php/colour.js +91 -0
- package/blocklySkini/blockly/generators/php/lists.js +498 -0
- package/blocklySkini/blockly/generators/php/logic.js +128 -0
- package/blocklySkini/blockly/generators/php/loops.js +170 -0
- package/blocklySkini/blockly/generators/php/math.js +370 -0
- package/blocklySkini/blockly/generators/php/procedures.js +132 -0
- package/blocklySkini/blockly/generators/php/text.js +271 -0
- package/blocklySkini/blockly/generators/php/variables.js +32 -0
- package/blocklySkini/blockly/generators/php/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/php.js +318 -0
- package/blocklySkini/blockly/generators/python/colour.js +72 -0
- package/blocklySkini/blockly/generators/python/lists.js +349 -0
- package/blocklySkini/blockly/generators/python/logic.js +127 -0
- package/blocklySkini/blockly/generators/python/loops.js +214 -0
- package/blocklySkini/blockly/generators/python/math.js +385 -0
- package/blocklySkini/blockly/generators/python/procedures.js +134 -0
- package/blocklySkini/blockly/generators/python/text.js +293 -0
- package/blocklySkini/blockly/generators/python/variables.js +32 -0
- package/blocklySkini/blockly/generators/python/variables_dynamic.js +21 -0
- package/blocklySkini/blockly/generators/python.js +322 -0
- package/blocklySkini/blockly/index.d.ts +22 -0
- package/blocklySkini/blockly/index.js +24 -0
- package/blocklySkini/blockly/javascript.d.ts +15 -0
- package/blocklySkini/blockly/javascript.js +27 -0
- package/blocklySkini/blockly/javascript_compressed.js +115 -0
- package/blocklySkini/blockly/javascript_compressed.js.map +1 -0
- package/blocklySkini/blockly/lua.d.ts +15 -0
- package/blocklySkini/blockly/lua.js +27 -0
- package/blocklySkini/blockly/lua_compressed.js +94 -0
- package/blocklySkini/blockly/lua_compressed.js.map +1 -0
- package/blocklySkini/blockly/media/1x1.gif +0 -0
- package/blocklySkini/blockly/media/click.mp3 +0 -0
- package/blocklySkini/blockly/media/click.ogg +0 -0
- package/blocklySkini/blockly/media/click.wav +0 -0
- package/blocklySkini/blockly/media/delete.mp3 +0 -0
- package/blocklySkini/blockly/media/delete.ogg +0 -0
- package/blocklySkini/blockly/media/delete.wav +0 -0
- package/blocklySkini/blockly/media/disconnect.mp3 +0 -0
- package/blocklySkini/blockly/media/disconnect.ogg +0 -0
- package/blocklySkini/blockly/media/disconnect.wav +0 -0
- package/blocklySkini/blockly/media/dropdown-arrow.svg +1 -0
- package/blocklySkini/blockly/media/handclosed.cur +0 -0
- package/blocklySkini/blockly/media/handdelete.cur +0 -0
- package/blocklySkini/blockly/media/handopen.cur +0 -0
- package/blocklySkini/blockly/media/pilcrow.png +0 -0
- package/blocklySkini/blockly/media/quote0.png +0 -0
- package/blocklySkini/blockly/media/quote1.png +0 -0
- package/blocklySkini/blockly/media/sprites.png +0 -0
- package/blocklySkini/blockly/media/sprites.svg +74 -0
- package/blocklySkini/blockly/msg/ab.d.ts +16 -0
- package/blocklySkini/blockly/msg/ab.js +447 -0
- package/blocklySkini/blockly/msg/ar.d.ts +16 -0
- package/blocklySkini/blockly/msg/ar.js +447 -0
- package/blocklySkini/blockly/msg/az.d.ts +16 -0
- package/blocklySkini/blockly/msg/az.js +447 -0
- package/blocklySkini/blockly/msg/ba.d.ts +16 -0
- package/blocklySkini/blockly/msg/ba.js +447 -0
- package/blocklySkini/blockly/msg/bcc.d.ts +16 -0
- package/blocklySkini/blockly/msg/bcc.js +447 -0
- package/blocklySkini/blockly/msg/be-tarask.d.ts +16 -0
- package/blocklySkini/blockly/msg/be-tarask.js +447 -0
- package/blocklySkini/blockly/msg/be.d.ts +16 -0
- package/blocklySkini/blockly/msg/be.js +447 -0
- package/blocklySkini/blockly/msg/bg.d.ts +16 -0
- package/blocklySkini/blockly/msg/bg.js +447 -0
- package/blocklySkini/blockly/msg/bn.d.ts +16 -0
- package/blocklySkini/blockly/msg/bn.js +447 -0
- package/blocklySkini/blockly/msg/br.d.ts +16 -0
- package/blocklySkini/blockly/msg/br.js +447 -0
- package/blocklySkini/blockly/msg/ca.d.ts +16 -0
- package/blocklySkini/blockly/msg/ca.js +447 -0
- package/blocklySkini/blockly/msg/constants.d.ts +16 -0
- package/blocklySkini/blockly/msg/cs.d.ts +16 -0
- package/blocklySkini/blockly/msg/cs.js +447 -0
- package/blocklySkini/blockly/msg/da.d.ts +16 -0
- package/blocklySkini/blockly/msg/da.js +447 -0
- package/blocklySkini/blockly/msg/de.d.ts +16 -0
- package/blocklySkini/blockly/msg/de.js +447 -0
- package/blocklySkini/blockly/msg/diq.d.ts +16 -0
- package/blocklySkini/blockly/msg/diq.js +447 -0
- package/blocklySkini/blockly/msg/dty.d.ts +16 -0
- package/blocklySkini/blockly/msg/dty.js +447 -0
- package/blocklySkini/blockly/msg/ee.d.ts +16 -0
- package/blocklySkini/blockly/msg/ee.js +447 -0
- package/blocklySkini/blockly/msg/el.d.ts +16 -0
- package/blocklySkini/blockly/msg/el.js +447 -0
- package/blocklySkini/blockly/msg/en-gb.d.ts +16 -0
- package/blocklySkini/blockly/msg/en-gb.js +447 -0
- package/blocklySkini/blockly/msg/en.d.ts +16 -0
- package/blocklySkini/blockly/msg/en.js +447 -0
- package/blocklySkini/blockly/msg/eo.d.ts +16 -0
- package/blocklySkini/blockly/msg/eo.js +447 -0
- package/blocklySkini/blockly/msg/es.d.ts +16 -0
- package/blocklySkini/blockly/msg/es.js +447 -0
- package/blocklySkini/blockly/msg/et.d.ts +16 -0
- package/blocklySkini/blockly/msg/et.js +447 -0
- package/blocklySkini/blockly/msg/eu.d.ts +16 -0
- package/blocklySkini/blockly/msg/eu.js +447 -0
- package/blocklySkini/blockly/msg/fa.d.ts +16 -0
- package/blocklySkini/blockly/msg/fa.js +447 -0
- package/blocklySkini/blockly/msg/fi.d.ts +16 -0
- package/blocklySkini/blockly/msg/fi.js +447 -0
- package/blocklySkini/blockly/msg/fr.d.ts +16 -0
- package/blocklySkini/blockly/msg/fr.js +447 -0
- package/blocklySkini/blockly/msg/gl.d.ts +16 -0
- package/blocklySkini/blockly/msg/gl.js +447 -0
- package/blocklySkini/blockly/msg/gor.d.ts +16 -0
- package/blocklySkini/blockly/msg/gor.js +447 -0
- package/blocklySkini/blockly/msg/ha.d.ts +16 -0
- package/blocklySkini/blockly/msg/ha.js +447 -0
- package/blocklySkini/blockly/msg/he.d.ts +16 -0
- package/blocklySkini/blockly/msg/he.js +447 -0
- package/blocklySkini/blockly/msg/hi.d.ts +16 -0
- package/blocklySkini/blockly/msg/hi.js +447 -0
- package/blocklySkini/blockly/msg/hrx.d.ts +16 -0
- package/blocklySkini/blockly/msg/hrx.js +447 -0
- package/blocklySkini/blockly/msg/hu.d.ts +16 -0
- package/blocklySkini/blockly/msg/hu.js +447 -0
- package/blocklySkini/blockly/msg/hy.d.ts +16 -0
- package/blocklySkini/blockly/msg/hy.js +447 -0
- package/blocklySkini/blockly/msg/ia.d.ts +16 -0
- package/blocklySkini/blockly/msg/ia.js +447 -0
- package/blocklySkini/blockly/msg/id.d.ts +16 -0
- package/blocklySkini/blockly/msg/id.js +447 -0
- package/blocklySkini/blockly/msg/ig.d.ts +16 -0
- package/blocklySkini/blockly/msg/ig.js +447 -0
- package/blocklySkini/blockly/msg/is.d.ts +16 -0
- package/blocklySkini/blockly/msg/is.js +447 -0
- package/blocklySkini/blockly/msg/it.d.ts +16 -0
- package/blocklySkini/blockly/msg/it.js +447 -0
- package/blocklySkini/blockly/msg/ja.d.ts +16 -0
- package/blocklySkini/blockly/msg/ja.js +447 -0
- package/blocklySkini/blockly/msg/kab.d.ts +16 -0
- package/blocklySkini/blockly/msg/kab.js +447 -0
- package/blocklySkini/blockly/msg/kn.d.ts +16 -0
- package/blocklySkini/blockly/msg/kn.js +447 -0
- package/blocklySkini/blockly/msg/ko.d.ts +16 -0
- package/blocklySkini/blockly/msg/ko.js +447 -0
- package/blocklySkini/blockly/msg/lb.d.ts +16 -0
- package/blocklySkini/blockly/msg/lb.js +447 -0
- package/blocklySkini/blockly/msg/lki.d.ts +16 -0
- package/blocklySkini/blockly/msg/lki.js +447 -0
- package/blocklySkini/blockly/msg/lo.d.ts +16 -0
- package/blocklySkini/blockly/msg/lo.js +447 -0
- package/blocklySkini/blockly/msg/lrc.d.ts +16 -0
- package/blocklySkini/blockly/msg/lrc.js +447 -0
- package/blocklySkini/blockly/msg/lt.d.ts +16 -0
- package/blocklySkini/blockly/msg/lt.js +447 -0
- package/blocklySkini/blockly/msg/lv.d.ts +16 -0
- package/blocklySkini/blockly/msg/lv.js +447 -0
- package/blocklySkini/blockly/msg/mk.d.ts +16 -0
- package/blocklySkini/blockly/msg/mk.js +447 -0
- package/blocklySkini/blockly/msg/mnw.d.ts +16 -0
- package/blocklySkini/blockly/msg/mnw.js +447 -0
- package/blocklySkini/blockly/msg/ms.d.ts +16 -0
- package/blocklySkini/blockly/msg/ms.js +447 -0
- package/blocklySkini/blockly/msg/msg.d.ts +444 -0
- package/blocklySkini/blockly/msg/nb.d.ts +16 -0
- package/blocklySkini/blockly/msg/nb.js +447 -0
- package/blocklySkini/blockly/msg/nl.d.ts +16 -0
- package/blocklySkini/blockly/msg/nl.js +447 -0
- package/blocklySkini/blockly/msg/oc.d.ts +16 -0
- package/blocklySkini/blockly/msg/oc.js +447 -0
- package/blocklySkini/blockly/msg/pl.d.ts +16 -0
- package/blocklySkini/blockly/msg/pl.js +447 -0
- package/blocklySkini/blockly/msg/pms.d.ts +16 -0
- package/blocklySkini/blockly/msg/pms.js +447 -0
- package/blocklySkini/blockly/msg/pt-br.d.ts +16 -0
- package/blocklySkini/blockly/msg/pt-br.js +447 -0
- package/blocklySkini/blockly/msg/pt.d.ts +16 -0
- package/blocklySkini/blockly/msg/pt.js +447 -0
- package/blocklySkini/blockly/msg/qqq.d.ts +16 -0
- package/blocklySkini/blockly/msg/ro.d.ts +16 -0
- package/blocklySkini/blockly/msg/ro.js +447 -0
- package/blocklySkini/blockly/msg/ru.d.ts +16 -0
- package/blocklySkini/blockly/msg/ru.js +447 -0
- package/blocklySkini/blockly/msg/sc.d.ts +16 -0
- package/blocklySkini/blockly/msg/sc.js +447 -0
- package/blocklySkini/blockly/msg/sd.d.ts +16 -0
- package/blocklySkini/blockly/msg/sd.js +447 -0
- package/blocklySkini/blockly/msg/shn.d.ts +16 -0
- package/blocklySkini/blockly/msg/shn.js +447 -0
- package/blocklySkini/blockly/msg/sk.d.ts +16 -0
- package/blocklySkini/blockly/msg/sk.js +447 -0
- package/blocklySkini/blockly/msg/skr-arab.d.ts +16 -0
- package/blocklySkini/blockly/msg/skr-arab.js +447 -0
- package/blocklySkini/blockly/msg/sl.d.ts +16 -0
- package/blocklySkini/blockly/msg/sl.js +447 -0
- package/blocklySkini/blockly/msg/sq.d.ts +16 -0
- package/blocklySkini/blockly/msg/sq.js +447 -0
- package/blocklySkini/blockly/msg/sr-latn.d.ts +16 -0
- package/blocklySkini/blockly/msg/sr-latn.js +447 -0
- package/blocklySkini/blockly/msg/sr.d.ts +16 -0
- package/blocklySkini/blockly/msg/sr.js +447 -0
- package/blocklySkini/blockly/msg/sv.d.ts +16 -0
- package/blocklySkini/blockly/msg/sv.js +447 -0
- package/blocklySkini/blockly/msg/synonyms.d.ts +16 -0
- package/blocklySkini/blockly/msg/ta.d.ts +16 -0
- package/blocklySkini/blockly/msg/ta.js +447 -0
- package/blocklySkini/blockly/msg/tcy.d.ts +16 -0
- package/blocklySkini/blockly/msg/tcy.js +447 -0
- package/blocklySkini/blockly/msg/te.d.ts +16 -0
- package/blocklySkini/blockly/msg/te.js +447 -0
- package/blocklySkini/blockly/msg/th.d.ts +16 -0
- package/blocklySkini/blockly/msg/th.js +447 -0
- package/blocklySkini/blockly/msg/tl.d.ts +16 -0
- package/blocklySkini/blockly/msg/tl.js +447 -0
- package/blocklySkini/blockly/msg/tlh.d.ts +16 -0
- package/blocklySkini/blockly/msg/tlh.js +447 -0
- package/blocklySkini/blockly/msg/tr.d.ts +16 -0
- package/blocklySkini/blockly/msg/tr.js +447 -0
- package/blocklySkini/blockly/msg/ug-arab.d.ts +16 -0
- package/blocklySkini/blockly/msg/ug-arab.js +447 -0
- package/blocklySkini/blockly/msg/uk.d.ts +16 -0
- package/blocklySkini/blockly/msg/uk.js +447 -0
- package/blocklySkini/blockly/msg/ur.d.ts +16 -0
- package/blocklySkini/blockly/msg/ur.js +447 -0
- package/blocklySkini/blockly/msg/vi.d.ts +16 -0
- package/blocklySkini/blockly/msg/vi.js +447 -0
- package/blocklySkini/blockly/msg/xmf.d.ts +16 -0
- package/blocklySkini/blockly/msg/xmf.js +447 -0
- package/blocklySkini/blockly/msg/yo.d.ts +16 -0
- package/blocklySkini/blockly/msg/yo.js +447 -0
- package/blocklySkini/blockly/msg/zh-hans.d.ts +16 -0
- package/blocklySkini/blockly/msg/zh-hans.js +447 -0
- package/blocklySkini/blockly/msg/zh-hant.d.ts +16 -0
- package/blocklySkini/blockly/msg/zh-hant.js +447 -0
- package/blocklySkini/blockly/node.js +35 -0
- package/blocklySkini/blockly/package.json +84 -0
- package/blocklySkini/blockly/php.d.ts +15 -0
- package/blocklySkini/blockly/php.js +27 -0
- package/blocklySkini/blockly/php_compressed.js +103 -0
- package/blocklySkini/blockly/php_compressed.js.map +1 -0
- package/blocklySkini/blockly/python.d.ts +15 -0
- package/blocklySkini/blockly/python.js +27 -0
- package/blocklySkini/blockly/python_compressed.js +98 -0
- package/blocklySkini/blockly/python_compressed.js.map +1 -0
- package/blocklySkini/blocklySkini.html +81 -0
- package/blocklySkini/orchestrations/.xml +1 -0
- package/blocklySkini/orchestrations/BluesSkini-1.xml +231 -0
- package/blocklySkini/orchestrations/BluesSkini-2.xml +741 -0
- package/blocklySkini/orchestrations/BluesSkini-3.xml +731 -0
- package/blocklySkini/orchestrations/BluesSkini-4.xml +695 -0
- package/blocklySkini/orchestrations/BluesSkini-5.xml +731 -0
- package/blocklySkini/orchestrations/BluesSkini.xml +704 -0
- package/blocklySkini/orchestrations/FunkBitwig-1.xml +778 -0
- package/blocklySkini/orchestrations/FunkBitwig-2.xml +471 -0
- package/blocklySkini/orchestrations/JouerLeBonInstrument1-1.xml +784 -0
- package/blocklySkini/orchestrations/MajeurMineur-1.xml +638 -0
- package/blocklySkini/orchestrations/Opus5-3 - Copie.xml +1041 -0
- package/blocklySkini/orchestrations/Opus5-3.xml +1128 -0
- package/blocklySkini/orchestrations/Quatuor1-1.xml +357 -0
- package/blocklySkini/orchestrations/TechnoBitwig-1.xml +221 -0
- package/blocklySkini/orchestrations/TestBlockly.xml +497 -0
- package/blocklySkini/orchestrations/TestBlockly1.xml +500 -0
- package/blocklySkini/orchestrations/TestBlockly2.xml +792 -0
- package/blocklySkini/orchestrations/TestBlockly3-1.xml +1182 -0
- package/blocklySkini/orchestrations/TestBlockly3.xml +1251 -0
- package/blocklySkini/orchestrations/TestFunction.xml +143 -0
- package/blocklySkini/orchestrations/TestIf.xml +80 -0
- package/blocklySkini/orchestrations/TestLoop.xml +127 -0
- package/blocklySkini/orchestrations/TestOrchestration2.xml +460 -0
- package/blocklySkini/orchestrations/TestPrint.xml +70 -0
- package/blocklySkini/orchestrations/TestSubMod.xml +81 -0
- package/blocklySkini/orchestrations/Testlogic.xml +113 -0
- package/blocklySkini/orchestrations/TrouveLaPercu-1.xml +813 -0
- package/blocklySkini/orchestrations/TrouveLaPercu-2.xml +813 -0
- package/blocklySkini/orchestrations/bar.xml +496 -0
- package/blocklySkini/orchestrations/bar2.xml +496 -0
- package/blocklySkini/orchestrations/foo.xml +500 -0
- package/blocklySkini/orchestrations/opus5Blockly - Copie.xml +496 -0
- package/blocklySkini/orchestrations/opus5Blockly-3.xml +868 -0
- package/blocklySkini/orchestrations/opus5Blockly.xml +496 -0
- package/blocklySkini/orchestrations/testOrchestration3.xml +483 -0
- package/blocklySkini/orchestrations/testOrchestration4.xml +487 -0
- package/blocklySkini/scripts/hiphop_blocks.js +6104 -0
- package/blocklySkini/scripts/main2.js +801 -0
- package/blocklySkini/styles/index.css +320 -0
- package/blocklySkini/styles/material.css +11552 -0
- package/package.json +3 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview The class representing a cursor that is used to navigate
|
|
9
|
+
* between tab navigable fields.
|
|
10
|
+
* @author samelh@google.com (Sam El-Husseini)
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
goog.provide('Blockly.TabNavigateCursor');
|
|
15
|
+
|
|
16
|
+
goog.require('Blockly.ASTNode');
|
|
17
|
+
goog.require('Blockly.BasicCursor');
|
|
18
|
+
goog.require('Blockly.utils.object');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A cursor for navigating between tab navigable fields.
|
|
23
|
+
* @constructor
|
|
24
|
+
* @extends {Blockly.BasicCursor}
|
|
25
|
+
*/
|
|
26
|
+
Blockly.TabNavigateCursor = function() {
|
|
27
|
+
Blockly.TabNavigateCursor.superClass_.constructor.call(this);
|
|
28
|
+
};
|
|
29
|
+
Blockly.utils.object.inherits(Blockly.TabNavigateCursor, Blockly.BasicCursor);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Skip all nodes except for tab navigable fields.
|
|
33
|
+
* @param {Blockly.ASTNode} node The AST node to check whether it is valid.
|
|
34
|
+
* @return {boolean} True if the node should be visited, false otherwise.
|
|
35
|
+
* @override
|
|
36
|
+
*/
|
|
37
|
+
Blockly.TabNavigateCursor.prototype.validNode_ = function(node) {
|
|
38
|
+
var isValid = false;
|
|
39
|
+
var type = node && node.getType();
|
|
40
|
+
if (node) {
|
|
41
|
+
var location = /** @type {Blockly.Field} */ (node.getLocation());
|
|
42
|
+
if (type == Blockly.ASTNode.types.FIELD &&
|
|
43
|
+
location && location.isTabNavigable() && location.isClickable()) {
|
|
44
|
+
isValid = true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return isValid;
|
|
48
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Object in charge of managing markers and the cursor.
|
|
9
|
+
* @author aschmiedt@google.com (Abby Schmiedt)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.MarkerManager');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.Cursor');
|
|
16
|
+
goog.require('Blockly.Marker');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Class to manage the multiple markers and the cursor on a workspace.
|
|
21
|
+
* @param {!Blockly.WorkspaceSvg} workspace The workspace for the marker manager.
|
|
22
|
+
* @constructor
|
|
23
|
+
* @package
|
|
24
|
+
*/
|
|
25
|
+
Blockly.MarkerManager = function(workspace){
|
|
26
|
+
/**
|
|
27
|
+
* The cursor.
|
|
28
|
+
* @type {Blockly.Cursor}
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
this.cursor_ = null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The cursor's svg element.
|
|
35
|
+
* @type {SVGElement}
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
this.cursorSvg_ = null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The map of markers for the workspace.
|
|
42
|
+
* @type {!Object<string, !Blockly.Marker>}
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
this.markers_ = {};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The workspace this marker manager is associated with.
|
|
49
|
+
* @type {!Blockly.WorkspaceSvg}
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
this.workspace_ = workspace;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Register the marker by adding it to the map of markers.
|
|
57
|
+
* @param {string} id A unique identifier for the marker.
|
|
58
|
+
* @param {!Blockly.Marker} marker The marker to register.
|
|
59
|
+
*/
|
|
60
|
+
Blockly.MarkerManager.prototype.registerMarker = function(id, marker) {
|
|
61
|
+
if (this.markers_[id]) {
|
|
62
|
+
this.unregisterMarker(id);
|
|
63
|
+
}
|
|
64
|
+
marker.setDrawer(this.workspace_.getRenderer()
|
|
65
|
+
.makeMarkerDrawer(this.workspace_, marker));
|
|
66
|
+
this.setMarkerSvg(marker.getDrawer().createDom());
|
|
67
|
+
this.markers_[id] = marker;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Unregister the marker by removing it from the map of markers.
|
|
72
|
+
* @param {string} id The id of the marker to unregister.
|
|
73
|
+
*/
|
|
74
|
+
Blockly.MarkerManager.prototype.unregisterMarker = function(id) {
|
|
75
|
+
var marker = this.markers_[id];
|
|
76
|
+
if (marker) {
|
|
77
|
+
marker.dispose();
|
|
78
|
+
delete this.markers_[id];
|
|
79
|
+
} else {
|
|
80
|
+
throw Error('Marker with id ' + id + ' does not exist. Can only unregister' +
|
|
81
|
+
'markers that exist.');
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get the cursor for the workspace.
|
|
87
|
+
* @return {Blockly.Cursor} The cursor for this workspace.
|
|
88
|
+
*/
|
|
89
|
+
Blockly.MarkerManager.prototype.getCursor = function() {
|
|
90
|
+
return this.cursor_;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Get a single marker that corresponds to the given id.
|
|
95
|
+
* @param {string} id A unique identifier for the marker.
|
|
96
|
+
* @return {Blockly.Marker} The marker that corresponds to the given id, or null
|
|
97
|
+
* if none exists.
|
|
98
|
+
*/
|
|
99
|
+
Blockly.MarkerManager.prototype.getMarker = function(id) {
|
|
100
|
+
return this.markers_[id];
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Sets the cursor and initializes the drawer for use with keyboard navigation.
|
|
105
|
+
* @param {Blockly.Cursor} cursor The cursor used to move around this workspace.
|
|
106
|
+
*/
|
|
107
|
+
Blockly.MarkerManager.prototype.setCursor = function(cursor) {
|
|
108
|
+
if (this.cursor_ && this.cursor_.getDrawer()) {
|
|
109
|
+
this.cursor_.getDrawer().dispose();
|
|
110
|
+
}
|
|
111
|
+
this.cursor_ = cursor;
|
|
112
|
+
if (this.cursor_) {
|
|
113
|
+
var drawer = this.workspace_.getRenderer()
|
|
114
|
+
.makeMarkerDrawer(this.workspace_, this.cursor_);
|
|
115
|
+
this.cursor_.setDrawer(drawer);
|
|
116
|
+
this.setCursorSvg(this.cursor_.getDrawer().createDom());
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Add the cursor svg to this workspace svg group.
|
|
122
|
+
* @param {SVGElement} cursorSvg The svg root of the cursor to be added to the
|
|
123
|
+
* workspace svg group.
|
|
124
|
+
* @package
|
|
125
|
+
*/
|
|
126
|
+
Blockly.MarkerManager.prototype.setCursorSvg = function(cursorSvg) {
|
|
127
|
+
if (!cursorSvg) {
|
|
128
|
+
this.cursorSvg_ = null;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
this.workspace_.getBlockCanvas().appendChild(cursorSvg);
|
|
133
|
+
this.cursorSvg_ = cursorSvg;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Add the marker svg to this workspaces svg group.
|
|
138
|
+
* @param {SVGElement} markerSvg The svg root of the marker to be added to the
|
|
139
|
+
* workspace svg group.
|
|
140
|
+
* @package
|
|
141
|
+
*/
|
|
142
|
+
Blockly.MarkerManager.prototype.setMarkerSvg = function(markerSvg) {
|
|
143
|
+
if (!markerSvg) {
|
|
144
|
+
this.markerSvg_ = null;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (this.workspace_.getBlockCanvas()) {
|
|
149
|
+
if (this.cursorSvg_) {
|
|
150
|
+
this.workspace_.getBlockCanvas().insertBefore(markerSvg, this.cursorSvg_);
|
|
151
|
+
} else {
|
|
152
|
+
this.workspace_.getBlockCanvas().appendChild(markerSvg);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Redraw the attached cursor svg if needed.
|
|
159
|
+
* @package
|
|
160
|
+
*/
|
|
161
|
+
Blockly.MarkerManager.prototype.updateMarkers = function() {
|
|
162
|
+
if (this.workspace_.keyboardAccessibilityMode && this.cursorSvg_) {
|
|
163
|
+
this.workspace_.getCursor().draw();
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Dispose of the marker manager.
|
|
169
|
+
* Go through and delete all markers associated with this marker manager.
|
|
170
|
+
* @suppress {checkTypes}
|
|
171
|
+
* @package
|
|
172
|
+
*/
|
|
173
|
+
Blockly.MarkerManager.prototype.dispose = function() {
|
|
174
|
+
var markerIds = Object.keys(this.markers_);
|
|
175
|
+
for (var i = 0, markerId; (markerId = markerIds[i]); i++) {
|
|
176
|
+
this.unregisterMarker(markerId);
|
|
177
|
+
}
|
|
178
|
+
this.markers_ = null;
|
|
179
|
+
if (this.cursor_) {
|
|
180
|
+
this.cursor_.dispose();
|
|
181
|
+
this.cursor_ = null;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Blockly menu similar to Closure's goog.ui.Menu
|
|
9
|
+
* @author samelh@google.com (Sam El-Husseini)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.Menu');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.utils.aria');
|
|
16
|
+
goog.require('Blockly.utils.Coordinate');
|
|
17
|
+
goog.require('Blockly.utils.dom');
|
|
18
|
+
goog.require('Blockly.utils.KeyCodes');
|
|
19
|
+
goog.require('Blockly.utils.style');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A basic menu class.
|
|
24
|
+
* @constructor
|
|
25
|
+
*/
|
|
26
|
+
Blockly.Menu = function() {
|
|
27
|
+
/**
|
|
28
|
+
* Array of menu items.
|
|
29
|
+
* (Nulls are never in the array, but typing the array as nullable prevents
|
|
30
|
+
* the compiler from objecting to .indexOf(null))
|
|
31
|
+
* @type {!Array.<Blockly.MenuItem>}
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
this.menuItems_ = [];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Coordinates of the mousedown event that caused this menu to open. Used to
|
|
38
|
+
* prevent the consequent mouseup event due to a simple click from activating
|
|
39
|
+
* a menu item immediately.
|
|
40
|
+
* @type {?Blockly.utils.Coordinate}
|
|
41
|
+
* @package
|
|
42
|
+
*/
|
|
43
|
+
this.openingCoords = null;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* This is the element that we will listen to the real focus events on.
|
|
47
|
+
* A value of null means no menu item is highlighted.
|
|
48
|
+
* @type {Blockly.MenuItem}
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
this.highlightedItem_ = null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Mouse over event data.
|
|
55
|
+
* @type {?Blockly.EventData}
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
this.mouseOverHandler_ = null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Click event data.
|
|
62
|
+
* @type {?Blockly.EventData}
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
this.clickHandler_ = null;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Mouse enter event data.
|
|
69
|
+
* @type {?Blockly.EventData}
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
this.mouseEnterHandler_ = null;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Mouse leave event data.
|
|
76
|
+
* @type {?Blockly.EventData}
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
this.mouseLeaveHandler_ = null;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Key down event data.
|
|
83
|
+
* @type {?Blockly.EventData}
|
|
84
|
+
* @private
|
|
85
|
+
*/
|
|
86
|
+
this.onKeyDownHandler_ = null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The menu's root DOM element.
|
|
90
|
+
* @type {Element}
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
this.element_ = null;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* ARIA name for this menu.
|
|
97
|
+
* @type {?Blockly.utils.aria.Role}
|
|
98
|
+
* @private
|
|
99
|
+
*/
|
|
100
|
+
this.roleName_ = null;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Add a new menu item to the bottom of this menu.
|
|
106
|
+
* @param {!Blockly.MenuItem} menuItem Menu item to append.
|
|
107
|
+
*/
|
|
108
|
+
Blockly.Menu.prototype.addChild = function(menuItem) {
|
|
109
|
+
this.menuItems_.push(menuItem);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Creates the menu DOM.
|
|
114
|
+
* @param {!Element} container Element upon which to append this menu.
|
|
115
|
+
*/
|
|
116
|
+
Blockly.Menu.prototype.render = function(container) {
|
|
117
|
+
var element = /** @type {!HTMLDivElement} */ (document.createElement('div'));
|
|
118
|
+
// goog-menu is deprecated, use blocklyMenu. May 2020.
|
|
119
|
+
element.className = 'blocklyMenu goog-menu blocklyNonSelectable';
|
|
120
|
+
element.tabIndex = 0;
|
|
121
|
+
if (this.roleName_) {
|
|
122
|
+
Blockly.utils.aria.setRole(element, this.roleName_);
|
|
123
|
+
}
|
|
124
|
+
this.element_ = element;
|
|
125
|
+
|
|
126
|
+
// Add menu items.
|
|
127
|
+
for (var i = 0, menuItem; (menuItem = this.menuItems_[i]); i++) {
|
|
128
|
+
element.appendChild(menuItem.createDom());
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Add event handlers.
|
|
132
|
+
this.mouseOverHandler_ = Blockly.bindEventWithChecks_(element,
|
|
133
|
+
'mouseover', this, this.handleMouseOver_, true);
|
|
134
|
+
this.clickHandler_ = Blockly.bindEventWithChecks_(element,
|
|
135
|
+
'click', this, this.handleClick_, true);
|
|
136
|
+
this.mouseEnterHandler_ = Blockly.bindEventWithChecks_(element,
|
|
137
|
+
'mouseenter', this, this.handleMouseEnter_, true);
|
|
138
|
+
this.mouseLeaveHandler_ = Blockly.bindEventWithChecks_(element,
|
|
139
|
+
'mouseleave', this, this.handleMouseLeave_, true);
|
|
140
|
+
this.onKeyDownHandler_ = Blockly.bindEventWithChecks_(element,
|
|
141
|
+
'keydown', this, this.handleKeyEvent_);
|
|
142
|
+
|
|
143
|
+
container.appendChild(element);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Gets the menu's element.
|
|
148
|
+
* @return {Element} The DOM element.
|
|
149
|
+
* @package
|
|
150
|
+
*/
|
|
151
|
+
Blockly.Menu.prototype.getElement = function() {
|
|
152
|
+
return this.element_;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Focus the menu element.
|
|
157
|
+
* @package
|
|
158
|
+
*/
|
|
159
|
+
Blockly.Menu.prototype.focus = function() {
|
|
160
|
+
var el = this.getElement();
|
|
161
|
+
if (el) {
|
|
162
|
+
el.focus({preventScroll:true});
|
|
163
|
+
Blockly.utils.dom.addClass(el, 'blocklyFocused');
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Blur the menu element.
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
Blockly.Menu.prototype.blur_ = function() {
|
|
172
|
+
var el = this.getElement();
|
|
173
|
+
if (el) {
|
|
174
|
+
el.blur();
|
|
175
|
+
Blockly.utils.dom.removeClass(el, 'blocklyFocused');
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Set the menu accessibility role.
|
|
181
|
+
* @param {!Blockly.utils.aria.Role} roleName role name.
|
|
182
|
+
* @package
|
|
183
|
+
*/
|
|
184
|
+
Blockly.Menu.prototype.setRole = function(roleName) {
|
|
185
|
+
this.roleName_ = roleName;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Dispose of this menu.
|
|
190
|
+
*/
|
|
191
|
+
Blockly.Menu.prototype.dispose = function() {
|
|
192
|
+
// Remove event handlers.
|
|
193
|
+
if (this.mouseOverHandler_) {
|
|
194
|
+
Blockly.unbindEvent_(this.mouseOverHandler_);
|
|
195
|
+
this.mouseOverHandler_ = null;
|
|
196
|
+
}
|
|
197
|
+
if (this.clickHandler_) {
|
|
198
|
+
Blockly.unbindEvent_(this.clickHandler_);
|
|
199
|
+
this.clickHandler_ = null;
|
|
200
|
+
}
|
|
201
|
+
if (this.mouseEnterHandler_) {
|
|
202
|
+
Blockly.unbindEvent_(this.mouseEnterHandler_);
|
|
203
|
+
this.mouseEnterHandler_ = null;
|
|
204
|
+
}
|
|
205
|
+
if (this.mouseLeaveHandler_) {
|
|
206
|
+
Blockly.unbindEvent_(this.mouseLeaveHandler_);
|
|
207
|
+
this.mouseLeaveHandler_ = null;
|
|
208
|
+
}
|
|
209
|
+
if (this.onKeyDownHandler_) {
|
|
210
|
+
Blockly.unbindEvent_(this.onKeyDownHandler_);
|
|
211
|
+
this.onKeyDownHandler_ = null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Remove menu items.
|
|
215
|
+
for (var i = 0, menuItem; (menuItem = this.menuItems_[i]); i++) {
|
|
216
|
+
menuItem.dispose();
|
|
217
|
+
}
|
|
218
|
+
this.element_ = null;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// Child component management.
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Returns the child menu item that owns the given DOM element,
|
|
225
|
+
* or null if no such menu item is found.
|
|
226
|
+
* @param {Element} elem DOM element whose owner is to be returned.
|
|
227
|
+
* @return {?Blockly.MenuItem} Menu item for which the DOM element belongs to.
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
Blockly.Menu.prototype.getMenuItem_ = function(elem) {
|
|
231
|
+
var menuElem = this.getElement();
|
|
232
|
+
// Node might be the menu border (resulting in no associated menu item), or
|
|
233
|
+
// a menu item's div, or some element within the menu item.
|
|
234
|
+
// Walk up parents until one meets either the menu's root element, or
|
|
235
|
+
// a menu item's div.
|
|
236
|
+
while (elem && elem != menuElem) {
|
|
237
|
+
if (Blockly.utils.dom.hasClass(elem, 'blocklyMenuItem')) {
|
|
238
|
+
// Having found a menu item's div, locate that menu item in this menu.
|
|
239
|
+
for (var i = 0, menuItem; (menuItem = this.menuItems_[i]); i++) {
|
|
240
|
+
if (menuItem.getElement() == elem) {
|
|
241
|
+
return menuItem;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
elem = elem.parentElement;
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// Highlight management.
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Highlights the given menu item, or clears highlighting if null.
|
|
254
|
+
* @param {Blockly.MenuItem} item Item to highlight, or null.
|
|
255
|
+
* @package
|
|
256
|
+
*/
|
|
257
|
+
Blockly.Menu.prototype.setHighlighted = function(item) {
|
|
258
|
+
var currentHighlighted = this.highlightedItem_;
|
|
259
|
+
if (currentHighlighted) {
|
|
260
|
+
currentHighlighted.setHighlighted(false);
|
|
261
|
+
this.highlightedItem_ = null;
|
|
262
|
+
}
|
|
263
|
+
if (item) {
|
|
264
|
+
item.setHighlighted(true);
|
|
265
|
+
this.highlightedItem_ = item;
|
|
266
|
+
// Bring the highlighted item into view. This has no effect if the menu is
|
|
267
|
+
// not scrollable.
|
|
268
|
+
var el = /** @type {!Element} */ (this.getElement());
|
|
269
|
+
Blockly.utils.style.scrollIntoContainerView(
|
|
270
|
+
/** @type {!Element} */ (item.getElement()), el);
|
|
271
|
+
|
|
272
|
+
Blockly.utils.aria.setState(el, Blockly.utils.aria.State.ACTIVEDESCENDANT,
|
|
273
|
+
item.getId());
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Highlights the next highlightable item (or the first if nothing is currently
|
|
279
|
+
* highlighted).
|
|
280
|
+
* @package
|
|
281
|
+
*/
|
|
282
|
+
Blockly.Menu.prototype.highlightNext = function() {
|
|
283
|
+
var index = this.menuItems_.indexOf(this.highlightedItem_);
|
|
284
|
+
this.highlightHelper_(index, 1);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Highlights the previous highlightable item (or the last if nothing is
|
|
289
|
+
* currently highlighted).
|
|
290
|
+
* @package
|
|
291
|
+
*/
|
|
292
|
+
Blockly.Menu.prototype.highlightPrevious = function() {
|
|
293
|
+
var index = this.menuItems_.indexOf(this.highlightedItem_);
|
|
294
|
+
this.highlightHelper_(index < 0 ? this.menuItems_.length : index, -1);
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Highlights the first highlightable item.
|
|
299
|
+
* @private
|
|
300
|
+
*/
|
|
301
|
+
Blockly.Menu.prototype.highlightFirst_ = function() {
|
|
302
|
+
this.highlightHelper_(-1, 1);
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Highlights the last highlightable item.
|
|
307
|
+
* @private
|
|
308
|
+
*/
|
|
309
|
+
Blockly.Menu.prototype.highlightLast_ = function() {
|
|
310
|
+
this.highlightHelper_(this.menuItems_.length, -1);
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Helper function that manages the details of moving the highlight among
|
|
315
|
+
* child menuitems in response to keyboard events.
|
|
316
|
+
* @param {number} startIndex Start index.
|
|
317
|
+
* @param {number} delta Step direction: 1 to go down, -1 to go up.
|
|
318
|
+
* @private
|
|
319
|
+
*/
|
|
320
|
+
Blockly.Menu.prototype.highlightHelper_ = function(startIndex, delta) {
|
|
321
|
+
var index = startIndex + delta;
|
|
322
|
+
var menuItem;
|
|
323
|
+
while ((menuItem = this.menuItems_[index])) {
|
|
324
|
+
if (menuItem.isEnabled()) {
|
|
325
|
+
this.setHighlighted(menuItem);
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
index += delta;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
// Mouse events.
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Handles mouseover events. Highlight menuitems as the user hovers over them.
|
|
336
|
+
* @param {!Event} e Mouse event to handle.
|
|
337
|
+
* @private
|
|
338
|
+
*/
|
|
339
|
+
Blockly.Menu.prototype.handleMouseOver_ = function(e) {
|
|
340
|
+
var menuItem = this.getMenuItem_(/** @type {Element} */ (e.target));
|
|
341
|
+
|
|
342
|
+
if (menuItem) {
|
|
343
|
+
if (menuItem.isEnabled()) {
|
|
344
|
+
if (this.highlightedItem_ != menuItem) {
|
|
345
|
+
this.setHighlighted(menuItem);
|
|
346
|
+
}
|
|
347
|
+
} else {
|
|
348
|
+
this.setHighlighted(null);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Handles click events. Pass the event onto the child menuitem to handle.
|
|
355
|
+
* @param {!Event} e Click event to handle.
|
|
356
|
+
* @private
|
|
357
|
+
*/
|
|
358
|
+
Blockly.Menu.prototype.handleClick_ = function(e) {
|
|
359
|
+
var oldCoords = this.openingCoords;
|
|
360
|
+
// Clear out the saved opening coords immediately so they're not used twice.
|
|
361
|
+
this.openingCoords = null;
|
|
362
|
+
if (oldCoords && typeof e.clientX == 'number') {
|
|
363
|
+
var newCoords = new Blockly.utils.Coordinate(e.clientX, e.clientY);
|
|
364
|
+
if (Blockly.utils.Coordinate.distance(oldCoords, newCoords) < 1) {
|
|
365
|
+
// This menu was opened by a mousedown and we're handling the consequent
|
|
366
|
+
// click event. The coords haven't changed, meaning this was the same
|
|
367
|
+
// opening event. Don't do the usual behavior because the menu just popped
|
|
368
|
+
// up under the mouse and the user didn't mean to activate this item.
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
var menuItem = this.getMenuItem_(/** @type {Element} */ (e.target));
|
|
374
|
+
if (menuItem) {
|
|
375
|
+
menuItem.performAction();
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Handles mouse enter events. Focus the element.
|
|
381
|
+
* @param {Event} _e Mouse event to handle.
|
|
382
|
+
* @private
|
|
383
|
+
*/
|
|
384
|
+
Blockly.Menu.prototype.handleMouseEnter_ = function(_e) {
|
|
385
|
+
this.focus();
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Handles mouse leave events. Blur and clear highlight.
|
|
390
|
+
* @param {Event} _e Mouse event to handle.
|
|
391
|
+
* @private
|
|
392
|
+
*/
|
|
393
|
+
Blockly.Menu.prototype.handleMouseLeave_ = function(_e) {
|
|
394
|
+
if (this.getElement()) {
|
|
395
|
+
this.blur_();
|
|
396
|
+
this.setHighlighted(null);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
// Keyboard events.
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Attempts to handle a keyboard event, if the menu item is enabled, by calling
|
|
404
|
+
* {@link handleKeyEventInternal_}.
|
|
405
|
+
* @param {!Event} e Key event to handle.
|
|
406
|
+
* @private
|
|
407
|
+
*/
|
|
408
|
+
Blockly.Menu.prototype.handleKeyEvent_ = function(e) {
|
|
409
|
+
if (!this.menuItems_.length) {
|
|
410
|
+
// Empty menu.
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (e.shiftKey || e.ctrlKey || e.metaKey || e.altKey) {
|
|
414
|
+
// Do not handle the key event if any modifier key is pressed.
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
var highlighted = this.highlightedItem_;
|
|
419
|
+
switch (e.keyCode) {
|
|
420
|
+
case Blockly.utils.KeyCodes.ENTER:
|
|
421
|
+
case Blockly.utils.KeyCodes.SPACE:
|
|
422
|
+
if (highlighted) {
|
|
423
|
+
highlighted.performAction();
|
|
424
|
+
}
|
|
425
|
+
break;
|
|
426
|
+
|
|
427
|
+
case Blockly.utils.KeyCodes.UP:
|
|
428
|
+
this.highlightPrevious();
|
|
429
|
+
break;
|
|
430
|
+
|
|
431
|
+
case Blockly.utils.KeyCodes.DOWN:
|
|
432
|
+
this.highlightNext();
|
|
433
|
+
break;
|
|
434
|
+
|
|
435
|
+
case Blockly.utils.KeyCodes.PAGE_UP:
|
|
436
|
+
case Blockly.utils.KeyCodes.HOME:
|
|
437
|
+
this.highlightFirst_();
|
|
438
|
+
break;
|
|
439
|
+
|
|
440
|
+
case Blockly.utils.KeyCodes.PAGE_DOWN:
|
|
441
|
+
case Blockly.utils.KeyCodes.END:
|
|
442
|
+
this.highlightLast_();
|
|
443
|
+
break;
|
|
444
|
+
|
|
445
|
+
default:
|
|
446
|
+
// Not a key the menu is interested in.
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
// The menu used this key, don't let it have secondary effects.
|
|
450
|
+
e.preventDefault();
|
|
451
|
+
e.stopPropagation();
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Get the size of a rendered menu.
|
|
456
|
+
* @return {!Blockly.utils.Size} Object with width and height properties.
|
|
457
|
+
* @package
|
|
458
|
+
*/
|
|
459
|
+
Blockly.Menu.prototype.getSize = function() {
|
|
460
|
+
var menuDom = this.getElement();
|
|
461
|
+
var menuSize = Blockly.utils.style.getSize(/** @type {!Element} */ (menuDom));
|
|
462
|
+
// Recalculate height for the total content, not only box height.
|
|
463
|
+
menuSize.height = menuDom.scrollHeight;
|
|
464
|
+
return menuSize;
|
|
465
|
+
};
|