blockly 12.5.1 → 13.0.0-beta.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 (363) hide show
  1. package/blockly.min.js +1541 -700
  2. package/blockly.mjs +13 -5
  3. package/blockly_compressed.js +1449 -674
  4. package/blockly_compressed.js.map +1 -1
  5. package/blocks_compressed.js +16 -16
  6. package/blocks_compressed.js.map +1 -1
  7. package/core/block.d.ts +1 -1
  8. package/core/block_aria_composer.d.ts +119 -0
  9. package/core/block_svg.d.ts +59 -16
  10. package/core/blockly.d.ts +21 -16
  11. package/core/bubbles/bubble.d.ts +17 -2
  12. package/core/bubbles/mini_workspace_bubble.d.ts +9 -1
  13. package/core/bubbles/text_bubble.d.ts +4 -1
  14. package/core/bubbles/textinput_bubble.d.ts +5 -0
  15. package/core/comments/comment_editor.d.ts +2 -2
  16. package/core/comments/rendered_workspace_comment.d.ts +6 -1
  17. package/core/common.d.ts +1 -1
  18. package/core/css.d.ts +2 -1
  19. package/core/dragging/block_drag_strategy.d.ts +126 -14
  20. package/core/dragging/bubble_drag_strategy.d.ts +5 -4
  21. package/core/dragging/comment_drag_strategy.d.ts +4 -4
  22. package/core/dragging/dragger.d.ts +13 -14
  23. package/core/events/events_block_create.d.ts +0 -3
  24. package/core/events/events_block_delete.d.ts +0 -3
  25. package/core/events/events_comment_create.d.ts +0 -3
  26. package/core/events/events_comment_delete.d.ts +0 -3
  27. package/core/field.d.ts +69 -2
  28. package/core/field_input.d.ts +23 -0
  29. package/core/flyout_base.d.ts +1 -125
  30. package/core/flyout_button.d.ts +9 -0
  31. package/core/flyout_horizontal.d.ts +0 -11
  32. package/core/flyout_vertical.d.ts +0 -11
  33. package/core/focus_manager.d.ts +47 -2
  34. package/core/gesture.d.ts +0 -12
  35. package/core/hints.d.ts +44 -0
  36. package/core/icons/icon.d.ts +6 -0
  37. package/core/inputs/input.d.ts +22 -1
  38. package/core/interfaces/i_bounded_element.d.ts +7 -0
  39. package/core/interfaces/i_bubble.d.ts +3 -2
  40. package/core/interfaces/i_collapsible_toolbox_item.d.ts +5 -1
  41. package/core/interfaces/i_draggable.d.ts +22 -17
  42. package/core/interfaces/i_dragger.d.ts +19 -10
  43. package/core/interfaces/i_flyout.d.ts +1 -31
  44. package/core/interfaces/i_focusable_node.d.ts +8 -0
  45. package/core/interfaces/i_focusable_tree.d.ts +8 -0
  46. package/core/interfaces/i_json_block_definition.d.ts +102 -0
  47. package/core/interfaces/i_navigation_policy.d.ts +12 -0
  48. package/core/interfaces/i_selectable.d.ts +2 -2
  49. package/core/interfaces/i_selectable_toolbox_item.d.ts +3 -3
  50. package/core/interfaces/i_toolbox.d.ts +4 -0
  51. package/core/interfaces/i_toolbox_item.d.ts +6 -0
  52. package/core/keyboard_nav/keyboard_mover.d.ts +149 -0
  53. package/core/keyboard_nav/move_indicator.d.ts +35 -0
  54. package/core/keyboard_nav/{block_navigation_policy.d.ts → navigation_policies/block_navigation_policy.d.ts} +17 -25
  55. package/core/keyboard_nav/navigation_policies/bubble_navigation_policy.d.ts +63 -0
  56. package/core/keyboard_nav/{comment_bar_button_navigation_policy.d.ts → navigation_policies/comment_bar_button_navigation_policy.d.ts} +10 -3
  57. package/core/keyboard_nav/{comment_editor_navigation_policy.d.ts → navigation_policies/comment_editor_navigation_policy.d.ts} +10 -3
  58. package/core/keyboard_nav/{connection_navigation_policy.d.ts → navigation_policies/connection_navigation_policy.d.ts} +11 -16
  59. package/core/keyboard_nav/{field_navigation_policy.d.ts → navigation_policies/field_navigation_policy.d.ts} +10 -3
  60. package/core/keyboard_nav/{flyout_button_navigation_policy.d.ts → navigation_policies/flyout_button_navigation_policy.d.ts} +10 -3
  61. package/core/keyboard_nav/{flyout_separator_navigation_policy.d.ts → navigation_policies/flyout_separator_navigation_policy.d.ts} +9 -3
  62. package/core/keyboard_nav/{icon_navigation_policy.d.ts → navigation_policies/icon_navigation_policy.d.ts} +12 -5
  63. package/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.d.ts +64 -0
  64. package/core/keyboard_nav/{workspace_comment_navigation_policy.d.ts → navigation_policies/workspace_comment_navigation_policy.d.ts} +14 -9
  65. package/core/keyboard_nav/{workspace_navigation_policy.d.ts → navigation_policies/workspace_navigation_policy.d.ts} +10 -3
  66. package/core/keyboard_nav/navigators/flyout_navigator.d.ts +63 -0
  67. package/core/keyboard_nav/navigators/navigator.d.ts +225 -0
  68. package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
  69. package/core/registry.d.ts +0 -2
  70. package/core/renderers/common/constants.d.ts +4 -7
  71. package/core/renderers/common/i_path_object.d.ts +8 -0
  72. package/core/renderers/common/path_object.d.ts +5 -14
  73. package/core/renderers/common/renderer.d.ts +3 -3
  74. package/core/renderers/zelos/constants.d.ts +1 -14
  75. package/core/renderers/zelos/measurables/bottom_row.d.ts +1 -1
  76. package/core/renderers/zelos/measurables/top_row.d.ts +1 -1
  77. package/core/renderers/zelos/path_object.d.ts +0 -3
  78. package/core/renderers/zelos/renderer.d.ts +8 -0
  79. package/core/shortcut_items.d.ts +73 -1
  80. package/core/shortcut_registry.d.ts +6 -0
  81. package/core/theme.d.ts +0 -2
  82. package/core/toast.d.ts +2 -11
  83. package/core/toolbox/category.d.ts +5 -0
  84. package/core/toolbox/separator.d.ts +4 -0
  85. package/core/toolbox/toolbox.d.ts +17 -33
  86. package/core/toolbox/toolbox_item.d.ts +4 -0
  87. package/core/utils/aria.d.ts +245 -28
  88. package/core/utils/dom.d.ts +1 -1
  89. package/core/utils/shortcut_formatting.d.ts +22 -0
  90. package/core/utils/useragent.d.ts +1 -0
  91. package/core/variables.d.ts +1 -1
  92. package/core/workspace_audio.d.ts +23 -0
  93. package/core/workspace_svg.d.ts +8 -50
  94. package/dart_compressed.js +9 -9
  95. package/dart_compressed.js.map +1 -1
  96. package/index.mjs +13 -5
  97. package/javascript_compressed.js +11 -10
  98. package/javascript_compressed.js.map +1 -1
  99. package/lua_compressed.js +7 -7
  100. package/lua_compressed.js.map +1 -1
  101. package/msg/ab.js +65 -0
  102. package/msg/ab.mjs +65 -0
  103. package/msg/ace.js +65 -0
  104. package/msg/ace.mjs +65 -0
  105. package/msg/af.js +65 -0
  106. package/msg/af.mjs +65 -0
  107. package/msg/am.js +65 -0
  108. package/msg/am.mjs +65 -0
  109. package/msg/ar.js +65 -0
  110. package/msg/ar.mjs +65 -0
  111. package/msg/ast.js +65 -0
  112. package/msg/ast.mjs +65 -0
  113. package/msg/az.js +65 -0
  114. package/msg/az.mjs +65 -0
  115. package/msg/ba.js +65 -0
  116. package/msg/ba.mjs +65 -0
  117. package/msg/bcc.js +65 -0
  118. package/msg/bcc.mjs +65 -0
  119. package/msg/be-tarask.js +65 -0
  120. package/msg/be-tarask.mjs +65 -0
  121. package/msg/be.js +65 -0
  122. package/msg/be.mjs +65 -0
  123. package/msg/bg.js +65 -0
  124. package/msg/bg.mjs +65 -0
  125. package/msg/bn.js +65 -0
  126. package/msg/bn.mjs +65 -0
  127. package/msg/br.js +65 -0
  128. package/msg/br.mjs +65 -0
  129. package/msg/bs.js +65 -0
  130. package/msg/bs.mjs +65 -0
  131. package/msg/ca.js +65 -0
  132. package/msg/ca.mjs +65 -0
  133. package/msg/cdo.js +65 -0
  134. package/msg/cdo.mjs +65 -0
  135. package/msg/ce.js +65 -0
  136. package/msg/ce.mjs +65 -0
  137. package/msg/cs.js +65 -0
  138. package/msg/cs.mjs +65 -0
  139. package/msg/da.js +65 -0
  140. package/msg/da.mjs +65 -0
  141. package/msg/de.js +65 -0
  142. package/msg/de.mjs +65 -0
  143. package/msg/diq.js +65 -0
  144. package/msg/diq.mjs +65 -0
  145. package/msg/dtp.js +65 -0
  146. package/msg/dtp.mjs +65 -0
  147. package/msg/dty.js +65 -0
  148. package/msg/dty.mjs +65 -0
  149. package/msg/ee.js +65 -0
  150. package/msg/ee.mjs +65 -0
  151. package/msg/el.js +65 -0
  152. package/msg/el.mjs +65 -0
  153. package/msg/en-gb.js +65 -0
  154. package/msg/en-gb.mjs +65 -0
  155. package/msg/en.js +65 -0
  156. package/msg/en.mjs +65 -0
  157. package/msg/eo.js +65 -0
  158. package/msg/eo.mjs +65 -0
  159. package/msg/es.js +65 -0
  160. package/msg/es.mjs +65 -0
  161. package/msg/et.js +65 -0
  162. package/msg/et.mjs +65 -0
  163. package/msg/eu.js +65 -0
  164. package/msg/eu.mjs +65 -0
  165. package/msg/fa.js +65 -0
  166. package/msg/fa.mjs +65 -0
  167. package/msg/fi.js +65 -0
  168. package/msg/fi.mjs +65 -0
  169. package/msg/fo.js +65 -0
  170. package/msg/fo.mjs +65 -0
  171. package/msg/fr.js +65 -0
  172. package/msg/fr.mjs +65 -0
  173. package/msg/frr.js +65 -0
  174. package/msg/frr.mjs +65 -0
  175. package/msg/gl.js +65 -0
  176. package/msg/gl.mjs +65 -0
  177. package/msg/gn.js +65 -0
  178. package/msg/gn.mjs +65 -0
  179. package/msg/gor.js +65 -0
  180. package/msg/gor.mjs +65 -0
  181. package/msg/ha.js +65 -0
  182. package/msg/ha.mjs +65 -0
  183. package/msg/hak.js +65 -0
  184. package/msg/hak.mjs +65 -0
  185. package/msg/he.js +65 -0
  186. package/msg/he.mjs +65 -0
  187. package/msg/hi.js +65 -0
  188. package/msg/hi.mjs +65 -0
  189. package/msg/hr.js +65 -0
  190. package/msg/hr.mjs +65 -0
  191. package/msg/hrx.js +65 -0
  192. package/msg/hrx.mjs +65 -0
  193. package/msg/hsb.js +65 -0
  194. package/msg/hsb.mjs +65 -0
  195. package/msg/hu.js +65 -0
  196. package/msg/hu.mjs +65 -0
  197. package/msg/hy.js +65 -0
  198. package/msg/hy.mjs +65 -0
  199. package/msg/ia.js +65 -0
  200. package/msg/ia.mjs +65 -0
  201. package/msg/id.js +65 -0
  202. package/msg/id.mjs +65 -0
  203. package/msg/ig.js +65 -0
  204. package/msg/ig.mjs +65 -0
  205. package/msg/inh.js +65 -0
  206. package/msg/inh.mjs +65 -0
  207. package/msg/is.js +65 -0
  208. package/msg/is.mjs +65 -0
  209. package/msg/it.js +65 -0
  210. package/msg/it.mjs +65 -0
  211. package/msg/ja.js +65 -0
  212. package/msg/ja.mjs +65 -0
  213. package/msg/ka.js +65 -0
  214. package/msg/ka.mjs +65 -0
  215. package/msg/kab.js +65 -0
  216. package/msg/kab.mjs +65 -0
  217. package/msg/kbd-cyrl.js +65 -0
  218. package/msg/kbd-cyrl.mjs +65 -0
  219. package/msg/km.js +65 -0
  220. package/msg/km.mjs +65 -0
  221. package/msg/kn.js +65 -0
  222. package/msg/kn.mjs +65 -0
  223. package/msg/ko.js +65 -0
  224. package/msg/ko.mjs +65 -0
  225. package/msg/ksh.js +65 -0
  226. package/msg/ksh.mjs +65 -0
  227. package/msg/ku-latn.js +65 -0
  228. package/msg/ku-latn.mjs +65 -0
  229. package/msg/ky.js +65 -0
  230. package/msg/ky.mjs +65 -0
  231. package/msg/la.js +65 -0
  232. package/msg/la.mjs +65 -0
  233. package/msg/lb.js +65 -0
  234. package/msg/lb.mjs +65 -0
  235. package/msg/lki.js +65 -0
  236. package/msg/lki.mjs +65 -0
  237. package/msg/lo.js +65 -0
  238. package/msg/lo.mjs +65 -0
  239. package/msg/lrc.js +65 -0
  240. package/msg/lrc.mjs +65 -0
  241. package/msg/lt.js +65 -0
  242. package/msg/lt.mjs +65 -0
  243. package/msg/lv.js +65 -0
  244. package/msg/lv.mjs +65 -0
  245. package/msg/mg.js +65 -0
  246. package/msg/mg.mjs +65 -0
  247. package/msg/mk.js +65 -0
  248. package/msg/mk.mjs +65 -0
  249. package/msg/ml.js +65 -0
  250. package/msg/ml.mjs +65 -0
  251. package/msg/mnw.js +65 -0
  252. package/msg/mnw.mjs +65 -0
  253. package/msg/ms.js +65 -0
  254. package/msg/ms.mjs +65 -0
  255. package/msg/my.js +65 -0
  256. package/msg/my.mjs +65 -0
  257. package/msg/mzn.js +65 -0
  258. package/msg/mzn.mjs +65 -0
  259. package/msg/nb.js +65 -0
  260. package/msg/nb.mjs +65 -0
  261. package/msg/ne.js +65 -0
  262. package/msg/ne.mjs +65 -0
  263. package/msg/nl.js +65 -0
  264. package/msg/nl.mjs +65 -0
  265. package/msg/oc.js +65 -0
  266. package/msg/oc.mjs +65 -0
  267. package/msg/olo.js +65 -0
  268. package/msg/olo.mjs +65 -0
  269. package/msg/pa.js +65 -0
  270. package/msg/pa.mjs +65 -0
  271. package/msg/pl.js +65 -0
  272. package/msg/pl.mjs +65 -0
  273. package/msg/pms.js +65 -0
  274. package/msg/pms.mjs +65 -0
  275. package/msg/ps.js +65 -0
  276. package/msg/ps.mjs +65 -0
  277. package/msg/pt-br.js +65 -0
  278. package/msg/pt-br.mjs +65 -0
  279. package/msg/pt.js +65 -0
  280. package/msg/pt.mjs +65 -0
  281. package/msg/ro.js +65 -0
  282. package/msg/ro.mjs +65 -0
  283. package/msg/ru.js +65 -0
  284. package/msg/ru.mjs +65 -0
  285. package/msg/sc.js +65 -0
  286. package/msg/sc.mjs +65 -0
  287. package/msg/sco.js +65 -0
  288. package/msg/sco.mjs +65 -0
  289. package/msg/sd.js +65 -0
  290. package/msg/sd.mjs +65 -0
  291. package/msg/shn.js +65 -0
  292. package/msg/shn.mjs +65 -0
  293. package/msg/si.js +65 -0
  294. package/msg/si.mjs +65 -0
  295. package/msg/sk.js +65 -0
  296. package/msg/sk.mjs +65 -0
  297. package/msg/skr-arab.js +65 -0
  298. package/msg/skr-arab.mjs +65 -0
  299. package/msg/sl.js +65 -0
  300. package/msg/sl.mjs +65 -0
  301. package/msg/smn.js +65 -0
  302. package/msg/smn.mjs +65 -0
  303. package/msg/sq.js +65 -0
  304. package/msg/sq.mjs +65 -0
  305. package/msg/sr-latn.js +65 -0
  306. package/msg/sr-latn.mjs +65 -0
  307. package/msg/sr.js +65 -0
  308. package/msg/sr.mjs +65 -0
  309. package/msg/sv.js +65 -0
  310. package/msg/sv.mjs +65 -0
  311. package/msg/sw.js +65 -0
  312. package/msg/sw.mjs +65 -0
  313. package/msg/ta.js +65 -0
  314. package/msg/ta.mjs +65 -0
  315. package/msg/tcy.js +65 -0
  316. package/msg/tcy.mjs +65 -0
  317. package/msg/tdd.js +65 -0
  318. package/msg/tdd.mjs +65 -0
  319. package/msg/te.js +65 -0
  320. package/msg/te.mjs +65 -0
  321. package/msg/th.js +65 -0
  322. package/msg/th.mjs +65 -0
  323. package/msg/ti.js +65 -0
  324. package/msg/ti.mjs +65 -0
  325. package/msg/tl.js +65 -0
  326. package/msg/tl.mjs +65 -0
  327. package/msg/tlh.js +65 -0
  328. package/msg/tlh.mjs +65 -0
  329. package/msg/tr.js +65 -0
  330. package/msg/tr.mjs +65 -0
  331. package/msg/ug-arab.js +65 -0
  332. package/msg/ug-arab.mjs +65 -0
  333. package/msg/uk.js +65 -0
  334. package/msg/uk.mjs +65 -0
  335. package/msg/ur.js +65 -0
  336. package/msg/ur.mjs +65 -0
  337. package/msg/uz.js +65 -0
  338. package/msg/uz.mjs +65 -0
  339. package/msg/vi.js +65 -0
  340. package/msg/vi.mjs +65 -0
  341. package/msg/xmf.js +65 -0
  342. package/msg/xmf.mjs +65 -0
  343. package/msg/yo.js +65 -0
  344. package/msg/yo.mjs +65 -0
  345. package/msg/zgh.js +65 -0
  346. package/msg/zgh.mjs +65 -0
  347. package/msg/zh-hans.js +65 -0
  348. package/msg/zh-hans.mjs +65 -0
  349. package/msg/zh-hant.js +65 -0
  350. package/msg/zh-hant.mjs +65 -0
  351. package/package.json +11 -11
  352. package/php_compressed.js +2 -2
  353. package/php_compressed.js.map +1 -1
  354. package/python_compressed.js +2 -2
  355. package/python_compressed.js.map +1 -1
  356. package/core/flyout_navigator.d.ts +0 -11
  357. package/core/keyboard_nav/block_comment_navigation_policy.d.ts +0 -56
  358. package/core/keyboard_nav/flyout_navigation_policy.d.ts +0 -65
  359. package/core/keyboard_nav/line_cursor.d.ts +0 -187
  360. package/core/keyboard_nav/marker.d.ts +0 -53
  361. package/core/marker_manager.d.ts +0 -72
  362. package/core/navigator.d.ts +0 -65
  363. package/media/sprites.png +0 -0
