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
@@ -4,66 +4,283 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  /**
7
- * ARIA role values.
8
- * Copied from Closure's goog.a11y.aria.Role
7
+ * ARIA state values for LivePriority.
8
+ * Copied from Closure's goog.a11y.aria.LivePriority
9
+ */
10
+ export declare enum LiveRegionAssertiveness {
11
+ ASSERTIVE = "assertive",
12
+ OFF = "off",
13
+ POLITE = "polite"
14
+ }
15
+ /**
16
+ * Customization options that can be passed when using `announceDynamicAriaState`.
17
+ */
18
+ export interface DynamicAnnouncementOptions {
19
+ /** The custom ARIA `Role` that should be used for the announcement container. */
20
+ role?: Role;
21
+ /**
22
+ * How assertive the announcement should be.
23
+ *
24
+ * Important*: It was found through testing that `ASSERTIVE` announcements are
25
+ * often outright ignored by some screen readers, so it's generally recommended
26
+ * to always use `POLITE` unless specifically tested across supported readers.
27
+ */
28
+ assertiveness?: LiveRegionAssertiveness;
29
+ }
30
+ /**
31
+ * A valid ARIA role for a Blockly DOM element. See also setRole() and getRole().
32
+ *
33
+ * This should be used instead of directly setting an element's role attribute.
9
34
  */
10
35
  export declare enum Role {
36
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/application_role. */
37
+ APPLICATION = "application",
38
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/button_role. */
39
+ BUTTON = "button",
40
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/checkbox_role. */
41
+ CHECKBOX = "checkbox",
42
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/dialog_role. */
43
+ DIALOG = "dialog",
44
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/figure_role. */
45
+ FIGURE = "figure",
46
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/generic_role. */
47
+ GENERIC = "generic",
48
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/grid_role. */
11
49
  GRID = "grid",
50
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/gridcell_role. */
12
51
  GRIDCELL = "gridcell",
52
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/group_role. */
13
53
  GROUP = "group",
54
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/list_role. */
55
+ LIST = "list",
56
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/listbox_role. */
14
57
  LISTBOX = "listbox",
58
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/listitem_role. */
59
+ LISTITEM = "listitem",
60
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menu_role. */
15
61
  MENU = "menu",
62
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menuitem_role. */
16
63
  MENUITEM = "menuitem",
17
- MENUITEMCHECKBOX = "menuitemcheckbox",
64
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/option_role. */
18
65
  OPTION = "option",
66
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/presentation_role. */
19
67
  PRESENTATION = "presentation",
68
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role. */
69
+ REGION = "region",
70
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/row_role. */
20
71
  ROW = "row",
21
- TREE = "tree",
22
- TREEITEM = "treeitem",
72
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role. */
23
73
  SEPARATOR = "separator",
24
- STATUS = "status"
74
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role. */
75
+ STATUS = "status",
76
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/textbox_role. */
77
+ TEXTBOX = "textbox",
78
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tree_role. */
79
+ TREE = "tree",
80
+ /** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/treeitem_role. */
81
+ TREEITEM = "treeitem"
25
82
  }
26
83
  /**
27
- * ARIA states and properties.
28
- * Copied from Closure's goog.a11y.aria.State
84
+ * A possible ARIA attribute state for a Blockly DOM element. See also setState() and getState().
85
+ *
86
+ * This should be used instead of directly setting aria-* attributes on elements.
29
87
  */
