blockly 9.2.1 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/blockly.min.js +1615 -1509
  2. package/blockly_compressed.js +1249 -1136
  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_dragger.d.ts +1 -6
  10. package/core/block_svg.d.ts +58 -8
  11. package/core/blockly.d.ts +27 -58
  12. package/core/blockly_options.d.ts +0 -2
  13. package/core/blocks.d.ts +0 -2
  14. package/core/browser_events.d.ts +0 -9
  15. package/core/bubble.d.ts +0 -2
  16. package/core/bubble_dragger.d.ts +0 -2
  17. package/core/bump_objects.d.ts +0 -3
  18. package/core/clipboard.d.ts +0 -3
  19. package/core/comment.d.ts +6 -10
  20. package/core/common.d.ts +0 -12
  21. package/core/component_manager.d.ts +0 -2
  22. package/core/connection.d.ts +19 -6
  23. package/core/connection_checker.d.ts +1 -3
  24. package/core/connection_db.d.ts +0 -2
  25. package/core/connection_type.d.ts +0 -2
  26. package/core/constants.d.ts +0 -4
  27. package/core/contextmenu.d.ts +0 -11
  28. package/core/contextmenu_items.d.ts +0 -27
  29. package/core/contextmenu_registry.d.ts +0 -2
  30. package/core/css.d.ts +0 -2
  31. package/core/delete_area.d.ts +0 -2
  32. package/core/dialog.d.ts +0 -6
  33. package/core/drag_target.d.ts +0 -2
  34. package/core/events/events.d.ts +2 -22
  35. package/core/events/events_abstract.d.ts +7 -3
  36. package/core/events/events_block_base.d.ts +2 -3
  37. package/core/events/events_block_change.d.ts +9 -3
  38. package/core/events/events_block_create.d.ts +6 -4
  39. package/core/events/events_block_delete.d.ts +7 -4
  40. package/core/events/events_block_drag.d.ts +7 -3
  41. package/core/events/events_block_move.d.ts +20 -3
  42. package/core/events/events_bubble_open.d.ts +3 -2
  43. package/core/events/events_click.d.ts +6 -3
  44. package/core/events/events_comment_base.d.ts +1 -2
  45. package/core/events/events_comment_change.d.ts +3 -3
  46. package/core/events/events_comment_create.d.ts +2 -3
  47. package/core/events/events_comment_delete.d.ts +2 -3
  48. package/core/events/events_comment_move.d.ts +4 -4
  49. package/core/events/events_marker_move.d.ts +10 -3
  50. package/core/events/events_selected.d.ts +6 -2
  51. package/core/events/events_theme_change.d.ts +2 -3
  52. package/core/events/events_toolbox_item_select.d.ts +3 -3
  53. package/core/events/events_trashcan_open.d.ts +5 -3
  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 +1 -2
  57. package/core/events/events_var_create.d.ts +3 -3
  58. package/core/events/events_var_delete.d.ts +4 -2
  59. package/core/events/events_var_rename.d.ts +4 -2
  60. package/core/events/events_viewport.d.ts +13 -2
  61. package/core/events/utils.d.ts +0 -89
  62. package/core/events/workspace_events.d.ts +2 -6
  63. package/core/extensions.d.ts +0 -8
  64. package/core/field.d.ts +55 -21
  65. package/core/field_angle.d.ts +61 -51
  66. package/core/field_checkbox.d.ts +34 -15
  67. package/core/field_colour.d.ts +56 -46
  68. package/core/field_dropdown.d.ts +35 -19
  69. package/core/field_image.d.ts +10 -14
  70. package/core/field_input.d.ts +39 -25
  71. package/core/field_label.d.ts +7 -10
  72. package/core/field_label_serializable.d.ts +4 -6
  73. package/core/field_multilineinput.d.ts +36 -14
  74. package/core/field_number.d.ts +27 -19
  75. package/core/field_registry.d.ts +0 -3
  76. package/core/field_textinput.d.ts +36 -8
  77. package/core/field_variable.d.ts +30 -18
  78. package/core/flyout_base.d.ts +5 -6
  79. package/core/flyout_button.d.ts +2 -2
  80. package/core/flyout_horizontal.d.ts +0 -2
  81. package/core/flyout_metrics_manager.d.ts +0 -2
  82. package/core/flyout_vertical.d.ts +0 -2
  83. package/core/generator.d.ts +0 -1
  84. package/core/gesture.d.ts +5 -18
  85. package/core/grid.d.ts +0 -2
  86. package/core/icon.d.ts +0 -2
  87. package/core/inject.d.ts +0 -1
  88. package/core/input.d.ts +0 -3
  89. package/core/input_types.d.ts +0 -2
  90. package/core/insertion_marker_manager.d.ts +6 -6
  91. package/core/interfaces/i_ast_node_location.d.ts +0 -2
  92. package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
  93. package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
  94. package/core/interfaces/i_autohideable.d.ts +0 -2
  95. package/core/interfaces/i_block_dragger.d.ts +0 -2
  96. package/core/interfaces/i_bounded_element.d.ts +0 -2
  97. package/core/interfaces/i_bubble.d.ts +0 -2
  98. package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
  99. package/core/interfaces/i_component.d.ts +0 -2
  100. package/core/interfaces/i_connection_checker.d.ts +0 -2
  101. package/core/interfaces/i_contextmenu.d.ts +0 -1
  102. package/core/interfaces/i_copyable.d.ts +3 -2
  103. package/core/interfaces/i_deletable.d.ts +0 -2
  104. package/core/interfaces/i_delete_area.d.ts +0 -2
  105. package/core/interfaces/i_drag_target.d.ts +0 -2
  106. package/core/interfaces/i_draggable.d.ts +0 -2
  107. package/core/interfaces/i_flyout.d.ts +0 -2
  108. package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
  109. package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
  110. package/core/interfaces/i_metrics_manager.d.ts +8 -8
  111. package/core/interfaces/i_movable.d.ts +0 -2
  112. package/core/interfaces/i_positionable.d.ts +0 -2
  113. package/core/interfaces/i_procedure_block.d.ts +3 -0
  114. package/core/interfaces/i_procedure_model.d.ts +0 -5
  115. package/core/interfaces/i_registrable.d.ts +0 -2
  116. package/core/interfaces/i_selectable.d.ts +0 -2
  117. package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
  118. package/core/interfaces/i_serializer.d.ts +0 -2
  119. package/core/interfaces/i_styleable.d.ts +0 -2
  120. package/core/interfaces/i_toolbox.d.ts +0 -2
  121. package/core/interfaces/i_toolbox_item.d.ts +0 -2
  122. package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
  123. package/core/internal_constants.d.ts +0 -5
  124. package/core/keyboard_nav/ast_node.d.ts +0 -3
  125. package/core/keyboard_nav/basic_cursor.d.ts +0 -3
  126. package/core/keyboard_nav/cursor.d.ts +0 -3
  127. package/core/keyboard_nav/marker.d.ts +0 -2
  128. package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
  129. package/core/marker_manager.d.ts +0 -2
  130. package/core/menu.d.ts +0 -2
  131. package/core/menuitem.d.ts +0 -2
  132. package/core/metrics_manager.d.ts +8 -8
  133. package/core/mutator.d.ts +0 -2
  134. package/core/names.d.ts +0 -3
  135. package/core/{procedures/observable_procedure_map.d.ts → observable_procedure_map.d.ts} +4 -5
  136. package/core/options.d.ts +0 -2
  137. package/core/positionable_helpers.d.ts +0 -7
  138. package/core/procedures.d.ts +7 -28
  139. package/core/registry.d.ts +0 -11
  140. package/core/render_management.d.ts +15 -0
  141. package/core/rendered_connection.d.ts +22 -9
  142. package/core/renderers/common/block_rendering.d.ts +0 -3
  143. package/core/renderers/common/constants.d.ts +6 -51
  144. package/core/renderers/common/debug.d.ts +0 -3
  145. package/core/renderers/common/debugger.d.ts +9 -23
  146. package/core/renderers/common/drawer.d.ts +0 -5
  147. package/core/renderers/common/i_path_object.d.ts +0 -17
  148. package/core/renderers/common/info.d.ts +2 -12
  149. package/core/renderers/common/marker_svg.d.ts +2 -4
  150. package/core/renderers/common/path_object.d.ts +0 -24
  151. package/core/renderers/common/renderer.d.ts +5 -20
  152. package/core/renderers/geras/constants.d.ts +0 -5
  153. package/core/renderers/geras/drawer.d.ts +2 -4
  154. package/core/renderers/geras/highlight_constants.d.ts +6 -17
  155. package/core/renderers/geras/highlighter.d.ts +0 -13
  156. package/core/renderers/geras/info.d.ts +2 -5
  157. package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
  158. package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
  159. package/core/renderers/geras/path_object.d.ts +0 -8
  160. package/core/renderers/geras/renderer.d.ts +5 -7
  161. package/core/renderers/measurables/base.d.ts +0 -3
  162. package/core/renderers/measurables/bottom_row.d.ts +0 -9
  163. package/core/renderers/measurables/connection.d.ts +0 -3
  164. package/core/renderers/measurables/external_value_input.d.ts +0 -3
  165. package/core/renderers/measurables/field.d.ts +0 -3
  166. package/core/renderers/measurables/hat.d.ts +0 -3
  167. package/core/renderers/measurables/icon.d.ts +2 -5
  168. package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
  169. package/core/renderers/measurables/inline_input.d.ts +1 -4
  170. package/core/renderers/measurables/input_connection.d.ts +1 -4
  171. package/core/renderers/measurables/input_row.d.ts +0 -7
  172. package/core/renderers/measurables/jagged_edge.d.ts +2 -5
  173. package/core/renderers/measurables/next_connection.d.ts +0 -3
  174. package/core/renderers/measurables/output_connection.d.ts +0 -3
  175. package/core/renderers/measurables/previous_connection.d.ts +0 -3
  176. package/core/renderers/measurables/round_corner.d.ts +0 -3
  177. package/core/renderers/measurables/row.d.ts +0 -39
  178. package/core/renderers/measurables/spacer_row.d.ts +0 -3
  179. package/core/renderers/measurables/square_corner.d.ts +0 -3
  180. package/core/renderers/measurables/statement_input.d.ts +0 -3
  181. package/core/renderers/measurables/top_row.d.ts +0 -6
  182. package/core/renderers/measurables/types.d.ts +0 -31
  183. package/core/renderers/minimalist/constants.d.ts +2 -4
  184. package/core/renderers/minimalist/drawer.d.ts +0 -3
  185. package/core/renderers/minimalist/info.d.ts +0 -4
  186. package/core/renderers/minimalist/renderer.d.ts +0 -3
  187. package/core/renderers/thrasos/info.d.ts +0 -4
  188. package/core/renderers/thrasos/renderer.d.ts +3 -3
  189. package/core/renderers/zelos/constants.d.ts +3 -17
  190. package/core/renderers/zelos/drawer.d.ts +0 -3
  191. package/core/renderers/zelos/info.d.ts +0 -4
  192. package/core/renderers/zelos/marker_svg.d.ts +0 -2
  193. package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
  194. package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
  195. package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
  196. package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
  197. package/core/renderers/zelos/path_object.d.ts +0 -9
  198. package/core/renderers/zelos/renderer.d.ts +3 -5
  199. package/core/scrollbar.d.ts +0 -2
  200. package/core/scrollbar_pair.d.ts +0 -2
  201. package/core/serialization/blocks.d.ts +3 -9
  202. package/core/serialization/exceptions.d.ts +0 -8
  203. package/core/serialization/priorities.d.ts +0 -4
  204. package/core/serialization/procedures.d.ts +0 -7
  205. package/core/serialization/registry.d.ts +0 -2
  206. package/core/serialization/variables.d.ts +0 -4
  207. package/core/serialization/workspaces.d.ts +0 -2
  208. package/core/shortcut_items.d.ts +0 -17
  209. package/core/shortcut_registry.d.ts +0 -2
  210. package/core/sprites.d.ts +0 -2
  211. package/core/theme/classic.d.ts +0 -2
  212. package/core/theme/zelos.d.ts +0 -2
  213. package/core/theme.d.ts +0 -2
  214. package/core/theme_manager.d.ts +3 -6
  215. package/core/toolbox/category.d.ts +5 -7
  216. package/core/toolbox/collapsible_category.d.ts +0 -4
  217. package/core/toolbox/separator.d.ts +0 -2
  218. package/core/toolbox/toolbox.d.ts +2 -5
  219. package/core/toolbox/toolbox_item.d.ts +0 -2
  220. package/core/tooltip.d.ts +0 -29
  221. package/core/touch.d.ts +0 -13
  222. package/core/trashcan.d.ts +0 -2
  223. package/core/utils/aria.d.ts +0 -6
  224. package/core/utils/array.d.ts +0 -1
  225. package/core/utils/colour.d.ts +0 -12
  226. package/core/utils/coordinate.d.ts +0 -2
  227. package/core/utils/deprecation.d.ts +0 -1
  228. package/core/utils/dom.d.ts +0 -25
  229. package/core/utils/idgenerator.d.ts +0 -2
  230. package/core/utils/keycodes.d.ts +0 -2
  231. package/core/utils/math.d.ts +0 -3
  232. package/core/utils/metrics.d.ts +0 -1
  233. package/core/utils/object.d.ts +0 -4
  234. package/core/utils/parsing.d.ts +0 -4
  235. package/core/utils/rect.d.ts +0 -2
  236. package/core/utils/size.d.ts +0 -2
  237. package/core/utils/string.d.ts +0 -6
  238. package/core/utils/style.d.ts +0 -8
  239. package/core/utils/svg.d.ts +0 -2
  240. package/core/utils/svg_math.d.ts +0 -6
  241. package/core/utils/svg_paths.d.ts +0 -8
  242. package/core/utils/toolbox.d.ts +2 -35
  243. package/core/utils/useragent.d.ts +0 -8
  244. package/core/utils/xml.d.ts +9 -8
  245. package/core/utils.d.ts +0 -12
  246. package/core/variable_map.d.ts +1 -3
  247. package/core/variable_model.d.ts +0 -1
  248. package/core/variables.d.ts +13 -17
  249. package/core/variables_dynamic.d.ts +0 -4
  250. package/core/warning.d.ts +0 -2
  251. package/core/widgetdiv.d.ts +0 -10
  252. package/core/workspace.d.ts +3 -3
  253. package/core/workspace_audio.d.ts +0 -2
  254. package/core/workspace_comment.d.ts +1 -3
  255. package/core/workspace_comment_svg.d.ts +1 -3
  256. package/core/workspace_dragger.d.ts +0 -2
  257. package/core/workspace_svg.d.ts +4 -7
  258. package/core/xml.d.ts +1 -13
  259. package/core/zoom_controls.d.ts +4 -15
  260. package/dart_compressed.js +199 -199
  261. package/dart_compressed.js.map +1 -1
  262. package/javascript_compressed.js +168 -168
  263. package/javascript_compressed.js.map +1 -1
  264. package/lua_compressed.js +211 -211
  265. package/lua_compressed.js.map +1 -1
  266. package/msg/bn.js +2 -2
  267. package/msg/bs.js +7 -7
  268. package/msg/de.js +1 -1
  269. package/msg/fi.js +1 -1
  270. package/msg/fr.js +3 -3
  271. package/msg/ia.js +5 -5
  272. package/msg/kn.js +5 -5
  273. package/msg/ko.js +1 -1
  274. package/msg/lb.js +22 -22
  275. package/msg/sd.js +9 -9
  276. package/msg/skr-arab.js +2 -2
  277. package/msg/sl.js +18 -18
  278. package/msg/sw.js +1 -1
  279. package/msg/zh-hans.js +6 -6
  280. package/msg/zh-hant.js +2 -2
  281. package/package.json +9 -9
  282. package/php_compressed.js +185 -185
  283. package/php_compressed.js.map +1 -1
  284. package/python_compressed.js +138 -138
  285. package/python_compressed.js.map +1 -1
  286. package/core/events/events_procedure_base.d.ts +0 -26
  287. package/core/events/events_procedure_change_return.d.ts +0 -40
  288. package/core/events/events_procedure_create.d.ts +0 -34
  289. package/core/events/events_procedure_delete.d.ts +0 -32
  290. package/core/events/events_procedure_enable.d.ts +0 -34
  291. package/core/events/events_procedure_parameter_base.d.ts +0 -26
  292. package/core/events/events_procedure_parameter_create.d.ts +0 -42
  293. package/core/events/events_procedure_parameter_delete.d.ts +0 -41
  294. package/core/events/events_procedure_parameter_rename.d.ts +0 -36
  295. package/core/events/events_procedure_rename.d.ts +0 -35
  296. package/core/procedures/observable_parameter_model.d.ts +0 -62
  297. package/core/procedures/observable_procedure_model.d.ts +0 -75
  298. package/core/procedures/update_procedures.d.ts +0 -13
  299. package/core/utils/sentinel.d.ts +0 -13