@@ -84,5 +84,13 @@ export interface IPathObject {
84
84
  * @param blockStyle The block style to use.
85
85
  */
86
86
  setStyle?(blockStyle: BlockStyle): void;
87
+ /**
88
+ * Add or remove styling indicating that a block will be bumped out and
89
+ * replaced by another block that is mid-move.
90
+ *
91
+ * @param replacing True if the block is at risk of being replaced, false
92
+ * otherwise.
93
+ */
94
+ updateReplacing?(replacing: boolean): void;
87
95
  }
88
96
  //# sourceMappingURL=i_path_object.d.ts.map
@@ -4,7 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import type { Connection } from '../../connection.js';
8
7
  import { RenderedConnection } from '../../rendered_connection.js';
9
8
  import type { BlockStyle } from '../../theme.js';
10
9
  import { Coordinate } from '../../utils/coordinate.js';
@@ -105,21 +104,13 @@ export declare class PathObject implements IPathObject {
105
104
  */
106
105
  updateMovable(enable: boolean): void;
107
106
  /**
108
- * Add or remove styling that shows that if the dragging block is dropped,
109
- * this block will be replaced. If a shadow block, it will disappear.
110
- * Otherwise it will bump.
107
+ * Add or remove styling indicating that a block will be bumped out and
108
+ * replaced by another block that is mid-move.
111
109
  *
112
- * @param enable True if styling should be added.
113
- */
114
- updateReplacementFade(enable: boolean): void;
115
- /**
116
- * Add or remove styling that shows that if the dragging block is dropped,
117
- * this block will be connected to the input.
118
- *
119
- * @param _conn The connection on the input to highlight.
120
- * @param _enable True if styling should be added.
110
+ * @param replacing True if the block is at risk of being replaced, false
111
+ * otherwise.
121
112
  */
122
- updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
113
+ updateReplacing(replacing: boolean): void;
123
114
  /** Adds the given path as a connection highlight for the given connection. */
124
115
  addConnectionHighlight(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean): SVGElement;
125
116
  /**
@@ -4,8 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import { Connection } from '../../connection.js';
8
7
  import type { IRegistrable } from '../../interfaces/i_registrable.js';
8
+ import type { RenderedConnection } from '../../rendered_connection.js';
9
9
  import type { BlockStyle, Theme } from '../../theme.js';
10
10
  import { ConstantProvider } from './constants.js';
11
11
  import { Drawer } from './drawer.js';
@@ -113,10 +113,10 @@ export declare class Renderer implements IRegistrable {
113
113
  /**
114
114
  * Determine whether or not to highlight a connection.
115
115
  *
116
- * @param _conn The connection to determine whether or not to highlight.
116
+ * @param connection The connection to determine whether or not to highlight.
117
117
  * @returns True if we should highlight the connection.
118
118
  */
119
- shouldHighlightConnection(_conn: Connection): boolean;
119
+ shouldHighlightConnection(connection: RenderedConnection): boolean;
120
120
  /**
121
121
  * Checks if an orphaned block can connect to the "end" of the topBlock's
122
122
  * block-clump. If the clump is a row the end is the last input. If the clump
@@ -65,10 +65,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
65
65
  SELECTED_GLOW_COLOUR: string;
66
66
  /** The size of the selected glow. */
67
67
  SELECTED_GLOW_SIZE: number;
68
- /** The replacement glow colour. */
69
- REPLACEMENT_GLOW_COLOUR: string;
70
- /** The size of the selected glow. */
71
- REPLACEMENT_GLOW_SIZE: number;
72
68
  /**
73
69
  * The ID of the selected glow filter, or the empty string if no filter is
74
70
  * set.
@@ -78,15 +74,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
78
74
  * The <filter> element to use for a selected glow, or null if not set.
79
75
  */
80
76
  private selectedGlowFilter;
81
- /**
82
- * The ID of the replacement glow filter, or the empty string if no filter
83
- * is set.
84
- */
85
- replacementGlowFilterId: string;
86
- /**
87
- * The <filter> element to use for a replacement glow, or null if not set.
88
- */
89
- private replacementGlowFilter;
90
77
  /**
91
78
  * The object containing information about the hexagon used for a boolean
92
79
  * reporter block. Null before init is called.
@@ -159,7 +146,7 @@ export declare class ConstantProvider extends BaseConstantProvider {
159
146
  };
160
147
  generateSecondaryColour_(colour: string): string;
161
148
  generateTertiaryColour_(colour: string): string;
162
- createDom(svg: SVGElement, tagName: string, selector: string, injectionDivIfIsParent?: HTMLElement): void;
149
+ createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
163
150
  getCSS_(selector: string): string[];
164
151
  }
165
152
  //# sourceMappingURL=constants.d.ts.map
@@ -21,6 +21,6 @@ export declare class BottomRow extends BaseBottomRow {
21
21
  /** Render a round corner unless the block has an output connection. */
22
22
  hasLeftSquareCorner(block: BlockSvg): boolean;
23
23
  /** Render a round corner unless the block has an output connection. */
24
- hasRightSquareCorner(block: BlockSvg): false;
24
+ hasRightSquareCorner(block: BlockSvg): boolean;
25
25
  }