30
88
  export declare enum State {
89
+ /**
90
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-activedescendant.
91
+ *
92
+ * Value: ID of a DOM element.
93
+ */
31
94
  ACTIVEDESCENDANT = "activedescendant",
32
- COLCOUNT = "colcount",
95
+ /**
96
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-atomic.
97
+ *
98
+ * Value: one of {true, false}.
99
+ */
100
+ ATOMIC = "atomic",
101
+ /**
102
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-checked.
103
+ *
104
+ * Value: one of {true, false, mixed, undefined}.
105
+ */
106
+ CHECKED = "checked",
107
+ /**
108
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-controls.
109
+ *
110
+ * Value: an array of element IDs.
111
+ */
112
+ CONTROLS = "controls",
113
+ /**
114
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-disabled.
115
+ *
116
+ * Value: one of {true, false}.
117
+ */
33
118
  DISABLED = "disabled",
119
+ /**
120
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-expanded.
121
+ *
122
+ * Value: one of {true, false, undefined}.
123
+ */
34
124
  EXPANDED = "expanded",
125
+ /**
126
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-haspopup.
127
+ *
128
+ * Value: one of {true, false, menu, listbox, tree, grid, dialog}.
129
+ */
130
+ HASPOPUP = "haspopup",
131
+ /**
132
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden.
133
+ *
134
+ * Value: one of {true, false,undefined}.
135
+ */
136
+ HIDDEN = "hidden",
137
+ /**
138
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid.
139
+ *
140
+ * Value: one of {true, false, grammar, spelling}.
141
+ */
35
142
  INVALID = "invalid",
143
+ /**
144
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label.
145
+ *
146
+ * Value: a string.
147
+ */
36
148
  LABEL = "label",
149
+ /**
150
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby.
151
+ *
152
+ * Value: an array of element IDs.
153
+ */
37
154
  LABELLEDBY = "labelledby",
155
+ /**
156
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-level.
157
+ *
158
+ * Value: an integer.
159
+ */
38
160
  LEVEL = "level",
39
- ORIENTATION = "orientation",
40
- POSINSET = "posinset",
41
- ROWCOUNT = "rowcount",
161
+ /**
162
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-live.
163
+ *
164
+ * Value: one of {polite, assertive, off}.
165
+ */
166
+ LIVE = "live",
167
+ /**
168
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-roledescription.
169
+ *
170
+ * Value: a string.
171
+ */
172
+ ROLEDESCRIPTION = "roledescription",
173
+ /**
174
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-selected.
175
+ *
176
+ * Value:one of {true, false, undefined}.
177
+ */
42
178
  SELECTED = "selected",
43
- SETSIZE = "setsize",
179
+ /**
180
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuemax.
181
+ *
182
+ * Value: a number representing the maximum allowed value for a range widget.
183
+ */
44
184
  VALUEMAX = "valuemax",
45
- VALUEMIN = "valuemin",
46
- LIVE = "live",
47
- HIDDEN = "hidden"
185
+ /**
186
+ * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuemin.
187
+ *
188
+ * Value: a number representing the minimum allowed value for a range widget.
189
+ */
190
+ VALUEMIN = "valuemin"
191
+ }
192
+ /**
193
+ * Used to control how verbose generated a11y labels are.
194
+ */
195
+ export declare enum Verbosity {
196
+ TERSE = 0,
197
+ STANDARD = 1,
198
+ LOQUACIOUS = 2
48
199
  }
49
200
  /**
50
- * Sets the role of an element.
201
+ * Removes the ARIA role from an element.
51
202
  *
52
- * Similar to Closure's goog.a11y.aria
203
+ * Similar to Closure's goog.a11y.aria.removeRole
53
204
  *
54
- * @param element DOM node to set role of.
55
- * @param roleName Role name.
205
+ * @param element DOM element to remove the role from.
56
206
  */
57
- export declare function setRole(element: Element, roleName: Role): void;
207
+ export declare function removeRole(element: Element): void;
58
208
  /**
59
- * Sets the state or property of an element.
60
- * Copied from Closure's goog.a11y.aria
209
+ * Updates the specific role for the specified element.
61
210
  *
62
- * @param element DOM node where we set state.
63
- * @param stateName State attribute being set.
64
- * Automatically adds prefix 'aria-' to the state name if the attribute is
65
- * not an extra attribute.
66
- * @param value Value for the state attribute.
211
+ * @param element The element whose ARIA role should be changed.
212
+ * @param roleName The new role for the specified element, or null if its role
213
+ * should be cleared.
214
+ */
215
+ export declare function setRole(element: Element, roleName: Role | null): void;
216
+ /**
217
+ * Returns the ARIA role of the specified element, or null if it either doesn't
218
+ * have a designated role or if that role is unknown.
219
+ *
220
+ * @param element The element from which to retrieve its ARIA role.
221
+ * @returns The ARIA role of the element, or null if undefined or unknown.
222
+ */
223
+ export declare function getRole(element: Element): Role | null;
224
+ /**
225
+ * Sets the specified ARIA state by its name and value for the specified
226
+ * element.
227
+ *
228
+ * Note that the type of value is not validated against the specific type of
229
+ * state being changed, so it's up to callers to ensure the correct value is
230
+ * used for the given state.
231
+ *
232
+ * @param element The element whose ARIA state may be changed.
233
+ * @param stateName The state to change.
234
+ * @param value The new value to specify for the provided state.
67
235
  */
