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
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Field } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { Field } from '../../field.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from a field.
|
|
11
11
|
*/
|
|
@@ -38,6 +38,13 @@ export declare class FieldNavigationPolicy implements INavigationPolicy<Field<an
|
|
|
38
38
|
* @returns The preceding field or input in the given field's block.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(current: Field<any>): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given field.
|
|
43
|
+
*
|
|
44
|
+
* @param current The field to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given field.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: Field<any>): string;
|
|
41
48
|
/**
|
|
42
49
|
* Returns whether or not the given field can be navigated to.
|
|
43
50
|
*
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { FlyoutButton } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { FlyoutButton } from '../../flyout_button.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from a flyout button.
|
|
11
11
|
*/
|
|
@@ -38,6 +38,13 @@ export declare class FlyoutButtonNavigationPolicy implements INavigationPolicy<F
|
|
|
38
38
|
* @returns Null.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(_current: FlyoutButton): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given flyout button.
|
|
43
|
+
*
|
|
44
|
+
* @param current The flyout button to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given flyout button.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: FlyoutButton): string;
|
|
41
48
|
/**
|
|
42
49
|
* Returns whether or not the given flyout button can be navigated to.
|
|
43
50
|
*
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { FlyoutSeparator } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { FlyoutSeparator } from '../../flyout_separator.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from a flyout separator.
|
|
11
11
|
* This is a no-op placeholder, since flyout separators can't be navigated to.
|
|
@@ -15,6 +15,12 @@ export declare class FlyoutSeparatorNavigationPolicy implements INavigationPolic
|
|
|
15
15
|
getParent(_current: FlyoutSeparator): IFocusableNode | null;
|
|
16
16
|
getNextSibling(_current: FlyoutSeparator): IFocusableNode | null;
|
|
17
17
|
getPreviousSibling(_current: FlyoutSeparator): IFocusableNode | null;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the row ID of the given flyout separator.
|
|
20
|
+
*
|
|
21
|
+
* @returns Dummy row ID, as flyout separators are never navigable.
|
|
22
|
+
*/
|
|
23
|
+
getRowId(): string;
|
|
18
24
|
/**
|
|
19
25
|
* Returns whether or not the given flyout separator can be navigated to.
|
|
20
26
|
*
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Icon } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { Icon } from '../../icons/icon.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from an icon.
|
|
11
11
|
*/
|
|
@@ -13,10 +13,10 @@ export declare class IconNavigationPolicy implements INavigationPolicy<Icon> {
|
|
|
13
13
|
/**
|
|
14
14
|
* Returns the first child of the given icon.
|
|
15
15
|
*
|
|
16
|
-
* @param
|
|
16
|
+
* @param _current The icon to return the first child of.
|
|
17
17
|
* @returns Null.
|
|
18
18
|
*/
|
|
19
|
-
getFirstChild(
|
|
19
|
+
getFirstChild(_current: Icon): IFocusableNode | null;
|
|
20
20
|
/**
|
|
21
21
|
* Returns the parent of the given icon.
|
|
22
22
|
*
|
|
@@ -38,6 +38,13 @@ export declare class IconNavigationPolicy implements INavigationPolicy<Icon> {
|
|
|
38
38
|
* @returns The icon's previous icon, if any.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(current: Icon): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given icon.
|
|
43
|
+
*
|
|
44
|
+
* @param current The icon to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given icon.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: Icon): string;
|
|
41
48
|
/**
|
|
42
49
|
* Returns whether or not the given icon can be navigated to.
|
|
43
50
|
*
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
7
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
8
|
+
import { type IToolboxItem } from '../../interfaces/i_toolbox_item.js';
|
|
9
|
+
/**
|
|
10
|
+
* Set of rules controlling keyboard navigation from a toolbox item.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ToolboxItemNavigationPolicy implements INavigationPolicy<IToolboxItem> {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the first child of the given toolbox item.
|
|
15
|
+
*
|
|
16
|
+
* @param current The toolbox item to return the first child of.
|
|
17
|
+
* @returns The child item of a collapsible toolbox item, otherwise null.
|
|
18
|
+
*/
|
|
19
|
+
getFirstChild(current: IToolboxItem): IFocusableNode | null;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the parent of the given toolbox item.
|
|
22
|
+
*
|
|
23
|
+
* @param current The toolbox item to return the parent of.
|
|
24
|
+
* @returns The parent toolbox item of the given toolbox item, if any.
|
|
25
|
+
*/
|
|
26
|
+
getParent(current: IToolboxItem): IFocusableNode | null;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the next sibling of the given toolbox item.
|
|
29
|
+
*
|
|
30
|
+
* @param current The toolbox item to return the next sibling of.
|
|
31
|
+
* @returns The next toolbox item, or null.
|
|
32
|
+
*/
|
|
33
|
+
getNextSibling(current: IToolboxItem): IFocusableNode | null;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the previous sibling of the given toolbox item.
|
|
36
|
+
*
|
|
37
|
+
* @param current The toolbox item to return the previous sibling of.
|
|
38
|
+
* @returns The previous toolbox item, or null.
|
|
39
|
+
*/
|
|
40
|
+
getPreviousSibling(current: IToolboxItem): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given toolbox item.
|
|
43
|
+
*
|
|
44
|
+
* @param current The toolbox item to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given toolbox item.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: IToolboxItem): string;
|
|
48
|
+
/**
|
|
49
|
+
* Returns whether or not the given toolbox item can be navigated to.
|
|
50
|
+
*
|
|
51
|
+
* @param current The instance to check for navigability.
|
|
52
|
+
* @returns True if the given toolbox item can be focused.
|
|
53
|
+
*/
|
|
54
|
+
isNavigable(current: IToolboxItem): boolean;
|
|
55
|
+
private allParentsExpanded;
|
|
56
|
+
/**
|
|
57
|
+
* Returns whether the given object can be navigated from by this policy.
|
|
58
|
+
*
|
|
59
|
+
* @param current The object to check if this policy applies to.
|
|
60
|
+
* @returns True if the object is an IToolboxItem.
|
|
61
|
+
*/
|
|
62
|
+
isApplicable(current: any): current is IToolboxItem;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=toolbox_item_navigation_policy.d.ts.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { RenderedWorkspaceComment } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { RenderedWorkspaceComment } from '../../comments/rendered_workspace_comment.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from an RenderedWorkspaceComment.
|
|
11
11
|
*/
|
|
@@ -27,17 +27,22 @@ export declare class WorkspaceCommentNavigationPolicy implements INavigationPoli
|
|
|
27
27
|
/**
|
|
28
28
|
* Returns the next peer node of the given workspace comment.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
31
|
-
* @returns The next workspace comment or block stack, if any.
|
|
30
|
+
* @returns Null, as workspace comments do not have peers.
|
|
32
31
|
*/
|
|
33
|
-
getNextSibling(
|
|
32
|
+
getNextSibling(): IFocusableNode | null;
|
|
34
33
|
/**
|
|
35
34
|
* Returns the previous peer node of the given workspace comment.
|
|
36
35
|
*
|
|
37
|
-
* @
|
|
38
|
-
* @returns The previous workspace comment or block stack, if any.
|
|
36
|
+
* @returns Null, as workspace comments do not have peers.
|
|
39
37
|
*/
|
|
40
|
-
getPreviousSibling(
|
|
38
|
+
getPreviousSibling(): IFocusableNode | null;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the row ID of the given workspace comment.
|
|
41
|
+
*
|
|
42
|
+
* @param current The workspace comment to retrieve the row ID of.
|
|
43
|
+
* @returns The row ID of the given workspace comment.
|
|
44
|
+
*/
|
|
45
|
+
getRowId(current: RenderedWorkspaceComment): string;
|
|
41
46
|
/**
|
|
42
47
|
* Returns whether or not the given workspace comment can be navigated to.
|
|
43
48
|
*
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { IFocusableNode } from '
|
|
7
|
-
import type { INavigationPolicy } from '
|
|
8
|
-
import { WorkspaceSvg } from '
|
|
6
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
7
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
8
|
+
import { WorkspaceSvg } from '../../workspace_svg.js';
|
|
9
9
|
/**
|
|
10
10
|
* Set of rules controlling keyboard navigation from a workspace.
|
|
11
11
|
*/
|
|
@@ -38,6 +38,13 @@ export declare class WorkspaceNavigationPolicy implements INavigationPolicy<Work
|
|
|
38
38
|
* @returns Null.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(_current: WorkspaceSvg): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given workspace.
|
|
43
|
+
*
|
|
44
|
+
* @param current The workspace to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given workspace.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: WorkspaceSvg): string;
|
|
41
48
|
/**
|
|
42
49
|
* Returns whether or not the given workspace can be navigated to.
|
|
43
50
|
*
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { IFlyout } from '../../interfaces/i_flyout.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import { Navigator } from './navigator.js';
|
|
9
|
+
/**
|
|
10
|
+
* Navigator that handles keyboard navigation within a flyout.
|
|
11
|
+
*/
|
|
12
|
+
export declare class FlyoutNavigator extends Navigator {
|
|
13
|
+
protected flyout: IFlyout;
|
|
14
|
+
constructor(flyout: IFlyout);
|
|
15
|
+
/**
|
|
16
|
+
* Returns the parent toolbox item or previous flyout item when navigating out
|
|
17
|
+
* (left arrow) from a flyout.
|
|
18
|
+
*
|
|
19
|
+
* @param node The flyout item to navigate relative to.
|
|
20
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
21
|
+
* flyout's layout; false (default) to take it into account.
|
|
22
|
+
*/
|
|
23
|
+
getOutNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the parent toolbox item or next flyout item when navigating in
|
|
26
|
+
* (right arrow) from a flyout.
|
|
27
|
+
*
|
|
28
|
+
* @param node The flyout item to navigate relative to.
|
|
29
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
30
|
+
* flyout's layout; false (default) to take it into account.
|
|
31
|
+
*/
|
|
32
|
+
getInNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the parent toolbox item or next flyout item when navigating next
|
|
35
|
+
* (down arrow) from a flyout.
|
|
36
|
+
*
|
|
37
|
+
* @param node The flyout item to navigate relative to.
|
|
38
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
39
|
+
* flyout's layout; false (default) to take it into account.
|
|
40
|
+
*/
|
|
41
|
+
getNextNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the parent toolbox item or previous flyout item when navigating
|
|
44
|
+
* previous (up arrow) from a flyout.
|
|
45
|
+
*
|
|
46
|
+
* @param node The flyout item to navigate relative to.
|
|
47
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
48
|
+
* flyout's layout; false (default) to take it into account.
|
|
49
|
+
*/
|
|
50
|
+
getPreviousNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
51
|
+
/**
|
|
52
|
+
* Returns a list of top-level navigable flyout items.
|
|
53
|
+
*/
|
|
54
|
+
protected getTopLevelItems(): IFocusableNode[];
|
|
55
|
+
/**
|
|
56
|
+
* Returns whether or not the given node is navigable.
|
|
57
|
+
*
|
|
58
|
+
* @param node A focusable node to check the navigability of.
|
|
59
|
+
* @returns True if the node is navigable, otherwise false.
|
|
60
|
+
*/
|
|
61
|
+
protected isNavigable(node: IFocusableNode): boolean | undefined;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=flyout_navigator.d.ts.map
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { BlockSvg } from '../../block_svg.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
|
+
type RuleList<T> = INavigationPolicy<T>[];
|
|
10
|
+
/**
|
|
11
|
+
* Representation of the direction of travel within a navigation context.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum NavigationDirection {
|
|
14
|
+
NEXT = 0,
|
|
15
|
+
PREVIOUS = 1,
|
|
16
|
+
IN = 2,
|
|
17
|
+
OUT = 3
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Class responsible for determining where focus should move in response to
|
|
21
|
+
* keyboard navigation commands.
|
|
22
|
+
*/
|
|
23
|
+
export declare class Navigator {
|
|
24
|
+
/**
|
|
25
|
+
* Map from classes to a corresponding ruleset to handle navigation from
|
|
26
|
+
* instances of that class.
|
|
27
|
+
*/
|
|
28
|
+
protected rules: RuleList<any>;
|
|
29
|
+
/** Whether or not navigation loops around when reaching the end. */
|
|
30
|
+
protected navigationLoops: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Adds a navigation ruleset to this Navigator.
|
|
33
|
+
*
|
|
34
|
+
* @param policy A ruleset that determines where focus should move starting
|
|
35
|
+
* from an instance of its managed class.
|
|
36
|
+
*/
|
|
37
|
+
addNavigationPolicy(policy: INavigationPolicy<any>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the navigation ruleset associated with the given object instance's
|
|
40
|
+
* class.
|
|
41
|
+
*
|
|
42
|
+
* @param current An object to retrieve a navigation ruleset for.
|
|
43
|
+
* @returns The navigation ruleset of objects of the given object's class, or
|
|
44
|
+
* undefined if no ruleset has been registered for the object's class.
|
|
45
|
+
*/
|
|
46
|
+
private get;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the first child of the given object instance, if any.
|
|
49
|
+
*
|
|
50
|
+
* @param current The object to retrieve the first child of.
|
|
51
|
+
* @returns The first child node of the given object, if any.
|
|
52
|
+
*/
|
|
53
|
+
getFirstChild(current: IFocusableNode): IFocusableNode | null;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the parent of the given object instance, if any.
|
|
56
|
+
*
|
|
57
|
+
* @param current The object to retrieve the parent of.
|
|
58
|
+
* @returns The parent node of the given object, if any.
|
|
59
|
+
*/
|
|
60
|
+
getParent(current: IFocusableNode): IFocusableNode | null;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the next sibling of the given object instance, if any.
|
|
63
|
+
*
|
|
64
|
+
* @param current The object to retrieve the next sibling node of.
|
|
65
|
+
* @returns The next sibling node of the given object, if any.
|
|
66
|
+
*/
|
|
67
|
+
getNextSibling(current: IFocusableNode): IFocusableNode | null;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the previous sibling of the given object instance, if any.
|
|
70
|
+
*
|
|
71
|
+
* @param current The object to retrieve the previous sibling node of.
|
|
72
|
+
* @returns The previous sibling node of the given object, if any.
|
|
73
|
+
*/
|
|
74
|
+
getPreviousSibling(current: IFocusableNode): IFocusableNode | null;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the previous node relative to the given node.
|
|
77
|
+
*
|
|
78
|
+
* @param node The node to navigate relative to, defaults to the currently
|
|
79
|
+
* focused node.
|
|
80
|
+
* @returns The previous node, generally on the "row" visually above the
|
|
81
|
+
* specified node, or null if there is none.
|
|
82
|
+
*/
|
|
83
|
+
getPreviousNode(node?: IFocusableNode | null): IFocusableNode | null;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the node to the left of the given node.
|
|
86
|
+
*
|
|
87
|
+
* @param node The node to navigate relative to, defaults to the currently
|
|
88
|
+
* focused node.
|
|
89
|
+
* @returns The node to the left of the given node, within the same visual
|
|
90
|
+
* "row" as the given node, or null if there is none.
|
|
91
|
+
*/
|
|
92
|
+
getOutNode(node?: IFocusableNode | null): IFocusableNode | null;
|
|
93
|
+
/**
|
|
94
|
+
* Returns next node relative to the given node.
|
|
95
|
+
*
|
|
96
|
+
* @param node The node to navigate relative to, defaults to the currently
|
|
97
|
+
* focused node.
|
|
98
|
+
* @returns The next node, generally on the "row" visually below the
|
|
99
|
+
* specified node, or null if there is none.
|
|
100
|
+
*/
|
|
101
|
+
getNextNode(node?: IFocusableNode | null): IFocusableNode | null;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the node to the right of the given node.
|
|
104
|
+
*
|
|
105
|
+
* @param node The node to navigate relative to, defaults to the currently
|
|
106
|
+
* focused node.
|
|
107
|
+
* @returns The node to the right of the given node, within the same visual
|
|
108
|
+
* "row" as the given node, or null if there is none.
|
|
109
|
+
*/
|
|
110
|
+
getInNode(node?: IFocusableNode | null): IFocusableNode | null;
|
|
111
|
+
/**
|
|
112
|
+
* Returns the previous sibling/parent node relative to the given node.
|
|
113
|
+
*
|
|
114
|
+
* @param startNode The node that navigation is starting from.
|
|
115
|
+
* @param node The node to navigate relative to.
|
|
116
|
+
* @param direction The direction to navigate, either OUT or PREVIOUS.
|
|
117
|
+
* @param visitedNodes Set of already-visited nodes used to avoid cycles,
|
|
118
|
+
* should not be specified by the caller.
|
|
119
|
+
* @returns The previous sibling/parent node, or null if there is none or a
|
|
120
|
+
* node was not provided.
|
|
121
|
+
*/
|
|
122
|
+
private getPreviousNodeImpl;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the next sibling/child node relative to the given node.
|
|
125
|
+
*
|
|
126
|
+
* @param startNode The node that navigation is starting from.
|
|
127
|
+
* @param node The node to navigate relative to.
|
|
128
|
+
* @param direction The direction to navigate, either IN or NEXT.
|
|
129
|
+
* @param visitedNodes Set of already-visited nodes used to avoid cycles,
|
|
130
|
+
* should not be specified by the caller.
|
|
131
|
+
* @returns The next sibling/child node, or null if there is none or a
|
|
132
|
+
* node was not provided.
|
|
133
|
+
*/
|
|
134
|
+
private getNextNodeImpl;
|
|
135
|
+
private getRightMostChild;
|
|
136
|
+
/**
|
|
137
|
+
* Sets whether or not navigation should loop around when reaching the end
|
|
138
|
+
* of the workspace.
|
|
139
|
+
*
|
|
140
|
+
* @param loops True if navigation should loop around, otherwise false.
|
|
141
|
+
*/
|
|
142
|
+
setNavigationLoops(loops: boolean): void;
|
|
143
|
+
/**
|
|
144
|
+
* Returns whether or not navigation loops around when reaching the end of
|
|
145
|
+
* the workspace.
|
|
146
|
+
*/
|
|
147
|
+
getNavigationLoops(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Get the first navigable node on the workspace, or null if none exist.
|
|
150
|
+
*
|
|
151
|
+
* @returns The first navigable node on the workspace, or null.
|
|
152
|
+
*/
|
|
153
|
+
getFirstNode(): IFocusableNode | null;
|
|
154
|
+
/**
|
|
155
|
+
* Get the last navigable node on the workspace, or null if none exist.
|
|
156
|
+
*
|
|
157
|
+
* @returns The last navigable node on the workspace, or null.
|
|
158
|
+
*/
|
|
159
|
+
getLastNode(): IFocusableNode | null;
|
|
160
|
+
/**
|
|
161
|
+
* Determines whether navigation is allowed between two nodes.
|
|
162
|
+
*
|
|
163
|
+
* @param current The starting node for proposed navigation.
|
|
164
|
+
* @param candidate The proposed destination node.
|
|
165
|
+
* @param direction The direction in which the user is navigating.
|
|
166
|
+
* @returns True if navigation should be allowed to proceed, or false to find
|
|
167
|
+
* a different candidate.
|
|
168
|
+
*/
|
|
169
|
+
protected transitionAllowed(current: IFocusableNode, candidate: IFocusableNode, direction: NavigationDirection): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Returns the leftmost node in the same row as the given node.
|
|
172
|
+
*
|
|
173
|
+
* @param node The node to find the leftmost sibling of.
|
|
174
|
+
* @returns The leftmost sibling of the given node in the same row.
|
|
175
|
+
*/
|
|
176
|
+
private getLeftmostSibling;
|
|
177
|
+
/**
|
|
178
|
+
* Returns the last node in a stack of blocks or other top-level workspace
|
|
179
|
+
* entity.
|
|
180
|
+
*
|
|
181
|
+
* @param stackRoot A top-level item to get the last node of.
|
|
182
|
+
* @param stopIfFound A sentinel node that terminates traversal if
|
|
183
|
+
* encountered; typically the root node of the next stack.
|
|
184
|
+
* @returns The last node in the given stack.
|
|
185
|
+
*/
|
|
186
|
+
private getLastNodeInStack;
|
|
187
|
+
private getRowId;
|
|
188
|
+
/**
|
|
189
|
+
* Returns the next/previous stack relative to the given element's stack.
|
|
190
|
+
*
|
|
191
|
+
* @internal
|
|
192
|
+
* @param current The element whose stack will be navigated relative to.
|
|
193
|
+
* @param delta The difference in index to navigate; positive values navigate
|
|
194
|
+
* to the nth next stack, while negative values navigate to the nth
|
|
195
|
+
* previous stack.
|
|
196
|
+
* @returns The first element in the stack offset by `delta` relative to the
|
|
197
|
+
* current element's stack, or the last element in the stack offset by
|
|
198
|
+
* `delta` relative to the current element's stack when navigating backwards.
|
|
199
|
+
*/
|
|
200
|
+
navigateStacks(current: IFocusableNode, delta: number): IFocusableNode | null;
|
|
201
|
+
/**
|
|
202
|
+
* Returns a list of all top-level focusable items on the given node's
|
|
203
|
+
* focusable tree.
|
|
204
|
+
*
|
|
205
|
+
* @param current The node whose root focusable tree to retrieve the top-level
|
|
206
|
+
* items of.
|
|
207
|
+
* @returns A list of all top-level items on the given node's parent tree.
|
|
208
|
+
*/
|
|
209
|
+
protected getTopLevelItems(current: IFocusableNode): IFocusableNode[];
|
|
210
|
+
/**
|
|
211
|
+
* Returns whether or not the given node is navigable.
|
|
212
|
+
*
|
|
213
|
+
* @param node A focusable node to check the navigability of.
|
|
214
|
+
* @returns True if the node is navigable, otherwise false.
|
|
215
|
+
*/
|
|
216
|
+
protected isNavigable(node: IFocusableNode): boolean | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Returns the block that the given node is a child of.
|
|
219
|
+
*
|
|
220
|
+
* @returns The parent block of the node if any, otherwise null.
|
|
221
|
+
*/
|
|
222
|
+
getSourceBlockFromNode(node: IFocusableNode | null): BlockSvg | null;
|
|
223
|
+
}
|
|
224
|
+
export {};
|
|
225
|
+
//# sourceMappingURL=navigator.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
7
|
+
import type { IToolbox } from '../../interfaces/i_toolbox.js';
|
|
8
|
+
import { Position } from '../../utils/toolbox.js';
|
|
9
|
+
import type { WorkspaceSvg } from '../../workspace_svg.js';
|
|
10
|
+
import { Navigator } from './navigator.js';
|
|
11
|
+
/**
|
|
12
|
+
* Navigator that handles keyboard navigation within a toolbox.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ToolboxNavigator extends Navigator {
|
|
15
|
+
protected toolbox: IToolbox;
|
|
16
|
+
constructor(toolbox: IToolbox);
|
|
17
|
+
/**
|
|
18
|
+
* Returns the flyout's first item (if any) or next toolbox item when
|
|
19
|
+
* navigating in (right arrow) from a toolbox.
|
|
20
|
+
*
|
|
21
|
+
* @param node The toolbox item to navigate relative to.
|
|
22
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
23
|
+
* toolbox's layout; false (default) to take it into account.
|
|
24
|
+
*/
|
|
25
|
+
getInNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the flyout's first item (if any) or previous toolbox item when
|
|
28
|
+
* navigating out (left arrow) from a toolbox.
|
|
29
|
+
*
|
|
30
|
+
* @param node The toolbox item to navigate relative to.
|
|
31
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
32
|
+
* toolbox's layout; false (default) to take it into account.
|
|
33
|
+
*/
|
|
34
|
+
getOutNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the flyout's first item (if any) or next toolbox item when
|
|
37
|
+
* navigating next (down arrow) from a toolbox.
|
|
38
|
+
*
|
|
39
|
+
* @param node The toolbox item to navigate relative to.
|
|
40
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
41
|
+
* toolbox's layout; false (default) to take it into account.
|
|
42
|
+
*/
|
|
43
|
+
getNextNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the flyout's first item (if any) or previous toolbox item when
|
|
46
|
+
* navigating previous (up arrow) from a toolbox.
|
|
47
|
+
*
|
|
48
|
+
* @param node The toolbox item to navigate relative to.
|
|
49
|
+
* @param bypassAdjustments True to skip adjusting navigation based on the
|
|
50
|
+
* toolbox's layout; false (default) to take it into account.
|
|
51
|
+
*/
|
|
52
|
+
getPreviousNode(node?: IFocusableNode | null, bypassAdjustments?: boolean): IFocusableNode | null;
|
|
53
|
+
/**
|
|
54
|
+
* Returns a list of all toolbox items.
|
|
55
|
+
*/
|
|
56
|
+
protected getTopLevelItems(): IFocusableNode[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Although developers specify the toolbox position as "start" or "end", this
|
|
60
|
+
* gets normalized by the injection options parser based on RTL, such that "end"
|
|
61
|
+
* in RTL means the left. When dealing with arrow keys, we want the actual/
|
|
62
|
+
* physical position on screen, not the logical position. This function converts
|
|
63
|
+
* the stored logical position to the physical position.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
* @param workspace The workspace to use injection options from.
|
|
67
|
+
* @returns The physical location of the toolbox/flyout on screen.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getPhysicalToolboxPosition(workspace: WorkspaceSvg): Position;
|
|
70
|
+
//# sourceMappingURL=toolbox_navigator.d.ts.map
|
package/core/registry.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type { ISerializer } from './interfaces/i_serializer.js';
|
|
|
19
19
|
import type { IToolbox } from './interfaces/i_toolbox.js';
|
|
20
20
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
21
21
|
import type { IVariableModel, IVariableModelStatic, IVariableState } from './interfaces/i_variable_model.js';
|
|
22
|
-
import type { LineCursor } from './keyboard_nav/line_cursor.js';
|
|
23
22
|
import type { Options } from './options.js';
|
|
24
23
|
import type { Renderer } from './renderers/common/renderer.js';
|
|
25
24
|
import type { Theme } from './theme.js';
|
|
@@ -50,7 +49,6 @@ export declare class Type<_T> {
|
|
|
50
49
|
toString(): string;
|
|
51
50
|
static CONNECTION_CHECKER: Type<IConnectionChecker>;
|
|
52
51
|
static CONNECTION_PREVIEWER: Type<IConnectionPreviewer>;
|
|
53
|
-
static CURSOR: Type<LineCursor>;
|
|
54
52
|
static EVENT: Type<Abstract>;
|
|
55
53
|
static FIELD: Type<Field<any>>;
|
|
56
54
|
static INPUT: Type<Input>;
|
|
@@ -244,8 +244,6 @@ export declare class ConstantProvider {
|
|
|
244
244
|
* The <filter> element to use for a debug highlight, or null if not set.
|
|
245
245
|
*/
|
|
246
246
|
private debugFilter;
|
|
247
|
-
/** The <style> element to use for injecting renderer specific CSS. */
|
|
248
|
-
private cssNode;
|
|
249
247
|
/**
|
|
250
248
|
* Cursor colour.
|
|
251
249
|
*/
|
|
@@ -422,7 +420,6 @@ export declare class ConstantProvider {
|
|
|
422
420
|
* Create any DOM elements that this renderer needs (filters, patterns, etc).
|
|
423
421
|
*
|
|
424
422
|
* @param svg The root of the workspace's SVG.
|
|
425
|
-
* @param tagName The name to use for the CSS style tag.
|
|
426
423
|
* @param selector The CSS selector to use.
|
|
427
424
|
* @param injectionDivIfIsParent The div containing the parent workspace and
|
|
428
425
|
* all related workspaces and block containers, if this renderer is for the
|
|
@@ -430,7 +427,7 @@ export declare class ConstantProvider {
|
|
|
430
427
|
* to this container. Child workspaces should not override the CSS variables
|
|
431
428
|
* created by the parent and thus do not need access to the injection div.
|
|
432
429
|
*/
|
|
433
|
-
createDom(svg: SVGElement,
|
|
430
|
+
createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
|
|
434
431
|
/**
|
|
435
432
|
* Create a filter for highlighting the currently rendering block during
|
|
436
433
|
* render debugging.
|
|
@@ -439,10 +436,10 @@ export declare class ConstantProvider {
|
|
|
439
436
|
/**
|
|
440
437
|
* Inject renderer specific CSS into the page.
|
|
441
438
|
*
|
|
442
|
-
* @param
|
|
443
|
-
* @param selector The CSS selector to
|
|
439
|
+
* @param root The document root to inject the CSS into.
|
|
440
|
+
* @param selector The CSS selector to interpolate into the stylesheet.
|
|
444
441
|
*/
|
|
445
|
-
protected injectCSS_(
|
|
442
|
+
protected injectCSS_(root: Document | ShadowRoot, selector: string): void;
|
|
446
443
|
/**
|
|
447
444
|
* Get any renderer specific CSS to inject when the renderer is initialized.
|
|
448
445
|
*
|