blockly 9.3.0-beta.0 → 9.3.1

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 (282) hide show
  1. package/blockly.min.js +1674 -1520
  2. package/blockly_compressed.js +1313 -1152
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +166 -173
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/any_aliases.d.ts +5 -0
  7. package/core/block.d.ts +49 -17
  8. package/core/block_animations.d.ts +0 -4
  9. package/core/block_drag_surface.d.ts +135 -0
  10. package/core/block_dragger.d.ts +2 -7
  11. package/core/block_svg.d.ts +72 -9
  12. package/core/blockly.d.ts +29 -58
  13. package/core/blockly_options.d.ts +0 -2
  14. package/core/blocks.d.ts +0 -2
  15. package/core/browser_events.d.ts +0 -9
  16. package/core/bubble.d.ts +6 -4
  17. package/core/bubble_dragger.d.ts +2 -3
  18. package/core/bump_objects.d.ts +0 -3
  19. package/core/clipboard.d.ts +0 -3
  20. package/core/comment.d.ts +6 -10
  21. package/core/common.d.ts +0 -12
  22. package/core/component_manager.d.ts +0 -2
  23. package/core/connection.d.ts +19 -6
  24. package/core/connection_checker.d.ts +1 -3
  25. package/core/connection_db.d.ts +0 -2
  26. package/core/connection_type.d.ts +0 -2
  27. package/core/constants.d.ts +0 -4
  28. package/core/contextmenu.d.ts +0 -11
  29. package/core/contextmenu_items.d.ts +0 -27
  30. package/core/contextmenu_registry.d.ts +0 -2
  31. package/core/css.d.ts +0 -2
  32. package/core/delete_area.d.ts +0 -2
  33. package/core/dialog.d.ts +0 -6
  34. package/core/drag_target.d.ts +0 -2
  35. package/core/events/events_abstract.d.ts +0 -3
  36. package/core/events/events_block_base.d.ts +0 -2
  37. package/core/events/events_block_change.d.ts +0 -2
  38. package/core/events/events_block_create.d.ts +0 -2
  39. package/core/events/events_block_delete.d.ts +0 -2
  40. package/core/events/events_block_drag.d.ts +0 -2
  41. package/core/events/events_block_move.d.ts +0 -2
  42. package/core/events/events_bubble_open.d.ts +0 -2
  43. package/core/events/events_click.d.ts +0 -2
  44. package/core/events/events_comment_base.d.ts +0 -2
  45. package/core/events/events_comment_change.d.ts +0 -2
  46. package/core/events/events_comment_create.d.ts +0 -2
  47. package/core/events/events_comment_delete.d.ts +0 -2
  48. package/core/events/events_comment_move.d.ts +0 -2
  49. package/core/events/events_marker_move.d.ts +0 -2
  50. package/core/events/events_selected.d.ts +0 -2
  51. package/core/events/events_theme_change.d.ts +0 -2
  52. package/core/events/events_toolbox_item_select.d.ts +0 -2
  53. package/core/events/events_trashcan_open.d.ts +0 -2
  54. package/core/events/events_ui.d.ts +0 -1
  55. package/core/events/events_ui_base.d.ts +0 -2
  56. package/core/events/events_var_base.d.ts +0 -2
  57. package/core/events/events_var_create.d.ts +0 -2
  58. package/core/events/events_viewport.d.ts +0 -2
  59. package/core/events/utils.d.ts +0 -73
  60. package/core/events/workspace_events.d.ts +0 -2
  61. package/core/extensions.d.ts +0 -8
  62. package/core/field.d.ts +16 -15
  63. package/core/field_angle.d.ts +60 -50
  64. package/core/field_checkbox.d.ts +22 -10
  65. package/core/field_colour.d.ts +55 -42
  66. package/core/field_dropdown.d.ts +34 -18
  67. package/core/field_image.d.ts +9 -12
  68. package/core/field_input.d.ts +34 -11
  69. package/core/field_label.d.ts +7 -10
  70. package/core/field_label_serializable.d.ts +4 -6
  71. package/core/field_multilineinput.d.ts +34 -12
  72. package/core/field_number.d.ts +27 -19
  73. package/core/field_registry.d.ts +0 -3
  74. package/core/field_textinput.d.ts +28 -12
  75. package/core/field_variable.d.ts +28 -16
  76. package/core/flyout_base.d.ts +5 -6
  77. package/core/flyout_button.d.ts +2 -2
  78. package/core/flyout_horizontal.d.ts +0 -2
  79. package/core/flyout_metrics_manager.d.ts +0 -2
  80. package/core/flyout_vertical.d.ts +0 -2
  81. package/core/generator.d.ts +0 -1
  82. package/core/gesture.d.ts +4 -17
  83. package/core/grid.d.ts +0 -2
  84. package/core/icon.d.ts +0 -2
  85. package/core/inject.d.ts +0 -1
  86. package/core/input.d.ts +0 -3
  87. package/core/input_types.d.ts +0 -2
  88. package/core/insertion_marker_manager.d.ts +6 -6
  89. package/core/interfaces/i_ast_node_location.d.ts +0 -2
  90. package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
  91. package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
  92. package/core/interfaces/i_autohideable.d.ts +0 -2
  93. package/core/interfaces/i_block_dragger.d.ts +1 -3
  94. package/core/interfaces/i_bounded_element.d.ts +0 -2
  95. package/core/interfaces/i_bubble.d.ts +6 -4
  96. package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
  97. package/core/interfaces/i_component.d.ts +0 -2
  98. package/core/interfaces/i_connection_checker.d.ts +0 -2
  99. package/core/interfaces/i_contextmenu.d.ts +0 -1
  100. package/core/interfaces/i_copyable.d.ts +3 -2
  101. package/core/interfaces/i_deletable.d.ts +0 -2
  102. package/core/interfaces/i_delete_area.d.ts +0 -2
  103. package/core/interfaces/i_drag_target.d.ts +0 -2
  104. package/core/interfaces/i_draggable.d.ts +0 -2
  105. package/core/interfaces/i_flyout.d.ts +0 -2
  106. package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
  107. package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
  108. package/core/interfaces/i_metrics_manager.d.ts +0 -2
  109. package/core/interfaces/i_movable.d.ts +0 -2
  110. package/core/interfaces/i_positionable.d.ts +0 -2
  111. package/core/interfaces/i_procedure_model.d.ts +0 -5
  112. package/core/interfaces/i_registrable.d.ts +0 -2
  113. package/core/interfaces/i_selectable.d.ts +0 -2
  114. package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
  115. package/core/interfaces/i_serializer.d.ts +0 -2
  116. package/core/interfaces/i_styleable.d.ts +0 -2
  117. package/core/interfaces/i_toolbox.d.ts +0 -2
  118. package/core/interfaces/i_toolbox_item.d.ts +0 -2
  119. package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
  120. package/core/internal_constants.d.ts +0 -5
  121. package/core/keyboard_nav/ast_node.d.ts +0 -3
  122. package/core/keyboard_nav/basic_cursor.d.ts +0 -3
  123. package/core/keyboard_nav/cursor.d.ts +0 -3
  124. package/core/keyboard_nav/marker.d.ts +0 -2
  125. package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
  126. package/core/marker_manager.d.ts +0 -2
  127. package/core/menu.d.ts +0 -2
  128. package/core/menuitem.d.ts +0 -2
  129. package/core/metrics_manager.d.ts +0 -2
  130. package/core/mutator.d.ts +0 -2
  131. package/core/names.d.ts +0 -3
  132. package/core/options.d.ts +0 -2
  133. package/core/positionable_helpers.d.ts +0 -7
  134. package/core/procedures.d.ts +2 -25
  135. package/core/registry.d.ts +0 -11
  136. package/core/render_management.d.ts +15 -0
  137. package/core/rendered_connection.d.ts +22 -9
  138. package/core/renderers/common/block_rendering.d.ts +0 -3
  139. package/core/renderers/common/constants.d.ts +6 -51
  140. package/core/renderers/common/debug.d.ts +0 -3
  141. package/core/renderers/common/debugger.d.ts +9 -23
  142. package/core/renderers/common/drawer.d.ts +0 -5
  143. package/core/renderers/common/i_path_object.d.ts +0 -17
  144. package/core/renderers/common/info.d.ts +2 -12
  145. package/core/renderers/common/marker_svg.d.ts +2 -4
  146. package/core/renderers/common/path_object.d.ts +0 -24
  147. package/core/renderers/common/renderer.d.ts +5 -20
  148. package/core/renderers/geras/constants.d.ts +0 -5
  149. package/core/renderers/geras/drawer.d.ts +2 -4
  150. package/core/renderers/geras/highlight_constants.d.ts +6 -17
  151. package/core/renderers/geras/highlighter.d.ts +0 -13
  152. package/core/renderers/geras/info.d.ts +2 -5
  153. package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
  154. package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
  155. package/core/renderers/geras/path_object.d.ts +0 -8
  156. package/core/renderers/geras/renderer.d.ts +5 -7
  157. package/core/renderers/measurables/base.d.ts +0 -3
  158. package/core/renderers/measurables/bottom_row.d.ts +0 -9
  159. package/core/renderers/measurables/connection.d.ts +0 -3
  160. package/core/renderers/measurables/external_value_input.d.ts +0 -3
  161. package/core/renderers/measurables/field.d.ts +0 -3
  162. package/core/renderers/measurables/hat.d.ts +0 -3
  163. package/core/renderers/measurables/icon.d.ts +2 -5
  164. package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
  165. package/core/renderers/measurables/inline_input.d.ts +1 -4
  166. package/core/renderers/measurables/input_connection.d.ts +1 -4
  167. package/core/renderers/measurables/input_row.d.ts +0 -7
  168. package/core/renderers/measurables/jagged_edge.d.ts +2 -5
  169. package/core/renderers/measurables/next_connection.d.ts +0 -3
  170. package/core/renderers/measurables/output_connection.d.ts +0 -3
  171. package/core/renderers/measurables/previous_connection.d.ts +0 -3
  172. package/core/renderers/measurables/round_corner.d.ts +0 -3
  173. package/core/renderers/measurables/row.d.ts +0 -39
  174. package/core/renderers/measurables/spacer_row.d.ts +0 -3
  175. package/core/renderers/measurables/square_corner.d.ts +0 -3
  176. package/core/renderers/measurables/statement_input.d.ts +0 -3
  177. package/core/renderers/measurables/top_row.d.ts +0 -6
  178. package/core/renderers/measurables/types.d.ts +0 -31
  179. package/core/renderers/minimalist/constants.d.ts +2 -4
  180. package/core/renderers/minimalist/drawer.d.ts +0 -3
  181. package/core/renderers/minimalist/info.d.ts +0 -4
  182. package/core/renderers/minimalist/renderer.d.ts +0 -3
  183. package/core/renderers/thrasos/info.d.ts +0 -4
  184. package/core/renderers/thrasos/renderer.d.ts +3 -3
  185. package/core/renderers/zelos/constants.d.ts +3 -17
  186. package/core/renderers/zelos/drawer.d.ts +0 -3
  187. package/core/renderers/zelos/info.d.ts +0 -4
  188. package/core/renderers/zelos/marker_svg.d.ts +0 -2
  189. package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
  190. package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
  191. package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
  192. package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
  193. package/core/renderers/zelos/path_object.d.ts +0 -9
  194. package/core/renderers/zelos/renderer.d.ts +3 -5
  195. package/core/scrollbar.d.ts +0 -2
  196. package/core/scrollbar_pair.d.ts +0 -2
  197. package/core/serialization/blocks.d.ts +3 -9
  198. package/core/serialization/exceptions.d.ts +0 -8
  199. package/core/serialization/priorities.d.ts +0 -4
  200. package/core/serialization/registry.d.ts +0 -2
  201. package/core/serialization/variables.d.ts +0 -4
  202. package/core/serialization/workspaces.d.ts +0 -2
  203. package/core/shortcut_items.d.ts +0 -17
  204. package/core/shortcut_registry.d.ts +0 -2
  205. package/core/sprites.d.ts +0 -2
  206. package/core/theme/classic.d.ts +0 -2
  207. package/core/theme/zelos.d.ts +0 -2
  208. package/core/theme.d.ts +0 -2
  209. package/core/theme_manager.d.ts +3 -6
  210. package/core/toolbox/category.d.ts +5 -7
  211. package/core/toolbox/collapsible_category.d.ts +0 -4
  212. package/core/toolbox/separator.d.ts +0 -2
  213. package/core/toolbox/toolbox.d.ts +2 -5
  214. package/core/toolbox/toolbox_item.d.ts +0 -2
  215. package/core/tooltip.d.ts +0 -29
  216. package/core/touch.d.ts +0 -13
  217. package/core/trashcan.d.ts +0 -2
  218. package/core/utils/aria.d.ts +0 -6
  219. package/core/utils/array.d.ts +0 -1
  220. package/core/utils/colour.d.ts +0 -12
  221. package/core/utils/coordinate.d.ts +0 -2
  222. package/core/utils/deprecation.d.ts +0 -1
  223. package/core/utils/dom.d.ts +0 -25
  224. package/core/utils/idgenerator.d.ts +0 -2
  225. package/core/utils/keycodes.d.ts +0 -2
  226. package/core/utils/math.d.ts +0 -3
  227. package/core/utils/metrics.d.ts +0 -1
  228. package/core/utils/object.d.ts +0 -4
  229. package/core/utils/parsing.d.ts +0 -4
  230. package/core/utils/rect.d.ts +0 -2
  231. package/core/utils/size.d.ts +0 -2
  232. package/core/utils/string.d.ts +0 -6
  233. package/core/utils/style.d.ts +0 -8
  234. package/core/utils/svg.d.ts +0 -2
  235. package/core/utils/svg_math.d.ts +0 -6
  236. package/core/utils/svg_paths.d.ts +0 -8
  237. package/core/utils/toolbox.d.ts +2 -35
  238. package/core/utils/useragent.d.ts +0 -8
  239. package/core/utils/xml.d.ts +9 -8
  240. package/core/utils.d.ts +0 -12
  241. package/core/variable_map.d.ts +1 -3
  242. package/core/variable_model.d.ts +0 -1
  243. package/core/variables.d.ts +13 -17
  244. package/core/variables_dynamic.d.ts +0 -4
  245. package/core/warning.d.ts +0 -2
  246. package/core/widgetdiv.d.ts +0 -10
  247. package/core/workspace.d.ts +3 -3
  248. package/core/workspace_audio.d.ts +0 -2
  249. package/core/workspace_comment.d.ts +1 -3
  250. package/core/workspace_comment_svg.d.ts +16 -5
  251. package/core/workspace_drag_surface_svg.d.ts +74 -0
  252. package/core/workspace_dragger.d.ts +3 -2
  253. package/core/workspace_svg.d.ts +48 -8
  254. package/core/xml.d.ts +1 -13
  255. package/core/zoom_controls.d.ts +4 -15
  256. package/dart_compressed.js +199 -199
  257. package/dart_compressed.js.map +1 -1
  258. package/javascript_compressed.js +168 -168
  259. package/javascript_compressed.js.map +1 -1
  260. package/lua_compressed.js +211 -211
  261. package/lua_compressed.js.map +1 -1
  262. package/msg/bn.js +2 -2
  263. package/msg/bs.js +7 -7
  264. package/msg/de.js +1 -1
  265. package/msg/fi.js +1 -1
  266. package/msg/fr.js +3 -3
  267. package/msg/ia.js +5 -5
  268. package/msg/kn.js +5 -5
  269. package/msg/ko.js +1 -1
  270. package/msg/lb.js +22 -22
  271. package/msg/sd.js +9 -9
  272. package/msg/skr-arab.js +2 -2
  273. package/msg/sl.js +18 -18
  274. package/msg/sw.js +1 -1
  275. package/msg/zh-hans.js +6 -6
  276. package/msg/zh-hant.js +2 -2
  277. package/package.json +6 -6
  278. package/php_compressed.js +185 -185
  279. package/php_compressed.js.map +1 -1
  280. package/python_compressed.js +138 -138
  281. package/python_compressed.js.map +1 -1
  282. package/core/utils/sentinel.d.ts +0 -18