68
236
  export declare function setState(element: Element, stateName: State, value: string | boolean | number | string[]): void;
237
+ /**
238
+ * Clears the specified ARIA state by removing any related attributes from the
239
+ * specified element that have been set using setState().
240
+ *
241
+ * @param element The element whose ARIA state may be changed.
242
+ * @param stateName The state to clear from the provided element.
243
+ */
244
+ export declare function clearState(element: Element, stateName: State): void;
245
+ /**
246
+ * Returns a string representation of the specified state for the specified
247
+ * element, or null if it's not defined or specified.
248
+ *
249
+ * Note that an explicit set state of 'null' will return the 'null' string, not
250
+ * the value null.
251
+ *
252
+ * @param element The element whose state is being retrieved.
253
+ * @param stateName The state to retrieve.
254
+ * @returns The string representation of the requested state for the specified
255
+ * element, or null if not defined.
256
+ */
257
+ export declare function getState(element: Element, stateName: State): string | null;
258
+ /**
259
+ * Creates an ARIA live region under the specified parent Element to be used
260
+ * for all dynamic announcements via `announceDynamicAriaState`. This must be
261
+ * called only once and before any dynamic announcements can be made.
262
+ *
263
+ * @param parent The container element to which the live region will be appended.
264
+ */
265
+ export declare function initializeGlobalAriaLiveRegion(parent: HTMLDivElement): void;
266
+ /**
267
+ * Requests that the specified text be read to the user if a screen reader is
268
+ * currently active.
269
+ *
270
+ * This relies on a centrally managed ARIA live region that is hidden from the
271
+ * visual DOM. This live region is designed to try and ensure the text is read,
272
+ * including if the same text is issued multiple times consecutively. Note that
273
+ * `initializeGlobalAriaLiveRegion` must be called before this can be used.
274
+ *
275
+ * Callers should use this judiciously. It's often considered bad practice to
276
+ * over-announce information that can be inferred from other sources on the page,
277
+ * so this ought to be used only when certain context cannot be easily determined
278
+ * (such as dynamic states that may not have perfect ARIA representations or
279
+ * indications).
280
+ *
281
+ * @param text The text to read to the user.
282
+ * @param options Custom options to configure the announcement. This defaults to
283
+ * the status role and polite assertiveness.
284
+ */
285
+ export declare function announceDynamicAriaState(text: string, options?: DynamicAnnouncementOptions): void;
69
286
  //# sourceMappingURL=aria.d.ts.map
@@ -3,7 +3,7 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { Svg } from './svg.js';
6
+ import { Svg } from './svg.js';
7
7
  /**
8
8
  * Required name space for SVG elements.
9
9
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Raspberry Pi Foundation
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Find the primary shortcut for this platform and return it as single string
8
+ * in a short user facing format.
9
+ *
10
+ * @param shortcutName The keyboard shortcut name, e.g. "cut".
11
+ * @returns The formatted shortcut.
12
+ */
13
+ export declare function getShortcutKeysShort(shortcutName: string): string;
14
+ /**
15
+ * Find the relevant shortcuts for the given shortcut for the current platform.
16
+ * Keys are returned in a long user facing format, e.g. "Command ⌘ Option ⌥ C"
17
+ *
18
+ * @param shortcutName The keyboard shortcut name, e.g. "cut".
19
+ * @returns The formatted shortcuts as individual keys.
20
+ */
21
+ export declare function getShortcutKeysLong(shortcutName: string): string[][];
22
+ //# sourceMappingURL=shortcut_formatting.d.ts.map
@@ -11,4 +11,5 @@ export declare const IPAD: boolean;
11
11
  export declare const IPHONE: boolean;
12
12
  export declare const MAC: boolean;
13
13
  export declare const MOBILE: boolean;
14
+ export declare const APPLE: boolean;
14
15
  //# sourceMappingURL=useragent.d.ts.map
