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
@@ -9,8 +9,6 @@ import type { CssConfig as SeparatorCssConfig } from '../toolbox/separator.js';
9
9
  /**
10
10
  * The information needed to create a block in the toolbox.
11
11
  * Note that disabled has a different type for backwards compatibility.
12
- *
13
- * @alias Blockly.utils.toolbox.BlockInfo
14
12
  */
15
13
  export interface BlockInfo {
16
14
  kind: string;
@@ -39,8 +37,6 @@ export interface BlockInfo {
39
37
  }
40
38
  /**
41
39
  * The information needed to create a separator in the toolbox.
42
- *
43
- * @alias Blockly.utils.toolbox.SeparatorInfo
44
40
  */
45
41
  export interface SeparatorInfo {
46
42
  kind: string;
@@ -50,8 +46,6 @@ export interface SeparatorInfo {
50
46
  }
51
47
  /**
52
48
  * The information needed to create a button in the toolbox.
53
- *
54
- * @alias Blockly.utils.toolbox.ButtonInfo
55
49
  */
56
50
  export interface ButtonInfo {
57
51
  kind: string;
@@ -60,8 +54,6 @@ export interface ButtonInfo {
60
54
  }
61
55
  /**
62
56
  * The information needed to create a label in the toolbox.
63
- *
64
- * @alias Blockly.utils.toolbox.LabelInfo
65
57
  */
66
58
  export interface LabelInfo {
67
59
  kind: string;
@@ -70,14 +62,10 @@ export interface LabelInfo {
70
62
  }
71
63
  /**
72
64
  * The information needed to create either a button or a label in the flyout.
73
- *
74
- * @alias Blockly.utils.toolbox.ButtonOrLabelInfo
75
65
  */
76
66
  export type ButtonOrLabelInfo = ButtonInfo | LabelInfo;
77
67
  /**
78
68
  * The information needed to create a category in the toolbox.
79
- *
80
- * @alias Blockly.utils.toolbox.StaticCategoryInfo
81
69
  */
82
70
  export interface StaticCategoryInfo {
83
71
  kind: string;
@@ -88,11 +76,10 @@ export interface StaticCategoryInfo {
88
76
  colour: string | undefined;
89
77
  cssconfig: CategoryCssConfig | undefined;
90
78
  hidden: string | undefined;
79
+ expanded?: string | boolean;
91
80
  }
92
81
  /**
93
82
  * The information needed to create a custom category.
94
- *
95
- * @alias Blockly.utils.toolbox.DynamicCategoryInfo
96
83
  */
97
84
  export interface DynamicCategoryInfo {
98
85
  kind: string;
@@ -102,29 +89,22 @@ export interface DynamicCategoryInfo {
102
89
  colour: string | undefined;
103
90
  cssconfig: CategoryCssConfig | undefined;
104
91
  hidden: string | undefined;
92
+ expanded?: string | boolean;
105
93
  }
106
94
  /**
107
95
  * The information needed to create either a dynamic or static category.
108
- *
109
- * @alias Blockly.utils.toolbox.CategoryInfo
110
96
  */
111
97
  export type CategoryInfo = StaticCategoryInfo | DynamicCategoryInfo;
112
98
  /**
113
99
  * Any information that can be used to create an item in the toolbox.
114
- *
115
- * @alias Blockly.utils.toolbox.ToolboxItemInfo
116
100
  */
117
101
  export type ToolboxItemInfo = FlyoutItemInfo | StaticCategoryInfo;
118
102
  /**
119
103
  * All the different types that can be displayed in a flyout.
120
- *
121
- * @alias Blockly.utils.toolbox.FlyoutItemInfo
122
104
  */
123
105
  export type FlyoutItemInfo = BlockInfo | SeparatorInfo | ButtonInfo | LabelInfo | DynamicCategoryInfo;
124
106
  /**
125
107
  * The JSON definition of a toolbox.
126
- *
127
- * @alias Blockly.utils.toolbox.ToolboxInfo
128
108
  */
129
109
  export interface ToolboxInfo {
130
110
  kind?: string;
@@ -132,26 +112,18 @@ export interface ToolboxInfo {
132
112
  }
133
113
  /**
134
114
  * An array holding flyout items.
135
- *
136
- * @alias Blockly.utils.toolbox.FlyoutItemInfoArray
137
115
  */
138
116
  export type FlyoutItemInfoArray = FlyoutItemInfo[];
139
117
  /**
140
118
  * All of the different types that can create a toolbox.
141
- *
142
- * @alias Blockly.utils.toolbox.ToolboxDefinition
143
119
  */
144
120
  export type ToolboxDefinition = Node | ToolboxInfo | string;
145
121
  /**
146
122
  * All of the different types that can be used to show items in a flyout.
147
- *
148
- * @alias Blockly.utils.toolbox.FlyoutDefinition
149
123
  */
150
124
  export type FlyoutDefinition = FlyoutItemInfoArray | NodeList | ToolboxInfo | Node[];
151
125
  /**
152
126
  * Position of the toolbox and/or flyout relative to the workspace.
153
- *
154
- * @alias Blockly.utils.toolbox.Position
155
127
  */
156
128
  export declare enum Position {
157
129
  TOP = 0,
@@ -164,7 +136,6 @@ export declare enum Position {
164
136
  *
165
137
  * @param toolboxDef The definition of the toolbox in one of its many forms.
166
138
  * @returns Object holding information for creating a toolbox.
167
- * @alias Blockly.utils.toolbox.convertToolboxDefToJson
168
139
  * @internal
169
140
  */
170
141
  export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition | null): ToolboxInfo | null;
@@ -173,7 +144,6 @@ export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition |
173
144
  *
174
145
  * @param flyoutDef The definition of the flyout in one of its many forms.
175
146
  * @returns A list of flyout items.
176
- * @alias Blockly.utils.toolbox.convertFlyoutDefToJsonArray
177
147
  * @internal
178
148
  */
179
149
  export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition | null): FlyoutItemInfoArray;
@@ -182,7 +152,6 @@ export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition
182
152
  *
183
153
  * @param toolboxJson Object holding information for creating a toolbox.
184
154
  * @returns True if the toolbox has categories.
185
- * @alias Blockly.utils.toolbox.hasCategories
186
155
  * @internal
187
156
  */
188
157
  export declare function hasCategories(toolboxJson: ToolboxInfo | null): boolean;
@@ -195,7 +164,6 @@ declare function hasCategoriesInternal(toolboxJson: ToolboxInfo | null): boolean
195
164
  *
196
165
  * @param categoryInfo Object holing information for creating a category.
197
166
  * @returns True if the category has subcategories.
198
- * @alias Blockly.utils.toolbox.isCategoryCollapsible
199
167
  * @internal
200
168
  */
201
169
  export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boolean;
@@ -204,7 +172,6 @@ export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boole
204
172
  *
205
173
  * @param toolboxDef DOM tree of blocks, or text representation of same.
206
174
  * @returns DOM tree of blocks, or null.
207
- * @alias Blockly.utils.toolbox.parseToolboxTree
208
175
  */
209
176
  export declare function parseToolboxTree(toolboxDef: Element | null | string): Element | null;
210
177
  export declare const TEST_ONLY: {
@@ -3,20 +3,12 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- /** @alias Blockly.utils.userAgent.raw */
7
6
  export declare const raw: string;
8
- /** @alias Blockly.utils.userAgent.JavaFx */
9
7
  export declare const JavaFx: boolean;
10
- /** @alias Blockly.utils.userAgent.GECKO */
11
8
  export declare const GECKO: boolean;
12
- /** @alias Blockly.utils.userAgent.ANDROID */
13
9
  export declare const ANDROID: boolean;
14
- /** @alias Blockly.utils.userAgent.IPAD */
15
10
  export declare const IPAD: boolean;
16
- /** @alias Blockly.utils.userAgent.IPHONE */
17
11
  export declare const IPHONE: boolean;
18
- /** @alias Blockly.utils.userAgent.MAC */
19
12
  export declare const MAC: boolean;
20
- /** @alias Blockly.utils.userAgent.MOBILE */
21
13
  export declare const MOBILE: boolean;
22
14
  //# sourceMappingURL=useragent.d.ts.map
@@ -44,8 +44,6 @@ export declare function injectDependencies(dependencies: {
44
44
  }): void;
45
45
  /**
46
46
  * Namespace for Blockly's XML.
47
- *
48
- * @alias Blockly.utils.xml.NAME_SPACE
49
47
  */
50
48
  export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
51
49
  /**
@@ -53,7 +51,6 @@ export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
53
51
  *
54
52
  * @returns The document object.
55
53
  * @deprecated No longer provided by Blockly.
56
- * @alias Blockly.utils.xml.getDocument
57
54
  */
58
55
  export declare function getDocument(): Document;
59
56
  /**
@@ -61,7 +58,6 @@ export declare function getDocument(): Document;
61
58
  *
62
59
  * @param xmlDocument The document object to use.
63
60
  * @deprecated No longer provided by Blockly.
64
- * @alias Blockly.utils.xml.setDocument
65
61
  */
66
62
  export declare function setDocument(xmlDocument: Document): void;
67
63
  /**
@@ -69,7 +65,6 @@ export declare function setDocument(xmlDocument: Document): void;
69
65
  *
70
66
  * @param tagName Name of DOM element.
71
67
  * @returns New DOM element.
72
- * @alias Blockly.utils.xml.createElement
73
68
  */
74
69
  export declare function createElement(tagName: string): Element;
75
70
  /**
@@ -77,16 +72,23 @@ export declare function createElement(tagName: string): Element;
77
72
  *
78
73
  * @param text Text content.
79
74
  * @returns New DOM text node.
80
- * @alias Blockly.utils.xml.createTextNode
81
75
  */
82
76
  export declare function createTextNode(text: string): Text;
77
+ /**
78
+ * Converts an XML string into a DOM structure.
79
+ *
80
+ * @param text An XML string.
81
+ * @returns A DOM object representing the singular child of the document
82
+ * element.
83
+ * @throws if the text doesn't parse.
84
+ */
85
+ export declare function textToDom(text: string): Element;
83
86
  /**
84
87
  * Converts an XML string into a DOM tree.
85
88
  *
86
89
  * @param text XML string.
87
90
  * @returns The DOM document.
88
91
  * @throws if XML doesn't parse.
89
- * @alias Blockly.utils.xml.textToDomDocument
90
92
  */
91
93
  export declare function textToDomDocument(text: string): Document;
92
94
  /**
@@ -95,7 +97,6 @@ export declare function textToDomDocument(text: string): Document;
95
97
  *
96
98
  * @param dom A tree of XML nodes.
97
99
  * @returns Text representation.
98
- * @alias Blockly.utils.xml.domToText
99
100
  */
100
101
  export declare function domToText(dom: Node): string;
101
102
  export {};
package/core/utils.d.ts CHANGED
@@ -37,7 +37,6 @@ export { aria, arrayUtils as array, browserEvents, colour, Coordinate, deprecati
37
37
  * @param element SVG element to find the coordinates of.
38
38
  * @returns Object with .x and .y properties.
39
39
  * @deprecated Use **Blockly.utils.svgMath.getRelativeXY** instead.
40
- * @alias Blockly.utils.getRelativeXY
41
40
  */
42
41
  export declare function getRelativeXY(element: Element): Coordinate;
43
42
  /**
@@ -48,7 +47,6 @@ export declare function getRelativeXY(element: Element): Coordinate;
48
47
  * of the div Blockly was injected into, the behaviour is undefined.
49
48
  * @returns Object with .x and .y properties.
50
49
  * @deprecated Use **Blockly.utils.svgMath.getInjectionDivXY** instead.
51
- * @alias Blockly.utils.getInjectionDivXY_
52
50
  */
53
51
  declare function getInjectionDivXY(element: Element): Coordinate;
54
52
  export declare const getInjectionDivXY_: typeof getInjectionDivXY;
@@ -63,7 +61,6 @@ export declare const getInjectionDivXY_: typeof getInjectionDivXY;
63
61
  * interpolation tokens.
64
62
  * @returns Array of strings and numbers.
65
63
  * @deprecated Use **Blockly.utils.parsing.tokenizeInterpolation** instead.
66
- * @alias Blockly.utils.tokenizeInterpolation
67
64
  */
68
65
  export declare function tokenizeInterpolation(message: string): Array<string | number>;
69
66
  /**
@@ -75,7 +72,6 @@ export declare function tokenizeInterpolation(message: string): Array<string | n
75
72
  * references.
76
73
  * @returns String with message references replaced.
77
74
  * @deprecated Use **Blockly.utils.parsing.replaceMessageReferences** instead.
78
- * @alias Blockly.utils.replaceMessageReferences
79
75
  */
80
76
  export declare function replaceMessageReferences(message: string | any): string;
81
77
  /**
@@ -86,7 +82,6 @@ export declare function replaceMessageReferences(message: string | any): string;
86
82
  * @returns True if all message references have matching values.
87
83
  * Otherwise, false.
88
84
  * @deprecated Use **Blockly.utils.parsing.checkMessageReferences** instead.
89
- * @alias Blockly.utils.checkMessageReferences
90
85
  */
91
86
  export declare function checkMessageReferences(message: string): boolean;
92
87
  /**
@@ -95,7 +90,6 @@ export declare function checkMessageReferences(message: string): boolean;
95
90
  *
96
91
  * @returns True if 3D transforms are supported.
97
92
  * @deprecated Use **Blockly.utils.svgMath.is3dSupported** instead.
98
- * @alias Blockly.utils.is3dSupported
99
93
  */
100
94
  export declare function is3dSupported(): boolean;
101
95
  /**
@@ -104,7 +98,6 @@ export declare function is3dSupported(): boolean;
104
98
  *
105
99
  * @returns An object containing window width, height, and scroll position in
106
100
  * window coordinates.
107
- * @alias Blockly.utils.getViewportBBox
108
101
  * @deprecated Use **Blockly.utils.svgMath.getViewportBBox** instead.
109
102
  * @internal
110
103
  */
@@ -115,7 +108,6 @@ export declare function getViewportBBox(): Rect;
115
108
  * @param arr Array from which to remove value.
116
109
  * @param value Value to remove.
117
110
  * @returns True if an element was removed.
118
- * @alias Blockly.utils.arrayRemove
119
111
  * @deprecated Use **Blockly.array.removeElem** instead.
120
112
  * @internal
121
113
  */
@@ -126,7 +118,6 @@ export declare function arrayRemove<T>(arr: Array<T>, value: T): boolean;
126
118
  *
127
119
  * @returns Object with values 'x' and 'y'.
128
120
  * @deprecated Use **Blockly.utils.svgMath.getDocumentScroll** instead.
129
- * @alias Blockly.utils.getDocumentScroll
130
121
  */
131
122
  export declare function getDocumentScroll(): Coordinate;
132
123
  /**
@@ -138,7 +129,6 @@ export declare function getDocumentScroll(): Coordinate;
138
129
  * that are not inside a value or statement input of the block).
139
130
  * @returns Map of types to type counts for descendants of the bock.
140
131
  * @deprecated Use **Blockly.common.getBlockTypeCounts** instead.
141
- * @alias Blockly.utils.getBlockTypeCounts
142
132
  */
143
133
  export declare function getBlockTypeCounts(block: Block, opt_stripFollowing?: boolean): {
144
134
  [key: string]: number;
@@ -163,7 +153,6 @@ export declare function screenToWsCoordinates(ws: WorkspaceSvg, screenCoordinate
163
153
  * the input was an HSV hue value.
164
154
  * @throws {Error} If the colour cannot be parsed.
165
155
  * @deprecated Use **Blockly.utils.parsing.parseBlockColour** instead.
166
- * @alias Blockly.utils.parseBlockColour
167
156
  */
168
157
  export declare function parseBlockColour(colour: number | string): {
169
158
  hue: number | null;
@@ -175,7 +164,6 @@ export declare function parseBlockColour(colour: number | string): {
175
164
  * @param fn Function to run.
176
165
  * @throws Error Will throw if no global document can be found (e.g., Node.js).
177
166
  * @deprecated No longer provided by Blockly.
178
- * @alias Blockly.utils.runAfterPageLoad
179
167
  */
180
168
  export declare function runAfterPageLoad(fn: () => void): void;
181
169
  //# sourceMappingURL=utils.d.ts.map
@@ -12,8 +12,6 @@ import type { Workspace } from './workspace.js';
12
12
  * Class for a variable map. This contains a dictionary data structure with
13
13
  * variable types as keys and lists of variables as values. The list of
14
14
  * variables are the type indicated by the key.
15
- *
16
- * @alias Blockly.VariableMap
17
15
  */
18
16
  export declare class VariableMap {
19
17
  workspace: Workspace;
@@ -25,7 +23,7 @@ export declare class VariableMap {
25
23
  private variableMap;
26
24
  /** @param workspace The workspace this map belongs to. */
27
25
  constructor(workspace: Workspace);
28
- /** Clear the variable map. */
26
+ /** Clear the variable map. Fires events for every deletion. */
29
27
  clear(): void;
30
28
  /**
31
29
  * Rename the given variable by updating its name in the variable map.
@@ -10,7 +10,6 @@ import type { Workspace } from './workspace.js';
10
10
  * Holds information for the variable including name, ID, and type.
11
11
  *
12
12
  * @see {Blockly.FieldVariable}
13
- * @alias Blockly.VariableModel
14
13
  */
15
14
  export declare class VariableModel {
16
15
  workspace: Workspace;
@@ -12,8 +12,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
12
12
  * variable blocks.
13
13
  * See also Blockly.Procedures.CATEGORY_NAME and
14
14
  * Blockly.VariablesDynamic.CATEGORY_NAME.
15
- *
16
- * @alias Blockly.Variables.CATEGORY_NAME
17
15
  */
18
16
  export declare const CATEGORY_NAME = "VARIABLE";
19
17
  /**
@@ -24,7 +22,6 @@ export declare const CATEGORY_NAME = "VARIABLE";
24
22
  *
25
23
  * @param ws The workspace to search for variables.
26
24
  * @returns Array of variable models.
27
- * @alias Blockly.Variables.allUsedVarModels
28
25
  */
29
26
  export declare function allUsedVarModels(ws: Workspace): VariableModel[];
30
27
  /**
@@ -37,7 +34,6 @@ export declare function allUsedVarModels(ws: Workspace): VariableModel[];
37
34
  *
38
35
  * @param workspace The workspace to search.
39
36
  * @returns A list of non-duplicated variable names.
40
- * @alias Blockly.Variables.allDeveloperVariables
41
37
  */
42
38
  export declare function allDeveloperVariables(workspace: Workspace): string[];
43
39
  /**
@@ -46,7 +42,6 @@ export declare function allDeveloperVariables(workspace: Workspace): string[];
46
42
  *
47
43
  * @param workspace The workspace containing variables.
48
44
  * @returns Array of XML elements.
49
- * @alias Blockly.Variables.flyoutCategory
50
45
  */
51
46
  export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
52
47
  /**
@@ -54,10 +49,8 @@ export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
54
49
  *
55
50
  * @param workspace The workspace containing variables.
56
51
  * @returns Array of XML block elements.
57
- * @alias Blockly.Variables.flyoutCategoryBlocks
58
52
  */
59
53
  export declare function flyoutCategoryBlocks(workspace: Workspace): Element[];
60
- /** @alias Blockly.Variables.VAR_LETTER_OPTIONS */
61
54
  export declare const VAR_LETTER_OPTIONS = "ijkmnopqrstuvwxyzabcdefgh";
62
55
  /**
63
56
  * Return a new variable name that is not yet being used. This will try to
@@ -67,7 +60,6 @@ export declare const VAR_LETTER_OPTIONS = "ijkmnopqrstuvwxyzabcdefgh";
67
60
  *
68
61
  * @param workspace The workspace to be unique in.
69
62
  * @returns New variable name.
70
- * @alias Blockly.Variables.generateUniqueName
71
63
  */
72
64
  export declare function generateUniqueName(workspace: Workspace): string;
73
65
  /**
@@ -82,7 +74,6 @@ declare function generateUniqueNameInternal(workspace: Workspace): string;
82
74
  * @param startChar The character to start the search at.
83
75
  * @param usedNames A list of all of the used names.
84
76
  * @returns A unique name that is not present in the usedNames array.
85
- * @alias Blockly.Variables.generateUniqueNameFromOptions
86
77
  */
87
78
  export declare function generateUniqueNameFromOptions(startChar: string, usedNames: string[]): string;
88
79
  /**
@@ -100,7 +91,6 @@ export declare function generateUniqueNameFromOptions(startChar: string, usedNam
100
91
  * an existing variable was chosen.
101
92
  * @param opt_type The type of the variable like 'int', 'string', or ''. This
102
93
  * will default to '', which is a specific type.
103
- * @alias Blockly.Variables.createVariableButtonHandler
104
94
  */
105
95
  export declare function createVariableButtonHandler(workspace: Workspace, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
106
96
  /**
@@ -113,7 +103,6 @@ export declare function createVariableButtonHandler(workspace: Workspace, opt_ca
113
103
  * @param opt_callback A callback. It will be passed an acceptable new variable
114
104
  * name, or null if change is to be aborted (cancel button), or undefined if
115
105
  * an existing variable was chosen.
116
- * @alias Blockly.Variables.renameVariable
117
106
  */
118
107
  export declare function renameVariable(workspace: Workspace, variable: VariableModel, opt_callback?: (p1?: string | null) => void): void;
119
108
  /**
@@ -123,7 +112,6 @@ export declare function renameVariable(workspace: Workspace, variable: VariableM
123
112
  * @param defaultText The default value to show in the prompt's field.
124
113
  * @param callback A callback. It will be passed the new variable name, or null
125
114
  * if the user picked something illegal.
126
- * @alias Blockly.Variables.promptName
127
115
  */
128
116
  export declare function promptName(promptText: string, defaultText: string, callback: (p1: string | null) => void): void;
129
117
  /**
@@ -132,15 +120,26 @@ export declare function promptName(promptText: string, defaultText: string, call
132
120
  * @param name The name to search for.
133
121
  * @param workspace The workspace to search for the variable.
134
122
  * @returns The variable with the given name, or null if none was found.
135
- * @alias Blockly.Variables.nameUsedWithAnyType
136
123
  */
137
124
  export declare function nameUsedWithAnyType(name: string, workspace: Workspace): VariableModel | null;
125
+ /**
126
+ * Returns the name of the procedure with a conflicting parameter name, or null
127
+ * if one does not exist.
128
+ *
129
+ * This checks the procedure map if it contains models, and the legacy procedure
130
+ * blocks otherwise.
131
+ *
132
+ * @param oldName The old name of the variable.
133
+ * @param newName The proposed name of the variable.
134
+ * @param workspace The workspace to search for conflicting parameters.
135
+ * @internal
136
+ */
137
+ export declare function nameUsedWithConflictingParam(oldName: string, newName: string, workspace: Workspace): string | null;
138
138
  /**
139
139
  * Generate DOM objects representing a variable field.
140
140
  *
141
141
  * @param variableModel The variable model to represent.
142
142
  * @returns The generated DOM.
143
- * @alias Blockly.Variables.generateVariableFieldDom
144
143
  */
145
144
  export declare function generateVariableFieldDom(variableModel: VariableModel): Element;
146
145
  /**
@@ -154,7 +153,6 @@ export declare function generateVariableFieldDom(variableModel: VariableModel):
154
153
  * @param opt_type The type to use to look up or create the variable.
155
154
  * @returns The variable corresponding to the given ID or name + type
156
155
  * combination.
157
- * @alias Blockly.Variables.getOrCreateVariablePackage
158
156
  */
159
157
  export declare function getOrCreateVariablePackage(workspace: Workspace, id: string | null, opt_name?: string, opt_type?: string): VariableModel;
160
158
  /**
@@ -171,7 +169,6 @@ export declare function getOrCreateVariablePackage(workspace: Workspace, id: str
171
169
  * Only used if lookup by ID fails.
172
170
  * @returns The variable corresponding to the given ID or name + type
173
171
  * combination, or null if not found.
174
- * @alias Blockly.Variables.getVariable
175
172
  */
176
173
  export declare function getVariable(workspace: Workspace, id: string | null, opt_name?: string, opt_type?: string): VariableModel | null;
177
174
  /**
@@ -185,7 +182,6 @@ export declare function getVariable(workspace: Workspace, id: string | null, opt
185
182
  * @returns The new array of variables that were freshly added to the workspace
186
183
  * after creating the new block, or [] if no new variables were added to the
187
184
  * workspace.
188
- * @alias Blockly.Variables.getAddedVariables
189
185
  * @internal
190
186
  */
191
187
  export declare function getAddedVariables(workspace: Workspace, originalVariables: VariableModel[]): VariableModel[];
@@ -12,8 +12,6 @@ import type { FlyoutButton } from './flyout_button.js';
12
12
  * variable blocks.
13
13
  * See also Blockly.Variables.CATEGORY_NAME and
14
14
  * Blockly.Procedures.CATEGORY_NAME.
15
- *
16
- * @alias Blockly.VariablesDynamic.CATEGORY_NAME
17
15
  */
18
16
  export declare const CATEGORY_NAME = "VARIABLE_DYNAMIC";
19
17
  /**
@@ -43,7 +41,6 @@ export declare const onCreateVariableButtonClick_Colour: typeof colourButtonClic
43
41
  *
44
42
  * @param workspace The workspace containing variables.
45
43
  * @returns Array of XML elements.
46
- * @alias Blockly.VariablesDynamic.flyoutCategory
47
44
  */
48
45
  export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
49
46
  /**
@@ -51,7 +48,6 @@ export declare function flyoutCategory(workspace: WorkspaceSvg): Element[];
51
48
  *
52
49
  * @param workspace The workspace containing variables.
53
50
  * @returns Array of XML block elements.
54
- * @alias Blockly.VariablesDynamic.flyoutCategoryBlocks
55
51
  */
56
52
  export declare function flyoutCategoryBlocks(workspace: Workspace): Element[];
57
53
  export {};
package/core/warning.d.ts CHANGED
@@ -8,8 +8,6 @@ import type { BlockSvg } from './block_svg.js';
8
8
  import { Icon } from './icon.js';
9
9
  /**
10
10
  * Class for a warning.
11
- *
12
- * @alias Blockly.Warning
13
11
  */
14
12
  export declare class Warning extends Icon {
15
13
  private text;
@@ -9,21 +9,17 @@ import type { Size } from './utils/size.js';
9
9
  * Returns the HTML container for editor widgets.
10
10
  *
11
11
  * @returns The editor widget container.
12
- * @alias Blockly.WidgetDiv.getDiv
13
12
  */
14
13
  export declare function getDiv(): HTMLDivElement | null;
15
14
  /**
16
15
  * Allows unit tests to reset the div. Do not use outside of tests.
17
16
  *
18
17
  * @param newDiv The new value for the DIV field.
19
- * @alias Blockly.WidgetDiv.testOnly_setDiv
20
18
  * @internal
21
19
  */
22
20
  export declare function testOnly_setDiv(newDiv: HTMLDivElement | null): void;
23
21
  /**
24
22
  * Create the widget div and inject it onto the page.
25
- *
26
- * @alias Blockly.WidgetDiv.createDom
27
23
  */
28
24
  export declare function createDom(): void;
29
25
  /**
@@ -33,20 +29,16 @@ export declare function createDom(): void;
33
29
  * @param rtl Right-to-left (true) or left-to-right (false).
34
30
  * @param newDispose Optional cleanup function to be run when the widget is
35
31
  * closed.
36
- * @alias Blockly.WidgetDiv.show
37
32
  */
38
33
  export declare function show(newOwner: unknown, rtl: boolean, newDispose: () => void): void;
39
34
  /**
40
35
  * Destroy the widget and hide the div.
41
- *
42
- * @alias Blockly.WidgetDiv.hide
43
36
  */
44
37
  export declare function hide(): void;
45
38
  /**
46
39
  * Is the container visible?
47
40
  *
48
41
  * @returns True if visible.
49
- * @alias Blockly.WidgetDiv.isVisible
50
42
  */
51
43
  export declare function isVisible(): boolean;
52
44
  /**
@@ -54,7 +46,6 @@ export declare function isVisible(): boolean;
54
46
  * object.
55
47
  *
56
48
  * @param oldOwner The object that was using this container.
57
- * @alias Blockly.WidgetDiv.hideIfOwner
58
49
  */
59
50
  export declare function hideIfOwner(oldOwner: unknown): void;
60
51
  /**
@@ -71,7 +62,6 @@ export declare function hideIfOwner(oldOwner: unknown): void;
71
62
  * window coordinates.
72
63
  * @param rtl Whether the workspace is in RTL mode. This determines horizontal
73
64
  * alignment.
74
- * @alias Blockly.WidgetDiv.positionWithAnchor
75
65
  * @internal
76
66
  */
77
67
  export declare function positionWithAnchor(viewportBBox: Rect, anchorBBox: Rect, widgetSize: Size, rtl: boolean): void;
@@ -18,8 +18,6 @@ import { IProcedureMap } from './interfaces/i_procedure_map.js';
18
18
  /**
19
19
  * Class for a workspace. This is a data structure that contains blocks.
20
20
  * There is no UI, and can be created headlessly.
21
- *
22
- * @alias Blockly.Workspace
23
21
  */
24
22
  export declare class Workspace implements IASTNodeLocation {
25
23
  /**
@@ -303,7 +301,9 @@ export declare class Workspace implements IASTNodeLocation {
303
301
  * to be created).
304
302
  * @returns True if there is capacity for the given map, false otherwise.
305
303
  */
306
- isCapacityAvailable(typeCountsMap: any): boolean;
304
+ isCapacityAvailable(typeCountsMap: {
305
+ [key: string]: number;
306
+ }): boolean;
307
307
  /**
308
308
  * Checks if the workspace has any limits on the maximum number of blocks,
309
309
  * or the maximum number of blocks of specific types.
@@ -6,8 +6,6 @@
6
6
  import type { WorkspaceSvg } from './workspace_svg.js';
7
7
  /**
8
8
  * Class for loading, storing, and playing audio for a workspace.
9
- *
10
- * @alias Blockly.WorkspaceAudio
11
9
  */
12
10
  export declare class WorkspaceAudio {
13
11
  private parentWorkspace;
@@ -7,8 +7,6 @@ import { Coordinate } from './utils/coordinate.js';
7
7
  import type { Workspace } from './workspace.js';
8
8
  /**
9
9
  * Class for a workspace comment.
10
- *
11
- * @alias Blockly.WorkspaceComment
12
10
  */
13
11
  export declare class WorkspaceComment {
14
12
  workspace: Workspace;
@@ -75,7 +73,7 @@ export declare class WorkspaceComment {
75
73
  * This is not valid if the comment is currently being dragged.
76
74
  * @internal
77
75
  */
78
- getXY(): Coordinate;
76
+ getRelativeToSurfaceXY(): Coordinate;
79
77
  /**
80
78
  * Move a comment by a relative offset.
81
79
  *