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
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
|
*
|
|
@@ -14,8 +14,6 @@ import { WorkspaceComment } from './workspace_comment.js';
|
|
|
14
14
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
15
15
|
/**
|
|
16
16
|
* Class for a workspace comment's SVG representation.
|
|
17
|
-
*
|
|
18
|
-
* @alias Blockly.WorkspaceCommentSvg
|
|
19
17
|
*/
|
|
20
18
|
export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBoundedElement, IBubble, ICopyable {
|
|
21
19
|
/**
|
|
@@ -44,7 +42,7 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
44
42
|
private focused_;
|
|
45
43
|
private autoLayout_;
|
|
46
44
|
private readonly svgGroup_;
|
|
47
|
-
svgRect_:
|
|
45
|
+
svgRect_: SVGRectElement;
|
|
48
46
|
/** Whether the comment is rendered onscreen and is a part of the DOM. */
|
|
49
47
|
private rendered_;
|
|
50
48
|
private readonly useDragSurface_;
|
|
@@ -11,8 +11,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
11
11
|
* Note that the workspace itself manages whether or not it has a drag surface
|
|
12
12
|
* and how to do translations based on that. This simply passes the right
|
|
13
13
|
* commands based on events.
|
|
14
|
-
*
|
|
15
|
-
* @alias Blockly.WorkspaceDragger
|
|
16
14
|
*/
|
|
17
15
|
export declare class WorkspaceDragger {
|
|
18
16
|
private workspace;
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -46,8 +46,6 @@ import { ContextMenuOption } from './contextmenu_registry.js';
|
|
|
46
46
|
/**
|
|
47
47
|
* Class for a workspace. This is an onscreen area with optional trashcan,
|
|
48
48
|
* scrollbars, bubbles, and dragging.
|
|
49
|
-
*
|
|
50
|
-
* @alias Blockly.WorkspaceSvg
|
|
51
49
|
*/
|
|
52
50
|
export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
|
|
53
51
|
/**
|
|
@@ -764,8 +762,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
764
762
|
updateToolbox(toolboxDef: toolbox.ToolboxDefinition | null): void;
|
|
765
763
|
/** Mark this workspace as the currently focused main workspace. */
|
|
766
764
|
markFocused(): void;
|
|
767
|
-
/** Set the workspace to have focus in the browser. */
|
|
768
|
-
private setBrowserFocus;
|
|
769
765
|
/**
|
|
770
766
|
* Zooms the workspace in or out relative to/centered on the given (x, y)
|
|
771
767
|
* coordinate.
|
|
@@ -805,11 +801,13 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
805
801
|
scrollCenter(): void;
|
|
806
802
|
/**
|
|
807
803
|
* Scroll the workspace to center on the given block. If the block has other
|
|
808
|
-
* blocks stacked below it, the workspace will be centered on the stack
|
|
804
|
+
* blocks stacked below it, the workspace will be centered on the stack,
|
|
805
|
+
* unless blockOnly is true.
|
|
809
806
|
*
|
|
810
807
|
* @param id ID of block center on.
|
|
808
|
+
* @param blockOnly True to center only on the block itself, not its stack.
|
|
811
809
|
*/
|
|
812
|
-
centerOnBlock(id: string | null): void;
|
|
810
|
+
centerOnBlock(id: string | null, blockOnly?: boolean): void;
|
|
813
811
|
/**
|
|
814
812
|
* Set the workspace's zoom factor.
|
|
815
813
|
*
|
|
@@ -1017,7 +1015,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
1017
1015
|
* scrollbars accordingly.
|
|
1018
1016
|
*
|
|
1019
1017
|
* @param workspace The workspace to resize.
|
|
1020
|
-
* @alias Blockly.WorkspaceSvg.resizeSvgContents
|
|
1021
1018
|
* @internal
|
|
1022
1019
|
*/
|
|
1023
1020
|
export declare function resizeSvgContents(workspace: WorkspaceSvg): void;
|
package/core/xml.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
13
13
|
* @param workspace The workspace containing blocks.
|
|
14
14
|
* @param opt_noId True if the encoder should skip the block IDs.
|
|
15
15
|
* @returns XML DOM element.
|
|
16
|
-
* @alias Blockly.Xml.workspaceToDom
|
|
17
16
|
*/
|
|
18
17
|
export declare function workspaceToDom(workspace: Workspace, opt_noId?: boolean): Element;
|
|
19
18
|
/**
|
|
@@ -21,7 +20,6 @@ export declare function workspaceToDom(workspace: Workspace, opt_noId?: boolean)
|
|
|
21
20
|
*
|
|
22
21
|
* @param variableList List of all variable models.
|
|
23
22
|
* @returns Tree of XML elements.
|
|
24
|
-
* @alias Blockly.Xml.variablesToDom
|
|
25
23
|
*/
|
|
26
24
|
export declare function variablesToDom(variableList: VariableModel[]): Element;
|
|
27
25
|
/**
|
|
@@ -31,7 +29,6 @@ export declare function variablesToDom(variableList: VariableModel[]): Element;
|
|
|
31
29
|
* @param opt_noId True if the encoder should skip the block ID.
|
|
32
30
|
* @returns Tree of XML elements or an empty document fragment if the block was
|
|
33
31
|
* an insertion marker.
|
|
34
|
-
* @alias Blockly.Xml.blockToDomWithXY
|
|
35
32
|
*/
|
|
36
33
|
export declare function blockToDomWithXY(block: Block, opt_noId?: boolean): Element | DocumentFragment;
|
|
37
34
|
/**
|
|
@@ -41,7 +38,6 @@ export declare function blockToDomWithXY(block: Block, opt_noId?: boolean): Elem
|
|
|
41
38
|
* @param opt_noId True if the encoder should skip the block ID.
|
|
42
39
|
* @returns Tree of XML elements or an empty document fragment if the block was
|
|
43
40
|
* an insertion marker.
|
|
44
|
-
* @alias Blockly.Xml.blockToDom
|
|
45
41
|
*/
|
|
46
42
|
export declare function blockToDom(block: Block, opt_noId?: boolean): Element | DocumentFragment;
|
|
47
43
|
/**
|
|
@@ -51,7 +47,6 @@ export declare function blockToDom(block: Block, opt_noId?: boolean): Element |
|
|
|
51
47
|
*
|
|
52
48
|
* @param dom A tree of XML nodes.
|
|
53
49
|
* @returns Text representation.
|
|
54
|
-
* @alias Blockly.Xml.domToText
|
|
55
50
|
*/
|
|
56
51
|
export declare function domToText(dom: Node): string;
|
|
57
52
|
/**
|
|
@@ -59,7 +54,6 @@ export declare function domToText(dom: Node): string;
|
|
|
59
54
|
*
|
|
60
55
|
* @param dom A tree of XML elements.
|
|
61
56
|
* @returns Text representation.
|
|
62
|
-
* @alias Blockly.Xml.domToPrettyText
|
|
63
57
|
*/
|
|
64
58
|
export declare function domToPrettyText(dom: Node): string;
|
|
65
59
|
/**
|
|
@@ -69,7 +63,7 @@ export declare function domToPrettyText(dom: Node): string;
|
|
|
69
63
|
* @returns A DOM object representing the singular child of the document
|
|
70
64
|
* element.
|
|
71
65
|
* @throws if the text doesn't parse.
|
|
72
|
-
* @
|
|
66
|
+
* @deprecated Moved to core/utils/xml.js.
|
|
73
67
|
*/
|
|
74
68
|
export declare function textToDom(text: string): Element;
|
|
75
69
|
/**
|
|
@@ -79,7 +73,6 @@ export declare function textToDom(text: string): Element;
|
|
|
79
73
|
* @param xml XML DOM.
|
|
80
74
|
* @param workspace The workspace.
|
|
81
75
|
* @returns An array containing new block IDs.
|
|
82
|
-
* @alias Blockly.Xml.clearWorkspaceAndLoadFromXml
|
|
83
76
|
*/
|
|
84
77
|
export declare function clearWorkspaceAndLoadFromXml(xml: Element, workspace: WorkspaceSvg): string[];
|
|
85
78
|
/**
|
|
@@ -90,7 +83,6 @@ export declare function clearWorkspaceAndLoadFromXml(xml: Element, workspace: Wo
|
|
|
90
83
|
* @returns An array containing new block IDs.
|
|
91
84
|
* @suppress {strictModuleDepCheck} Suppress module check while workspace
|
|
92
85
|
* comments are not bundled in.
|
|
93
|
-
* @alias Blockly.Xml.domToWorkspace
|
|
94
86
|
*/
|
|
95
87
|
export declare function domToWorkspace(xml: Element, workspace: Workspace): string[];
|
|
96
88
|
/**
|
|
@@ -100,7 +92,6 @@ export declare function domToWorkspace(xml: Element, workspace: Workspace): stri
|
|
|
100
92
|
* @param xml The XML DOM.
|
|
101
93
|
* @param workspace The workspace to add to.
|
|
102
94
|
* @returns An array containing new block IDs.
|
|
103
|
-
* @alias Blockly.Xml.appendDomToWorkspace
|
|
104
95
|
*/
|
|
105
96
|
export declare function appendDomToWorkspace(xml: Element, workspace: WorkspaceSvg): string[];
|
|
106
97
|
/**
|
|
@@ -110,7 +101,6 @@ export declare function appendDomToWorkspace(xml: Element, workspace: WorkspaceS
|
|
|
110
101
|
* @param xmlBlock XML block element.
|
|
111
102
|
* @param workspace The workspace.
|
|
112
103
|
* @returns The root block created.
|
|
113
|
-
* @alias Blockly.Xml.domToBlock
|
|
114
104
|
*/
|
|
115
105
|
export declare function domToBlock(xmlBlock: Element, workspace: Workspace): Block;
|
|
116
106
|
/**
|
|
@@ -118,7 +108,6 @@ export declare function domToBlock(xmlBlock: Element, workspace: Workspace): Blo
|
|
|
118
108
|
*
|
|
119
109
|
* @param xmlVariables List of XML variable elements.
|
|
120
110
|
* @param workspace The workspace to which the variable should be added.
|
|
121
|
-
* @alias Blockly.Xml.domToVariables
|
|
122
111
|
*/
|
|
123
112
|
export declare function domToVariables(xmlVariables: Element, workspace: Workspace): void;
|
|
124
113
|
/**
|
|
@@ -126,7 +115,6 @@ export declare function domToVariables(xmlVariables: Element, workspace: Workspa
|
|
|
126
115
|
*
|
|
127
116
|
* @param xmlBlock XML block element or an empty DocumentFragment if the block
|
|
128
117
|
* was an insertion marker.
|
|
129
|
-
* @alias Blockly.Xml.deleteNext
|
|
130
118
|
*/
|
|
131
119
|
export declare function deleteNext(xmlBlock: Element | DocumentFragment): void;
|
|
132
120
|
//# sourceMappingURL=xml.d.ts.map
|
package/core/zoom_controls.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import { Rect } from './utils/rect.js';
|
|
|
10
10
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for a zoom controls.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.ZoomControls
|
|
15
13
|
*/
|
|
16
14
|
export declare class ZoomControls implements IPositionable {
|
|
17
15
|
private readonly workspace;
|
|
@@ -21,20 +19,11 @@ export declare class ZoomControls implements IPositionable {
|
|
|
21
19
|
*/
|
|
22
20
|
id: string;
|
|
23
21
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* Array holding info needed to unbind events.
|
|
23
|
+
* Used for disposing.
|
|
24
|
+
* Ex: [[node, name, func], [node, name, func]].
|
|
26
25
|
*/
|
|
27
|
-
private
|
|
28
|
-
/**
|
|
29
|
-
* A handle to use to unbind the mouse down event handler for zoom in
|
|
30
|
-
* button. Opaque data returned from browserEvents.conditionalBind.
|
|
31
|
-
*/
|
|
32
|
-
private onZoomInWrapper;
|
|
33
|
-
/**
|
|
34
|
-
* A handle to use to unbind the mouse down event handler for zoom out
|
|
35
|
-
* button. Opaque data returned from browserEvents.conditionalBind.
|
|
36
|
-
*/
|
|
37
|
-
private onZoomOutWrapper;
|
|
26
|
+
private boundEvents;
|
|
38
27
|
/** The zoom in svg <g> element. */
|
|
39
28
|
private zoomInGroup;
|
|
40
29
|
/** The zoom out svg <g> element. */
|