scratch-blocks 1.1.206 → 2.0.0-beta.1
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/.husky/commit-msg +0 -3
- package/CHANGELOG.md +111 -833
- package/TODO.md +16 -0
- package/blockly-rc/.eslintignore +28 -0
- package/blockly-rc/.eslintrc.js +187 -0
- package/blockly-rc/.gitattributes +1 -0
- package/blockly-rc/.github/CODEOWNERS +1 -0
- package/blockly-rc/.github/CONTRIBUTING.md +46 -0
- package/blockly-rc/.github/ISSUE_TEMPLATE/bug_report.yaml +58 -0
- package/blockly-rc/.github/ISSUE_TEMPLATE/config.yml +7 -0
- package/blockly-rc/.github/ISSUE_TEMPLATE/documentation.yaml +38 -0
- package/blockly-rc/.github/ISSUE_TEMPLATE/feature_request.yaml +39 -0
- package/blockly-rc/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/blockly-rc/.github/dependabot.yml +27 -0
- package/blockly-rc/.github/release.yml +32 -0
- package/blockly-rc/.github/workflows/appengine_deploy.yml +54 -0
- package/blockly-rc/.github/workflows/assign_reviewers.yml +41 -0
- package/blockly-rc/.github/workflows/browser_test.yml +55 -0
- package/blockly-rc/.github/workflows/build.yml +86 -0
- package/blockly-rc/.github/workflows/conventional-label.yml +17 -0
- package/blockly-rc/.github/workflows/develop_freeze.yml +26 -0
- package/blockly-rc/.github/workflows/tag_module_cleanup.yml +37 -0
- package/blockly-rc/.github/workflows/welcome_new_contributors.yml +36 -0
- package/blockly-rc/.prettierignore +30 -0
- package/blockly-rc/.prettierrc.js +13 -0
- package/blockly-rc/CHANGELOG.md +77 -0
- package/blockly-rc/LICENSE +202 -0
- package/blockly-rc/README.md +80 -0
- package/blockly-rc/_config.yml +1 -0
- package/blockly-rc/api-extractor.json +385 -0
- package/blockly-rc/appengine/.gcloudignore +20 -0
- package/blockly-rc/appengine/README.txt +42 -0
- package/blockly-rc/appengine/add_timestamps.py +69 -0
- package/blockly-rc/appengine/app.yaml +104 -0
- package/blockly-rc/appengine/apple-touch-icon.png +0 -0
- package/blockly-rc/appengine/blockly_compressed.js +11 -0
- package/blockly-rc/appengine/expiration.py +52 -0
- package/blockly-rc/appengine/favicon.ico +0 -0
- package/blockly-rc/appengine/index.yaml +11 -0
- package/blockly-rc/appengine/main.py +39 -0
- package/blockly-rc/appengine/redirect.html +107 -0
- package/blockly-rc/appengine/requirements.txt +1 -0
- package/blockly-rc/appengine/robots.txt +2 -0
- package/blockly-rc/appengine/storage.js +190 -0
- package/blockly-rc/appengine/storage.py +125 -0
- package/blockly-rc/blocks/blocks.ts +44 -0
- package/blockly-rc/blocks/lists.ts +1085 -0
- package/blockly-rc/blocks/logic.ts +712 -0
- package/blockly-rc/blocks/loops.ts +408 -0
- package/blockly-rc/blocks/math.ts +591 -0
- package/blockly-rc/blocks/procedures.ts +1364 -0
- package/blockly-rc/blocks/text.ts +1007 -0
- package/blockly-rc/blocks/variables.ts +183 -0
- package/blockly-rc/blocks/variables_dynamic.ts +194 -0
- package/blockly-rc/core/any_aliases.ts +8 -0
- package/blockly-rc/core/block.ts +2523 -0
- package/blockly-rc/core/block_animations.ts +225 -0
- package/blockly-rc/core/block_flyout_inflater.ts +262 -0
- package/blockly-rc/core/block_svg.ts +1768 -0
- package/blockly-rc/core/blockly.ts +605 -0
- package/blockly-rc/core/blockly_options.ts +71 -0
- package/blockly-rc/core/blocks.ts +18 -0
- package/blockly-rc/core/browser_events.ts +244 -0
- package/blockly-rc/core/bubbles/bubble.ts +658 -0
- package/blockly-rc/core/bubbles/mini_workspace_bubble.ts +280 -0
- package/blockly-rc/core/bubbles/text_bubble.ts +103 -0
- package/blockly-rc/core/bubbles/textinput_bubble.ts +344 -0
- package/blockly-rc/core/bubbles.ts +12 -0
- package/blockly-rc/core/bump_objects.ts +192 -0
- package/blockly-rc/core/button_flyout_inflater.ts +63 -0
- package/blockly-rc/core/clipboard/block_paster.ts +142 -0
- package/blockly-rc/core/clipboard/registry.ts +31 -0
- package/blockly-rc/core/clipboard/workspace_comment_paster.ts +94 -0
- package/blockly-rc/core/clipboard.ts +113 -0
- package/blockly-rc/core/comments/comment_view.ts +899 -0
- package/blockly-rc/core/comments/rendered_workspace_comment.ts +297 -0
- package/blockly-rc/core/comments/workspace_comment.ts +237 -0
- package/blockly-rc/core/comments.ts +9 -0
- package/blockly-rc/core/common.ts +305 -0
- package/blockly-rc/core/component_manager.ts +235 -0
- package/blockly-rc/core/config.ts +65 -0
- package/blockly-rc/core/connection.ts +793 -0
- package/blockly-rc/core/connection_checker.ts +348 -0
- package/blockly-rc/core/connection_db.ts +297 -0
- package/blockly-rc/core/connection_type.ts +21 -0
- package/blockly-rc/core/constants.ts +23 -0
- package/blockly-rc/core/contextmenu.ts +268 -0
- package/blockly-rc/core/contextmenu_items.ts +700 -0
- package/blockly-rc/core/contextmenu_registry.ts +194 -0
- package/blockly-rc/core/css.ts +481 -0
- package/blockly-rc/core/delete_area.ts +77 -0
- package/blockly-rc/core/dialog.ts +121 -0
- package/blockly-rc/core/drag_target.ts +97 -0
- package/blockly-rc/core/dragging/block_drag_strategy.ts +454 -0
- package/blockly-rc/core/dragging/bubble_drag_strategy.ts +52 -0
- package/blockly-rc/core/dragging/comment_drag_strategy.ts +91 -0
- package/blockly-rc/core/dragging/dragger.ts +163 -0
- package/blockly-rc/core/dragging.ts +12 -0
- package/blockly-rc/core/dropdowndiv.ts +768 -0
- package/blockly-rc/core/events/events.ts +163 -0
- package/blockly-rc/core/events/events_abstract.ts +130 -0
- package/blockly-rc/core/events/events_block_base.ts +88 -0
- package/blockly-rc/core/events/events_block_change.ts +259 -0
- package/blockly-rc/core/events/events_block_create.ts +185 -0
- package/blockly-rc/core/events/events_block_delete.ts +182 -0
- package/blockly-rc/core/events/events_block_drag.ts +116 -0
- package/blockly-rc/core/events/events_block_field_intermediate_change.ts +167 -0
- package/blockly-rc/core/events/events_block_move.ts +307 -0
- package/blockly-rc/core/events/events_bubble_open.ts +120 -0
- package/blockly-rc/core/events/events_click.ts +110 -0
- package/blockly-rc/core/events/events_comment_base.ts +126 -0
- package/blockly-rc/core/events/events_comment_change.ts +161 -0
- package/blockly-rc/core/events/events_comment_collapse.ts +103 -0
- package/blockly-rc/core/events/events_comment_create.ts +118 -0
- package/blockly-rc/core/events/events_comment_delete.ts +117 -0
- package/blockly-rc/core/events/events_comment_drag.ts +99 -0
- package/blockly-rc/core/events/events_comment_move.ts +207 -0
- package/blockly-rc/core/events/events_comment_resize.ts +174 -0
- package/blockly-rc/core/events/events_marker_move.ts +134 -0
- package/blockly-rc/core/events/events_selected.ts +98 -0
- package/blockly-rc/core/events/events_theme_change.ts +84 -0
- package/blockly-rc/core/events/events_toolbox_item_select.ts +96 -0
- package/blockly-rc/core/events/events_trashcan_open.ts +88 -0
- package/blockly-rc/core/events/events_ui_base.ts +47 -0
- package/blockly-rc/core/events/events_var_base.ts +89 -0
- package/blockly-rc/core/events/events_var_create.ts +129 -0
- package/blockly-rc/core/events/events_var_delete.ts +124 -0
- package/blockly-rc/core/events/events_var_rename.ts +133 -0
- package/blockly-rc/core/events/events_var_type_change.ts +122 -0
- package/blockly-rc/core/events/events_viewport.ts +149 -0
- package/blockly-rc/core/events/utils.ts +595 -0
- package/blockly-rc/core/events/workspace_events.ts +46 -0
- package/blockly-rc/core/extensions.ts +491 -0
- package/blockly-rc/core/field.ts +1471 -0
- package/blockly-rc/core/field_checkbox.ts +271 -0
- package/blockly-rc/core/field_dropdown.ts +857 -0
- package/blockly-rc/core/field_image.ts +297 -0
- package/blockly-rc/core/field_input.ts +755 -0
- package/blockly-rc/core/field_label.ts +150 -0
- package/blockly-rc/core/field_label_serializable.ts +73 -0
- package/blockly-rc/core/field_number.ts +381 -0
- package/blockly-rc/core/field_registry.ts +115 -0
- package/blockly-rc/core/field_textinput.ts +117 -0
- package/blockly-rc/core/field_variable.ts +651 -0
- package/blockly-rc/core/flyout_base.ts +968 -0
- package/blockly-rc/core/flyout_button.ts +416 -0
- package/blockly-rc/core/flyout_horizontal.ts +374 -0
- package/blockly-rc/core/flyout_metrics_manager.ts +90 -0
- package/blockly-rc/core/flyout_separator.ts +61 -0
- package/blockly-rc/core/flyout_vertical.ts +353 -0
- package/blockly-rc/core/generator.ts +611 -0
- package/blockly-rc/core/gesture.ts +1191 -0
- package/blockly-rc/core/grid.ts +252 -0
- package/blockly-rc/core/icons/comment_icon.ts +435 -0
- package/blockly-rc/core/icons/exceptions.ts +23 -0
- package/blockly-rc/core/icons/icon.ts +147 -0
- package/blockly-rc/core/icons/icon_types.ts +32 -0
- package/blockly-rc/core/icons/mutator_icon.ts +354 -0
- package/blockly-rc/core/icons/registry.ts +33 -0
- package/blockly-rc/core/icons/warning_icon.ts +219 -0
- package/blockly-rc/core/icons.ts +24 -0
- package/blockly-rc/core/inject.ts +428 -0
- package/blockly-rc/core/inputs/align.ts +14 -0
- package/blockly-rc/core/inputs/dummy_input.ts +26 -0
- package/blockly-rc/core/inputs/end_row_input.ts +31 -0
- package/blockly-rc/core/inputs/input.ts +318 -0
- package/blockly-rc/core/inputs/input_types.ts +27 -0
- package/blockly-rc/core/inputs/statement_input.ts +34 -0
- package/blockly-rc/core/inputs/value_input.ts +30 -0
- package/blockly-rc/core/inputs.ts +23 -0
- package/blockly-rc/core/insertion_marker_manager.ts +742 -0
- package/blockly-rc/core/insertion_marker_previewer.ts +254 -0
- package/blockly-rc/core/interfaces/i_ast_node_location.ts +12 -0
- package/blockly-rc/core/interfaces/i_ast_node_location_svg.ts +28 -0
- package/blockly-rc/core/interfaces/i_ast_node_location_with_block.ts +22 -0
- package/blockly-rc/core/interfaces/i_autohideable.ts +22 -0
- package/blockly-rc/core/interfaces/i_bounded_element.ts +30 -0
- package/blockly-rc/core/interfaces/i_bubble.ts +63 -0
- package/blockly-rc/core/interfaces/i_collapsible_toolbox_item.ts +33 -0
- package/blockly-rc/core/interfaces/i_comment_icon.ts +47 -0
- package/blockly-rc/core/interfaces/i_component.ts +19 -0
- package/blockly-rc/core/interfaces/i_connection_checker.ts +100 -0
- package/blockly-rc/core/interfaces/i_connection_previewer.ts +50 -0
- package/blockly-rc/core/interfaces/i_contextmenu.ts +16 -0
- package/blockly-rc/core/interfaces/i_copyable.ts +31 -0
- package/blockly-rc/core/interfaces/i_deletable.ts +34 -0
- package/blockly-rc/core/interfaces/i_delete_area.ts +28 -0
- package/blockly-rc/core/interfaces/i_drag_target.ts +69 -0
- package/blockly-rc/core/interfaces/i_draggable.ts +72 -0
- package/blockly-rc/core/interfaces/i_dragger.ts +35 -0
- package/blockly-rc/core/interfaces/i_flyout.ts +189 -0
- package/blockly-rc/core/interfaces/i_flyout_inflater.ts +41 -0
- package/blockly-rc/core/interfaces/i_has_bubble.ts +20 -0
- package/blockly-rc/core/interfaces/i_icon.ts +114 -0
- package/blockly-rc/core/interfaces/i_keyboard_accessible.ts +21 -0
- package/blockly-rc/core/interfaces/i_legacy_procedure_blocks.ts +50 -0
- package/blockly-rc/core/interfaces/i_metrics_manager.ts +149 -0
- package/blockly-rc/core/interfaces/i_movable.ts +19 -0
- package/blockly-rc/core/interfaces/i_observable.ts +24 -0
- package/blockly-rc/core/interfaces/i_parameter_model.ts +51 -0
- package/blockly-rc/core/interfaces/i_paster.ts +25 -0
- package/blockly-rc/core/interfaces/i_positionable.ts +33 -0
- package/blockly-rc/core/interfaces/i_procedure_block.ts +27 -0
- package/blockly-rc/core/interfaces/i_procedure_map.ts +18 -0
- package/blockly-rc/core/interfaces/i_procedure_model.ts +71 -0
- package/blockly-rc/core/interfaces/i_registrable.ts +12 -0
- package/blockly-rc/core/interfaces/i_rendered_element.ts +22 -0
- package/blockly-rc/core/interfaces/i_selectable.ts +34 -0
- package/blockly-rc/core/interfaces/i_selectable_toolbox_item.ts +63 -0
- package/blockly-rc/core/interfaces/i_serializable.ts +28 -0
- package/blockly-rc/core/interfaces/i_serializer.ts +55 -0
- package/blockly-rc/core/interfaces/i_styleable.ts +26 -0
- package/blockly-rc/core/interfaces/i_toolbox.ts +112 -0
- package/blockly-rc/core/interfaces/i_toolbox_item.ts +81 -0
- package/blockly-rc/core/interfaces/i_variable_backed_parameter_model.ts +23 -0
- package/blockly-rc/core/interfaces/i_variable_map.ts +65 -0
- package/blockly-rc/core/interfaces/i_variable_model.ts +57 -0
- package/blockly-rc/core/internal_constants.ts +47 -0
- package/blockly-rc/core/keyboard_nav/ast_node.ts +884 -0
- package/blockly-rc/core/keyboard_nav/basic_cursor.ts +223 -0
- package/blockly-rc/core/keyboard_nav/cursor.ts +138 -0
- package/blockly-rc/core/keyboard_nav/marker.ts +113 -0
- package/blockly-rc/core/keyboard_nav/tab_navigate_cursor.ts +46 -0
- package/blockly-rc/core/label_flyout_inflater.ts +59 -0
- package/blockly-rc/core/layer_manager.ts +186 -0
- package/blockly-rc/core/layers.ts +17 -0
- package/blockly-rc/core/main.ts +31 -0
- package/blockly-rc/core/marker_manager.ts +189 -0
- package/blockly-rc/core/menu.ts +463 -0
- package/blockly-rc/core/menuitem.ts +221 -0
- package/blockly-rc/core/metrics_manager.ts +486 -0
- package/blockly-rc/core/msg.ts +27 -0
- package/blockly-rc/core/names.ts +275 -0
- package/blockly-rc/core/observable_procedure_map.ts +66 -0
- package/blockly-rc/core/options.ts +377 -0
- package/blockly-rc/core/positionable_helpers.ts +186 -0
- package/blockly-rc/core/procedures.ts +510 -0
- package/blockly-rc/core/registry.ts +400 -0
- package/blockly-rc/core/render_management.ts +193 -0
- package/blockly-rc/core/rendered_connection.ts +571 -0
- package/blockly-rc/core/renderers/common/block_rendering.ts +120 -0
- package/blockly-rc/core/renderers/common/constants.ts +1198 -0
- package/blockly-rc/core/renderers/common/drawer.ts +518 -0
- package/blockly-rc/core/renderers/common/i_path_object.ts +137 -0
- package/blockly-rc/core/renderers/common/info.ts +767 -0
- package/blockly-rc/core/renderers/common/marker_svg.ts +765 -0
- package/blockly-rc/core/renderers/common/path_object.ts +324 -0
- package/blockly-rc/core/renderers/common/renderer.ts +281 -0
- package/blockly-rc/core/renderers/geras/constants.ts +46 -0
- package/blockly-rc/core/renderers/geras/drawer.ts +167 -0
- package/blockly-rc/core/renderers/geras/geras.ts +31 -0
- package/blockly-rc/core/renderers/geras/highlight_constants.ts +342 -0
- package/blockly-rc/core/renderers/geras/highlighter.ts +313 -0
- package/blockly-rc/core/renderers/geras/info.ts +478 -0
- package/blockly-rc/core/renderers/geras/measurables/inline_input.ts +37 -0
- package/blockly-rc/core/renderers/geras/measurables/statement_input.ts +36 -0
- package/blockly-rc/core/renderers/geras/path_object.ts +135 -0
- package/blockly-rc/core/renderers/geras/renderer.ts +124 -0
- package/blockly-rc/core/renderers/measurables/base.ts +41 -0
- package/blockly-rc/core/renderers/measurables/bottom_row.ts +104 -0
- package/blockly-rc/core/renderers/measurables/connection.ts +43 -0
- package/blockly-rc/core/renderers/measurables/external_value_input.ts +53 -0
- package/blockly-rc/core/renderers/measurables/field.ts +50 -0
- package/blockly-rc/core/renderers/measurables/hat.ts +33 -0
- package/blockly-rc/core/renderers/measurables/icon.ts +42 -0
- package/blockly-rc/core/renderers/measurables/in_row_spacer.ts +29 -0
- package/blockly-rc/core/renderers/measurables/inline_input.ts +63 -0
- package/blockly-rc/core/renderers/measurables/input_connection.ts +57 -0
- package/blockly-rc/core/renderers/measurables/input_row.ts +67 -0
- package/blockly-rc/core/renderers/measurables/jagged_edge.ts +28 -0
- package/blockly-rc/core/renderers/measurables/next_connection.ts +34 -0
- package/blockly-rc/core/renderers/measurables/output_connection.ts +43 -0
- package/blockly-rc/core/renderers/measurables/previous_connection.ts +34 -0
- package/blockly-rc/core/renderers/measurables/round_corner.ts +34 -0
- package/blockly-rc/core/renderers/measurables/row.ts +191 -0
- package/blockly-rc/core/renderers/measurables/spacer_row.ts +44 -0
- package/blockly-rc/core/renderers/measurables/square_corner.ts +32 -0
- package/blockly-rc/core/renderers/measurables/statement_input.ts +41 -0
- package/blockly-rc/core/renderers/measurables/top_row.ts +110 -0
- package/blockly-rc/core/renderers/measurables/types.ts +319 -0
- package/blockly-rc/core/renderers/thrasos/info.ts +328 -0
- package/blockly-rc/core/renderers/thrasos/renderer.ts +40 -0
- package/blockly-rc/core/renderers/thrasos/thrasos.ts +14 -0
- package/blockly-rc/core/renderers/zelos/constants.ts +877 -0
- package/blockly-rc/core/renderers/zelos/drawer.ts +274 -0
- package/blockly-rc/core/renderers/zelos/info.ts +652 -0
- package/blockly-rc/core/renderers/zelos/marker_svg.ts +145 -0
- package/blockly-rc/core/renderers/zelos/measurables/bottom_row.ts +44 -0
- package/blockly-rc/core/renderers/zelos/measurables/inputs.ts +41 -0
- package/blockly-rc/core/renderers/zelos/measurables/row_elements.ts +29 -0
- package/blockly-rc/core/renderers/zelos/measurables/top_row.ts +50 -0
- package/blockly-rc/core/renderers/zelos/path_object.ts +209 -0
- package/blockly-rc/core/renderers/zelos/renderer.ts +143 -0
- package/blockly-rc/core/renderers/zelos/zelos.ts +33 -0
- package/blockly-rc/core/scrollbar.ts +898 -0
- package/blockly-rc/core/scrollbar_pair.ts +349 -0
- package/blockly-rc/core/separator_flyout_inflater.ts +69 -0
- package/blockly-rc/core/serialization/blocks.ts +868 -0
- package/blockly-rc/core/serialization/exceptions.ts +112 -0
- package/blockly-rc/core/serialization/priorities.ts +25 -0
- package/blockly-rc/core/serialization/procedures.ts +158 -0
- package/blockly-rc/core/serialization/registry.ts +30 -0
- package/blockly-rc/core/serialization/variables.ts +68 -0
- package/blockly-rc/core/serialization/workspace_comments.ts +143 -0
- package/blockly-rc/core/serialization/workspaces.ts +94 -0
- package/blockly-rc/core/serialization.ts +32 -0
- package/blockly-rc/core/shortcut_items.ts +338 -0
- package/blockly-rc/core/shortcut_registry.ts +368 -0
- package/blockly-rc/core/sprites.ts +15 -0
- package/blockly-rc/core/theme/classic.ts +40 -0
- package/blockly-rc/core/theme/themes.ts +12 -0
- package/blockly-rc/core/theme/zelos.ts +80 -0
- package/blockly-rc/core/theme.ts +232 -0
- package/blockly-rc/core/theme_manager.ts +192 -0
- package/blockly-rc/core/toolbox/category.ts +739 -0
- package/blockly-rc/core/toolbox/collapsible_category.ts +288 -0
- package/blockly-rc/core/toolbox/separator.ts +105 -0
- package/blockly-rc/core/toolbox/toolbox.ts +1134 -0
- package/blockly-rc/core/toolbox/toolbox_item.ts +152 -0
- package/blockly-rc/core/tooltip.ts +466 -0
- package/blockly-rc/core/touch.ts +155 -0
- package/blockly-rc/core/trashcan.ts +748 -0
- package/blockly-rc/core/utils/aria.ts +144 -0
- package/blockly-rc/core/utils/array.ts +24 -0
- package/blockly-rc/core/utils/colour.ts +265 -0
- package/blockly-rc/core/utils/coordinate.ts +129 -0
- package/blockly-rc/core/utils/deprecation.ts +47 -0
- package/blockly-rc/core/utils/dom.ts +356 -0
- package/blockly-rc/core/utils/idgenerator.ts +70 -0
- package/blockly-rc/core/utils/keycodes.ts +154 -0
- package/blockly-rc/core/utils/math.ts +50 -0
- package/blockly-rc/core/utils/metrics.ts +86 -0
- package/blockly-rc/core/utils/object.ts +28 -0
- package/blockly-rc/core/utils/parsing.ts +287 -0
- package/blockly-rc/core/utils/rect.ts +69 -0
- package/blockly-rc/core/utils/size.ts +62 -0
- package/blockly-rc/core/utils/string.ts +289 -0
- package/blockly-rc/core/utils/style.ts +219 -0
- package/blockly-rc/core/utils/svg.ts +84 -0
- package/blockly-rc/core/utils/svg_math.ts +208 -0
- package/blockly-rc/core/utils/svg_paths.ts +133 -0
- package/blockly-rc/core/utils/toolbox.ts +419 -0
- package/blockly-rc/core/utils/useragent.ts +86 -0
- package/blockly-rc/core/utils/xml.ts +165 -0
- package/blockly-rc/core/utils.ts +59 -0
- package/blockly-rc/core/variable_map.ts +437 -0
- package/blockly-rc/core/variable_model.ts +149 -0
- package/blockly-rc/core/variables.ts +773 -0
- package/blockly-rc/core/variables_dynamic.ts +142 -0
- package/blockly-rc/core/widgetdiv.ts +319 -0
- package/blockly-rc/core/workspace.ts +957 -0
- package/blockly-rc/core/workspace_audio.ts +171 -0
- package/blockly-rc/core/workspace_dragger.ts +97 -0
- package/blockly-rc/core/workspace_svg.ts +2519 -0
- package/blockly-rc/core/xml.ts +1133 -0
- package/blockly-rc/core/zoom_controls.ts +492 -0
- package/blockly-rc/demos/blockfactory/analytics.js +195 -0
- package/blockly-rc/demos/blockfactory/app_controller.js +726 -0
- package/blockly-rc/demos/blockfactory/block_definition_extractor.js +742 -0
- package/blockly-rc/demos/blockfactory/block_exporter_controller.js +311 -0
- package/blockly-rc/demos/blockfactory/block_exporter_tools.js +212 -0
- package/blockly-rc/demos/blockfactory/block_exporter_view.js +101 -0
- package/blockly-rc/demos/blockfactory/block_library_controller.js +325 -0
- package/blockly-rc/demos/blockfactory/block_library_storage.js +149 -0
- package/blockly-rc/demos/blockfactory/block_library_view.js +178 -0
- package/blockly-rc/demos/blockfactory/block_option.js +151 -0
- package/blockly-rc/demos/blockfactory/blocks.js +916 -0
- package/blockly-rc/demos/blockfactory/cp.css +46 -0
- package/blockly-rc/demos/blockfactory/cp.js +179 -0
- package/blockly-rc/demos/blockfactory/factory.css +586 -0
- package/blockly-rc/demos/blockfactory/factory.js +337 -0
- package/blockly-rc/demos/blockfactory/factory_utils.js +1036 -0
- package/blockly-rc/demos/blockfactory/icon.png +0 -0
- package/blockly-rc/demos/blockfactory/index.html +767 -0
- package/blockly-rc/demos/blockfactory/link.png +0 -0
- package/blockly-rc/demos/blockfactory/standard_categories.js +384 -0
- package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_controller.js +1332 -0
- package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_generator.js +224 -0
- package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_init.js +541 -0
- package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_model.js +548 -0
- package/blockly-rc/demos/blockfactory/workspacefactory/wfactory_view.js +424 -0
- package/blockly-rc/demos/code/code.js +626 -0
- package/blockly-rc/demos/code/icon.png +0 -0
- package/blockly-rc/demos/code/icons.png +0 -0
- package/blockly-rc/demos/code/index.html +359 -0
- package/blockly-rc/demos/code/msg/ar.js +24 -0
- package/blockly-rc/demos/code/msg/be-tarask.js +24 -0
- package/blockly-rc/demos/code/msg/br.js +24 -0
- package/blockly-rc/demos/code/msg/ca.js +24 -0
- package/blockly-rc/demos/code/msg/cs.js +24 -0
- package/blockly-rc/demos/code/msg/da.js +24 -0
- package/blockly-rc/demos/code/msg/de.js +24 -0
- package/blockly-rc/demos/code/msg/el.js +24 -0
- package/blockly-rc/demos/code/msg/en.js +24 -0
- package/blockly-rc/demos/code/msg/es.js +24 -0
- package/blockly-rc/demos/code/msg/et.js +24 -0
- package/blockly-rc/demos/code/msg/fa.js +24 -0
- package/blockly-rc/demos/code/msg/fr.js +24 -0
- package/blockly-rc/demos/code/msg/he.js +24 -0
- package/blockly-rc/demos/code/msg/hr.js +24 -0
- package/blockly-rc/demos/code/msg/hrx.js +24 -0
- package/blockly-rc/demos/code/msg/hu.js +24 -0
- package/blockly-rc/demos/code/msg/ia.js +24 -0
- package/blockly-rc/demos/code/msg/is.js +24 -0
- package/blockly-rc/demos/code/msg/it.js +24 -0
- package/blockly-rc/demos/code/msg/ja.js +24 -0
- package/blockly-rc/demos/code/msg/kab.js +24 -0
- package/blockly-rc/demos/code/msg/ko.js +24 -0
- package/blockly-rc/demos/code/msg/mk.js +24 -0
- package/blockly-rc/demos/code/msg/ms.js +24 -0
- package/blockly-rc/demos/code/msg/nb.js +24 -0
- package/blockly-rc/demos/code/msg/nl.js +24 -0
- package/blockly-rc/demos/code/msg/oc.js +24 -0
- package/blockly-rc/demos/code/msg/pl.js +24 -0
- package/blockly-rc/demos/code/msg/pms.js +24 -0
- package/blockly-rc/demos/code/msg/pt-br.js +24 -0
- package/blockly-rc/demos/code/msg/ro.js +24 -0
- package/blockly-rc/demos/code/msg/ru.js +24 -0
- package/blockly-rc/demos/code/msg/sc.js +24 -0
- package/blockly-rc/demos/code/msg/sk.js +24 -0
- package/blockly-rc/demos/code/msg/sr.js +24 -0
- package/blockly-rc/demos/code/msg/sv.js +24 -0
- package/blockly-rc/demos/code/msg/ta.js +24 -0
- package/blockly-rc/demos/code/msg/th.js +24 -0
- package/blockly-rc/demos/code/msg/tlh.js +24 -0
- package/blockly-rc/demos/code/msg/tr.js +24 -0
- package/blockly-rc/demos/code/msg/uk.js +24 -0
- package/blockly-rc/demos/code/msg/vi.js +24 -0
- package/blockly-rc/demos/code/msg/zh-hans.js +24 -0
- package/blockly-rc/demos/code/msg/zh-hant.js +24 -0
- package/blockly-rc/demos/code/style.css +184 -0
- package/blockly-rc/demos/index.html +68 -0
- package/blockly-rc/demos/minimap/icon.png +0 -0
- package/blockly-rc/demos/minimap/index.html +91 -0
- package/blockly-rc/demos/minimap/minimap.js +302 -0
- package/blockly-rc/demos/mobile/README.md +53 -0
- package/blockly-rc/demos/mobile/android/README.md +45 -0
- package/blockly-rc/demos/mobile/android/app/build.gradle +64 -0
- package/blockly-rc/demos/mobile/android/app/proguard-rules.pro +21 -0
- package/blockly-rc/demos/mobile/android/app/src/androidTest/java/com/example/blocklywebview/ExampleInstrumentedTest.java +26 -0
- package/blockly-rc/demos/mobile/android/app/src/main/AndroidManifest.xml +21 -0
- package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/BlocklyWebViewFragment.java +40 -0
- package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/JsDialogHelper.java +150 -0
- package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/WebChromeClient.java +32 -0
- package/blockly-rc/demos/mobile/android/app/src/main/java/com/google/blockly/android/webview/demo/MainActivity.java +18 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/drawable/ic_launcher_background.xml +74 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/layout/activity_main.xml +17 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/layout/js_prompt.xml +37 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/values/colors.xml +6 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/values/js_dialog_helper.xml +7 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/values/strings.xml +3 -0
- package/blockly-rc/demos/mobile/android/app/src/main/res/values/styles.xml +11 -0
- package/blockly-rc/demos/mobile/android/app/src/test/java/com/example/blocklywebview/ExampleUnitTest.java +17 -0
- package/blockly-rc/demos/mobile/android/build.gradle +27 -0
- package/blockly-rc/demos/mobile/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/blockly-rc/demos/mobile/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/blockly-rc/demos/mobile/android/gradle.properties +13 -0
- package/blockly-rc/demos/mobile/android/gradlew +172 -0
- package/blockly-rc/demos/mobile/android/gradlew.bat +84 -0
- package/blockly-rc/demos/mobile/android/settings.gradle +1 -0
- package/blockly-rc/demos/mobile/html/index.html +31 -0
- package/blockly-rc/demos/mobile/html/ln_resources.sh +22 -0
- package/blockly-rc/demos/mobile/html/toolbox_standard.js +333 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/AppDelegate.swift +46 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/Assets.xcassets/Contents.json +6 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/Base.lproj/LaunchScreen.storyboard +25 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/Base.lproj/Main.storyboard +44 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/Info.plist +45 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView/ViewController.swift +110 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.pbxproj +390 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/blockly-rc/demos/mobile/ios/Blockly WebView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/blockly-rc/demos/mobile/ios/cp_resources.sh +21 -0
- package/blockly-rc/demos/storage/icon.png +0 -0
- package/blockly-rc/demos/storage/index.html +104 -0
- package/blockly-rc/generators/dart/dart_generator.ts +321 -0
- package/blockly-rc/generators/dart/lists.ts +525 -0
- package/blockly-rc/generators/dart/logic.ts +155 -0
- package/blockly-rc/generators/dart/loops.ts +217 -0
- package/blockly-rc/generators/dart/math.ts +559 -0
- package/blockly-rc/generators/dart/procedures.ts +138 -0
- package/blockly-rc/generators/dart/text.ts +405 -0
- package/blockly-rc/generators/dart/variables.ts +32 -0
- package/blockly-rc/generators/dart/variables_dynamic.ts +17 -0
- package/blockly-rc/generators/dart.ts +50 -0
- package/blockly-rc/generators/javascript/javascript_generator.ts +346 -0
- package/blockly-rc/generators/javascript/lists.ts +465 -0
- package/blockly-rc/generators/javascript/logic.ts +153 -0
- package/blockly-rc/generators/javascript/loops.ts +245 -0
- package/blockly-rc/generators/javascript/math.ts +450 -0
- package/blockly-rc/generators/javascript/procedures.ts +142 -0
- package/blockly-rc/generators/javascript/text.ts +418 -0
- package/blockly-rc/generators/javascript/variables.ts +32 -0
- package/blockly-rc/generators/javascript/variables_dynamic.ts +17 -0
- package/blockly-rc/generators/javascript.ts +46 -0
- package/blockly-rc/generators/lua/lists.ts +445 -0
- package/blockly-rc/generators/lua/logic.ts +142 -0
- package/blockly-rc/generators/lua/loops.ts +192 -0
- package/blockly-rc/generators/lua/lua_generator.ts +225 -0
- package/blockly-rc/generators/lua/math.ts +473 -0
- package/blockly-rc/generators/lua/procedures.ts +144 -0
- package/blockly-rc/generators/lua/text.ts +380 -0
- package/blockly-rc/generators/lua/variables.ts +31 -0
- package/blockly-rc/generators/lua/variables_dynamic.ts +17 -0
- package/blockly-rc/generators/lua.ts +44 -0
- package/blockly-rc/generators/php/lists.ts +585 -0
- package/blockly-rc/generators/php/logic.ts +155 -0
- package/blockly-rc/generators/php/loops.ts +218 -0
- package/blockly-rc/generators/php/math.ts +408 -0
- package/blockly-rc/generators/php/php_generator.ts +320 -0
- package/blockly-rc/generators/php/procedures.ts +159 -0
- package/blockly-rc/generators/php/text.ts +315 -0
- package/blockly-rc/generators/php/variables.ts +32 -0
- package/blockly-rc/generators/php/variables_dynamic.ts +17 -0
- package/blockly-rc/generators/php.ts +46 -0
- package/blockly-rc/generators/python/lists.ts +398 -0
- package/blockly-rc/generators/python/logic.ts +148 -0
- package/blockly-rc/generators/python/loops.ts +251 -0
- package/blockly-rc/generators/python/math.ts +434 -0
- package/blockly-rc/generators/python/procedures.ts +159 -0
- package/blockly-rc/generators/python/python_generator.ts +355 -0
- package/blockly-rc/generators/python/text.ts +338 -0
- package/blockly-rc/generators/python/variables.ts +31 -0
- package/blockly-rc/generators/python/variables_dynamic.ts +17 -0
- package/blockly-rc/generators/python.ts +51 -0
- package/blockly-rc/gulpfile.js +54 -0
- package/blockly-rc/jsconfig.json +7 -0
- package/blockly-rc/media/1x1.gif +0 -0
- package/blockly-rc/media/click.mp3 +0 -0
- package/blockly-rc/media/click.ogg +0 -0
- package/blockly-rc/media/click.wav +0 -0
- package/blockly-rc/media/delete-icon.svg +1 -0
- package/blockly-rc/media/delete.mp3 +0 -0
- package/blockly-rc/media/delete.ogg +0 -0
- package/blockly-rc/media/delete.wav +0 -0
- package/blockly-rc/media/disconnect.mp3 +0 -0
- package/blockly-rc/media/disconnect.ogg +0 -0
- package/blockly-rc/media/disconnect.wav +0 -0
- package/blockly-rc/media/dropdown-arrow.svg +1 -0
- package/blockly-rc/media/foldout-icon.svg +1 -0
- package/blockly-rc/media/handclosed.cur +0 -0
- package/blockly-rc/media/handdelete.cur +0 -0
- package/blockly-rc/media/handopen.cur +0 -0
- package/blockly-rc/media/pilcrow.png +0 -0
- package/blockly-rc/media/quote0.png +0 -0
- package/blockly-rc/media/quote1.png +0 -0
- package/blockly-rc/media/resize-handle.svg +3 -0
- package/blockly-rc/media/sprites.png +0 -0
- package/blockly-rc/media/sprites.svg +74 -0
- package/blockly-rc/msg/json/README.md +33 -0
- package/blockly-rc/msg/json/ab.json +222 -0
- package/blockly-rc/msg/json/ace.json +7 -0
- package/blockly-rc/msg/json/af.json +34 -0
- package/blockly-rc/msg/json/am.json +30 -0
- package/blockly-rc/msg/json/ar.json +355 -0
- package/blockly-rc/msg/json/ast.json +10 -0
- package/blockly-rc/msg/json/az.json +332 -0
- package/blockly-rc/msg/json/ba.json +211 -0
- package/blockly-rc/msg/json/bcc.json +290 -0
- package/blockly-rc/msg/json/be-tarask.json +334 -0
- package/blockly-rc/msg/json/be.json +324 -0
- package/blockly-rc/msg/json/bg.json +345 -0
- package/blockly-rc/msg/json/bn.json +189 -0
- package/blockly-rc/msg/json/br.json +334 -0
- package/blockly-rc/msg/json/bs.json +166 -0
- package/blockly-rc/msg/json/ca.json +341 -0
- package/blockly-rc/msg/json/cdo.json +6 -0
- package/blockly-rc/msg/json/ce.json +326 -0
- package/blockly-rc/msg/json/constants.json +12 -0
- package/blockly-rc/msg/json/cs.json +343 -0
- package/blockly-rc/msg/json/da.json +346 -0
- package/blockly-rc/msg/json/de.json +369 -0
- package/blockly-rc/msg/json/diq.json +258 -0
- package/blockly-rc/msg/json/dtp.json +198 -0
- package/blockly-rc/msg/json/dty.json +97 -0
- package/blockly-rc/msg/json/ee.json +160 -0
- package/blockly-rc/msg/json/el.json +356 -0
- package/blockly-rc/msg/json/en-gb.json +199 -0
- package/blockly-rc/msg/json/en.json +400 -0
- package/blockly-rc/msg/json/eo.json +337 -0
- package/blockly-rc/msg/json/es.json +358 -0
- package/blockly-rc/msg/json/et.json +326 -0
- package/blockly-rc/msg/json/eu.json +219 -0
- package/blockly-rc/msg/json/fa.json +341 -0
- package/blockly-rc/msg/json/fi.json +350 -0
- package/blockly-rc/msg/json/fo.json +46 -0
- package/blockly-rc/msg/json/fr.json +373 -0
- package/blockly-rc/msg/json/frr.json +6 -0
- package/blockly-rc/msg/json/gl.json +338 -0
- package/blockly-rc/msg/json/gn.json +54 -0
- package/blockly-rc/msg/json/gor.json +87 -0
- package/blockly-rc/msg/json/ha.json +313 -0
- package/blockly-rc/msg/json/hak.json +17 -0
- package/blockly-rc/msg/json/he.json +354 -0
- package/blockly-rc/msg/json/hi.json +318 -0
- package/blockly-rc/msg/json/hr.json +327 -0
- package/blockly-rc/msg/json/hrx.json +287 -0
- package/blockly-rc/msg/json/hsb.json +128 -0
- package/blockly-rc/msg/json/hu.json +349 -0
- package/blockly-rc/msg/json/hy.json +337 -0
- package/blockly-rc/msg/json/ia.json +337 -0
- package/blockly-rc/msg/json/id.json +335 -0
- package/blockly-rc/msg/json/ig.json +323 -0
- package/blockly-rc/msg/json/inh.json +80 -0
- package/blockly-rc/msg/json/is.json +331 -0
- package/blockly-rc/msg/json/it.json +346 -0
- package/blockly-rc/msg/json/ja.json +361 -0
- package/blockly-rc/msg/json/ka.json +14 -0
- package/blockly-rc/msg/json/kab.json +323 -0
- package/blockly-rc/msg/json/kbd-cyrl.json +84 -0
- package/blockly-rc/msg/json/km.json +29 -0
- package/blockly-rc/msg/json/kn.json +332 -0
- package/blockly-rc/msg/json/ko.json +372 -0
- package/blockly-rc/msg/json/ksh.json +43 -0
- package/blockly-rc/msg/json/ku-latn.json +41 -0
- package/blockly-rc/msg/json/ky.json +71 -0
- package/blockly-rc/msg/json/la.json +6 -0
- package/blockly-rc/msg/json/lb.json +156 -0
- package/blockly-rc/msg/json/lki.json +282 -0
- package/blockly-rc/msg/json/lo.json +92 -0
- package/blockly-rc/msg/json/lrc.json +123 -0
- package/blockly-rc/msg/json/lt.json +321 -0
- package/blockly-rc/msg/json/lv.json +324 -0
- package/blockly-rc/msg/json/mg.json +58 -0
- package/blockly-rc/msg/json/mk.json +178 -0
- package/blockly-rc/msg/json/ml.json +35 -0
- package/blockly-rc/msg/json/mnw.json +90 -0
- package/blockly-rc/msg/json/ms.json +300 -0
- package/blockly-rc/msg/json/my.json +57 -0
- package/blockly-rc/msg/json/mzn.json +6 -0
- package/blockly-rc/msg/json/nb.json +330 -0
- package/blockly-rc/msg/json/ne.json +247 -0
- package/blockly-rc/msg/json/nl.json +357 -0
- package/blockly-rc/msg/json/oc.json +194 -0
- package/blockly-rc/msg/json/olo.json +37 -0
- package/blockly-rc/msg/json/pa.json +69 -0
- package/blockly-rc/msg/json/pl.json +357 -0
- package/blockly-rc/msg/json/pms.json +324 -0
- package/blockly-rc/msg/json/ps.json +50 -0
- package/blockly-rc/msg/json/pt-br.json +369 -0
- package/blockly-rc/msg/json/pt.json +358 -0
- package/blockly-rc/msg/json/qqq.json +406 -0
- package/blockly-rc/msg/json/ro.json +333 -0
- package/blockly-rc/msg/json/ru.json +363 -0
- package/blockly-rc/msg/json/sc.json +283 -0
- package/blockly-rc/msg/json/sco.json +11 -0
- package/blockly-rc/msg/json/sd.json +158 -0
- package/blockly-rc/msg/json/shn.json +109 -0
- package/blockly-rc/msg/json/si.json +16 -0
- package/blockly-rc/msg/json/sk.json +332 -0
- package/blockly-rc/msg/json/skr-arab.json +117 -0
- package/blockly-rc/msg/json/sl.json +355 -0
- package/blockly-rc/msg/json/smn.json +133 -0
- package/blockly-rc/msg/json/sq.json +343 -0
- package/blockly-rc/msg/json/sr-latn.json +324 -0
- package/blockly-rc/msg/json/sr.json +348 -0
- package/blockly-rc/msg/json/sv.json +347 -0
- package/blockly-rc/msg/json/sw.json +12 -0
- package/blockly-rc/msg/json/synonyms.json +22 -0
- package/blockly-rc/msg/json/ta.json +306 -0
- package/blockly-rc/msg/json/tcy.json +316 -0
- package/blockly-rc/msg/json/tdd.json +109 -0
- package/blockly-rc/msg/json/te.json +101 -0
- package/blockly-rc/msg/json/th.json +333 -0
- package/blockly-rc/msg/json/ti.json +50 -0
- package/blockly-rc/msg/json/tl.json +129 -0
- package/blockly-rc/msg/json/tlh.json +179 -0
- package/blockly-rc/msg/json/tr.json +369 -0
- package/blockly-rc/msg/json/ug-arab.json +132 -0
- package/blockly-rc/msg/json/uk.json +345 -0
- package/blockly-rc/msg/json/ur.json +117 -0
- package/blockly-rc/msg/json/uz.json +36 -0
- package/blockly-rc/msg/json/vi.json +345 -0
- package/blockly-rc/msg/json/xmf.json +96 -0
- package/blockly-rc/msg/json/yo.json +316 -0
- package/blockly-rc/msg/json/zgh.json +83 -0
- package/blockly-rc/msg/json/zh-hans.json +372 -0
- package/blockly-rc/msg/json/zh-hant.json +362 -0
- package/blockly-rc/msg/messages.js +1616 -0
- package/blockly-rc/package-lock.json +12324 -0
- package/blockly-rc/package.json +149 -0
- package/blockly-rc/patches/@microsoft+api-documenter+7.22.4.patch +81 -0
- package/blockly-rc/scripts/goog_module/convert-file.sh +406 -0
- package/blockly-rc/scripts/gulpfiles/appengine_tasks.js +195 -0
- package/blockly-rc/scripts/gulpfiles/build_tasks.js +752 -0
- package/blockly-rc/scripts/gulpfiles/config.js +41 -0
- package/blockly-rc/scripts/gulpfiles/docs_tasks.js +147 -0
- package/blockly-rc/scripts/gulpfiles/git_tasks.js +181 -0
- package/blockly-rc/scripts/gulpfiles/helper_tasks.js +19 -0
- package/blockly-rc/scripts/gulpfiles/package_tasks.js +262 -0
- package/blockly-rc/scripts/gulpfiles/release_tasks.js +183 -0
- package/blockly-rc/scripts/gulpfiles/test_tasks.js +405 -0
- package/blockly-rc/scripts/helpers.js +74 -0
- package/blockly-rc/scripts/i18n/common.py +233 -0
- package/blockly-rc/scripts/i18n/create_messages.py +167 -0
- package/blockly-rc/scripts/i18n/dedup_json.py +72 -0
- package/blockly-rc/scripts/i18n/js_to_json.py +135 -0
- package/blockly-rc/scripts/i18n/tests.py +46 -0
- package/blockly-rc/scripts/migration/cjs2esm +162 -0
- package/blockly-rc/scripts/migration/js2ts +168 -0
- package/blockly-rc/scripts/migration/renamings.json5 +1599 -0
- package/blockly-rc/scripts/package/README.md +93 -0
- package/blockly-rc/scripts/package/core-node.js +31 -0
- package/blockly-rc/scripts/package/index.js +23 -0
- package/blockly-rc/scripts/package/templates/umd-msg.template +16 -0
- package/blockly-rc/scripts/package/templates/umd.template +13 -0
- package/blockly-rc/scripts/themes/blockStyles_example.json +11 -0
- package/blockly-rc/scripts/themes/create_blockStyles.py +181 -0
- package/blockly-rc/scripts/tsick.js +86 -0
- package/blockly-rc/tests/.eslintrc.json +10 -0
- package/blockly-rc/tests/browser/.eslintrc.json +29 -0
- package/blockly-rc/tests/browser/.mocharc.js +6 -0
- package/blockly-rc/tests/browser/test/basic_block_factory_test.mjs +44 -0
- package/blockly-rc/tests/browser/test/basic_block_test.mjs +39 -0
- package/blockly-rc/tests/browser/test/basic_playground_test.mjs +198 -0
- package/blockly-rc/tests/browser/test/block_undo_test.mjs +50 -0
- package/blockly-rc/tests/browser/test/delete_blocks_test.mjs +211 -0
- package/blockly-rc/tests/browser/test/extensive_test.mjs +195 -0
- package/blockly-rc/tests/browser/test/field_edits_test.mjs +61 -0
- package/blockly-rc/tests/browser/test/hooks.mjs +23 -0
- package/blockly-rc/tests/browser/test/mutator_test.mjs +88 -0
- package/blockly-rc/tests/browser/test/procedure_test.mjs +109 -0
- package/blockly-rc/tests/browser/test/test_setup.mjs +589 -0
- package/blockly-rc/tests/browser/test/toolbox_drag_test.mjs +207 -0
- package/blockly-rc/tests/browser/test/workspace_comment_test.mjs +224 -0
- package/blockly-rc/tests/compile/index.html +43 -0
- package/blockly-rc/tests/compile/main.js +53 -0
- package/blockly-rc/tests/compile/test_blocks.js +47 -0
- package/blockly-rc/tests/compile/webdriver.js +81 -0
- package/blockly-rc/tests/generators/functions.xml +561 -0
- package/blockly-rc/tests/generators/golden/generated.dart +1604 -0
- package/blockly-rc/tests/generators/golden/generated.js +1552 -0
- package/blockly-rc/tests/generators/golden/generated.lua +1828 -0
- package/blockly-rc/tests/generators/golden/generated.php +1611 -0
- package/blockly-rc/tests/generators/golden/generated.py +1407 -0
- package/blockly-rc/tests/generators/index.html +405 -0
- package/blockly-rc/tests/generators/lists.xml +8675 -0
- package/blockly-rc/tests/generators/logic.xml +1019 -0
- package/blockly-rc/tests/generators/loops1.xml +345 -0
- package/blockly-rc/tests/generators/loops2.xml +891 -0
- package/blockly-rc/tests/generators/loops3.xml +735 -0
- package/blockly-rc/tests/generators/math.xml +2077 -0
- package/blockly-rc/tests/generators/text.xml +4651 -0
- package/blockly-rc/tests/generators/unittest.js +103 -0
- package/blockly-rc/tests/generators/unittest_dart.js +163 -0
- package/blockly-rc/tests/generators/unittest_javascript.js +167 -0
- package/blockly-rc/tests/generators/unittest_lua.js +165 -0
- package/blockly-rc/tests/generators/unittest_php.js +154 -0
- package/blockly-rc/tests/generators/unittest_python.js +138 -0
- package/blockly-rc/tests/generators/variables.xml +68 -0
- package/blockly-rc/tests/generators/webdriver.js +123 -0
- package/blockly-rc/tests/media/200px.png +0 -0
- package/blockly-rc/tests/media/30px.png +0 -0
- package/blockly-rc/tests/media/50px.png +0 -0
- package/blockly-rc/tests/media/a.png +0 -0
- package/blockly-rc/tests/media/arrow.png +0 -0
- package/blockly-rc/tests/media/b.png +0 -0
- package/blockly-rc/tests/media/c.png +0 -0
- package/blockly-rc/tests/media/d.png +0 -0
- package/blockly-rc/tests/media/e.png +0 -0
- package/blockly-rc/tests/media/f.png +0 -0
- package/blockly-rc/tests/media/g.png +0 -0
- package/blockly-rc/tests/media/h.png +0 -0
- package/blockly-rc/tests/media/i.png +0 -0
- package/blockly-rc/tests/media/j.png +0 -0
- package/blockly-rc/tests/media/k.png +0 -0
- package/blockly-rc/tests/media/l.png +0 -0
- package/blockly-rc/tests/media/m.png +0 -0
- package/blockly-rc/tests/migration/renamings.schema.json +59 -0
- package/blockly-rc/tests/migration/validate-renamings.mjs +60 -0
- package/blockly-rc/tests/mocha/.eslintrc.json +21 -0
- package/blockly-rc/tests/mocha/.mocharc.js +6 -0
- package/blockly-rc/tests/mocha/astnode_test.js +850 -0
- package/blockly-rc/tests/mocha/block_json_test.js +777 -0
- package/blockly-rc/tests/mocha/block_test.js +2743 -0
- package/blockly-rc/tests/mocha/blocks/lists_test.js +196 -0
- package/blockly-rc/tests/mocha/blocks/logic_ternary_test.js +320 -0
- package/blockly-rc/tests/mocha/blocks/loops_test.js +56 -0
- package/blockly-rc/tests/mocha/blocks/procedures_test.js +2495 -0
- package/blockly-rc/tests/mocha/blocks/variables_test.js +311 -0
- package/blockly-rc/tests/mocha/clipboard_test.js +136 -0
- package/blockly-rc/tests/mocha/comment_deserialization_test.js +122 -0
- package/blockly-rc/tests/mocha/comment_test.js +170 -0
- package/blockly-rc/tests/mocha/comment_view_test.js +188 -0
- package/blockly-rc/tests/mocha/connection_checker_test.js +666 -0
- package/blockly-rc/tests/mocha/connection_db_test.js +362 -0
- package/blockly-rc/tests/mocha/connection_test.js +3738 -0
- package/blockly-rc/tests/mocha/contextmenu_items_test.js +488 -0
- package/blockly-rc/tests/mocha/contextmenu_test.js +71 -0
- package/blockly-rc/tests/mocha/cursor_test.js +134 -0
- package/blockly-rc/tests/mocha/dropdowndiv_test.js +116 -0
- package/blockly-rc/tests/mocha/event_block_change_test.js +126 -0
- package/blockly-rc/tests/mocha/event_block_create_test.js +109 -0
- package/blockly-rc/tests/mocha/event_block_delete_test.js +55 -0
- package/blockly-rc/tests/mocha/event_block_drag_test.js +36 -0
- package/blockly-rc/tests/mocha/event_block_field_intermediate_change_test.js +67 -0
- package/blockly-rc/tests/mocha/event_block_move_test.js +39 -0
- package/blockly-rc/tests/mocha/event_bubble_open_test.js +42 -0
- package/blockly-rc/tests/mocha/event_click_test.js +40 -0
- package/blockly-rc/tests/mocha/event_comment_change_test.js +39 -0
- package/blockly-rc/tests/mocha/event_comment_collapse_test.js +34 -0
- package/blockly-rc/tests/mocha/event_comment_create_test.js +38 -0
- package/blockly-rc/tests/mocha/event_comment_delete_test.js +38 -0
- package/blockly-rc/tests/mocha/event_comment_drag_test.js +35 -0
- package/blockly-rc/tests/mocha/event_comment_move_test.js +40 -0
- package/blockly-rc/tests/mocha/event_comment_resize_test.js +38 -0
- package/blockly-rc/tests/mocha/event_marker_move_test.js +44 -0
- package/blockly-rc/tests/mocha/event_selected_test.js +41 -0
- package/blockly-rc/tests/mocha/event_test.js +1578 -0
- package/blockly-rc/tests/mocha/event_theme_change_test.js +36 -0
- package/blockly-rc/tests/mocha/event_toolbox_item_select_test.js +64 -0
- package/blockly-rc/tests/mocha/event_trashcan_open_test.js +36 -0
- package/blockly-rc/tests/mocha/event_var_create_test.js +54 -0
- package/blockly-rc/tests/mocha/event_var_delete_test.js +54 -0
- package/blockly-rc/tests/mocha/event_var_rename_test.js +39 -0
- package/blockly-rc/tests/mocha/event_var_type_change_test.js +43 -0
- package/blockly-rc/tests/mocha/event_viewport_test.js +39 -0
- package/blockly-rc/tests/mocha/extensions_test.js +613 -0
- package/blockly-rc/tests/mocha/field_checkbox_test.js +299 -0
- package/blockly-rc/tests/mocha/field_colour_test.js +395 -0
- package/blockly-rc/tests/mocha/field_dropdown_test.js +282 -0
- package/blockly-rc/tests/mocha/field_image_test.js +241 -0
- package/blockly-rc/tests/mocha/field_label_serializable_test.js +252 -0
- package/blockly-rc/tests/mocha/field_label_test.js +226 -0
- package/blockly-rc/tests/mocha/field_number_test.js +505 -0
- package/blockly-rc/tests/mocha/field_registry_test.js +116 -0
- package/blockly-rc/tests/mocha/field_test.js +822 -0
- package/blockly-rc/tests/mocha/field_textinput_test.js +297 -0
- package/blockly-rc/tests/mocha/field_variable_test.js +611 -0
- package/blockly-rc/tests/mocha/flyout_test.js +638 -0
- package/blockly-rc/tests/mocha/generator_test.js +233 -0
- package/blockly-rc/tests/mocha/gesture_test.js +97 -0
- package/blockly-rc/tests/mocha/icon_test.js +369 -0
- package/blockly-rc/tests/mocha/index.html +229 -0
- package/blockly-rc/tests/mocha/input_test.js +296 -0
- package/blockly-rc/tests/mocha/insertion_marker_manager_test.js +443 -0
- package/blockly-rc/tests/mocha/insertion_marker_test.js +432 -0
- package/blockly-rc/tests/mocha/jso_deserialization_test.js +849 -0
- package/blockly-rc/tests/mocha/jso_serialization_test.js +1067 -0
- package/blockly-rc/tests/mocha/json_test.js +315 -0
- package/blockly-rc/tests/mocha/keydown_test.js +364 -0
- package/blockly-rc/tests/mocha/layering_test.js +95 -0
- package/blockly-rc/tests/mocha/metrics_test.js +671 -0
- package/blockly-rc/tests/mocha/mutator_test.js +87 -0
- package/blockly-rc/tests/mocha/names_test.js +97 -0
- package/blockly-rc/tests/mocha/old_workspace_comment_test.js +256 -0
- package/blockly-rc/tests/mocha/procedure_map_test.js +57 -0
- package/blockly-rc/tests/mocha/registry_test.js +281 -0
- package/blockly-rc/tests/mocha/render_management_test.js +127 -0
- package/blockly-rc/tests/mocha/serializer_test.js +2104 -0
- package/blockly-rc/tests/mocha/shortcut_registry_test.js +450 -0
- package/blockly-rc/tests/mocha/test_helpers/block_definitions.js +204 -0
- package/blockly-rc/tests/mocha/test_helpers/code_generation.js +115 -0
- package/blockly-rc/tests/mocha/test_helpers/common.js +106 -0
- package/blockly-rc/tests/mocha/test_helpers/events.js +290 -0
- package/blockly-rc/tests/mocha/test_helpers/fields.js +310 -0
- package/blockly-rc/tests/mocha/test_helpers/icon_mocks.js +81 -0
- package/blockly-rc/tests/mocha/test_helpers/procedures.js +302 -0
- package/blockly-rc/tests/mocha/test_helpers/serialization.js +124 -0
- package/blockly-rc/tests/mocha/test_helpers/setup_teardown.js +209 -0
- package/blockly-rc/tests/mocha/test_helpers/toolbox_definitions.js +271 -0
- package/blockly-rc/tests/mocha/test_helpers/user_input.js +62 -0
- package/blockly-rc/tests/mocha/test_helpers/variables.js +23 -0
- package/blockly-rc/tests/mocha/test_helpers/warnings.js +83 -0
- package/blockly-rc/tests/mocha/test_helpers/workspace.js +1691 -0
- package/blockly-rc/tests/mocha/theme_test.js +307 -0
- package/blockly-rc/tests/mocha/toolbox_test.js +761 -0
- package/blockly-rc/tests/mocha/tooltip_test.js +276 -0
- package/blockly-rc/tests/mocha/touch_test.js +109 -0
- package/blockly-rc/tests/mocha/trashcan_test.js +375 -0
- package/blockly-rc/tests/mocha/utils_test.js +536 -0
- package/blockly-rc/tests/mocha/variable_map_test.js +509 -0
- package/blockly-rc/tests/mocha/variable_model_test.js +85 -0
- package/blockly-rc/tests/mocha/webdriver.js +96 -0
- package/blockly-rc/tests/mocha/widget_div_test.js +272 -0
- package/blockly-rc/tests/mocha/workspace_comment_test.js +171 -0
- package/blockly-rc/tests/mocha/workspace_svg_test.js +414 -0
- package/blockly-rc/tests/mocha/workspace_test.js +27 -0
- package/blockly-rc/tests/mocha/xml_test.js +951 -0
- package/blockly-rc/tests/mocha/zoom_controls_test.js +81 -0
- package/blockly-rc/tests/multi_playground.html +482 -0
- package/blockly-rc/tests/node/.eslintrc.json +12 -0
- package/blockly-rc/tests/node/.mocharc.js +6 -0
- package/blockly-rc/tests/node/run_node_test.mjs +72 -0
- package/blockly-rc/tests/playground.html +1280 -0
- package/blockly-rc/tests/playgrounds/advanced_playground.html +158 -0
- package/blockly-rc/tests/playgrounds/iframe.html +40 -0
- package/blockly-rc/tests/playgrounds/screenshot.js +123 -0
- package/blockly-rc/tests/scripts/check_metadata.sh +166 -0
- package/blockly-rc/tests/scripts/compile_typings.sh +32 -0
- package/blockly-rc/tests/scripts/load.mjs +140 -0
- package/blockly-rc/tests/scripts/setup_linux_env.sh +7 -0
- package/blockly-rc/tests/scripts/update_metadata.sh +46 -0
- package/blockly-rc/tests/themes/test_themes.js +62 -0
- package/blockly-rc/tests/typescript/README.md +4 -0
- package/blockly-rc/tests/typescript/src/field/different_user_input.ts +81 -0
- package/blockly-rc/tests/typescript/src/generators/dart.ts +24 -0
- package/blockly-rc/tests/typescript/src/generators/javascript.ts +28 -0
- package/blockly-rc/tests/typescript/src/generators/lua.ts +24 -0
- package/blockly-rc/tests/typescript/src/generators/php.ts +24 -0
- package/blockly-rc/tests/typescript/src/generators/python.ts +24 -0
- package/blockly-rc/tests/typescript/src/generators.ts +31 -0
- package/blockly-rc/tests/typescript/src/msg.ts +20 -0
- package/blockly-rc/tests/typescript/tsconfig.json +20 -0
- package/blockly-rc/tests/xml/README.txt +11 -0
- package/blockly-rc/tests/xml/blockly.xsd +178 -0
- package/blockly-rc/tests/xml/invalid.xml +6 -0
- package/blockly-rc/tests/xml/toolbox.xml +311 -0
- package/blockly-rc/tests/xml/workspace.xml +114 -0
- package/blockly-rc/tsconfig.json +37 -0
- package/blockly-rc/tsdoc.json +35 -0
- package/blockly-rc/typings/README.md +5 -0
- package/blockly-rc/typings/blocks.d.ts +17 -0
- package/blockly-rc/typings/core.d.ts +7 -0
- package/blockly-rc/typings/dart.d.ts +7 -0
- package/blockly-rc/typings/index.d.ts +10 -0
- package/blockly-rc/typings/javascript.d.ts +7 -0
- package/blockly-rc/typings/lua.d.ts +7 -0
- package/blockly-rc/typings/msg/ab.d.ts +8 -0
- package/blockly-rc/typings/msg/ace.d.ts +8 -0
- package/blockly-rc/typings/msg/af.d.ts +8 -0
- package/blockly-rc/typings/msg/am.d.ts +8 -0
- package/blockly-rc/typings/msg/ar.d.ts +8 -0
- package/blockly-rc/typings/msg/ast.d.ts +8 -0
- package/blockly-rc/typings/msg/az.d.ts +8 -0
- package/blockly-rc/typings/msg/ba.d.ts +8 -0
- package/blockly-rc/typings/msg/bcc.d.ts +8 -0
- package/blockly-rc/typings/msg/be-tarask.d.ts +8 -0
- package/blockly-rc/typings/msg/be.d.ts +8 -0
- package/blockly-rc/typings/msg/bg.d.ts +8 -0
- package/blockly-rc/typings/msg/bn.d.ts +8 -0
- package/blockly-rc/typings/msg/br.d.ts +8 -0
- package/blockly-rc/typings/msg/bs.d.ts +8 -0
- package/blockly-rc/typings/msg/ca.d.ts +8 -0
- package/blockly-rc/typings/msg/cdo.d.ts +8 -0
- package/blockly-rc/typings/msg/ce.d.ts +8 -0
- package/blockly-rc/typings/msg/cs.d.ts +8 -0
- package/blockly-rc/typings/msg/da.d.ts +8 -0
- package/blockly-rc/typings/msg/de.d.ts +8 -0
- package/blockly-rc/typings/msg/diq.d.ts +8 -0
- package/blockly-rc/typings/msg/dtp.d.ts +8 -0
- package/blockly-rc/typings/msg/dty.d.ts +8 -0
- package/blockly-rc/typings/msg/ee.d.ts +8 -0
- package/blockly-rc/typings/msg/el.d.ts +8 -0
- package/blockly-rc/typings/msg/en-gb.d.ts +8 -0
- package/blockly-rc/typings/msg/en.d.ts +8 -0
- package/blockly-rc/typings/msg/eo.d.ts +8 -0
- package/blockly-rc/typings/msg/es.d.ts +8 -0
- package/blockly-rc/typings/msg/et.d.ts +8 -0
- package/blockly-rc/typings/msg/eu.d.ts +8 -0
- package/blockly-rc/typings/msg/fa.d.ts +8 -0
- package/blockly-rc/typings/msg/fi.d.ts +8 -0
- package/blockly-rc/typings/msg/fo.d.ts +8 -0
- package/blockly-rc/typings/msg/fr.d.ts +8 -0
- package/blockly-rc/typings/msg/frr.d.ts +8 -0
- package/blockly-rc/typings/msg/gl.d.ts +8 -0
- package/blockly-rc/typings/msg/gn.d.ts +8 -0
- package/blockly-rc/typings/msg/gor.d.ts +8 -0
- package/blockly-rc/typings/msg/ha.d.ts +8 -0
- package/blockly-rc/typings/msg/hak.d.ts +8 -0
- package/blockly-rc/typings/msg/he.d.ts +8 -0
- package/blockly-rc/typings/msg/hi.d.ts +8 -0
- package/blockly-rc/typings/msg/hr.d.ts +8 -0
- package/blockly-rc/typings/msg/hrx.d.ts +8 -0
- package/blockly-rc/typings/msg/hsb.d.ts +8 -0
- package/blockly-rc/typings/msg/hu.d.ts +8 -0
- package/blockly-rc/typings/msg/hy.d.ts +8 -0
- package/blockly-rc/typings/msg/ia.d.ts +8 -0
- package/blockly-rc/typings/msg/id.d.ts +8 -0
- package/blockly-rc/typings/msg/ig.d.ts +8 -0
- package/blockly-rc/typings/msg/inh.d.ts +8 -0
- package/blockly-rc/typings/msg/is.d.ts +8 -0
- package/blockly-rc/typings/msg/it.d.ts +8 -0
- package/blockly-rc/typings/msg/ja.d.ts +8 -0
- package/blockly-rc/typings/msg/ka.d.ts +8 -0
- package/blockly-rc/typings/msg/kab.d.ts +8 -0
- package/blockly-rc/typings/msg/kbd-cyrl.d.ts +8 -0
- package/blockly-rc/typings/msg/km.d.ts +8 -0
- package/blockly-rc/typings/msg/kn.d.ts +8 -0
- package/blockly-rc/typings/msg/ko.d.ts +8 -0
- package/blockly-rc/typings/msg/ksh.d.ts +8 -0
- package/blockly-rc/typings/msg/ku-latn.d.ts +8 -0
- package/blockly-rc/typings/msg/ky.d.ts +8 -0
- package/blockly-rc/typings/msg/la.d.ts +8 -0
- package/blockly-rc/typings/msg/lb.d.ts +8 -0
- package/blockly-rc/typings/msg/lki.d.ts +8 -0
- package/blockly-rc/typings/msg/lo.d.ts +8 -0
- package/blockly-rc/typings/msg/lrc.d.ts +8 -0
- package/blockly-rc/typings/msg/lt.d.ts +8 -0
- package/blockly-rc/typings/msg/lv.d.ts +8 -0
- package/blockly-rc/typings/msg/mg.d.ts +8 -0
- package/blockly-rc/typings/msg/mk.d.ts +8 -0
- package/blockly-rc/typings/msg/ml.d.ts +8 -0
- package/blockly-rc/typings/msg/mnw.d.ts +8 -0
- package/blockly-rc/typings/msg/ms.d.ts +8 -0
- package/blockly-rc/typings/msg/msg.d.ts +440 -0
- package/blockly-rc/typings/msg/my.d.ts +8 -0
- package/blockly-rc/typings/msg/mzn.d.ts +8 -0
- package/blockly-rc/typings/msg/nb.d.ts +8 -0
- package/blockly-rc/typings/msg/ne.d.ts +8 -0
- package/blockly-rc/typings/msg/nl.d.ts +8 -0
- package/blockly-rc/typings/msg/oc.d.ts +8 -0
- package/blockly-rc/typings/msg/olo.d.ts +8 -0
- package/blockly-rc/typings/msg/pa.d.ts +8 -0
- package/blockly-rc/typings/msg/pl.d.ts +8 -0
- package/blockly-rc/typings/msg/pms.d.ts +8 -0
- package/blockly-rc/typings/msg/ps.d.ts +8 -0
- package/blockly-rc/typings/msg/pt-br.d.ts +8 -0
- package/blockly-rc/typings/msg/pt.d.ts +8 -0
- package/blockly-rc/typings/msg/ro.d.ts +8 -0
- package/blockly-rc/typings/msg/ru.d.ts +8 -0
- package/blockly-rc/typings/msg/sc.d.ts +8 -0
- package/blockly-rc/typings/msg/sco.d.ts +8 -0
- package/blockly-rc/typings/msg/sd.d.ts +8 -0
- package/blockly-rc/typings/msg/shn.d.ts +8 -0
- package/blockly-rc/typings/msg/si.d.ts +8 -0
- package/blockly-rc/typings/msg/sk.d.ts +8 -0
- package/blockly-rc/typings/msg/skr-arab.d.ts +8 -0
- package/blockly-rc/typings/msg/sl.d.ts +8 -0
- package/blockly-rc/typings/msg/smn.d.ts +8 -0
- package/blockly-rc/typings/msg/sq.d.ts +8 -0
- package/blockly-rc/typings/msg/sr-latn.d.ts +8 -0
- package/blockly-rc/typings/msg/sr.d.ts +8 -0
- package/blockly-rc/typings/msg/sv.d.ts +8 -0
- package/blockly-rc/typings/msg/sw.d.ts +8 -0
- package/blockly-rc/typings/msg/ta.d.ts +8 -0
- package/blockly-rc/typings/msg/tcy.d.ts +8 -0
- package/blockly-rc/typings/msg/tdd.d.ts +8 -0
- package/blockly-rc/typings/msg/te.d.ts +8 -0
- package/blockly-rc/typings/msg/th.d.ts +8 -0
- package/blockly-rc/typings/msg/ti.d.ts +8 -0
- package/blockly-rc/typings/msg/tl.d.ts +8 -0
- package/blockly-rc/typings/msg/tlh.d.ts +8 -0
- package/blockly-rc/typings/msg/tr.d.ts +8 -0
- package/blockly-rc/typings/msg/ug-arab.d.ts +8 -0
- package/blockly-rc/typings/msg/uk.d.ts +8 -0
- package/blockly-rc/typings/msg/ur.d.ts +8 -0
- package/blockly-rc/typings/msg/uz.d.ts +8 -0
- package/blockly-rc/typings/msg/vi.d.ts +8 -0
- package/blockly-rc/typings/msg/xmf.d.ts +8 -0
- package/blockly-rc/typings/msg/yo.d.ts +8 -0
- package/blockly-rc/typings/msg/zgh.d.ts +8 -0
- package/blockly-rc/typings/msg/zh-hans.d.ts +8 -0
- package/blockly-rc/typings/msg/zh-hant.d.ts +8 -0
- package/blockly-rc/typings/php.d.ts +7 -0
- package/blockly-rc/typings/python.d.ts +7 -0
- package/blockly-rc/typings/templates/blockly-header.template +11 -0
- package/blockly-rc/typings/templates/blockly-interfaces.template +83 -0
- package/blockly-rc/typings/templates/msg.template +15 -0
- package/blockly-rc/typings/tsconfig.json +23 -0
- package/continuous-toolbox.d.ts +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +163 -0
- package/media/delete-icon.svg +10 -0
- package/media/resize-handle.svg +3 -0
- package/msg/scratch_msgs.js +184 -164
- package/package.json +25 -40
- package/release.config.js +8 -0
- package/src/block_reporting.js +31 -0
- package/src/blocks/colour.js +56 -0
- package/src/blocks/control.js +492 -0
- package/src/blocks/data.js +690 -0
- package/src/blocks/event.js +305 -0
- package/src/blocks/looks.js +537 -0
- package/src/blocks/math.js +137 -0
- package/src/blocks/matrix.js +47 -0
- package/src/blocks/motion.js +513 -0
- package/src/blocks/note.js +48 -0
- package/src/blocks/operators.js +463 -0
- package/src/blocks/procedures.js +1009 -0
- package/src/blocks/sensing.js +441 -0
- package/src/blocks/sound.js +205 -0
- package/src/blocks/text.js +45 -0
- package/src/blocks/vertical_extensions.js +309 -0
- package/src/categories.js +15 -0
- package/src/checkable_continuous_flyout.js +138 -0
- package/src/checkbox_bubble.js +282 -0
- package/src/colours.js +77 -0
- package/src/constants.js +63 -0
- package/src/context_menu_items.js +150 -0
- package/src/css.js +1197 -0
- package/src/data_category.js +556 -0
- package/src/events/events_block_comment_base.js +35 -0
- package/src/events/events_block_comment_change.js +43 -0
- package/src/events/events_block_comment_collapse.js +43 -0
- package/src/events/events_block_comment_create.js +52 -0
- package/src/events/events_block_comment_delete.js +27 -0
- package/src/events/events_block_comment_move.js +54 -0
- package/src/events/events_block_comment_resize.js +52 -0
- package/src/events/events_block_drag_end.js +33 -0
- package/src/events/events_block_drag_outside.js +30 -0
- package/src/events/events_scratch_variable_create.js +67 -0
- package/src/fields/field_angle.js +433 -0
- package/src/fields/field_colour_slider.js +388 -0
- package/src/fields/field_dropdown.js +42 -0
- package/src/fields/field_matrix.js +634 -0
- package/src/fields/field_note.js +937 -0
- package/src/fields/field_number.js +380 -0
- package/src/fields/field_textinput_removable.js +107 -0
- package/src/fields/field_variable.js +171 -0
- package/src/fields/field_variable_getter.js +109 -0
- package/src/fields/field_vertical_separator.js +139 -0
- package/src/flyout_checkbox_icon.js +88 -0
- package/src/glows.js +98 -0
- package/src/index.ts +137 -0
- package/src/procedures.js +425 -0
- package/src/recyclable_block_flyout_inflater.js +194 -0
- package/src/renderer/bowler_hat.js +17 -0
- package/src/renderer/constants.js +45 -0
- package/src/renderer/drawer.js +51 -0
- package/src/renderer/path_object.js +35 -0
- package/src/renderer/render_info.js +98 -0
- package/src/renderer/renderer.js +74 -0
- package/src/scratch_block_paster.js +46 -0
- package/src/scratch_blocks_utils.js +148 -0
- package/src/scratch_comment_bubble.js +169 -0
- package/src/scratch_comment_icon.js +195 -0
- package/src/scratch_connection_checker.js +29 -0
- package/src/scratch_continuous_category.js +80 -0
- package/src/scratch_continuous_toolbox.js +78 -0
- package/src/scratch_dragger.js +142 -0
- package/src/scratch_variable_map.js +25 -0
- package/src/scratch_variable_model.js +24 -0
- package/src/shadows.js +61 -0
- package/src/status_indicator_label.js +186 -0
- package/src/status_indicator_label_flyout_inflater.js +42 -0
- package/src/variables.js +355 -0
- package/temp-use-blockly-v12-rc.sh +26 -0
- package/tsconfig.json +13 -0
- package/blockly_compressed_horizontal.js +0 -2255
- package/blockly_compressed_vertical.js +0 -2283
- package/blockly_uncompressed_horizontal.js +0 -1210
- package/blockly_uncompressed_vertical.js +0 -1210
- package/blocks_common/colour.js +0 -61
- package/blocks_common/math.js +0 -159
- package/blocks_common/matrix.js +0 -54
- package/blocks_common/note.js +0 -58
- package/blocks_common/text.js +0 -57
- package/blocks_compressed.js +0 -36
- package/blocks_compressed_horizontal.js +0 -67
- package/blocks_compressed_vertical.js +0 -208
- package/blocks_horizontal/control.js +0 -212
- package/blocks_horizontal/default_toolbox.js +0 -139
- package/blocks_horizontal/event.js +0 -190
- package/blocks_horizontal/wedo.js +0 -325
- package/blocks_vertical/control.js +0 -532
- package/blocks_vertical/data.js +0 -666
- package/blocks_vertical/default_toolbox.js +0 -564
- package/blocks_vertical/event.js +0 -329
- package/blocks_vertical/extensions.js +0 -294
- package/blocks_vertical/looks.js +0 -591
- package/blocks_vertical/motion.js +0 -587
- package/blocks_vertical/operators.js +0 -470
- package/blocks_vertical/procedures.js +0 -973
- package/blocks_vertical/sensing.js +0 -539
- package/blocks_vertical/sound.js +0 -246
- package/blocks_vertical/vertical_extensions.js +0 -266
- package/build/gen_blocks.js +0 -1
- package/build/test_expect.js +0 -1
- package/build/test_input.js +0 -1
- package/build.py +0 -636
- package/cleanup.sh +0 -101
- package/core/block.js +0 -1837
- package/core/block_animations.js +0 -107
- package/core/block_drag_surface.js +0 -299
- package/core/block_dragger.js +0 -421
- package/core/block_events.js +0 -531
- package/core/block_render_svg_horizontal.js +0 -890
- package/core/block_render_svg_vertical.js +0 -1732
- package/core/block_svg.js +0 -1316
- package/core/blockly.js +0 -622
- package/core/blocks.js +0 -37
- package/core/bubble.js +0 -664
- package/core/bubble_dragger.js +0 -285
- package/core/colours.js +0 -160
- package/core/comment.js +0 -293
- package/core/comment_events.js +0 -539
- package/core/connection.js +0 -766
- package/core/connection_db.js +0 -300
- package/core/constants.js +0 -387
- package/core/contextmenu.js +0 -519
- package/core/css.js +0 -1351
- package/core/data_category.js +0 -490
- package/core/dragged_connection_manager.js +0 -260
- package/core/dropdowndiv.js +0 -408
- package/core/events.js +0 -429
- package/core/events_abstract.js +0 -113
- package/core/extensions.js +0 -450
- package/core/field.js +0 -807
- package/core/field_angle.js +0 -398
- package/core/field_checkbox.js +0 -133
- package/core/field_colour.js +0 -253
- package/core/field_colour_slider.js +0 -387
- package/core/field_date.js +0 -353
- package/core/field_dropdown.js +0 -483
- package/core/field_iconmenu.js +0 -309
- package/core/field_image.js +0 -193
- package/core/field_label.js +0 -136
- package/core/field_label_serializable.js +0 -125
- package/core/field_matrix.js +0 -566
- package/core/field_note.js +0 -850
- package/core/field_number.js +0 -366
- package/core/field_numberdropdown.js +0 -77
- package/core/field_textdropdown.js +0 -164
- package/core/field_textinput.js +0 -675
- package/core/field_textinput_removable.js +0 -105
- package/core/field_variable.js +0 -385
- package/core/field_variable_getter.js +0 -185
- package/core/field_vertical_separator.js +0 -161
- package/core/flyout_base.js +0 -923
- package/core/flyout_button.js +0 -322
- package/core/flyout_dragger.js +0 -83
- package/core/flyout_extension_category_header.js +0 -159
- package/core/flyout_horizontal.js +0 -475
- package/core/flyout_vertical.js +0 -770
- package/core/generator.js +0 -426
- package/core/gesture.js +0 -1011
- package/core/grid.js +0 -227
- package/core/icon.js +0 -205
- package/core/inject.js +0 -491
- package/core/input.js +0 -285
- package/core/insertion_marker_manager.js +0 -678
- package/core/msg.js +0 -62
- package/core/mutator.js +0 -426
- package/core/names.js +0 -198
- package/core/options.js +0 -244
- package/core/procedures.js +0 -577
- package/core/rendered_connection.js +0 -417
- package/core/scratch_block_comment.js +0 -653
- package/core/scratch_blocks_utils.js +0 -244
- package/core/scratch_bubble.js +0 -696
- package/core/scratch_events.js +0 -131
- package/core/scratch_msgs.js +0 -85
- package/core/scrollbar.js +0 -875
- package/core/toolbox.js +0 -801
- package/core/tooltip.js +0 -337
- package/core/touch.js +0 -226
- package/core/trashcan.js +0 -343
- package/core/ui_events.js +0 -91
- package/core/ui_menu_utils.js +0 -68
- package/core/utils.js +0 -948
- package/core/variable_events.js +0 -259
- package/core/variable_map.js +0 -415
- package/core/variable_model.js +0 -116
- package/core/variables.js +0 -674
- package/core/warning.js +0 -199
- package/core/widgetdiv.js +0 -344
- package/core/workspace.js +0 -673
- package/core/workspace_audio.js +0 -170
- package/core/workspace_comment.js +0 -432
- package/core/workspace_comment_render_svg.js +0 -723
- package/core/workspace_comment_svg.js +0 -611
- package/core/workspace_drag_surface_svg.js +0 -195
- package/core/workspace_dragger.js +0 -132
- package/core/workspace_svg.js +0 -2267
- package/core/xml.js +0 -919
- package/core/zoom_controls.js +0 -301
- package/dist/horizontal.js +0 -222
- package/dist/vertical.js +0 -222
- package/dist/web/horizontal.js +0 -232
- package/dist/web/vertical.js +0 -232
- package/local_build.sh +0 -70
- package/pack/scratch-blocks-1.1.206.tgz +0 -0
- package/pull_from_blockly.sh +0 -151
- package/shim/blockly_compressed_horizontal-blocks_compressed.js +0 -1
- package/shim/blockly_compressed_horizontal.Blockly.js +0 -1
- package/shim/blockly_compressed_horizontal.goog.js +0 -1
- package/shim/blockly_compressed_horizontal.js +0 -1
- package/shim/blockly_compressed_vertical-blocks_compressed.js +0 -1
- package/shim/blockly_compressed_vertical.Blockly.js +0 -1
- package/shim/blockly_compressed_vertical.goog.js +0 -1
- package/shim/blockly_compressed_vertical.js +0 -1
- package/shim/blocks_compressed_horizontal-blockly_compressed_horizontal-messages.js +0 -1
- package/shim/blocks_compressed_horizontal.js +0 -1
- package/shim/blocks_compressed_vertical-blockly_compressed_vertical-messages.js +0 -1
- package/shim/blocks_compressed_vertical.js +0 -1
- package/shim/gh-pages.js +0 -1
- package/shim/horizontal.js +0 -1
- package/shim/index.js +0 -17
- package/shim/vertical.js +0 -1
- /package/media/{comment-arrow-down.svg → foldout-icon.svg} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Common configuration for Gulp scripts.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const path = require('path');
|
|
12
|
+
|
|
13
|
+
// Paths are all relative to the repository root. Do not include
|
|
14
|
+
// trailing slash.
|
|
15
|
+
//
|
|
16
|
+
// TODO(#5007): If you modify these values, you must also modify the
|
|
17
|
+
// corresponding values in the following files:
|
|
18
|
+
//
|
|
19
|
+
// - tests/scripts/compile_typings.sh
|
|
20
|
+
// - tests/scripts/check_metadata.sh
|
|
21
|
+
// - tests/scripts/update_metadata.sh
|
|
22
|
+
|
|
23
|
+
// Directory to write compiled output to.
|
|
24
|
+
exports.BUILD_DIR = 'build';
|
|
25
|
+
|
|
26
|
+
// Directory to write typings output to.
|
|
27
|
+
exports.TYPINGS_BUILD_DIR = path.join(exports.BUILD_DIR, 'declarations');
|
|
28
|
+
|
|
29
|
+
// Directory to write langfile output to.
|
|
30
|
+
exports.LANG_BUILD_DIR = path.join(exports.BUILD_DIR, 'msg');
|
|
31
|
+
|
|
32
|
+
// Directory where typescript compiler output can be found.
|
|
33
|
+
// Matches the value in tsconfig.json: outDir
|
|
34
|
+
exports.TSC_OUTPUT_DIR = path.join(exports.BUILD_DIR, 'src');
|
|
35
|
+
|
|
36
|
+
// Directory for files generated by compiling test code.
|
|
37
|
+
exports.TEST_TSC_OUTPUT_DIR = path.join(exports.BUILD_DIR, 'tests');
|
|
38
|
+
|
|
39
|
+
// Directory in which to assemble (and from which to publish) the
|
|
40
|
+
// blockly npm package.
|
|
41
|
+
exports.RELEASE_DIR = 'dist';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
const {execSync} = require('child_process');
|
|
2
|
+
const {Extractor} = require('markdown-tables-to-json');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const gulp = require('gulp');
|
|
5
|
+
const header = require('gulp-header');
|
|
6
|
+
const replace = require('gulp-replace');
|
|
7
|
+
|
|
8
|
+
const DOCS_DIR = 'docs';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Run API Extractor to generate the intermediate json file.
|
|
12
|
+
*/
|
|
13
|
+
const generateApiJson = function(done) {
|
|
14
|
+
execSync('api-extractor run --local', {stdio: 'inherit'});
|
|
15
|
+
done();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* API Extractor output spuriously renames some functions. Undo that.
|
|
20
|
+
* See https://github.com/microsoft/rushstack/issues/2534
|
|
21
|
+
*/
|
|
22
|
+
const removeRenames = function() {
|
|
23
|
+
return gulp.src('temp/blockly.api.json')
|
|
24
|
+
.pipe(replace('_2', ''))
|
|
25
|
+
.pipe(gulp.dest('temp/'));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Run API Documenter to generate the raw docs files.
|
|
30
|
+
*/
|
|
31
|
+
const generateDocs = function(done) {
|
|
32
|
+
if (!fs.existsSync(DOCS_DIR)) {
|
|
33
|
+
// Create the directory if it doesn't exist.
|
|
34
|
+
// If it already exists, the contents will be deleted by api-documenter.
|
|
35
|
+
fs.mkdirSync(DOCS_DIR);
|
|
36
|
+
}
|
|
37
|
+
execSync(
|
|
38
|
+
`api-documenter markdown --input-folder temp --output-folder ${DOCS_DIR}`,
|
|
39
|
+
{stdio: 'inherit'});
|
|
40
|
+
done();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Prepends the project and book metadata that devsite requires.
|
|
45
|
+
*/
|
|
46
|
+
const prependBook = function() {
|
|
47
|
+
return gulp.src('docs/*.md')
|
|
48
|
+
.pipe(header(
|
|
49
|
+
'Project: /blockly/_project.yaml\nBook: /blockly/_book.yaml\n\n'))
|
|
50
|
+
.pipe(gulp.dest(DOCS_DIR));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Creates a map of top-level pages to sub-pages, e.g. a mapping
|
|
55
|
+
* of `block_class` to every page associated with that class.
|
|
56
|
+
* This is needed to create an accurate table of contents.
|
|
57
|
+
* @param {string[]} allFiles All files in docs directory.
|
|
58
|
+
* @returns {Map<string, string[]>}
|
|
59
|
+
*/
|
|
60
|
+
const buildAlternatePathsMap = function(allFiles) {
|
|
61
|
+
let map = new Map();
|
|
62
|
+
for (let file of allFiles) {
|
|
63
|
+
// Get the name of the class/namespaces/variable/etc., i.e. the top-level
|
|
64
|
+
// page.
|
|
65
|
+
let filePieces = file.split('.');
|
|
66
|
+
let name = filePieces[1];
|
|
67
|
+
if (!map.has(name)) {
|
|
68
|
+
map.set(name, []);
|
|
69
|
+
}
|
|
70
|
+
if (filePieces[2] === 'md') {
|
|
71
|
+
// Don't add the top-level page to the map.
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
// Add all sub-pages to the array for the corresponding top-level page.
|
|
75
|
+
map.get(name).push(file);
|
|
76
|
+
}
|
|
77
|
+
return map;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Create the _toc.yaml file used by devsite to create the leftnav.
|
|
82
|
+
* This file is generated from the contents of `blockly.md` which contains links
|
|
83
|
+
* to the other top-level API pages (each class, namespace, etc.).
|
|
84
|
+
*
|
|
85
|
+
* The `alternate_paths` for each top-level page contains the path for
|
|
86
|
+
* each associated sub-page. All subpages must be linked to their top-level page
|
|
87
|
+
* in the TOC for the left nav bar to remain correct after drilling down into a
|
|
88
|
+
* sub-page.
|
|
89
|
+
*/
|
|
90
|
+
const createToc = function(done) {
|
|
91
|
+
const fileContent = fs.readFileSync(`${DOCS_DIR}/blockly.md`, 'utf8');
|
|
92
|
+
// Create the TOC file. The file should not yet exist; if it does, this
|
|
93
|
+
// operation will fail.
|
|
94
|
+
const toc = fs.openSync(`${DOCS_DIR}/_toc.yaml`, 'ax');
|
|
95
|
+
const files = fs.readdirSync(DOCS_DIR);
|
|
96
|
+
const map = buildAlternatePathsMap(files);
|
|
97
|
+
const referencePath = '/blockly/reference/js';
|
|
98
|
+
|
|
99
|
+
const tocHeader = `toc:
|
|
100
|
+
- title: Overview
|
|
101
|
+
path: /blockly/reference/js/blockly.md\n`;
|
|
102
|
+
fs.writeSync(toc, tocHeader);
|
|
103
|
+
|
|
104
|
+
// Generate a section of TOC for each section/heading in the overview file.
|
|
105
|
+
const sections = fileContent.split('##');
|
|
106
|
+
for (let section of sections) {
|
|
107
|
+
// This converts the md table in each section to a JS object
|
|
108
|
+
const table = Extractor.extractObject(section, 'rows', false);
|
|
109
|
+
if (!table) {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
// Get the name of the section, i.e. the text immediately after the `##` in
|
|
113
|
+
// the source doc
|
|
114
|
+
const sectionName = section.split('\n')[0].trim();
|
|
115
|
+
fs.writeSync(toc, `- heading: ${sectionName}\n`);
|
|
116
|
+
for (let row in table) {
|
|
117
|
+
// After going through the Extractor, the markdown is now HTML.
|
|
118
|
+
// Each row in the table is now a link (anchor tag).
|
|
119
|
+
// Get the target of the link, excluding the first `.` since we don't want
|
|
120
|
+
// a relative path.
|
|
121
|
+
const path = /href="\.(.*?)"/.exec(row)?.[1];
|
|
122
|
+
// Get the name of the link (text in between the <a> and </a>)
|
|
123
|
+
const name = /">(.*?)</.exec(row)?.[1];
|
|
124
|
+
if (!path || !name) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
fs.writeSync(toc, `- title: ${name}\n path: ${referencePath}${path}\n`);
|
|
128
|
+
// Get the list of sub-pages for this page.
|
|
129
|
+
// Add each sub-page to the `alternate_paths` property.
|
|
130
|
+
let pages = map.get(path.split('.')[1]);
|
|
131
|
+
if (pages?.length) {
|
|
132
|
+
fs.writeSync(toc, ` alternate_paths:\n`);
|
|
133
|
+
for (let page of pages) {
|
|
134
|
+
fs.writeSync(toc, ` - ${referencePath}/${page}\n`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
done();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const docs = gulp.series(
|
|
144
|
+
generateApiJson, removeRenames, generateDocs,
|
|
145
|
+
gulp.parallel(prependBook, createToc));
|
|
146
|
+
|
|
147
|
+
module.exports = {docs};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Git-related gulp tasks for Blockly.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const gulp = require('gulp');
|
|
12
|
+
const execSync = require('child_process').execSync;
|
|
13
|
+
|
|
14
|
+
const buildTasks = require('./build_tasks');
|
|
15
|
+
const packageTasks = require('./package_tasks');
|
|
16
|
+
|
|
17
|
+
const UPSTREAM_URL = 'https://github.com/google/blockly.git';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Extra paths to include in the gh_pages branch (beyond the normal
|
|
21
|
+
* contents of master / develop). Passed to shell unquoted, so can
|
|
22
|
+
* include globs.
|
|
23
|
+
*/
|
|
24
|
+
const EXTRAS = [
|
|
25
|
+
'build/msg',
|
|
26
|
+
'dist/*_compressed.js*',
|
|
27
|
+
'node_modules/@blockly',
|
|
28
|
+
'build/*.loader.mjs',
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
let upstream = null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get name of git remote for upstream (typically 'upstream', but this
|
|
35
|
+
* is just convention and can be changed.)
|
|
36
|
+
*/
|
|
37
|
+
function getUpstream() {
|
|
38
|
+
if (upstream) return upstream;
|
|
39
|
+
for (const line of String(execSync('git remote -v')).split('\n')) {
|
|
40
|
+
if (line.includes('google/blockly')) {
|
|
41
|
+
upstream = line.split('\t')[0];
|
|
42
|
+
return upstream;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
throw new Error('Unable to determine upstream URL');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Stash current state, check out the named branch, and sync with
|
|
50
|
+
* google/blockly.
|
|
51
|
+
*/
|
|
52
|
+
function syncBranch(branchName) {
|
|
53
|
+
return function(done) {
|
|
54
|
+
execSync('git stash save -m "Stash for sync"', { stdio: 'inherit' });
|
|
55
|
+
checkoutBranch(branchName);
|
|
56
|
+
execSync(`git pull ${UPSTREAM_URL} ${branchName}`, { stdio: 'inherit' });
|
|
57
|
+
execSync(`git push origin ${branchName}`, { stdio: 'inherit' });
|
|
58
|
+
done();
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Stash current state, check out develop, and sync with
|
|
64
|
+
* google/blockly.
|
|
65
|
+
*/
|
|
66
|
+
function syncDevelop() {
|
|
67
|
+
return syncBranch('develop');
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Stash current state, check out master, and sync with
|
|
72
|
+
* google/blockly.
|
|
73
|
+
*/
|
|
74
|
+
function syncMaster() {
|
|
75
|
+
return syncBranch('master');
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Helper function: get a name for a rebuild branch. Format:
|
|
80
|
+
* rebuild_mm_dd_yyyy.
|
|
81
|
+
*/
|
|
82
|
+
function getRebuildBranchName() {
|
|
83
|
+
const date = new Date();
|
|
84
|
+
const mm = date.getMonth() + 1; // Month, 0-11
|
|
85
|
+
const dd = date.getDate(); // Day of the month, 1-31
|
|
86
|
+
const yyyy = date.getFullYear();
|
|
87
|
+
return `rebuild_${mm}_${dd}_${yyyy}`;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Helper function: get a name for a rebuild branch. Format:
|
|
92
|
+
* rebuild_yyyy_mm.
|
|
93
|
+
*/
|
|
94
|
+
function getRCBranchName() {
|
|
95
|
+
const date = new Date();
|
|
96
|
+
const mm = date.getMonth() + 1; // Month, 0-11
|
|
97
|
+
const yyyy = date.getFullYear();
|
|
98
|
+
return `rc_${yyyy}_${mm}`;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* If branch does not exist then create the branch.
|
|
103
|
+
* If branch exists switch to branch.
|
|
104
|
+
*/
|
|
105
|
+
function checkoutBranch(branchName) {
|
|
106
|
+
execSync(`git switch -c ${branchName}`,
|
|
107
|
+
{ stdio: 'inherit' });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Create and push an RC branch.
|
|
112
|
+
* Note that this pushes to google/blockly.
|
|
113
|
+
*/
|
|
114
|
+
const createRC = gulp.series(
|
|
115
|
+
syncDevelop(),
|
|
116
|
+
function(done) {
|
|
117
|
+
const branchName = getRCBranchName();
|
|
118
|
+
execSync(`git switch -C ${branchName}`, { stdio: 'inherit' });
|
|
119
|
+
execSync(`git push ${UPSTREAM_URL} ${branchName}`, { stdio: 'inherit' });
|
|
120
|
+
done();
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
/** Create the rebuild branch. */
|
|
125
|
+
function createRebuildBranch(done) {
|
|
126
|
+
const branchName = getRebuildBranchName();
|
|
127
|
+
console.log(`make-rebuild-branch: creating branch ${branchName}`);
|
|
128
|
+
execSync(`git switch -C ${branchName}`, { stdio: 'inherit' });
|
|
129
|
+
done();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Push the rebuild branch to origin. */
|
|
133
|
+
function pushRebuildBranch(done) {
|
|
134
|
+
console.log('push-rebuild-branch: committing rebuild');
|
|
135
|
+
execSync('git commit -am "Rebuild"', { stdio: 'inherit' });
|
|
136
|
+
const branchName = getRebuildBranchName();
|
|
137
|
+
execSync(`git push origin ${branchName}`, { stdio: 'inherit' });
|
|
138
|
+
console.log(`Branch ${branchName} pushed to GitHub.`);
|
|
139
|
+
console.log('Next step: create a pull request against develop.');
|
|
140
|
+
done();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Update github pages with what is currently in develop.
|
|
145
|
+
*
|
|
146
|
+
* Prerequisites (invoked): clean, build.
|
|
147
|
+
*/
|
|
148
|
+
const updateGithubPages = gulp.series(
|
|
149
|
+
function(done) {
|
|
150
|
+
execSync('git stash save -m "Stash for sync"', { stdio: 'inherit' });
|
|
151
|
+
execSync('git switch -C gh-pages', { stdio: 'inherit' });
|
|
152
|
+
execSync(`git fetch ${getUpstream()}`, { stdio: 'inherit' });
|
|
153
|
+
execSync(`git reset --hard ${getUpstream()}/develop`, { stdio: 'inherit' });
|
|
154
|
+
done();
|
|
155
|
+
},
|
|
156
|
+
buildTasks.cleanBuildDir,
|
|
157
|
+
packageTasks.cleanReleaseDir,
|
|
158
|
+
buildTasks.build,
|
|
159
|
+
function(done) {
|
|
160
|
+
// Extra paths (e.g. build/, dist/ etc.) are normally gitignored,
|
|
161
|
+
// so we have to force add.
|
|
162
|
+
execSync(`git add -f ${EXTRAS.join(' ')}`, {stdio: 'inherit'});
|
|
163
|
+
execSync('git commit -am "Rebuild"', {stdio: 'inherit'});
|
|
164
|
+
execSync(`git push ${UPSTREAM_URL} gh-pages --force`, {stdio: 'inherit'});
|
|
165
|
+
done();
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
module.exports = {
|
|
170
|
+
// Main sequence targets. Each should invoke any immediate prerequisite(s).
|
|
171
|
+
updateGithubPages,
|
|
172
|
+
|
|
173
|
+
// Manually-invokable targets that invoke prerequisites.
|
|
174
|
+
createRC,
|
|
175
|
+
|
|
176
|
+
// Legacy script-only targets, to be deleted.
|
|
177
|
+
syncDevelop,
|
|
178
|
+
syncMaster,
|
|
179
|
+
createRebuildBranch,
|
|
180
|
+
pushRebuildBranch,
|
|
181
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Any gulp helper functions.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Clears the require cache to ensure the package.json is up to date.
|
|
12
|
+
function getPackageJson() {
|
|
13
|
+
delete require.cache[require.resolve('../../package.json')]
|
|
14
|
+
return require('../../package.json');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
getPackageJson: getPackageJson
|
|
19
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Gulp tasks to package Blockly for distribution on NPM.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const gulp = require('gulp');
|
|
12
|
+
gulp.concat = require('gulp-concat');
|
|
13
|
+
gulp.replace = require('gulp-replace');
|
|
14
|
+
gulp.rename = require('gulp-rename');
|
|
15
|
+
gulp.insert = require('gulp-insert');
|
|
16
|
+
gulp.umd = require('gulp-umd');
|
|
17
|
+
gulp.replace = require('gulp-replace');
|
|
18
|
+
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const fs = require('fs');
|
|
21
|
+
const {rimraf} = require('rimraf');
|
|
22
|
+
const build = require('./build_tasks');
|
|
23
|
+
const {getPackageJson} = require('./helper_tasks');
|
|
24
|
+
const {BUILD_DIR, LANG_BUILD_DIR, RELEASE_DIR, TYPINGS_BUILD_DIR} = require('./config');
|
|
25
|
+
|
|
26
|
+
// Path to template files for gulp-umd.
|
|
27
|
+
const TEMPLATE_DIR = 'scripts/package/templates';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A helper method for wrapping a file into a Universal Module Definition.
|
|
31
|
+
* @param {string} namespace The export namespace.
|
|
32
|
+
* @param {Array<Object>} dependencies An array of dependencies to inject.
|
|
33
|
+
*/
|
|
34
|
+
function packageUMD(namespace, dependencies, template = 'umd.template') {
|
|
35
|
+
return gulp.umd({
|
|
36
|
+
dependencies: function () { return dependencies; },
|
|
37
|
+
namespace: function () { return namespace; },
|
|
38
|
+
exports: function () { return namespace; },
|
|
39
|
+
template: path.join(TEMPLATE_DIR, template)
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* This task wraps scripts/package/index.js into a UMD module.
|
|
45
|
+
*
|
|
46
|
+
* This module is the main entrypoint for the blockly package, and
|
|
47
|
+
* loads blockly/core, blockly/blocks and blockly/msg/en and then
|
|
48
|
+
* calls setLocale(en).
|
|
49
|
+
*/
|
|
50
|
+
function packageIndex() {
|
|
51
|
+
return gulp.src('scripts/package/index.js')
|
|
52
|
+
.pipe(packageUMD('Blockly', [{
|
|
53
|
+
name: 'Blockly',
|
|
54
|
+
amd: 'blockly/core',
|
|
55
|
+
cjs: 'blockly/core',
|
|
56
|
+
},{
|
|
57
|
+
name: 'en',
|
|
58
|
+
amd: 'blockly/msg/en',
|
|
59
|
+
cjs: 'blockly/msg/en',
|
|
60
|
+
global: 'Blockly.Msg',
|
|
61
|
+
},{
|
|
62
|
+
name: 'blocks',
|
|
63
|
+
amd: 'blockly/blocks',
|
|
64
|
+
cjs: 'blockly/blocks',
|
|
65
|
+
global: 'Blockly.Blocks',
|
|
66
|
+
}]))
|
|
67
|
+
.pipe(gulp.dest(RELEASE_DIR));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* This task copies scripts/package/core-node.js into into the
|
|
72
|
+
* package. This module will be the 'blockly/core' entrypoint for
|
|
73
|
+
* node.js environments.
|
|
74
|
+
*
|
|
75
|
+
* Note that, unlike index.js, this file does not get a UMD wrapper.
|
|
76
|
+
* This is because it is only used in node.js environments and so is
|
|
77
|
+
* guaranteed to be loaded as a CJS module.
|
|
78
|
+
*/
|
|
79
|
+
function packageCoreNode() {
|
|
80
|
+
return gulp.src('scripts/package/core-node.js')
|
|
81
|
+
.pipe(gulp.dest(RELEASE_DIR));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* This task wraps each of the files in ${BUILD_DIR/msg/ into a UMD module.
|
|
86
|
+
* @example import * as En from 'blockly/msg/en';
|
|
87
|
+
*/
|
|
88
|
+
function packageLocales() {
|
|
89
|
+
// Remove references to goog.provide and goog.require.
|
|
90
|
+
return gulp.src(`${LANG_BUILD_DIR}/*.js`)
|
|
91
|
+
.pipe(gulp.replace(/goog\.[^\n]+/g, ''))
|
|
92
|
+
.pipe(packageUMD('Blockly.Msg', [], 'umd-msg.template'))
|
|
93
|
+
.pipe(gulp.dest(`${RELEASE_DIR}/msg`));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* This task creates a UMD bundle of Blockly which includes the Blockly
|
|
98
|
+
* core files, the built-in blocks, the JavaScript code generator and the
|
|
99
|
+
* English localization files.
|
|
100
|
+
* @example <script src="https://unpkg.com/blockly/blockly.min.js"></script>
|
|
101
|
+
*/
|
|
102
|
+
function packageUMDBundle() {
|
|
103
|
+
const srcs = [
|
|
104
|
+
`${RELEASE_DIR}/blockly_compressed.js`,
|
|
105
|
+
`${RELEASE_DIR}/msg/en.js`,
|
|
106
|
+
`${RELEASE_DIR}/blocks_compressed.js`,
|
|
107
|
+
`${RELEASE_DIR}/javascript_compressed.js`,
|
|
108
|
+
];
|
|
109
|
+
return gulp.src(srcs)
|
|
110
|
+
.pipe(gulp.concat('blockly.min.js'))
|
|
111
|
+
.pipe(gulp.dest(`${RELEASE_DIR}`));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* This task creates shims for the submodule entrypoints, for the
|
|
117
|
+
* benefit of bundlers and other build tools that do not correctly
|
|
118
|
+
* support the exports declaration in package.json. These shims just
|
|
119
|
+
* require() and reexport the corresponding *_compressed.js bundle.
|
|
120
|
+
*
|
|
121
|
+
* This should solve issues encountered by users of bundlers that don't
|
|
122
|
+
* support exports at all (e.g. browserify) as well as ones that don't
|
|
123
|
+
* support it in certain circumstances (e.g., when using webpack's
|
|
124
|
+
* resolve.alias configuration option to alias 'blockly' to
|
|
125
|
+
* 'node_modules/blockly', as we formerly did in most plugins, which
|
|
126
|
+
* causes webpack to ignore blockly's package.json entirely).
|
|
127
|
+
*
|
|
128
|
+
* Assumptions:
|
|
129
|
+
* - Such bundlers will _completely_ ignore the exports declaration.
|
|
130
|
+
* - The bundles are intended to be used in a browser—or at least not
|
|
131
|
+
* in node.js—so the core entrypoint never needs to route to
|
|
132
|
+
* core-node.js. This is reasonable since there's little reason to
|
|
133
|
+
* bundle code for node.js, and node.js has supported the exports
|
|
134
|
+
* clause since at least v12, consideably older than any version of
|
|
135
|
+
* node.js we officially support.
|
|
136
|
+
* - It suffices to provide only a CJS entrypoint (because we can only
|
|
137
|
+
* provide CJS or ESM, not both. (We could in future switch to
|
|
138
|
+
* providing only an ESM entrypoint instead, though.)
|
|
139
|
+
*
|
|
140
|
+
* @param {Function} done Callback to call when done.
|
|
141
|
+
*/
|
|
142
|
+
function packageLegacyEntrypoints(done) {
|
|
143
|
+
for (entrypoint of [
|
|
144
|
+
'core', 'blocks', 'dart', 'javascript', 'lua', 'php', 'python'
|
|
145
|
+
]) {
|
|
146
|
+
const bundle =
|
|
147
|
+
(entrypoint === 'core' ? 'blockly' : entrypoint) + '_compressed.js';
|
|
148
|
+
fs.writeFileSync(path.join(RELEASE_DIR, `${entrypoint}.js`),
|
|
149
|
+
`// Shim for backwards-compatibility with bundlers that do not
|
|
150
|
+
// support the 'exports' clause in package.json, to allow them
|
|
151
|
+
// to load the blockly/${entrypoint} submodule entrypoint.
|
|
152
|
+
module.exports = require('./${bundle}');
|
|
153
|
+
`);
|
|
154
|
+
}
|
|
155
|
+
done();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* This task copies all the media/* files into the release directory.
|
|
160
|
+
*/
|
|
161
|
+
function packageMedia() {
|
|
162
|
+
return gulp.src('media/*')
|
|
163
|
+
.pipe(gulp.dest(`${RELEASE_DIR}/media`));
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* This task copies the package.json file into the release directory,
|
|
168
|
+
* with modifications:
|
|
169
|
+
*
|
|
170
|
+
* - The scripts section is removed.
|
|
171
|
+
*
|
|
172
|
+
* Prerequisite: buildLangfiles.
|
|
173
|
+
*
|
|
174
|
+
* @param {Function} done Callback to call when done.
|
|
175
|
+
*/
|
|
176
|
+
function packageJSON(done) {
|
|
177
|
+
// Copy package.json, so we can safely modify it.
|
|
178
|
+
const json = JSON.parse(JSON.stringify(getPackageJson()));
|
|
179
|
+
// Remove unwanted entries.
|
|
180
|
+
delete json['scripts'];
|
|
181
|
+
// Set "type": "commonjs", since that's what .js files in the
|
|
182
|
+
// package root are. This should be a no-op since that's the
|
|
183
|
+
// default, but by setting it explicitly we ensure that any chage to
|
|
184
|
+
// the repository top-level package.json to set "type": "module"
|
|
185
|
+
// won't break the published package accidentally.
|
|
186
|
+
json.type = 'commonjs';
|
|
187
|
+
// Write resulting package.json file to release directory.
|
|
188
|
+
if (!fs.existsSync(RELEASE_DIR)) {
|
|
189
|
+
fs.mkdirSync(RELEASE_DIR, {recursive: true});
|
|
190
|
+
}
|
|
191
|
+
fs.writeFileSync(`${RELEASE_DIR}/package.json`,
|
|
192
|
+
JSON.stringify(json, null, 2));
|
|
193
|
+
done();
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* This task copies the scripts/package/README.md file into the
|
|
198
|
+
* release directory. This file is what developers will see at
|
|
199
|
+
* https://www.npmjs.com/package/blockly .
|
|
200
|
+
*/
|
|
201
|
+
function packageReadme() {
|
|
202
|
+
return gulp.src('scripts/package/README.md')
|
|
203
|
+
.pipe(gulp.dest(RELEASE_DIR));
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* This task copies the generated .d.ts files in build/declarations and the
|
|
208
|
+
* hand-written .d.ts files in typings/ into the release directory. The main
|
|
209
|
+
* entrypoint file (index.d.ts) is referenced in package.json in the types
|
|
210
|
+
* property.
|
|
211
|
+
*/
|
|
212
|
+
function packageDTS() {
|
|
213
|
+
const handwrittenSrcs = [
|
|
214
|
+
'typings/*.d.ts',
|
|
215
|
+
'typings/msg/*.d.ts',
|
|
216
|
+
];
|
|
217
|
+
return gulp.src(handwrittenSrcs, {base: 'typings'})
|
|
218
|
+
.pipe(gulp.src(`${TYPINGS_BUILD_DIR}/**/*.d.ts`, {ignore: [
|
|
219
|
+
`${TYPINGS_BUILD_DIR}/blocks/**/*`,
|
|
220
|
+
]}))
|
|
221
|
+
.pipe(gulp.replace('AnyDuringMigration', 'any'))
|
|
222
|
+
.pipe(gulp.dest(RELEASE_DIR));
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* This task cleans the release directory (by deleting it).
|
|
227
|
+
*/
|
|
228
|
+
function cleanReleaseDir() {
|
|
229
|
+
// Sanity check.
|
|
230
|
+
if (RELEASE_DIR === '.' || RELEASE_DIR === '/') {
|
|
231
|
+
return Promise.reject(`Refusing to rm -rf ${RELEASE_DIR}`);
|
|
232
|
+
}
|
|
233
|
+
return rimraf(RELEASE_DIR);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* This task prepares the files to be included in the NPM by copying
|
|
238
|
+
* them into the release directory.
|
|
239
|
+
*
|
|
240
|
+
* Prerequisite: build.
|
|
241
|
+
*/
|
|
242
|
+
const package = gulp.series(
|
|
243
|
+
gulp.parallel(
|
|
244
|
+
build.cleanBuildDir,
|
|
245
|
+
cleanReleaseDir),
|
|
246
|
+
build.build,
|
|
247
|
+
gulp.parallel(
|
|
248
|
+
packageIndex,
|
|
249
|
+
packageCoreNode,
|
|
250
|
+
packageLegacyEntrypoints,
|
|
251
|
+
packageMedia,
|
|
252
|
+
gulp.series(packageLocales, packageUMDBundle),
|
|
253
|
+
packageJSON,
|
|
254
|
+
packageReadme,
|
|
255
|
+
packageDTS)
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
module.exports = {
|
|
259
|
+
// Main sequence targets. Each should invoke any immediate prerequisite(s).
|
|
260
|
+
cleanReleaseDir: cleanReleaseDir,
|
|
261
|
+
package: package,
|
|
262
|
+
};
|