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.
- package/blockly.min.js +1541 -700
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +1449 -674
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +16 -16
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +1 -1
- package/core/block_aria_composer.d.ts +119 -0
- package/core/block_svg.d.ts +59 -16
- package/core/blockly.d.ts +21 -16
- package/core/bubbles/bubble.d.ts +17 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +9 -1
- package/core/bubbles/text_bubble.d.ts +4 -1
- package/core/bubbles/textinput_bubble.d.ts +5 -0
- package/core/comments/comment_editor.d.ts +2 -2
- package/core/comments/rendered_workspace_comment.d.ts +6 -1
- package/core/common.d.ts +1 -1
- package/core/css.d.ts +2 -1
- package/core/dragging/block_drag_strategy.d.ts +126 -14
- package/core/dragging/bubble_drag_strategy.d.ts +5 -4
- package/core/dragging/comment_drag_strategy.d.ts +4 -4
- package/core/dragging/dragger.d.ts +13 -14
- package/core/events/events_block_create.d.ts +0 -3
- package/core/events/events_block_delete.d.ts +0 -3
- package/core/events/events_comment_create.d.ts +0 -3
- package/core/events/events_comment_delete.d.ts +0 -3
- package/core/field.d.ts +69 -2
- package/core/field_input.d.ts +23 -0
- package/core/flyout_base.d.ts +1 -125
- package/core/flyout_button.d.ts +9 -0
- package/core/flyout_horizontal.d.ts +0 -11
- package/core/flyout_vertical.d.ts +0 -11
- package/core/focus_manager.d.ts +47 -2
- package/core/gesture.d.ts +0 -12
- package/core/hints.d.ts +44 -0
- package/core/icons/icon.d.ts +6 -0
- package/core/inputs/input.d.ts +22 -1
- package/core/interfaces/i_bounded_element.d.ts +7 -0
- package/core/interfaces/i_bubble.d.ts +3 -2
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +5 -1
- package/core/interfaces/i_draggable.d.ts +22 -17
- package/core/interfaces/i_dragger.d.ts +19 -10
- package/core/interfaces/i_flyout.d.ts +1 -31
- package/core/interfaces/i_focusable_node.d.ts +8 -0
- package/core/interfaces/i_focusable_tree.d.ts +8 -0
- package/core/interfaces/i_json_block_definition.d.ts +102 -0
- package/core/interfaces/i_navigation_policy.d.ts +12 -0
- package/core/interfaces/i_selectable.d.ts +2 -2
- package/core/interfaces/i_selectable_toolbox_item.d.ts +3 -3
- package/core/interfaces/i_toolbox.d.ts +4 -0
- package/core/interfaces/i_toolbox_item.d.ts +6 -0
- package/core/keyboard_nav/keyboard_mover.d.ts +149 -0
- package/core/keyboard_nav/move_indicator.d.ts +35 -0
- package/core/keyboard_nav/{block_navigation_policy.d.ts → navigation_policies/block_navigation_policy.d.ts} +17 -25
- package/core/keyboard_nav/navigation_policies/bubble_navigation_policy.d.ts +63 -0
- package/core/keyboard_nav/{comment_bar_button_navigation_policy.d.ts → navigation_policies/comment_bar_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{comment_editor_navigation_policy.d.ts → navigation_policies/comment_editor_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{connection_navigation_policy.d.ts → navigation_policies/connection_navigation_policy.d.ts} +11 -16
- package/core/keyboard_nav/{field_navigation_policy.d.ts → navigation_policies/field_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_button_navigation_policy.d.ts → navigation_policies/flyout_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_separator_navigation_policy.d.ts → navigation_policies/flyout_separator_navigation_policy.d.ts} +9 -3
- package/core/keyboard_nav/{icon_navigation_policy.d.ts → navigation_policies/icon_navigation_policy.d.ts} +12 -5
- package/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.d.ts +64 -0
- package/core/keyboard_nav/{workspace_comment_navigation_policy.d.ts → navigation_policies/workspace_comment_navigation_policy.d.ts} +14 -9
- package/core/keyboard_nav/{workspace_navigation_policy.d.ts → navigation_policies/workspace_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/navigators/flyout_navigator.d.ts +63 -0
- package/core/keyboard_nav/navigators/navigator.d.ts +225 -0
- package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
- package/core/registry.d.ts +0 -2
- package/core/renderers/common/constants.d.ts +4 -7
- package/core/renderers/common/i_path_object.d.ts +8 -0
- package/core/renderers/common/path_object.d.ts +5 -14
- package/core/renderers/common/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +1 -14
- package/core/renderers/zelos/measurables/bottom_row.d.ts +1 -1
- package/core/renderers/zelos/measurables/top_row.d.ts +1 -1
- package/core/renderers/zelos/path_object.d.ts +0 -3
- package/core/renderers/zelos/renderer.d.ts +8 -0
- package/core/shortcut_items.d.ts +73 -1
- package/core/shortcut_registry.d.ts +6 -0
- package/core/theme.d.ts +0 -2
- package/core/toast.d.ts +2 -11
- package/core/toolbox/category.d.ts +5 -0
- package/core/toolbox/separator.d.ts +4 -0
- package/core/toolbox/toolbox.d.ts +17 -33
- package/core/toolbox/toolbox_item.d.ts +4 -0
- package/core/utils/aria.d.ts +245 -28
- package/core/utils/dom.d.ts +1 -1
- package/core/utils/shortcut_formatting.d.ts +22 -0
- package/core/utils/useragent.d.ts +1 -0
- package/core/variables.d.ts +1 -1
- package/core/workspace_audio.d.ts +23 -0
- package/core/workspace_svg.d.ts +8 -50
- package/dart_compressed.js +9 -9
- package/dart_compressed.js.map +1 -1
- package/index.mjs +13 -5
- package/javascript_compressed.js +11 -10
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +7 -7
- package/lua_compressed.js.map +1 -1
- package/msg/ab.js +65 -0
- package/msg/ab.mjs +65 -0
- package/msg/ace.js +65 -0
- package/msg/ace.mjs +65 -0
- package/msg/af.js +65 -0
- package/msg/af.mjs +65 -0
- package/msg/am.js +65 -0
- package/msg/am.mjs +65 -0
- package/msg/ar.js +65 -0
- package/msg/ar.mjs +65 -0
- package/msg/ast.js +65 -0
- package/msg/ast.mjs +65 -0
- package/msg/az.js +65 -0
- package/msg/az.mjs +65 -0
- package/msg/ba.js +65 -0
- package/msg/ba.mjs +65 -0
- package/msg/bcc.js +65 -0
- package/msg/bcc.mjs +65 -0
- package/msg/be-tarask.js +65 -0
- package/msg/be-tarask.mjs +65 -0
- package/msg/be.js +65 -0
- package/msg/be.mjs +65 -0
- package/msg/bg.js +65 -0
- package/msg/bg.mjs +65 -0
- package/msg/bn.js +65 -0
- package/msg/bn.mjs +65 -0
- package/msg/br.js +65 -0
- package/msg/br.mjs +65 -0
- package/msg/bs.js +65 -0
- package/msg/bs.mjs +65 -0
- package/msg/ca.js +65 -0
- package/msg/ca.mjs +65 -0
- package/msg/cdo.js +65 -0
- package/msg/cdo.mjs +65 -0
- package/msg/ce.js +65 -0
- package/msg/ce.mjs +65 -0
- package/msg/cs.js +65 -0
- package/msg/cs.mjs +65 -0
- package/msg/da.js +65 -0
- package/msg/da.mjs +65 -0
- package/msg/de.js +65 -0
- package/msg/de.mjs +65 -0
- package/msg/diq.js +65 -0
- package/msg/diq.mjs +65 -0
- package/msg/dtp.js +65 -0
- package/msg/dtp.mjs +65 -0
- package/msg/dty.js +65 -0
- package/msg/dty.mjs +65 -0
- package/msg/ee.js +65 -0
- package/msg/ee.mjs +65 -0
- package/msg/el.js +65 -0
- package/msg/el.mjs +65 -0
- package/msg/en-gb.js +65 -0
- package/msg/en-gb.mjs +65 -0
- package/msg/en.js +65 -0
- package/msg/en.mjs +65 -0
- package/msg/eo.js +65 -0
- package/msg/eo.mjs +65 -0
- package/msg/es.js +65 -0
- package/msg/es.mjs +65 -0
- package/msg/et.js +65 -0
- package/msg/et.mjs +65 -0
- package/msg/eu.js +65 -0
- package/msg/eu.mjs +65 -0
- package/msg/fa.js +65 -0
- package/msg/fa.mjs +65 -0
- package/msg/fi.js +65 -0
- package/msg/fi.mjs +65 -0
- package/msg/fo.js +65 -0
- package/msg/fo.mjs +65 -0
- package/msg/fr.js +65 -0
- package/msg/fr.mjs +65 -0
- package/msg/frr.js +65 -0
- package/msg/frr.mjs +65 -0
- package/msg/gl.js +65 -0
- package/msg/gl.mjs +65 -0
- package/msg/gn.js +65 -0
- package/msg/gn.mjs +65 -0
- package/msg/gor.js +65 -0
- package/msg/gor.mjs +65 -0
- package/msg/ha.js +65 -0
- package/msg/ha.mjs +65 -0
- package/msg/hak.js +65 -0
- package/msg/hak.mjs +65 -0
- package/msg/he.js +65 -0
- package/msg/he.mjs +65 -0
- package/msg/hi.js +65 -0
- package/msg/hi.mjs +65 -0
- package/msg/hr.js +65 -0
- package/msg/hr.mjs +65 -0
- package/msg/hrx.js +65 -0
- package/msg/hrx.mjs +65 -0
- package/msg/hsb.js +65 -0
- package/msg/hsb.mjs +65 -0
- package/msg/hu.js +65 -0
- package/msg/hu.mjs +65 -0
- package/msg/hy.js +65 -0
- package/msg/hy.mjs +65 -0
- package/msg/ia.js +65 -0
- package/msg/ia.mjs +65 -0
- package/msg/id.js +65 -0
- package/msg/id.mjs +65 -0
- package/msg/ig.js +65 -0
- package/msg/ig.mjs +65 -0
- package/msg/inh.js +65 -0
- package/msg/inh.mjs +65 -0
- package/msg/is.js +65 -0
- package/msg/is.mjs +65 -0
- package/msg/it.js +65 -0
- package/msg/it.mjs +65 -0
- package/msg/ja.js +65 -0
- package/msg/ja.mjs +65 -0
- package/msg/ka.js +65 -0
- package/msg/ka.mjs +65 -0
- package/msg/kab.js +65 -0
- package/msg/kab.mjs +65 -0
- package/msg/kbd-cyrl.js +65 -0
- package/msg/kbd-cyrl.mjs +65 -0
- package/msg/km.js +65 -0
- package/msg/km.mjs +65 -0
- package/msg/kn.js +65 -0
- package/msg/kn.mjs +65 -0
- package/msg/ko.js +65 -0
- package/msg/ko.mjs +65 -0
- package/msg/ksh.js +65 -0
- package/msg/ksh.mjs +65 -0
- package/msg/ku-latn.js +65 -0
- package/msg/ku-latn.mjs +65 -0
- package/msg/ky.js +65 -0
- package/msg/ky.mjs +65 -0
- package/msg/la.js +65 -0
- package/msg/la.mjs +65 -0
- package/msg/lb.js +65 -0
- package/msg/lb.mjs +65 -0
- package/msg/lki.js +65 -0
- package/msg/lki.mjs +65 -0
- package/msg/lo.js +65 -0
- package/msg/lo.mjs +65 -0
- package/msg/lrc.js +65 -0
- package/msg/lrc.mjs +65 -0
- package/msg/lt.js +65 -0
- package/msg/lt.mjs +65 -0
- package/msg/lv.js +65 -0
- package/msg/lv.mjs +65 -0
- package/msg/mg.js +65 -0
- package/msg/mg.mjs +65 -0
- package/msg/mk.js +65 -0
- package/msg/mk.mjs +65 -0
- package/msg/ml.js +65 -0
- package/msg/ml.mjs +65 -0
- package/msg/mnw.js +65 -0
- package/msg/mnw.mjs +65 -0
- package/msg/ms.js +65 -0
- package/msg/ms.mjs +65 -0
- package/msg/my.js +65 -0
- package/msg/my.mjs +65 -0
- package/msg/mzn.js +65 -0
- package/msg/mzn.mjs +65 -0
- package/msg/nb.js +65 -0
- package/msg/nb.mjs +65 -0
- package/msg/ne.js +65 -0
- package/msg/ne.mjs +65 -0
- package/msg/nl.js +65 -0
- package/msg/nl.mjs +65 -0
- package/msg/oc.js +65 -0
- package/msg/oc.mjs +65 -0
- package/msg/olo.js +65 -0
- package/msg/olo.mjs +65 -0
- package/msg/pa.js +65 -0
- package/msg/pa.mjs +65 -0
- package/msg/pl.js +65 -0
- package/msg/pl.mjs +65 -0
- package/msg/pms.js +65 -0
- package/msg/pms.mjs +65 -0
- package/msg/ps.js +65 -0
- package/msg/ps.mjs +65 -0
- package/msg/pt-br.js +65 -0
- package/msg/pt-br.mjs +65 -0
- package/msg/pt.js +65 -0
- package/msg/pt.mjs +65 -0
- package/msg/ro.js +65 -0
- package/msg/ro.mjs +65 -0
- package/msg/ru.js +65 -0
- package/msg/ru.mjs +65 -0
- package/msg/sc.js +65 -0
- package/msg/sc.mjs +65 -0
- package/msg/sco.js +65 -0
- package/msg/sco.mjs +65 -0
- package/msg/sd.js +65 -0
- package/msg/sd.mjs +65 -0
- package/msg/shn.js +65 -0
- package/msg/shn.mjs +65 -0
- package/msg/si.js +65 -0
- package/msg/si.mjs +65 -0
- package/msg/sk.js +65 -0
- package/msg/sk.mjs +65 -0
- package/msg/skr-arab.js +65 -0
- package/msg/skr-arab.mjs +65 -0
- package/msg/sl.js +65 -0
- package/msg/sl.mjs +65 -0
- package/msg/smn.js +65 -0
- package/msg/smn.mjs +65 -0
- package/msg/sq.js +65 -0
- package/msg/sq.mjs +65 -0
- package/msg/sr-latn.js +65 -0
- package/msg/sr-latn.mjs +65 -0
- package/msg/sr.js +65 -0
- package/msg/sr.mjs +65 -0
- package/msg/sv.js +65 -0
- package/msg/sv.mjs +65 -0
- package/msg/sw.js +65 -0
- package/msg/sw.mjs +65 -0
- package/msg/ta.js +65 -0
- package/msg/ta.mjs +65 -0
- package/msg/tcy.js +65 -0
- package/msg/tcy.mjs +65 -0
- package/msg/tdd.js +65 -0
- package/msg/tdd.mjs +65 -0
- package/msg/te.js +65 -0
- package/msg/te.mjs +65 -0
- package/msg/th.js +65 -0
- package/msg/th.mjs +65 -0
- package/msg/ti.js +65 -0
- package/msg/ti.mjs +65 -0
- package/msg/tl.js +65 -0
- package/msg/tl.mjs +65 -0
- package/msg/tlh.js +65 -0
- package/msg/tlh.mjs +65 -0
- package/msg/tr.js +65 -0
- package/msg/tr.mjs +65 -0
- package/msg/ug-arab.js +65 -0
- package/msg/ug-arab.mjs +65 -0
- package/msg/uk.js +65 -0
- package/msg/uk.mjs +65 -0
- package/msg/ur.js +65 -0
- package/msg/ur.mjs +65 -0
- package/msg/uz.js +65 -0
- package/msg/uz.mjs +65 -0
- package/msg/vi.js +65 -0
- package/msg/vi.mjs +65 -0
- package/msg/xmf.js +65 -0
- package/msg/xmf.mjs +65 -0
- package/msg/yo.js +65 -0
- package/msg/yo.mjs +65 -0
- package/msg/zgh.js +65 -0
- package/msg/zgh.mjs +65 -0
- package/msg/zh-hans.js +65 -0
- package/msg/zh-hans.mjs +65 -0
- package/msg/zh-hant.js +65 -0
- package/msg/zh-hant.mjs +65 -0
- package/package.json +11 -11
- package/php_compressed.js +2 -2
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +2 -2
- package/python_compressed.js.map +1 -1
- package/core/flyout_navigator.d.ts +0 -11
- package/core/keyboard_nav/block_comment_navigation_policy.d.ts +0 -56
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +0 -65
- package/core/keyboard_nav/line_cursor.d.ts +0 -187
- package/core/keyboard_nav/marker.d.ts +0 -53
- package/core/marker_manager.d.ts +0 -72
- package/core/navigator.d.ts +0 -65
- package/media/sprites.png +0 -0
package/core/utils/aria.d.ts
CHANGED
|
@@ -4,66 +4,283 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* ARIA
|
|
8
|
-
* Copied from Closure's goog.a11y.aria.
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
TREEITEM = "treeitem",
|
|
72
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role. */
|
|
23
73
|
SEPARATOR = "separator",
|
|
24
|
-
|
|
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
|
|
28
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
*
|
|
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
|
|
55
|
-
* @param roleName Role name.
|
|
205
|
+
* @param element DOM element to remove the role from.
|
|
56
206
|
*/
|
|
57
|
-
export declare function
|
|
207
|
+
export declare function removeRole(element: Element): void;
|
|
58
208
|
/**
|
|
59
|
-
*
|
|
60
|
-
* Copied from Closure's goog.a11y.aria
|
|
209
|
+
* Updates the specific role for the specified element.
|
|
61
210
|
*
|
|
62
|
-
* @param element
|
|
63
|
-
* @param
|
|
64
|
-
*
|
|
65
|
-
|
|
66
|
-
|
|
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
|
package/core/utils/dom.d.ts
CHANGED
|
@@ -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
|
package/core/variables.d.ts
CHANGED
|
@@ -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:
|
|
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
|
*/
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -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
|
|
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.
|
package/dart_compressed.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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+
|
|
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];
|
|
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+
|
|
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]},
|
|
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]},
|
|
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];
|
|
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
|
}
|