blockly 9.3.2 → 10.0.0-beta.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.
Files changed (160) hide show
  1. package/README.md +9 -7
  2. package/blockly.min.js +1304 -1404
  3. package/blockly_compressed.js +1057 -1099
  4. package/blockly_compressed.js.map +1 -1
  5. package/blocks_compressed.js +120 -136
  6. package/blocks_compressed.js.map +1 -1
  7. package/core/block.d.ts +59 -32
  8. package/core/block_dragger.d.ts +2 -2
  9. package/core/block_svg.d.ts +38 -67
  10. package/core/blockly.d.ts +18 -112
  11. package/core/browser_events.d.ts +1 -2
  12. package/core/bubble_dragger.d.ts +1 -2
  13. package/core/{bubble.d.ts → bubble_old.d.ts} +3 -7
  14. package/core/bubbles/bubble.d.ts +174 -0
  15. package/core/bubbles/mini_workspace_bubble.d.ts +80 -0
  16. package/core/bubbles/text_bubble.d.ts +35 -0
  17. package/core/bubbles/textinput_bubble.d.ts +89 -0
  18. package/core/bump_objects.d.ts +6 -4
  19. package/core/connection.d.ts +19 -9
  20. package/core/connection_db.d.ts +4 -4
  21. package/core/contextmenu.d.ts +1 -2
  22. package/core/events/events.d.ts +1 -4
  23. package/core/events/events_abstract.d.ts +0 -6
  24. package/core/events/events_block_base.d.ts +0 -6
  25. package/core/events/events_block_change.d.ts +0 -6
  26. package/core/events/events_block_create.d.ts +0 -6
  27. package/core/events/events_block_delete.d.ts +0 -6
  28. package/core/events/events_block_drag.d.ts +0 -6
  29. package/core/events/events_block_move.d.ts +21 -7
  30. package/core/events/events_bubble_open.d.ts +0 -6
  31. package/core/events/events_click.d.ts +0 -6
  32. package/core/events/events_comment_base.d.ts +0 -6
  33. package/core/events/events_comment_change.d.ts +0 -6
  34. package/core/events/events_comment_create.d.ts +0 -6
  35. package/core/events/events_comment_move.d.ts +0 -6
  36. package/core/events/events_marker_move.d.ts +0 -6
  37. package/core/events/events_selected.d.ts +0 -6
  38. package/core/events/events_theme_change.d.ts +0 -6
  39. package/core/events/events_toolbox_item_select.d.ts +0 -6
  40. package/core/events/events_trashcan_open.d.ts +0 -6
  41. package/core/events/events_var_base.d.ts +0 -6
  42. package/core/events/events_var_create.d.ts +0 -6
  43. package/core/events/events_var_delete.d.ts +0 -6
  44. package/core/events/events_var_rename.d.ts +0 -6
  45. package/core/events/events_viewport.d.ts +0 -6
  46. package/core/events/utils.d.ts +1 -1
  47. package/core/events/workspace_events.d.ts +1 -16
  48. package/core/field.d.ts +31 -5
  49. package/core/field_checkbox.d.ts +1 -1
  50. package/core/field_colour.d.ts +0 -2
  51. package/core/field_dropdown.d.ts +11 -13
  52. package/core/field_image.d.ts +5 -5
  53. package/core/field_input.d.ts +9 -2
  54. package/core/field_label.d.ts +3 -1
  55. package/core/field_number.d.ts +4 -4
  56. package/core/field_variable.d.ts +5 -5
  57. package/core/flyout_base.d.ts +23 -25
  58. package/core/flyout_button.d.ts +9 -9
  59. package/core/flyout_horizontal.d.ts +1 -1
  60. package/core/flyout_vertical.d.ts +1 -1
  61. package/core/generator.d.ts +15 -2
  62. package/core/gesture.d.ts +58 -41
  63. package/core/icons/comment_icon.d.ts +108 -0
  64. package/core/icons/exceptions.d.ts +14 -0
  65. package/core/icons/icon.d.ts +38 -0
  66. package/core/icons/icon_types.d.ts +22 -0
  67. package/core/icons/mutator_icon.d.ts +90 -0
  68. package/core/icons/registry.d.ts +23 -0
  69. package/core/icons/warning_icon.d.ts +67 -0
  70. package/core/icons.d.ts +12 -0
  71. package/core/inputs/dummy_input.d.ts +20 -0
  72. package/core/{input.d.ts → inputs/input.d.ts} +20 -13
  73. package/core/{input_types.d.ts → inputs/input_types.d.ts} +2 -1
  74. package/core/inputs/statement_input.d.ts +22 -0
  75. package/core/inputs/value_input.d.ts +20 -0
  76. package/core/interfaces/i_block_dragger.d.ts +1 -1
  77. package/core/interfaces/i_bounded_element.d.ts +2 -1
  78. package/core/interfaces/i_bubble.d.ts +2 -14
  79. package/core/interfaces/i_has_bubble.d.ts +14 -0
  80. package/core/interfaces/i_icon.d.ts +75 -0
  81. package/core/interfaces/i_serializable.d.ts +24 -0
  82. package/core/keyboard_nav/ast_node.d.ts +15 -15
  83. package/core/keyboard_nav/basic_cursor.d.ts +2 -2
  84. package/core/keyboard_nav/marker.d.ts +2 -2
  85. package/core/main.d.ts +0 -10
  86. package/core/marker_manager.d.ts +0 -1
  87. package/core/names.d.ts +4 -4
  88. package/core/options.d.ts +3 -3
  89. package/core/procedures.d.ts +1 -4
  90. package/core/registry.d.ts +5 -0
  91. package/core/render_management.d.ts +9 -1
  92. package/core/rendered_connection.d.ts +7 -7
  93. package/core/renderers/common/block_rendering.d.ts +0 -10
  94. package/core/renderers/common/constants.d.ts +5 -7
  95. package/core/renderers/common/drawer.d.ts +7 -2
  96. package/core/renderers/common/info.d.ts +1 -4
  97. package/core/renderers/common/marker_svg.d.ts +4 -4
  98. package/core/renderers/common/renderer.d.ts +0 -9
  99. package/core/renderers/geras/highlighter.d.ts +1 -1
  100. package/core/renderers/geras/info.d.ts +1 -1
  101. package/core/renderers/geras/measurables/inline_input.d.ts +1 -1
  102. package/core/renderers/geras/measurables/statement_input.d.ts +1 -1
  103. package/core/renderers/geras/renderer.d.ts +1 -1
  104. package/core/renderers/measurables/external_value_input.d.ts +1 -1
  105. package/core/renderers/measurables/field.d.ts +1 -1
  106. package/core/renderers/measurables/icon.d.ts +5 -1
  107. package/core/renderers/measurables/inline_input.d.ts +1 -1
  108. package/core/renderers/measurables/input_connection.d.ts +1 -1
  109. package/core/renderers/measurables/statement_input.d.ts +1 -1
  110. package/core/renderers/zelos/constants.d.ts +2 -2
  111. package/core/renderers/zelos/info.d.ts +2 -2
  112. package/core/renderers/zelos/marker_svg.d.ts +3 -3
  113. package/core/renderers/zelos/measurables/inputs.d.ts +1 -1
  114. package/core/renderers/zelos/path_object.d.ts +3 -3
  115. package/core/scrollbar.d.ts +0 -2
  116. package/core/scrollbar_pair.d.ts +0 -2
  117. package/core/serialization/blocks.d.ts +3 -3
  118. package/core/serialization/exceptions.d.ts +11 -0
  119. package/core/shortcut_registry.d.ts +2 -2
  120. package/core/theme_manager.d.ts +0 -1
  121. package/core/touch.d.ts +0 -43
  122. package/core/trashcan.d.ts +19 -21
  123. package/core/utils/dom.d.ts +2 -2
  124. package/core/utils/object.d.ts +0 -25
  125. package/core/utils/rect.d.ts +2 -0
  126. package/core/utils/style.d.ts +0 -12
  127. package/core/utils/svg_math.d.ts +0 -8
  128. package/core/utils/xml.d.ts +15 -22
  129. package/core/utils.d.ts +0 -138
  130. package/core/widgetdiv.d.ts +5 -0
  131. package/core/workspace.d.ts +9 -3
  132. package/core/workspace_comment.d.ts +3 -3
  133. package/core/workspace_comment_svg.d.ts +31 -44
  134. package/core/workspace_dragger.d.ts +1 -4
  135. package/core/workspace_svg.d.ts +13 -50
  136. package/core/xml.d.ts +0 -12
  137. package/core-browser.js +0 -1
  138. package/core.js +0 -1
  139. package/dart_compressed.js +124 -159
  140. package/dart_compressed.js.map +1 -1
  141. package/javascript_compressed.js +127 -169
  142. package/javascript_compressed.js.map +1 -1
  143. package/lua_compressed.js +119 -142
  144. package/lua_compressed.js.map +1 -1
  145. package/msg/constants.d.ts +1 -3
  146. package/msg/msg.d.ts +1 -2
  147. package/msg/qqq.d.ts +1 -3
  148. package/msg/synonyms.d.ts +1 -3
  149. package/package.json +12 -13
  150. package/php_compressed.js +131 -161
  151. package/php_compressed.js.map +1 -1
  152. package/python_compressed.js +118 -149
  153. package/python_compressed.js.map +1 -1
  154. package/core/comment.d.ts +0 -115
  155. package/core/events/events_ui.d.ts +0 -40
  156. package/core/icon.d.ts +0 -89
  157. package/core/mutator.d.ts +0 -142
  158. package/core/renderers/common/debug.d.ts +0 -29
  159. package/core/renderers/common/debugger.d.ts +0 -117
  160. package/core/warning.d.ts +0 -53
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export interface ISerializable {
7
+ /**
8
+ * @param doFullSerialization If true, this signals that any backing data
9
+ * structures used by this ISerializable should also be serialized. This
10
+ * is used for copy-paste.
11
+ * @returns a JSON serializable value that records the ISerializable's state.
12
+ */
13
+ saveState(doFullSerialization: boolean): any;
14
+ /**
15
+ * Takes in a JSON serializable value and sets the ISerializable's state
16
+ * based on that.
17
+ *
18
+ * @param state The state to apply to the ISerializable.
19
+ */
20
+ loadState(state: any): void;
21
+ }
22
+ /** Type guard that checks whether the given object is a ISerializable. */
23
+ export declare function isSerializable(obj: any): obj is ISerializable;
24
+ //# sourceMappingURL=i_serializable.d.ts.map
@@ -6,7 +6,7 @@
6
6
  import type { Block } from '../block.js';
