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/utils/toolbox.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ import type { CssConfig as SeparatorCssConfig } from '../toolbox/separator.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* The information needed to create a block in the toolbox.
|
|
11
11
|
* Note that disabled has a different type for backwards compatibility.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.utils.toolbox.BlockInfo
|
|
14
12
|
*/
|
|
15
13
|
export interface BlockInfo {
|
|
16
14
|
kind: string;
|
|
@@ -39,8 +37,6 @@ export interface BlockInfo {
|
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* The information needed to create a separator in the toolbox.
|
|
42
|
-
*
|
|
43
|
-
* @alias Blockly.utils.toolbox.SeparatorInfo
|
|
44
40
|
*/
|
|
45
41
|
export interface SeparatorInfo {
|
|
46
42
|
kind: string;
|
|
@@ -50,8 +46,6 @@ export interface SeparatorInfo {
|
|
|
50
46
|
}
|
|
51
47
|
/**
|
|
52
48
|
* The information needed to create a button in the toolbox.
|
|
53
|
-
*
|
|
54
|
-
* @alias Blockly.utils.toolbox.ButtonInfo
|
|
55
49
|
*/
|
|
56
50
|
export interface ButtonInfo {
|
|
57
51
|
kind: string;
|
|
@@ -60,8 +54,6 @@ export interface ButtonInfo {
|
|
|
60
54
|
}
|
|
61
55
|
/**
|
|
62
56
|
* The information needed to create a label in the toolbox.
|
|
63
|
-
*
|
|
64
|
-
* @alias Blockly.utils.toolbox.LabelInfo
|
|
65
57
|
*/
|
|
66
58
|
export interface LabelInfo {
|
|
67
59
|
kind: string;
|
|
@@ -70,14 +62,10 @@ export interface LabelInfo {
|
|
|
70
62
|
}
|
|
71
63
|
/**
|
|
72
64
|
* The information needed to create either a button or a label in the flyout.
|
|
73
|
-
*
|
|
74
|
-
* @alias Blockly.utils.toolbox.ButtonOrLabelInfo
|
|
75
65
|
*/
|
|
76
66
|
export type ButtonOrLabelInfo = ButtonInfo | LabelInfo;
|
|
77
67
|
/**
|
|
78
68
|
* The information needed to create a category in the toolbox.
|
|
79
|
-
*
|
|
80
|
-
* @alias Blockly.utils.toolbox.StaticCategoryInfo
|
|
81
69
|
*/
|
|
82
70
|
export interface StaticCategoryInfo {
|
|
83
71
|
kind: string;
|
|
@@ -88,11 +76,10 @@ export interface StaticCategoryInfo {
|
|
|
88
76
|
colour: string | undefined;
|
|
89
77
|
cssconfig: CategoryCssConfig | undefined;
|
|
90
78
|
hidden: string | undefined;
|
|
79
|
+
expanded?: string | boolean;
|
|
91
80
|
}
|
|
92
81
|
/**
|
|
93
82
|
* The information needed to create a custom category.
|
|
94
|
-
*
|
|
95
|
-
* @alias Blockly.utils.toolbox.DynamicCategoryInfo
|
|
96
83
|
*/
|
|
97
84
|
export interface DynamicCategoryInfo {
|
|
98
85
|
kind: string;
|
|
@@ -102,29 +89,22 @@ export interface DynamicCategoryInfo {
|
|
|
102
89
|
colour: string | undefined;
|
|
103
90
|
cssconfig: CategoryCssConfig | undefined;
|
|
104
91
|
hidden: string | undefined;
|
|
92
|
+
expanded?: string | boolean;
|
|
105
93
|
}
|
|
106
94
|
/**
|
|
107
95
|
* The information needed to create either a dynamic or static category.
|
|
108
|
-
*
|
|
109
|
-
* @alias Blockly.utils.toolbox.CategoryInfo
|
|
110
96
|
*/
|
|
111
97
|
export type CategoryInfo = StaticCategoryInfo | DynamicCategoryInfo;
|
|
112
98
|
/**
|
|
113
99
|
* Any information that can be used to create an item in the toolbox.
|
|
114
|
-
*
|
|
115
|
-
* @alias Blockly.utils.toolbox.ToolboxItemInfo
|
|
116
100
|
*/
|
|
117
101
|
export type ToolboxItemInfo = FlyoutItemInfo | StaticCategoryInfo;
|
|
118
102
|
/**
|
|
119
103
|
* All the different types that can be displayed in a flyout.
|
|
120
|
-
*
|
|
121
|
-
* @alias Blockly.utils.toolbox.FlyoutItemInfo
|
|
122
104
|
*/
|
|
123
105
|
export type FlyoutItemInfo = BlockInfo | SeparatorInfo | ButtonInfo | LabelInfo | DynamicCategoryInfo;
|
|
124
106
|
/**
|
|
125
107
|
* The JSON definition of a toolbox.
|
|
126
|
-
*
|
|
127
|
-
* @alias Blockly.utils.toolbox.ToolboxInfo
|
|
128
108
|
*/
|
|
129
109
|
export interface ToolboxInfo {
|
|
130
110
|
kind?: string;
|
|
@@ -132,26 +112,18 @@ export interface ToolboxInfo {
|
|
|
132
112
|
}
|
|
133
113
|
/**
|
|
134
114
|
* An array holding flyout items.
|
|
135
|
-
*
|
|
136
|
-
* @alias Blockly.utils.toolbox.FlyoutItemInfoArray
|
|
137
115
|
*/
|
|
138
116
|
export type FlyoutItemInfoArray = FlyoutItemInfo[];
|
|
139
117
|
/**
|
|
140
118
|
* All of the different types that can create a toolbox.
|
|
141
|
-
*
|
|
142
|
-
* @alias Blockly.utils.toolbox.ToolboxDefinition
|
|
143
119
|
*/
|
|
144
120
|
export type ToolboxDefinition = Node | ToolboxInfo | string;
|
|
145
121
|
/**
|
|
146
122
|
* All of the different types that can be used to show items in a flyout.
|
|
147
|
-
*
|
|
148
|
-
* @alias Blockly.utils.toolbox.FlyoutDefinition
|
|
149
123
|
*/
|
|
150
124
|
export type FlyoutDefinition = FlyoutItemInfoArray | NodeList | ToolboxInfo | Node[];
|
|
151
125
|
/**
|
|
152
126
|
* Position of the toolbox and/or flyout relative to the workspace.
|
|
153
|
-
*
|
|
154
|
-
* @alias Blockly.utils.toolbox.Position
|
|
155
127
|
*/
|
|
156
128
|
export declare enum Position {
|
|
157
129
|
TOP = 0,
|
|
@@ -164,7 +136,6 @@ export declare enum Position {
|
|
|
164
136
|
*
|
|
165
137
|
* @param toolboxDef The definition of the toolbox in one of its many forms.
|
|
166
138
|
* @returns Object holding information for creating a toolbox.
|
|
167
|
-
* @alias Blockly.utils.toolbox.convertToolboxDefToJson
|
|
168
139
|
* @internal
|
|
169
140
|
*/
|
|
170
141
|
export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition | null): ToolboxInfo | null;
|
|
@@ -173,7 +144,6 @@ export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition |
|
|
|
173
144
|
*
|
|
174
145
|
* @param flyoutDef The definition of the flyout in one of its many forms.
|
|
175
146
|
* @returns A list of flyout items.
|
|
176
|
-
* @alias Blockly.utils.toolbox.convertFlyoutDefToJsonArray
|
|
177
147
|
* @internal
|
|
178
148
|
*/
|
|
179
149
|
export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition | null): FlyoutItemInfoArray;
|
|
@@ -182,7 +152,6 @@ export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition
|
|
|
182
152
|
*
|
|
183
153
|
* @param toolboxJson Object holding information for creating a toolbox.
|
|
184
154
|
* @returns True if the toolbox has categories.
|
|
185
|
-
* @alias Blockly.utils.toolbox.hasCategories
|
|
186
155
|
* @internal
|
|
187
156
|
*/
|
|
188
157
|
export declare function hasCategories(toolboxJson: ToolboxInfo | null): boolean;
|
|
@@ -195,7 +164,6 @@ declare function hasCategoriesInternal(toolboxJson: ToolboxInfo | null): boolean
|
|
|
195
164
|
*
|
|
196
165
|
* @param categoryInfo Object holing information for creating a category.
|
|
197
166
|
* @returns True if the category has subcategories.
|
|
198
|
-
* @alias Blockly.utils.toolbox.isCategoryCollapsible
|
|
199
167
|
* @internal
|
|
200
168
|
*/
|
|
201
169
|
export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boolean;
|
|
@@ -204,7 +172,6 @@ export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boole
|
|
|
204
172
|
*
|
|
205
173
|
* @param toolboxDef DOM tree of blocks, or text representation of same.
|
|
206
174
|
* @returns DOM tree of blocks, or null.
|
|
207
|
-
* @alias Blockly.utils.toolbox.parseToolboxTree
|
|
208
175
|
*/
|
|
209
176
|
export declare function parseToolboxTree(toolboxDef: Element | null | string): Element | null;
|
|
210
177
|
export declare const TEST_ONLY: {
|
|
@@ -3,20 +3,12 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/** @alias Blockly.utils.userAgent.raw */
|
|
7
6
|
export declare const raw: string;
|
|
8
|
-
/** @alias Blockly.utils.userAgent.JavaFx */
|
|
9
7
|
export declare const JavaFx: boolean;
|
|
10
|
-
/** @alias Blockly.utils.userAgent.GECKO */
|
|
11
8
|
export declare const GECKO: boolean;
|
|
12
|
-
/** @alias Blockly.utils.userAgent.ANDROID */
|
|
13
9
|
export declare const ANDROID: boolean;
|
|
14
|
-
/** @alias Blockly.utils.userAgent.IPAD */
|
|
15
10
|
export declare const IPAD: boolean;
|
|
16
|
-
/** @alias Blockly.utils.userAgent.IPHONE */
|
|
17
11
|
export declare const IPHONE: boolean;
|
|
18
|
-
/** @alias Blockly.utils.userAgent.MAC */
|
|
19
12
|
export declare const MAC: boolean;
|
|
20
|
-
/** @alias Blockly.utils.userAgent.MOBILE */
|
|
21
13
|
export declare const MOBILE: boolean;
|
|
22
14
|
//# sourceMappingURL=useragent.d.ts.map
|
package/core/utils/xml.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ export declare function injectDependencies(dependencies: {
|
|
|
44
44
|
}): void;
|
|
45
45
|
/**
|
|
46
46
|
* Namespace for Blockly's XML.
|
|
47
|
-
*
|
|
48
|
-
* @alias Blockly.utils.xml.NAME_SPACE
|
|
49
47
|
*/
|
|
50
48
|
export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
|
|
51
49
|
/**
|
|
@@ -53,7 +51,6 @@ export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
|
|
|
53
51
|
*
|
|
54
52
|
* @returns The document object.
|
|
55
53
|
* @deprecated No longer provided by Blockly.
|
|
56
|
-
* @alias Blockly.utils.xml.getDocument
|
|
57
54
|
*/
|
|
58
55
|
export declare function getDocument(): Document;
|
|
59
56
|
/**
|
|
@@ -61,7 +58,6 @@ export declare function getDocument(): Document;
|
|
|
61
58
|
*
|
|
62
59
|
* @param xmlDocument The document object to use.
|
|
63
60
|
* @deprecated No longer provided by Blockly.
|
|
64
|
-
* @alias Blockly.utils.xml.setDocument
|
|
65
61
|
*/
|
|
66
62
|
export declare function setDocument(xmlDocument: Document): void;
|
|
67
63
|
/**
|
|
@@ -69,7 +65,6 @@ export declare function setDocument(xmlDocument: Document): void;
|
|
|
69
65
|
*
|
|
70
66
|
* @param tagName Name of DOM element.
|
|
71
67
|
* @returns New DOM element.
|
|
72
|
-
* @alias Blockly.utils.xml.createElement
|
|
73
68
|
*/
|
|
74
69
|
export declare function createElement(tagName: string): Element;
|
|
75
70
|
/**
|
|
@@ -77,16 +72,23 @@ export declare function createElement(tagName: string): Element;
|
|
|
77
72
|
*
|
|
78
73
|
* @param text Text content.
|
|
79
74
|
* @returns New DOM text node.
|
|
80
|
-
* @alias Blockly.utils.xml.createTextNode
|
|
81
75
|
*/
|
|
82
76
|
export declare function createTextNode(text: string): Text;
|
|
77
|
+
/**
|
|
78
|
+
* Converts an XML string into a DOM structure.
|
|
79
|
+
*
|
|
80
|
+
* @param text An XML string.
|
|
81
|
+
* @returns A DOM object representing the singular child of the document
|
|
82
|
+
* element.
|
|
83
|
+
* @throws if the text doesn't parse.
|
|
84
|
+
*/
|
|
85
|
+
export declare function textToDom(text: string): Element;
|
|
83
86
|
/**
|
|
84
87
|
* Converts an XML string into a DOM tree.
|
|
85
88
|
*
|
|
86
89
|
* @param text XML string.
|
|
87
90
|
* @returns The DOM document.
|
|
88
91
|
* @throws if XML doesn't parse.
|
|
89
|
-
* @alias Blockly.utils.xml.textToDomDocument
|
|
90
92
|
*/
|
|
91
93
|
export declare function textToDomDocument(text: string): Document;
|
|
92
94
|
/**
|
|
@@ -95,7 +97,6 @@ export declare function textToDomDocument(text: string): Document;
|
|
|
95
97
|
*
|
|
96
98
|
* @param dom A tree of XML nodes.
|
|
97
99
|
* @returns Text representation.
|
|
98
|
-
* @alias Blockly.utils.xml.domToText
|
|
99
100
|
*/
|
|
100
101
|
export declare function domToText(dom: Node): string;
|
|
101
102
|
export {};
|
package/core/utils.d.ts
CHANGED
|
@@ -37,7 +37,6 @@ export { aria, arrayUtils as array, browserEvents, colour, Coordinate, deprecati
|
|
|
37
37
|
* @param element SVG element to find the coordinates of.
|
|
38
38
|
* @returns Object with .x and .y properties.
|
|
39
39
|
* @deprecated Use **Blockly.utils.svgMath.getRelativeXY** instead.
|
|
40
|
-
* @alias Blockly.utils.getRelativeXY
|
|
41
40
|
*/
|
|
42
41
|
export declare function getRelativeXY(element: Element): Coordinate;
|
|
43
42
|
/**
|
|
@@ -48,7 +47,6 @@ export declare function getRelativeXY(element: Element): Coordinate;
|
|
|
48
47
|
* of the div Blockly was injected into, the behaviour is undefined.
|
|
49
48
|
* @returns Object with .x and .y properties.
|
|
50
49
|
* @deprecated Use **Blockly.utils.svgMath.getInjectionDivXY** instead.
|
|
51
|
-
* @alias Blockly.utils.getInjectionDivXY_
|
|
52
50
|
*/
|
|
53
51
|
declare function getInjectionDivXY(element: Element): Coordinate;
|
|
54
52
|
export declare const getInjectionDivXY_: typeof getInjectionDivXY;
|
|
@@ -63,7 +61,6 @@ export declare const getInjectionDivXY_: typeof getInjectionDivXY;
|
|
|
63
61
|
* interpolation tokens.
|
|
64
62
|
* @returns Array of strings and numbers.
|
|
65
63
|
* @deprecated Use **Blockly.utils.parsing.tokenizeInterpolation** instead.
|
|
66
|
-
* @alias Blockly.utils.tokenizeInterpolation
|
|
67
64
|
*/
|
|
68
65
|
export declare function tokenizeInterpolation(message: string): Array<string | number>;
|
|
69
66
|
/**
|
|
@@ -75,7 +72,6 @@ export declare function tokenizeInterpolation(message: string): Array<string | n
|
|
|
75
72
|
* references.
|
|
76
73
|
* @returns String with message references replaced.
|
|
77
74
|
* @deprecated Use **Blockly.utils.parsing.replaceMessageReferences** instead.
|
|
78
|
-
* @alias Blockly.utils.replaceMessageReferences
|
|
79
75
|
*/
|
|
80
76
|
export declare function replaceMessageReferences(message: string | any): string;
|
|
81
77
|
/**
|
|
@@ -86,7 +82,6 @@ export declare function replaceMessageReferences(message: string | any): string;
|
|
|
86
82
|
* @returns True if all message references have matching values.
|
|
87
83
|
* Otherwise, false.
|
|
88
84
|
* @deprecated Use **Blockly.utils.parsing.checkMessageReferences** instead.
|
|
89
|
-
* @alias Blockly.utils.checkMessageReferences
|
|
90
85
|
*/
|
|
91
86
|
export declare function checkMessageReferences(message: string): boolean;
|
|
92
87
|
/**
|
|
@@ -95,7 +90,6 @@ export declare function checkMessageReferences(message: string): boolean;
|
|
|
95
90
|
*
|
|
96
91
|
* @returns True if 3D transforms are supported.
|
|
97
92
|
* @deprecated Use **Blockly.utils.svgMath.is3dSupported** instead.
|
|
98
|
-
* @alias Blockly.utils.is3dSupported
|
|
99
93
|
*/
|
|
100
94
|
export declare function is3dSupported(): boolean;
|
|
101
95
|
/**
|
|
@@ -104,7 +98,6 @@ export declare function is3dSupported(): boolean;
|
|
|
104
98
|
*
|
|
105
99
|
* @returns An object containing window width, height, and scroll position in
|
|
106
100
|
* window coordinates.
|
|
107
|
-
* @alias Blockly.utils.getViewportBBox
|
|
108
101
|
* @deprecated Use **Blockly.utils.svgMath.getViewportBBox** instead.
|
|
109
102
|
* @internal
|
|
110
103
|
*/
|
|
@@ -115,7 +108,6 @@ export declare function getViewportBBox(): Rect;
|
|
|
115
108
|
* @param arr Array from which to remove value.
|
|
116
109
|
* @param value Value to remove.
|
|
117
110
|
* @returns True if an element was removed.
|
|
118
|
-
* @alias Blockly.utils.arrayRemove
|
|
119
111
|
* @deprecated Use **Blockly.array.removeElem** instead.
|
|
120
112
|
* @internal
|
|
121
113
|
*/
|
|
@@ -126,7 +118,6 @@ export declare function arrayRemove<T>(arr: Array<T>, value: T): boolean;
|
|
|
126
118
|
*
|
|
127
119
|
* @returns Object with values 'x' and 'y'.
|
|
128
120
|
* @deprecated Use **Blockly.utils.svgMath.getDocumentScroll** instead.
|
|
129
|
-
* @alias Blockly.utils.getDocumentScroll
|
|
130
121
|
*/
|
|
131
122
|
export declare function getDocumentScroll(): Coordinate;
|
|
132
123
|
/**
|
|
@@ -138,7 +129,6 @@ export declare function getDocumentScroll(): Coordinate;
|
|
|
138
129
|
* that are not inside a value or statement input of the block).
|
|
139
130
|
* @returns Map of types to type counts for descendants of the bock.
|
|
140
131
|
* @deprecated Use **Blockly.common.getBlockTypeCounts** instead.
|
|
141
|
-
* @alias Blockly.utils.getBlockTypeCounts
|
|
142
132
|
*/
|
|
143
133
|
export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: boolean): {
|
|
144
134
|
[key: string]: number;
|
|
@@ -163,7 +153,6 @@ export declare function screenToWsCoordinates(ws: WorkspaceSvg, screenCoordinate
|
|
|
163
153
|
* the input was an HSV hue value.
|
|
164
154
|
* @throws {Error} If the colour cannot be parsed.
|
|
165
155
|
* @deprecated Use **Blockly.utils.parsing.parseBlockColour** instead.
|
|
166
|
-
* @alias Blockly.utils.parseBlockColour
|
|
167
156
|
*/
|
|
168
157
|
export declare function parseBlockColour(colour: number | string): {
|
|
169
158
|
hue: number | null;
|
|
@@ -175,7 +164,6 @@ export declare function parseBlockColour(colour: number | string): {
|
|
|
175
164
|
* @param fn Function to run.
|
|
176
165
|
* @throws Error Will throw if no global document can be found (e.g., Node.js).
|
|
177
166
|
* @deprecated No longer provided by Blockly.
|
|
178
|
-
* @alias Blockly.utils.runAfterPageLoad
|
|
179
167
|
*/
|
|
180
168
|
export declare function runAfterPageLoad(fn: () => void): void;
|
|
181
169
|
//# sourceMappingURL=utils.d.ts.map
|
package/core/variable_map.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ import type { Workspace } from './workspace.js';
|
|
|
12
12
|
* Class for a variable map. This contains a dictionary data structure with
|
|
13
13
|
* variable types as keys and lists of variables as values. The list of
|
|
14
14
|
* variables are the type indicated by the key.
|
|
15
|
-
*
|
|
16
|
-
* @alias Blockly.VariableMap
|
|
17
15
|
*/
|
|
18
16
|
export declare class VariableMap {
|
|
19
17
|
workspace: Workspace;
|
|
@@ -25,7 +23,7 @@ export declare class VariableMap {
|
|
|
25
23
|
private variableMap;
|
|
26
24
|
/** @param workspace The workspace this map belongs to. */
|
|
27
25
|
constructor(workspace: Workspace);
|
|
28
|
-
/** Clear the variable map. */
|
|
26
|
+
/** Clear the variable map. Fires events for every deletion. */
|
|
29
27
|
clear(): void;
|
|
30
28
|
/**
|
|
31
29
|
* Rename the given variable by updating its name in the variable map.
|
package/core/variable_model.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import type { Workspace } from './workspace.js';
|
|
|
10
10
|
* Holds information for the variable including name, ID, and type.
|
|
11
11
|
*
|
|
12
12
|
* @see {Blockly.FieldVariable}
|
|
13
|
-
* @alias Blockly.VariableModel
|
|
14
13
|
*/
|
|
15
14
|
export declare class VariableModel {
|
|
16
15
|
workspace: Workspace;
|
package/core/variables.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
12
12
|
* variable blocks.
|
|
13
13
|
* See also Blockly.Procedures.CATEGORY_NAME and
|
|
14
14
|
* Blockly.VariablesDynamic.CATEGORY_NAME.
|
|
15
|
-
*
|
|
16
|
-
* @alias Blockly.Variables.CATEGORY_NAME
|
|
17
15
|
*/
|
|
18
16
|
export declare const CATEGORY_NAME = "VARIABLE";
|
|
19
17
|
/**
|
|
@@ -24,7 +22,6 @@ export declare const CATEGORY_NAME = "VARIABLE";
|
|
|
24
22
|
*
|
|
25
23
|
* @param ws The workspace to search for variables.
|
|
26
24
|
* @returns Array of variable models.
|
|
27
|
-
* @alias Blockly.Variables.allUsedVarModels
|
|
28
25
|
*/
|
|
29
26
|
export declare function allUsedVarModels(ws: Workspace): VariableModel[];
|
|
30
27
|
/**
|
|
@@ -37,7 +34,6 @@ export declare function allUsedVarModels(ws: Workspace): VariableModel[];
|
|
|
37
34
|
*
|
|
38
35
|
* @param workspace The workspace to search.
|
|
39
36
|
* @returns A list of non-duplicated variable names.
|
|
40
|
-
* @alias Blockly.Variables.allDeveloperVariables
|
|
41
37
|
*/
|
|
42
38
|
export declare function allDeveloperVariables(workspace: Workspace): string[];
|
|
43
39
|
/**
|
|
@@ -46,7 +42,6 @@ export declare function allDeveloperVariables(workspace: Workspace): string[];
|
|
|
46
42
|
*
|
|
47
43
|
* @param workspace The workspace containing variables.
|
|
48
44
|
* @returns Array of XML elements.
|
|
49
|
-
* @alias Blockly.Variables.flyoutCategory
|
|
50
45
|
*/
|
|
51
46
|
export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
|
|
52
47
|
/**
|
|
@@ -54,10 +49,8 @@ export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
|
|
|
54
49
|
*
|
|
55
50
|
* @param workspace The workspace containing variables.
|
|
56
51
|
* @returns Array of XML block elements.
|
|
57
|
-
* @alias Blockly.Variables.flyoutCategoryBlocks
|
|
58
52
|
*/
|
|
59
53
|
export declare function flyoutCategoryBlocks(workspace: Workspace): Element[];
|
|
60
|
-
/** @alias Blockly.Variables.VAR_LETTER_OPTIONS */
|
|
61
54
|
export declare const VAR_LETTER_OPTIONS = "ijkmnopqrstuvwxyzabcdefgh";
|
|
62
55
|
/**
|
|
63
56
|
* Return a new variable name that is not yet being used. This will try to
|
|
@@ -67,7 +60,6 @@ export declare const VAR_LETTER_OPTIONS = "ijkmnopqrstuvwxyzabcdefgh";
|
|
|
67
60
|
*
|
|
68
61
|
* @param workspace The workspace to be unique in.
|
|
69
62
|
* @returns New variable name.
|
|
70
|
-
* @alias Blockly.Variables.generateUniqueName
|
|
71
63
|
*/
|
|
72
64
|
export declare function generateUniqueName(workspace: Workspace): string;
|
|
73
65
|
/**
|
|
@@ -82,7 +74,6 @@ declare function generateUniqueNameInternal(workspace: Workspace): string;
|
|
|
82
74
|
* @param startChar The character to start the search at.
|
|
83
75
|
* @param usedNames A list of all of the used names.
|
|
84
76
|
* @returns A unique name that is not present in the usedNames array.
|
|
85
|
-
* @alias Blockly.Variables.generateUniqueNameFromOptions
|
|
86
77
|
*/
|
|
87
78
|
export declare function generateUniqueNameFromOptions(startChar: string, usedNames: string[]): string;
|
|
88
79
|
/**
|
|
@@ -100,7 +91,6 @@ export declare function generateUniqueNameFromOptions(startChar: string, usedNam
|
|
|
100
91
|
* an existing variable was chosen.
|
|
101
92
|
* @param opt_type The type of the variable like 'int', 'string', or ''. This
|
|
102
93
|
* will default to '', which is a specific type.
|
|
103
|
-
* @alias Blockly.Variables.createVariableButtonHandler
|
|
104
94
|
*/
|
|
105
95
|
export declare function createVariableButtonHandler(workspace: Workspace, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
|
|
106
96
|
/**
|
|
@@ -113,7 +103,6 @@ export declare function createVariableButtonHandler(workspace: Workspace, opt_ca
|
|
|
113
103
|
* @param opt_callback A callback. It will be passed an acceptable new variable
|
|
114
104
|
* name, or null if change is to be aborted (cancel button), or undefined if
|
|
115
105
|
* an existing variable was chosen.
|
|
116
|
-
* @alias Blockly.Variables.renameVariable
|
|
117
106
|
*/
|
|
118
107
|
export declare function renameVariable(workspace: Workspace, variable: VariableModel, opt_callback?: (p1?: string | null) => void): void;
|
|
119
108
|
/**
|
|
@@ -123,7 +112,6 @@ export declare function renameVariable(workspace: Workspace, variable: VariableM
|
|
|
123
112
|
* @param defaultText The default value to show in the prompt's field.
|
|
124
113
|
* @param callback A callback. It will be passed the new variable name, or null
|
|
125
114
|
* if the user picked something illegal.
|
|
126
|
-
* @alias Blockly.Variables.promptName
|
|
127
115
|
*/
|
|
128
116
|
export declare function promptName(promptText: string, defaultText: string, callback: (p1: string | null) => void): void;
|
|
129
117
|
/**
|
|
@@ -132,15 +120,26 @@ export declare function promptName(promptText: string, defaultText: string, call
|
|
|
132
120
|
* @param name The name to search for.
|
|
133
121
|
* @param workspace The workspace to search for the variable.
|
|
134
122
|
* @returns The variable with the given name, or null if none was found.
|
|
135
|
-
* @alias Blockly.Variables.nameUsedWithAnyType
|
|
136
123
|
*/
|
|
137
124
|
export declare function nameUsedWithAnyType(name: string, workspace: Workspace): VariableModel | null;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the name of the procedure with a conflicting parameter name, or null
|
|
127
|
+
* if one does not exist.
|
|
128
|
+
*
|
|
129
|
+
* This checks the procedure map if it contains models, and the legacy procedure
|
|
130
|
+
* blocks otherwise.
|
|
131
|
+
*
|
|
132
|
+
* @param oldName The old name of the variable.
|
|
133
|
+
* @param newName The proposed name of the variable.
|
|
134
|
+
* @param workspace The workspace to search for conflicting parameters.
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
export declare function nameUsedWithConflictingParam(oldName: string, newName: string, workspace: Workspace): string | null;
|
|
138
138
|
/**
|
|
139
139
|
* Generate DOM objects representing a variable field.
|
|
140
140
|
*
|
|
141
141
|
* @param variableModel The variable model to represent.
|
|
142
142
|
* @returns The generated DOM.
|
|
143
|
-
* @alias Blockly.Variables.generateVariableFieldDom
|
|
144
143
|
*/
|
|
145
144
|
export declare function generateVariableFieldDom(variableModel: VariableModel): Element;
|
|
146
145
|
/**
|
|
@@ -154,7 +153,6 @@ export declare function generateVariableFieldDom(variableModel: VariableModel):
|
|
|
154
153
|
* @param opt_type The type to use to look up or create the variable.
|
|
155
154
|
* @returns The variable corresponding to the given ID or name + type
|
|
156
155
|
* combination.
|
|
157
|
-
* @alias Blockly.Variables.getOrCreateVariablePackage
|
|
158
156
|
*/
|
|
159
157
|
export declare function getOrCreateVariablePackage(workspace: Workspace, id: string | null, opt_name?: string, opt_type?: string): VariableModel;
|
|
160
158
|
/**
|
|
@@ -171,7 +169,6 @@ export declare function getOrCreateVariablePackage(workspace: Workspace, id: str
|
|
|
171
169
|
* Only used if lookup by ID fails.
|
|
172
170
|
* @returns The variable corresponding to the given ID or name + type
|
|
173
171
|
* combination, or null if not found.
|
|
174
|
-
* @alias Blockly.Variables.getVariable
|
|
175
172
|
*/
|
|
176
173
|
export declare function getVariable(workspace: Workspace, id: string | null, opt_name?: string, opt_type?: string): VariableModel | null;
|
|
177
174
|
/**
|
|
@@ -185,7 +182,6 @@ export declare function getVariable(workspace: Workspace, id: string | null, opt
|
|
|
185
182
|
* @returns The new array of variables that were freshly added to the workspace
|
|
186
183
|
* after creating the new block, or [] if no new variables were added to the
|
|
187
184
|
* workspace.
|
|
188
|
-
* @alias Blockly.Variables.getAddedVariables
|
|
189
185
|
* @internal
|
|
190
186
|
*/
|
|
191
187
|
export declare function getAddedVariables(workspace: Workspace, originalVariables: VariableModel[]): VariableModel[];
|
|
@@ -12,8 +12,6 @@ import type { FlyoutButton } from './flyout_button.js';
|
|
|
12
12
|
* variable blocks.
|
|
13
13
|
* See also Blockly.Variables.CATEGORY_NAME and
|
|
14
14
|
* Blockly.Procedures.CATEGORY_NAME.
|
|
15
|
-
*
|
|
16
|
-
* @alias Blockly.VariablesDynamic.CATEGORY_NAME
|
|
17
15
|
*/
|
|
18
16
|
export declare const CATEGORY_NAME = "VARIABLE_DYNAMIC";
|
|
19
17
|
/**
|
|
@@ -43,7 +41,6 @@ export declare const onCreateVariableButtonClick_Colour: typeof colourButtonClic
|
|
|
43
41
|
*
|
|
44
42
|
* @param workspace The workspace containing variables.
|
|
45
43
|
* @returns Array of XML elements.
|
|
46
|
-
* @alias Blockly.VariablesDynamic.flyoutCategory
|
|
47
44
|
*/
|
|
48
45
|
export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
|
|
49
46
|
/**
|
|
@@ -51,7 +48,6 @@ export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
|
|
|
51
48
|
*
|
|
52
49
|
* @param workspace The workspace containing variables.
|
|
53
50
|
* @returns Array of XML block elements.
|
|
54
|
-
* @alias Blockly.VariablesDynamic.flyoutCategoryBlocks
|
|
55
51
|
*/
|
|
56
52
|
export declare function flyoutCategoryBlocks(workspace: Workspace): Element[];
|
|
57
53
|
export {};
|
package/core/warning.d.ts
CHANGED
package/core/widgetdiv.d.ts
CHANGED
|
@@ -9,21 +9,17 @@ import type { Size } from './utils/size.js';
|
|
|
9
9
|
* Returns the HTML container for editor widgets.
|
|
10
10
|
*
|
|
11
11
|
* @returns The editor widget container.
|
|
12
|
-
* @alias Blockly.WidgetDiv.getDiv
|
|
13
12
|
*/
|
|
14
13
|
export declare function getDiv(): HTMLDivElement | null;
|
|
15
14
|
/**
|
|
16
15
|
* Allows unit tests to reset the div. Do not use outside of tests.
|
|
17
16
|
*
|
|
18
17
|
* @param newDiv The new value for the DIV field.
|
|
19
|
-
* @alias Blockly.WidgetDiv.testOnly_setDiv
|
|
20
18
|
* @internal
|
|
21
19
|
*/
|
|
22
20
|
export declare function testOnly_setDiv(newDiv: HTMLDivElement | null): void;
|
|
23
21
|
/**
|
|
24
22
|
* Create the widget div and inject it onto the page.
|
|
25
|
-
*
|
|
26
|
-
* @alias Blockly.WidgetDiv.createDom
|
|
27
23
|
*/
|
|
28
24
|
export declare function createDom(): void;
|
|
29
25
|
/**
|
|
@@ -33,20 +29,16 @@ export declare function createDom(): void;
|
|
|
33
29
|
* @param rtl Right-to-left (true) or left-to-right (false).
|
|
34
30
|
* @param newDispose Optional cleanup function to be run when the widget is
|
|
35
31
|
* closed.
|
|
36
|
-
* @alias Blockly.WidgetDiv.show
|
|
37
32
|
*/
|
|
38
33
|
export declare function show(newOwner: unknown, rtl: boolean, newDispose: () => void): void;
|
|
39
34
|
/**
|
|
40
35
|
* Destroy the widget and hide the div.
|
|
41
|
-
*
|
|
42
|
-
* @alias Blockly.WidgetDiv.hide
|
|
43
36
|
*/
|
|
44
37
|
export declare function hide(): void;
|
|
45
38
|
/**
|
|
46
39
|
* Is the container visible?
|
|
47
40
|
*
|
|
48
41
|
* @returns True if visible.
|
|
49
|
-
* @alias Blockly.WidgetDiv.isVisible
|
|
50
42
|
*/
|
|
51
43
|
export declare function isVisible(): boolean;
|
|
52
44
|
/**
|
|
@@ -54,7 +46,6 @@ export declare function isVisible(): boolean;
|
|
|
54
46
|
* object.
|
|
55
47
|
*
|
|
56
48
|
* @param oldOwner The object that was using this container.
|
|
57
|
-
* @alias Blockly.WidgetDiv.hideIfOwner
|
|
58
49
|
*/
|
|
59
50
|
export declare function hideIfOwner(oldOwner: unknown): void;
|
|
60
51
|
/**
|
|
@@ -71,7 +62,6 @@ export declare function hideIfOwner(oldOwner: unknown): void;
|
|
|
71
62
|
* window coordinates.
|
|
72
63
|
* @param rtl Whether the workspace is in RTL mode. This determines horizontal
|
|
73
64
|
* alignment.
|
|
74
|
-
* @alias Blockly.WidgetDiv.positionWithAnchor
|
|
75
65
|
* @internal
|
|
76
66
|
*/
|
|
77
67
|
export declare function positionWithAnchor(viewportBBox: Rect, anchorBBox: Rect, widgetSize: Size, rtl: boolean): void;
|
package/core/workspace.d.ts
CHANGED
|
@@ -18,8 +18,6 @@ import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
|
18
18
|
/**
|
|
19
19
|
* Class for a workspace. This is a data structure that contains blocks.
|
|
20
20
|
* There is no UI, and can be created headlessly.
|
|
21
|
-
*
|
|
22
|
-
* @alias Blockly.Workspace
|
|
23
21
|
*/
|
|
24
22
|
export declare class Workspace implements IASTNodeLocation {
|
|
25
23
|
/**
|
|
@@ -303,7 +301,9 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
303
301
|
* to be created).
|
|
304
302
|
* @returns True if there is capacity for the given map, false otherwise.
|
|
305
303
|
*/
|
|
306
|
-
isCapacityAvailable(typeCountsMap:
|
|
304
|
+
isCapacityAvailable(typeCountsMap: {
|
|
305
|
+
[key: string]: number;
|
|
306
|
+
}): boolean;
|
|
307
307
|
/**
|
|
308
308
|
* Checks if the workspace has any limits on the maximum number of blocks,
|
|
309
309
|
* or the maximum number of blocks of specific types.
|
|
@@ -7,8 +7,6 @@ import { Coordinate } from './utils/coordinate.js';
|
|
|
7
7
|
import type { Workspace } from './workspace.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a workspace comment.
|
|
10
|
-
*
|
|
11
|
-
* @alias Blockly.WorkspaceComment
|
|
12
10
|
*/
|
|
13
11
|
export declare class WorkspaceComment {
|
|
14
12
|
workspace: Workspace;
|
|
@@ -75,7 +73,7 @@ export declare class WorkspaceComment {
|
|
|
75
73
|
* This is not valid if the comment is currently being dragged.
|
|
76
74
|
* @internal
|
|
77
75
|
*/
|
|
78
|
-
|
|
76
|
+
getRelativeToSurfaceXY(): Coordinate;
|
|
79
77
|
/**
|
|
80
78
|
* Move a comment by a relative offset.
|
|
81
79
|
*
|