nodeskini 1.0.1 → 1.0.3
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 +5 -5
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Methods for graphically rendering a block as SVG.
|
|
9
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.blockRendering.Drawer');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.blockRendering.BottomRow');
|
|
16
|
+
goog.require('Blockly.blockRendering.InputRow');
|
|
17
|
+
goog.require('Blockly.blockRendering.Measurable');
|
|
18
|
+
goog.require('Blockly.blockRendering.RenderInfo');
|
|
19
|
+
goog.require('Blockly.blockRendering.Row');
|
|
20
|
+
goog.require('Blockly.blockRendering.SpacerRow');
|
|
21
|
+
goog.require('Blockly.blockRendering.TopRow');
|
|
22
|
+
goog.require('Blockly.blockRendering.Types');
|
|
23
|
+
goog.require('Blockly.utils.svgPaths');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* An object that draws a block based on the given rendering information.
|
|
28
|
+
* @param {!Blockly.BlockSvg} block The block to render.
|
|
29
|
+
* @param {!Blockly.blockRendering.RenderInfo} info An object containing all
|
|
30
|
+
* information needed to render this block.
|
|
31
|
+
* @package
|
|
32
|
+
* @constructor
|
|
33
|
+
*/
|
|
34
|
+
Blockly.blockRendering.Drawer = function(block, info) {
|
|
35
|
+
this.block_ = block;
|
|
36
|
+
this.info_ = info;
|
|
37
|
+
this.topLeft_ = block.getRelativeToSurfaceXY();
|
|
38
|
+
this.outlinePath_ = '';
|
|
39
|
+
this.inlinePath_ = '';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The renderer's constant provider.
|
|
43
|
+
* @type {!Blockly.blockRendering.ConstantProvider}
|
|
44
|
+
* @protected
|
|
45
|
+
*/
|
|
46
|
+
this.constants_ = info.getRenderer().getConstants();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Draw the block to the workspace. Here "drawing" means setting SVG path
|
|
51
|
+
* elements and moving fields, icons, and connections on the screen.
|
|
52
|
+
*
|
|
53
|
+
* The pieces of the paths are pushed into arrays of "steps", which are then
|
|
54
|
+
* joined with spaces and set directly on the block. This guarantees that
|
|
55
|
+
* the steps are separated by spaces for improved readability, but isn't
|
|
56
|
+
* required.
|
|
57
|
+
* @package
|
|
58
|
+
*/
|
|
59
|
+
Blockly.blockRendering.Drawer.prototype.draw = function() {
|
|
60
|
+
this.hideHiddenIcons_();
|
|
61
|
+
this.drawOutline_();
|
|
62
|
+
this.drawInternals_();
|
|
63
|
+
|
|
64
|
+
this.block_.pathObject.setPath(this.outlinePath_ + '\n' + this.inlinePath_);
|
|
65
|
+
if (this.info_.RTL) {
|
|
66
|
+
this.block_.pathObject.flipRTL();
|
|
67
|
+
}
|
|
68
|
+
if (Blockly.blockRendering.useDebugger) {
|
|
69
|
+
this.block_.renderingDebugger.drawDebug(this.block_, this.info_);
|
|
70
|
+
}
|
|
71
|
+
this.recordSizeOnBlock_();
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Save sizing information back to the block
|
|
76
|
+
* Most of the rendering information can be thrown away at the end of the
|
|
77
|
+
* render. Anything that needs to be kept around should be set in this function.
|
|
78
|
+
* @protected
|
|
79
|
+
*/
|
|
80
|
+
Blockly.blockRendering.Drawer.prototype.recordSizeOnBlock_ = function() {
|
|
81
|
+
// This is used when the block is reporting its size to anyone else.
|
|
82
|
+
// The dark path adds to the size of the block in both X and Y.
|
|
83
|
+
this.block_.height = this.info_.height;
|
|
84
|
+
this.block_.width = this.info_.widthWithChildren;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Hide icons that were marked as hidden.
|
|
89
|
+
* @protected
|
|
90
|
+
*/
|
|
91
|
+
Blockly.blockRendering.Drawer.prototype.hideHiddenIcons_ = function() {
|
|
92
|
+
for (var i = 0, iconInfo; (iconInfo = this.info_.hiddenIcons[i]); i++) {
|
|
93
|
+
iconInfo.icon.iconGroup_.setAttribute('display', 'none');
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Create the outline of the block. This is a single continuous path.
|
|
99
|
+
* @protected
|
|
100
|
+
*/
|
|
101
|
+
Blockly.blockRendering.Drawer.prototype.drawOutline_ = function() {
|
|
102
|
+
this.drawTop_();
|
|
103
|
+
for (var r = 1; r < this.info_.rows.length - 1; r++) {
|
|
104
|
+
var row = this.info_.rows[r];
|
|
105
|
+
if (row.hasJaggedEdge) {
|
|
106
|
+
this.drawJaggedEdge_(row);
|
|
107
|
+
} else if (row.hasStatement) {
|
|
108
|
+
this.drawStatementInput_(row);
|
|
109
|
+
} else if (row.hasExternalInput) {
|
|
110
|
+
this.drawValueInput_(row);
|
|
111
|
+
} else {
|
|
112
|
+
this.drawRightSideRow_(row);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
this.drawBottom_();
|
|
116
|
+
this.drawLeft_();
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Add steps for the top corner of the block, taking into account
|
|
122
|
+
* details such as hats and rounded corners.
|
|
123
|
+
* @protected
|
|
124
|
+
*/
|
|
125
|
+
Blockly.blockRendering.Drawer.prototype.drawTop_ = function() {
|
|
126
|
+
var topRow = this.info_.topRow;
|
|
127
|
+
var elements = topRow.elements;
|
|
128
|
+
|
|
129
|
+
this.positionPreviousConnection_();
|
|
130
|
+
this.outlinePath_ +=
|
|
131
|
+
Blockly.utils.svgPaths.moveBy(topRow.xPos, this.info_.startY);
|
|
132
|
+
for (var i = 0, elem; (elem = elements[i]); i++) {
|
|
133
|
+
if (Blockly.blockRendering.Types.isLeftRoundedCorner(elem)) {
|
|
134
|
+
this.outlinePath_ +=
|
|
135
|
+
this.constants_.OUTSIDE_CORNERS.topLeft;
|
|
136
|
+
} else if (Blockly.blockRendering.Types.isRightRoundedCorner(elem)) {
|
|
137
|
+
this.outlinePath_ +=
|
|
138
|
+
this.constants_.OUTSIDE_CORNERS.topRight;
|
|
139
|
+
} else if (Blockly.blockRendering.Types.isPreviousConnection(elem)) {
|
|
140
|
+
this.outlinePath_ += elem.shape.pathLeft;
|
|
141
|
+
} else if (Blockly.blockRendering.Types.isHat(elem)) {
|
|
142
|
+
this.outlinePath_ += this.constants_.START_HAT.path;
|
|
143
|
+
} else if (Blockly.blockRendering.Types.isSpacer(elem)) {
|
|
144
|
+
this.outlinePath_ += Blockly.utils.svgPaths.lineOnAxis('h', elem.width);
|
|
145
|
+
}
|
|
146
|
+
// No branch for a square corner, because it's a no-op.
|
|
147
|
+
}
|
|
148
|
+
this.outlinePath_ += Blockly.utils.svgPaths.lineOnAxis('v', topRow.height);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Add steps for the jagged edge of a row on a collapsed block.
|
|
153
|
+
* @param {!Blockly.blockRendering.Row} row The row to draw the side of.
|
|
154
|
+
* @protected
|
|
155
|
+
*/
|
|
156
|
+
Blockly.blockRendering.Drawer.prototype.drawJaggedEdge_ = function(row) {
|
|
157
|
+
var remainder =
|
|
158
|
+
row.height - this.constants_.JAGGED_TEETH.height;
|
|
159
|
+
this.outlinePath_ += this.constants_.JAGGED_TEETH.path +
|
|
160
|
+
Blockly.utils.svgPaths.lineOnAxis('v', remainder);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Add steps for an external value input, rendered as a notch in the side
|
|
165
|
+
* of the block.
|
|
166
|
+
* @param {!Blockly.blockRendering.Row} row The row that this input
|
|
167
|
+
* belongs to.
|
|
168
|
+
* @protected
|
|
169
|
+
*/
|
|
170
|
+
Blockly.blockRendering.Drawer.prototype.drawValueInput_ = function(row) {
|
|
171
|
+
var input = row.getLastInput();
|
|
172
|
+
this.positionExternalValueConnection_(row);
|
|
173
|
+
|
|
174
|
+
var pathDown = (typeof input.shape.pathDown == "function") ?
|
|
175
|
+
input.shape.pathDown(input.height) :
|
|
176
|
+
input.shape.pathDown;
|
|
177
|
+
|
|
178
|
+
this.outlinePath_ +=
|
|
179
|
+
Blockly.utils.svgPaths.lineOnAxis('H', input.xPos + input.width) +
|
|
180
|
+
pathDown +
|
|
181
|
+
Blockly.utils.svgPaths.lineOnAxis('v', row.height - input.connectionHeight);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Add steps for a statement input.
|
|
187
|
+
* @param {!Blockly.blockRendering.Row} row The row that this input
|
|
188
|
+
* belongs to.
|
|
189
|
+
* @protected
|
|
190
|
+
*/
|
|
191
|
+
Blockly.blockRendering.Drawer.prototype.drawStatementInput_ = function(row) {
|
|
192
|
+
var input = row.getLastInput();
|
|
193
|
+
// Where to start drawing the notch, which is on the right side in LTR.
|
|
194
|
+
var x = input.xPos + input.notchOffset + input.shape.width;
|
|
195
|
+
|
|
196
|
+
var innerTopLeftCorner =
|
|
197
|
+
input.shape.pathRight +
|
|
198
|
+
Blockly.utils.svgPaths.lineOnAxis('h',
|
|
199
|
+
-(input.notchOffset - this.constants_.INSIDE_CORNERS.width)) +
|
|
200
|
+
this.constants_.INSIDE_CORNERS.pathTop;
|
|
201
|
+
|
|
202
|
+
var innerHeight =
|
|
203
|
+
row.height - (2 * this.constants_.INSIDE_CORNERS.height);
|
|
204
|
+
|
|
205
|
+
this.outlinePath_ += Blockly.utils.svgPaths.lineOnAxis('H', x) +
|
|
206
|
+
innerTopLeftCorner +
|
|
207
|
+
Blockly.utils.svgPaths.lineOnAxis('v', innerHeight) +
|
|
208
|
+
this.constants_.INSIDE_CORNERS.pathBottom +
|
|
209
|
+
Blockly.utils.svgPaths.lineOnAxis('H', row.xPos + row.width);
|
|
210
|
+
|
|
211
|
+
this.positionStatementInputConnection_(row);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Add steps for the right side of a row that does not have value or
|
|
216
|
+
* statement input connections.
|
|
217
|
+
* @param {!Blockly.blockRendering.Row} row The row to draw the
|
|
218
|
+
* side of.
|
|
219
|
+
* @protected
|
|
220
|
+
*/
|
|
221
|
+
Blockly.blockRendering.Drawer.prototype.drawRightSideRow_ = function(row) {
|
|
222
|
+
this.outlinePath_ +=
|
|
223
|
+
Blockly.utils.svgPaths.lineOnAxis('V', row.yPos + row.height);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Add steps for the bottom edge of a block, possibly including a notch
|
|
229
|
+
* for the next connection
|
|
230
|
+
* @protected
|
|
231
|
+
*/
|
|
232
|
+
Blockly.blockRendering.Drawer.prototype.drawBottom_ = function() {
|
|
233
|
+
var bottomRow = this.info_.bottomRow;
|
|
234
|
+
var elems = bottomRow.elements;
|
|
235
|
+
this.positionNextConnection_();
|
|
236
|
+
|
|
237
|
+
var rightCornerYOffset = 0;
|
|
238
|
+
var outlinePath = '';
|
|
239
|
+
for (var i = elems.length - 1, elem; (elem = elems[i]); i--) {
|
|
240
|
+
if (Blockly.blockRendering.Types.isNextConnection(elem)) {
|
|
241
|
+
outlinePath += elem.shape.pathRight;
|
|
242
|
+
} else if (Blockly.blockRendering.Types.isLeftSquareCorner(elem)) {
|
|
243
|
+
outlinePath += Blockly.utils.svgPaths.lineOnAxis('H', bottomRow.xPos);
|
|
244
|
+
} else if (Blockly.blockRendering.Types.isLeftRoundedCorner(elem)) {
|
|
245
|
+
outlinePath += this.constants_.OUTSIDE_CORNERS.bottomLeft;
|
|
246
|
+
} else if (Blockly.blockRendering.Types.isRightRoundedCorner(elem)) {
|
|
247
|
+
outlinePath += this.constants_.OUTSIDE_CORNERS.bottomRight;
|
|
248
|
+
rightCornerYOffset = this.constants_.OUTSIDE_CORNERS.rightHeight;
|
|
249
|
+
} else if (Blockly.blockRendering.Types.isSpacer(elem)) {
|
|
250
|
+
outlinePath += Blockly.utils.svgPaths.lineOnAxis('h', elem.width * -1);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
this.outlinePath_ += Blockly.utils.svgPaths.lineOnAxis('V',
|
|
255
|
+
bottomRow.baseline - rightCornerYOffset);
|
|
256
|
+
this.outlinePath_ += outlinePath;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Add steps for the left side of the block, which may include an output
|
|
261
|
+
* connection
|
|
262
|
+
* @protected
|
|
263
|
+
*/
|
|
264
|
+
Blockly.blockRendering.Drawer.prototype.drawLeft_ = function() {
|
|
265
|
+
var outputConnection = this.info_.outputConnection;
|
|
266
|
+
this.positionOutputConnection_();
|
|
267
|
+
|
|
268
|
+
if (outputConnection) {
|
|
269
|
+
var tabBottom = outputConnection.connectionOffsetY +
|
|
270
|
+
outputConnection.height;
|
|
271
|
+
var pathUp = (typeof outputConnection.shape.pathUp == "function") ?
|
|
272
|
+
outputConnection.shape.pathUp(outputConnection.height) :
|
|
273
|
+
outputConnection.shape.pathUp;
|
|
274
|
+
|
|
275
|
+
// Draw a line up to the bottom of the tab.
|
|
276
|
+
this.outlinePath_ +=
|
|
277
|
+
Blockly.utils.svgPaths.lineOnAxis('V', tabBottom) +
|
|
278
|
+
pathUp;
|
|
279
|
+
}
|
|
280
|
+
// Close off the path. This draws a vertical line up to the start of the
|
|
281
|
+
// block's path, which may be either a rounded or a sharp corner.
|
|
282
|
+
this.outlinePath_ += 'z';
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Draw the internals of the block: inline inputs, fields, and icons. These do
|
|
287
|
+
* not depend on the outer path for placement.
|
|
288
|
+
* @protected
|
|
289
|
+
*/
|
|
290
|
+
Blockly.blockRendering.Drawer.prototype.drawInternals_ = function() {
|
|
291
|
+
for (var i = 0, row; (row = this.info_.rows[i]); i++) {
|
|
292
|
+
for (var j = 0, elem; (elem = row.elements[j]); j++) {
|
|
293
|
+
if (Blockly.blockRendering.Types.isInlineInput(elem)) {
|
|
294
|
+
this.drawInlineInput_(
|
|
295
|
+
/** @type {!Blockly.blockRendering.InlineInput} */ (elem));
|
|
296
|
+
} else if (Blockly.blockRendering.Types.isIcon(elem) ||
|
|
297
|
+
Blockly.blockRendering.Types.isField(elem)) {
|
|
298
|
+
this.layoutField_(
|
|
299
|
+
/** @type {!Blockly.blockRendering.Field|!Blockly.blockRendering.Icon} */
|
|
300
|
+
(elem));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Push a field or icon's new position to its SVG root.
|
|
308
|
+
* @param {!Blockly.blockRendering.Icon|!Blockly.blockRendering.Field} fieldInfo
|
|
309
|
+
* The rendering information for the field or icon.
|
|
310
|
+
* @protected
|
|
311
|
+
*/
|
|
312
|
+
Blockly.blockRendering.Drawer.prototype.layoutField_ = function(fieldInfo) {
|
|
313
|
+
if (Blockly.blockRendering.Types.isField(fieldInfo)) {
|
|
314
|
+
var svgGroup = fieldInfo.field.getSvgRoot();
|
|
315
|
+
} else if (Blockly.blockRendering.Types.isIcon(fieldInfo)) {
|
|
316
|
+
var svgGroup = fieldInfo.icon.iconGroup_;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
var yPos = fieldInfo.centerline - fieldInfo.height / 2;
|
|
320
|
+
var xPos = fieldInfo.xPos;
|
|
321
|
+
var scale = '';
|
|
322
|
+
if (this.info_.RTL) {
|
|
323
|
+
xPos = -(xPos + fieldInfo.width);
|
|
324
|
+
if (fieldInfo.flipRtl) {
|
|
325
|
+
xPos += fieldInfo.width;
|
|
326
|
+
scale = 'scale(-1 1)';
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (Blockly.blockRendering.Types.isIcon(fieldInfo)) {
|
|
330
|
+
svgGroup.setAttribute('display', 'block');
|
|
331
|
+
svgGroup.setAttribute('transform', 'translate(' + xPos + ',' + yPos + ')');
|
|
332
|
+
fieldInfo.icon.computeIconLocation();
|
|
333
|
+
} else {
|
|
334
|
+
svgGroup.setAttribute(
|
|
335
|
+
'transform', 'translate(' + xPos + ',' + yPos + ')' + scale);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (this.info_.isInsertionMarker) {
|
|
339
|
+
// Fields and icons are invisible on insertion marker. They still have to
|
|
340
|
+
// be rendered so that the block can be sized correctly.
|
|
341
|
+
svgGroup.setAttribute('display', 'none');
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Add steps for an inline input.
|
|
347
|
+
* @param {!Blockly.blockRendering.InlineInput} input The information about the
|
|
348
|
+
* input to render.
|
|
349
|
+
* @protected
|
|
350
|
+
*/
|
|
351
|
+
Blockly.blockRendering.Drawer.prototype.drawInlineInput_ = function(input) {
|
|
352
|
+
var width = input.width;
|
|
353
|
+
var height = input.height;
|
|
354
|
+
var yPos = input.centerline - height / 2;
|
|
355
|
+
|
|
356
|
+
var connectionTop = input.connectionOffsetY;
|
|
357
|
+
var connectionBottom = input.connectionHeight + connectionTop;
|
|
358
|
+
var connectionRight = input.xPos + input.connectionWidth;
|
|
359
|
+
|
|
360
|
+
this.inlinePath_ += Blockly.utils.svgPaths.moveTo(connectionRight, yPos) +
|
|
361
|
+
Blockly.utils.svgPaths.lineOnAxis('v', connectionTop) +
|
|
362
|
+
input.shape.pathDown +
|
|
363
|
+
Blockly.utils.svgPaths.lineOnAxis('v', height - connectionBottom) +
|
|
364
|
+
Blockly.utils.svgPaths.lineOnAxis('h', width - input.connectionWidth) +
|
|
365
|
+
Blockly.utils.svgPaths.lineOnAxis('v', -height) +
|
|
366
|
+
'z';
|
|
367
|
+
|
|
368
|
+
this.positionInlineInputConnection_(input);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Position the connection on an inline value input, taking into account
|
|
373
|
+
* RTL and the small gap between the parent block and child block which lets the
|
|
374
|
+
* parent block's dark path show through.
|
|
375
|
+
* @param {Blockly.blockRendering.InlineInput} input The information about
|
|
376
|
+
* the input that the connection is on.
|
|
377
|
+
* @protected
|
|
378
|
+
*/
|
|
379
|
+
Blockly.blockRendering.Drawer.prototype.positionInlineInputConnection_ = function(input) {
|
|
380
|
+
var yPos = input.centerline - input.height / 2;
|
|
381
|
+
// Move the connection.
|
|
382
|
+
if (input.connectionModel) {
|
|
383
|
+
// xPos already contains info about startX
|
|
384
|
+
var connX = input.xPos + input.connectionWidth + input.connectionOffsetX;
|
|
385
|
+
if (this.info_.RTL) {
|
|
386
|
+
connX *= -1;
|
|
387
|
+
}
|
|
388
|
+
input.connectionModel.setOffsetInBlock(connX,
|
|
389
|
+
yPos + input.connectionOffsetY);
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Position the connection on a statement input, taking into account
|
|
395
|
+
* RTL and the small gap between the parent block and child block which lets the
|
|
396
|
+
* parent block's dark path show through.
|
|
397
|
+
* @param {!Blockly.blockRendering.Row} row The row that the connection is on.
|
|
398
|
+
* @protected
|
|
399
|
+
*/
|
|
400
|
+
Blockly.blockRendering.Drawer.prototype.positionStatementInputConnection_ = function(row) {
|
|
401
|
+
var input = row.getLastInput();
|
|
402
|
+
if (input.connectionModel) {
|
|
403
|
+
var connX = row.xPos + row.statementEdge + input.notchOffset;
|
|
404
|
+
if (this.info_.RTL) {
|
|
405
|
+
connX *= -1;
|
|
406
|
+
}
|
|
407
|
+
input.connectionModel.setOffsetInBlock(connX, row.yPos);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Position the connection on an external value input, taking into account
|
|
413
|
+
* RTL and the small gap between the parent block and child block which lets the
|
|
414
|
+
* parent block's dark path show through.
|
|
415
|
+
* @param {!Blockly.blockRendering.Row} row The row that the connection is on.
|
|
416
|
+
* @protected
|
|
417
|
+
*/
|
|
418
|
+
Blockly.blockRendering.Drawer.prototype.positionExternalValueConnection_ = function(row) {
|
|
419
|
+
var input = row.getLastInput();
|
|
420
|
+
if (input.connectionModel) {
|
|
421
|
+
var connX = row.xPos + row.width;
|
|
422
|
+
if (this.info_.RTL) {
|
|
423
|
+
connX *= -1;
|
|
424
|
+
}
|
|
425
|
+
input.connectionModel.setOffsetInBlock(connX, row.yPos);
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Position the previous connection on a block.
|
|
431
|
+
* @protected
|
|
432
|
+
*/
|
|
433
|
+
Blockly.blockRendering.Drawer.prototype.positionPreviousConnection_ = function() {
|
|
434
|
+
var topRow = this.info_.topRow;
|
|
435
|
+
if (topRow.connection) {
|
|
436
|
+
var x = topRow.xPos + topRow.notchOffset;
|
|
437
|
+
var connX = (this.info_.RTL ? -x : x);
|
|
438
|
+
topRow.connection.connectionModel.setOffsetInBlock(connX, 0);
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Position the next connection on a block.
|
|
444
|
+
* @protected
|
|
445
|
+
*/
|
|
446
|
+
Blockly.blockRendering.Drawer.prototype.positionNextConnection_ = function() {
|
|
447
|
+
var bottomRow = this.info_.bottomRow;
|
|
448
|
+
|
|
449
|
+
if (bottomRow.connection) {
|
|
450
|
+
var connInfo = bottomRow.connection;
|
|
451
|
+
var x = connInfo.xPos; // Already contains info about startX
|
|
452
|
+
var connX = (this.info_.RTL ? -x : x);
|
|
453
|
+
connInfo.connectionModel.setOffsetInBlock(connX, bottomRow.baseline);
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Position the output connection on a block.
|
|
459
|
+
* @protected
|
|
460
|
+
*/
|
|
461
|
+
Blockly.blockRendering.Drawer.prototype.positionOutputConnection_ = function() {
|
|
462
|
+
if (this.info_.outputConnection) {
|
|
463
|
+
var x = this.info_.startX + this.info_.outputConnection.connectionOffsetX;
|
|
464
|
+
var connX = this.info_.RTL ? -x : x;
|
|
465
|
+
this.block_.outputConnection.setOffsetInBlock(connX,
|
|
466
|
+
this.info_.outputConnection.connectionOffsetY);
|
|
467
|
+
}
|
|
468
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview The interface for an object that owns a block's rendering SVG
|
|
9
|
+
* elements.
|
|
10
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
goog.provide('Blockly.blockRendering.IPathObject');
|
|
16
|
+
|
|
17
|
+
goog.requireType('Blockly.blockRendering.ConstantProvider');
|
|
18
|
+
goog.requireType('Blockly.Theme');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* An interface for a block's path object.
|
|
23
|
+
* @param {!SVGElement} _root The root SVG element.
|
|
24
|
+
* @param {!Blockly.blockRendering.ConstantProvider} _constants The renderer's
|
|
25
|
+
* constants.
|
|
26
|
+
* @interface
|
|
27
|
+
*/
|
|
28
|
+
Blockly.blockRendering.IPathObject = function(_root, _constants) {};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The primary path of the block.
|
|
32
|
+
* @type {!SVGElement}
|
|
33
|
+
*/
|
|
34
|
+
Blockly.blockRendering.IPathObject.prototype.svgPath;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The renderer's constant provider.
|
|
38
|
+
* @type {!Blockly.blockRendering.ConstantProvider}
|
|
39
|
+
*/
|
|
40
|
+
Blockly.blockRendering.IPathObject.prototype.constants;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The primary path of the block.
|
|
44
|
+
* @type {!Blockly.Theme.BlockStyle}
|
|
45
|
+
*/
|
|
46
|
+
Blockly.blockRendering.IPathObject.prototype.style;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Holds the cursors svg element when the cursor is attached to the block.
|
|
50
|
+
* This is null if there is no cursor on the block.
|
|
51
|
+
* @type {SVGElement}
|
|
52
|
+
*/
|
|
53
|
+
Blockly.blockRendering.IPathObject.prototype.cursorSvg;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Holds the markers svg element when the marker is attached to the block.
|
|
57
|
+
* This is null if there is no marker on the block.
|
|
58
|
+
* @type {SVGElement}
|
|
59
|
+
*/
|
|
60
|
+
Blockly.blockRendering.IPathObject.prototype.markerSvg;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Set the path generated by the renderer onto the respective SVG element.
|
|
64
|
+
* @param {string} pathString The path.
|
|
65
|
+
* @package
|
|
66
|
+
*/
|
|
67
|
+
Blockly.blockRendering.IPathObject.prototype.setPath;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Apply the stored colours to the block's path, taking into account whether
|
|
71
|
+
* the paths belong to a shadow block.
|
|
72
|
+
* @param {!Blockly.Block} block The source block.
|
|
73
|
+
* @package
|
|
74
|
+
*/
|
|
75
|
+
Blockly.blockRendering.IPathObject.prototype.applyColour;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Update the style.
|
|
79
|
+
* @param {!Blockly.Theme.BlockStyle} blockStyle The block style to use.
|
|
80
|
+
* @package
|
|
81
|
+
*/
|
|
82
|
+
Blockly.blockRendering.IPathObject.prototype.setStyle;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Flip the SVG paths in RTL.
|
|
86
|
+
* @package
|
|
87
|
+
*/
|
|
88
|
+
Blockly.blockRendering.IPathObject.prototype.flipRTL;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Add the cursor svg to this block's svg group.
|
|
92
|
+
* @param {SVGElement} cursorSvg The svg root of the cursor to be added to the
|
|
93
|
+
* block svg group.
|
|
94
|
+
* @package
|
|
95
|
+
*/
|
|
96
|
+
Blockly.blockRendering.IPathObject.prototype.setCursorSvg;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Add the marker svg to this block's svg group.
|
|
100
|
+
* @param {SVGElement} markerSvg The svg root of the marker to be added to the
|
|
101
|
+
* block svg group.
|
|
102
|
+
* @package
|
|
103
|
+
*/
|
|
104
|
+
Blockly.blockRendering.IPathObject.prototype.setMarkerSvg;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Set whether the block shows a highlight or not. Block highlighting is
|
|
108
|
+
* often used to visually mark blocks currently being executed.
|
|
109
|
+
* @param {boolean} highlighted True if highlighted.
|
|
110
|
+
* @package
|
|
111
|
+
*/
|
|
112
|
+
Blockly.blockRendering.IPathObject.prototype.updateHighlighted;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Add or remove styling showing that a block is selected.
|
|
116
|
+
* @param {boolean} enable True if selection is enabled, false otherwise.
|
|
117
|
+
* @package
|
|
118
|
+
*/
|
|
119
|
+
Blockly.blockRendering.IPathObject.prototype.updateSelected;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Add or remove styling showing that a block is dragged over a delete area.
|
|
123
|
+
* @param {boolean} enable True if the block is being dragged over a delete
|
|
124
|
+
* area, false otherwise.
|
|
125
|
+
* @package
|
|
126
|
+
*/
|
|
127
|
+
Blockly.blockRendering.IPathObject.prototype.updateDraggingDelete;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Add or remove styling showing that a block is an insertion marker.
|
|
131
|
+
* @param {boolean} enable True if the block is an insertion marker, false
|
|
132
|
+
* otherwise.
|
|
133
|
+
* @package
|
|
134
|
+
*/
|
|
135
|
+
Blockly.blockRendering.IPathObject.prototype.updateInsertionMarker;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Add or remove styling showing that a block is movable.
|
|
139
|
+
* @param {boolean} enable True if the block is movable, false otherwise.
|
|
140
|
+
* @package
|
|
141
|
+
*/
|
|
142
|
+
Blockly.blockRendering.IPathObject.prototype.updateMovable;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Add or remove styling that shows that if the dragging block is dropped, this
|
|
146
|
+
* block will be replaced. If a shadow block, it will disappear. Otherwise it
|
|
147
|
+
* will bump.
|
|
148
|
+
* @param {boolean} enable True if styling should be added.
|
|
149
|
+
* @package
|
|
150
|
+
*/
|
|
151
|
+
Blockly.blockRendering.IPathObject.prototype.updateReplacementFade;
|