@@ -109,7 +109,7 @@ export declare function generateUniqueNameFromOptions(startChar: string, usedNam
109
109
  * @param opt_type The type of the variable like 'int', 'string', or ''. This
110
110
  * will default to '', which is a specific type.
111
111
  */
112
- export declare function createVariableButtonHandler(workspace: Workspace, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
112
+ export declare function createVariableButtonHandler(workspace: WorkspaceSvg, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
113
113
  /**
114
114
  * Opens a prompt that allows the user to enter a new name for a variable.
115
115
  * Triggers a rename if the new name is valid. Or re-prompts if there is a
@@ -50,6 +50,29 @@ export declare class WorkspaceAudio {
50
50
  * @param opt_volume Volume of sound (0-1).
51
51
  */
52
52
  play(name: string, opt_volume?: number): Promise<void>;
53
+ /**
54
+ * Plays a beep at the given frequency.
55
+ *
56
+ * @param tone The frequency of the beep to play, in hertz.
57
+ * @param duration The duration of the beep, in seconds. Defaults to 0.2.
58
+ */
59
+ beep(tone: number, duration?: number): Promise<void>;
60
+ /**
61
+ * Plays a standard error beep.
62
+ */
63
+ playErrorBeep(): Promise<void>;
64
+ /**
65
+ * Returns whether or not playing sounds is currently allowed.
66
+ *
67
+ * @returns False if audio is muted or a sound has just been played, otherwise
68
+ * true.
69
+ */
70
+ private isPlayingAllowed;
71
+ /**
72
+ * Prepares to play audio by recording the time of the last play and resuming
73
+ * the audio context.
74
+ */
75
+ private prepareToPlay;
53
76
  /**
54
77
  * @param muted If true, mute sounds. Otherwise, play them.
55
78
  */
@@ -29,11 +29,8 @@ import { type IFocusableNode } from './interfaces/i_focusable_node.js';
29
29
  import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
30
30
  import type { IMetricsManager } from './interfaces/i_metrics_manager.js';
31
31
  import type { IToolbox } from './interfaces/i_toolbox.js';
32
- import type { LineCursor } from './keyboard_nav/line_cursor.js';
33
- import type { Marker } from './keyboard_nav/marker.js';
32
+ import { Navigator } from './keyboard_nav/navigators/navigator.js';
34
33
  import { LayerManager } from './layer_manager.js';
35
- import { MarkerManager } from './marker_manager.js';
36
- import { Navigator } from './navigator.js';
37
34
  import { Options } from './options.js';
38
35
  import type { Renderer } from './renderers/common/renderer.js';
39
36
  import type { ScrollbarPair } from './scrollbar_pair.js';
@@ -220,7 +217,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
220
217
  private readonly highlightedBlocks;
221
218
  private audioManager;
222
219
  private grid;
223
- private markerManager;
224
220
  /**
225
221
  * Map from function names to callbacks, for deciding what to do when a
226
222
  * custom toolbox category is opened.
@@ -235,10 +231,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
235
231
  private readonly renderer;
236
232
  /** Cached parent SVG. */
237
233
  private cachedParentSvg;
238
- /** True if keyboard accessibility mode is on, false otherwise. */
239
- keyboardAccessibilityMode: boolean;
240
- /** True iff a keyboard-initiated move ("drag") is in progress. */
241
- keyboardMoveInProgress: boolean;
242
234
  /** The list of top-level bounded elements on the workspace. */
243
235
  private topBoundedElements;
244
236
  /** The recorded drag targets. */
@@ -259,12 +251,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
259
251
  * @param options Dictionary of options.
260
252
  */
261
253
  constructor(options: Options);
262
- /**
263
- * Get the marker manager for this workspace.
264
- *
265
- * @returns The marker manager.
266
- */
267
- getMarkerManager(): MarkerManager;
268
254
  /**
269
255
  * Gets the metrics manager for this workspace.
270
256
  *
@@ -284,21 +270,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
284
270
  * @returns The component manager.
285
271
  */
286
272
  getComponentManager(): ComponentManager;
287
- /**
288
- * Get the marker with the given ID.
289
- *
290
- * @param id The ID of the marker.
291
- * @returns The marker with the given ID or null if no marker with the given
292
- * ID exists.
293
- * @internal
294
- */
295
- getMarker(id: string): Marker | null;
296
- /**
297
- * The cursor for this workspace.
298
- *
299
- * @returns The cursor for the workspace.
300
- */
301
- getCursor(): LineCursor;
302
273
  /**
303
274
  * Get the block renderer attached to this workspace.
304
275
  *
@@ -608,11 +579,11 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
608
579
  /**
609
580
  * Returns the drag target the pointer event is over.
610
581
  *
611
- * @param e Pointer move event.
582
+ * @param e Pointer move event or a workspace coordinate.
612
583
  * @returns Null if not over a drag target, or the drag target the event is
613
584
  * over.
614
585
  */
615
- getDragTarget(e: PointerEvent): IDragTarget | null;
586
+ getDragTarget(e: PointerEvent | Coordinate): IDragTarget | null;
616
587
  /**
617
588
  * Handle a pointerdown on SVG drawing surface.
618
589
  *
@@ -633,24 +604,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
633
604
  * @returns New location of object.
634
605
  */
635
606
  moveDrag(e: PointerEvent): Coordinate;
636
- /**
637
- * Indicate whether a keyboard move is in progress or not.
638
- *
639
- * Should be called with true when a keyboard move of an IDraggable
640
- * is starts, and false when it finishes or is aborted.
641
- *
642
- * N.B.: This method is experimental and internal-only. It is
643
- * intended only to called only from the keyboard navigation plugin.
644
- * Its signature and behaviour may be modified, or the method
645
- * removed, at an time without notice and without being treated
646
- * as a breaking change.
647
- *
648
- * TODO(#8960): Delete this.
649
- *
650
- * @internal
651
- * @param inProgress Is a keyboard-initated move in progress?
652
- */
653
- setKeyboardMoveInProgress(inProgress: boolean): void;
654
607
  /**
655
608
  * Returns true iff the user is currently engaged in a drag gesture,
656
609
  * or if a keyboard-initated move is in progress.
@@ -1077,6 +1030,11 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
1077
1030
  onTreeFocus(_node: IFocusableNode, _previousTree: IFocusableTree | null): void;
1078
1031
  /** See IFocusableTree.onTreeBlur. */
1079
1032
  onTreeBlur(nextTree: IFocusableTree | null): void;
1033
+ /**
1034
+ * Handles the user acting on this workspace via keyboard navigation by
1035
+ * prompting them to use the arrow keys (instead of Enter) to navigate.
1036
+ */
1037
+ performAction(): void;
1080
1038
  /**
1081
1039
  * Returns an object responsible for coordinating movement of focus between
1082
1040
  * items on this workspace in response to keyboard navigation commands.
@@ -226,15 +226,15 @@ int ${b.FUNCTION_NAME_PLACEHOLDER_}(num a, num b) {
226
226
  }
227
227
  `)+"("+c+", "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},math_random_float$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";return["new Math.Random().nextDouble()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},math_atan2$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";const c=b.valueToCode(a,"X",Order$$module$build$src$generators$dart$dart_generator.NONE)||
228
228
  "0";return["Math.atan2("+(b.valueToCode(a,"Y",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0")+", "+c+") / Math.pi * 180",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE]},procedures_defreturn$$module$build$src$generators$dart$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME"));var d="";b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(d+=b.injectId(b.STATEMENT_SUFFIX,a));d&&(d=b.prefixLines(d,b.INDENT));
229
- let e="";b.INFINITE_LOOP_TRAP&&(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f="";a.getInput("STACK")&&(f=b.statementToCode(a,"STACK"));let g="";a.getInput("RETURN")&&(g=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$dart$dart_generator.NONE)||"");let h="";f&&g&&(h=d);g&&(g=b.INDENT+"return "+g+";\n");const k=g?"dynamic":"void",l=[],m=a.getVars();for(let n=0;n<m.length;n++)l[n]=b.getVariableName(m[n]);d=k+" "+c+"("+l.join(", ")+") {\n"+d+e+f+h+g+"}";d=b.scrub_(a,
230
- d);b.definitions_["%"+c]=d;return null},procedures_callreturn$$module$build$src$generators$dart$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVars();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$dart$dart_generator.NONE)||"null";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},procedures_callnoreturn$$module$build$src$generators$dart$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,
231
- b)[0]+";\n"},procedures_ifreturn$$module$build$src$generators$dart$procedures=function(a,b){let c="if ("+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$dart$dart_generator.NONE)||"false")+") {\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.NONE)||"null",c+=b.INDENT+"return "+a+";\n"):c+=b.INDENT+"return;\n";return c+"}\n"},text$$module$build$src$generators$dart$text=
232
- function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},text_join$$module$build$src$generators$dart$text=function(a,b){switch(a.itemCount_){case 0:return["''",Order$$module$build$src$generators$dart$dart_generator.ATOMIC];case 1:return[(b.valueToCode(a,"ADD0",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".toString()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];default:const c=Array(a.itemCount_);
233
- for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return["["+c.join(",")+"].join()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}},text_append$$module$build$src$generators$dart$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return c+" = ["+c+", "+a+"].join();\n"},text_length$$module$build$src$generators$dart$text=
234
- function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".length",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_isEmpty$$module$build$src$generators$dart$text=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".isEmpty",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_indexOf$$module$build$src$generators$dart$text=
235
- function(a,b){const c=a.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",d=b.valueToCode(a,"FIND",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";b=(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+"."+c+"("+d+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE]:[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_charAt$$module$build$src$generators$dart$text=
236
- function(a,b){const c=a.getFieldValue("WHERE")||"FROM_START",d=b.valueToCode(a,"VALUE",c==="FIRST"||c==="FROM_START"?Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX:Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";switch(c){case "FIRST":return[d+"[0]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "FROM_START":return a=b.getAdjusted(a,"AT"),[d+"["+a+"]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "LAST":case "FROM_END":return a=
237
- c==="LAST"?1:b.getAdjusted(a,"AT",1),[`${b.provideFunction_("text_get_from_end",`
229
+ let e="";b.INFINITE_LOOP_TRAP&&(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f="";a.getInput("STACK")&&(f=b.statementToCode(a,"STACK"));let g="";a.getInput("RETURN")&&(g=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$dart$dart_generator.NONE)||"");let h="";f&&g&&(h=d);g&&(g=b.INDENT+"return "+g+";\n");const k=g?"dynamic":"void",l=[],m=a.getVarModels();for(let n=0;n<m.length;n++)l[n]=b.getVariableName(m[n].getId());d=k+" "+c+"("+l.join(", ")+") {\n"+d+e+f+h+g+"}";
230
+ d=b.scrub_(a,d);b.definitions_["%"+c]=d;return null},procedures_callreturn$$module$build$src$generators$dart$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVarModels();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$dart$dart_generator.NONE)||"null";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},procedures_callnoreturn$$module$build$src$generators$dart$procedures=
231
+ function(a,b){return b.forBlock.procedures_callreturn(a,b)[0]+";\n"},procedures_ifreturn$$module$build$src$generators$dart$procedures=function(a,b){let c="if ("+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$dart$dart_generator.NONE)||"false")+") {\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.NONE)||"null",c+=b.INDENT+"return "+a+";\n"):c+=b.INDENT+
232
+ "return;\n";return c+"}\n"},text$$module$build$src$generators$dart$text=function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},text_join$$module$build$src$generators$dart$text=function(a,b){switch(a.itemCount_){case 0:return["''",Order$$module$build$src$generators$dart$dart_generator.ATOMIC];case 1:return[(b.valueToCode(a,"ADD0",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".toString()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];
233
+ default:const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return["["+c.join(",")+"].join()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}},text_append$$module$build$src$generators$dart$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return c+" = ["+c+", "+a+
234
+ "].join();\n"},text_length$$module$build$src$generators$dart$text=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".length",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_isEmpty$$module$build$src$generators$dart$text=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".isEmpty",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},
235
+ text_indexOf$$module$build$src$generators$dart$text=function(a,b){const c=a.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",d=b.valueToCode(a,"FIND",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";b=(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+"."+c+"("+d+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE]:[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},
236
+ text_charAt$$module$build$src$generators$dart$text=function(a,b){const c=a.getFieldValue("WHERE")||"FROM_START",d=b.valueToCode(a,"VALUE",c==="FIRST"||c==="FROM_START"?Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX:Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";switch(c){case "FIRST":return[d+"[0]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "FROM_START":return a=b.getAdjusted(a,"AT"),[d+"["+a+"]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];
237
+ case "LAST":case "FROM_END":return a=c==="LAST"?1:b.getAdjusted(a,"AT",1),[`${b.provideFunction_("text_get_from_end",`
238
238
  String ${b.FUNCTION_NAME_PLACEHOLDER_}(String text, num x) {
239
239
  return text[text.length - x];
240
240
  }