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,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview An object that owns a block's rendering SVG elements.
|
|
9
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
goog.provide('Blockly.blockRendering.PathObject');
|
|
15
|
+
|
|
16
|
+
goog.require('Blockly.blockRendering.ConstantProvider');
|
|
17
|
+
goog.require('Blockly.blockRendering.IPathObject');
|
|
18
|
+
goog.require('Blockly.Theme');
|
|
19
|
+
goog.require('Blockly.utils.dom');
|
|
20
|
+
goog.require('Blockly.utils.Svg');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An object that handles creating and setting each of the SVG elements
|
|
25
|
+
* used by the renderer.
|
|
26
|
+
* @param {!SVGElement} root The root SVG element.
|
|
27
|
+
* @param {!Blockly.Theme.BlockStyle} style The style object to use for
|
|
28
|
+
* colouring.
|
|
29
|
+
* @param {!Blockly.blockRendering.ConstantProvider} constants The renderer's
|
|
30
|
+
* constants.
|
|
31
|
+
* @constructor
|
|
32
|
+
* @implements {Blockly.blockRendering.IPathObject}
|
|
33
|
+
* @package
|
|
34
|
+
*/
|
|
35
|
+
Blockly.blockRendering.PathObject = function(root, style, constants) {
|
|
36
|
+
/**
|
|
37
|
+
* The renderer's constant provider.
|
|
38
|
+
* @type {!Blockly.blockRendering.ConstantProvider}
|
|
39
|
+
* @package
|
|
40
|
+
*/
|
|
41
|
+
this.constants = constants;
|
|
42
|
+
|
|
43
|
+
this.svgRoot = root;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The primary path of the block.
|
|
47
|
+
* @type {!SVGElement}
|
|
48
|
+
* @package
|
|
49
|
+
*/
|
|
50
|
+
this.svgPath = Blockly.utils.dom.createSvgElement(
|
|
51
|
+
Blockly.utils.Svg.PATH,
|
|
52
|
+
{'class': 'blocklyPath'}, this.svgRoot);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The style object to use when colouring block paths.
|
|
56
|
+
* @type {!Blockly.Theme.BlockStyle}
|
|
57
|
+
* @package
|
|
58
|
+
*/
|
|
59
|
+
this.style = style;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Holds the cursors svg element when the cursor is attached to the block.
|
|
63
|
+
* This is null if there is no cursor on the block.
|
|
64
|
+
* @type {SVGElement}
|
|
65
|
+
* @package
|
|
66
|
+
*/
|
|
67
|
+
this.cursorSvg = null;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Holds the markers svg element when the marker is attached to the block.
|
|
71
|
+
* This is null if there is no marker on the block.
|
|
72
|
+
* @type {SVGElement}
|
|
73
|
+
* @package
|
|
74
|
+
*/
|
|
75
|
+
this.markerSvg = null;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Set the path generated by the renderer onto the respective SVG element.
|
|
80
|
+
* @param {string} pathString The path.
|
|
81
|
+
* @package
|
|
82
|
+
*/
|
|
83
|
+
Blockly.blockRendering.PathObject.prototype.setPath = function(pathString) {
|
|
84
|
+
this.svgPath.setAttribute('d', pathString);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Flip the SVG paths in RTL.
|
|
89
|
+
* @package
|
|
90
|
+
*/
|
|
91
|
+
Blockly.blockRendering.PathObject.prototype.flipRTL = function() {
|
|
92
|
+
// Mirror the block's path.
|
|
93
|
+
this.svgPath.setAttribute('transform', 'scale(-1 1)');
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Add the cursor svg to this block's svg group.
|
|
98
|
+
* @param {SVGElement} cursorSvg The svg root of the cursor to be added to the
|
|
99
|
+
* block svg group.
|
|
100
|
+
* @package
|
|
101
|
+
*/
|
|
102
|
+
Blockly.blockRendering.PathObject.prototype.setCursorSvg = function(cursorSvg) {
|
|
103
|
+
if (!cursorSvg) {
|
|
104
|
+
this.cursorSvg = null;
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.svgRoot.appendChild(cursorSvg);
|
|
109
|
+
this.cursorSvg = cursorSvg;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Add the marker svg to this block's svg group.
|
|
114
|
+
* @param {SVGElement} markerSvg The svg root of the marker to be added to the
|
|
115
|
+
* block svg group.
|
|
116
|
+
* @package
|
|
117
|
+
*/
|
|
118
|
+
Blockly.blockRendering.PathObject.prototype.setMarkerSvg = function(markerSvg) {
|
|
119
|
+
if (!markerSvg) {
|
|
120
|
+
this.markerSvg = null;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (this.cursorSvg) {
|
|
125
|
+
this.svgRoot.insertBefore(markerSvg, this.cursorSvg);
|
|
126
|
+
} else {
|
|
127
|
+
this.svgRoot.appendChild(markerSvg);
|
|
128
|
+
}
|
|
129
|
+
this.markerSvg = markerSvg;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Apply the stored colours to the block's path, taking into account whether
|
|
134
|
+
* the paths belong to a shadow block.
|
|
135
|
+
* @param {!Blockly.Block} block The source block.
|
|
136
|
+
* @package
|
|
137
|
+
*/
|
|
138
|
+
Blockly.blockRendering.PathObject.prototype.applyColour = function(block) {
|
|
139
|
+
this.svgPath.setAttribute('stroke', this.style.colourTertiary);
|
|
140
|
+
this.svgPath.setAttribute('fill', this.style.colourPrimary);
|
|
141
|
+
|
|
142
|
+
this.updateShadow_(block.isShadow());
|
|
143
|
+
this.updateDisabled_(!block.isEnabled() || block.getInheritedDisabled());
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Set the style.
|
|
148
|
+
* @param {!Blockly.Theme.BlockStyle} blockStyle The block style to use.
|
|
149
|
+
* @package
|
|
150
|
+
*/
|
|
151
|
+
Blockly.blockRendering.PathObject.prototype.setStyle = function(blockStyle) {
|
|
152
|
+
this.style = blockStyle;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Add or remove the given CSS class on the path object's root SVG element.
|
|
157
|
+
* @param {string} className The name of the class to add or remove
|
|
158
|
+
* @param {boolean} add True if the class should be added. False if it should
|
|
159
|
+
* be removed.
|
|
160
|
+
* @protected
|
|
161
|
+
*/
|
|
162
|
+
Blockly.blockRendering.PathObject.prototype.setClass_ = function(
|
|
163
|
+
className, add) {
|
|
164
|
+
if (add) {
|
|
165
|
+
Blockly.utils.dom.addClass(/** @type {!Element} */ (this.svgRoot),
|
|
166
|
+
className);
|
|
167
|
+
} else {
|
|
168
|
+
Blockly.utils.dom.removeClass(/** @type {!Element} */ (this.svgRoot),
|
|
169
|
+
className);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Set whether the block shows a highlight or not. Block highlighting is
|
|
175
|
+
* often used to visually mark blocks currently being executed.
|
|
176
|
+
* @param {boolean} enable True if highlighted.
|
|
177
|
+
* @package
|
|
178
|
+
*/
|
|
179
|
+
Blockly.blockRendering.PathObject.prototype.updateHighlighted = function(
|
|
180
|
+
enable) {
|
|
181
|
+
if (enable) {
|
|
182
|
+
this.svgPath.setAttribute('filter',
|
|
183
|
+
'url(#' + this.constants.embossFilterId + ')');
|
|
184
|
+
} else {
|
|
185
|
+
this.svgPath.setAttribute('filter', 'none');
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Updates the look of the block to reflect a shadow state.
|
|
191
|
+
* @param {boolean} shadow True if the block is a shadow block.
|
|
192
|
+
* @protected
|
|
193
|
+
*/
|
|
194
|
+
Blockly.blockRendering.PathObject.prototype.updateShadow_ = function(shadow) {
|
|
195
|
+
if (shadow) {
|
|
196
|
+
this.svgPath.setAttribute('stroke', 'none');
|
|
197
|
+
this.svgPath.setAttribute('fill', this.style.colourSecondary);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Updates the look of the block to reflect a disabled state.
|
|
203
|
+
* @param {boolean} disabled True if disabled.
|
|
204
|
+
* @protected
|
|
205
|
+
*/
|
|
206
|
+
Blockly.blockRendering.PathObject.prototype.updateDisabled_ = function(
|
|
207
|
+
disabled) {
|
|
208
|
+
this.setClass_('blocklyDisabled', disabled);
|
|
209
|
+
if (disabled) {
|
|
210
|
+
this.svgPath.setAttribute('fill',
|
|
211
|
+
'url(#' + this.constants.disabledPatternId + ')');
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Add or remove styling showing that a block is selected.
|
|
217
|
+
* @param {boolean} enable True if selection is enabled, false otherwise.
|
|
218
|
+
* @package
|
|
219
|
+
*/
|
|
220
|
+
Blockly.blockRendering.PathObject.prototype.updateSelected = function(enable) {
|
|
221
|
+
this.setClass_('blocklySelected', enable);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Add or remove styling showing that a block is dragged over a delete area.
|
|
226
|
+
* @param {boolean} enable True if the block is being dragged over a delete
|
|
227
|
+
* area, false otherwise.
|
|
228
|
+
* @package
|
|
229
|
+
*/
|
|
230
|
+
Blockly.blockRendering.PathObject.prototype.updateDraggingDelete = function(
|
|
231
|
+
enable) {
|
|
232
|
+
this.setClass_('blocklyDraggingDelete', enable);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Add or remove styling showing that a block is an insertion marker.
|
|
237
|
+
* @param {boolean} enable True if the block is an insertion marker, false
|
|
238
|
+
* otherwise.
|
|
239
|
+
* @package
|
|
240
|
+
*/
|
|
241
|
+
Blockly.blockRendering.PathObject.prototype.updateInsertionMarker = function(
|
|
242
|
+
enable) {
|
|
243
|
+
this.setClass_('blocklyInsertionMarker', enable);
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Add or remove styling showing that a block is movable.
|
|
248
|
+
* @param {boolean} enable True if the block is movable, false otherwise.
|
|
249
|
+
* @package
|
|
250
|
+
*/
|
|
251
|
+
Blockly.blockRendering.PathObject.prototype.updateMovable = function(enable) {
|
|
252
|
+
this.setClass_('blocklyDraggable', enable);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Add or remove styling that shows that if the dragging block is dropped, this
|
|
257
|
+
* block will be replaced. If a shadow block, it will disappear. Otherwise it
|
|
258
|
+
* will bump.
|
|
259
|
+
* @param {boolean} enable True if styling should be added.
|
|
260
|
+
* @package
|
|
261
|
+
*/
|
|
262
|
+
Blockly.blockRendering.PathObject.prototype.updateReplacementFade =
|
|
263
|
+
function(enable) {
|
|
264
|
+
/* eslint-disable indent */
|
|
265
|
+
this.setClass_('blocklyReplaceable', enable);
|
|
266
|
+
}; /* eslint-enable indent */
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Add or remove styling that shows that if the dragging block is dropped, this
|
|
270
|
+
* block will be connected to the input.
|
|
271
|
+
* @param {Blockly.Connection} _conn The connection on the input to highlight.
|
|
272
|
+
* @param {boolean} _enable True if styling should be added.
|
|
273
|
+
* @package
|
|
274
|
+
*/
|
|
275
|
+
Blockly.blockRendering.PathObject.prototype.updateShapeForInputHighlight =
|
|
276
|
+
function(_conn, _enable) {
|
|
277
|
+
/* eslint-disable indent */
|
|
278
|
+
// NOP
|
|
279
|
+
}; /* eslint-enable indent */
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Base renderer.
|
|
9
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.blockRendering.Renderer');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.blockRendering.ConstantProvider');
|
|
16
|
+
goog.require('Blockly.blockRendering.MarkerSvg');
|
|
17
|
+
goog.require('Blockly.blockRendering.Drawer');
|
|
18
|
+
goog.require('Blockly.blockRendering.IPathObject');
|
|
19
|
+
goog.require('Blockly.blockRendering.PathObject');
|
|
20
|
+
goog.require('Blockly.blockRendering.RenderInfo');
|
|
21
|
+
goog.require('Blockly.InsertionMarkerManager');
|
|
22
|
+
|
|
23
|
+
goog.requireType('Blockly.blockRendering.Debug');
|
|
24
|
+
goog.requireType('Blockly.IRegistrable');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The base class for a block renderer.
|
|
29
|
+
* @param {string} name The renderer name.
|
|
30
|
+
* @package
|
|
31
|
+
* @constructor
|
|
32
|
+
* @implements {Blockly.IRegistrable}
|
|
33
|
+
*/
|
|
34
|
+
Blockly.blockRendering.Renderer = function(name) {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The renderer name.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @package
|
|
40
|
+
*/
|
|
41
|
+
this.name = name;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The renderer's constant provider.
|
|
45
|
+
* @type {Blockly.blockRendering.ConstantProvider}
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
this.constants_ = null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Rendering constant overrides, passed in through options.
|
|
52
|
+
* @type {?Object}
|
|
53
|
+
* @package
|
|
54
|
+
*/
|
|
55
|
+
this.overrides = null;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets the class name that identifies this renderer.
|
|
60
|
+
* @return {string} The CSS class name.
|
|
61
|
+
* @package
|
|
62
|
+
*/
|
|
63
|
+
Blockly.blockRendering.Renderer.prototype.getClassName = function() {
|
|
64
|
+
return this.name + '-renderer';
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Initialize the renderer.
|
|
69
|
+
* @param {!Blockly.Theme} theme The workspace theme object.
|
|
70
|
+
* @param {Object=} opt_rendererOverrides Rendering constant overrides.
|
|
71
|
+
* @package
|
|
72
|
+
*/
|
|
73
|
+
Blockly.blockRendering.Renderer.prototype.init = function(theme,
|
|
74
|
+
opt_rendererOverrides) {
|
|
75
|
+
this.constants_ = this.makeConstants_();
|
|
76
|
+
if (opt_rendererOverrides) {
|
|
77
|
+
this.overrides = opt_rendererOverrides;
|
|
78
|
+
Blockly.utils.object.mixin(this.constants_, opt_rendererOverrides);
|
|
79
|
+
}
|
|
80
|
+
this.constants_.setTheme(theme);
|
|
81
|
+
this.constants_.init();
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Create any DOM elements that this renderer needs.
|
|
86
|
+
* @param {!SVGElement} svg The root of the workspace's SVG.
|
|
87
|
+
* @param {!Blockly.Theme} theme The workspace theme object.
|
|
88
|
+
* @package
|
|
89
|
+
*/
|
|
90
|
+
Blockly.blockRendering.Renderer.prototype.createDom = function(svg, theme) {
|
|
91
|
+
this.constants_.createDom(svg, this.name + '-' + theme.name,
|
|
92
|
+
'.' + this.getClassName() + '.' + theme.getClassName());
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Refresh the renderer after a theme change.
|
|
97
|
+
* @param {!SVGElement} svg The root of the workspace's SVG.
|
|
98
|
+
* @param {!Blockly.Theme} theme The workspace theme object.
|
|
99
|
+
* @package
|
|
100
|
+
*/
|
|
101
|
+
Blockly.blockRendering.Renderer.prototype.refreshDom = function(svg, theme) {
|
|
102
|
+
var previousConstants = this.getConstants();
|
|
103
|
+
previousConstants.dispose();
|
|
104
|
+
this.constants_ = this.makeConstants_();
|
|
105
|
+
if (this.overrides) {
|
|
106
|
+
Blockly.utils.object.mixin(this.constants_, this.overrides);
|
|
107
|
+
}
|
|
108
|
+
// Ensure the constant provider's random identifier does not change.
|
|
109
|
+
this.constants_.randomIdentifier = previousConstants.randomIdentifier;
|
|
110
|
+
this.constants_.setTheme(theme);
|
|
111
|
+
this.constants_.init();
|
|
112
|
+
this.createDom(svg, theme);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Dispose of this renderer.
|
|
117
|
+
* Delete all DOM elements that this renderer and its constants created.
|
|
118
|
+
* @package
|
|
119
|
+
*/
|
|
120
|
+
Blockly.blockRendering.Renderer.prototype.dispose = function() {
|
|
121
|
+
if (this.constants_) {
|
|
122
|
+
this.constants_.dispose();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Create a new instance of the renderer's constant provider.
|
|
128
|
+
* @return {!Blockly.blockRendering.ConstantProvider} The constant provider.
|
|
129
|
+
* @protected
|
|
130
|
+
*/
|
|
131
|
+
Blockly.blockRendering.Renderer.prototype.makeConstants_ = function() {
|
|
132
|
+
return new Blockly.blockRendering.ConstantProvider();
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Create a new instance of the renderer's render info object.
|
|
137
|
+
* @param {!Blockly.BlockSvg} block The block to measure.
|
|
138
|
+
* @return {!Blockly.blockRendering.RenderInfo} The render info object.
|
|
139
|
+
* @protected
|
|
140
|
+
*/
|
|
141
|
+
Blockly.blockRendering.Renderer.prototype.makeRenderInfo_ = function(block) {
|
|
142
|
+
return new Blockly.blockRendering.RenderInfo(this, block);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Create a new instance of the renderer's drawer.
|
|
147
|
+
* @param {!Blockly.BlockSvg} block The block to render.
|
|
148
|
+
* @param {!Blockly.blockRendering.RenderInfo} info An object containing all
|
|
149
|
+
* information needed to render this block.
|
|
150
|
+
* @return {!Blockly.blockRendering.Drawer} The drawer.
|
|
151
|
+
* @protected
|
|
152
|
+
*/
|
|
153
|
+
Blockly.blockRendering.Renderer.prototype.makeDrawer_ = function(block, info) {
|
|
154
|
+
return new Blockly.blockRendering.Drawer(block, info);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Create a new instance of the renderer's debugger.
|
|
159
|
+
* @return {!Blockly.blockRendering.Debug} The renderer debugger.
|
|
160
|
+
* @suppress {strictModuleDepCheck} Debug renderer only included in playground.
|
|
161
|
+
* @protected
|
|
162
|
+
*/
|
|
163
|
+
Blockly.blockRendering.Renderer.prototype.makeDebugger_ = function() {
|
|
164
|
+
if (!Blockly.blockRendering.Debug) {
|
|
165
|
+
throw Error('Missing require for Blockly.blockRendering.Debug');
|
|
166
|
+
}
|
|
167
|
+
return new Blockly.blockRendering.Debug(this.getConstants());
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Create a new instance of the renderer's marker drawer.
|
|
172
|
+
* @param {!Blockly.WorkspaceSvg} workspace The workspace the marker belongs to.
|
|
173
|
+
* @param {!Blockly.Marker} marker The marker.
|
|
174
|
+
* @return {!Blockly.blockRendering.MarkerSvg} The object in charge of drawing
|
|
175
|
+
* the marker.
|
|
176
|
+
* @package
|
|
177
|
+
*/
|
|
178
|
+
Blockly.blockRendering.Renderer.prototype.makeMarkerDrawer = function(
|
|
179
|
+
workspace, marker) {
|
|
180
|
+
return new Blockly.blockRendering.MarkerSvg(workspace, this.getConstants(), marker);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Create a new instance of a renderer path object.
|
|
185
|
+
* @param {!SVGElement} root The root SVG element.
|
|
186
|
+
* @param {!Blockly.Theme.BlockStyle} style The style object to use for
|
|
187
|
+
* colouring.
|
|
188
|
+
* @return {!Blockly.blockRendering.IPathObject} The renderer path object.
|
|
189
|
+
* @package
|
|
190
|
+
*/
|
|
191
|
+
Blockly.blockRendering.Renderer.prototype.makePathObject = function(root,
|
|
192
|
+
style) {
|
|
193
|
+
return new Blockly.blockRendering.PathObject(root, style,
|
|
194
|
+
/** @type {!Blockly.blockRendering.ConstantProvider} */ (this.constants_));
|
|
195
|
+
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Get the current renderer's constant provider. We assume that when this is
|
|
200
|
+
* called, the renderer has already been initialized.
|
|
201
|
+
* @return {!Blockly.blockRendering.ConstantProvider} The constant provider.
|
|
202
|
+
* @package
|
|
203
|
+
*/
|
|
204
|
+
Blockly.blockRendering.Renderer.prototype.getConstants = function() {
|
|
205
|
+
return (
|
|
206
|
+
/** @type {!Blockly.blockRendering.ConstantProvider} */
|
|
207
|
+
(this.constants_));
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Determine whether or not to highlight a connection.
|
|
212
|
+
* @param {Blockly.Connection} _conn The connection to determine whether or not
|
|
213
|
+
* to highlight.
|
|
214
|
+
* @return {boolean} True if we should highlight the connection.
|
|
215
|
+
* @package
|
|
216
|
+
*/
|
|
217
|
+
Blockly.blockRendering.Renderer.prototype.shouldHighlightConnection =
|
|
218
|
+
function(_conn) {
|
|
219
|
+
/* eslint-disable indent */
|
|
220
|
+
return true;
|
|
221
|
+
}; /* eslint-enable indent */
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Checks if an orphaned block can connect to the "end" of the topBlock's
|
|
225
|
+
* block-clump. If the clump is a row the end is the last input. If the clump
|
|
226
|
+
* is a stack, the end is the last next connection. If the clump is neither,
|
|
227
|
+
* then this returns false.
|
|
228
|
+
* @param {!Blockly.BlockSvg} topBlock The top block of the block clump we want to try and
|
|
229
|
+
* connect to.
|
|
230
|
+
* @param {!Blockly.BlockSvg} orphanBlock The orphan block that wants to find
|
|
231
|
+
* a home.
|
|
232
|
+
* @param {number} localType The type of the connection being dragged.
|
|
233
|
+
* @return {boolean} Whether there is a home for the orphan or not.
|
|
234
|
+
* @package
|
|
235
|
+
*/
|
|
236
|
+
Blockly.blockRendering.Renderer.prototype.orphanCanConnectAtEnd =
|
|
237
|
+
function(topBlock, orphanBlock, localType) {
|
|
238
|
+
var orphanConnection = null;
|
|
239
|
+
var lastConnection = null;
|
|
240
|
+
if (localType == Blockly.OUTPUT_VALUE) { // We are replacing an output.
|
|
241
|
+
orphanConnection = orphanBlock.outputConnection;
|
|
242
|
+
// TODO: I don't think this function necessarily has the correct logic,
|
|
243
|
+
// but for now it is being kept for behavioral backwards-compat.
|
|
244
|
+
lastConnection = Blockly.Connection
|
|
245
|
+
.lastConnectionInRow(
|
|
246
|
+
/** @type {!Blockly.Block} **/ (topBlock), orphanBlock);
|
|
247
|
+
} else { // We are replacing a previous.
|
|
248
|
+
orphanConnection = orphanBlock.previousConnection;
|
|
249
|
+
// TODO: This lives on the block while lastConnectionInRow lives on
|
|
250
|
+
// on the connection. Something is fishy.
|
|
251
|
+
lastConnection = topBlock.lastConnectionInStack();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (!lastConnection) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
return orphanConnection.getConnectionChecker().canConnect(
|
|
258
|
+
lastConnection, orphanConnection, false);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Chooses a connection preview method based on the available connection, the
|
|
263
|
+
* current dragged connection, and the block being dragged.
|
|
264
|
+
* @param {!Blockly.RenderedConnection} closest The available connection.
|
|
265
|
+
* @param {!Blockly.RenderedConnection} local The connection currently being
|
|
266
|
+
* dragged.
|
|
267
|
+
* @param {!Blockly.BlockSvg} topBlock The block currently being dragged.
|
|
268
|
+
* @return {!Blockly.InsertionMarkerManager.PREVIEW_TYPE} The preview type
|
|
269
|
+
* to display.
|
|
270
|
+
* @package
|
|
271
|
+
*/
|
|
272
|
+
Blockly.blockRendering.Renderer.prototype.getConnectionPreviewMethod =
|
|
273
|
+
function(closest, local, topBlock) {
|
|
274
|
+
if (local.type == Blockly.OUTPUT_VALUE ||
|
|
275
|
+
local.type == Blockly.PREVIOUS_STATEMENT) {
|
|
276
|
+
if (!closest.isConnected() ||
|
|
277
|
+
this.orphanCanConnectAtEnd(
|
|
278
|
+
topBlock,
|
|
279
|
+
/** @type {!Blockly.BlockSvg} */ (closest.targetBlock()),
|
|
280
|
+
local.type)) {
|
|
281
|
+
return Blockly.InsertionMarkerManager.PREVIEW_TYPE.INSERTION_MARKER;
|
|
282
|
+
}
|
|
283
|
+
return Blockly.InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return Blockly.InsertionMarkerManager.PREVIEW_TYPE.INSERTION_MARKER;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Render the block.
|
|
291
|
+
* @param {!Blockly.BlockSvg} block The block to render.
|
|
292
|
+
* @package
|
|
293
|
+
*/
|
|
294
|
+
Blockly.blockRendering.Renderer.prototype.render = function(block) {
|
|
295
|
+
if (Blockly.blockRendering.useDebugger && !block.renderingDebugger) {
|
|
296
|
+
block.renderingDebugger = this.makeDebugger_();
|
|
297
|
+
}
|
|
298
|
+
var info = this.makeRenderInfo_(block);
|
|
299
|
+
info.measure();
|
|
300
|
+
this.makeDrawer_(block, info).draw();
|
|
301
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview An object that provides constants for rendering blocks in Geras
|
|
9
|
+
* mode.
|
|
10
|
+
* @author kozbial@google.com (Monica Kozbial)
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
goog.provide('Blockly.geras.ConstantProvider');
|
|
15
|
+
|
|
16
|
+
goog.require('Blockly.blockRendering.ConstantProvider');
|
|
17
|
+
goog.require('Blockly.utils.object');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* An object that provides constants for rendering blocks in Geras mode.
|
|
22
|
+
* @constructor
|
|
23
|
+
* @package
|
|
24
|
+
* @extends {Blockly.blockRendering.ConstantProvider}
|
|
25
|
+
*/
|
|
26
|
+
Blockly.geras.ConstantProvider = function() {
|
|
27
|
+
Blockly.geras.ConstantProvider.superClass_.constructor.call(this);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @override
|
|
31
|
+
*/
|
|
32
|
+
this.FIELD_TEXT_BASELINE_CENTER = false;
|
|
33
|
+
|
|
34
|
+
// The dark/shadow path in classic rendering is the same as the normal block
|
|
35
|
+
// path, but translated down one and right one.
|
|
36
|
+
this.DARK_PATH_OFFSET = 1;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The maximum width of a bottom row that follows a statement input and has
|
|
40
|
+
* inputs inline.
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
43
|
+
this.MAX_BOTTOM_WIDTH = 30;
|
|
44
|
+
};
|
|
45
|
+
Blockly.utils.object.inherits(Blockly.geras.ConstantProvider,
|
|
46
|
+
Blockly.blockRendering.ConstantProvider);
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @override
|
|
51
|
+
*/
|
|
52
|
+
Blockly.geras.ConstantProvider.prototype.getCSS_ = function(selector) {
|
|
53
|
+
return Blockly.geras.ConstantProvider.superClass_.getCSS_.call(this, selector)
|
|
54
|
+
.concat([
|
|
55
|
+
/* eslint-disable indent */
|
|
56
|
+
// Insertion marker.
|
|
57
|
+
selector + ' .blocklyInsertionMarker>.blocklyPathLight,',
|
|
58
|
+
selector + ' .blocklyInsertionMarker>.blocklyPathDark {',
|
|
59
|
+
'fill-opacity: ' + this.INSERTION_MARKER_OPACITY + ';',
|
|
60
|
+
'stroke: none;',
|
|
61
|
+
'}',
|
|
62
|
+
/* eslint-enable indent */
|
|
63
|
+
]);
|
|
64
|
+
};
|