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
|
@@ -10,26 +10,19 @@ import type { ConstantProvider } from './constants.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* An object that handles creating and setting each of the SVG elements
|
|
12
12
|
* used by the renderer.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.geras.PathObject
|
|
15
13
|
*/
|
|
16
14
|
export declare class PathObject extends BasePathObject {
|
|
17
15
|
constants: ConstantProvider;
|
|
18
|
-
/** @internal */
|
|
19
16
|
svgPathDark: SVGElement;
|
|
20
|
-
/** @internal */
|
|
21
17
|
svgPathLight: SVGElement;
|
|
22
18
|
/**
|
|
23
19
|
* The colour of the dark path on the block in '#RRGGBB' format.
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
20
|
*/
|
|
27
21
|
colourDark: string;
|
|
28
22
|
/**
|
|
29
23
|
* @param root The root SVG element.
|
|
30
24
|
* @param style The style object to use for colouring.
|
|
31
25
|
* @param constants The renderer's constants.
|
|
32
|
-
* @internal
|
|
33
26
|
*/
|
|
34
27
|
constructor(root: SVGElement, style: BlockStyle, constants: ConstantProvider);
|
|
35
28
|
setPath(mainPath: string): void;
|
|
@@ -37,7 +30,6 @@ export declare class PathObject extends BasePathObject {
|
|
|
37
30
|
* Set the highlight path generated by the renderer onto the SVG element.
|
|
38
31
|
*
|
|
39
32
|
* @param highlightPath The highlight path.
|
|
40
|
-
* @internal
|
|
41
33
|
*/
|
|
42
34
|
setHighlightPath(highlightPath: string): void;
|
|
43
35
|
flipRTL(): void;
|
|
@@ -13,23 +13,23 @@ import { HighlightConstantProvider } from './highlight_constants.js';
|
|
|
13
13
|
import { RenderInfo } from './info.js';
|
|
14
14
|
import { PathObject } from './path_object.js';
|
|
15
15
|
/**
|
|
16
|
-
* The geras renderer.
|
|
16
|
+
* The geras renderer. This renderer was designed to be backwards compatible
|
|
17
|
+
* with pre-2019 Blockly. Newer projects that are not constrained by backwards
|
|
18
|
+
* compatibility should use thrasos, which is a more modern take on this
|
|
19
|
+
* renderer.
|
|
17
20
|
*
|
|
18
|
-
*
|
|
21
|
+
* Geras is the ancient Greek spirit of old age.
|
|
19
22
|
*/
|
|
20
23
|
export declare class Renderer extends BaseRenderer {
|
|
21
24
|
/** The renderer's highlight constant provider. */
|
|
22
25
|
private highlightConstants_;
|
|
23
26
|
/**
|
|
24
27
|
* @param name The renderer name.
|
|
25
|
-
* @internal
|
|
26
28
|
*/
|
|
27
29
|
constructor(name: string);
|
|
28
30
|
/**
|
|
29
31
|
* Initialize the renderer. Geras has a highlight provider in addition to
|
|
30
32
|
* the normal constant provider.
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
33
|
*/
|
|
34
34
|
init(theme: Theme, opt_rendererOverrides?: {
|
|
35
35
|
[rendererConstant: string]: any;
|
|
@@ -58,7 +58,6 @@ export declare class Renderer extends BaseRenderer {
|
|
|
58
58
|
* @param root The root SVG element.
|
|
59
59
|
* @param style The style object to use for colouring.
|
|
60
60
|
* @returns The renderer path object.
|
|
61
|
-
* @internal
|
|
62
61
|
*/
|
|
63
62
|
makePathObject(root: SVGElement, style: BlockStyle): PathObject;
|
|
64
63
|
/**
|
|
@@ -72,7 +71,6 @@ export declare class Renderer extends BaseRenderer {
|
|
|
72
71
|
* is called, the renderer has already been initialized.
|
|
73
72
|
*
|
|
74
73
|
* @returns The highlight constant provider.
|
|
75
|
-
* @internal
|
|
76
74
|
*/
|
|
77
75
|
getHighlightConstants(): HighlightConstantProvider;
|
|
78
76
|
}
|
|
@@ -8,8 +8,6 @@ import type { ConstantProvider } from '../common/constants.js';
|
|
|
8
8
|
* The base class to represent a part of a block that takes up space during
|
|
9
9
|
* rendering. The constructor for each non-spacer Measurable records the size
|
|
10
10
|
* of the block element (e.g. field, statement input).
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.Measurable
|
|
13
11
|
*/
|
|
14
12
|
export declare class Measurable {
|
|
15
13
|
width: number;
|
|
@@ -22,7 +20,6 @@ export declare class Measurable {
|
|
|
22
20
|
protected readonly constants_: ConstantProvider;
|
|
23
21
|
/**
|
|
24
22
|
* @param constants The rendering constants provider.
|
|
25
|
-
* @internal
|
|
26
23
|
*/
|
|
27
24
|
constructor(constants: ConstantProvider);
|
|
28
25
|
}
|
|
@@ -12,28 +12,20 @@ import { Row } from './row.js';
|
|
|
12
12
|
* a block as well as spacing information for the bottom row.
|
|
13
13
|
* Elements in a bottom row can consist of corners, spacers and next
|
|
14
14
|
* connections.
|
|
15
|
-
*
|
|
16
|
-
* @alias Blockly.blockRendering.BottomRow
|
|
17
15
|
*/
|
|
18
16
|
export declare class BottomRow extends Row {
|
|
19
17
|
/**
|
|
20
18
|
* Whether this row has a next connection.
|
|
21
|
-
*
|
|
22
|
-
* @internal
|
|
23
19
|
*/
|
|
24
20
|
hasNextConnection: boolean;
|
|
25
21
|
/**
|
|
26
22
|
* The next connection on the row, if any.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
23
|
*/
|
|
30
24
|
connection: NextConnection | null;
|
|
31
25
|
/**
|
|
32
26
|
* The amount that the bottom of the block extends below the horizontal
|
|
33
27
|
* edge, e.g. because of a next connection. Must be non-negative (see
|
|
34
28
|
* #2820).
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
29
|
*/
|
|
38
30
|
descenderHeight: number;
|
|
39
31
|
/**
|
|
@@ -43,7 +35,6 @@ export declare class BottomRow extends Row {
|
|
|
43
35
|
baseline: number;
|
|
44
36
|
/**
|
|
45
37
|
* @param constants The rendering constants provider.
|
|
46
|
-
* @internal
|
|
47
38
|
*/
|
|
48
39
|
constructor(constants: ConstantProvider);
|
|
49
40
|
/**
|
|
@@ -9,8 +9,6 @@ import { Measurable } from './base.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* The base class to represent a connection and the space that it takes up on
|
|
11
11
|
* the block.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.Connection
|
|
14
12
|
*/
|
|
15
13
|
export declare class Connection extends Measurable {
|
|
16
14
|
connectionModel: RenderedConnection;
|
|
@@ -20,7 +18,6 @@ export declare class Connection extends Measurable {
|
|
|
20
18
|
* @param constants The rendering constants provider.
|
|
21
19
|
* @param connectionModel The connection object on the block that this
|
|
22
20
|
* represents.
|
|
23
|
-
* @internal
|
|
24
21
|
*/
|
|
25
22
|
constructor(constants: ConstantProvider, connectionModel: RenderedConnection);
|
|
26
23
|
}
|
|
@@ -9,8 +9,6 @@ import { InputConnection } from './input_connection.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space an external value input
|
|
11
11
|
* takes up during rendering
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.ExternalValueInput
|
|
14
12
|
*/
|
|
15
13
|
export declare class ExternalValueInput extends InputConnection {
|
|
16
14
|
height: number;
|
|
@@ -21,7 +19,6 @@ export declare class ExternalValueInput extends InputConnection {
|
|
|
21
19
|
/**
|
|
22
20
|
* @param constants The rendering constants provider.
|
|
23
21
|
* @param input The external value input to measure and store information for.
|
|
24
|
-
* @internal
|
|
25
22
|
*/
|
|
26
23
|
constructor(constants: ConstantProvider, input: Input);
|
|
27
24
|
}
|
|
@@ -10,8 +10,6 @@ import { Measurable } from './base.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* An object containing information about the space a field takes up during
|
|
12
12
|
* rendering
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.blockRendering.Field
|
|
15
13
|
*/
|
|
16
14
|
export declare class Field extends Measurable {
|
|
17
15
|
field: BlocklyField;
|
|
@@ -24,7 +22,6 @@ export declare class Field extends Measurable {
|
|
|
24
22
|
* @param constants The rendering constants provider.
|
|
25
23
|
* @param field The field to measure and store information for.
|
|
26
24
|
* @param parentInput The parent input for the field.
|
|
27
|
-
* @internal
|
|
28
25
|
*/
|
|
29
26
|
constructor(constants: ConstantProvider, field: BlocklyField, parentInput: Input);
|
|
30
27
|
}
|
|
@@ -8,14 +8,11 @@ import { Measurable } from './base.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* An object containing information about the space a hat takes up during
|
|
10
10
|
* rendering.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.Hat
|
|
13
11
|
*/
|
|
14
12
|
export declare class Hat extends Measurable {
|
|
15
13
|
ascenderHeight: number;
|
|
16
14
|
/**
|
|
17
15
|
* @param constants The rendering constants provider.
|
|
18
|
-
* @internal
|
|
19
16
|
*/
|
|
20
17
|
constructor(constants: ConstantProvider);
|
|
21
18
|
}
|
|
@@ -8,9 +8,7 @@ import type { ConstantProvider } from '../common/constants.js';
|
|
|
8
8
|
import { Measurable } from './base.js';
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space an icon takes up during
|
|
11
|
-
* rendering
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.Icon
|
|
11
|
+
* rendering.
|
|
14
12
|
*/
|
|
15
13
|
export declare class Icon extends Measurable {
|
|
16
14
|
icon: BlocklyIcon;
|
|
@@ -18,11 +16,10 @@ export declare class Icon extends Measurable {
|
|
|
18
16
|
flipRtl: boolean;
|
|
19
17
|
/**
|
|
20
18
|
* An object containing information about the space an icon takes up during
|
|
21
|
-
* rendering
|
|
19
|
+
* rendering.
|
|
22
20
|
*
|
|
23
21
|
* @param constants The rendering constants provider.
|
|
24
22
|
* @param icon The icon to measure and store information for.
|
|
25
|
-
* @internal
|
|
26
23
|
*/
|
|
27
24
|
constructor(constants: ConstantProvider, icon: BlocklyIcon);
|
|
28
25
|
}
|
|
@@ -8,14 +8,11 @@ import { Measurable } from './base.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* An object containing information about a spacer between two elements on a
|
|
10
10
|
* row.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.InRowSpacer
|
|
13
11
|
*/
|
|
14
12
|
export declare class InRowSpacer extends Measurable {
|
|
15
13
|
/**
|
|
16
14
|
* @param constants The rendering constants provider.
|
|
17
15
|
* @param width The width of the spacer.
|
|
18
|
-
* @internal
|
|
19
16
|
*/
|
|
20
17
|
constructor(constants: ConstantProvider, width: number);
|
|
21
18
|
}
|
|
@@ -8,9 +8,7 @@ import type { ConstantProvider } from '../common/constants.js';
|
|
|
8
8
|
import { InputConnection } from './input_connection.js';
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space an inline input takes up
|
|
11
|
-
* during rendering
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.InlineInput
|
|
11
|
+
* during rendering.
|
|
14
12
|
*/
|
|
15
13
|
export declare class InlineInput extends InputConnection {
|
|
16
14
|
connectionHeight: number;
|
|
@@ -18,7 +16,6 @@ export declare class InlineInput extends InputConnection {
|
|
|
18
16
|
/**
|
|
19
17
|
* @param constants The rendering constants provider.
|
|
20
18
|
* @param input The inline input to measure and store information for.
|
|
21
|
-
* @internal
|
|
22
19
|
*/
|
|
23
20
|
constructor(constants: ConstantProvider, input: Input);
|
|
24
21
|
}
|
|
@@ -9,9 +9,7 @@ import type { ConstantProvider } from '../common/constants.js';
|
|
|
9
9
|
import { Connection } from './connection.js';
|
|
10
10
|
/**
|
|
11
11
|
* The base class to represent an input that takes up space on a block
|
|
12
|
-
* during rendering
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.blockRendering.InputConnection
|
|
12
|
+
* during rendering.
|
|
15
13
|
*/
|
|
16
14
|
export declare class InputConnection extends Connection {
|
|
17
15
|
input: Input;
|
|
@@ -24,7 +22,6 @@ export declare class InputConnection extends Connection {
|
|
|
24
22
|
/**
|
|
25
23
|
* @param constants The rendering constants provider.
|
|
26
24
|
* @param input The input to measure and store information for.
|
|
27
|
-
* @internal
|
|
28
25
|
*/
|
|
29
26
|
constructor(constants: ConstantProvider, input: Input);
|
|
30
27
|
}
|
|
@@ -7,25 +7,18 @@ import type { ConstantProvider } from '../common/constants.js';
|
|
|
7
7
|
import { Row } from './row.js';
|
|
8
8
|
/**
|
|
9
9
|
* An object containing information about a row that holds one or more inputs.
|
|
10
|
-
*
|
|
11
|
-
* @alias Blockly.blockRendering.InputRow
|
|
12
10
|
*/
|
|
13
11
|
export declare class InputRow extends Row {
|
|
14
12
|
/**
|
|
15
13
|
* The total width of all blocks connected to this row.
|
|
16
|
-
*
|
|
17
|
-
* @internal
|
|
18
14
|
*/
|
|
19
15
|
connectedBlockWidths: number;
|
|
20
16
|
/**
|
|
21
17
|
* @param constants The rendering constants provider.
|
|
22
|
-
* @internal
|
|
23
18
|
*/
|
|
24
19
|
constructor(constants: ConstantProvider);
|
|
25
20
|
/**
|
|
26
21
|
* Inspect all subcomponents and populate all size properties on the row.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
22
|
*/
|
|
30
23
|
measure(): void;
|
|
31
24
|
endsWithElemSpacer(): boolean;
|
|
@@ -6,15 +6,12 @@
|
|
|
6
6
|
import type { ConstantProvider } from '../common/constants.js';
|
|
7
7
|
import { Measurable } from './base.js';
|
|
8
8
|
/**
|
|
9
|
-
* An object containing information about the jagged edge of a
|
|
10
|
-
* takes up during rendering
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.JaggedEdge
|
|
9
|
+
* An object containing information about the space the jagged edge of a
|
|
10
|
+
* collapsed block takes up during rendering.
|
|
13
11
|
*/
|
|
14
12
|
export declare class JaggedEdge extends Measurable {
|
|
15
13
|
/**
|
|
16
14
|
* @param constants The rendering constants provider.
|
|
17
|
-
* @internal
|
|
18
15
|
*/
|
|
19
16
|
constructor(constants: ConstantProvider);
|
|
20
17
|
}
|
|
@@ -9,15 +9,12 @@ import { Connection } from './connection.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space a next connection takes
|
|
11
11
|
* up during rendering.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.NextConnection
|
|
14
12
|
*/
|
|
15
13
|
export declare class NextConnection extends Connection {
|
|
16
14
|
/**
|
|
17
15
|
* @param constants The rendering constants provider.
|
|
18
16
|
* @param connectionModel The connection object on the block that this
|
|
19
17
|
* represents.
|
|
20
|
-
* @internal
|
|
21
18
|
*/
|
|
22
19
|
constructor(constants: ConstantProvider, connectionModel: RenderedConnection);
|
|
23
20
|
}
|
|
@@ -9,8 +9,6 @@ import { Connection } from './connection.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space an output connection takes
|
|
11
11
|
* up during rendering.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.OutputConnection
|
|
14
12
|
*/
|
|
15
13
|
export declare class OutputConnection extends Connection {
|
|
16
14
|
startX: number;
|
|
@@ -20,7 +18,6 @@ export declare class OutputConnection extends Connection {
|
|
|
20
18
|
* @param constants The rendering constants provider.
|
|
21
19
|
* @param connectionModel The connection object on the block that this
|
|
22
20
|
* represents.
|
|
23
|
-
* @internal
|
|
24
21
|
*/
|
|
25
22
|
constructor(constants: ConstantProvider, connectionModel: RenderedConnection);
|
|
26
23
|
}
|
|
@@ -9,15 +9,12 @@ import { Connection } from './connection.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space a previous connection takes
|
|
11
11
|
* up during rendering.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.PreviousConnection
|
|
14
12
|
*/
|
|
15
13
|
export declare class PreviousConnection extends Connection {
|
|
16
14
|
/**
|
|
17
15
|
* @param constants The rendering constants provider.
|
|
18
16
|
* @param connectionModel The connection object on the block that this
|
|
19
17
|
* represents.
|
|
20
|
-
* @internal
|
|
21
18
|
*/
|
|
22
19
|
constructor(constants: ConstantProvider, connectionModel: RenderedConnection);
|
|
23
20
|
}
|
|
@@ -8,14 +8,11 @@ import { Measurable } from './base.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* An object containing information about the space a rounded corner takes up
|
|
10
10
|
* during rendering.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.RoundCorner
|
|
13
11
|
*/
|
|
14
12
|
export declare class RoundCorner extends Measurable {
|
|
15
13
|
/**
|
|
16
14
|
* @param constants The rendering constants provider.
|
|
17
15
|
* @param opt_position The position of this corner.
|
|
18
|
-
* @internal
|
|
19
16
|
*/
|
|
20
17
|
constructor(constants: ConstantProvider, opt_position?: string);
|
|
21
18
|
}
|
|
@@ -10,75 +10,52 @@ import type { InputConnection } from './input_connection.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* An object representing a single row on a rendered block and all of its
|
|
12
12
|
* subcomponents.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.blockRendering.Row
|
|
15
13
|
*/
|
|
16
14
|
export declare class Row {
|
|
17
|
-
/** @internal */
|
|
18
15
|
type: number;
|
|
19
16
|
/**
|
|
20
17
|
* An array of elements contained in this row.
|
|
21
|
-
*
|
|
22
|
-
* @internal
|
|
23
18
|
*/
|
|
24
19
|
elements: Measurable[];
|
|
25
20
|
/**
|
|
26
21
|
* The height of the row.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
22
|
*/
|
|
30
23
|
height: number;
|
|
31
24
|
/**
|
|
32
25
|
* The width of the row, from the left edge of the block to the right.
|
|
33
26
|
* Does not include child blocks unless they are inline.
|
|
34
|
-
*
|
|
35
|
-
* @internal
|
|
36
27
|
*/
|
|
37
28
|
width: number;
|
|
38
29
|
/**
|
|
39
30
|
* The minimum height of the row.
|
|
40
|
-
*
|
|
41
|
-
* @internal
|
|
42
31
|
*/
|
|
43
32
|
minHeight: number;
|
|
44
33
|
/**
|
|
45
34
|
* The minimum width of the row, from the left edge of the block to the
|
|
46
35
|
* right. Does not include child blocks unless they are inline.
|
|
47
|
-
*
|
|
48
|
-
* @internal
|
|
49
36
|
*/
|
|
50
37
|
minWidth: number;
|
|
51
38
|
/**
|
|
52
39
|
* The width of the row, from the left edge of the block to the edge of the
|
|
53
40
|
* block or any connected child blocks.
|
|
54
|
-
*
|
|
55
|
-
* @internal
|
|
56
41
|
*/
|
|
57
42
|
widthWithConnectedBlocks: number;
|
|
58
43
|
/**
|
|
59
44
|
* The Y position of the row relative to the origin of the block's svg
|
|
60
45
|
* group.
|
|
61
|
-
*
|
|
62
|
-
* @internal
|
|
63
46
|
*/
|
|
64
47
|
yPos: number;
|
|
65
48
|
/**
|
|
66
49
|
* The X position of the row relative to the origin of the block's svg
|
|
67
50
|
* group.
|
|
68
|
-
*
|
|
69
|
-
* @internal
|
|
70
51
|
*/
|
|
71
52
|
xPos: number;
|
|
72
53
|
/**
|
|
73
54
|
* Whether the row has any external inputs.
|
|
74
|
-
*
|
|
75
|
-
* @internal
|
|
76
55
|
*/
|
|
77
56
|
hasExternalInput: boolean;
|
|
78
57
|
/**
|
|
79
58
|
* Whether the row has any statement inputs.
|
|
80
|
-
*
|
|
81
|
-
* @internal
|
|
82
59
|
*/
|
|
83
60
|
hasStatement: boolean;
|
|
84
61
|
/**
|
|
@@ -89,74 +66,58 @@ export declare class Row {
|
|
|
89
66
|
statementEdge: number;
|
|
90
67
|
/**
|
|
91
68
|
* Whether the row has any inline inputs.
|
|
92
|
-
*
|
|
93
|
-
* @internal
|
|
94
69
|
*/
|
|
95
70
|
hasInlineInput: boolean;
|
|
96
71
|
/**
|
|
97
72
|
* Whether the row has any dummy inputs.
|
|
98
|
-
*
|
|
99
|
-
* @internal
|
|
100
73
|
*/
|
|
101
74
|
hasDummyInput: boolean;
|
|
102
75
|
/**
|
|
103
76
|
* Whether the row has a jagged edge.
|
|
104
|
-
*
|
|
105
|
-
* @internal
|
|
106
77
|
*/
|
|
107
78
|
hasJaggedEdge: boolean;
|
|
108
79
|
notchOffset: number;
|
|
109
80
|
/**
|
|
110
81
|
* Alignment of the row.
|
|
111
|
-
*
|
|
112
|
-
* @internal
|
|
113
82
|
*/
|
|
114
83
|
align: number | null;
|
|
115
84
|
protected readonly constants_: ConstantProvider;
|
|
116
85
|
/**
|
|
117
86
|
* @param constants The rendering constants provider.
|
|
118
|
-
* @internal
|
|
119
87
|
*/
|
|
120
88
|
constructor(constants: ConstantProvider);
|
|
121
89
|
/**
|
|
122
90
|
* Get the last input on this row, if it has one.
|
|
123
91
|
*
|
|
124
92
|
* @returns The last input on the row, or null.
|
|
125
|
-
* @internal
|
|
126
93
|
*/
|
|
127
94
|
getLastInput(): InputConnection | null;
|
|
128
95
|
/**
|
|
129
96
|
* Inspect all subcomponents and populate all size properties on the row.
|
|
130
|
-
*
|
|
131
|
-
* @internal
|
|
132
97
|
*/
|
|
133
98
|
measure(): void;
|
|
134
99
|
/**
|
|
135
100
|
* Determines whether this row should start with an element spacer.
|
|
136
101
|
*
|
|
137
102
|
* @returns Whether the row should start with a spacer.
|
|
138
|
-
* @internal
|
|
139
103
|
*/
|
|
140
104
|
startsWithElemSpacer(): boolean;
|
|
141
105
|
/**
|
|
142
106
|
* Determines whether this row should end with an element spacer.
|
|
143
107
|
*
|
|
144
108
|
* @returns Whether the row should end with a spacer.
|
|
145
|
-
* @internal
|
|
146
109
|
*/
|
|
147
110
|
endsWithElemSpacer(): boolean;
|
|
148
111
|
/**
|
|
149
112
|
* Convenience method to get the first spacer element on this row.
|
|
150
113
|
*
|
|
151
114
|
* @returns The first spacer element on this row.
|
|
152
|
-
* @internal
|
|
153
115
|
*/
|
|
154
116
|
getFirstSpacer(): InRowSpacer | null;
|
|
155
117
|
/**
|
|
156
118
|
* Convenience method to get the last spacer element on this row.
|
|
157
119
|
*
|
|
158
120
|
* @returns The last spacer element on this row.
|
|
159
|
-
* @internal
|
|
160
121
|
*/
|
|
161
122
|
getLastSpacer(): InRowSpacer | null;
|
|
162
123
|
}
|
|
@@ -8,8 +8,6 @@ import { InRowSpacer } from './in_row_spacer.js';
|
|
|
8
8
|
import { Row } from './row.js';
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about a spacer between two rows.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.SpacerRow
|
|
13
11
|
*/
|
|
14
12
|
export declare class SpacerRow extends Row {
|
|
15
13
|
height: number;
|
|
@@ -22,7 +20,6 @@ export declare class SpacerRow extends Row {
|
|
|
22
20
|
* @param constants The rendering constants provider.
|
|
23
21
|
* @param height The height of the spacer.
|
|
24
22
|
* @param width The width of the spacer.
|
|
25
|
-
* @internal
|
|
26
23
|
*/
|
|
27
24
|
constructor(constants: ConstantProvider, height: number, width: number);
|
|
28
25
|
measure(): void;
|
|
@@ -8,14 +8,11 @@ import { Measurable } from './base.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* An object containing information about the space a square corner takes up
|
|
10
10
|
* during rendering.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.blockRendering.SquareCorner
|
|
13
11
|
*/
|
|
14
12
|
export declare class SquareCorner extends Measurable {
|
|
15
13
|
/**
|
|
16
14
|
* @param constants The rendering constants provider.
|
|
17
15
|
* @param opt_position The position of this corner.
|
|
18
|
-
* @internal
|
|
19
16
|
*/
|
|
20
17
|
constructor(constants: ConstantProvider, opt_position?: string);
|
|
21
18
|
}
|
|
@@ -9,14 +9,11 @@ import { InputConnection } from './input_connection.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* An object containing information about the space a statement input takes up
|
|
11
11
|
* during rendering
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.blockRendering.StatementInput
|
|
14
12
|
*/
|
|
15
13
|
export declare class StatementInput extends InputConnection {
|
|
16
14
|
/**
|
|
17
15
|
* @param constants The rendering constants provider.
|
|
18
16
|
* @param input The statement input to measure and store information for.
|
|
19
|
-
* @internal
|
|
20
17
|
*/
|
|
21
18
|
constructor(constants: ConstantProvider, input: Input);
|
|
22
19
|
}
|
|
@@ -14,16 +14,12 @@ import { Row } from './row.js';
|
|
|
14
14
|
* connections.
|
|
15
15
|
* After this constructor is called, the row will contain all non-spacer
|
|
16
16
|
* elements it needs.
|
|
17
|
-
*
|
|
18
|
-
* @alias Blockly.blockRendering.TopRow
|
|
19
17
|
*/
|
|
20
18
|
export declare class TopRow extends Row {
|
|
21
19
|
/**
|
|
22
20
|
* The starting point for drawing the row, in the y direction.
|
|
23
21
|
* This allows us to draw hats and similar shapes that don't start at the
|
|
24
22
|
* origin. Must be non-negative (see #2820).
|
|
25
|
-
*
|
|
26
|
-
* @internal
|
|
27
23
|
*/
|
|
28
24
|
capline: number;
|
|
29
25
|
/** How much the row extends up above its capline. */
|
|
@@ -34,7 +30,6 @@ export declare class TopRow extends Row {
|
|
|
34
30
|
connection: PreviousConnection | null;
|
|
35
31
|
/**
|
|
36
32
|
* @param constants The rendering constants provider.
|
|
37
|
-
* @internal
|
|
38
33
|
*/
|
|
39
34
|
constructor(constants: ConstantProvider);
|
|
40
35
|
/**
|
|
@@ -42,7 +37,6 @@ export declare class TopRow extends Row {
|
|
|
42
37
|
*
|
|
43
38
|
* @param block The block whose top row this represents.
|
|
44
39
|
* @returns Whether or not the top row has a left square corner.
|
|
45
|
-
* @internal
|
|
46
40
|
*/
|
|
47
41
|
hasLeftSquareCorner(block: BlockSvg): boolean;
|
|
48
42
|
/**
|