package/core/blocks.d.ts CHANGED
@@ -10,8 +10,6 @@
10
10
  export type BlockDefinition = any;
11
11
  /**
12
12
  * A mapping of block type names to block prototype objects.
13
- *
14
- * @alias Blockly.blocks.Blocks
15
13
  */
16
14
  export declare const Blocks: {
17
15
  [key: string]: BlockDefinition;
@@ -6,8 +6,6 @@
6
6
  /**
7
7
  * Blockly opaque event data used to unbind events when using
8
8
  * `bind` and `conditionalBind`.
9
- *
10
- * @alias Blockly.browserEvents.Data
11
9
  */
12
10
  export type Data = [EventTarget, string, (e: Event) => void][];
13
11
  /**
@@ -25,7 +23,6 @@ export type Data = [EventTarget, string, (e: Event) => void][];
25
23
  * simultaneous touches. False by default.
26
24
  * @param opt_noPreventDefault No-op, deprecated and will be removed in v10.
27
25
  * @returns Opaque data that can be passed to unbindEvent_.
28
- * @alias Blockly.browserEvents.conditionalBind
29
26
  */
30
27
  export declare function conditionalBind(node: EventTarget, name: string, thisObject: Object | null, func: Function, opt_noCaptureIdentifier?: boolean, opt_noPreventDefault?: boolean): Data;
31
28
  /**
@@ -39,7 +36,6 @@ export declare function conditionalBind(node: EventTarget, name: string, thisObj
39
36
  * @param thisObject The value of 'this' in the function.
40
37
  * @param func Function to call when event is triggered.
41
38
  * @returns Opaque data that can be passed to unbindEvent_.
42
- * @alias Blockly.browserEvents.bind
43
39
  */
44
40
  export declare function bind(node: EventTarget, name: string, thisObject: Object | null, func: Function): Data;
45
41
  /**
@@ -48,7 +44,6 @@ export declare function bind(node: EventTarget, name: string, thisObject: Object
48
44
  * @param bindData Opaque data from bindEvent_.
49
45
  * This list is emptied during the course of calling this function.
50
46
  * @returns The function call.
51
- * @alias Blockly.browserEvents.unbind
52
47
  */
53
48
  export declare function unbind(bindData: Data): (e: Event) => void;
54
49
  /**
@@ -56,7 +51,6 @@ export declare function unbind(bindData: Data): (e: Event) => void;
56
51
  *
57
52
  * @param e An event.
58
53
  * @returns True if text input.
59
- * @alias Blockly.browserEvents.isTargetInput
60
54
  */
61
55
  export declare function isTargetInput(e: Event): boolean;
62
56
  /**
@@ -64,7 +58,6 @@ export declare function isTargetInput(e: Event): boolean;
64
58
  *
65
59
  * @param e Mouse event.
66
60
  * @returns True if right-click.
67
- * @alias Blockly.browserEvents.isRightButton
68
61
  */
69
62
  export declare function isRightButton(e: MouseEvent): boolean;
70
63
  /**
@@ -75,7 +68,6 @@ export declare function isRightButton(e: MouseEvent): boolean;
75
68
  * @param svg SVG element.
76
69
  * @param matrix Inverted screen CTM to use.
77
70
  * @returns Object with .x and .y properties.
78
- * @alias Blockly.browserEvents.mouseToSvg
79
71
  */
80
72
  export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SVGMatrix | null): SVGPoint;