26
26
  //# sourceMappingURL=bottom_row.d.ts.map
@@ -23,6 +23,6 @@ export declare class TopRow extends BaseTopRow {
23
23
  /** Render a round corner unless the block has an output connection. */
24
24
  hasLeftSquareCorner(block: BlockSvg): boolean;
25
25
  /** Render a round corner unless the block has an output connection. */
26
- hasRightSquareCorner(block: BlockSvg): false;
26
+ hasRightSquareCorner(block: BlockSvg): boolean;
27
27
  }
28
28
  //# sourceMappingURL=top_row.d.ts.map
@@ -4,7 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import type { Connection } from '../../connection.js';
8
7
  import type { BlockStyle } from '../../theme.js';
9
8
  import { PathObject as BasePathObject } from '../common/path_object.js';
10
9
  import type { ConstantProvider } from './constants.js';
@@ -40,8 +39,6 @@ export declare class PathObject extends BasePathObject {
40
39
  applyColour(block: BlockSvg): void;
41
40
  flipRTL(): void;
42
41
  updateSelected(enable: boolean): void;
43
- updateReplacementFade(enable: boolean): void;
44
- updateShapeForInputHighlight(conn: Connection, enable: boolean): void;
45
42
  /**
46
43
  * Method that's called when the drawer is about to draw the block.
47
44
  */
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
+ import type { RenderedConnection } from '../../rendered_connection.js';
7
8
  import type { BlockStyle } from '../../theme.js';
8
9
  import type { RenderInfo as BaseRenderInfo } from '../common/info.js';
9
10
  import { Renderer as BaseRenderer } from '../common/renderer.js';
@@ -60,5 +61,12 @@ export declare class Renderer extends BaseRenderer {
60
61
  * @returns The constant provider.
61
62
  */
62
63
  getConstants(): ConstantProvider;
64
+ /**
65
+ * Determine whether or not to highlight a connection.
66
+ *
67
+ * @param connection The connection to determine whether or not to highlight.
68
+ * @returns True if we should highlight the connection.
69
+ */
70
+ shouldHighlightConnection(connection: RenderedConnection): boolean;
63
71
  }
64
72
  //# sourceMappingURL=renderer.d.ts.map
@@ -14,7 +14,28 @@ export declare enum names {
14
14
  PASTE = "paste",
15
15
  UNDO = "undo",
16
16
  REDO = "redo",
17
- MENU = "menu"
17
+ MENU = "menu",
18
+ FOCUS_WORKSPACE = "focus_workspace",
19
+ FOCUS_TOOLBOX = "focus_toolbox",
20
+ START_MOVE = "start_move",
21
+ START_MOVE_STACK = "start_move_stack",
22
+ FINISH_MOVE = "finish_move",
23
+ ABORT_MOVE = "abort_move",
24
+ MOVE_UP = "move_up",
25
+ MOVE_DOWN = "move_down",
26
+ MOVE_LEFT = "move_left",
27
+ MOVE_RIGHT = "move_right",
28
+ NAVIGATE_RIGHT = "right",
29
+ NAVIGATE_LEFT = "left",
30
+ NAVIGATE_UP = "up",
31
+ NAVIGATE_DOWN = "down",
32
+ DISCONNECT = "disconnect",
33
+ NEXT_STACK = "next_stack",
34
+ PREVIOUS_STACK = "previous_stack",
35
+ INFORMATION = "information",
36
+ PERFORM_ACTION = "perform_action",
37
+ DUPLICATE = "duplicate",
38
+ CLEANUP = "cleanup"
18
39
  }
19
40
  /**
20
41
  * Keyboard shortcut to hide chaff on escape.
@@ -45,10 +66,52 @@ export declare function registerUndo(): void;
45
66
  * or alt+shift+z.
46
67
  */
47
68
  export declare function registerRedo(): void;
69
+ /**
70
+ * Registers keyboard shortcuts for keyboard-driven movement of workspace
71
+ * elements.
72
+ */
73
+ export declare function registerMovementShortcuts(): void;
48
74
  /**
49
75
  * Keyboard shortcut to show the context menu on ctrl/cmd+Enter.
50
76
  */
51
77
  export declare function registerShowContextMenu(): void;
78
+ /**
79
+ * Registers keyboard shortcuts to navigate around the Blockly interface.
80
+ */
81
+ export declare function registerArrowNavigation(): void;
82
+ /**
83
+ * Registers keyboard shortcut to focus the workspace.
84
+ */
85
+ export declare function registerFocusWorkspace(): void;
86
+ /**
87
+ * Registers keyboard shortcut to focus the toolbox.
88
+ */
89
+ export declare function registerFocusToolbox(): void;
90
+ /**
91
+ * Registers keyboard shortcut to get count of block stacks and comments.
92
+ */
93
+ export declare function registerWorkspaceOverview(): void;
94
+ /**
95
+ * Registers keyboard shortcut to disconnect the focused block.
96
+ */
97
+ export declare function registerDisconnectBlock(): void;
98
+ /**
99
+ * Registers keyboard shortcuts to jump between stacks/top-level items on the
100
+ * workspace.
101
+ */
102
+ export declare function registerStackNavigation(): void;
103
+ /**
104
+ * Registers keyboard shortcut to perform an action on the focused element.
105
+ */
106
+ export declare function registerPerformAction(): void;
107
+ /**
108
+ * Registers keyboard shortcut to duplicate a block or workspace comment.
109
+ */
110
+ export declare function registerDuplicate(): void;
111
+ /**
112
+ * Registers keyboard shortcut to clean up the workspace.
113
+ */
114
+ export declare function registerCleanup(): void;
52
115
  /**
53
116
  * Registers all default keyboard shortcut item. This should be called once per
54
117
  * instance of KeyboardShortcutRegistry.
@@ -56,4 +119,13 @@ export declare function registerShowContextMenu(): void;
56
119
  * @internal
57
120
  */
58
121
  export declare function registerDefaultShortcuts(): void;
122
+ /**
123
+ * Registers an extended set of keyboard shortcuts used to support deep keyboard
124
+ * navigation of Blockly.
125
+ */
126
+ export declare function registerKeyboardNavigationShortcuts(): void;
127
+ /**
128
+ * Registers keyboard shortcuts used to announce screen reader information.
129
+ */
130
+ export declare function registerScreenReaderShortcuts(): void;
59
131
  //# sourceMappingURL=shortcut_items.d.ts.map
@@ -223,6 +223,12 @@ export declare namespace ShortcutRegistry {
223
223
  * name.
224
224
  */
225
225
  allowCollision?: boolean;
226
+ /**
227
+ * Display text for the shortcut. This is not used in core but may
228
+ * be used by plugins or applications to provide a user-facing
229
+ * label for the shortcut.
230
+ */
231
+ displayText?: string | (() => string);
226
232
  }
227
233
  /** Supported modifiers. */
228
234
  enum modifierKeys {
package/core/theme.d.ts CHANGED
@@ -135,8 +135,6 @@ export declare namespace Theme {
135
135
  cursorColour?: string;
136
136
  selectedGlowColour?: string;
137
137
  selectedGlowOpacity?: number;
138
- replacementGlowColour?: string;
139
- replacementGlowOpacity?: number;
140
138
  }
141
139
  interface FontStyle {
142
140
  family?: string;
package/core/toast.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import * as aria from './utils/aria.js';
6
7
  import type { WorkspaceSvg } from './workspace_svg.js';
7
8
  /**
8
9
  * Display/configuration options for a toast notification.
@@ -30,7 +31,7 @@ export interface ToastOptions {
30
31
  * How prominently/interrupting the readout of the toast should be for
31
32
  * screenreaders. Corresponds to aria-live and defaults to polite.
32
33
  */
33
- assertiveness?: Toast.Assertiveness;
34
+ assertiveness?: aria.LiveRegionAssertiveness;
34
35
  }
35
36
  /**
36
37
  * Class that allows for showing and dismissing temporary notifications.
@@ -61,14 +62,4 @@ export declare class Toast {
61
62
  */
62
63
  static hide(workspace: WorkspaceSvg, id?: string): void;
63
64
  }
64
- /**
65
- * Options for how aggressively toasts should be read out by screenreaders.
66
- * Values correspond to those for aria-live.
67
- */
68
- export declare namespace Toast {
69
- enum Assertiveness {
70
- ASSERTIVE = "assertive",
71
- POLITE = "polite"
72
- }
73
- }
74
65
  //# sourceMappingURL=toast.d.ts.map
@@ -229,6 +229,11 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
229
229
  getName(): string;
230
230
  getParent(): ICollapsibleToolboxItem | null;
231
231
  getDiv(): HTMLDivElement | null;
232
+ /**
233
+ * Handles this toolbox category gaining focus by informing its parent
234
+ * toolbox that it has been selected.
235
+ */
236
+ onNodeFocus(): void;
232
237
  /**
233
238
  * Gets the contents of the category. These are items that are meant to be
234
239
  * displayed in the flyout.
@@ -30,6 +30,10 @@ export declare class ToolboxSeparator extends ToolboxItem {
30
30
  protected createDom_(): HTMLDivElement;
31
31
  getDiv(): HTMLDivElement;
32
32
  dispose(): void;
33
+ /**
34
+ * Prevents separator toolbox items from gaining focus.
35
+ */
36
+ canBeFocused(): boolean;
33
37
  }