7
7
  import type { Connection } from '../connection.js';
8
8
  import type { Field } from '../field.js';
9
- import type { Input } from '../input.js';
9
+ import type { Input } from '../inputs/input.js';
10
10
  import type { IASTNodeLocation } from '../interfaces/i_ast_node_location.js';
11
11
  import { Coordinate } from '../utils/coordinate.js';
12
12
  import type { Workspace } from '../workspace.js';
@@ -25,11 +25,11 @@ export declare class ASTNode {
25
25
  * workspace.
26
26
  */
27
27
  private static readonly DEFAULT_OFFSET_Y;
28
- private readonly type_;
29
- private readonly isConnection_;
30
- private readonly location_;
28
+ private readonly type;
29
+ private readonly isConnectionLocation;
30
+ private readonly location;
31
31
  /** The coordinate on the workspace. */
32
- private wsCoordinate_;
32
+ private wsCoordinate;
33
33
  /**
34
34
  * @param type The type of the location.
35
35
  * Must be in ASTNode.types.
@@ -42,7 +42,7 @@ export declare class ASTNode {
42
42
  *
43
43
  * @param params The user specified parameters.
44
44
  */
45
- private processParams_;
45
+ private processParams;
46
46
  /**
47
47
  * Gets the value pointed to by this node.
48
48
  * It is the callers responsibility to check the node type to figure out what
@@ -81,7 +81,7 @@ export declare class ASTNode {
81
81
  * @returns The AST node holding the next field or connection or null if there
82
82
  * is no editable field or input connection after the given input.
83
83
  */
84
- private findNextForInput_;
84
+ private findNextForInput;
85
85
  /**
86
86
  * Given a field find the next editable field or an input with a non null
87
87
  * connection in the same block. The current location must be a field.
@@ -89,7 +89,7 @@ export declare class ASTNode {
89
89
  * @returns The AST node pointing to the next field or connection or null if
90
90
  * there is no editable field or input connection after the given input.
91
91
  */
92
- private findNextForField_;
92
+ private findNextForField;
93
93
  /**
94
94
  * Given an input find the previous editable field or an input with a non null
95
95
  * connection in the same block. The current location must be an input
@@ -97,14 +97,14 @@ export declare class ASTNode {
97
97
  *
98
98
  * @returns The AST node holding the previous field or connection.
99
99
  */
100
- private findPrevForInput_;
100
+ private findPrevForInput;
101
101
  /**
102
102
  * Given a field find the previous editable field or an input with a non null
103
103
  * connection in the same block. The current location must be a field.
104
104
  *
105
105
  * @returns The AST node holding the previous input or field.
106
106
  */
107
- private findPrevForField_;
107
+ private findPrevForField;
108
108
  /**
109
109
  * Navigate between stacks of blocks on the workspace.
110
110
  *
@@ -112,7 +112,7 @@ export declare class ASTNode {
112
112
  * @returns The first block of the next stack or null if there are no blocks
113
113
  * on the workspace.
114
114
  */
115
- private navigateBetweenStacks_;
115
+ private navigateBetweenStacks;
116
116
  /**
117
117
  * Finds the top most AST node for a given block.
118
118
  * This is either the previous connection, output connection or block
@@ -121,7 +121,7 @@ export declare class ASTNode {
121
121
  * @param block The block that we want to find the top connection on.
122
122
  * @returns The AST node containing the top connection.
123
123
  */
124
- private findTopASTNodeForBlock_;
124
+ private findTopASTNodeForBlock;
125
125
  /**
126
126
  * Get the AST node pointing to the input that the block is nested under or if
127
127
  * the block is not nested then get the stack AST node.
@@ -130,7 +130,7 @@ export declare class ASTNode {
130
130
  * @returns The AST node pointing to the input connection or the top block of
131
131
  * the stack this block is in.
132
132
  */
133
- private getOutAstNodeForBlock_;
133
+ private getOutAstNodeForBlock;
134
134
  /**
135
135
  * Find the first editable field or input with a connection on a given block.
136
136
  *
@@ -139,7 +139,7 @@ export declare class ASTNode {
139
139
  * Null if there are no editable fields or inputs with connections on the
140
140
  * block.
141
141
  */
142
- private findFirstFieldOrInput_;
142
+ private findFirstFieldOrInput;
143
143
  /**
144
144
  * Finds the source block of the location of this node.
145
145
  *
@@ -183,7 +183,7 @@ export declare class ASTNode {
183
183
  * @param type The type to check. One of ASTNode.types.
184
184
  * @returns True if a node of the given type points to a connection.
185
185
  */
186
- private static isConnectionType_;
186
+ private static isConnectionType;
187
187
  /**
188
188
  * Create an AST node pointing to a field.
189
189
  *
@@ -83,7 +83,7 @@ export declare class BasicCursor extends Cursor {
83
83
  * @param node The current position in the AST.
84
84
  * @returns The parent AST node or null if there are no valid parents.
85
85
  */
86
- private findSiblingOrParent_;
86
+ private findSiblingOrParent;
87
87
  /**
88
88
  * Get the right most child of a node.
89
89
  *
@@ -91,6 +91,6 @@ export declare class BasicCursor extends Cursor {
91
91
  * @returns The right most child of the given node, or the node if no child
92
92
  * exists.
93
93
  */
94
- private getRightMostChild_;
94
+ private getRightMostChild;
95
95
  }