81
73
  /**
@@ -83,7 +75,6 @@ export declare function mouseToSvg(e: MouseEvent, svg: SVGSVGElement, matrix: SV
83
75
  *
84
76
  * @param e Mouse event.
85
77
  * @returns Scroll delta object with .x and .y properties.
86
- * @alias Blockly.browserEvents.getScrollDeltaPixels
87
78
  */
88
79
  export declare function getScrollDeltaPixels(e: WheelEvent): {
89
80
  x: number;
package/core/bubble.d.ts CHANGED
@@ -11,8 +11,6 @@ import { Size } from './utils/size.js';
11
11
  import type { WorkspaceSvg } from './workspace_svg.js';
12
12
  /**
13
13
  * Class for UI bubble.
14
- *
15
- * @alias Blockly.Bubble
16
14
  */
17
15
  export declare class Bubble implements IBubble {
18
16
  /** Width of the border around the bubble. */
@@ -10,8 +10,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
10
10
  * Class for a bubble dragger. It moves things on the bubble canvas around the
11
11
  * workspace when they are being dragged by a mouse or touch. These can be
12
12
  * block comments, mutators, warnings, or workspace comments.
13
- *
14
- * @alias Blockly.BubbleDragger
15
13
  */
16
14
  export declare class BubbleDragger {
17
15
  private bubble;
@@ -15,7 +15,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
15
15
  * in workspace coordinates.
16
16
  * @param object The object to bump.
17
17
  * @returns True if block was bumped.
18
- * @alias Blockly.bumpObjects.bumpIntoBounds
19
18
  */
20
19
  declare function bumpObjectIntoBounds(workspace: WorkspaceSvg, scrollMetrics: ContainerRegion, object: IBoundedElement): boolean;
21
20
  export declare const bumpIntoBounds: typeof bumpObjectIntoBounds;
@@ -24,14 +23,12 @@ export declare const bumpIntoBounds: typeof bumpObjectIntoBounds;
24
23
  *
25
24
  * @param workspace The workspace to handle.
26
25
  * @returns The event handler.
27
- * @alias Blockly.bumpObjects.bumpIntoBoundsHandler
28
26
  */
29
27
  export declare function bumpIntoBoundsHandler(workspace: WorkspaceSvg): (p1: Abstract) => void;
30
28
  /**
31
29
  * Bumps the top objects in the given workspace into bounds.
32
30
  *
33
31
  * @param workspace The workspace.
34
- * @alias Blockly.bumpObjects.bumpTopObjectsIntoBounds
35
32
  */
36
33
  export declare function bumpTopObjectsIntoBounds(workspace: WorkspaceSvg): void;
37
34
  export {};
@@ -8,7 +8,6 @@ import type { ICopyable } from './interfaces/i_copyable.js';
8
8
  * Copy a block or workspace comment onto the local clipboard.
9
9
  *
10
10
  * @param toCopy Block or Workspace Comment to be copied.
11
- * @alias Blockly.clipboard.copy
12
11
  * @internal
13
12
  */
14
13
  export declare function copy(toCopy: ICopyable): void;
@@ -20,7 +19,6 @@ declare function copyInternal(toCopy: ICopyable): void;
20
19
  * Paste a block or workspace comment on to the main workspace.
21
20
  *
22
21
  * @returns The pasted thing if the paste was successful, null otherwise.
23
- * @alias Blockly.clipboard.paste
24
22
  * @internal
25
23
  */
26
24
  export declare function paste(): ICopyable | null;
@@ -30,7 +28,6 @@ export declare function paste(): ICopyable | null;
30
28
  * @param toDuplicate Block or Workspace Comment to be duplicated.
31
29
  * @returns The block or workspace comment that was duplicated, or null if the
32
30
  * duplication failed.
33
- * @alias Blockly.clipboard.duplicate
34
31
  * @internal
35
32
  */
36
33
  export declare function duplicate(toDuplicate: ICopyable): ICopyable | null;
package/core/comment.d.ts CHANGED
@@ -10,8 +10,6 @@ import { Icon } from './icon.js';
10
10
  import type { Size } from './utils/size.js';
11
11
  /**
12
12
  * Class for a comment.
13
- *
14
- * @alias Blockly.Comment
15
13
  */
16
14
  export declare class Comment extends Icon {
17
15
  private readonly model;
@@ -20,14 +18,12 @@ export declare class Comment extends Icon {
20
18
  * Used to tell if an event should be fired at the end of an edit.
21
19
  */
22
20
  private cachedText;
23
- /** Mouse up event data. */
24
- private onMouseUpWrapper;
25
- /** Wheel event data. */
26
- private onWheelWrapper;
27
- /** Change event data. */
28
- private onChangeWrapper;
29
- /** Input event data. */
30
- private onInputWrapper;
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;
31
27
  /**
32
28
  * The SVG element that contains the text edit area, or null if not created.
33
29
  */
package/core/common.d.ts CHANGED
@@ -40,20 +40,16 @@ export declare function unregisterWorkpace(workspace: Workspace): void;
40
40
  * page.
41
41
  *
42
42
  * @returns The main workspace.
43
- * @alias Blockly.common.getMainWorkspace
44
43
  */
45
44
  export declare function getMainWorkspace(): Workspace;
46
45
  /**
47
46
  * Sets last used main workspace.
48
47
  *
49
48
  * @param workspace The most recently used top level workspace.
50
- * @alias Blockly.common.setMainWorkspace
51
49
  */
52
50
  export declare function setMainWorkspace(workspace: Workspace): void;
53
51
  /**
54
52
  * Returns the currently selected copyable object.
55
- *
56
- * @alias Blockly.common.getSelected
57
53
  */
58
54
  export declare function getSelected(): ICopyable | null;
59
55
  /**
@@ -62,7 +58,6 @@ export declare function getSelected(): ICopyable | null;
62
58
  * programmatically select a block, use `BlockSvg#select`.
63
59
  *
64
60
  * @param newSelection The newly selected block.
65
- * @alias Blockly.common.setSelected
66
61
  * @internal
67
62
  */
68
63
  export declare function setSelected(newSelection: ICopyable | null): void;
@@ -71,7 +66,6 @@ export declare function setSelected(newSelection: ICopyable | null): void;
71
66
  * Tooltip.
72
67
  *
73
68
  * @returns The parent container.
74
- * @alias Blockly.common.getParentContainer
75
69
  */
76
70
  export declare function getParentContainer(): Element | null;
77
71
  /**
@@ -81,7 +75,6 @@ export declare function getParentContainer(): Element | null;
81
75
  * This method is a NOP if called after the first `Blockly.inject`.
82
76
  *
83
77
  * @param newParent The container element.
84
- * @alias Blockly.common.setParentContainer
85
78
  */
86
79
  export declare function setParentContainer(newParent: Element): void;
87
80
  /**
@@ -92,7 +85,6 @@ export declare function setParentContainer(newParent: Element): void;
92
85
  * Record the height/width of the SVG image.
93
86
  *
94
87
  * @param workspace Any workspace in the SVG.
95
- * @alias Blockly.common.svgResize
96
88
  */
97
89
  export declare function svgResize(workspace: WorkspaceSvg): void;
98
90
  /**
@@ -108,7 +100,6 @@ export declare const draggingConnections: Connection[];
108
100
  * statements (blocks that are not inside a value or statement input
109
101
  * of the block).
110
102
  * @returns Map of types to type counts for descendants of the bock.
111
- * @alias Blockly.common.getBlockTypeCounts
112
103
  */
113
104
  export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: boolean): {
114
105
  [key: string]: number;
@@ -118,7 +109,6 @@ export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: bo
118
109
  * by the Blockly Developer Tools.
119
110
  *
120
111
  * @param jsonArray An array of JSON block definitions.
121
- * @alias Blockly.common.defineBlocksWithJsonArray
122
112
  */
123
113
  export declare function defineBlocksWithJsonArray(jsonArray: any[]): void;
124
114
  /**
@@ -132,7 +122,6 @@ declare function defineBlocksWithJsonArrayInternal(jsonArray: any[]): void;
132
122
  * @param jsonArray An array of JSON block definitions.
133
123
  * @returns A map of the block
134
124
  * definitions created.
135
- * @alias Blockly.common.defineBlocksWithJsonArray
136
125
  */
137
126
  export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
138
127
  [key: string]: BlockDefinition;
@@ -143,7 +132,6 @@ export declare function createBlockDefinitionsFromJsonArray(jsonArray: any[]): {
143
132
  *
144
133
  * @param blocks A map of block
145
134
  * type names to block definitions.
146
- * @alias Blockly.common.defineBlocks
147
135
  */
148
136
  export declare function defineBlocks(blocks: {
149
137
  [key: string]: BlockDefinition;
@@ -25,8 +25,6 @@ declare class Capability<_T> {
25
25
  }
26
26
  /**
27
27
  * Manager for all items registered with the workspace.
28
- *
29
- * @alias Blockly.ComponentManager
30
28
  */
31
29
  export declare class ComponentManager {
32
30
  static Capability: typeof Capability;
@@ -10,8 +10,6 @@ import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
10
10
  import * as blocks from './serialization/blocks.js';
11
11
  /**
12
12
  * Class for a connection between blocks.
13
- *
14
- * @alias Blockly.Connection
15
13
  */
16
14
  export declare class Connection implements IASTNodeLocationWithBlock {
17
15
  type: number;
@@ -111,15 +109,30 @@ export declare class Connection implements IASTNodeLocationWithBlock {
111
109
  * @returns Whether the the blocks are now connected or not.
112
110
  */
113
111
  connect(otherConnection: Connection): boolean;
114
- /** Disconnect this connection. */
112
+ /**
113
+ * Disconnect this connection.
114
+ */
115
115
  disconnect(): void;
116
116
  /**
117
117
  * Disconnect two blocks that are connected by this connection.
118
118
  *
119
- * @param parentBlock The superior block.
120
- * @param childBlock The inferior block.
119
+ * @param setParent Whether to set the parent of the disconnected block or
120
+ * not, defaults to true.
121
+ * If you do not set the parent, ensure that a subsequent action does,
122
+ * otherwise the view and model will be out of sync.
123
+ */
124
+ protected disconnectInternal(setParent?: boolean): void;
125
+ /**
126
+ * Returns the parent connection (superior) and child connection (inferior)
127
+ * given this connection and the connection it is connected to.
128
+ *
129
+ * @returns The parent connection and child connection, given this connection
130
+ * and the connection it is connected to.
121
131
  */
122
- protected disconnectInternal_(parentBlock: Block, childBlock: Block): void;
132
+ protected getParentAndChildConnections(): {
133
+ parentConnection?: Connection;
134
+ childConnection?: Connection;
135
+ };
123
136
  /**
124
137
  * Respawn the shadow block if there was one connected to the this connection.
125
138
  */
@@ -8,8 +8,6 @@ import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
8
8
  import type { RenderedConnection } from './rendered_connection.js';
9
9
  /**
10
10
  * Class for connection type checking logic.
11
- *
12
- * @alias Blockly.ConnectionChecker
13
11
  */
14
12
  export declare class ConnectionChecker implements IConnectionChecker {
15
13
  /**
@@ -68,7 +66,7 @@ export declare class ConnectionChecker implements IConnectionChecker {
68
66
  /**
69
67
  * Check whether this connection can be made by dragging.
70
68
  *
71
- * @param a Connection to compare.
69
+ * @param a Connection to compare (on the block that's being dragged).
72
70
  * @param b Connection to compare against.
73
71
  * @param distance The maximum allowable distance between connections.
74
72
  * @returns True if the connection is allowed during a drag.
@@ -10,8 +10,6 @@ import type { Coordinate } from './utils/coordinate.js';
10
10
  * Database of connections.
11
11
  * Connections are stored in order of their vertical component. This way
12
12
  * connections in an area may be looked up quickly using a binary search.
13
- *
14
- * @alias Blockly.ConnectionDB
15
13
  */
16
14
  export declare class ConnectionDB {
17
15
  private readonly connectionChecker;
@@ -5,8 +5,6 @@
5
5
  */
6
6
  /**
7
7
  * Enum for the type of a connection or input.
8
- *
9
- * @alias Blockly.ConnectionType
10
8
  */
11
9
  export declare enum ConnectionType {
12
10
  INPUT_VALUE = 1,
@@ -5,14 +5,10 @@
5
5
  */
6
6
  /**
7
7
  * The language-neutral ID given to the collapsed input.
8
- *
9
- * @alias Blockly.constants.COLLAPSED_INPUT_NAME
10
8
  */
11
9
  export declare const COLLAPSED_INPUT_NAME = "_TEMP_COLLAPSED_INPUT";
12
10
  /**
13
11
  * The language-neutral ID given to the collapsed field.
14
- *
15
- * @alias Blockly.constants.COLLAPSED_FIELD_NAME
16
12
  */
17
13
  export declare const COLLAPSED_FIELD_NAME = "_TEMP_COLLAPSED_FIELD";
18
14
  //# sourceMappingURL=constants.d.ts.map
@@ -11,14 +11,12 @@ import type { WorkspaceSvg } from './workspace_svg.js';
11
11
  * Gets the block the context menu is currently attached to.
12
12
  *
13
13
  * @returns The block the context menu is attached to.
14
- * @alias Blockly.ContextMenu.getCurrentBlock
15
14
  */
16
15
  export declare function getCurrentBlock(): Block | null;
17
16
  /**
18
17
  * Sets the block the context menu is currently attached to.
19
18
  *
20
19
  * @param block The block the context menu is attached to.
21
- * @alias Blockly.ContextMenu.setCurrentBlock
22
20
  */
23
21
  export declare function setCurrentBlock(block: Block | null): void;
24
22
  /**
@@ -27,19 +25,14 @@ export declare function setCurrentBlock(block: Block | null): void;
27
25
  * @param e Mouse event.
28
26
  * @param options Array of menu options.
29
27
  * @param rtl True if RTL, false if LTR.
30
- * @alias Blockly.ContextMenu.show
31
28
  */
32
29
  export declare function show(e: Event, options: (ContextMenuOption | LegacyContextMenuOption)[], rtl: boolean): void;
33
30
  /**
34
31
  * Hide the context menu.
35
- *
36
- * @alias Blockly.ContextMenu.hide
37
32
  */
38
33
  export declare function hide(): void;
39
34
  /**
40
35
  * Dispose of the menu.
41
- *
42
- * @alias Blockly.ContextMenu.dispose
43
36
  */
44
37
  export declare function dispose(): void;
45
38
  /**
@@ -49,7 +42,6 @@ export declare function dispose(): void;
49
42
  * @param block Original block.
50
43
  * @param xml XML representation of new block.
51
44
  * @returns Function that creates a block.
52
- * @alias Blockly.ContextMenu.callbackFactory
53
45
  */
54
46
  export declare function callbackFactory(block: Block, xml: Element): Function;
55
47
  /**
@@ -59,7 +51,6 @@ export declare function callbackFactory(block: Block, xml: Element): Function;
59
51
  * right-click originated.
60
52
  * @returns A menu option,
61
53
  * containing text, enabled, and a callback.
62
- * @alias Blockly.ContextMenu.commentDeleteOption
63
54
  * @internal
64
55
  */
65
56
  export declare function commentDeleteOption(comment: WorkspaceCommentSvg): LegacyContextMenuOption;
@@ -70,7 +61,6 @@ export declare function commentDeleteOption(comment: WorkspaceCommentSvg): Legac
70
61
  * right-click originated.
71
62
  * @returns A menu option,
72
63
  * containing text, enabled, and a callback.
73
- * @alias Blockly.ContextMenu.commentDuplicateOption
74
64
  * @internal
75
65
  */
76
66
  export declare function commentDuplicateOption(comment: WorkspaceCommentSvg): LegacyContextMenuOption;
@@ -83,7 +73,6 @@ export declare function commentDuplicateOption(comment: WorkspaceCommentSvg): Le
83
73
  * @returns A menu option, containing text, enabled, and a callback.
84
74
  * @suppress {strictModuleDepCheck,checkTypes} Suppress checks while workspace
85
75
  * comments are not bundled in.
86
- * @alias Blockly.ContextMenu.workspaceCommentOption
87
76
  * @internal
88
77
  */
89
78
  export declare function workspaceCommentOption(ws: WorkspaceSvg, e: Event): ContextMenuOption;
@@ -5,87 +5,60 @@
5
5
  */
6
6
  /**
7
7
  * Option to undo previous action.
8
- *
9
- * @alias Blockly.ContextMenuItems.registerUndo
10
8
  */
11
9
  export declare function registerUndo(): void;
12
10
  /**
13
11
  * Option to redo previous action.
14
- *
15
- * @alias Blockly.ContextMenuItems.registerRedo
16
12
  */
17
13
  export declare function registerRedo(): void;
18
14
  /**
19
15
  * Option to clean up blocks.
20
- *
21
- * @alias Blockly.ContextMenuItems.registerCleanup
22
16
  */
23
17
  export declare function registerCleanup(): void;
24
18
  /**
25
19
  * Option to collapse all blocks.
26
- *
27
- * @alias Blockly.ContextMenuItems.registerCollapse
28
20
  */
29
21
  export declare function registerCollapse(): void;
30
22
  /**
31
23
  * Option to expand all blocks.
32
- *
33
- * @alias Blockly.ContextMenuItems.registerExpand
34
24
  */
35
25
  export declare function registerExpand(): void;
36
26
  /**
37
27
  * Option to delete all blocks.
38
- *
39
- * @alias Blockly.ContextMenuItems.registerDeleteAll
40
28
  */
41
29
  export declare function registerDeleteAll(): void;
42
30
  /**
43
31
  * Option to duplicate a block.
44
- *
45
- * @alias Blockly.ContextMenuItems.registerDuplicate
46
32
  */
47
33
  export declare function registerDuplicate(): void;
48
34
  /**
49
35
  * Option to add or remove block-level comment.
50
- *
51
- * @alias Blockly.ContextMenuItems.registerComment
52
36
  */
53
37
  export declare function registerComment(): void;
54
38
  /**
55
39
  * Option to inline variables.
56
- *
57
- * @alias Blockly.ContextMenuItems.registerInline
58
40
  */
59
41
  export declare function registerInline(): void;
60
42
  /**
61
43
  * Option to collapse or expand a block.
62
- *
63
- * @alias Blockly.ContextMenuItems.registerCollapseExpandBlock
64
44
  */
65
45
  export declare function registerCollapseExpandBlock(): void;
66
46
  /**
67
47
  * Option to disable or enable a block.
68
- *
69
- * @alias Blockly.ContextMenuItems.registerDisable
70
48
  */
71
49
  export declare function registerDisable(): void;
72
50
  /**
73
51
  * Option to delete a block.
74
- *
75
- * @alias Blockly.ContextMenuItems.registerDelete
76
52
  */
77
53
  export declare function registerDelete(): void;
78
54
  /**
79
55
  * Option to open help for a block.
80
- *
81
- * @alias Blockly.ContextMenuItems.registerHelp
82
56
  */
83
57
  export declare function registerHelp(): void;
84
58
  /**
85
59
  * Registers all default context menu items. This should be called once per
86
60
  * instance of ContextMenuRegistry.
87
61
  *
88
- * @alias Blockly.ContextMenuItems.registerDefaultOptions
89
62
  * @internal
90
63
  */
91
64
  export declare function registerDefaultOptions(): void;
@@ -9,8 +9,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
9
9
  * Class for the registry of context menu items. This is intended to be a
10
10
  * singleton. You should not create a new instance, and only access this class
11
11
  * from ContextMenuRegistry.registry.
12
- *
13
- * @alias Blockly.ContextMenuRegistry
14
12
  */
15
13
  export declare class ContextMenuRegistry {
16
14
  static registry: ContextMenuRegistry;
package/core/css.d.ts CHANGED
@@ -8,7 +8,6 @@
8
8
  * components such as fields and the toolbox to store separate CSS.
9
9
  *
10
10
  * @param cssContent Multiline CSS string or an array of single lines of CSS.
11
- * @alias Blockly.Css.register
12
11
  */
13
12
  export declare function register(cssContent: string): void;
14
13
  /**
@@ -21,7 +20,6 @@ export declare function register(cssContent: string): void;
21
20
  * @param hasCss If false, don't inject CSS (providing CSS becomes the
22
21
  * document's responsibility).
23
22
  * @param pathToMedia Path from page to the Blockly media directory.
24
- * @alias Blockly.Css.inject
25
23
  */
26
24
  export declare function inject(hasCss: boolean, pathToMedia: string): void;
27
25
  //# sourceMappingURL=css.d.ts.map
@@ -9,8 +9,6 @@ import type { IDraggable } from './interfaces/i_draggable.js';
9
9
  /**
10
10
  * Abstract class for a component that can delete a block or bubble that is
11
11
  * dropped on top of it.
12
- *
13
- * @alias Blockly.DeleteArea
14
12
  */
15
13
  export declare class DeleteArea extends DragTarget implements IDeleteArea {
16
14
  /**
package/core/dialog.d.ts CHANGED
@@ -9,7 +9,6 @@
9
9
  *
10
10
  * @param message The message to display to the user.
11
11
  * @param opt_callback The callback when the alert is dismissed.
12
- * @alias Blockly.dialog.alert
13
12
  */
14
13
  export declare function alert(message: string, opt_callback?: () => void): void;
15
14
  /**
@@ -17,7 +16,6 @@ export declare function alert(message: string, opt_callback?: () => void): void;
17
16
  *
18
17
  * @param alertFunction The function to be run.
19
18
  * @see Blockly.dialog.alert
20
- * @alias Blockly.dialog.setAlert
21
19
  */
22
20
  export declare function setAlert(alertFunction: (p1: string, p2?: () => void) => void): void;
23
21
  /**
@@ -26,7 +24,6 @@ export declare function setAlert(alertFunction: (p1: string, p2?: () => void) =>
26
24
  *
27
25
  * @param message The message to display to the user.
28
26
  * @param callback The callback for handling user response.
29
- * @alias Blockly.dialog.confirm
30
27
  */
31
28
  export declare function confirm(message: string, callback: (p1: boolean) => void): void;
32
29
  /**
@@ -38,7 +35,6 @@ declare function confirmInternal(message: string, callback: (p1: boolean) => voi
38
35
  *
39
36
  * @param confirmFunction The function to be run.
40
37
  * @see Blockly.dialog.confirm
41
- * @alias Blockly.dialog.setConfirm
42
38
  */
43
39
  export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolean) => void) => void): void;
44
40
  /**
@@ -50,7 +46,6 @@ export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolea
50
46
  * @param message The message to display to the user.
51
47
  * @param defaultValue The value to initialize the prompt with.
52
48
  * @param callback The callback for handling user response.
53
- * @alias Blockly.dialog.prompt
54
49
  */
55
50
  export declare function prompt(message: string, defaultValue: string, callback: (p1: string | null) => void): void;
56
51
  /**
@@ -58,7 +53,6 @@ export declare function prompt(message: string, defaultValue: string, callback:
58
53
  *
59
54
  * @param promptFunction The function to be run.
60
55
  * @see Blockly.dialog.prompt
61
- * @alias Blockly.dialog.setPrompt
62
56
  */
63
57
  export declare function setPrompt(promptFunction: (p1: string, p2: string, p3: (p1: string | null) => void) => void): void;
64
58
  export declare const TEST_ONLY: {
@@ -9,8 +9,6 @@ import type { Rect } from './utils/rect.js';
9
9
  /**
10
10
  * Abstract class for a component with custom behaviour when a block or bubble
11
11
  * is dragged over or dropped on top of it.
12
- *
13
- * @alias Blockly.DragTarget
14
12
  */
15
13
  export declare class DragTarget implements IDragTarget {
16
14
  /**
@@ -3,7 +3,7 @@
3
3
  * Copyright 2016 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
6
+ import { Abstract, AbstractEventJson } from './events_abstract.js';
7
7
  import { BlockBase, BlockBaseJson } from './events_block_base.js';
8
8
  import { BlockChange, BlockChangeJson } from './events_block_change.js';
9
9
  import { BlockCreate, BlockCreateJson } from './events_block_create.js';
@@ -18,16 +18,6 @@ import { CommentCreate, CommentCreateJson } from './events_comment_create.js';
18
18
  import { CommentDelete } from './events_comment_delete.js';
19
19
  import { CommentMove, CommentMoveJson } from './events_comment_move.js';
20
20
  import { MarkerMove, MarkerMoveJson } from './events_marker_move.js';
21
- import { ProcedureBase } from './events_procedure_base.js';
22
- import { ProcedureChangeReturn } from './events_procedure_change_return.js';
23
- import { ProcedureCreate } from './events_procedure_create.js';
24
- import { ProcedureDelete } from './events_procedure_delete.js';
25
- import { ProcedureEnable } from './events_procedure_enable.js';
26
- import { ProcedureRename } from './events_procedure_rename.js';
27
- import { ProcedureParameterBase } from './events_procedure_parameter_base.js';
28
- import { ProcedureParameterCreate } from './events_procedure_parameter_create.js';
29
- import { ProcedureParameterDelete } from './events_procedure_parameter_delete.js';
30
- import { ProcedureParameterRename } from './events_procedure_parameter_rename.js';
31
21
  import { Selected, SelectedJson } from './events_selected.js';
32
22
  import { ThemeChange, ThemeChangeJson } from './events_theme_change.js';
33
23
  import { ToolboxItemSelect, ToolboxItemSelectJson } from './events_toolbox_item_select.js';
@@ -41,7 +31,7 @@ import { VarRename, VarRenameJson } from './events_var_rename.js';
41
31
  import { ViewportChange, ViewportChangeJson } from './events_viewport.js';
42
32
  import * as eventUtils from './utils.js';
43
33
  import { FinishedLoading, FinishedLoadingJson } from './workspace_events.js';
44
- export declare const Abstract: typeof AbstractEvent;
34
+ export { Abstract };
45
35
  export { AbstractEventJson };
46
36
  export { BubbleOpen };
47
37
  export { BubbleOpenJson };
@@ -74,16 +64,6 @@ export { FinishedLoading };
74
64
  export { FinishedLoadingJson };
75
65
  export { MarkerMove };
76
66
  export { MarkerMoveJson };
77
- export { ProcedureBase };
78
- export { ProcedureChangeReturn };
79
- export { ProcedureCreate };
80
- export { ProcedureDelete };
81
- export { ProcedureEnable };
82
- export { ProcedureRename };
83
- export { ProcedureParameterBase };
84
- export { ProcedureParameterCreate };
85
- export { ProcedureParameterDelete };
86
- export { ProcedureParameterRename };
87
67
  export { Selected };
88
68
  export { SelectedJson };
89
69
  export { ThemeChange };