34
38
  export declare namespace ToolboxSeparator {
35
39
  interface CssConfig {
@@ -3,6 +3,11 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Toolbox from whence to create blocks.
8
+ *
9
+ * @class
10
+ */
6
11
  import * as browserEvents from '../browser_events.js';
7
12
  import { DeleteArea } from '../delete_area.js';
8
13
  import '../events/events_toolbox_item_select.js';
@@ -16,6 +21,7 @@ import type { ISelectableToolboxItem } from '../interfaces/i_selectable_toolbox_
16
21
  import type { IStyleable } from '../interfaces/i_styleable.js';
17
22
  import type { IToolbox } from '../interfaces/i_toolbox.js';
18
23
  import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
24
+ import { ToolboxNavigator } from '../keyboard_nav/navigators/toolbox_navigator.js';
19
25
  import type { KeyboardShortcut } from '../shortcut_registry.js';
20
26
  import { Rect } from '../utils/rect.js';
21
27
  import * as toolbox from '../utils/toolbox.js';
@@ -62,6 +68,8 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
62
68
  protected readonly workspace_: WorkspaceSvg;
63
69
  /** Whether the mouse is currently being clicked. */
64
70
  private mouseDown;
71
+ /** Object used by keyboard navigation to move focus in this toolbox. */
72
+ private navigator;
65
73
  /** @param workspace The workspace in which to create new blocks. */
66
74
  constructor(workspace: WorkspaceSvg);
67
75
  /**
@@ -176,17 +184,6 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
176
184
  * ignored.
177
185
  */
178
186
  getClientRect(): Rect | null;
179
- /**
180
- * Returns whether the provided block or bubble would be deleted if dropped on
181
- * this area.
182
- * This method should check if the element is deletable and is always called
183
- * before onDragEnter/onDragOver/onDragExit.
184
- *
185
- * @param element The block or bubble currently being dragged.
186
- * @returns Whether the element provided would be deleted if dropped on this
187
- * area.
188
- */
189
- wouldDelete(element: IDraggable): boolean;
190
187
  /**
191
188
  * Handles when a cursor with a block or bubble enters this drag target.
192
189
  *
@@ -367,30 +364,12 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
367
364
  */
368
365
  private fireSelectEvent;
369
366
  /**
370
- * Closes the current item if it is expanded, or selects the parent.
371
- *
372
- * @returns True if a parent category was selected, false otherwise.
373
- */
374
- private selectParent;
375
- /**
376
- * Selects the first child of the currently selected item, or nothing if the
377
- * toolbox item has no children.
367
+ * Sets the currently selected item's expansion state, if possible.
378
368
  *
379
- * @returns True if a child category was selected, false otherwise.
369
+ * @param expanded True to expand the item or false to collapse it.
370
+ * @returns True if the selected item's expansion state was updated.
380
371
  */
381
- private selectChild;
382
- /**
383
- * Selects the next visible toolbox item.
384
- *
385
- * @returns True if a next category was selected, false otherwise.
386
- */
387
- private selectNext;
388
- /**
389
- * Selects the previous visible toolbox item.
390
- *
391
- * @returns True if a previous category was selected, false otherwise.
392
- */
393
- private selectPrevious;
372
+ private toggleSelectedItem;
394
373
  /** Disposes of this toolbox. */
395
374
  dispose(): void;
396
375
  /** See IFocusableNode.getFocusableElement. */
@@ -415,5 +394,10 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
415
394
  onTreeFocus(node: IFocusableNode, _previousTree: IFocusableTree | null): void;
416
395
  /** See IFocusableTree.onTreeBlur. */
417
396
  onTreeBlur(nextTree: IFocusableTree | null): void;
397
+ /**
398
+ * Returns the Navigator instance to use to move between items in this
399
+ * toolbox.
400
+ */
401
+ getNavigator(): ToolboxNavigator;
418
402
  }
419
403
  //# sourceMappingURL=toolbox.d.ts.map
@@ -105,5 +105,9 @@ export declare class ToolboxItem implements IToolboxItem {
105
105
  onNodeBlur(): void;
106
106
  /** See IFocusableNode.canBeFocused. */
107
107
  canBeFocused(): boolean;
108
+ /**
109
+ * Returns the toolbox this toolbox item belongs to.
110
+ */
111
+ getParentToolbox(): IToolbox;
108
112
  }
109
113
  //# sourceMappingURL=toolbox_item.d.ts.map