@@ -6,8 +6,6 @@
6
6
  import type { IComponent } from './i_component.js';
7
7
  /**
8
8
  * Interface for a component that can be automatically hidden.
9
- *
10
- * @alias Blockly.IAutoHideable
11
9
  */
12
10
  export interface IAutoHideable extends IComponent {
13
11
  /**
@@ -7,12 +7,10 @@ import type { Coordinate } from '../utils/coordinate.js';
7
7
  import type { BlockSvg } from '../block_svg.js';
8
8
  /**
9
9
  * A block dragger interface.
10
- *
11
- * @alias Blockly.IBlockDragger
12
10
  */
13
11
  export interface IBlockDragger {
14
12
  /**
15
- * Start dragging a block.
13
+ * Start dragging a block. This includes moving it to the drag surface.
16
14
  *
17
15
  * @param currentDragDeltaXY How far the pointer has moved from the position
18
16
  * at mouse down, in pixel units.
@@ -6,8 +6,6 @@
6
6
  import type { Rect } from '../utils/rect.js';
7
7
  /**
8
8
  * A bounded element interface.
9
- *
10
- * @alias Blockly.IBoundedElement
11
9
  */
12
10
  export interface IBoundedElement {
13
11
  /**
@@ -4,12 +4,11 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Coordinate } from '../utils/coordinate.js';
7
+ import type { BlockDragSurfaceSvg } from '../block_drag_surface.js';
7
8
  import type { IContextMenu } from './i_contextmenu.js';
8
9
  import type { IDraggable } from './i_draggable.js';
9
10
  /**
10
11
  * A bubble interface.
11
- *
12
- * @alias Blockly.IBubble
13
12
  */
14
13
  export interface IBubble extends IDraggable, IContextMenu {
15
14
  /**
@@ -40,11 +39,14 @@ export interface IBubble extends IDraggable, IContextMenu {
40
39
  */
41
40
  setDragging(dragging: boolean): void;
42
41
  /**
43
- * Move this bubble during a drag.
42
+ * Move this bubble during a drag, taking into account whether or not there is
43
+ * a drag surface.
44
44
  *
45
+ * @param dragSurface The surface that carries rendered items during a drag,
46
+ * or null if no drag surface is in use.
45
47
  * @param newLoc The location to translate to, in workspace coordinates.
46
48
  */
47
- moveDuringDrag(newLoc: Coordinate): void;
49
+ moveDuringDrag(dragSurface: BlockDragSurfaceSvg | null, newLoc: Coordinate): void;
48
50
  /**
49
51
  * Move the bubble to the specified location in workspace coordinates.
50
52
  *
@@ -7,8 +7,6 @@ import type { ISelectableToolboxItem } from './i_selectable_toolbox_item.js';
7
7
  import type { IToolboxItem } from './i_toolbox_item.js';
8
8
  /**
9
9
  * Interface for an item in the toolbox that can be collapsed.
10
- *
11
- * @alias Blockly.ICollapsibleToolboxItem
12
10
  */
13
11
  export interface ICollapsibleToolboxItem extends ISelectableToolboxItem {
14
12
  /**
@@ -6,8 +6,6 @@
6
6
  /**
7
7
  * The interface for a workspace component that can be registered with the
8
8
  * ComponentManager.
9
- *
10
- * @alias Blockly.IComponent
11
9
  */
12
10
  export interface IComponent {
13
11
  /**
@@ -7,8 +7,6 @@ import type { Connection } from '../connection.js';
7
7
  import type { RenderedConnection } from '../rendered_connection.js';
8
8
  /**
9
9
  * Class for connection type checking logic.
10
- *
11
- * @alias Blockly.IConnectionChecker
12
10
  */
13
11
  export interface IConnectionChecker {
14
12
  /**
@@ -3,7 +3,6 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- /** @alias Blockly.IContextMenu */
7
6
  export interface IContextMenu {
8
7
  /**
9
8
  * Show the context menu for this object.
@@ -5,7 +5,6 @@
5
5
  */
6
6
  import type { WorkspaceSvg } from '../workspace_svg.js';
7
7
  import type { ISelectable } from './i_selectable.js';
8
- /** @alias Blockly.ICopyable */
9
8
  export interface ICopyable extends ISelectable {
10
9
  /**
11
10
  * Encode for copying.
@@ -19,7 +18,9 @@ export declare namespace ICopyable {
19
18
  interface CopyData {
20
19
  saveInfo: Object | Element;
21
20
  source: WorkspaceSvg;
22
- typeCounts: Object | null;
21
+ typeCounts: {
22
+ [key: string]: number;
23
+ } | null;
23
24
  }
24
25
  }
25
26
  export type CopyData = ICopyable.CopyData;
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * The interface for an object that can be deleted.
8
- *
9
- * @alias Blockly.IDeletable
10
8
  */
11
9
  export interface IDeletable {
12
10
  /**
@@ -8,8 +8,6 @@ import type { IDraggable } from './i_draggable.js';
8
8
  /**
9
9
  * Interface for a component that can delete a block or bubble that is dropped
10
10
  * on top of it.
11
- *
12
- * @alias Blockly.IDeleteArea
13
11
  */
14
12
  export interface IDeleteArea extends IDragTarget {
15
13
  /**
@@ -9,8 +9,6 @@ import type { IComponent } from './i_component.js';
9
9
  /**
10
10
  * Interface for a component with custom behaviour when a block or bubble is
11
11
  * dragged over or dropped on top of it.
12
- *
13
- * @alias Blockly.IDragTarget
14
12
  */
15
13
  export interface IDragTarget extends IComponent {
16
14
  /**
@@ -6,8 +6,6 @@
6
6
  import type { IDeletable } from './i_deletable.js';
7
7
  /**
8
8
  * The interface for an object that can be dragged.
9
- *
10
- * @alias Blockly.IDraggable
11
9
  */
12
10
  export interface IDraggable extends IDeletable {
13
11
  }
@@ -11,8 +11,6 @@ import type { Svg } from '../utils/svg.js';
11
11
  import type { IRegistrable } from './i_registrable.js';
12
12
  /**
13
13
  * Interface for a flyout.
14
- *
15
- * @alias Blockly.IFlyout
16
14
  */
17
15
  export interface IFlyout extends IRegistrable {
18
16
  /** Whether the flyout is laid out horizontally or not. */
@@ -6,8 +6,6 @@
6
6
  import { KeyboardShortcut } from '../shortcut_registry.js';
7
7
  /**
8
8
  * An interface for an object that handles keyboard shortcuts.
9
- *
10
- * @alias Blockly.IKeyboardAccessible
11
9
  */
12
10
  export interface IKeyboardAccessible {
13
11
  /**
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Legacy means of representing a procedure signature. The elements are
8
+ * respectively: name, parameter names, and whether it has a return value.
9
+ */
10
+ export type ProcedureTuple = [string, string[], boolean];
11
+ /**
12
+ * Procedure block type.
13
+ *
14
+ * @internal
15
+ */
16
+ export interface ProcedureBlock {
17
+ getProcedureCall: () => string;
18
+ renameProcedure: (p1: string, p2: string) => void;
19
+ getProcedureDef: () => ProcedureTuple;
20
+ }
21
+ /** @internal */
22
+ export interface LegacyProcedureDefBlock {
23
+ getProcedureDef: () => ProcedureTuple;
24
+ }
25
+ /** @internal */
26
+ export declare function isLegacyProcedureDefBlock(block: Object): block is LegacyProcedureDefBlock;
27
+ /** @internal */
28
+ export interface LegacyProcedureCallBlock {
29
+ getProcedureCall: () => string;
30
+ renameProcedure: (p1: string, p2: string) => void;
31
+ }
32
+ /** @internal */
33
+ export declare function isLegacyProcedureCallBlock(block: Object): block is LegacyProcedureCallBlock;
34
+ //# sourceMappingURL=i_legacy_procedure_blocks.d.ts.map
@@ -8,8 +8,6 @@ import type { Size } from '../utils/size.js';
8
8
  import type { Metrics } from '../utils/metrics.js';
9
9
  /**
10
10
  * Interface for a metrics manager.
11
- *
12
- * @alias Blockly.IMetricsManager
13
11
  */
14
12
  export interface IMetricsManager {
15
13
  /**
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * The interface for an object that is movable.
8
- *
9
- * @alias Blockly.IMovable
10
8
  */
11
9
  export interface IMovable {
12
10
  /**
@@ -8,8 +8,6 @@ import type { UiMetrics } from '../metrics_manager.js';
8
8
  import type { IComponent } from './i_component.js';
9
9
  /**
10
10
  * Interface for a component that is positioned on top of the workspace.
11
- *
12
- * @alias Blockly.IPositionable
13
11
  */
14
12
  export interface IPositionable extends IComponent {
15
13
  /**
@@ -3,11 +3,6 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- /**
7
- * The interface for the data model of a procedure.
8
- *
9
- * @namespace Blockly.IProcedureModel
10
- */
11
6
  import { IParameterModel } from './i_parameter_model.js';
12
7
  /**
13
8
  * A data model for a procedure.
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * The interface for a Blockly component that can be registered.
8
- *
9
- * @alias Blockly.IRegistrable
10
8
  */
11
9
  export interface IRegistrable {
12
10
  }
@@ -7,8 +7,6 @@ import type { IDeletable } from './i_deletable.js';
7
7
  import type { IMovable } from './i_movable.js';
8
8
  /**
9
9
  * The interface for an object that is selectable.
10
- *
11
- * @alias Blockly.ISelectable
12
10
  */
13
11
  export interface ISelectable extends IDeletable, IMovable {
14
12
  id: string;
@@ -7,8 +7,6 @@ import type { FlyoutItemInfoArray } from '../utils/toolbox';
7
7
  import type { IToolboxItem } from './i_toolbox_item.js';
8
8
  /**
9
9
  * Interface for an item in the toolbox that can be selected.
10
- *
11
- * @alias Blockly.ISelectableToolboxItem
12
10
  */
13
11
  export interface ISelectableToolboxItem extends IToolboxItem {
14
12
  /**
@@ -46,4 +44,8 @@ export interface ISelectableToolboxItem extends IToolboxItem {
46
44
  */
47
45
  onClick(_e: Event): void;
48
46
  }
47
+ /**
48
+ * Type guard that checks whether an IToolboxItem is an ISelectableToolboxItem.
49
+ */
50
+ export declare function isSelectableToolboxItem(toolboxItem: IToolboxItem): toolboxItem is ISelectableToolboxItem;
49
51
  //# sourceMappingURL=i_selectable_toolbox_item.d.ts.map
@@ -6,8 +6,6 @@
6
6
  import type { Workspace } from '../workspace.js';
7
7
  /**
8
8
  * Serializes and deserializes a plugin or system.
9
- *
10
- * @alias Blockly.serialization.ISerializer.ISerializer
11
9
  */
12
10
  export interface ISerializer {
13
11
  /**
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Interface for an object that a style can be added to.
8
- *
9
- * @alias Blockly.IStyleable
10
8
  */
11
9
  export interface IStyleable {
12
10
  /**
@@ -10,8 +10,6 @@ import type { IFlyout } from './i_flyout.js';
10
10
  import type { WorkspaceSvg } from '../workspace_svg.js';
11
11
  /**
12
12
  * Interface for a toolbox.
13
- *
14
- * @alias Blockly.IToolbox
15
13
  */
16
14
  export interface IToolbox extends IRegistrable {
17
15
  /** Initializes the toolbox. */
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Interface for an item in the toolbox.
8
- *
9
- * @alias Blockly.IToolboxItem
10
8
  */
11
9
  export interface IToolboxItem {
12
10
  /**
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { VariableModel } from '../variable_model.js';
7
+ import { IParameterModel } from './i_parameter_model.js';
8
+ /** Interface for a parameter model that holds a variable model. */
9
+ export interface IVariableBackedParameterModel extends IParameterModel {
10
+ /** Returns the variable model held by this type. */
11
+ getVariableModel(): VariableModel;
12
+ }
13
+ /**
14
+ * Returns whether the given object is a variable holder or not.
15
+ */
16
+ export declare function isVariableBackedParameterModel(param: IParameterModel): param is IVariableBackedParameterModel;
17
+ //# sourceMappingURL=i_variable_backed_parameter_model.d.ts.map
@@ -6,7 +6,6 @@
6
6
  /**
7
7
  * Number of characters to truncate a collapsed block to.
8
8
  *
9
- * @alias Blockly.internalConstants.COLLAPSE_CHARS
10
9
  * @internal
11
10
  */
12
11
  export declare const COLLAPSE_CHARS = 30;
@@ -14,14 +13,12 @@ export declare const COLLAPSE_CHARS = 30;
14
13
  * When dragging a block out of a stack, split the stack in two (true), or drag
15
14
  * out the block healing the stack (false).
16
15
  *
17
- * @alias Blockly.internalConstants.DRAG_STACK
18
16
  * @internal
19
17
  */
20
18
  export declare const DRAG_STACK = true;
21
19
  /**
22
20
  * Lookup table for determining the opposite type of a connection.
23
21
  *
24
- * @alias Blockly.internalConstants.OPPOSITE_TYPE
25
22
  * @internal
26
23
  */
27
24
  export declare const OPPOSITE_TYPE: number[];
@@ -30,7 +27,6 @@ export declare const OPPOSITE_TYPE: number[];
30
27
  * This string indicates that this option in the dropdown is 'Rename
31
28
  * variable...' and if selected, should trigger the prompt to rename a variable.
32
29
  *
33
- * @alias Blockly.internalConstants.RENAME_VARIABLE_ID
34
30
  * @internal
35
31
  */
36
32
  export declare const RENAME_VARIABLE_ID = "RENAME_VARIABLE_ID";
@@ -39,7 +35,6 @@ export declare const RENAME_VARIABLE_ID = "RENAME_VARIABLE_ID";
39
35
  * This string indicates that this option in the dropdown is 'Delete the "%1"
40
36
  * variable' and if selected, should trigger the prompt to delete a variable.
41
37
  *
42
- * @alias Blockly.internalConstants.DELETE_VARIABLE_ID
43
38
  * @internal
44
39
  */
45
40
  export declare const DELETE_VARIABLE_ID = "DELETE_VARIABLE_ID";
@@ -14,8 +14,6 @@ import type { Workspace } from '../workspace.js';
14
14
  * Class for an AST node.
15
15
  * It is recommended that you use one of the createNode methods instead of
16
16
  * creating a node directly.
17
- *
18
- * @alias Blockly.ASTNode
19
17
  */
20
18
  export declare class ASTNode {
21
19
  /**
@@ -37,7 +35,6 @@ export declare class ASTNode {
37
35
  * Must be in ASTNode.types.
38
36
  * @param location The position in the AST.
39
37
  * @param opt_params Optional dictionary of options.
40
- * @alias Blockly.ASTNode
41
38
  */
42
39
  constructor(type: string, location: IASTNodeLocation, opt_params?: Params);
43
40
  /**
@@ -9,13 +9,10 @@ import { Cursor } from './cursor.js';
9
9
  * Class for a basic cursor.
10
10
  * This will allow the user to get to all nodes in the AST by hitting next or
11
11
  * previous.
12
- *
13
- * @alias Blockly.BasicCursor
14
12
  */
15
13
  export declare class BasicCursor extends Cursor {
16
14
  /** Name used for registering a basic cursor. */
17
15
  static readonly registrationName = "basicCursor";
18
- /** @alias Blockly.BasicCursor */
19
16
  constructor();
20
17
  /**
21
18
  * Find the next node in the pre order traversal.
@@ -8,12 +8,9 @@ import { Marker } from './marker.js';
8
8
  /**
9
9
  * Class for a cursor.
10
10
  * A cursor controls how a user navigates the Blockly AST.
11
- *
12
- * @alias Blockly.Cursor
13
11
  */
14
12
  export declare class Cursor extends Marker {
15
13
  type: string;
16
- /** @alias Blockly.Cursor */
17
14
  constructor();
18
15
  /**
19
16
  * Find the next connection, field, or block.
@@ -8,8 +8,6 @@ import type { ASTNode } from './ast_node.js';
8
8
  /**
9
9
  * Class for a marker.
10
10
  * This is used in keyboard navigation to save a location in the Blockly AST.
11
- *
12
- * @alias Blockly.Marker
13
11
  */
14
12
  export declare class Marker {
15
13
  /** The colour of the marker. */
@@ -7,8 +7,6 @@ import { ASTNode } from './ast_node.js';
7
7
  import { BasicCursor } from './basic_cursor.js';
8
8
  /**
9
9
  * A cursor for navigating between tab navigable fields.
10
- *
11
- * @alias Blockly.TabNavigateCursor
12
10
  */
13
11
  export declare class TabNavigateCursor extends BasicCursor {
14
12
  /**
@@ -8,8 +8,6 @@ import type { Marker } from './keyboard_nav/marker.js';
8
8
  import type { WorkspaceSvg } from './workspace_svg.js';
9
9
  /**
10
10
  * Class to manage the multiple markers and the cursor on a workspace.
11
- *
12
- * @alias Blockly.MarkerManager
13
11
  */
14
12
  export declare class MarkerManager {
15
13
  private readonly workspace;
package/core/menu.d.ts CHANGED
@@ -9,8 +9,6 @@ import { Coordinate } from './utils/coordinate.js';
9
9
  import type { Size } from './utils/size.js';
10
10
  /**
11
11
  * A basic menu class.
12
- *
13
- * @alias Blockly.Menu
14
12
  */
15
13
  export declare class Menu {
16
14
  /**
@@ -6,8 +6,6 @@
6
6
  import * as aria from './utils/aria.js';
7
7
  /**
8
8
  * Class representing an item in a menu.
9
- *
10
- * @alias Blockly.MenuItem
11
9
  */
12
10
  export declare class MenuItem {
13
11
  private readonly content;
@@ -12,8 +12,6 @@ import * as toolboxUtils from './utils/toolbox.js';
12
12
  import type { WorkspaceSvg } from './workspace_svg.js';
13
13
  /**
14
14
  * The manager for all workspace metrics calculations.
15
- *
16
- * @alias Blockly.MetricsManager
17
15
  */
18
16
  export declare class MetricsManager implements IMetricsManager {
19
17
  /** The workspace to calculate metrics for. */
package/core/mutator.d.ts CHANGED
@@ -13,8 +13,6 @@ import { Options } from './options.js';
13
13
  import type { WorkspaceSvg } from './workspace_svg.js';
14
14
  /**
15
15
  * Class for a mutator dialog.
16
- *
17
- * @alias Blockly.Mutator
18
16
  */
19
17
  export declare class Mutator extends Icon {
20
18
  private quarkNames;
package/core/names.d.ts CHANGED
@@ -7,8 +7,6 @@ import type { VariableMap } from './variable_map.js';
7
7
  import type { Workspace } from './workspace.js';
8
8
  /**
9
9
  * Class for a database of entity names (variables, procedures, etc).
10
- *
11
- * @alias Blockly.Names
12
10
  */
13
11
  export declare class Names {
14
12
  static DEVELOPER_VARIABLE_TYPE: NameType;
@@ -123,7 +121,6 @@ export declare namespace Names {
123
121
  * getName('foo', 'VARIABLE') = 'foo'
124
122
  * getName('foo', 'PROCEDURE') = 'foo2'
125
123
  *
126
- * @alias Blockly.Names.NameType
127
124
  */
128
125
  enum NameType {
129
126
  DEVELOPER_VARIABLE = "DEVELOPER_VARIABLE",
package/core/options.d.ts CHANGED
@@ -11,8 +11,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
11
11
  /**
12
12
  * Parse the user-specified options, using reasonable defaults where behaviour
13
13
  * is unspecified.
14
- *
15
- * @alias Blockly.Options
16
14
  */
17
15
  export declare class Options {
18
16
  RTL: boolean;
@@ -10,7 +10,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
10
10
  /**
11
11
  * Enum for vertical positioning.
12
12
  *
13
- * @alias Blockly.uiPosition.verticalPosition
14
13
  * @internal
15
14
  */
16
15
  export declare enum verticalPosition {
@@ -20,7 +19,6 @@ export declare enum verticalPosition {
20
19
  /**
21
20
  * Enum for horizontal positioning.
22
21
  *
23
- * @alias Blockly.uiPosition.horizontalPosition
24
22
  * @internal
25
23
  */
26
24
  export declare enum horizontalPosition {
@@ -30,7 +28,6 @@ export declare enum horizontalPosition {
30
28
  /**
31
29
  * An object defining a horizontal and vertical positioning.
32
30
  *
33
- * @alias Blockly.uiPosition.Position
34
31
  * @internal
35
32
  */
36
33
  export interface Position {
@@ -40,7 +37,6 @@ export interface Position {
40
37
  /**
41
38
  * Enum for bump rules to use for dealing with collisions.
42
39
  *
43
- * @alias Blockly.uiPosition.bumpDirection
44
40
  * @internal
45
41
  */
46
42
  export declare enum bumpDirection {
@@ -60,7 +56,6 @@ export declare enum bumpDirection {
60
56
  * @param metrics The workspace UI metrics.
61
57
  * @param workspace The workspace.
62
58
  * @returns The suggested start position.
63
- * @alias Blockly.uiPosition.getStartPositionRect
64
59
  * @internal
65
60
  */
66
61
  export declare function getStartPositionRect(position: Position, size: Size, horizontalPadding: number, verticalPadding: number, metrics: UiMetrics, workspace: WorkspaceSvg): Rect;
@@ -73,7 +68,6 @@ export declare function getStartPositionRect(position: Position, size: Size, hor
73
68
  * @param workspace The workspace.
74
69
  * @param metrics The workspace metrics.
75
70
  * @returns The suggested corner position.
76
- * @alias Blockly.uiPosition.getCornerOppositeToolbox
77
71
  * @internal
78
72
  */
79
73
  export declare function getCornerOppositeToolbox(workspace: WorkspaceSvg, metrics: UiMetrics): Position;
@@ -89,7 +83,6 @@ export declare function getCornerOppositeToolbox(workspace: WorkspaceSvg, metric
89
83
  * @param savedPositions List of rectangles that represent the positions of UI
90
84
  * elements already placed.
91
85
  * @returns The suggested position rectangle.
92
- * @alias Blockly.uiPosition.bumpPositionRect
93
86
  * @internal
94
87
  */
95
88
  export declare function bumpPositionRect(startRect: Rect, margin: number, bumpDir: bumpDirection, savedPositions: Rect[]): Rect;