blockly 9.2.1 → 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 +1615 -1509
- package/blockly_compressed.js +1249 -1136
- 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_dragger.d.ts +1 -6
- package/core/block_svg.d.ts +58 -8
- package/core/blockly.d.ts +27 -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 +0 -2
- package/core/bubble_dragger.d.ts +0 -2
- 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.d.ts +2 -22
- package/core/events/events_abstract.d.ts +7 -3
- package/core/events/events_block_base.d.ts +2 -3
- package/core/events/events_block_change.d.ts +9 -3
- package/core/events/events_block_create.d.ts +6 -4
- package/core/events/events_block_delete.d.ts +7 -4
- package/core/events/events_block_drag.d.ts +7 -3
- package/core/events/events_block_move.d.ts +20 -3
- package/core/events/events_bubble_open.d.ts +3 -2
- package/core/events/events_click.d.ts +6 -3
- package/core/events/events_comment_base.d.ts +1 -2
- package/core/events/events_comment_change.d.ts +3 -3
- package/core/events/events_comment_create.d.ts +2 -3
- package/core/events/events_comment_delete.d.ts +2 -3
- package/core/events/events_comment_move.d.ts +4 -4
- package/core/events/events_marker_move.d.ts +10 -3
- package/core/events/events_selected.d.ts +6 -2
- package/core/events/events_theme_change.d.ts +2 -3
- package/core/events/events_toolbox_item_select.d.ts +3 -3
- package/core/events/events_trashcan_open.d.ts +5 -3
- 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 +1 -2
- package/core/events/events_var_create.d.ts +3 -3
- package/core/events/events_var_delete.d.ts +4 -2
- package/core/events/events_var_rename.d.ts +4 -2
- package/core/events/events_viewport.d.ts +13 -2
- package/core/events/utils.d.ts +0 -89
- package/core/events/workspace_events.d.ts +2 -6
- package/core/extensions.d.ts +0 -8
- package/core/field.d.ts +55 -21
- package/core/field_angle.d.ts +61 -51
- package/core/field_checkbox.d.ts +34 -15
- package/core/field_colour.d.ts +56 -46
- package/core/field_dropdown.d.ts +35 -19
- package/core/field_image.d.ts +10 -14
- package/core/field_input.d.ts +39 -25
- package/core/field_label.d.ts +7 -10
- package/core/field_label_serializable.d.ts +4 -6
- package/core/field_multilineinput.d.ts +36 -14
- package/core/field_number.d.ts +27 -19
- package/core/field_registry.d.ts +0 -3
- package/core/field_textinput.d.ts +36 -8
- package/core/field_variable.d.ts +30 -18
- 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 +5 -18
- 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 +0 -2
- package/core/interfaces/i_bounded_element.d.ts +0 -2
- package/core/interfaces/i_bubble.d.ts +0 -2
- 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 +8 -8
- package/core/interfaces/i_movable.d.ts +0 -2
- package/core/interfaces/i_positionable.d.ts +0 -2
- package/core/interfaces/i_procedure_block.d.ts +3 -0
- 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 +8 -8
- package/core/mutator.d.ts +0 -2
- package/core/names.d.ts +0 -3
- package/core/{procedures/observable_procedure_map.d.ts → observable_procedure_map.d.ts} +4 -5
- package/core/options.d.ts +0 -2
- package/core/positionable_helpers.d.ts +0 -7
- package/core/procedures.d.ts +7 -28
- 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/procedures.d.ts +0 -7
- 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 +1 -3
- package/core/workspace_dragger.d.ts +0 -2
- package/core/workspace_svg.d.ts +4 -7
- 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 +9 -9
- 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/events/events_procedure_base.d.ts +0 -26
- package/core/events/events_procedure_change_return.d.ts +0 -40
- package/core/events/events_procedure_create.d.ts +0 -34
- package/core/events/events_procedure_delete.d.ts +0 -32
- package/core/events/events_procedure_enable.d.ts +0 -34
- package/core/events/events_procedure_parameter_base.d.ts +0 -26
- package/core/events/events_procedure_parameter_create.d.ts +0 -42
- package/core/events/events_procedure_parameter_delete.d.ts +0 -41
- package/core/events/events_procedure_parameter_rename.d.ts +0 -36
- package/core/events/events_procedure_rename.d.ts +0 -35
- package/core/procedures/observable_parameter_model.d.ts +0 -62
- package/core/procedures/observable_procedure_model.d.ts +0 -75
- package/core/procedures/update_procedures.d.ts +0 -13
- package/core/utils/sentinel.d.ts +0 -13
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
import type { Workspace } from '../workspace.js';
|
|
7
7
|
/**
|
|
8
8
|
* Abstract class for an event.
|
|
9
|
-
*
|
|
10
|
-
* @alias Blockly.Events.Abstract
|
|
11
9
|
*/
|
|
12
10
|
export declare abstract class Abstract {
|
|
13
11
|
/**
|
|
@@ -17,13 +15,19 @@ export declare abstract class Abstract {
|
|
|
17
15
|
abstract isBlank: boolean;
|
|
18
16
|
/** The workspace identifier for this event. */
|
|
19
17
|
workspaceId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* An ID for the group of events this block is associated with.
|
|
20
|
+
*
|
|
21
|
+
* Groups define events that should be treated as an single action from the
|
|
22
|
+
* user's perspective, and should be undone together.
|
|
23
|
+
*/
|
|
20
24
|
group: string;
|
|
25
|
+
/** Whether this event is undoable or not. */
|
|
21
26
|
recordUndo: boolean;
|
|
22
27
|
/** Whether or not the event is a UI event. */
|
|
23
28
|
isUiEvent: boolean;
|
|
24
29
|
/** Type of this event. */
|
|
25
30
|
type: string;
|
|
26
|
-
/** @alias Blockly.Events.Abstract */
|
|
27
31
|
constructor();
|
|
28
32
|
/**
|
|
29
33
|
* Encode the event as JSON.
|
|
@@ -7,12 +7,11 @@ import type { Block } from '../block.js';
|
|
|
7
7
|
import type { Workspace } from '../workspace.js';
|
|
8
8
|
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
9
9
|
/**
|
|
10
|
-
* Abstract class for
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.BlockBase
|
|
10
|
+
* Abstract class for any event related to blocks.
|
|
13
11
|
*/
|
|
14
12
|
export declare class BlockBase extends AbstractEvent {
|
|
15
13
|
isBlank: boolean;
|
|
14
|
+
/** The ID of the block associated with this event. */
|
|
16
15
|
blockId?: string;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_block The block this event corresponds to.
|
|
@@ -8,15 +8,21 @@ import type { BlockSvg } from '../block_svg.js';
|
|
|
8
8
|
import { Workspace } from '../workspace.js';
|
|
9
9
|
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BlockChange
|
|
11
|
+
* Notifies listeners when some element of a block has changed (e.g.
|
|
12
|
+
* field values, comments, etc).
|
|
14
13
|
*/
|
|
15
14
|
export declare class BlockChange extends BlockBase {
|
|
16
15
|
type: string;
|
|
16
|
+
/**
|
|
17
|
+
* The element that changed; one of 'field', 'comment', 'collapsed',
|
|
18
|
+
* 'disabled', 'inline', or 'mutation'
|
|
19
|
+
*/
|
|
17
20
|
element?: string;
|
|
21
|
+
/** The name of the field that changed, if this is a change to a field. */
|
|
18
22
|
name?: string;
|
|
23
|
+
/** The original value of the element. */
|
|
19
24
|
oldValue: unknown;
|
|
25
|
+
/** The new value of the element. */
|
|
20
26
|
newValue: unknown;
|
|
21
27
|
/**
|
|
22
28
|
* @param opt_block The changed block. Undefined for a blank event.
|
|
@@ -8,15 +8,17 @@ import * as blocks from '../serialization/blocks.js';
|
|
|
8
8
|
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
import { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BlockCreate
|
|
11
|
+
* Notifies listeners when a block (or connected stack of blocks) is
|
|
12
|
+
* created.
|
|
14
13
|
*/
|
|
15
14
|
export declare class BlockCreate extends BlockBase {
|
|
16
15
|
type: string;
|
|
16
|
+
/** The XML representation of the created block(s). */
|
|
17
17
|
xml?: Element | DocumentFragment;
|
|
18
|
-
|
|
18
|
+
/** The JSON respresentation of the created block(s). */
|
|
19
19
|
json?: blocks.State;
|
|
20
|
+
/** All of the IDs of created blocks. */
|
|
21
|
+
ids?: string[];
|
|
20
22
|
/** @param opt_block The created block. Undefined for a blank event. */
|
|
21
23
|
constructor(opt_block?: Block);
|
|
22
24
|
/**
|
|
@@ -8,15 +8,18 @@ import * as blocks from '../serialization/blocks.js';
|
|
|
8
8
|
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
import { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BlockDelete
|
|
11
|
+
* Notifies listeners when a block (or connected stack of blocks) is
|
|
12
|
+
* deleted.
|
|
14
13
|
*/
|
|
15
14
|
export declare class BlockDelete extends BlockBase {
|
|
15
|
+
/** The XML representation of the deleted block(s). */
|
|
16
16
|
oldXml?: Element | DocumentFragment;
|
|
17
|
+
/** The JSON respresentation of the deleted block(s). */
|
|
18
|
+
oldJson?: blocks.State;
|
|
19
|
+
/** All of the IDs of deleted blocks. */
|
|
17
20
|
ids?: string[];
|
|
21
|
+
/** True if the deleted block was a shadow block, false otherwise. */
|
|
18
22
|
wasShadow?: boolean;
|
|
19
|
-
oldJson?: blocks.State;
|
|
20
23
|
type: string;
|
|
21
24
|
/** @param opt_block The deleted block. Undefined for a blank event. */
|
|
22
25
|
constructor(opt_block?: Block);
|
|
@@ -8,13 +8,17 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
8
8
|
import { UiBase } from './events_ui_base.js';
|
|
9
9
|
import { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BlockDrag
|
|
11
|
+
* Notifies listeners when a block is being manually dragged/dropped.
|
|
14
12
|
*/
|
|
15
13
|
export declare class BlockDrag extends UiBase {
|
|
14
|
+
/** The ID of the top-level block being dragged. */
|
|
16
15
|
blockId?: string;
|
|
16
|
+
/** True if this is the start of a drag, false if this is the end of one. */
|
|
17
17
|
isStart?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* A list of all of the blocks (i.e. all descendants of the block associated
|
|
20
|
+
* with the block ID) being dragged.
|
|
21
|
+
*/
|
|
18
22
|
blocks?: Block[];
|
|
19
23
|
type: string;
|
|
20
24
|
/**
|
|
@@ -8,17 +8,34 @@ import { Coordinate } from '../utils/coordinate.js';
|
|
|
8
8
|
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
import type { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BlockMove
|
|
11
|
+
* Notifies listeners when a block is moved. This could be from one
|
|
12
|
+
* connection to another, or from one location on the workspace to another.
|
|
14
13
|
*/
|
|
15
14
|
export declare class BlockMove extends BlockBase {
|
|
16
15
|
type: string;
|
|
16
|
+
/** The ID of the old parent block. Undefined if it was a top-level block. */
|
|
17
17
|
oldParentId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the old input. Undefined if it was a top-level block or the
|
|
20
|
+
* parent's next block.
|
|
21
|
+
*/
|
|
18
22
|
oldInputName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The old X and Y workspace coordinates of the block if it was a top level
|
|
25
|
+
* block. Undefined if it was not a top level block.
|
|
26
|
+
*/
|
|
19
27
|
oldCoordinate?: Coordinate;
|
|
28
|
+
/** The ID of the new parent block. Undefined if it is a top-level block. */
|
|
20
29
|
newParentId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The name of the new input. Undefined if it is a top-level block or the
|
|
32
|
+
* parent's next block.
|
|
33
|
+
*/
|
|
21
34
|
newInputName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The new X and Y workspace coordinates of the block if it is a top level
|
|
37
|
+
* block. Undefined if it is not a top level block.
|
|
38
|
+
*/
|
|
22
39
|
newCoordinate?: Coordinate;
|
|
23
40
|
/** @param opt_block The moved block. Undefined for a blank event. */
|
|
24
41
|
constructor(opt_block?: Block);
|
|
@@ -9,12 +9,13 @@ import { UiBase } from './events_ui_base.js';
|
|
|
9
9
|
import type { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
11
|
* Class for a bubble open event.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.BubbleOpen
|
|
14
12
|
*/
|
|
15
13
|
export declare class BubbleOpen extends UiBase {
|
|
14
|
+
/** The ID of the block the bubble is attached to. */
|
|
16
15
|
blockId?: string;
|
|
16
|
+
/** True if the bubble is opening, false if closing. */
|
|
17
17
|
isOpen?: boolean;
|
|
18
|
+
/** The type of bubble; one of 'mutator', 'comment', or 'warning'. */
|
|
18
19
|
bubbleType?: BubbleType;
|
|
19
20
|
type: string;
|
|
20
21
|
/**
|
|
@@ -8,12 +8,15 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
8
8
|
import { UiBase } from './events_ui_base.js';
|
|
9
9
|
import { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.Click
|
|
11
|
+
* Notifies listeners that ome blockly element was clicked.
|
|
14
12
|
*/
|
|
15
13
|
export declare class Click extends UiBase {
|
|
14
|
+
/** The ID of the block that was clicked, if a block was clicked. */
|
|
16
15
|
blockId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The type of element that was clicked; one of 'block', 'workspace',
|
|
18
|
+
* or 'zoom_controls'.
|
|
19
|
+
*/
|
|
17
20
|
targetType?: ClickTarget;
|
|
18
21
|
type: string;
|
|
19
22
|
/**
|
|
@@ -10,11 +10,10 @@ import type { CommentDelete } from './events_comment_delete.js';
|
|
|
10
10
|
import type { Workspace } from '../workspace.js';
|
|
11
11
|
/**
|
|
12
12
|
* Abstract class for a comment event.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Events.CommentBase
|
|
15
13
|
*/
|
|
16
14
|
export declare class CommentBase extends AbstractEvent {
|
|
17
15
|
isBlank: boolean;
|
|
16
|
+
/** The ID of the comment that this event references. */
|
|
18
17
|
commentId?: string;
|
|
19
18
|
/**
|
|
20
19
|
* @param opt_comment The comment this event corresponds to. Undefined for a
|
|
@@ -7,13 +7,13 @@ import type { WorkspaceComment } from '../workspace_comment.js';
|
|
|
7
7
|
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.CommentChange
|
|
10
|
+
* Notifies listeners that the contents of a workspace comment has changed.
|
|
13
11
|
*/
|
|
14
12
|
export declare class CommentChange extends CommentBase {
|
|
15
13
|
type: string;
|
|
14
|
+
/** The previous contents of the comment. */
|
|
16
15
|
oldContents_?: string;
|
|
16
|
+
/** The new contents of the comment. */
|
|
17
17
|
newContents_?: string;
|
|
18
18
|
/**
|
|
19
19
|
* @param opt_comment The comment that is being changed. Undefined for a
|
|
@@ -7,12 +7,11 @@ import type { WorkspaceComment } from '../workspace_comment.js';
|
|
|
7
7
|
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.CommentCreate
|
|
10
|
+
* Notifies listeners that a workspace comment was created.
|
|
13
11
|
*/
|
|
14
12
|
export declare class CommentCreate extends CommentBase {
|
|
15
13
|
type: string;
|
|
14
|
+
/** The XML representation of the created workspace comment. */
|
|
16
15
|
xml?: Element | DocumentFragment;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_comment The created comment.
|
|
@@ -7,12 +7,11 @@ import type { WorkspaceComment } from '../workspace_comment.js';
|
|
|
7
7
|
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.CommentDelete
|
|
10
|
+
* Notifies listeners that a workspace comment has been deleted.
|
|
13
11
|
*/
|
|
14
12
|
export declare class CommentDelete extends CommentBase {
|
|
15
13
|
type: string;
|
|
14
|
+
/** The XML representation of the deleted workspace comment. */
|
|
16
15
|
xml?: Element;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_comment The deleted comment.
|
|
@@ -8,15 +8,15 @@ import type { WorkspaceComment } from '../workspace_comment.js';
|
|
|
8
8
|
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
9
9
|
import type { Workspace } from '../workspace.js';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.Events.CommentMove
|
|
11
|
+
* Notifies listeners that a workspace comment has moved.
|
|
14
12
|
*/
|
|
15
13
|
export declare class CommentMove extends CommentBase {
|
|
16
14
|
type: string;
|
|
15
|
+
/** The comment that is being moved. */
|
|
17
16
|
comment_?: WorkspaceComment;
|
|
17
|
+
/** The location of the comment before the move, in workspace coordinates. */
|
|
18
18
|
oldCoordinate_?: Coordinate;
|
|
19
|
-
/** The location after the move, in workspace coordinates. */
|
|
19
|
+
/** The location of the comment after the move, in workspace coordinates. */
|
|
20
20
|
newCoordinate_?: Coordinate;
|
|
21
21
|
/**
|
|
22
22
|
* @param opt_comment The comment that is being moved. Undefined for a blank
|
|
@@ -9,14 +9,21 @@ import type { Workspace } from '../workspace.js';
|
|
|
9
9
|
import { AbstractEventJson } from './events_abstract.js';
|
|
10
10
|
import { UiBase } from './events_ui_base.js';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Events.MarkerMove
|
|
12
|
+
* Notifies listeners that a marker (used for keyboard navigation) has
|
|
13
|
+
* moved.
|
|
15
14
|
*/
|
|
16
15
|
export declare class MarkerMove extends UiBase {
|
|
16
|
+
/** The ID of the block the marker is now on, if any. */
|
|
17
17
|
blockId?: string;
|
|
18
|
+
/** The old node the marker used to be on, if any. */
|
|
18
19
|
oldNode?: ASTNode;
|
|
20
|
+
/** The new node the marker is now on. */
|
|
19
21
|
newNode?: ASTNode;
|
|
22
|
+
/**
|
|
23
|
+
* True if this is a cursor event, false otherwise.
|
|
24
|
+
* For information about cursors vs markers see {@link
|
|
25
|
+
* https://blocklycodelabs.dev/codelabs/keyboard-navigation/index.html?index=..%2F..index#1}.
|
|
26
|
+
*/
|
|
20
27
|
isCursor?: boolean;
|
|
21
28
|
type: string;
|
|
22
29
|
/**
|
|
@@ -8,11 +8,15 @@ import { UiBase } from './events_ui_base.js';
|
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a selected event.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.Selected
|
|
11
|
+
* Notifies listeners that a new element has been selected.
|
|
13
12
|
*/
|
|
14
13
|
export declare class Selected extends UiBase {
|
|
14
|
+
/** The id of the last selected selectable element. */
|
|
15
15
|
oldElementId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The id of the newly selected selectable element,
|
|
18
|
+
* or undefined if unselected.
|
|
19
|
+
*/
|
|
16
20
|
newElementId?: string;
|
|
17
21
|
type: string;
|
|
18
22
|
/**
|
|
@@ -7,11 +7,10 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
7
7
|
import { UiBase } from './events_ui_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.ThemeChange
|
|
10
|
+
* Notifies listeners that the workspace theme has changed.
|
|
13
11
|
*/
|
|
14
12
|
export declare class ThemeChange extends UiBase {
|
|
13
|
+
/** The name of the new theme that has been set. */
|
|
15
14
|
themeName?: string;
|
|
16
15
|
type: string;
|
|
17
16
|
/**
|
|
@@ -7,12 +7,12 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
7
7
|
import { UiBase } from './events_ui_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.ToolboxItemSelect
|
|
10
|
+
* Notifies listeners that a toolbox item has been selected.
|
|
13
11
|
*/
|
|
14
12
|
export declare class ToolboxItemSelect extends UiBase {
|
|
13
|
+
/** The previously selected toolbox item. */
|
|
15
14
|
oldItem?: string;
|
|
15
|
+
/** The newly selected toolbox item. */
|
|
16
16
|
newItem?: string;
|
|
17
17
|
type: string;
|
|
18
18
|
/**
|
|
@@ -7,11 +7,13 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
7
7
|
import { UiBase } from './events_ui_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.TrashcanOpen
|
|
10
|
+
* Notifies listeners when the trashcan is opening or closing.
|
|
13
11
|
*/
|
|
14
12
|
export declare class TrashcanOpen extends UiBase {
|
|
13
|
+
/**
|
|
14
|
+
* True if the trashcan is currently opening (previously closed).
|
|
15
|
+
* False if it is currently closing (previously open).
|
|
16
|
+
*/
|
|
15
17
|
isOpen?: boolean;
|
|
16
18
|
type: string;
|
|
17
19
|
/**
|
|
@@ -10,8 +10,6 @@ import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
|
10
10
|
* editing to work (e.g. scrolling the workspace, zooming, opening toolbox
|
|
11
11
|
* categories).
|
|
12
12
|
* UI events do not undo or redo.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.Events.UiBase
|
|
15
13
|
*/
|
|
16
14
|
export declare class UiBase extends AbstractEvent {
|
|
17
15
|
isBlank: boolean;
|
|
@@ -8,11 +8,10 @@ import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.
|
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
10
|
* Abstract class for a variable event.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.VarBase
|
|
13
11
|
*/
|
|
14
12
|
export declare class VarBase extends AbstractEvent {
|
|
15
13
|
isBlank: boolean;
|
|
14
|
+
/** The ID of the variable this event references. */
|
|
16
15
|
varId?: string;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_variable The variable this event corresponds to. Undefined for
|
|
@@ -7,13 +7,13 @@ import type { VariableModel } from '../variable_model.js';
|
|
|
7
7
|
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Events.VarCreate
|
|
10
|
+
* Notifies listeners that a variable model has been created.
|
|
13
11
|
*/
|
|
14
12
|
export declare class VarCreate extends VarBase {
|
|
15
13
|
type: string;
|
|
14
|
+
/** The type of the variable that was created. */
|
|
16
15
|
varType?: string;
|
|
16
|
+
/** The name of the variable that was created. */
|
|
17
17
|
varName?: string;
|
|
18
18
|
/**
|
|
19
19
|
* @param opt_variable The created variable. Undefined for a blank event.
|
|
@@ -7,13 +7,15 @@ import type { VariableModel } from '../variable_model.js';
|
|
|
7
7
|
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Notifies listeners that a variable model has been deleted.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
12
|
+
* @class
|
|
13
13
|
*/
|
|
14
14
|
export declare class VarDelete extends VarBase {
|
|
15
15
|
type: string;
|
|
16
|
+
/** The type of the variable that was deleted. */
|
|
16
17
|
varType?: string;
|
|
18
|
+
/** The name of the variable that was deleted. */
|
|
17
19
|
varName?: string;
|
|
18
20
|
/**
|
|
19
21
|
* @param opt_variable The deleted variable. Undefined for a blank event.
|
|
@@ -7,13 +7,15 @@ import type { VariableModel } from '../variable_model.js';
|
|
|
7
7
|
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Notifies listeners that a variable model was renamed.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
12
|
+
* @class
|
|
13
13
|
*/
|
|
14
14
|
export declare class VarRename extends VarBase {
|
|
15
15
|
type: string;
|
|
16
|
+
/** The previous name of the variable. */
|
|
16
17
|
oldName?: string;
|
|
18
|
+
/** The new name of the variable. */
|
|
17
19
|
newName?: string;
|
|
18
20
|
/**
|
|
19
21
|
* @param opt_variable The renamed variable. Undefined for a blank event.
|
|
@@ -7,14 +7,25 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
7
7
|
import { UiBase } from './events_ui_base.js';
|
|
8
8
|
import type { Workspace } from '../workspace.js';
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Notifies listeners that the workspace surface's position or scale has
|
|
11
|
+
* changed.
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
+
* Does not notify when the workspace itself resizes.
|
|
13
14
|
*/
|
|
14
15
|
export declare class ViewportChange extends UiBase {
|
|
16
|
+
/**
|
|
17
|
+
* Top edge of the visible portion of the workspace, relative to the
|
|
18
|
+
* workspace origin.
|
|
19
|
+
*/
|
|
15
20
|
viewTop?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The left edge of the visible portion of the workspace, relative to
|
|
23
|
+
* the workspace origin.
|
|
24
|
+
*/
|
|
16
25
|
viewLeft?: number;
|
|
26
|
+
/** The scale of the workpace. */
|
|
17
27
|
scale?: number;
|
|
28
|
+
/** The previous scale of the workspace. */
|
|
18
29
|
oldScale?: number;
|
|
19
30
|
type: string;
|
|
20
31
|
/**
|