blockly 9.3.3 → 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 +1314 -1415
  3. package/blockly_compressed.js +1067 -1110
  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
package/core/comment.d.ts DELETED
@@ -1,115 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2011 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import './events/events_block_change.js';
7
- import './events/events_bubble_open.js';
8
- import type { BlockSvg } from './block_svg.js';
9
- import { Icon } from './icon.js';
10
- import type { Size } from './utils/size.js';
11
- /**
12
- * Class for a comment.
13
- */
14
- export declare class Comment extends Icon {
15
- private readonly model;
16
- /**
17
- * The model's text value at the start of an edit.
18
- * Used to tell if an event should be fired at the end of an edit.
19
- */
20
- private cachedText;
21
- /**
22
- * Array holding info needed to unbind events.
23
- * Used for disposing.
24
- * Ex: [[node, name, func], [node, name, func]].
25
- */
26
- private boundEvents;
27
- /**
28
- * The SVG element that contains the text edit area, or null if not created.
29
- */
30
- private foreignObject;
31
- /** The editable text area, or null if not created. */
32
- private textarea_;
33
- /** The top-level node of the comment text, or null if not created. */
34
- private paragraphElement_;
35
- /** @param block The block associated with this comment. */
36
- constructor(block: BlockSvg);
37
- /**
38
- * Draw the comment icon.
39
- *
40
- * @param group The icon group.
41
- */
42
- protected drawIcon_(group: Element): void;
43
- /**
44
- * Create the editor for the comment's bubble.
45
- *
46
- * @returns The top-level node of the editor.
47
- */
48
- private createEditor;
49
- /** Add or remove editability of the comment. */
50
- updateEditable(): void;
51
- /**
52
- * Callback function triggered when the bubble has resized.
53
- * Resize the text area accordingly.
54
- */
55
- private onBubbleResize;
56
- /**
57
- * Resizes the text area to match the size defined on the model (which is
58
- * the size of the bubble).
59
- */
60
- private resizeTextarea;
61
- /**
62
- * Show or hide the comment bubble.
63
- *
64
- * @param visible True if the bubble should be visible.
65
- */
66
- setVisible(visible: boolean): void;
67
- /** Show the bubble. Handles deciding if it should be editable or not. */
68
- private createBubble;
69
- /** Show an editable bubble. */
70
- private createEditableBubble;
71
- /**
72
- * Show a non-editable bubble.
73
- */
74
- private createNonEditableBubble;
75
- /**
76
- * Dispose of the bubble.
77
- */
78
- private disposeBubble;
79
- /**
80
- * Callback fired when an edit starts.
81
- *
82
- * Bring the comment to the top of the stack when clicked on. Also cache the
83
- * current text so it can be used to fire a change event.
84
- *
85
- * @param _e Mouse up event.
86
- */
87
- private startEdit;
88
- /**
89
- * Get the dimensions of this comment's bubble.
90
- *
91
- * @returns Object with width and height properties.
92
- */
93
- getBubbleSize(): Size;
94
- /**
95
- * Size this comment's bubble.
96
- *
97
- * @param width Width of the bubble.
98
- * @param height Height of the bubble.
99
- */
100
- setBubbleSize(width: number, height: number): void;
101
- /**
102
- * Update the comment's view to match the model.
103
- *
104
- * @internal
105
- */
106
- updateText(): void;
107
- /**
108
- * Dispose of this comment.
109
- *
110
- * If you want to receive a comment "delete" event (newValue: null), then this
111
- * should not be called directly. Instead call block.setCommentText(null);
112
- */
113
- dispose(): void;
114
- }
115
- //# sourceMappingURL=comment.d.ts.map
@@ -1,40 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2018 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import type { Block } from '../block.js';
7
- import { UiBase } from './events_ui_base.js';
8
- /**
9
- * Class for a UI event.
10
- *
11
- * @deprecated December 2020. Instead use a more specific UI event.
12
- */
13
- export declare class Ui extends UiBase {
14
- blockId: any;
15
- element: any;
16
- oldValue: any;
17
- newValue: any;
18
- type: string;
19
- /**
20
- * @param opt_block The affected block. Null for UI events that do not have
21
- * an associated block. Undefined for a blank event.
22
- * @param opt_element One of 'selected', 'comment', 'mutatorOpen', etc.
23
- * @param opt_oldValue Previous value of element.
24
- * @param opt_newValue New value of element.
25
- */
26
- constructor(opt_block?: Block | null, opt_element?: string, opt_oldValue?: any, opt_newValue?: any);
27
- /**
28
- * Encode the event as JSON.
29
- *
30
- * @returns JSON representation.
31
- */
32
- toJson(): any;
33
- /**
34
- * Decode the JSON event.
35
- *
36
- * @param json JSON representation.
37
- */
38
- fromJson(json: any): void;
39
- }
40
- //# sourceMappingURL=events_ui.d.ts.map
package/core/icon.d.ts DELETED
@@ -1,89 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2013 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import type { BlockSvg } from './block_svg.js';
7
- import type { Bubble } from './bubble.js';
8
- import { Coordinate } from './utils/coordinate.js';
9
- import { Size } from './utils/size.js';
10
- /**
11
- * Class for an icon.
12
- */
13
- export declare abstract class Icon {
14
- protected block_: BlockSvg | null;
15
- /** The icon SVG group. */
16
- iconGroup_: SVGGElement | null;
17
- /** Whether this icon gets hidden when the block is collapsed. */
18
- collapseHidden: boolean;
19
- /** Height and width of icons. */
20
- readonly SIZE = 17;
21
- /** Bubble UI (if visible). */
22
- protected bubble_: Bubble | null;
23
- /** Absolute coordinate of icon's center. */
24
- protected iconXY_: Coordinate | null;
25
- /** @param block The block associated with this icon. */
26
- constructor(block: BlockSvg | null);
27
- /** Create the icon on the block. */
28
- createIcon(): void;
29
- /** Dispose of this icon. */
30
- dispose(): void;
31
- /** Add or remove the UI indicating if this icon may be clicked or not. */
32
- updateEditable(): void;
33
- /**
34
- * Is the associated bubble visible?
35
- *
36
- * @returns True if the bubble is visible.
37
- */
38
- isVisible(): boolean;
39
- /**
40
- * Clicking on the icon toggles if the bubble is visible.
41
- *
42
- * @param e Mouse click event.
43
- */
44
- protected iconClick_(e: PointerEvent): void;
45
- /** Change the colour of the associated bubble to match its block. */
46
- applyColour(): void;
47
- /**
48
- * Notification that the icon has moved. Update the arrow accordingly.
49
- *
50
- * @param xy Absolute location in workspace coordinates.
51
- */
52
- setIconLocation(xy: Coordinate): void;
53
- /**
54
- * Notification that the icon has moved, but we don't really know where.
55
- * Recompute the icon's location from scratch.
56
- */
57
- computeIconLocation(): void;
58
- /**
59
- * Returns the center of the block's icon relative to the surface.
60
- *
61
- * @returns Object with x and y properties in workspace coordinates.
62
- */
63
- getIconLocation(): Coordinate | null;
64
- /**
65
- * Get the size of the icon as used for rendering.
66
- * This differs from the actual size of the icon, because it bulges slightly
67
- * out of its row rather than increasing the height of its row.
68
- *
69
- * @returns Height and width.
70
- */
71
- getCorrectedSize(): Size;
72
- /**
73
- * Draw the icon.
74
- *
75
- * @param _group The icon group.
76
- */
77
- protected drawIcon_(_group: Element): void;
78
- /**
79
- * Show or hide the bubble.
80
- *
81
- * @param _visible True if the bubble should be visible.
82
- */
83
- setVisible(_visible: boolean): void;
84
- /**
85
- * @returns The block this icon is attached to.
86
- */
87
- protected getBlock(): BlockSvg;
88
- }
89
- //# sourceMappingURL=icon.d.ts.map
package/core/mutator.d.ts DELETED
@@ -1,142 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2012 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import './events/events_bubble_open.js';
7
- import type { Block } from './block.js';
8
- import type { BlockSvg } from './block_svg.js';
9
- import type { Connection } from './connection.js';
10
- import type { Abstract } from './events/events_abstract.js';
11
- import { Icon } from './icon.js';
12
- import { Options } from './options.js';
13
- import type { WorkspaceSvg } from './workspace_svg.js';
14
- /**
15
- * Class for a mutator dialog.
16
- */
17
- export declare class Mutator extends Icon {
18
- private quarkNames;
19
- /**
20
- * Workspace in the mutator's bubble.
21
- * Due to legacy code in procedure block definitions, this name
22
- * cannot change.
23
- */
24
- private workspace_;
25
- /** Width of workspace. */
26
- private workspaceWidth;
27
- /** Height of workspace. */
28
- private workspaceHeight;
29
- /**
30
- * The SVG element that is the parent of the mutator workspace, or null if
31
- * not created.
32
- */
33
- private svgDialog;
34
- /**
35
- * The root block of the mutator workspace, created by decomposing the
36
- * source block.
37
- */
38
- private rootBlock;
39
- /**
40
- * Function registered on the main workspace to update the mutator contents
41
- * when the main workspace changes.
42
- */
43
- private sourceListener;
44
- /**
45
- * The PID associated with the updateWorkpace_ timeout, or null if no timeout
46
- * is currently running.
47
- */
48
- private updateWorkspacePid;
49
- /** @param quarkNames List of names of sub-blocks for flyout. */
50
- constructor(quarkNames: string[], block?: BlockSvg);
51
- /**
52
- * Set the block this mutator is associated with.
53
- *
54
- * @param block The block associated with this mutator.
55
- * @internal
56
- */
57
- setBlock(block: BlockSvg): void;
58
- /**
59
- * Returns the workspace inside this mutator icon's bubble.
60
- *
61
- * @returns The workspace inside this mutator icon's bubble or null if the
62
- * mutator isn't open.
63
- * @internal
64
- */
65
- getWorkspace(): WorkspaceSvg | null;
66
- /**
67
- * Draw the mutator icon.
68
- *
69
- * @param group The icon group.
70
- */
71
- protected drawIcon_(group: Element): void;
72
- /**
73
- * Clicking on the icon toggles if the mutator bubble is visible.
74
- * Disable if block is uneditable.
75
- *
76
- * @param e Mouse click event.
77
- */
78
- protected iconClick_(e: PointerEvent): void;
79
- /**
80
- * Create the editor for the mutator's bubble.
81
- *
82
- * @returns The top-level node of the editor.
83
- */
84
- private createEditor;
85
- /**
86
- * @internal
87
- */
88
- newWorkspaceSvg(options: Options): WorkspaceSvg;
89
- /** Add or remove the UI indicating if this icon may be clicked or not. */
90
- updateEditable(): void;
91
- /** Resize the bubble to match the size of the workspace. */
92
- private resizeBubble;
93
- /** A method handler for when the bubble is moved. */
94
- private onBubbleMove;
95
- /**
96
- * Show or hide the mutator bubble.
97
- *
98
- * @param visible True if the bubble should be visible.
99
- */
100
- setVisible(visible: boolean): void;
101
- /**
102
- * Fired whenever a change is made to the mutator's workspace.
103
- *
104
- * @param e Custom data for event.
105
- */
106
- private workspaceChanged;
107
- /**
108
- * Returns whether the given event in the mutator workspace should be ignored
109
- * when deciding whether to update the workspace and compose the block or not.
110
- *
111
- * @param e The event.
112
- * @returns Whether to ignore the event or not.
113
- */
114
- shouldIgnoreMutatorEvent_(e: Abstract): boolean;
115
- /**
116
- * Updates the source block when the mutator's blocks are changed.
117
- * Bump down any block that's too high.
118
- */
119
- private updateWorkspace;
120
- /** Dispose of this mutator. */
121
- dispose(): void;
122
- /** Update the styles on all blocks in the mutator. */
123
- updateBlockStyle(): void;
124
- /**
125
- * Reconnect an block to a mutated input.
126
- *
127
- * @param connectionChild Connection on child block.
128
- * @param block Parent block.
129
- * @param inputName Name of input on parent block.
130
- * @returns True iff a reconnection was made, false otherwise.
131
- */
132
- static reconnect(connectionChild: Connection, block: Block, inputName: string): boolean;
133
- /**
134
- * Get the parent workspace of a workspace that is inside a mutator, taking
135
- * into account whether it is a flyout.
136
- *
137
- * @param workspace The workspace that is inside a mutator.
138
- * @returns The mutator's parent workspace or null.
139
- */
140
- static findParentWs(workspace: WorkspaceSvg): WorkspaceSvg | null;
141
- }
142
- //# sourceMappingURL=mutator.d.ts.map
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Returns whether the debugger is turned on.
8
- *
9
- * @returns Whether the debugger is turned on.
10
- * @internal
11
- */
12
- export declare function isDebuggerEnabled(): boolean;
13
- /**
14
- * Turn on the blocks debugger.
15
- *
16
- * @deprecated March 2022. Use the rendering debugger in @blockly/dev-tools.
17
- * See https://www.npmjs.com/package/@blockly/dev-tools for more information.
18
- * @internal
19
- */
20
- export declare function startDebugger(): void;
21
- /**
22
- * Turn off the blocks debugger.
23
- *
24
- * @deprecated March 2022. Use the rendering debugger in @blockly/dev-tools.
25
- * See https://www.npmjs.com/package/@blockly/dev-tools for more information.
26
- * @internal
27
- */
28
- export declare function stopDebugger(): void;
29
- //# sourceMappingURL=debug.d.ts.map
@@ -1,117 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import type { BlockSvg } from '../../block_svg.js';
7
- import type { RenderedConnection } from '../../rendered_connection.js';
8
- import type { Measurable } from '../measurables/base.js';
9
- import type { InRowSpacer } from '../measurables/in_row_spacer.js';
10
- import type { Row } from '../measurables/row.js';
11
- import type { ConstantProvider } from './constants.js';
12
- import type { RenderInfo } from './info.js';
13
- /**
14
- * An object that renders rectangles and dots for debugging rendering code.
15
- */
16
- export declare class Debug {
17
- private readonly constants;
18
- /**
19
- * Configuration object containing booleans to enable and disable debug
20
- * rendering of specific rendering components.
21
- */
22
- static config: {
23
- rowSpacers: boolean;
24
- elemSpacers: boolean;
25
- rows: boolean;
26
- elems: boolean;
27
- connections: boolean;
28
- blockBounds: boolean;
29
- connectedBlockBounds: boolean;
30
- render: boolean;
31
- };
32
- /** An array of SVG elements that have been created by this object. */
33
- private debugElements_;
34
- /**
35
- * The SVG root of the block that is being rendered. Debug elements will
36
- * be attached to this root.
37
- */
38
- private svgRoot_;
39
- private randomColour_;
40
- /**
41
- * @param constants The renderer's constants.
42
- */
43
- constructor(constants: ConstantProvider);
44
- /**
45
- * Remove all elements the this object created on the last pass.
46
- */
47
- protected clearElems(): void;
48
- /**
49
- * Draw a debug rectangle for a spacer (empty) row.
50
- *
51
- * @param row The row to render.
52
- * @param cursorY The y position of the top of the row.
53
- * @param isRtl Whether the block is rendered RTL.
54
- */
55
- protected drawSpacerRow(row: Row, cursorY: number, isRtl: boolean): void;
56
- /**
57
- * Draw a debug rectangle for a horizontal spacer.
58
- *
59
- * @param elem The spacer to render.
60
- * @param rowHeight The height of the container row.
61
- * @param isRtl Whether the block is rendered RTL.
62
- */
63
- protected drawSpacerElem(elem: InRowSpacer, rowHeight: number, isRtl: boolean): void;
64
- /**
65
- * Draw a debug rectangle for an in-row element.
66
- *
67
- * @param elem The element to render.
68
- * @param isRtl Whether the block is rendered RTL.
69
- */
70
- protected drawRenderedElem(elem: Measurable, isRtl: boolean): void;
71
- /**
72
- * Draw a circle at the location of the given connection. Inputs and outputs
73
- * share the same colours, as do previous and next. When positioned correctly
74
- * a connected pair will look like a bullseye.
75
- *
76
- * @param conn The connection to circle.
77
- * @suppress {visibility} Suppress visibility of conn.offsetInBlock_ since
78
- * this is a debug module.
79
- */
80
- protected drawConnection(conn: RenderedConnection): void;
81
- /**
82
- * Draw a debug rectangle for a non-empty row.
83
- *
84
- * @param row The non-empty row to render.
85
- * @param cursorY The y position of the top of the row.
86
- * @param isRtl Whether the block is rendered RTL.
87
- */
88
- protected drawRenderedRow(row: Row, cursorY: number, isRtl: boolean): void;
89
- /**
90
- * Draw debug rectangles for a non-empty row and all of its subcomponents.
91
- *
92
- * @param row The non-empty row to render.
93
- * @param cursorY The y position of the top of the row.
94
- * @param isRtl Whether the block is rendered RTL.
95
- */
96
- protected drawRowWithElements(row: Row, cursorY: number, isRtl: boolean): void;
97
- /**
98
- * Draw a debug rectangle around the entire block.
99
- *
100
- * @param info Rendering information about the block to debug.
101
- */
102
- protected drawBoundingBox(info: RenderInfo): void;
103
- /**
104
- * Do all of the work to draw debug information for the whole block.
105
- *
106
- * @param block The block to draw debug information for.
107
- * @param info Rendering information about the block to debug.
108
- */
109
- drawDebug(block: BlockSvg, info: RenderInfo): void;
110
- /**
111
- * Show a debug filter to highlight that a block has been rendered.
112
- *
113
- * @param svgPath The block's SVG path.
114
- */
115
- protected drawRender(svgPath: SVGElement): void;
116
- }
117
- //# sourceMappingURL=debugger.d.ts.map
package/core/warning.d.ts DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2012 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import './events/events_bubble_open.js';
7
- import type { BlockSvg } from './block_svg.js';
8
- import { Icon } from './icon.js';
9
- /**
10
- * Class for a warning.
11
- */
12
- export declare class Warning extends Icon {
13
- private text;
14
- /** The top-level node of the warning text, or null if not created. */
15
- private paragraphElement;
16
- /** Does this icon get hidden when the block is collapsed? */
17
- collapseHidden: boolean;
18
- /** @param block The block associated with this warning. */
19
- constructor(block: BlockSvg);
20
- /**
21
- * Draw the warning icon.
22
- *
23
- * @param group The icon group.
24
- */
25
- protected drawIcon_(group: Element): void;
26
- /**
27
- * Show or hide the warning bubble.
28
- *
29
- * @param visible True if the bubble should be visible.
30
- */
31
- setVisible(visible: boolean): void;
32
- /** Show the bubble. */
33
- private createBubble;
34
- /** Dispose of the bubble and references to it. */
35
- private disposeBubble;
36
- /**
37
- * Set this warning's text.
38
- *
39
- * @param text Warning text (or '' to delete). This supports linebreaks.
40
- * @param id An ID for this text entry to be able to maintain multiple
41
- * warnings.
42
- */
43
- setText(text: string, id: string): void;
44
- /**
45
- * Get this warning's texts.
46
- *
47
- * @returns All texts concatenated into one string.
48
- */
49
- getText(): string;
50
- /** Dispose of this warning. */
51
- dispose(): void;
52
- }
53
- //# sourceMappingURL=warning.d.ts.map