nodeskini 1.0.0 → 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 +4 -3
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Utilities for element styles.
|
|
9
|
+
* These methods are not specific to Blockly, and could be factored out into
|
|
10
|
+
* a JavaScript framework such as Closure.
|
|
11
|
+
* @author samelh@google.com (Sam El-Husseini)
|
|
12
|
+
*/
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @name Blockly.utils.style
|
|
17
|
+
* @namespace
|
|
18
|
+
*/
|
|
19
|
+
goog.provide('Blockly.utils.style');
|
|
20
|
+
|
|
21
|
+
goog.require('Blockly.utils.Coordinate');
|
|
22
|
+
goog.require('Blockly.utils.Size');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Gets the height and width of an element.
|
|
27
|
+
* Similar to Closure's goog.style.getSize
|
|
28
|
+
* @param {!Element} element Element to get size of.
|
|
29
|
+
* @return {!Blockly.utils.Size} Object with width/height properties.
|
|
30
|
+
*/
|
|
31
|
+
Blockly.utils.style.getSize = function(element) {
|
|
32
|
+
if (Blockly.utils.style.getStyle_(element, 'display') != 'none') {
|
|
33
|
+
return Blockly.utils.style.getSizeWithDisplay_(element);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Evaluate size with a temporary element.
|
|
37
|
+
var style = element.style;
|
|
38
|
+
var originalDisplay = style.display;
|
|
39
|
+
var originalVisibility = style.visibility;
|
|
40
|
+
var originalPosition = style.position;
|
|
41
|
+
|
|
42
|
+
style.visibility = 'hidden';
|
|
43
|
+
style.position = 'absolute';
|
|
44
|
+
style.display = 'inline';
|
|
45
|
+
|
|
46
|
+
var offsetWidth = /** @type {!HTMLElement} */ (element).offsetWidth;
|
|
47
|
+
var offsetHeight = /** @type {!HTMLElement} */ (element).offsetHeight;
|
|
48
|
+
|
|
49
|
+
style.display = originalDisplay;
|
|
50
|
+
style.position = originalPosition;
|
|
51
|
+
style.visibility = originalVisibility;
|
|
52
|
+
|
|
53
|
+
return new Blockly.utils.Size(offsetWidth, offsetHeight);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Gets the height and width of an element when the display is not none.
|
|
58
|
+
* @param {!Element} element Element to get size of.
|
|
59
|
+
* @return {!Blockly.utils.Size} Object with width/height properties.
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
Blockly.utils.style.getSizeWithDisplay_ = function(element) {
|
|
63
|
+
var offsetWidth = /** @type {!HTMLElement} */ (element).offsetWidth;
|
|
64
|
+
var offsetHeight = /** @type {!HTMLElement} */ (element).offsetHeight;
|
|
65
|
+
return new Blockly.utils.Size(offsetWidth, offsetHeight);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Cross-browser pseudo get computed style. It returns the computed style where
|
|
70
|
+
* available. If not available it tries the cascaded style value (IE
|
|
71
|
+
* currentStyle) and in worst case the inline style value. It shouldn't be
|
|
72
|
+
* called directly, see http://wiki/Main/ComputedStyleVsCascadedStyle for
|
|
73
|
+
* discussion.
|
|
74
|
+
*
|
|
75
|
+
* Copied from Closure's goog.style.getStyle_
|
|
76
|
+
*
|
|
77
|
+
* @param {!Element} element Element to get style of.
|
|
78
|
+
* @param {string} style Property to get (must be camelCase, not css-style.).
|
|
79
|
+
* @return {string} Style value.
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
Blockly.utils.style.getStyle_ = function(element, style) {
|
|
83
|
+
return Blockly.utils.style.getComputedStyle(element, style) ||
|
|
84
|
+
Blockly.utils.style.getCascadedStyle(element, style) ||
|
|
85
|
+
(element.style && element.style[style]);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves a computed style value of a node. It returns empty string if the
|
|
90
|
+
* value cannot be computed (which will be the case in Internet Explorer) or
|
|
91
|
+
* "none" if the property requested is an SVG one and it has not been
|
|
92
|
+
* explicitly set (firefox and webkit).
|
|
93
|
+
*
|
|
94
|
+
* Copied from Closure's goog.style.getComputedStyle
|
|
95
|
+
*
|
|
96
|
+
* @param {!Element} element Element to get style of.
|
|
97
|
+
* @param {string} property Property to get (camel-case).
|
|
98
|
+
* @return {string} Style value.
|
|
99
|
+
*/
|
|
100
|
+
Blockly.utils.style.getComputedStyle = function(element, property) {
|
|
101
|
+
if (document.defaultView && document.defaultView.getComputedStyle) {
|
|
102
|
+
var styles = document.defaultView.getComputedStyle(element, null);
|
|
103
|
+
if (styles) {
|
|
104
|
+
// element.style[..] is undefined for browser specific styles
|
|
105
|
+
// as 'filter'.
|
|
106
|
+
return styles[property] || styles.getPropertyValue(property) || '';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return '';
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Gets the cascaded style value of a node, or null if the value cannot be
|
|
115
|
+
* computed (only Internet Explorer can do this).
|
|
116
|
+
*
|
|
117
|
+
* Copied from Closure's goog.style.getCascadedStyle
|
|
118
|
+
*
|
|
119
|
+
* @param {!Element} element Element to get style of.
|
|
120
|
+
* @param {string} style Property to get (camel-case).
|
|
121
|
+
* @return {string} Style value.
|
|
122
|
+
*/
|
|
123
|
+
Blockly.utils.style.getCascadedStyle = function(element, style) {
|
|
124
|
+
return /** @type {string} */ (
|
|
125
|
+
element.currentStyle ? element.currentStyle[style] : null);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Returns a Coordinate object relative to the top-left of the HTML document.
|
|
130
|
+
* Similar to Closure's goog.style.getPageOffset
|
|
131
|
+
* @param {!Element} el Element to get the page offset for.
|
|
132
|
+
* @return {!Blockly.utils.Coordinate} The page offset.
|
|
133
|
+
*/
|
|
134
|
+
Blockly.utils.style.getPageOffset = function(el) {
|
|
135
|
+
var pos = new Blockly.utils.Coordinate(0, 0);
|
|
136
|
+
var box = el.getBoundingClientRect();
|
|
137
|
+
var documentElement = document.documentElement;
|
|
138
|
+
// Must add the scroll coordinates in to get the absolute page offset
|
|
139
|
+
// of element since getBoundingClientRect returns relative coordinates to
|
|
140
|
+
// the viewport.
|
|
141
|
+
var scrollCoord = new Blockly.utils.Coordinate(
|
|
142
|
+
window.pageXOffset || documentElement.scrollLeft,
|
|
143
|
+
window.pageYOffset || documentElement.scrollTop);
|
|
144
|
+
pos.x = box.left + scrollCoord.x;
|
|
145
|
+
pos.y = box.top + scrollCoord.y;
|
|
146
|
+
|
|
147
|
+
return pos;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Calculates the viewport coordinates relative to the document.
|
|
152
|
+
* Similar to Closure's goog.style.getViewportPageOffset
|
|
153
|
+
* @return {!Blockly.utils.Coordinate} The page offset of the viewport.
|
|
154
|
+
*/
|
|
155
|
+
Blockly.utils.style.getViewportPageOffset = function() {
|
|
156
|
+
var body = document.body;
|
|
157
|
+
var documentElement = document.documentElement;
|
|
158
|
+
var scrollLeft = body.scrollLeft || documentElement.scrollLeft;
|
|
159
|
+
var scrollTop = body.scrollTop || documentElement.scrollTop;
|
|
160
|
+
return new Blockly.utils.Coordinate(scrollLeft, scrollTop);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Shows or hides an element from the page. Hiding the element is done by
|
|
165
|
+
* setting the display property to "none", removing the element from the
|
|
166
|
+
* rendering hierarchy so it takes up no space. To show the element, the default
|
|
167
|
+
* inherited display property is restored (defined either in stylesheets or by
|
|
168
|
+
* the browser's default style rules).
|
|
169
|
+
* Copied from Closure's goog.style.getViewportPageOffset
|
|
170
|
+
*
|
|
171
|
+
* @param {!Element} el Element to show or hide.
|
|
172
|
+
* @param {*} isShown True to render the element in its default style,
|
|
173
|
+
* false to disable rendering the element.
|
|
174
|
+
*/
|
|
175
|
+
Blockly.utils.style.setElementShown = function(el, isShown) {
|
|
176
|
+
el.style.display = isShown ? '' : 'none';
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Returns true if the element is using right to left (RTL) direction.
|
|
181
|
+
* Copied from Closure's goog.style.isRightToLeft
|
|
182
|
+
*
|
|
183
|
+
* @param {!Element} el The element to test.
|
|
184
|
+
* @return {boolean} True for right to left, false for left to right.
|
|
185
|
+
*/
|
|
186
|
+
Blockly.utils.style.isRightToLeft = function(el) {
|
|
187
|
+
return 'rtl' == Blockly.utils.style.getStyle_(el, 'direction');
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Gets the computed border widths (on all sides) in pixels
|
|
192
|
+
* Copied from Closure's goog.style.getBorderBox
|
|
193
|
+
* @param {!Element} element The element to get the border widths for.
|
|
194
|
+
* @return {!Object} The computed border widths.
|
|
195
|
+
*/
|
|
196
|
+
Blockly.utils.style.getBorderBox = function(element) {
|
|
197
|
+
var left = Blockly.utils.style.getComputedStyle(element, 'borderLeftWidth');
|
|
198
|
+
var right = Blockly.utils.style.getComputedStyle(element, 'borderRightWidth');
|
|
199
|
+
var top = Blockly.utils.style.getComputedStyle(element, 'borderTopWidth');
|
|
200
|
+
var bottom = Blockly.utils.style.getComputedStyle(element, 'borderBottomWidth');
|
|
201
|
+
|
|
202
|
+
return {
|
|
203
|
+
top: parseFloat(top),
|
|
204
|
+
right: parseFloat(right),
|
|
205
|
+
bottom: parseFloat(bottom),
|
|
206
|
+
left: parseFloat(left)
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Changes the scroll position of `container` with the minimum amount so
|
|
212
|
+
* that the content and the borders of the given `element` become visible.
|
|
213
|
+
* If the element is bigger than the container, its top left corner will be
|
|
214
|
+
* aligned as close to the container's top left corner as possible.
|
|
215
|
+
* Copied from Closure's goog.style.scrollIntoContainerView
|
|
216
|
+
*
|
|
217
|
+
* @param {!Element} element The element to make visible.
|
|
218
|
+
* @param {!Element} container The container to scroll. If not set, then the
|
|
219
|
+
* document scroll element will be used.
|
|
220
|
+
* @param {boolean=} opt_center Whether to center the element in the container.
|
|
221
|
+
* Defaults to false.
|
|
222
|
+
*/
|
|
223
|
+
Blockly.utils.style.scrollIntoContainerView = function(
|
|
224
|
+
element, container, opt_center) {
|
|
225
|
+
var offset =
|
|
226
|
+
Blockly.utils.style.getContainerOffsetToScrollInto(element,
|
|
227
|
+
container, opt_center);
|
|
228
|
+
container.scrollLeft = offset.x;
|
|
229
|
+
container.scrollTop = offset.y;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Calculate the scroll position of `container` with the minimum amount so
|
|
234
|
+
* that the content and the borders of the given `element` become visible.
|
|
235
|
+
* If the element is bigger than the container, its top left corner will be
|
|
236
|
+
* aligned as close to the container's top left corner as possible.
|
|
237
|
+
* Copied from Closure's goog.style.getContainerOffsetToScrollInto
|
|
238
|
+
*
|
|
239
|
+
* @param {!Element} element The element to make visible.
|
|
240
|
+
* @param {!Element} container The container to scroll. If not set, then the
|
|
241
|
+
* document scroll element will be used.
|
|
242
|
+
* @param {boolean=} opt_center Whether to center the element in the container.
|
|
243
|
+
* Defaults to false.
|
|
244
|
+
* @return {!Blockly.utils.Coordinate} The new scroll position of the container,
|
|
245
|
+
* in form of goog.math.Coordinate(scrollLeft, scrollTop).
|
|
246
|
+
*/
|
|
247
|
+
Blockly.utils.style.getContainerOffsetToScrollInto = function(
|
|
248
|
+
element, container, opt_center) {
|
|
249
|
+
// Absolute position of the element's border's top left corner.
|
|
250
|
+
var elementPos = Blockly.utils.style.getPageOffset(element);
|
|
251
|
+
// Absolute position of the container's border's top left corner.
|
|
252
|
+
var containerPos = Blockly.utils.style.getPageOffset(container);
|
|
253
|
+
var containerBorder = Blockly.utils.style.getBorderBox(container);
|
|
254
|
+
// Relative pos. of the element's border box to the container's content box.
|
|
255
|
+
var relX = elementPos.x - containerPos.x - containerBorder.left;
|
|
256
|
+
var relY = elementPos.y - containerPos.y - containerBorder.top;
|
|
257
|
+
// How much the element can move in the container, i.e. the difference between
|
|
258
|
+
// the element's bottom-right-most and top-left-most position where it's
|
|
259
|
+
// fully visible.
|
|
260
|
+
var elementSize = Blockly.utils.style.getSizeWithDisplay_(element);
|
|
261
|
+
var spaceX = container.clientWidth - elementSize.width;
|
|
262
|
+
var spaceY = container.clientHeight - elementSize.height;
|
|
263
|
+
var scrollLeft = container.scrollLeft;
|
|
264
|
+
var scrollTop = container.scrollTop;
|
|
265
|
+
if (opt_center) {
|
|
266
|
+
// All browsers round non-integer scroll positions down.
|
|
267
|
+
scrollLeft += relX - spaceX / 2;
|
|
268
|
+
scrollTop += relY - spaceY / 2;
|
|
269
|
+
} else {
|
|
270
|
+
// This formula was designed to give the correct scroll values in the
|
|
271
|
+
// following cases:
|
|
272
|
+
// - element is higher than container (spaceY < 0) => scroll down by relY
|
|
273
|
+
// - element is not higher that container (spaceY >= 0):
|
|
274
|
+
// - it is above container (relY < 0) => scroll up by abs(relY)
|
|
275
|
+
// - it is below container (relY > spaceY) => scroll down by relY - spaceY
|
|
276
|
+
// - it is in the container => don't scroll
|
|
277
|
+
scrollLeft += Math.min(relX, Math.max(relX - spaceX, 0));
|
|
278
|
+
scrollTop += Math.min(relY, Math.max(relY - spaceY, 0));
|
|
279
|
+
}
|
|
280
|
+
return new Blockly.utils.Coordinate(scrollLeft, scrollTop);
|
|
281
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Defines the Blockly.utils.Svg class. Its constants enumerate
|
|
9
|
+
* all SVG tag names used by Blockly.
|
|
10
|
+
* @author samelh@google.com (Sam El-Husseini)
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @name Blockly.utils.Svg
|
|
16
|
+
* @namespace
|
|
17
|
+
*/
|
|
18
|
+
goog.provide('Blockly.utils.Svg');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* A name with the type of the SVG element stored in the generic.
|
|
23
|
+
* @param {string} tagName The SVG element tag name.
|
|
24
|
+
* @constructor
|
|
25
|
+
* @template T
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
Blockly.utils.Svg = function(tagName) {
|
|
29
|
+
/**
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
this.tagName_ = tagName;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns the SVG element tag name.
|
|
38
|
+
* @return {string} The name.
|
|
39
|
+
* @override
|
|
40
|
+
*/
|
|
41
|
+
Blockly.utils.Svg.prototype.toString = function() {
|
|
42
|
+
return this.tagName_;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @type {!Blockly.utils.Svg<!SVGAnimateElement>}
|
|
46
|
+
* @package
|
|
47
|
+
*/
|
|
48
|
+
Blockly.utils.Svg.ANIMATE =
|
|
49
|
+
new Blockly.utils.Svg('animate');
|
|
50
|
+
|
|
51
|
+
/** @type {!Blockly.utils.Svg<!SVGCircleElement>}
|
|
52
|
+
* @package
|
|
53
|
+
*/
|
|
54
|
+
Blockly.utils.Svg.CIRCLE =
|
|
55
|
+
new Blockly.utils.Svg('circle');
|
|
56
|
+
|
|
57
|
+
/** @type {!Blockly.utils.Svg<!SVGClipPathElement>}
|
|
58
|
+
* @package
|
|
59
|
+
*/
|
|
60
|
+
Blockly.utils.Svg.CLIPPATH =
|
|
61
|
+
new Blockly.utils.Svg('clipPath');
|
|
62
|
+
|
|
63
|
+
/** @type {!Blockly.utils.Svg<!SVGDefsElement>}
|
|
64
|
+
* @package
|
|
65
|
+
*/
|
|
66
|
+
Blockly.utils.Svg.DEFS =
|
|
67
|
+
new Blockly.utils.Svg('defs');
|
|
68
|
+
|
|
69
|
+
/** @type {!Blockly.utils.Svg<!SVGFECompositeElement>}
|
|
70
|
+
* @package
|
|
71
|
+
*/
|
|
72
|
+
Blockly.utils.Svg.FECOMPOSITE =
|
|
73
|
+
new Blockly.utils.Svg('feComposite');
|
|
74
|
+
|
|
75
|
+
/** @type {!Blockly.utils.Svg<!SVGFEComponentTransferElement>}
|
|
76
|
+
* @package
|
|
77
|
+
*/
|
|
78
|
+
Blockly.utils.Svg.FECOMPONENTTRANSFER =
|
|
79
|
+
new Blockly.utils.Svg('feComponentTransfer');
|
|
80
|
+
|
|
81
|
+
/** @type {!Blockly.utils.Svg<!SVGFEFloodElement>}
|
|
82
|
+
* @package
|
|
83
|
+
*/
|
|
84
|
+
Blockly.utils.Svg.FEFLOOD =
|
|
85
|
+
new Blockly.utils.Svg('feFlood');
|
|
86
|
+
|
|
87
|
+
/** @type {!Blockly.utils.Svg<!SVGFEFuncAElement>}
|
|
88
|
+
* @package
|
|
89
|
+
*/
|
|
90
|
+
Blockly.utils.Svg.FEFUNCA =
|
|
91
|
+
new Blockly.utils.Svg('feFuncA');
|
|
92
|
+
|
|
93
|
+
/** @type {!Blockly.utils.Svg<!SVGFEGaussianBlurElement>}
|
|
94
|
+
* @package
|
|
95
|
+
*/
|
|
96
|
+
Blockly.utils.Svg.FEGAUSSIANBLUR =
|
|
97
|
+
new Blockly.utils.Svg('feGaussianBlur');
|
|
98
|
+
|
|
99
|
+
/** @type {!Blockly.utils.Svg<!SVGFEPointLightElement>}
|
|
100
|
+
* @package
|
|
101
|
+
*/
|
|
102
|
+
Blockly.utils.Svg.FEPOINTLIGHT =
|
|
103
|
+
new Blockly.utils.Svg('fePointLight');
|
|
104
|
+
|
|
105
|
+
/** @type {!Blockly.utils.Svg<!SVGFESpecularLightingElement>}
|
|
106
|
+
* @package
|
|
107
|
+
*/
|
|
108
|
+
Blockly.utils.Svg.FESPECULARLIGHTING =
|
|
109
|
+
new Blockly.utils.Svg('feSpecularLighting');
|
|
110
|
+
|
|
111
|
+
/** @type {!Blockly.utils.Svg<!SVGFilterElement>}
|
|
112
|
+
* @package
|
|
113
|
+
*/
|
|
114
|
+
Blockly.utils.Svg.FILTER =
|
|
115
|
+
new Blockly.utils.Svg('filter');
|
|
116
|
+
|
|
117
|
+
/** @type {!Blockly.utils.Svg<!SVGForeignObjectElement>}
|
|
118
|
+
* @package
|
|
119
|
+
*/
|
|
120
|
+
Blockly.utils.Svg.FOREIGNOBJECT =
|
|
121
|
+
new Blockly.utils.Svg('foreignObject');
|
|
122
|
+
|
|
123
|
+
/** @type {!Blockly.utils.Svg<!SVGGElement>}
|
|
124
|
+
* @package
|
|
125
|
+
*/
|
|
126
|
+
Blockly.utils.Svg.G =
|
|
127
|
+
new Blockly.utils.Svg('g');
|
|
128
|
+
|
|
129
|
+
/** @type {!Blockly.utils.Svg<!SVGImageElement>}
|
|
130
|
+
* @package
|
|
131
|
+
*/
|
|
132
|
+
Blockly.utils.Svg.IMAGE =
|
|
133
|
+
new Blockly.utils.Svg('image');
|
|
134
|
+
|
|
135
|
+
/** @type {!Blockly.utils.Svg<!SVGLineElement>}
|
|
136
|
+
* @package
|
|
137
|
+
*/
|
|
138
|
+
Blockly.utils.Svg.LINE =
|
|
139
|
+
new Blockly.utils.Svg('line');
|
|
140
|
+
|
|
141
|
+
/** @type {!Blockly.utils.Svg<!SVGPathElement>}
|
|
142
|
+
* @package
|
|
143
|
+
*/
|
|
144
|
+
Blockly.utils.Svg.PATH =
|
|
145
|
+
new Blockly.utils.Svg('path');
|
|
146
|
+
|
|
147
|
+
/** @type {!Blockly.utils.Svg<!SVGPatternElement>}
|
|
148
|
+
* @package
|
|
149
|
+
*/
|
|
150
|
+
Blockly.utils.Svg.PATTERN =
|
|
151
|
+
new Blockly.utils.Svg('pattern');
|
|
152
|
+
|
|
153
|
+
/** @type {!Blockly.utils.Svg<!SVGPolygonElement>}
|
|
154
|
+
* @package
|
|
155
|
+
*/
|
|
156
|
+
Blockly.utils.Svg.POLYGON =
|
|
157
|
+
new Blockly.utils.Svg('polygon');
|
|
158
|
+
|
|
159
|
+
/** @type {!Blockly.utils.Svg<!SVGRectElement>}
|
|
160
|
+
* @package
|
|
161
|
+
*/
|
|
162
|
+
Blockly.utils.Svg.RECT =
|
|
163
|
+
new Blockly.utils.Svg('rect');
|
|
164
|
+
|
|
165
|
+
/** @type {!Blockly.utils.Svg<!SVGSVGElement>}
|
|
166
|
+
* @package
|
|
167
|
+
*/
|
|
168
|
+
Blockly.utils.Svg.SVG =
|
|
169
|
+
new Blockly.utils.Svg('svg');
|
|
170
|
+
|
|
171
|
+
/** @type {!Blockly.utils.Svg<!SVGTextElement>}
|
|
172
|
+
* @package
|
|
173
|
+
*/
|
|
174
|
+
Blockly.utils.Svg.TEXT =
|
|
175
|
+
new Blockly.utils.Svg('text');
|
|
176
|
+
|
|
177
|
+
/** @type {!Blockly.utils.Svg<!SVGTSpanElement>}
|
|
178
|
+
* @package
|
|
179
|
+
*/
|
|
180
|
+
Blockly.utils.Svg.TSPAN =
|
|
181
|
+
new Blockly.utils.Svg('tspan');
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Methods for creating parts of SVG path strings. See
|
|
9
|
+
* developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
|
|
10
|
+
* @author fenichel@google.com (Rachel Fenichel)
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @name Blockly.utils.svgPaths
|
|
16
|
+
* @namespace
|
|
17
|
+
*/
|
|
18
|
+
goog.provide('Blockly.utils.svgPaths');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a string representing the given x, y pair. It does not matter whether
|
|
23
|
+
* the coordinate is relative or absolute. The result has leading
|
|
24
|
+
* and trailing spaces, and separates the x and y coordinates with a comma but
|
|
25
|
+
* no space.
|
|
26
|
+
* @param {number} x The x coordinate.
|
|
27
|
+
* @param {number} y The y coordinate.
|
|
28
|
+
* @return {string} A string of the format ' x,y '
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
Blockly.utils.svgPaths.point = function(x, y) {
|
|
32
|
+
return ' ' + x + ',' + y + ' ';
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Draw a cubic or quadratic curve. See
|
|
37
|
+
* developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Cubic_B%C3%A9zier_Curve
|
|
38
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
39
|
+
* @param {string} command The command to use.
|
|
40
|
+
* Should be one of: c, C, s, S, q, Q.
|
|
41
|
+
* @param {!Array.<string>} points An array containing all of the points to pass to the
|
|
42
|
+
* curve command, in order. The points are represented as strings of the
|
|
43
|
+
* format ' x, y '.
|
|
44
|
+
* @return {string} A string defining one or more Bezier curves. See the MDN
|
|
45
|
+
* documentation for exact format.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
Blockly.utils.svgPaths.curve = function(command, points) {
|
|
49
|
+
return ' ' + command + points.join('');
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Move the cursor to the given position without drawing a line.
|
|
54
|
+
* The coordinates are absolute.
|
|
55
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
56
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
|
|
57
|
+
* @param {number} x The absolute x coordinate.
|
|
58
|
+
* @param {number} y The absolute y coordinate.
|
|
59
|
+
* @return {string} A string of the format ' M x,y '
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
Blockly.utils.svgPaths.moveTo = function(x, y) {
|
|
63
|
+
return ' M ' + x + ',' + y + ' ';
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Move the cursor to the given position without drawing a line.
|
|
68
|
+
* Coordinates are relative.
|
|
69
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
70
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
|
|
71
|
+
* @param {number} dx The relative x coordinate.
|
|
72
|
+
* @param {number} dy The relative y coordinate.
|
|
73
|
+
* @return {string} A string of the format ' m dx,dy '
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
Blockly.utils.svgPaths.moveBy = function(dx, dy) {
|
|
77
|
+
return ' m ' + dx + ',' + dy + ' ';
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Draw a line from the current point to the end point, which is the current
|
|
82
|
+
* point shifted by dx along the x-axis and dy along the y-axis.
|
|
83
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
84
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
|
|
85
|
+
* @param {number} dx The relative x coordinate.
|
|
86
|
+
* @param {number} dy The relative y coordinate.
|
|
87
|
+
* @return {string} A string of the format ' l dx,dy '
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
Blockly.utils.svgPaths.lineTo = function(dx, dy) {
|
|
91
|
+
return ' l ' + dx + ',' + dy + ' ';
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Draw multiple lines connecting all of the given points in order. This is
|
|
96
|
+
* equivalent to a series of 'l' commands.
|
|
97
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
98
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Line_commands
|
|
99
|
+
* @param {!Array.<string>} points An array containing all of the points to
|
|
100
|
+
* draw lines to, in order. The points are represented as strings of the
|
|
101
|
+
* format ' dx,dy '.
|
|
102
|
+
* @return {string} A string of the format ' l (dx,dy)+ '
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
Blockly.utils.svgPaths.line = function(points) {
|
|
106
|
+
return ' l' + points.join('');
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Draw a horizontal or vertical line.
|
|
111
|
+
* The first argument specifies the direction and whether the given position is
|
|
112
|
+
* relative or absolute.
|
|
113
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
114
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#LineTo_path_commands
|
|
115
|
+
* @param {string} command The command to prepend to the coordinate. This
|
|
116
|
+
* should be one of: V, v, H, h.
|
|
117
|
+
* @param {number} val The coordinate to pass to the command. It may be
|
|
118
|
+
* absolute or relative.
|
|
119
|
+
* @return {string} A string of the format ' command val '
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
Blockly.utils.svgPaths.lineOnAxis = function(command, val) {
|
|
123
|
+
return ' ' + command + ' ' + val + ' ';
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Draw an elliptical arc curve.
|
|
128
|
+
* These coordinates are unitless and hence in the user coordinate system.
|
|
129
|
+
* See developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#Elliptical_Arc_Curve
|
|
130
|
+
* @param {string} command The command string. Either 'a' or 'A'.
|
|
131
|
+
* @param {string} flags The flag string. See the MDN documentation for a
|
|
132
|
+
* description and examples.
|
|
133
|
+
* @param {number} radius The radius of the arc to draw.
|
|
134
|
+
* @param {string} point The point to move the cursor to after drawing the arc,
|
|
135
|
+
* specified either in absolute or relative coordinates depending on the
|
|
136
|
+
* command.
|
|
137
|
+
* @return {string} A string of the format 'command radius radius flags point'
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
Blockly.utils.svgPaths.arc = function(command, flags, radius, point) {
|
|
141
|
+
return command + ' ' + radius + ' ' + radius + ' ' + flags + point;
|
|
142
|
+
};
|