96
96
  //# sourceMappingURL=basic_cursor.d.ts.map
@@ -13,12 +13,12 @@ export declare class Marker {
13
13
  /** The colour of the marker. */
14
14
  colour: string | null;
15
15
  /** The current location of the marker. */
16
- private curNode_;
16
+ private curNode;
17
17
  /**
18
18
  * The object in charge of drawing the visual representation of the current
19
19
  * node.
20
20
  */
21
- private drawer_;
21
+ private drawer;
22
22
  /** The type of the marker. */
23
23
  type: string;
24
24
  /** Constructs a new Marker instance. */
package/core/main.d.ts CHANGED
@@ -1,12 +1,2 @@
1
- declare const Blockly: any;
2
- declare const ContextMenu: any;
3
- declare const Events: any;
4
1
  declare const Msg: any;
5
- declare const Tooltip: any;
6
- declare const WidgetDiv: any;
7
- declare const colour: any;
8
- declare const common: any;
9
- declare const deprecation: any;
10
- declare const dialog: any;
11
- declare const eventUtils: any;
12
2
  //# sourceMappingURL=main.d.ts.map
@@ -86,7 +86,6 @@ export declare class MarkerManager {
86
86
  * Dispose of the marker manager.
87
87
  * Go through and delete all markers associated with this marker manager.
88
88
  *
89
- * @suppress {checkTypes}
90
89
  * @internal
91
90
  */
92
91
  dispose(): void;
package/core/names.d.ts CHANGED
@@ -10,7 +10,7 @@ import type { Workspace } from './workspace.js';
10
10
  */
11
11
  export declare class Names {
12
12
  static DEVELOPER_VARIABLE_TYPE: NameType;
13
- private readonly variablePrefix_;
13
+ private readonly variablePrefix;
14
14
  /** A set of reserved words. */
15
15
  private readonly reservedWords;
16
16
  /**
@@ -23,7 +23,7 @@ export declare class Names {
23
23
  /**
24
24
  * The variable map from the workspace, containing Blockly variable models.
25
25
  */
26
- private variableMap_;
26
+ private variableMap;
27
27
  /**
28
28
  * @param reservedWordsList A comma-separated string of words that are illegal
29
29
  * for use as names in a language (e.g. 'new,if,this,...').
@@ -49,7 +49,7 @@ export declare class Names {
49
49
  * @returns The name of the referenced variable, or null if there was no
50
50
  * variable map or the variable was not found in the map.
51
51
  */
52
- private getNameForUserVariable_;
52
+ private getNameForUserVariable;
53
53
  /**
54
54
  * Generate names for user variables, but only ones that are being used.
55
55
  *
@@ -99,7 +99,7 @@ export declare class Names {
99
99
  * @param name Potentially illegal entity name.
100
100
  * @returns Safe entity name.
101
101
  */
102
- private safeName_;
102
+ private safeName;
103
103
  /**
104
104
  * Do the given two entity names refer to the same entity?
105
105
  * Blockly names are case-insensitive.
package/core/options.d.ts CHANGED
@@ -58,15 +58,15 @@ export declare class Options {
58
58
  * argument Contains an x and/or y property which is a float between 0
59
59
  * and 1 specifying the degree of scrolling.
60
60
  */
61
- setMetrics?: ((p1: {
61
+ setMetrics?: (p1: {
62
62
  x?: number;
63
63
  y?: number;
64
- }) => void);
64
+ }) => void;
65
65
  /**
66
66
  * A function that returns a metrics
67
67
  * object that describes the current workspace.
68
68
  */
69
- getMetrics?: (() => Metrics);
69
+ getMetrics?: () => Metrics;
70
70
  /**
71
71
  * @param options Dictionary of options.
72
72
  * Specification:
@@ -35,10 +35,7 @@ export declare const DEFAULT_ARG = "x";
35
35
  * variables, the second with. Each procedure is defined by a three-element
36
36
  * list of name, parameter list, and return value boolean.
37
37
  */
38
- export declare function allProcedures(root: Workspace): [
39
- ProcedureTuple[],
40
- ProcedureTuple[]
41
- ];
38
+ export declare function allProcedures(root: Workspace): [ProcedureTuple[], ProcedureTuple[]];
42
39
  /**
43
40
  * Ensure two identically-named procedures don't exist.
44
41
  * Take the proposed procedure name, and return a legal name i.e. one that
@@ -9,6 +9,8 @@ import type { IBlockDragger } from './interfaces/i_block_dragger.js';
9
9
  import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
10
10
  import type { IFlyout } from './interfaces/i_flyout.js';
11
11
  import type { IMetricsManager } from './interfaces/i_metrics_manager.js';
12
+ import type { IIcon } from './interfaces/i_icon.js';
13
+ import type { Input } from './inputs/input.js';
12
14
  import type { ISerializer } from './interfaces/i_serializer.js';
13
15
  import type { IToolbox } from './interfaces/i_toolbox.js';
14
16
  import type { Cursor } from './keyboard_nav/cursor.js';
@@ -44,6 +46,7 @@ export declare class Type<_T> {
44
46
  static CURSOR: Type<Cursor>;
45
47
  static EVENT: Type<Abstract>;
46
48
  static FIELD: Type<Field<any>>;
49
+ static INPUT: Type<Input>;
47
50
  static RENDERER: Type<Renderer>;
48
51
  static TOOLBOX: Type<IToolbox>;
49
52
  static THEME: Type<Theme>;
@@ -54,6 +57,8 @@ export declare class Type<_T> {
54
57
  static BLOCK_DRAGGER: Type<IBlockDragger>;
55
58
  /** @internal */
56
59
  static SERIALIZER: Type<ISerializer>;
60
+ /** @internal */
61
+ static ICON: Type<IIcon>;
57
62
  }
58
63
  /**
59
64
  * Registers a class based on a type and name.
@@ -9,7 +9,15 @@ import { BlockSvg } from './block_svg.js';
9
9
  * and registers a callback to do so after a delay, to allowf or batching.
10
10
  *
11
11
  * @param block The block to rerender.
12
+ * @returns A promise that resolves after the currently queued renders have been
13
+ * completed. Used for triggering other behavior that relies on updated
14
+ * size/position location for the block.
12
15
  * @internal
13
16
  */
14
- export declare function queueRender(block: BlockSvg): void;
17
+ export declare function queueRender(block: BlockSvg): Promise<void>;
18
+ /**
19
+ * @returns A promise that resolves after the currently queued renders have
20
+ * been completed.
21
+ */
22
+ export declare function finishQueuedRenders(): Promise<void>;
15
23
  //# sourceMappingURL=render_management.d.ts.map
@@ -12,10 +12,10 @@ import { Coordinate } from './utils/coordinate.js';
12
12
  */
13
13
  export declare class RenderedConnection extends Connection {
14
14
  sourceBlock_: BlockSvg;
15
- private readonly db_;
16
- private readonly dbOpposite_;
17
- private readonly offsetInBlock_;
18
- private trackedState_;
15
+ private readonly db;
16
+ private readonly dbOpposite;
17
+ private readonly offsetInBlock;
18
+ private trackedState;
19
19
  private highlightPath;
20
20
  /** Connection this connection connects to. Null if not connected. */
21
21
  targetConnection: RenderedConnection | null;
@@ -64,7 +64,7 @@ export declare class RenderedConnection extends Connection {
64
64
  *
65
65
  * @param x New absolute x coordinate, in workspace coordinates.
66
66
  * @param y New absolute y coordinate, in workspace coordinates.
67
- * @return True if the position of the connection in the connection db
67
+ * @returns True if the position of the connection in the connection db
68
68
  * was updated.
69
69
  */
70
70
  moveTo(x: number, y: number): boolean;
@@ -73,7 +73,7 @@ export declare class RenderedConnection extends Connection {
73
73
  *
74
74
  * @param dx Change to x coordinate, in workspace units.
75
75
  * @param dy Change to y coordinate, in workspace units.
76
- * @return True if the position of the connection in the connection db
76
+ * @returns True if the position of the connection in the connection db
77
77
  * was updated.
78
78
  */
79
79
  moveBy(dx: number, dy: number): boolean;
@@ -83,7 +83,7 @@ export declare class RenderedConnection extends Connection {
83
83
  *
84
84
  * @param blockTL The location of the top left corner of the block, in
85
85
  * workspace coordinates.
86
- * @return True if the position of the connection in the connection db
86
+ * @returns True if the position of the connection in the connection db
87
87
  * was updated.
88
88
  */
89
89
  moveToOffset(blockTL: Coordinate): boolean;
@@ -27,7 +27,6 @@ import { StatementInput } from '../measurables/statement_input.js';
27
27
  import { TopRow } from '../measurables/top_row.js';
28
28
  import { Types } from '../measurables/types.js';
29
29
  import { ConstantProvider } from './constants.js';
30
- import { Debug } from './debugger.js';
31
30
  import { Drawer } from './drawer.js';
32
31
  import type { IPathObject } from './i_path_object.js';
33
32
  import { RenderInfo } from './info.js';
@@ -48,14 +47,6 @@ export declare function register(name: string, rendererClass: Function): void;
48
47
  * @param name The name of the renderer.
49
48
  */
50
49
  export declare function unregister(name: string): void;
51
- /**
52
- * Turn off the blocks debugger.
53
- *
54
- * @deprecated Use the debug renderer in **\@blockly/dev-tools** (See {@link
55
- * https://www.npmjs.com/package/@blockly/dev-tools}.)
56
- * @internal
57
- */
58
- export declare function stopDebugger(): void;
59
50
  /**
60
51
  * Initialize anything needed for rendering (constants, etc).
61
52
  *
@@ -72,7 +63,6 @@ export declare function init(name: string, theme: Theme, opt_rendererOverrides?:
72
63
  export { BottomRow };
73
64
  export { Connection };
74
65
  export { ConstantProvider };
75
- export { Debug };
76
66
  export { Drawer };
77
67
  export { ExternalValueInput };
78
68
  export { Field };
@@ -217,13 +217,13 @@ export declare class ConstantProvider {
217
217
  * The defs tag that contains all filters and patterns for this Blockly
218
218
  * instance.
219
219
  */
220
- private defs_;
220
+ private defs;
221
221
  /**
222
222
  * The ID of the emboss filter, or the empty string if no filter is set.
223
223
  */
224
224
  embossFilterId: string;
225
225
  /** The <filter> element to use for highlighting, or null if not set. */
226
- private embossFilter_;
226
+ private embossFilter;
227
227
  /**
228
228
  * The ID of the disabled pattern, or the empty string if no pattern is set.
229
229
  */
@@ -231,7 +231,7 @@ export declare class ConstantProvider {
231
231
  /**
232
232
  * The <pattern> element to use for disabled blocks, or null if not set.
233
233
  */
234
- private disabledPattern_;
234
+ private disabledPattern;
235
235
  /**
236
236
  * The ID of the debug filter, or the empty string if no pattern is set.
237
237
  */
@@ -239,9 +239,9 @@ export declare class ConstantProvider {
239
239
  /**
240
240
  * The <filter> element to use for a debug highlight, or null if not set.
241
241
  */
242
- private debugFilter_;
242
+ private debugFilter;
243
243
  /** The <style> element to use for injecting renderer specific CSS. */
244
- private cssNode_;
244
+ private cssNode;
245
245
  /**
246
246
  * Cursor colour.
247
247
  */
@@ -420,8 +420,6 @@ export declare class ConstantProvider {
420
420
  * @param svg The root of the workspace's SVG.
421
421
  * @param tagName The name to use for the CSS style tag.
422
422
  * @param selector The CSS selector to use.
423
- * @suppress {strictModuleDepCheck} Debug renderer only included in
424
- * playground.
425
423
  */
426
424
  createDom(svg: SVGElement, tagName: string, selector: string): void;
427
425
  /**
@@ -37,6 +37,13 @@ export declare class Drawer {
37
37
  * required.
38
38
  */
39
39
  draw(): void;
40
+ /**
41
+ * Hide icons that were marked as hidden.
42
+ *
43
+ * @deprecated Manually hiding icons is no longer necessary. To be removed
44
+ * in v11.
45
+ */
46
+ protected hideHiddenIcons_(): void;
40
47
  /**
41
48
  * Save sizing information back to the block
42
49
  * Most of the rendering information can be thrown away at the end of the
@@ -44,8 +51,6 @@ export declare class Drawer {
44
51
  * function.
45
52
  */
46
53
  protected recordSizeOnBlock_(): void;
47
- /** Hide icons that were marked as hidden. */
48
- protected hideHiddenIcons_(): void;
49
54
  /** Create the outline of the block. This is a single continuous path. */
50
55
  protected drawOutline_(): void;
51
56
  /**
@@ -4,10 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import { Input } from '../../input.js';
7
+ import { Input } from '../../inputs/input.js';
8
8
  import type { Measurable } from '../measurables/base.js';
9
9
  import { BottomRow } from '../measurables/bottom_row.js';
10
- import { Icon } from '../measurables/icon.js';
11
10
  import { InputRow } from '../measurables/input_row.js';
12
11
  import { OutputConnection } from '../measurables/output_connection.js';
13
12
  import type { Row } from '../measurables/row.js';
@@ -46,8 +45,6 @@ export declare class RenderInfo {
46
45
  rows: Row[];
47
46
  /** An array of input rows on the block. */
48
47
  inputRows: InputRow[];
49
- /** An array of measurable objects containing hidden icons. */
50
- hiddenIcons: Icon[];
51
48
  topRow: TopRow;
52
49
  bottomRow: BottomRow;
53
50
  startX: number;
@@ -21,7 +21,7 @@ export declare class MarkerSvg {
21
21
  * The workspace, field, or block that the marker SVG element should be
22
22
  * attached to.
23
23
  */
24
- private parent_;
24
+ private parent;
25
25
  /** The current SVG element for the marker. */
26
26
  currentMarkerSvg: SVGElement | null;
27
27
  colour_: string;
@@ -94,7 +94,7 @@ export declare class MarkerSvg {
94
94
  *
95
95
  * @param curNode The node to draw the marker for.
96
96
  */
97
- private showWithBlockPrevOutput_;
97
+ private showWithBlockPrevOutput;
98
98
  /**
99
99
  * Position and display the marker for a block.
100
100
  *
@@ -213,7 +213,7 @@ export declare class MarkerSvg {
213
213
  *
214
214
  * @param markerSvg The marker that we want to flip.
215
215
  */
216
- private flipRtl_;
216
+ private flipRtl;
217
217
  /** Hide the marker. */
218
218
  hide(): void;
219
219
  /**
@@ -222,7 +222,7 @@ export declare class MarkerSvg {
222
222
  * @param oldNode The old node the marker used to be on.
223
223
  * @param curNode The new node the marker is currently on.
224
224
  */
225
- private fireMarkerEvent_;
225
+ private fireMarkerEvent;
226
226
  /**
227
227
  * Get the properties to make a marker blink.
228
228
  *
@@ -12,7 +12,6 @@ import type { RenderedConnection } from '../../rendered_connection.js';
12
12
  import type { BlockStyle, Theme } from '../../theme.js';
13
13
  import type { WorkspaceSvg } from '../../workspace_svg.js';
14
14
  import { ConstantProvider } from './constants.js';
15
- import { Debug } from './debugger.js';
16
15
  import { Drawer } from './drawer.js';
17
16
  import type { IPathObject } from './i_path_object.js';
18
17
  import { RenderInfo } from './info.js';
@@ -91,14 +90,6 @@ export declare class Renderer implements IRegistrable {
91
90
  * @returns The drawer.
92
91
  */
93
92
  protected makeDrawer_(block: BlockSvg, info: RenderInfo): Drawer;
94
- /**
95
- * Create a new instance of the renderer's debugger.
96
- *
97
- * @returns The renderer debugger.
98
- * @suppress {strictModuleDepCheck} Debug renderer only included in
99
- * playground.
100
- */
101
- protected makeDebugger_(): Debug;
102
93
  /**
103
94
  * Create a new instance of the renderer's marker drawer.
104
95
  *
@@ -28,7 +28,7 @@ export declare class Highlighter {
28
28
  RTL_: boolean;
29
29
  constants_: ConstantProvider;
30
30
  highlightConstants_: HighlightConstantProvider;
31
- private readonly highlightOffset_;
31
+ private readonly highlightOffset;
32
32
  outsideCornerPaths_: OutsideCorner;
33
33
  insideCornerPaths_: InsideCorner;
34
34
  puzzleTabPaths_: PuzzleTab;
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import type { Input } from '../../input.js';
7
+ import type { Input } from '../../inputs/input.js';
8
8
  import { RenderInfo as BaseRenderInfo } from '../common/info.js';
9
9
  import type { Measurable } from '../measurables/base.js';
10
10
  import type { Row } from '../measurables/row.js';
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Input } from '../../../input.js';
6
+ import type { Input } from '../../../inputs/input.js';
7
7
  import type { ConstantProvider as BaseConstantProvider } from '../../../renderers/common/constants.js';
8
8
  import { InlineInput as BaseInlineInput } from '../../../renderers/measurables/inline_input.js';
9
9
  import type { ConstantProvider as GerasConstantProvider } from '../constants.js';
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Input } from '../../../input.js';
6
+ import type { Input } from '../../../inputs/input.js';
7
7
  import type { ConstantProvider as BaseConstantProvider } from '../../../renderers/common/constants.js';
8
8
  import { StatementInput as BaseStatementInput } from '../../../renderers/measurables/statement_input.js';
9
9
  import type { ConstantProvider as GerasConstantProvider } from '../constants.js';
@@ -22,7 +22,7 @@ import { PathObject } from './path_object.js';
22
22
  */
23
23
  export declare class Renderer extends BaseRenderer {
24
24
  /** The renderer's highlight constant provider. */
25
- private highlightConstants_;
25
+ private highlightConstants;
26
26
  /**
27
27
  * @param name The renderer name.
28
28
  */
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Input } from '../../input.js';
6
+ import type { Input } from '../../inputs/input.js';
7
7
  import type { ConstantProvider } from '../common/constants.js';
8
8
  import { InputConnection } from './input_connection.js';
9
9
  /**
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Field as BlocklyField } from '../../field.js';
7
- import type { Input } from '../../input.js';
7
+ import type { Input } from '../../inputs/input.js';
8
8
  import type { ConstantProvider } from '../common/constants.js';
9
9
  import { Measurable } from './base.js';
10
10
  /**
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Icon as BlocklyIcon } from '../../icon.js';
6
+ import type { IIcon as BlocklyIcon } from '../../interfaces/i_icon.js';
7
7
  import type { ConstantProvider } from '../common/constants.js';
8
8
  import { Measurable } from './base.js';
9
9
  /**
@@ -12,6 +12,10 @@ import { Measurable } from './base.js';
12
12
  */
13
13
  export declare class Icon extends Measurable {
14
14
  icon: BlocklyIcon;
15
+ /**
16
+ * @deprecated Will be removed in v11. Create a subclass of the Icon
17
+ * measurable if this data is necessary for you.
18
+ */
15
19
  isVisible: boolean;
16
20
  flipRtl: boolean;
17
21
  /**
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Input } from '../../input.js';
6
+ import type { Input } from '../../inputs/input.js';
7
7
  import type { ConstantProvider } from '../common/constants.js';
8
8
  import { InputConnection } from './input_connection.js';
9
9
  /**
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import type { Input } from '../../input.js';
7
+ import type { Input } from '../../inputs/input.js';
8
8
  import type { ConstantProvider } from '../common/constants.js';
9
9
  import { Connection } from './connection.js';
10
10
  /**
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Input } from '../../input.js';
6
+ import type { Input } from '../../inputs/input.js';
7
7
  import type { ConstantProvider } from '../common/constants.js';
8
8
  import { InputConnection } from './input_connection.js';
9
9
  /**