blockly 11.1.1 → 11.2.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/blockly.min.js +551 -525
- package/blockly.mjs +1 -0
- package/blockly_compressed.js +519 -493
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +32 -32
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +20 -14
- package/core/block_svg.d.ts +42 -9
- package/core/blockly.d.ts +11 -147
- package/core/blockly_options.d.ts +2 -2
- package/core/browser_events.d.ts +2 -2
- package/core/bubbles/bubble.d.ts +2 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +3 -3
- package/core/bubbles/text_bubble.d.ts +1 -1
- package/core/bubbles/textinput_bubble.d.ts +6 -1
- package/core/bubbles.d.ts +2 -2
- package/core/clipboard/workspace_comment_paster.d.ts +3 -3
- package/core/clipboard.d.ts +2 -2
- package/core/comments/comment_view.d.ts +10 -3
- package/core/comments/rendered_workspace_comment.d.ts +10 -10
- package/core/comments/workspace_comment.d.ts +2 -2
- package/core/comments.d.ts +1 -1
- package/core/component_manager.d.ts +8 -0
- package/core/connection.d.ts +3 -3
- package/core/dragging/block_drag_strategy.d.ts +3 -1
- package/core/dragging/bubble_drag_strategy.d.ts +3 -1
- package/core/dragging/comment_drag_strategy.d.ts +8 -1
- package/core/dragging/dragger.d.ts +2 -2
- package/core/dragging.d.ts +2 -2
- package/core/dropdowndiv.d.ts +3 -3
- package/core/events/events.d.ts +67 -127
- package/core/events/events_abstract.d.ts +0 -1
- package/core/events/events_block_change.d.ts +2 -1
- package/core/events/events_block_create.d.ts +3 -2
- package/core/events/events_block_delete.d.ts +3 -2
- package/core/events/events_block_drag.d.ts +3 -2
- package/core/events/events_block_field_intermediate_change.d.ts +2 -1
- package/core/events/events_block_move.d.ts +3 -2
- package/core/events/events_bubble_open.d.ts +4 -3
- package/core/events/events_click.d.ts +3 -2
- package/core/events/events_comment_base.d.ts +1 -1
- package/core/events/events_comment_change.d.ts +8 -2
- package/core/events/events_comment_collapse.d.ts +3 -2
- package/core/events/events_comment_create.d.ts +8 -2
- package/core/events/events_comment_delete.d.ts +8 -2
- package/core/events/events_comment_drag.d.ts +51 -0
- package/core/events/events_comment_move.d.ts +9 -3
- package/core/events/events_comment_resize.d.ts +68 -0
- package/core/events/events_marker_move.d.ts +2 -1
- package/core/events/events_selected.d.ts +3 -2
- package/core/events/events_theme_change.d.ts +3 -2
- package/core/events/events_toolbox_item_select.d.ts +3 -2
- package/core/events/events_trashcan_open.d.ts +3 -2
- package/core/events/events_var_base.d.ts +1 -1
- package/core/events/events_var_create.d.ts +3 -2
- package/core/events/events_var_delete.d.ts +3 -2
- package/core/events/events_var_rename.d.ts +3 -2
- package/core/events/events_viewport.d.ts +3 -2
- package/core/events/predicates.d.ts +90 -0
- package/core/events/type.d.ts +79 -0
- package/core/events/utils.d.ts +93 -125
- package/core/events/workspace_events.d.ts +2 -1
- package/core/extensions.d.ts +1 -1
- package/core/field.d.ts +1 -1
- package/core/field_dropdown.d.ts +34 -0
- package/core/field_input.d.ts +1 -1
- package/core/field_label.d.ts +6 -0
- package/core/flyout_base.d.ts +1 -1
- package/core/flyout_button.d.ts +6 -1
- package/core/generator.d.ts +3 -2
- package/core/gesture.d.ts +3 -3
- package/core/grid.d.ts +7 -1
- package/core/icons/comment_icon.d.ts +5 -6
- package/core/icons/icon.d.ts +1 -1
- package/core/icons/mutator_icon.d.ts +3 -3
- package/core/icons/warning_icon.d.ts +2 -2
- package/core/icons.d.ts +5 -5
- package/core/inputs/input.d.ts +1 -1
- package/core/inputs.d.ts +3 -3
- package/core/interfaces/i_ast_node_location_with_block.d.ts +1 -1
- package/core/interfaces/i_comment_icon.d.ts +2 -2
- package/core/interfaces/i_drag_target.d.ts +1 -1
- package/core/interfaces/i_flyout.d.ts +3 -3
- package/core/interfaces/i_legacy_procedure_blocks.d.ts +2 -2
- package/core/interfaces/i_metrics_manager.d.ts +2 -2
- package/core/interfaces/i_positionable.d.ts +1 -1
- package/core/interfaces/i_selectable.d.ts +1 -1
- package/core/interfaces/i_serializer.d.ts +2 -2
- package/core/interfaces/i_toolbox.d.ts +3 -3
- package/core/keyboard_nav/ast_node.d.ts +1 -1
- package/core/layer_manager.d.ts +1 -1
- package/core/layers.d.ts +0 -2
- package/core/procedures.d.ts +3 -3
- package/core/registry.d.ts +6 -6
- package/core/rendered_connection.d.ts +10 -5
- package/core/renderers/common/block_rendering.d.ts +3 -30
- package/core/renderers/common/i_path_object.d.ts +2 -2
- package/core/renderers/common/info.d.ts +1 -1
- package/core/renderers/common/marker_svg.d.ts +5 -5
- package/core/renderers/zelos/constants.d.ts +1 -1
- package/core/serialization/procedures.d.ts +2 -2
- package/core/serialization/workspace_comments.d.ts +1 -1
- package/core/serialization.d.ts +3 -3
- package/core/shortcut_registry.d.ts +70 -10
- package/core/toolbox/toolbox.d.ts +1 -6
- package/core/tooltip.d.ts +1 -1
- package/core/trashcan.d.ts +1 -6
- package/core/utils/drag.d.ts +33 -0
- package/core/utils/rect.d.ts +26 -0
- package/core/utils/size.d.ts +1 -1
- package/core/variables_dynamic.d.ts +1 -1
- package/core/workspace.d.ts +4 -5
- package/core/workspace_svg.d.ts +4 -6
- package/core/xml.d.ts +1 -1
- package/dart_compressed.js.map +1 -1
- package/generators/dart/dart_generator.d.ts +4 -0
- package/generators/dart/lists.d.ts +0 -3
- package/generators/dart/procedures.d.ts +0 -3
- package/generators/dart/text.d.ts +0 -3
- package/generators/javascript/javascript_generator.d.ts +4 -0
- package/generators/javascript/lists.d.ts +0 -3
- package/generators/javascript/procedures.d.ts +0 -3
- package/generators/javascript/text.d.ts +0 -3
- package/generators/lua/lists.d.ts +0 -3
- package/generators/lua/lua_generator.d.ts +6 -0
- package/generators/lua/procedures.d.ts +0 -3
- package/generators/lua/text.d.ts +0 -3
- package/generators/lua.d.ts +0 -4
- package/generators/php/lists.d.ts +1 -1
- package/generators/php/logic.d.ts +1 -1
- package/generators/php/math.d.ts +1 -1
- package/generators/php/php_generator.d.ts +4 -0
- package/generators/php/procedures.d.ts +1 -1
- package/generators/php/text.d.ts +1 -4
- package/generators/php/variables.d.ts +1 -1
- package/generators/php.d.ts +0 -5
- package/generators/python/lists.d.ts +1 -1
- package/generators/python/procedures.d.ts +1 -1
- package/generators/python/python_generator.d.ts +4 -0
- package/generators/python/text.d.ts +1 -1
- package/generators/python.d.ts +0 -5
- package/index.mjs +1 -0
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js.map +1 -1
- package/media/1x1.gif +0 -0
- package/media/click.mp3 +0 -0
- package/media/click.ogg +0 -0
- package/media/click.wav +0 -0
- package/media/delete.mp3 +0 -0
- package/media/delete.ogg +0 -0
- package/media/delete.wav +0 -0
- package/media/disconnect.mp3 +0 -0
- package/media/disconnect.ogg +0 -0
- package/media/disconnect.wav +0 -0
- package/media/handclosed.cur +0 -0
- package/media/handdelete.cur +0 -0
- package/media/handopen.cur +0 -0
- package/media/pilcrow.png +0 -0
- package/media/quote0.png +0 -0
- package/media/quote1.png +0 -0
- package/media/sprites.png +0 -0
- package/package.json +16 -13
- package/php_compressed.js.map +1 -1
- package/python_compressed.js.map +1 -1
package/core/utils/size.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class Size {
|
|
|
29
29
|
* @returns True iff the sizes have equal widths and equal heights, or if both
|
|
30
30
|
* are null.
|
|
31
31
|
*/
|
|
32
|
-
static equals(a
|
|
32
|
+
static equals(a?: Size | null, b?: Size | null): boolean;
|
|
33
33
|
/**
|
|
34
34
|
* Returns a new size with the maximum width and height values out of both
|
|
35
35
|
* sizes.
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { FlyoutButton } from './flyout_button.js';
|
|
6
7
|
import type { Workspace } from './workspace.js';
|
|
7
8
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
8
|
-
import type { FlyoutButton } from './flyout_button.js';
|
|
9
9
|
/**
|
|
10
10
|
* String for use in the "custom" attribute of a category in toolbox XML.
|
|
11
11
|
* This string indicates that the category should be dynamically populated with
|
package/core/workspace.d.ts
CHANGED
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import './connection_checker.js';
|
|
12
12
|
import type { Block } from './block.js';
|
|
13
|
+
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
13
14
|
import type { ConnectionDB } from './connection_db.js';
|
|
14
15
|
import type { Abstract } from './events/events_abstract.js';
|
|
15
16
|
import type { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
|
|
16
17
|
import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
|
|
18
|
+
import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
17
19
|
import { Options } from './options.js';
|
|
18
20
|
import type * as toolbox from './utils/toolbox.js';
|
|
19
21
|
import { VariableMap } from './variable_map.js';
|
|
20
22
|
import type { VariableModel } from './variable_model.js';
|
|
21
|
-
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
22
|
-
import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
23
23
|
/**
|
|
24
24
|
* Class for a workspace. This is a data structure that contains blocks.
|
|
25
25
|
* There is no UI, and can be created headlessly.
|
|
@@ -353,13 +353,13 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
353
353
|
* @param func Function to call.
|
|
354
354
|
* @returns Obsolete return value, ignore.
|
|
355
355
|
*/
|
|
356
|
-
addChangeListener(func: (e: Abstract) => void):
|
|
356
|
+
addChangeListener(func: (e: Abstract) => void): (e: Abstract) => void;
|
|
357
357
|
/**
|
|
358
358
|
* Stop listening for this workspace's changes.
|
|
359
359
|
*
|
|
360
360
|
* @param func Function to stop calling.
|
|
361
361
|
*/
|
|
362
|
-
removeChangeListener(func:
|
|
362
|
+
removeChangeListener(func: (e: Abstract) => void): void;
|
|
363
363
|
/**
|
|
364
364
|
* Fire a change event.
|
|
365
365
|
*
|
|
@@ -393,7 +393,6 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
393
393
|
*
|
|
394
394
|
* @param id ID of comment to find.
|
|
395
395
|
* @returns The sought after comment, or null if not found.
|
|
396
|
-
* @internal
|
|
397
396
|
*/
|
|
398
397
|
getCommentById(id: string): WorkspaceComment | null;
|
|
399
398
|
/**
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ import './events/events_viewport.js';
|
|
|
14
14
|
import type { Block } from './block.js';
|
|
15
15
|
import type { BlockSvg } from './block_svg.js';
|
|
16
16
|
import * as browserEvents from './browser_events.js';
|
|
17
|
+
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
17
18
|
import { ComponentManager } from './component_manager.js';
|
|
19
|
+
import { ContextMenuOption } from './contextmenu_registry.js';
|
|
18
20
|
import type { FlyoutButton } from './flyout_button.js';
|
|
19
21
|
import { Gesture } from './gesture.js';
|
|
20
22
|
import { Grid } from './grid.js';
|
|
@@ -26,6 +28,7 @@ import type { IMetricsManager } from './interfaces/i_metrics_manager.js';
|
|
|
26
28
|
import type { IToolbox } from './interfaces/i_toolbox.js';
|
|
27
29
|
import type { Cursor } from './keyboard_nav/cursor.js';
|
|
28
30
|
import type { Marker } from './keyboard_nav/marker.js';
|
|
31
|
+
import { LayerManager } from './layer_manager.js';
|
|
29
32
|
import { MarkerManager } from './marker_manager.js';
|
|
30
33
|
import { Options } from './options.js';
|
|
31
34
|
import type { Renderer } from './renderers/common/renderer.js';
|
|
@@ -42,10 +45,7 @@ import * as toolbox from './utils/toolbox.js';
|
|
|
42
45
|
import type { VariableModel } from './variable_model.js';
|
|
43
46
|
import { Workspace } from './workspace.js';
|
|
44
47
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
45
|
-
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
46
48
|
import { ZoomControls } from './zoom_controls.js';
|
|
47
|
-
import { ContextMenuOption } from './contextmenu_registry.js';
|
|
48
|
-
import { LayerManager } from './layer_manager.js';
|
|
49
49
|
/**
|
|
50
50
|
* Class for a workspace. This is an onscreen area with optional trashcan,
|
|
51
51
|
* scrollbars, bubbles, and dragging.
|
|
@@ -138,8 +138,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
138
138
|
startScrollX: number;
|
|
139
139
|
/** Vertical scroll value when scrolling started in pixel units. */
|
|
140
140
|
startScrollY: number;
|
|
141
|
-
/** Distance from mouse to object being dragged. */
|
|
142
|
-
private dragDeltaXY;
|
|
143
141
|
/** Current scale. */
|
|
144
142
|
scale: number;
|
|
145
143
|
/** Cached scale value. Used to detect changes in viewport. */
|
|
@@ -704,7 +702,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
704
702
|
* blocks on the workspace.
|
|
705
703
|
*/
|
|
706
704
|
getBlocksBoundingBox(): Rect;
|
|
707
|
-
/** Clean up the workspace by ordering all the blocks in a column. */
|
|
705
|
+
/** Clean up the workspace by ordering all the blocks in a column such that none overlap. */
|
|
708
706
|
cleanUp(): void;
|
|
709
707
|
/**
|
|
710
708
|
* Show the context menu for the workspace.
|
package/core/xml.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from './block.js';
|
|
7
|
+
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
7
8
|
import type { VariableModel } from './variable_model.js';
|
|
8
9
|
import type { Workspace } from './workspace.js';
|
|
9
10
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
10
|
-
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
11
11
|
/**
|
|
12
12
|
* Encode a block tree as XML.
|
|
13
13
|
*
|