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,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Utility functions for handling typed variables.
|
|
9
|
+
*
|
|
10
|
+
* @author duzc2dtw@gmail.com (Du Tian Wei)
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
goog.provide('Blockly.VariablesDynamic');
|
|
15
|
+
|
|
16
|
+
goog.require('Blockly.Variables');
|
|
17
|
+
goog.require('Blockly.Blocks');
|
|
18
|
+
goog.require('Blockly.Msg');
|
|
19
|
+
goog.require('Blockly.utils.xml');
|
|
20
|
+
goog.require('Blockly.VariableModel');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_String = function(button) {
|
|
24
|
+
Blockly.Variables.createVariableButtonHandler(button.getTargetWorkspace(),
|
|
25
|
+
undefined, 'String');
|
|
26
|
+
};
|
|
27
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_Number = function(button) {
|
|
28
|
+
Blockly.Variables.createVariableButtonHandler(button.getTargetWorkspace(),
|
|
29
|
+
undefined, 'Number');
|
|
30
|
+
};
|
|
31
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour = function(button) {
|
|
32
|
+
Blockly.Variables.createVariableButtonHandler(button.getTargetWorkspace(),
|
|
33
|
+
undefined, 'Colour');
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Construct the elements (blocks and button) required by the flyout for the
|
|
37
|
+
* variable category.
|
|
38
|
+
* @param {!Blockly.Workspace} workspace The workspace containing variables.
|
|
39
|
+
* @return {!Array.<!Element>} Array of XML elements.
|
|
40
|
+
*/
|
|
41
|
+
Blockly.VariablesDynamic.flyoutCategory = function(workspace) {
|
|
42
|
+
var xmlList = [];
|
|
43
|
+
var button = document.createElement('button');
|
|
44
|
+
button.setAttribute('text', Blockly.Msg['NEW_STRING_VARIABLE']);
|
|
45
|
+
button.setAttribute('callbackKey', 'CREATE_VARIABLE_STRING');
|
|
46
|
+
xmlList.push(button);
|
|
47
|
+
button = document.createElement('button');
|
|
48
|
+
button.setAttribute('text', Blockly.Msg['NEW_NUMBER_VARIABLE']);
|
|
49
|
+
button.setAttribute('callbackKey', 'CREATE_VARIABLE_NUMBER');
|
|
50
|
+
xmlList.push(button);
|
|
51
|
+
button = document.createElement('button');
|
|
52
|
+
button.setAttribute('text', Blockly.Msg['NEW_COLOUR_VARIABLE']);
|
|
53
|
+
button.setAttribute('callbackKey', 'CREATE_VARIABLE_COLOUR');
|
|
54
|
+
xmlList.push(button);
|
|
55
|
+
|
|
56
|
+
workspace.registerButtonCallback('CREATE_VARIABLE_STRING',
|
|
57
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_String);
|
|
58
|
+
workspace.registerButtonCallback('CREATE_VARIABLE_NUMBER',
|
|
59
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_Number);
|
|
60
|
+
workspace.registerButtonCallback('CREATE_VARIABLE_COLOUR',
|
|
61
|
+
Blockly.VariablesDynamic.onCreateVariableButtonClick_Colour);
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var blockList = Blockly.VariablesDynamic.flyoutCategoryBlocks(workspace);
|
|
65
|
+
xmlList = xmlList.concat(blockList);
|
|
66
|
+
return xmlList;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Construct the blocks required by the flyout for the variable category.
|
|
71
|
+
* @param {!Blockly.Workspace} workspace The workspace containing variables.
|
|
72
|
+
* @return {!Array.<!Element>} Array of XML block elements.
|
|
73
|
+
*/
|
|
74
|
+
Blockly.VariablesDynamic.flyoutCategoryBlocks = function(workspace) {
|
|
75
|
+
var variableModelList = workspace.getAllVariables();
|
|
76
|
+
|
|
77
|
+
var xmlList = [];
|
|
78
|
+
if (variableModelList.length > 0) {
|
|
79
|
+
if (Blockly.Blocks['variables_set_dynamic']) {
|
|
80
|
+
var firstVariable = variableModelList[variableModelList.length - 1];
|
|
81
|
+
var block = Blockly.utils.xml.createElement('block');
|
|
82
|
+
block.setAttribute('type', 'variables_set_dynamic');
|
|
83
|
+
block.setAttribute('gap', 24);
|
|
84
|
+
block.appendChild(
|
|
85
|
+
Blockly.Variables.generateVariableFieldDom(firstVariable));
|
|
86
|
+
xmlList.push(block);
|
|
87
|
+
}
|
|
88
|
+
if (Blockly.Blocks['variables_get_dynamic']) {
|
|
89
|
+
variableModelList.sort(Blockly.VariableModel.compareByName);
|
|
90
|
+
for (var i = 0, variable; (variable = variableModelList[i]); i++) {
|
|
91
|
+
var block = Blockly.utils.xml.createElement('block');
|
|
92
|
+
block.setAttribute('type', 'variables_get_dynamic');
|
|
93
|
+
block.setAttribute('gap', 8);
|
|
94
|
+
block.appendChild(Blockly.Variables.generateVariableFieldDom(variable));
|
|
95
|
+
xmlList.push(block);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return xmlList;
|
|
100
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2012 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Object representing a warning.
|
|
9
|
+
* @author fraser@google.com (Neil Fraser)
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
goog.provide('Blockly.Warning');
|
|
14
|
+
|
|
15
|
+
goog.require('Blockly.Bubble');
|
|
16
|
+
goog.require('Blockly.Events');
|
|
17
|
+
goog.require('Blockly.Events.Ui');
|
|
18
|
+
goog.require('Blockly.Icon');
|
|
19
|
+
goog.require('Blockly.utils.dom');
|
|
20
|
+
goog.require('Blockly.utils.object');
|
|
21
|
+
goog.require('Blockly.utils.Svg');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Class for a warning.
|
|
26
|
+
* @param {!Blockly.Block} block The block associated with this warning.
|
|
27
|
+
* @extends {Blockly.Icon}
|
|
28
|
+
* @constructor
|
|
29
|
+
*/
|
|
30
|
+
Blockly.Warning = function(block) {
|
|
31
|
+
Blockly.Warning.superClass_.constructor.call(this, block);
|
|
32
|
+
this.createIcon();
|
|
33
|
+
// The text_ object can contain multiple warnings.
|
|
34
|
+
this.text_ = {};
|
|
35
|
+
};
|
|
36
|
+
Blockly.utils.object.inherits(Blockly.Warning, Blockly.Icon);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Does this icon get hidden when the block is collapsed.
|
|
40
|
+
*/
|
|
41
|
+
Blockly.Warning.prototype.collapseHidden = false;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Draw the warning icon.
|
|
45
|
+
* @param {!Element} group The icon group.
|
|
46
|
+
* @protected
|
|
47
|
+
*/
|
|
48
|
+
Blockly.Warning.prototype.drawIcon_ = function(group) {
|
|
49
|
+
// Triangle with rounded corners.
|
|
50
|
+
Blockly.utils.dom.createSvgElement(
|
|
51
|
+
Blockly.utils.Svg.PATH,
|
|
52
|
+
{
|
|
53
|
+
'class': 'blocklyIconShape',
|
|
54
|
+
'd': 'M2,15Q-1,15 0.5,12L6.5,1.7Q8,-1 9.5,1.7L15.5,12Q17,15 14,15z'
|
|
55
|
+
},
|
|
56
|
+
group);
|
|
57
|
+
// Can't use a real '!' text character since different browsers and operating
|
|
58
|
+
// systems render it differently.
|
|
59
|
+
// Body of exclamation point.
|
|
60
|
+
Blockly.utils.dom.createSvgElement(
|
|
61
|
+
Blockly.utils.Svg.PATH,
|
|
62
|
+
{
|
|
63
|
+
'class': 'blocklyIconSymbol',
|
|
64
|
+
'd': 'm7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z'
|
|
65
|
+
},
|
|
66
|
+
group);
|
|
67
|
+
// Dot of exclamation point.
|
|
68
|
+
Blockly.utils.dom.createSvgElement(
|
|
69
|
+
Blockly.utils.Svg.RECT,
|
|
70
|
+
{
|
|
71
|
+
'class': 'blocklyIconSymbol',
|
|
72
|
+
'x': '7', 'y': '11', 'height': '2', 'width': '2'
|
|
73
|
+
},
|
|
74
|
+
group);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Create the text for the warning's bubble.
|
|
79
|
+
* @param {string} text The text to display.
|
|
80
|
+
* @return {!SVGTextElement} The top-level node of the text.
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
83
|
+
Blockly.Warning.textToDom_ = function(text) {
|
|
84
|
+
var paragraph = Blockly.utils.dom.createSvgElement(
|
|
85
|
+
Blockly.utils.Svg.TEXT,
|
|
86
|
+
{
|
|
87
|
+
'class': 'blocklyText blocklyBubbleText blocklyNoPointerEvents',
|
|
88
|
+
'y': Blockly.Bubble.BORDER_WIDTH
|
|
89
|
+
},
|
|
90
|
+
null);
|
|
91
|
+
var lines = text.split('\n');
|
|
92
|
+
for (var i = 0; i < lines.length; i++) {
|
|
93
|
+
var tspanElement = Blockly.utils.dom.createSvgElement(
|
|
94
|
+
Blockly.utils.Svg.TSPAN,
|
|
95
|
+
{'dy': '1em', 'x': Blockly.Bubble.BORDER_WIDTH}, paragraph);
|
|
96
|
+
var textNode = document.createTextNode(lines[i]);
|
|
97
|
+
tspanElement.appendChild(textNode);
|
|
98
|
+
}
|
|
99
|
+
return paragraph;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Show or hide the warning bubble.
|
|
104
|
+
* @param {boolean} visible True if the bubble should be visible.
|
|
105
|
+
*/
|
|
106
|
+
Blockly.Warning.prototype.setVisible = function(visible) {
|
|
107
|
+
if (visible == this.isVisible()) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
Blockly.Events.fire(
|
|
111
|
+
new Blockly.Events.Ui(this.block_, 'warningOpen', !visible, visible));
|
|
112
|
+
if (visible) {
|
|
113
|
+
this.createBubble();
|
|
114
|
+
} else {
|
|
115
|
+
this.disposeBubble();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Show the bubble.
|
|
121
|
+
* @package
|
|
122
|
+
*/
|
|
123
|
+
Blockly.Warning.prototype.createBubble = function() {
|
|
124
|
+
// TODO (#2943): This is package because comments steal this UI for
|
|
125
|
+
// non-editable comments, but really this should be private.
|
|
126
|
+
this.paragraphElement_ = Blockly.Warning.textToDom_(this.getText());
|
|
127
|
+
this.bubble_ = new Blockly.Bubble(
|
|
128
|
+
/** @type {!Blockly.WorkspaceSvg} */ (this.block_.workspace),
|
|
129
|
+
this.paragraphElement_, this.block_.pathObject.svgPath,
|
|
130
|
+
/** @type {!Blockly.utils.Coordinate} */ (this.iconXY_), null, null);
|
|
131
|
+
// Expose this warning's block's ID on its top-level SVG group.
|
|
132
|
+
this.bubble_.setSvgId(this.block_.id);
|
|
133
|
+
if (this.block_.RTL) {
|
|
134
|
+
// Right-align the paragraph.
|
|
135
|
+
// This cannot be done until the bubble is rendered on screen.
|
|
136
|
+
var maxWidth = this.paragraphElement_.getBBox().width;
|
|
137
|
+
for (var i = 0, textElement;
|
|
138
|
+
(textElement = this.paragraphElement_.childNodes[i]); i++) {
|
|
139
|
+
|
|
140
|
+
textElement.setAttribute('text-anchor', 'end');
|
|
141
|
+
textElement.setAttribute('x', maxWidth + Blockly.Bubble.BORDER_WIDTH);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
this.applyColour();
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Dispose of the bubble and references to it.
|
|
149
|
+
* @package
|
|
150
|
+
*/
|
|
151
|
+
Blockly.Warning.prototype.disposeBubble = function() {
|
|
152
|
+
// TODO (#2943): This is package because comments steal this UI for
|
|
153
|
+
// non-editable comments, but really this should be private.
|
|
154
|
+
this.bubble_.dispose();
|
|
155
|
+
this.bubble_ = null;
|
|
156
|
+
this.body_ = null;
|
|
157
|
+
this.paragraphElement_ = null;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Set this warning's text.
|
|
162
|
+
* @param {string} text Warning text (or '' to delete). This supports
|
|
163
|
+
* linebreaks.
|
|
164
|
+
* @param {string} id An ID for this text entry to be able to maintain
|
|
165
|
+
* multiple warnings.
|
|
166
|
+
*/
|
|
167
|
+
Blockly.Warning.prototype.setText = function(text, id) {
|
|
168
|
+
if (this.text_[id] == text) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (text) {
|
|
172
|
+
this.text_[id] = text;
|
|
173
|
+
} else {
|
|
174
|
+
delete this.text_[id];
|
|
175
|
+
}
|
|
176
|
+
if (this.isVisible()) {
|
|
177
|
+
this.setVisible(false);
|
|
178
|
+
this.setVisible(true);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Get this warning's texts.
|
|
184
|
+
* @return {string} All texts concatenated into one string.
|
|
185
|
+
*/
|
|
186
|
+
Blockly.Warning.prototype.getText = function() {
|
|
187
|
+
var allWarnings = [];
|
|
188
|
+
for (var id in this.text_) {
|
|
189
|
+
allWarnings.push(this.text_[id]);
|
|
190
|
+
}
|
|
191
|
+
return allWarnings.join('\n');
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Dispose of this warning.
|
|
196
|
+
*/
|
|
197
|
+
Blockly.Warning.prototype.dispose = function() {
|
|
198
|
+
this.block_.warning = null;
|
|
199
|
+
Blockly.Icon.prototype.dispose.call(this);
|
|
200
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2013 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview A div that floats on top of Blockly. This singleton contains
|
|
9
|
+
* temporary HTML UI widgets that the user is currently interacting with.
|
|
10
|
+
* E.g. text input areas, colour pickers, context menus.
|
|
11
|
+
* @author fraser@google.com (Neil Fraser)
|
|
12
|
+
*/
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @name Blockly.WidgetDiv
|
|
17
|
+
* @namespace
|
|
18
|
+
*/
|
|
19
|
+
goog.provide('Blockly.WidgetDiv');
|
|
20
|
+
|
|
21
|
+
goog.require('Blockly.utils.style');
|
|
22
|
+
|
|
23
|
+
goog.requireType('Blockly.utils.Rect');
|
|
24
|
+
goog.requireType('Blockly.utils.Size');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The object currently using this container.
|
|
29
|
+
* @type {Object}
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
Blockly.WidgetDiv.owner_ = null;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Optional cleanup function set by whichever object uses the widget.
|
|
36
|
+
* @type {Function}
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
Blockly.WidgetDiv.dispose_ = null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A class name representing the current owner's workspace renderer.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
Blockly.WidgetDiv.rendererClassName_ = '';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A class name representing the current owner's workspace theme.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
Blockly.WidgetDiv.themeClassName_ = '';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Create the widget div and inject it onto the page.
|
|
57
|
+
*/
|
|
58
|
+
Blockly.WidgetDiv.createDom = function() {
|
|
59
|
+
if (Blockly.WidgetDiv.DIV) {
|
|
60
|
+
return; // Already created.
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The HTML container for popup overlays (e.g. editor widgets).
|
|
64
|
+
* @type {!Element}
|
|
65
|
+
*/
|
|
66
|
+
Blockly.WidgetDiv.DIV = document.createElement('div');
|
|
67
|
+
Blockly.WidgetDiv.DIV.className = 'blocklyWidgetDiv';
|
|
68
|
+
var container = Blockly.parentContainer || document.body;
|
|
69
|
+
container.appendChild(Blockly.WidgetDiv.DIV);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Initialize and display the widget div. Close the old one if needed.
|
|
74
|
+
* @param {!Object} newOwner The object that will be using this container.
|
|
75
|
+
* @param {boolean} rtl Right-to-left (true) or left-to-right (false).
|
|
76
|
+
* @param {Function} dispose Optional cleanup function to be run when the
|
|
77
|
+
* widget is closed.
|
|
78
|
+
*/
|
|
79
|
+
Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) {
|
|
80
|
+
Blockly.WidgetDiv.hide();
|
|
81
|
+
Blockly.WidgetDiv.owner_ = newOwner;
|
|
82
|
+
Blockly.WidgetDiv.dispose_ = dispose;
|
|
83
|
+
var div = Blockly.WidgetDiv.DIV;
|
|
84
|
+
div.style.direction = rtl ? 'rtl' : 'ltr';
|
|
85
|
+
div.style.display = 'block';
|
|
86
|
+
var mainWorkspace =
|
|
87
|
+
/** @type {!Blockly.WorkspaceSvg} */ (Blockly.getMainWorkspace());
|
|
88
|
+
Blockly.WidgetDiv.rendererClassName_ =
|
|
89
|
+
mainWorkspace.getRenderer().getClassName();
|
|
90
|
+
Blockly.WidgetDiv.themeClassName_ = mainWorkspace.getTheme().getClassName();
|
|
91
|
+
Blockly.utils.dom.addClass(div, Blockly.WidgetDiv.rendererClassName_);
|
|
92
|
+
Blockly.utils.dom.addClass(div, Blockly.WidgetDiv.themeClassName_);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Destroy the widget and hide the div.
|
|
97
|
+
*/
|
|
98
|
+
Blockly.WidgetDiv.hide = function() {
|
|
99
|
+
if (!Blockly.WidgetDiv.isVisible()) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
Blockly.WidgetDiv.owner_ = null;
|
|
103
|
+
|
|
104
|
+
var div = Blockly.WidgetDiv.DIV;
|
|
105
|
+
div.style.display = 'none';
|
|
106
|
+
div.style.left = '';
|
|
107
|
+
div.style.top = '';
|
|
108
|
+
Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_();
|
|
109
|
+
Blockly.WidgetDiv.dispose_ = null;
|
|
110
|
+
div.textContent = '';
|
|
111
|
+
|
|
112
|
+
if (Blockly.WidgetDiv.rendererClassName_) {
|
|
113
|
+
Blockly.utils.dom.removeClass(div, Blockly.WidgetDiv.rendererClassName_);
|
|
114
|
+
Blockly.WidgetDiv.rendererClassName_ = '';
|
|
115
|
+
}
|
|
116
|
+
if (Blockly.WidgetDiv.themeClassName_) {
|
|
117
|
+
Blockly.utils.dom.removeClass(div, Blockly.WidgetDiv.themeClassName_);
|
|
118
|
+
Blockly.WidgetDiv.themeClassName_ = '';
|
|
119
|
+
}
|
|
120
|
+
(/** @type {!Blockly.WorkspaceSvg} */ (
|
|
121
|
+
Blockly.getMainWorkspace())).markFocused();
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Is the container visible?
|
|
126
|
+
* @return {boolean} True if visible.
|
|
127
|
+
*/
|
|
128
|
+
Blockly.WidgetDiv.isVisible = function() {
|
|
129
|
+
return !!Blockly.WidgetDiv.owner_;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Destroy the widget and hide the div if it is being used by the specified
|
|
134
|
+
* object.
|
|
135
|
+
* @param {!Object} oldOwner The object that was using this container.
|
|
136
|
+
*/
|
|
137
|
+
Blockly.WidgetDiv.hideIfOwner = function(oldOwner) {
|
|
138
|
+
if (Blockly.WidgetDiv.owner_ == oldOwner) {
|
|
139
|
+
Blockly.WidgetDiv.hide();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Set the widget div's position and height. This function does nothing clever:
|
|
145
|
+
* it will not ensure that your widget div ends up in the visible window.
|
|
146
|
+
* @param {number} x Horizontal location (window coordinates, not body).
|
|
147
|
+
* @param {number} y Vertical location (window coordinates, not body).
|
|
148
|
+
* @param {number} height The height of the widget div (pixels).
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
Blockly.WidgetDiv.positionInternal_ = function(x, y, height) {
|
|
152
|
+
Blockly.WidgetDiv.DIV.style.left = x + 'px';
|
|
153
|
+
Blockly.WidgetDiv.DIV.style.top = y + 'px';
|
|
154
|
+
Blockly.WidgetDiv.DIV.style.height = height + 'px';
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Position the widget div based on an anchor rectangle.
|
|
159
|
+
* The widget should be placed adjacent to but not overlapping the anchor
|
|
160
|
+
* rectangle. The preferred position is directly below and aligned to the left
|
|
161
|
+
* (LTR) or right (RTL) side of the anchor.
|
|
162
|
+
* @param {!Blockly.utils.Rect} viewportBBox The bounding rectangle of the
|
|
163
|
+
* current viewport, in window coordinates.
|
|
164
|
+
* @param {!Blockly.utils.Rect} anchorBBox The bounding rectangle of the anchor,
|
|
165
|
+
* in window coordinates.
|
|
166
|
+
* @param {!Blockly.utils.Size} widgetSize The size of the widget that is inside
|
|
167
|
+
* the widget div, in window coordinates.
|
|
168
|
+
* @param {boolean} rtl Whether the workspace is in RTL mode. This determines
|
|
169
|
+
* horizontal alignment.
|
|
170
|
+
* @package
|
|
171
|
+
*/
|
|
172
|
+
Blockly.WidgetDiv.positionWithAnchor = function(viewportBBox, anchorBBox,
|
|
173
|
+
widgetSize, rtl) {
|
|
174
|
+
var y = Blockly.WidgetDiv.calculateY_(viewportBBox, anchorBBox, widgetSize);
|
|
175
|
+
var x = Blockly.WidgetDiv.calculateX_(viewportBBox, anchorBBox, widgetSize,
|
|
176
|
+
rtl);
|
|
177
|
+
|
|
178
|
+
if (y < 0) {
|
|
179
|
+
Blockly.WidgetDiv.positionInternal_(x, 0, widgetSize.height + y);
|
|
180
|
+
} else {
|
|
181
|
+
Blockly.WidgetDiv.positionInternal_(x, y, widgetSize.height);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Calculate an x position (in window coordinates) such that the widget will not
|
|
187
|
+
* be offscreen on the right or left.
|
|
188
|
+
* @param {!Blockly.utils.Rect} viewportBBox The bounding rectangle of the
|
|
189
|
+
* current viewport, in window coordinates.
|
|
190
|
+
* @param {!Blockly.utils.Rect} anchorBBox The bounding rectangle of the anchor,
|
|
191
|
+
* in window coordinates.
|
|
192
|
+
* @param {Blockly.utils.Size} widgetSize The dimensions of the widget inside the
|
|
193
|
+
* widget div.
|
|
194
|
+
* @param {boolean} rtl Whether the Blockly workspace is in RTL mode.
|
|
195
|
+
* @return {number} A valid x-coordinate for the top left corner of the widget
|
|
196
|
+
* div, in window coordinates.
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
Blockly.WidgetDiv.calculateX_ = function(viewportBBox, anchorBBox, widgetSize,
|
|
200
|
+
rtl) {
|
|
201
|
+
if (rtl) {
|
|
202
|
+
// Try to align the right side of the field and the right side of widget.
|
|
203
|
+
var widgetLeft = anchorBBox.right - widgetSize.width;
|
|
204
|
+
// Don't go offscreen left.
|
|
205
|
+
var x = Math.max(widgetLeft, viewportBBox.left);
|
|
206
|
+
// But really don't go offscreen right:
|
|
207
|
+
return Math.min(x, viewportBBox.right - widgetSize.width);
|
|
208
|
+
} else {
|
|
209
|
+
// Try to align the left side of the field and the left side of widget.
|
|
210
|
+
// Don't go offscreen right.
|
|
211
|
+
var x = Math.min(anchorBBox.left, viewportBBox.right - widgetSize.width);
|
|
212
|
+
// But left is more important, because that's where the text is.
|
|
213
|
+
return Math.max(x, viewportBBox.left);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Calculate a y position (in window coordinates) such that the widget will not
|
|
219
|
+
* be offscreen on the top or bottom.
|
|
220
|
+
* @param {!Blockly.utils.Rect} viewportBBox The bounding rectangle of the
|
|
221
|
+
* current viewport, in window coordinates.
|
|
222
|
+
* @param {!Blockly.utils.Rect} anchorBBox The bounding rectangle of the anchor,
|
|
223
|
+
* in window coordinates.
|
|
224
|
+
* @param {Blockly.utils.Size} widgetSize The dimensions of the widget inside the
|
|
225
|
+
* widget div.
|
|
226
|
+
* @return {number} A valid y-coordinate for the top left corner of the widget
|
|
227
|
+
* div, in window coordinates.
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
Blockly.WidgetDiv.calculateY_ = function(viewportBBox, anchorBBox, widgetSize) {
|
|
231
|
+
// Flip the widget vertically if off the bottom.
|
|
232
|
+
if (anchorBBox.bottom + widgetSize.height >= viewportBBox.bottom) {
|
|
233
|
+
// The bottom of the widget is at the top of the field.
|
|
234
|
+
return anchorBBox.top - widgetSize.height;
|
|
235
|
+
// The widget could go off the top of the window, but it would also go off
|
|
236
|
+
// the bottom. The window is just too small.
|
|
237
|
+
} else {
|
|
238
|
+
// The top of the widget is at the bottom of the field.
|
|
239
|
+
return anchorBBox.bottom;
|
|
240
|
+
}
|
|
241
|
+
};
|