blockly 9.3.0-beta.0 → 9.3.0
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/blockly.min.js +1674 -1520
- package/blockly_compressed.js +1313 -1152
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +166 -173
- package/blocks_compressed.js.map +1 -1
- package/core/any_aliases.d.ts +5 -0
- package/core/block.d.ts +49 -17
- package/core/block_animations.d.ts +0 -4
- package/core/block_drag_surface.d.ts +135 -0
- package/core/block_dragger.d.ts +2 -7
- package/core/block_svg.d.ts +72 -9
- package/core/blockly.d.ts +29 -58
- package/core/blockly_options.d.ts +0 -2
- package/core/blocks.d.ts +0 -2
- package/core/browser_events.d.ts +0 -9
- package/core/bubble.d.ts +6 -4
- package/core/bubble_dragger.d.ts +2 -3
- package/core/bump_objects.d.ts +0 -3
- package/core/clipboard.d.ts +0 -3
- package/core/comment.d.ts +6 -10
- package/core/common.d.ts +0 -12
- package/core/component_manager.d.ts +0 -2
- package/core/connection.d.ts +19 -6
- package/core/connection_checker.d.ts +1 -3
- package/core/connection_db.d.ts +0 -2
- package/core/connection_type.d.ts +0 -2
- package/core/constants.d.ts +0 -4
- package/core/contextmenu.d.ts +0 -11
- package/core/contextmenu_items.d.ts +0 -27
- package/core/contextmenu_registry.d.ts +0 -2
- package/core/css.d.ts +0 -2
- package/core/delete_area.d.ts +0 -2
- package/core/dialog.d.ts +0 -6
- package/core/drag_target.d.ts +0 -2
- package/core/events/events_abstract.d.ts +0 -3
- package/core/events/events_block_base.d.ts +0 -2
- package/core/events/events_block_change.d.ts +0 -2
- package/core/events/events_block_create.d.ts +0 -2
- package/core/events/events_block_delete.d.ts +0 -2
- package/core/events/events_block_drag.d.ts +0 -2
- package/core/events/events_block_move.d.ts +0 -2
- package/core/events/events_bubble_open.d.ts +0 -2
- package/core/events/events_click.d.ts +0 -2
- package/core/events/events_comment_base.d.ts +0 -2
- package/core/events/events_comment_change.d.ts +0 -2
- package/core/events/events_comment_create.d.ts +0 -2
- package/core/events/events_comment_delete.d.ts +0 -2
- package/core/events/events_comment_move.d.ts +0 -2
- package/core/events/events_marker_move.d.ts +0 -2
- package/core/events/events_selected.d.ts +0 -2
- package/core/events/events_theme_change.d.ts +0 -2
- package/core/events/events_toolbox_item_select.d.ts +0 -2
- package/core/events/events_trashcan_open.d.ts +0 -2
- package/core/events/events_ui.d.ts +0 -1
- package/core/events/events_ui_base.d.ts +0 -2
- package/core/events/events_var_base.d.ts +0 -2
- package/core/events/events_var_create.d.ts +0 -2
- package/core/events/events_viewport.d.ts +0 -2
- package/core/events/utils.d.ts +0 -73
- package/core/events/workspace_events.d.ts +0 -2
- package/core/extensions.d.ts +0 -8
- package/core/field.d.ts +16 -15
- package/core/field_angle.d.ts +60 -50
- package/core/field_checkbox.d.ts +22 -10
- package/core/field_colour.d.ts +55 -42
- package/core/field_dropdown.d.ts +34 -18
- package/core/field_image.d.ts +9 -12
- package/core/field_input.d.ts +34 -11
- package/core/field_label.d.ts +7 -10
- package/core/field_label_serializable.d.ts +4 -6
- package/core/field_multilineinput.d.ts +34 -12
- package/core/field_number.d.ts +27 -19
- package/core/field_registry.d.ts +0 -3
- package/core/field_textinput.d.ts +28 -12
- package/core/field_variable.d.ts +28 -16
- package/core/flyout_base.d.ts +5 -6
- package/core/flyout_button.d.ts +2 -2
- package/core/flyout_horizontal.d.ts +0 -2
- package/core/flyout_metrics_manager.d.ts +0 -2
- package/core/flyout_vertical.d.ts +0 -2
- package/core/generator.d.ts +0 -1
- package/core/gesture.d.ts +4 -17
- package/core/grid.d.ts +0 -2
- package/core/icon.d.ts +0 -2
- package/core/inject.d.ts +0 -1
- package/core/input.d.ts +0 -3
- package/core/input_types.d.ts +0 -2
- package/core/insertion_marker_manager.d.ts +6 -6
- package/core/interfaces/i_ast_node_location.d.ts +0 -2
- package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
- package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
- package/core/interfaces/i_autohideable.d.ts +0 -2
- package/core/interfaces/i_block_dragger.d.ts +1 -3
- package/core/interfaces/i_bounded_element.d.ts +0 -2
- package/core/interfaces/i_bubble.d.ts +6 -4
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
- package/core/interfaces/i_component.d.ts +0 -2
- package/core/interfaces/i_connection_checker.d.ts +0 -2
- package/core/interfaces/i_contextmenu.d.ts +0 -1
- package/core/interfaces/i_copyable.d.ts +3 -2
- package/core/interfaces/i_deletable.d.ts +0 -2
- package/core/interfaces/i_delete_area.d.ts +0 -2
- package/core/interfaces/i_drag_target.d.ts +0 -2
- package/core/interfaces/i_draggable.d.ts +0 -2
- package/core/interfaces/i_flyout.d.ts +0 -2
- package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
- package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
- package/core/interfaces/i_metrics_manager.d.ts +0 -2
- package/core/interfaces/i_movable.d.ts +0 -2
- package/core/interfaces/i_positionable.d.ts +0 -2
- package/core/interfaces/i_procedure_model.d.ts +0 -5
- package/core/interfaces/i_registrable.d.ts +0 -2
- package/core/interfaces/i_selectable.d.ts +0 -2
- package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
- package/core/interfaces/i_serializer.d.ts +0 -2
- package/core/interfaces/i_styleable.d.ts +0 -2
- package/core/interfaces/i_toolbox.d.ts +0 -2
- package/core/interfaces/i_toolbox_item.d.ts +0 -2
- package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
- package/core/internal_constants.d.ts +0 -5
- package/core/keyboard_nav/ast_node.d.ts +0 -3
- package/core/keyboard_nav/basic_cursor.d.ts +0 -3
- package/core/keyboard_nav/cursor.d.ts +0 -3
- package/core/keyboard_nav/marker.d.ts +0 -2
- package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
- package/core/marker_manager.d.ts +0 -2
- package/core/menu.d.ts +0 -2
- package/core/menuitem.d.ts +0 -2
- package/core/metrics_manager.d.ts +0 -2
- package/core/mutator.d.ts +0 -2
- package/core/names.d.ts +0 -3
- package/core/options.d.ts +0 -2
- package/core/positionable_helpers.d.ts +0 -7
- package/core/procedures.d.ts +2 -25
- package/core/registry.d.ts +0 -11
- package/core/render_management.d.ts +15 -0
- package/core/rendered_connection.d.ts +22 -9
- package/core/renderers/common/block_rendering.d.ts +0 -3
- package/core/renderers/common/constants.d.ts +6 -51
- package/core/renderers/common/debug.d.ts +0 -3
- package/core/renderers/common/debugger.d.ts +9 -23
- package/core/renderers/common/drawer.d.ts +0 -5
- package/core/renderers/common/i_path_object.d.ts +0 -17
- package/core/renderers/common/info.d.ts +2 -12
- package/core/renderers/common/marker_svg.d.ts +2 -4
- package/core/renderers/common/path_object.d.ts +0 -24
- package/core/renderers/common/renderer.d.ts +5 -20
- package/core/renderers/geras/constants.d.ts +0 -5
- package/core/renderers/geras/drawer.d.ts +2 -4
- package/core/renderers/geras/highlight_constants.d.ts +6 -17
- package/core/renderers/geras/highlighter.d.ts +0 -13
- package/core/renderers/geras/info.d.ts +2 -5
- package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
- package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
- package/core/renderers/geras/path_object.d.ts +0 -8
- package/core/renderers/geras/renderer.d.ts +5 -7
- package/core/renderers/measurables/base.d.ts +0 -3
- package/core/renderers/measurables/bottom_row.d.ts +0 -9
- package/core/renderers/measurables/connection.d.ts +0 -3
- package/core/renderers/measurables/external_value_input.d.ts +0 -3
- package/core/renderers/measurables/field.d.ts +0 -3
- package/core/renderers/measurables/hat.d.ts +0 -3
- package/core/renderers/measurables/icon.d.ts +2 -5
- package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
- package/core/renderers/measurables/inline_input.d.ts +1 -4
- package/core/renderers/measurables/input_connection.d.ts +1 -4
- package/core/renderers/measurables/input_row.d.ts +0 -7
- package/core/renderers/measurables/jagged_edge.d.ts +2 -5
- package/core/renderers/measurables/next_connection.d.ts +0 -3
- package/core/renderers/measurables/output_connection.d.ts +0 -3
- package/core/renderers/measurables/previous_connection.d.ts +0 -3
- package/core/renderers/measurables/round_corner.d.ts +0 -3
- package/core/renderers/measurables/row.d.ts +0 -39
- package/core/renderers/measurables/spacer_row.d.ts +0 -3
- package/core/renderers/measurables/square_corner.d.ts +0 -3
- package/core/renderers/measurables/statement_input.d.ts +0 -3
- package/core/renderers/measurables/top_row.d.ts +0 -6
- package/core/renderers/measurables/types.d.ts +0 -31
- package/core/renderers/minimalist/constants.d.ts +2 -4
- package/core/renderers/minimalist/drawer.d.ts +0 -3
- package/core/renderers/minimalist/info.d.ts +0 -4
- package/core/renderers/minimalist/renderer.d.ts +0 -3
- package/core/renderers/thrasos/info.d.ts +0 -4
- package/core/renderers/thrasos/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +3 -17
- package/core/renderers/zelos/drawer.d.ts +0 -3
- package/core/renderers/zelos/info.d.ts +0 -4
- package/core/renderers/zelos/marker_svg.d.ts +0 -2
- package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
- package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
- package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
- package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
- package/core/renderers/zelos/path_object.d.ts +0 -9
- package/core/renderers/zelos/renderer.d.ts +3 -5
- package/core/scrollbar.d.ts +0 -2
- package/core/scrollbar_pair.d.ts +0 -2
- package/core/serialization/blocks.d.ts +3 -9
- package/core/serialization/exceptions.d.ts +0 -8
- package/core/serialization/priorities.d.ts +0 -4
- package/core/serialization/registry.d.ts +0 -2
- package/core/serialization/variables.d.ts +0 -4
- package/core/serialization/workspaces.d.ts +0 -2
- package/core/shortcut_items.d.ts +0 -17
- package/core/shortcut_registry.d.ts +0 -2
- package/core/sprites.d.ts +0 -2
- package/core/theme/classic.d.ts +0 -2
- package/core/theme/zelos.d.ts +0 -2
- package/core/theme.d.ts +0 -2
- package/core/theme_manager.d.ts +3 -6
- package/core/toolbox/category.d.ts +5 -7
- package/core/toolbox/collapsible_category.d.ts +0 -4
- package/core/toolbox/separator.d.ts +0 -2
- package/core/toolbox/toolbox.d.ts +2 -5
- package/core/toolbox/toolbox_item.d.ts +0 -2
- package/core/tooltip.d.ts +0 -29
- package/core/touch.d.ts +0 -13
- package/core/trashcan.d.ts +0 -2
- package/core/utils/aria.d.ts +0 -6
- package/core/utils/array.d.ts +0 -1
- package/core/utils/colour.d.ts +0 -12
- package/core/utils/coordinate.d.ts +0 -2
- package/core/utils/deprecation.d.ts +0 -1
- package/core/utils/dom.d.ts +0 -25
- package/core/utils/idgenerator.d.ts +0 -2
- package/core/utils/keycodes.d.ts +0 -2
- package/core/utils/math.d.ts +0 -3
- package/core/utils/metrics.d.ts +0 -1
- package/core/utils/object.d.ts +0 -4
- package/core/utils/parsing.d.ts +0 -4
- package/core/utils/rect.d.ts +0 -2
- package/core/utils/size.d.ts +0 -2
- package/core/utils/string.d.ts +0 -6
- package/core/utils/style.d.ts +0 -8
- package/core/utils/svg.d.ts +0 -2
- package/core/utils/svg_math.d.ts +0 -6
- package/core/utils/svg_paths.d.ts +0 -8
- package/core/utils/toolbox.d.ts +2 -35
- package/core/utils/useragent.d.ts +0 -8
- package/core/utils/xml.d.ts +9 -8
- package/core/utils.d.ts +0 -12
- package/core/variable_map.d.ts +1 -3
- package/core/variable_model.d.ts +0 -1
- package/core/variables.d.ts +13 -17
- package/core/variables_dynamic.d.ts +0 -4
- package/core/warning.d.ts +0 -2
- package/core/widgetdiv.d.ts +0 -10
- package/core/workspace.d.ts +3 -3
- package/core/workspace_audio.d.ts +0 -2
- package/core/workspace_comment.d.ts +1 -3
- package/core/workspace_comment_svg.d.ts +16 -5
- package/core/workspace_drag_surface_svg.d.ts +74 -0
- package/core/workspace_dragger.d.ts +3 -2
- package/core/workspace_svg.d.ts +48 -8
- package/core/xml.d.ts +1 -13
- package/core/zoom_controls.d.ts +4 -15
- package/dart_compressed.js +199 -199
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +168 -168
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +211 -211
- package/lua_compressed.js.map +1 -1
- package/msg/bn.js +2 -2
- package/msg/bs.js +7 -7
- package/msg/de.js +1 -1
- package/msg/fi.js +1 -1
- package/msg/fr.js +3 -3
- package/msg/ia.js +5 -5
- package/msg/kn.js +5 -5
- package/msg/ko.js +1 -1
- package/msg/lb.js +22 -22
- package/msg/sd.js +9 -9
- package/msg/skr-arab.js +2 -2
- package/msg/sl.js +18 -18
- package/msg/sw.js +1 -1
- package/msg/zh-hans.js +6 -6
- package/msg/zh-hant.js +2 -2
- package/package.json +6 -6
- package/php_compressed.js +185 -185
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +138 -138
- package/python_compressed.js.map +1 -1
- package/core/utils/sentinel.d.ts +0 -18
package/core/blockly.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import './events/events_ui_base.js';
|
|
|
10
10
|
import './events/events_var_create.js';
|
|
11
11
|
import { Block } from './block.js';
|
|
12
12
|
import * as blockAnimations from './block_animations.js';
|
|
13
|
+
import { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
13
14
|
import { BlockDragger } from './block_dragger.js';
|
|
14
15
|
import { BlockSvg } from './block_svg.js';
|
|
15
16
|
import { BlocklyOptions } from './blockly_options.js';
|
|
@@ -37,19 +38,19 @@ import { DragTarget } from './drag_target.js';
|
|
|
37
38
|
import * as dropDownDiv from './dropdowndiv.js';
|
|
38
39
|
import * as Events from './events/events.js';
|
|
39
40
|
import * as Extensions from './extensions.js';
|
|
40
|
-
import { Field, FieldValidator } from './field.js';
|
|
41
|
-
import { FieldAngle, FieldAngleValidator } from './field_angle.js';
|
|
42
|
-
import { FieldCheckbox, FieldCheckboxValidator } from './field_checkbox.js';
|
|
43
|
-
import { FieldColour, FieldColourValidator } from './field_colour.js';
|
|
44
|
-
import { FieldDropdown, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption } from './field_dropdown.js';
|
|
45
|
-
import { FieldImage } from './field_image.js';
|
|
46
|
-
import { FieldLabel } from './field_label.js';
|
|
41
|
+
import { Field, FieldConfig, FieldValidator, UnattachedFieldError } from './field.js';
|
|
42
|
+
import { FieldAngle, FieldAngleConfig, FieldAngleFromJsonConfig, FieldAngleValidator } from './field_angle.js';
|
|
43
|
+
import { FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator } from './field_checkbox.js';
|
|
44
|
+
import { FieldColour, FieldColourConfig, FieldColourFromJsonConfig, FieldColourValidator } from './field_colour.js';
|
|
45
|
+
import { FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption } from './field_dropdown.js';
|
|
46
|
+
import { FieldImage, FieldImageConfig, FieldImageFromJsonConfig } from './field_image.js';
|
|
47
|
+
import { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig } from './field_label.js';
|
|
47
48
|
import { FieldLabelSerializable } from './field_label_serializable.js';
|
|
48
|
-
import { FieldMultilineInput, FieldMultilineInputValidator } from './field_multilineinput.js';
|
|
49
|
-
import { FieldNumber, FieldNumberValidator } from './field_number.js';
|
|
49
|
+
import { FieldMultilineInput, FieldMultilineInputConfig, FieldMultilineInputFromJsonConfig, FieldMultilineInputValidator } from './field_multilineinput.js';
|
|
50
|
+
import { FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator } from './field_number.js';
|
|
50
51
|
import * as fieldRegistry from './field_registry.js';
|
|
51
|
-
import { FieldTextInput, FieldTextInputValidator } from './field_textinput.js';
|
|
52
|
-
import { FieldVariable, FieldVariableValidator } from './field_variable.js';
|
|
52
|
+
import { FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator } from './field_textinput.js';
|
|
53
|
+
import { FieldVariable, FieldVariableConfig, FieldVariableFromJsonConfig, FieldVariableValidator } from './field_variable.js';
|
|
53
54
|
import { Flyout } from './flyout_base.js';
|
|
54
55
|
import { FlyoutButton } from './flyout_button.js';
|
|
55
56
|
import { HorizontalFlyout } from './flyout_horizontal.js';
|
|
@@ -91,6 +92,7 @@ import { ISelectableToolboxItem } from './interfaces/i_selectable_toolbox_item.j
|
|
|
91
92
|
import { IStyleable } from './interfaces/i_styleable.js';
|
|
92
93
|
import { IToolbox } from './interfaces/i_toolbox.js';
|
|
93
94
|
import { IToolboxItem } from './interfaces/i_toolbox_item.js';
|
|
95
|
+
import { IVariableBackedParameterModel, isVariableBackedParameterModel } from './interfaces/i_variable_backed_parameter_model.js';
|
|
94
96
|
import { ASTNode } from './keyboard_nav/ast_node.js';
|
|
95
97
|
import { BasicCursor } from './keyboard_nav/basic_cursor.js';
|
|
96
98
|
import { Cursor } from './keyboard_nav/cursor.js';
|
|
@@ -141,6 +143,7 @@ import { Workspace } from './workspace.js';
|
|
|
141
143
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
142
144
|
import { WorkspaceComment } from './workspace_comment.js';
|
|
143
145
|
import { WorkspaceCommentSvg } from './workspace_comment_svg.js';
|
|
146
|
+
import { WorkspaceDragSurfaceSvg } from './workspace_drag_surface_svg.js';
|
|
144
147
|
import { WorkspaceDragger } from './workspace_dragger.js';
|
|
145
148
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
146
149
|
import * as Xml from './xml.js';
|
|
@@ -154,68 +157,55 @@ import { ZoomControls } from './zoom_controls.js';
|
|
|
154
157
|
* compiler to override this constant.
|
|
155
158
|
*
|
|
156
159
|
* @define {string}
|
|
157
|
-
* @alias Blockly.VERSION
|
|
158
160
|
*/
|
|
159
161
|
export declare const VERSION = "uncompiled";
|
|
160
162
|
/**
|
|
161
163
|
* @see Blockly.Input.Align.LEFT
|
|
162
|
-
* @alias Blockly.ALIGN_LEFT
|
|
163
164
|
*/
|
|
164
165
|
export declare const ALIGN_LEFT = Input.Align.LEFT;
|
|
165
166
|
/**
|
|
166
167
|
* @see Blockly.Input.Align.CENTRE
|
|
167
|
-
* @alias Blockly.ALIGN_CENTRE
|
|
168
168
|
*/
|
|
169
169
|
export declare const ALIGN_CENTRE = Input.Align.CENTRE;
|
|
170
170
|
/**
|
|
171
171
|
* @see Blockly.Input.Align.RIGHT
|
|
172
|
-
* @alias Blockly.ALIGN_RIGHT
|
|
173
172
|
*/
|
|
174
173
|
export declare const ALIGN_RIGHT = Input.Align.RIGHT;
|
|
175
174
|
/**
|
|
176
175
|
* @see ConnectionType.INPUT_VALUE
|
|
177
|
-
* @alias Blockly.INPUT_VALUE
|
|
178
176
|
*/
|
|
179
177
|
export declare const INPUT_VALUE = ConnectionType.INPUT_VALUE;
|
|
180
178
|
/**
|
|
181
179
|
* @see ConnectionType.OUTPUT_VALUE
|
|
182
|
-
* @alias Blockly.OUTPUT_VALUE
|
|
183
180
|
*/
|
|
184
181
|
export declare const OUTPUT_VALUE = ConnectionType.OUTPUT_VALUE;
|
|
185
182
|
/**
|
|
186
183
|
* @see ConnectionType.NEXT_STATEMENT
|
|
187
|
-
* @alias Blockly.NEXT_STATEMENT
|
|
188
184
|
*/
|
|
189
185
|
export declare const NEXT_STATEMENT = ConnectionType.NEXT_STATEMENT;
|
|
190
186
|
/**
|
|
191
187
|
* @see ConnectionType.PREVIOUS_STATEMENT
|
|
192
|
-
* @alias Blockly.PREVIOUS_STATEMENT
|
|
193
188
|
*/
|
|
194
189
|
export declare const PREVIOUS_STATEMENT = ConnectionType.PREVIOUS_STATEMENT;
|
|
195
190
|
/**
|
|
196
191
|
* @see inputTypes.DUMMY_INPUT
|
|
197
|
-
* @alias Blockly.DUMMY_INPUT
|
|
198
192
|
*/
|
|
199
|
-
export declare const DUMMY_INPUT
|
|
193
|
+
export declare const DUMMY_INPUT = inputTypes.DUMMY;
|
|
200
194
|
/** Aliases for toolbox positions. */
|
|
201
195
|
/**
|
|
202
196
|
* @see toolbox.Position.TOP
|
|
203
|
-
* @alias Blockly.TOOLBOX_AT_TOP
|
|
204
197
|
*/
|
|
205
198
|
export declare const TOOLBOX_AT_TOP = utils.toolbox.Position.TOP;
|
|
206
199
|
/**
|
|
207
200
|
* @see toolbox.Position.BOTTOM
|
|
208
|
-
* @alias Blockly.TOOLBOX_AT_BOTTOM
|
|
209
201
|
*/
|
|
210
202
|
export declare const TOOLBOX_AT_BOTTOM = utils.toolbox.Position.BOTTOM;
|
|
211
203
|
/**
|
|
212
204
|
* @see toolbox.Position.LEFT
|
|
213
|
-
* @alias Blockly.TOOLBOX_AT_LEFT
|
|
214
205
|
*/
|
|
215
206
|
export declare const TOOLBOX_AT_LEFT = utils.toolbox.Position.LEFT;
|
|
216
207
|
/**
|
|
217
208
|
* @see toolbox.Position.RIGHT
|
|
218
|
-
* @alias Blockly.TOOLBOX_AT_RIGHT
|
|
219
209
|
*/
|
|
220
210
|
export declare const TOOLBOX_AT_RIGHT = utils.toolbox.Position.RIGHT;
|
|
221
211
|
/**
|
|
@@ -227,7 +217,6 @@ export declare const TOOLBOX_AT_RIGHT = utils.toolbox.Position.RIGHT;
|
|
|
227
217
|
*
|
|
228
218
|
* @param workspace Any workspace in the SVG.
|
|
229
219
|
* @see Blockly.common.svgResize
|
|
230
|
-
* @alias Blockly.svgResize
|
|
231
220
|
*/
|
|
232
221
|
export declare const svgResize: typeof common.svgResize;
|
|
233
222
|
/**
|
|
@@ -235,7 +224,6 @@ export declare const svgResize: typeof common.svgResize;
|
|
|
235
224
|
*
|
|
236
225
|
* @param opt_onlyClosePopups Whether only popups should be closed.
|
|
237
226
|
* @see Blockly.WorkspaceSvg.hideChaff
|
|
238
|
-
* @alias Blockly.hideChaff
|
|
239
227
|
*/
|
|
240
228
|
export declare function hideChaff(opt_onlyClosePopups?: boolean): void;
|
|
241
229
|
/**
|
|
@@ -244,13 +232,10 @@ export declare function hideChaff(opt_onlyClosePopups?: boolean): void;
|
|
|
244
232
|
* Blockly instances on a page.
|
|
245
233
|
*
|
|
246
234
|
* @see Blockly.common.getMainWorkspace
|
|
247
|
-
* @alias Blockly.getMainWorkspace
|
|
248
235
|
*/
|
|
249
236
|
export declare const getMainWorkspace: typeof common.getMainWorkspace;
|
|
250
237
|
/**
|
|
251
238
|
* Returns the currently selected copyable object.
|
|
252
|
-
*
|
|
253
|
-
* @alias Blockly.common.getSelected
|
|
254
239
|
*/
|
|
255
240
|
export declare const getSelected: typeof common.getSelected;
|
|
256
241
|
/**
|
|
@@ -259,7 +244,6 @@ export declare const getSelected: typeof common.getSelected;
|
|
|
259
244
|
*
|
|
260
245
|
* @param jsonArray An array of JSON block definitions.
|
|
261
246
|
* @see Blockly.common.defineBlocksWithJsonArray
|
|
262
|
-
* @alias Blockly.defineBlocksWithJsonArray
|
|
263
247
|
*/
|
|
264
248
|
export declare const defineBlocksWithJsonArray: typeof common.defineBlocksWithJsonArray;
|
|
265
249
|
/**
|
|
@@ -270,7 +254,6 @@ export declare const defineBlocksWithJsonArray: typeof common.defineBlocksWithJs
|
|
|
270
254
|
*
|
|
271
255
|
* @param container The container element.
|
|
272
256
|
* @see Blockly.common.setParentContainer
|
|
273
|
-
* @alias Blockly.setParentContainer
|
|
274
257
|
*/
|
|
275
258
|
export declare const setParentContainer: typeof common.setParentContainer;
|
|
276
259
|
/**
|
|
@@ -280,7 +263,6 @@ export declare const setParentContainer: typeof common.setParentContainer;
|
|
|
280
263
|
* @param workspace The workspace to resize.
|
|
281
264
|
* @deprecated Use **workspace.resizeContents** instead.
|
|
282
265
|
* @see Blockly.WorkspaceSvg.resizeContents
|
|
283
|
-
* @alias Blockly.resizeSvgContents
|
|
284
266
|
*/
|
|
285
267
|
declare function resizeSvgContentsLocal(workspace: WorkspaceSvg): void;
|
|
286
268
|
export declare const resizeSvgContents: typeof resizeSvgContentsLocal;
|
|
@@ -290,7 +272,6 @@ export declare const resizeSvgContents: typeof resizeSvgContentsLocal;
|
|
|
290
272
|
* @param toCopy Block or Workspace Comment to be copied.
|
|
291
273
|
* @deprecated Use **Blockly.clipboard.copy** instead.
|
|
292
274
|
* @see Blockly.clipboard.copy
|
|
293
|
-
* @alias Blockly.copy
|
|
294
275
|
*/
|
|
295
276
|
export declare function copy(toCopy: ICopyable): void;
|
|
296
277
|
/**
|
|
@@ -299,7 +280,6 @@ export declare function copy(toCopy: ICopyable): void;
|
|
|
299
280
|
* @returns True if the paste was successful, false otherwise.
|
|
300
281
|
* @deprecated Use **Blockly.clipboard.paste** instead.
|
|
301
282
|
* @see Blockly.clipboard.paste
|
|
302
|
-
* @alias Blockly.paste
|
|
303
283
|
*/
|
|
304
284
|
export declare function paste(): boolean;
|
|
305
285
|
/**
|
|
@@ -308,7 +288,6 @@ export declare function paste(): boolean;
|
|
|
308
288
|
* @param toDuplicate Block or Workspace Comment to be copied.
|
|
309
289
|
* @deprecated Use **Blockly.clipboard.duplicate** instead.
|
|
310
290
|
* @see Blockly.clipboard.duplicate
|
|
311
|
-
* @alias Blockly.duplicate
|
|
312
291
|
*/
|
|
313
292
|
export declare function duplicate(toDuplicate: ICopyable): void;
|
|
314
293
|
/**
|
|
@@ -318,7 +297,6 @@ export declare function duplicate(toDuplicate: ICopyable): void;
|
|
|
318
297
|
* @returns True if number, false otherwise.
|
|
319
298
|
* @deprecated Use **Blockly.utils.string.isNumber** instead.
|
|
320
299
|
* @see Blockly.utils.string.isNumber
|
|
321
|
-
* @alias Blockly.isNumber
|
|
322
300
|
*/
|
|
323
301
|
export declare function isNumber(str: string): boolean;
|
|
324
302
|
/**
|
|
@@ -328,7 +306,6 @@ export declare function isNumber(str: string): boolean;
|
|
|
328
306
|
* @returns RGB code, e.g. '#5ba65b'.
|
|
329
307
|
* @deprecated Use **Blockly.utils.colour.hueToHex** instead.
|
|
330
308
|
* @see Blockly.utils.colour.hueToHex
|
|
331
|
-
* @alias Blockly.hueToHex
|
|
332
309
|
*/
|
|
333
310
|
export declare function hueToHex(hue: number): string;
|
|
334
311
|
/**
|
|
@@ -344,7 +321,6 @@ export declare function hueToHex(hue: number): string;
|
|
|
344
321
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
345
322
|
* @deprecated Use **Blockly.browserEvents.bind** instead.
|
|
346
323
|
* @see Blockly.browserEvents.bind
|
|
347
|
-
* @alias Blockly.bindEvent_
|
|
348
324
|
*/
|
|
349
325
|
export declare function bindEvent_(node: EventTarget, name: string, thisObject: Object | null, func: Function): browserEvents.Data;
|
|
350
326
|
/**
|
|
@@ -355,7 +331,6 @@ export declare function bindEvent_(node: EventTarget, name: string, thisObject:
|
|
|
355
331
|
* @returns The function call.
|
|
356
332
|
* @deprecated Use **Blockly.browserEvents.unbind** instead.
|
|
357
333
|
* @see browserEvents.unbind
|
|
358
|
-
* @alias Blockly.unbindEvent_
|
|
359
334
|
*/
|
|
360
335
|
export declare function unbindEvent_(bindData: browserEvents.Data): Function;
|
|
361
336
|
/**
|
|
@@ -375,7 +350,6 @@ export declare function unbindEvent_(bindData: browserEvents.Data): Function;
|
|
|
375
350
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
376
351
|
* @deprecated Use **Blockly.browserEvents.conditionalBind** instead.
|
|
377
352
|
* @see browserEvents.conditionalBind
|
|
378
|
-
* @alias Blockly.bindEventWithChecks_
|
|
379
353
|
*/
|
|
380
354
|
export declare function bindEventWithChecks_(node: EventTarget, name: string, thisObject: Object | null, func: Function, opt_noCaptureIdentifier?: boolean, _opt_noPreventDefault?: boolean): browserEvents.Data;
|
|
381
355
|
export declare const COLLAPSE_CHARS = 30;
|
|
@@ -389,24 +363,18 @@ export declare const COLLAPSED_FIELD_NAME = "_TEMP_COLLAPSED_FIELD";
|
|
|
389
363
|
* String for use in the "custom" attribute of a category in toolbox XML.
|
|
390
364
|
* This string indicates that the category should be dynamically populated with
|
|
391
365
|
* variable blocks.
|
|
392
|
-
*
|
|
393
|
-
* @alias Blockly.VARIABLE_CATEGORY_NAME
|
|
394
366
|
*/
|
|
395
367
|
export declare const VARIABLE_CATEGORY_NAME: string;
|
|
396
368
|
/**
|
|
397
369
|
* String for use in the "custom" attribute of a category in toolbox XML.
|
|
398
370
|
* This string indicates that the category should be dynamically populated with
|
|
399
371
|
* variable blocks.
|
|
400
|
-
*
|
|
401
|
-
* @alias Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME
|
|
402
372
|
*/
|
|
403
373
|
export declare const VARIABLE_DYNAMIC_CATEGORY_NAME: string;
|
|
404
374
|
/**
|
|
405
375
|
* String for use in the "custom" attribute of a category in toolbox XML.
|
|
406
376
|
* This string indicates that the category should be dynamically populated with
|
|
407
377
|
* procedure blocks.
|
|
408
|
-
*
|
|
409
|
-
* @alias Blockly.PROCEDURE_CATEGORY_NAME
|
|
410
378
|
*/
|
|
411
379
|
export declare const PROCEDURE_CATEGORY_NAME: string;
|
|
412
380
|
export { browserEvents };
|
|
@@ -445,6 +413,7 @@ export { BasicCursor };
|
|
|
445
413
|
export { Block };
|
|
446
414
|
export { BlocklyOptions };
|
|
447
415
|
export { BlockDragger };
|
|
416
|
+
export { BlockDragSurfaceSvg };
|
|
448
417
|
export { BlockSvg };
|
|
449
418
|
export { Blocks };
|
|
450
419
|
export { Bubble };
|
|
@@ -461,18 +430,18 @@ export { Cursor };
|
|
|
461
430
|
export { DeleteArea };
|
|
462
431
|
export { DragTarget };
|
|
463
432
|
export declare const DropDownDiv: typeof dropDownDiv;
|
|
464
|
-
export { Field, FieldValidator };
|
|
465
|
-
export { FieldAngle, FieldAngleValidator };
|
|
466
|
-
export { FieldCheckbox, FieldCheckboxValidator };
|
|
467
|
-
export { FieldColour, FieldColourValidator };
|
|
468
|
-
export { FieldDropdown, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption, };
|
|
469
|
-
export { FieldImage };
|
|
470
|
-
export { FieldLabel };
|
|
433
|
+
export { Field, FieldConfig, FieldValidator, UnattachedFieldError };
|
|
434
|
+
export { FieldAngle, FieldAngleConfig, FieldAngleFromJsonConfig, FieldAngleValidator, };
|
|
435
|
+
export { FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator, };
|
|
436
|
+
export { FieldColour, FieldColourConfig, FieldColourFromJsonConfig, FieldColourValidator, };
|
|
437
|
+
export { FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption, };
|
|
438
|
+
export { FieldImage, FieldImageConfig, FieldImageFromJsonConfig };
|
|
439
|
+
export { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig };
|
|
471
440
|
export { FieldLabelSerializable };
|
|
472
|
-
export { FieldMultilineInput, FieldMultilineInputValidator };
|
|
473
|
-
export { FieldNumber, FieldNumberValidator };
|
|
474
|
-
export { FieldTextInput, FieldTextInputValidator };
|
|
475
|
-
export { FieldVariable, FieldVariableValidator };
|
|
441
|
+
export { FieldMultilineInput, FieldMultilineInputConfig, FieldMultilineInputFromJsonConfig, FieldMultilineInputValidator, };
|
|
442
|
+
export { FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator, };
|
|
443
|
+
export { FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator, };
|
|
444
|
+
export { FieldVariable, FieldVariableConfig, FieldVariableFromJsonConfig, FieldVariableValidator, };
|
|
476
445
|
export { Flyout };
|
|
477
446
|
export { FlyoutButton };
|
|
478
447
|
export { FlyoutMetricsManager };
|
|
@@ -513,6 +482,7 @@ export { ISelectableToolboxItem };
|
|
|
513
482
|
export { IStyleable };
|
|
514
483
|
export { IToolbox };
|
|
515
484
|
export { IToolboxItem };
|
|
485
|
+
export { IVariableBackedParameterModel, isVariableBackedParameterModel };
|
|
516
486
|
export { Marker };
|
|
517
487
|
export { MarkerManager };
|
|
518
488
|
export { Menu };
|
|
@@ -542,6 +512,7 @@ export { Workspace };
|
|
|
542
512
|
export { WorkspaceAudio };
|
|
543
513
|
export { WorkspaceComment };
|
|
544
514
|
export { WorkspaceCommentSvg };
|
|
515
|
+
export { WorkspaceDragSurfaceSvg };
|
|
545
516
|
export { WorkspaceDragger };
|
|
546
517
|
export { WorkspaceSvg };
|
|
547
518
|
export { ZoomControls };
|
package/core/blocks.d.ts
CHANGED
package/core/browser_events.d.ts
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Blockly opaque event data used to unbind events when using
|
|
8
8
|
* `bind` and `conditionalBind`.
|
|
9
|
-
*
|
|
10
|
-
* @alias Blockly.browserEvents.Data
|
|
11
9
|
*/
|
|
12
10
|
export type Data = [EventTarget, string, (e: Event) => void][];
|
|
13
11
|
/**
|
|
@@ -25,7 +23,6 @@ export type Data = [EventTarget, string, (e: Event) => void][];
|
|
|
25
23
|
* simultaneous touches. False by default.
|
|
26
24
|
* @param opt_noPreventDefault No-op, deprecated and will be removed in v10.
|
|
27
25
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
28
|
-
* @alias Blockly.browserEvents.conditionalBind
|
|
29
26
|
*/
|
|
30
27
|
export declare function conditionalBind(node: EventTarget, name: string, thisObject: Object | null, func: Function, opt_noCaptureIdentifier?: boolean, opt_noPreventDefault?: boolean): Data;
|
|
31
28
|
/**
|
|
@@ -39,7 +36,6 @@ export declare function conditionalBind(node: EventTarget, name: string, thisObj
|
|
|
39
36
|
* @param thisObject The value of 'this' in the function.
|
|
40
37
|
* @param func Function to call when event is triggered.
|
|
41
38
|
* @returns Opaque data that can be passed to unbindEvent_.
|
|
42
|
-
* @alias Blockly.browserEvents.bind
|
|
43
39
|
*/
|
|
44
40
|
export declare function bind(node: EventTarget, name: string, thisObject: Object | null, func: Function): Data;
|
|
45
41
|
/**
|
|
@@ -48,7 +44,6 @@ export declare function bind(node: EventTarget, name: string, thisObject: Object
|
|
|
48
44
|
* @param bindData Opaque data from bindEvent_.
|
|
49
45
|
* This list is emptied during the course of calling this function.
|
|
50
46
|
* @returns The function call.
|
|
51
|
-
* @alias Blockly.browserEvents.unbind
|
|
52
47
|
*/
|
|
53
48
|
export declare function unbind(bindData: Data): (e: Event) => void;
|
|
54
49
|
/**
|
|
@@ -56,7 +51,6 @@ export declare function unbind(bindData: Data): (e: Event) => void;
|
|
|
56
51
|
*
|
|
57
52
|
* @param e An event.
|
|
58
53
|
* @returns True if text input.
|
|
59
|
-
* @alias Blockly.browserEvents.isTargetInput
|
|
60
54
|
*/
|
|
61
55
|
export declare function isTargetInput(e: Event): boolean;
|
|
62
56
|
/**
|
|
@@ -64,7 +58,6 @@ export declare function isTargetInput(e: Event): boolean;
|
|
|
64
58
|
*
|
|
65
59
|
* @param e Mouse event.
|
|
66
60
|
* @returns True if right-click.
|
|
67
|
-
* @alias Blockly.browserEvents.isRightButton
|
|
68
61
|
*/
|
|
69
62
|
export declare function isRightButton(e: MouseEvent): boolean;
|
|
70
63
|
/**
|
|
@@ -75,7 +68,6 @@ export declare function isRightButton(e: MouseEvent): boolean;
|
|
|
75
68
|
* @param svg SVG element.
|
|
76
69
|
* @param matrix Inverted screen CTM to use.
|
|
77
70
|
* @returns Object with .x and .y properties.
|
|
78
|
-
* @alias Blockly.browserEvents.mouseToSvg
|
|
79
71
|
*/
|
|
80
72
|
export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
|
|
81
73
|
/**
|
|
@@ -83,7 +75,6 @@ export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SV
|
|
|
83
75
|
*
|
|
84
76
|
* @param e Mouse event.
|
|
85
77
|
* @returns Scroll delta object with .x and .y properties.
|
|
86
|
-
* @alias Blockly.browserEvents.getScrollDeltaPixels
|
|
87
78
|
*/
|
|
88
79
|
export declare function getScrollDeltaPixels(e: WheelEvent): {
|
|
89
80
|
x: number;
|
package/core/bubble.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2012 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
6
7
|
import type { BlockSvg } from './block_svg.js';
|
|
7
8
|
import type { IBubble } from './interfaces/i_bubble.js';
|
|
8
9
|
import { Coordinate } from './utils/coordinate.js';
|
|
@@ -10,8 +11,6 @@ import { Size } from './utils/size.js';
|
|
|
10
11
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
11
12
|
/**
|
|
12
13
|
* Class for UI bubble.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Bubble
|
|
15
14
|
*/
|
|
16
15
|
export declare class Bubble implements IBubble {
|
|
17
16
|
/** Width of the border around the bubble. */
|
|
@@ -253,12 +252,15 @@ export declare class Bubble implements IBubble {
|
|
|
253
252
|
/** Dispose of this bubble. */
|
|
254
253
|
dispose(): void;
|
|
255
254
|
/**
|
|
256
|
-
* Move this bubble during a drag
|
|
255
|
+
* Move this bubble during a drag, taking into account whether or not there is
|
|
256
|
+
* a drag surface.
|
|
257
257
|
*
|
|
258
|
+
* @param dragSurface The surface that carries rendered items during a drag,
|
|
259
|
+
* or null if no drag surface is in use.
|
|
258
260
|
* @param newLoc The location to translate to, in workspace coordinates.
|
|
259
261
|
* @internal
|
|
260
262
|
*/
|
|
261
|
-
moveDuringDrag(newLoc: Coordinate): void;
|
|
263
|
+
moveDuringDrag(dragSurface: BlockDragSurfaceSvg, newLoc: Coordinate): void;
|
|
262
264
|
/**
|
|
263
265
|
* Return the coordinates of the top-left corner of this bubble's body
|
|
264
266
|
* relative to the drawing surface's origin (0,0), in workspace units.
|
package/core/bubble_dragger.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
10
10
|
* Class for a bubble dragger. It moves things on the bubble canvas around the
|
|
11
11
|
* workspace when they are being dragged by a mouse or touch. These can be
|
|
12
12
|
* block comments, mutators, warnings, or workspace comments.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.BubbleDragger
|
|
15
13
|
*/
|
|
16
14
|
export declare class BubbleDragger {
|
|
17
15
|
private bubble;
|
|
@@ -21,13 +19,14 @@ export declare class BubbleDragger {
|
|
|
21
19
|
/** Whether the bubble would be deleted if dropped immediately. */
|
|
22
20
|
private wouldDeleteBubble_;
|
|
23
21
|
private readonly startXY_;
|
|
22
|
+
private dragSurface_;
|
|
24
23
|
/**
|
|
25
24
|
* @param bubble The item on the bubble canvas to drag.
|
|
26
25
|
* @param workspace The workspace to drag on.
|
|
27
26
|
*/
|
|
28
27
|
constructor(bubble: IBubble, workspace: WorkspaceSvg);
|
|
29
28
|
/**
|
|
30
|
-
* Start dragging a bubble.
|
|
29
|
+
* Start dragging a bubble. This includes moving it to the drag surface.
|
|
31
30
|
*
|
|
32
31
|
* @internal
|
|
33
32
|
*/
|
package/core/bump_objects.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
15
15
|
* in workspace coordinates.
|
|
16
16
|
* @param object The object to bump.
|
|
17
17
|
* @returns True if block was bumped.
|
|
18
|
-
* @alias Blockly.bumpObjects.bumpIntoBounds
|
|
19
18
|
*/
|
|
20
19
|
declare function bumpObjectIntoBounds(workspace: WorkspaceSvg, scrollMetrics: ContainerRegion, object: IBoundedElement): boolean;
|
|
21
20
|
export declare const bumpIntoBounds: typeof bumpObjectIntoBounds;
|
|
@@ -24,14 +23,12 @@ export declare const bumpIntoBounds: typeof bumpObjectIntoBounds;
|
|
|
24
23
|
*
|
|
25
24
|
* @param workspace The workspace to handle.
|
|
26
25
|
* @returns The event handler.
|
|
27
|
-
* @alias Blockly.bumpObjects.bumpIntoBoundsHandler
|
|
28
26
|
*/
|
|
29
27
|
export declare function bumpIntoBoundsHandler(workspace: WorkspaceSvg): (p1: Abstract) => void;
|
|
30
28
|
/**
|
|
31
29
|
* Bumps the top objects in the given workspace into bounds.
|
|
32
30
|
*
|
|
33
31
|
* @param workspace The workspace.
|
|
34
|
-
* @alias Blockly.bumpObjects.bumpTopObjectsIntoBounds
|
|
35
32
|
*/
|
|
36
33
|
export declare function bumpTopObjectsIntoBounds(workspace: WorkspaceSvg): void;
|
|
37
34
|
export {};
|
package/core/clipboard.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import type { ICopyable } from './interfaces/i_copyable.js';
|
|
|
8
8
|
* Copy a block or workspace comment onto the local clipboard.
|
|
9
9
|
*
|
|
10
10
|
* @param toCopy Block or Workspace Comment to be copied.
|
|
11
|
-
* @alias Blockly.clipboard.copy
|
|
12
11
|
* @internal
|
|
13
12
|
*/
|
|
14
13
|
export declare function copy(toCopy: ICopyable): void;
|
|
@@ -20,7 +19,6 @@ declare function copyInternal(toCopy: ICopyable): void;
|
|
|
20
19
|
* Paste a block or workspace comment on to the main workspace.
|
|
21
20
|
*
|
|
22
21
|
* @returns The pasted thing if the paste was successful, null otherwise.
|
|
23
|
-
* @alias Blockly.clipboard.paste
|
|
24
22
|
* @internal
|
|
25
23
|
*/
|
|
26
24
|
export declare function paste(): ICopyable | null;
|
|
@@ -30,7 +28,6 @@ export declare function paste(): ICopyable | null;
|
|
|
30
28
|
* @param toDuplicate Block or Workspace Comment to be duplicated.
|
|
31
29
|
* @returns The block or workspace comment that was duplicated, or null if the
|
|
32
30
|
* duplication failed.
|
|
33
|
-
* @alias Blockly.clipboard.duplicate
|
|
34
31
|
* @internal
|
|
35
32
|
*/
|
|
36
33
|
export declare function duplicate(toDuplicate: ICopyable): ICopyable | null;
|
package/core/comment.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import { Icon } from './icon.js';
|
|
|
10
10
|
import type { Size } from './utils/size.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for a comment.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Comment
|
|
15
13
|
*/
|
|
16
14
|
export declare class Comment extends Icon {
|
|
17
15
|
private readonly model;
|
|
@@ -20,14 +18,12 @@ export declare class Comment extends Icon {
|
|
|
20
18
|
* Used to tell if an event should be fired at the end of an edit.
|
|
21
19
|
*/
|
|
22
20
|
private cachedText;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
/** Input event data. */
|
|
30
|
-
private onInputWrapper;
|
|
21
|
+
/**
|
|
22
|
+
* Array holding info needed to unbind events.
|
|
23
|
+
* Used for disposing.
|
|
24
|
+
* Ex: [[node, name, func], [node, name, func]].
|
|
25
|
+
*/
|
|
26
|
+
private boundEvents;
|
|
31
27
|
/**
|
|
32
28
|
* The SVG element that contains the text edit area, or null if not created.
|
|
33
29
|
*/
|
package/core/common.d.ts
CHANGED
|
@@ -40,20 +40,16 @@ export declare function unregisterWorkpace(workspace: Workspace): void;
|
|
|
40
40
|
* page.
|
|
41
41
|
*
|
|
42
42
|
* @returns The main workspace.
|
|
43
|
-
* @alias Blockly.common.getMainWorkspace
|
|
44
43
|
*/
|
|
45
44
|
export declare function getMainWorkspace(): Workspace;
|
|
46
45
|
/**
|
|
47
46
|
* Sets last used main workspace.
|
|
48
47
|
*
|
|
49
48
|
* @param workspace The most recently used top level workspace.
|
|
50
|
-
* @alias Blockly.common.setMainWorkspace
|
|
51
49
|
*/
|
|
52
50
|
export declare function setMainWorkspace(workspace: Workspace): void;
|
|
53
51
|
/**
|
|
54
52
|
* Returns the currently selected copyable object.
|
|
55
|
-
*
|
|
56
|
-
* @alias Blockly.common.getSelected
|
|
57
53
|
*/
|
|
58
54
|
export declare function getSelected(): ICopyable | null;
|
|
59
55
|
/**
|
|
@@ -62,7 +58,6 @@ export declare function getSelected(): ICopyable | null;
|
|
|
62
58
|
* programmatically select a block, use `BlockSvg#select`.
|
|
63
59
|
*
|
|
64
60
|
* @param newSelection The newly selected block.
|
|
65
|
-
* @alias Blockly.common.setSelected
|
|
66
61
|
* @internal
|
|
67
62
|
*/
|
|
68
63
|
export declare function setSelected(newSelection: ICopyable | null): void;
|
|
@@ -71,7 +66,6 @@ export declare function setSelected(newSelection: ICopyable | null): void;
|
|
|
71
66
|
* Tooltip.
|
|
72
67
|
*
|
|
73
68
|
* @returns The parent container.
|
|
74
|
-
* @alias Blockly.common.getParentContainer
|
|
75
69
|
*/
|
|
76
70
|
export declare function getParentContainer(): Element | null;
|
|
77
71
|
/**
|
|
@@ -81,7 +75,6 @@ export declare function getParentContainer(): Element | null;
|
|
|
81
75
|
* This method is a NOP if called after the first `Blockly.inject`.
|
|
82
76
|
*
|
|
83
77
|
* @param newParent The container element.
|
|
84
|
-
* @alias Blockly.common.setParentContainer
|
|
85
78
|
*/
|
|
86
79
|
export declare function setParentContainer(newParent: Element): void;
|
|
87
80
|
/**
|
|
@@ -92,7 +85,6 @@ export declare function setParentContainer(newParent: Element): void;
|
|
|
92
85
|
* Record the height/width of the SVG image.
|
|
93
86
|
*
|
|
94
87
|
* @param workspace Any workspace in the SVG.
|
|
95
|
-
* @alias Blockly.common.svgResize
|
|
96
88
|
*/
|
|
97
89
|
export declare function svgResize(workspace: WorkspaceSvg): void;
|
|
98
90
|
/**
|
|
@@ -108,7 +100,6 @@ export declare const draggingConnections: Connection[];
|
|
|
108
100
|
* statements (blocks that are not inside a value or statement input
|
|
109
101
|
* of the block).
|
|
110
102
|
* @returns Map of types to type counts for descendants of the bock.
|
|
111
|
-
* @alias Blockly.common.getBlockTypeCounts
|
|
112
103
|
*/
|
|
113
104
|
export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: boolean): {
|
|
114
105
|
[key: string]: number;
|
|
@@ -118,7 +109,6 @@ export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: bo
|
|
|
118
109
|
* by the Blockly Developer Tools.
|
|
119
110
|
*
|
|
120
111
|
* @param jsonArray An array of JSON block definitions.
|
|
121
|
-
* @alias Blockly.common.defineBlocksWithJsonArray
|
|
122
112
|
*/
|
|
123
113
|
export declare function defineBlocksWithJsonArray(jsonArray: any[]): void;
|
|
124
114
|
/**
|
|
@@ -132,7 +122,6 @@ declare function defineBlocksWithJsonArrayInternal(jsonArray: any[]): void;
|
|
|
132
122
|
* @param jsonArray An array of JSON block definitions.
|
|
133
123
|
* @returns A map of the block
|
|
134
124
|
* definitions created.
|
|
135
|
-
* @alias Blockly.common.defineBlocksWithJsonArray
|
|
136
125
|
*/
|
|
137
126
|
export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
|
|
138
127
|
[key: string]: BlockDefinition;
|
|
@@ -143,7 +132,6 @@ export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
|
|
|
143
132
|
*
|
|
144
133
|
* @param blocks A map of block
|
|
145
134
|
* type names to block definitions.
|
|
146
|
-
* @alias Blockly.common.defineBlocks
|
|
147
135
|
*/
|
|
148
136
|
export declare function defineBlocks(blocks: {
|
|
149
137
|
[key: string]: BlockDefinition;
|
package/core/connection.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
|
|
|
10
10
|
import * as blocks from './serialization/blocks.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for a connection between blocks.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Connection
|
|
15
13
|
*/
|
|
16
14
|
export declare class Connection implements IASTNodeLocationWithBlock {
|
|
17
15
|
type: number;
|
|
@@ -111,15 +109,30 @@ export declare class Connection implements IASTNodeLocationWithBlock {
|
|
|
111
109
|
* @returns Whether the the blocks are now connected or not.
|
|
112
110
|
*/
|
|
113
111
|
connect(otherConnection: Connection): boolean;
|
|
114
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Disconnect this connection.
|
|
114
|
+
*/
|
|
115
115
|
disconnect(): void;
|
|
116
116
|
/**
|
|
117
117
|
* Disconnect two blocks that are connected by this connection.
|
|
118
118
|
*
|
|
119
|
-
* @param
|
|
120
|
-
*
|
|
119
|
+
* @param setParent Whether to set the parent of the disconnected block or
|
|
120
|
+
* not, defaults to true.
|
|
121
|
+
* If you do not set the parent, ensure that a subsequent action does,
|
|
122
|
+
* otherwise the view and model will be out of sync.
|
|
123
|
+
*/
|
|
124
|
+
protected disconnectInternal(setParent?: boolean): void;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the parent connection (superior) and child connection (inferior)
|
|
127
|
+
* given this connection and the connection it is connected to.
|
|
128
|
+
*
|
|
129
|
+
* @returns The parent connection and child connection, given this connection
|
|
130
|
+
* and the connection it is connected to.
|
|
121
131
|
*/
|
|
122
|
-
protected
|
|
132
|
+
protected getParentAndChildConnections(): {
|
|
133
|
+
parentConnection?: Connection;
|
|
134
|
+
childConnection?: Connection;
|
|
135
|
+
};
|
|
123
136
|
/**
|
|
124
137
|
* Respawn the shadow block if there was one connected to the this connection.
|
|
125
138
|
*/
|