@cp949/phyx-blockly 12.5.1-p1 → 13.4.0-patch.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/README.md +7 -2
- package/blockly.min.js +2280 -2126
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +1767 -1794
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +151 -177
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +41 -19
- package/core/block_aria_composer.d.ts +158 -0
- package/core/block_svg.d.ts +88 -35
- package/core/blockly.d.ts +22 -22
- package/core/bubbles/bubble.d.ts +59 -5
- package/core/bubbles/mini_workspace_bubble.d.ts +11 -3
- package/core/bubbles/text_bubble.d.ts +7 -4
- package/core/bubbles/textinput_bubble.d.ts +11 -1
- package/core/clipboard/block_paster.d.ts +5 -5
- package/core/clipboard/registry.d.ts +1 -1
- package/core/clipboard/workspace_comment_paster.d.ts +4 -4
- package/core/clipboard.d.ts +1 -1
- package/core/comments/collapse_comment_bar_button.d.ts +7 -4
- package/core/comments/comment_bar_button.d.ts +15 -1
- package/core/comments/comment_editor.d.ts +21 -6
- package/core/comments/comment_view.d.ts +5 -5
- package/core/comments/delete_comment_bar_button.d.ts +7 -4
- package/core/comments/rendered_workspace_comment.d.ts +17 -12
- package/core/comments/workspace_comment.d.ts +2 -2
- package/core/common.d.ts +10 -3
- package/core/component_manager.d.ts +2 -0
- package/core/config.d.ts +37 -11
- package/core/connection_db.d.ts +40 -0
- package/core/contextmenu_registry.d.ts +12 -2
- package/core/css.d.ts +2 -1
- package/core/dragging/block_drag_strategy.d.ts +196 -19
- 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 +14 -14
- package/core/events/events_block_base.d.ts +2 -1
- package/core/events/events_block_change.d.ts +3 -2
- package/core/events/events_block_create.d.ts +3 -5
- package/core/events/events_block_delete.d.ts +3 -5
- package/core/events/events_block_drag.d.ts +2 -2
- package/core/events/events_block_field_intermediate_change.d.ts +3 -2
- package/core/events/events_block_move.d.ts +2 -1
- package/core/events/events_click.d.ts +2 -2
- package/core/events/events_comment_base.d.ts +2 -1
- package/core/events/events_comment_change.d.ts +2 -1
- package/core/events/events_comment_collapse.d.ts +3 -2
- package/core/events/events_comment_create.d.ts +2 -4
- package/core/events/events_comment_delete.d.ts +2 -4
- package/core/events/events_comment_drag.d.ts +2 -2
- package/core/events/events_comment_move.d.ts +2 -1
- package/core/events/events_comment_resize.d.ts +2 -1
- package/core/events/events_selected.d.ts +1 -1
- package/core/events/events_theme_change.d.ts +1 -1
- package/core/events/events_toolbox_item_select.d.ts +1 -1
- package/core/events/events_trashcan_open.d.ts +1 -1
- package/core/events/events_var_base.d.ts +2 -1
- package/core/events/events_var_create.d.ts +2 -1
- package/core/events/events_var_delete.d.ts +2 -1
- package/core/events/events_var_rename.d.ts +2 -1
- package/core/events/events_var_type_change.d.ts +2 -1
- package/core/events/events_viewport.d.ts +1 -1
- package/core/field.d.ts +120 -13
- package/core/field_checkbox.d.ts +31 -4
- package/core/field_dropdown.d.ts +68 -4
- package/core/field_image.d.ts +54 -2
- package/core/field_input.d.ts +38 -13
- package/core/field_label.d.ts +31 -2
- package/core/field_label_serializable.d.ts +3 -2
- package/core/field_number.d.ts +14 -3
- package/core/field_textinput.d.ts +15 -5
- package/core/field_variable.d.ts +16 -6
- package/core/flyout_base.d.ts +12 -126
- package/core/flyout_button.d.ts +11 -0
- package/core/flyout_horizontal.d.ts +0 -11
- package/core/flyout_metrics_manager.d.ts +2 -1
- package/core/flyout_vertical.d.ts +0 -11
- package/core/focus_manager.d.ts +52 -2
- package/core/generator.d.ts +2 -2
- package/core/gesture.d.ts +2 -21
- package/core/grid.d.ts +2 -2
- package/core/hints.d.ts +78 -0
- package/core/icons/comment_icon.d.ts +8 -0
- package/core/icons/icon.d.ts +20 -0
- package/core/icons/icon_types.d.ts +4 -4
- package/core/icons/mutator_icon.d.ts +8 -0
- package/core/icons/registry.d.ts +1 -1
- package/core/icons/warning_icon.d.ts +8 -0
- package/core/inputs/input.d.ts +58 -2
- package/core/insertion_marker.d.ts +54 -0
- package/core/insertion_marker_previewer.d.ts +20 -4
- 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_comment_icon.d.ts +6 -6
- package/core/interfaces/i_drag_target.d.ts +2 -2
- 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_flyout_inflater.d.ts +9 -0
- package/core/interfaces/i_focusable_node.d.ts +8 -0
- package/core/interfaces/i_focusable_tree.d.ts +8 -0
- package/core/interfaces/i_icon.d.ts +1 -1
- package/core/interfaces/i_json_block_definition.d.ts +113 -0
- package/core/interfaces/i_keyboard_accessible.d.ts +1 -1
- package/core/interfaces/i_navigation_policy.d.ts +12 -0
- package/core/interfaces/i_parameter_model.d.ts +2 -2
- package/core/interfaces/i_paster.d.ts +3 -3
- package/core/interfaces/i_procedure_block.d.ts +1 -1
- package/core/interfaces/i_procedure_map.d.ts +1 -1
- package/core/interfaces/i_procedure_model.d.ts +2 -2
- package/core/interfaces/i_selectable.d.ts +3 -3
- 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/interfaces/i_variable_backed_parameter_model.d.ts +1 -1
- package/core/keyboard_nav/keyboard_mover.d.ts +151 -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 +237 -0
- package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
- package/core/keyboard_navigation_controller.d.ts +12 -0
- package/core/layer_manager.d.ts +3 -3
- package/core/menu.d.ts +3 -0
- package/core/menuitem.d.ts +8 -1
- package/core/observable_procedure_map.d.ts +1 -1
- package/core/options.d.ts +4 -4
- package/core/procedures.d.ts +5 -8
- package/core/registry.d.ts +0 -2
- package/core/render_management.d.ts +1 -1
- package/core/rendered_connection.d.ts +33 -6
- package/core/renderers/common/constants.d.ts +4 -7
- package/core/renderers/common/i_path_object.d.ts +8 -0
- package/core/renderers/common/info.d.ts +1 -1
- package/core/renderers/common/path_object.d.ts +7 -16
- package/core/renderers/common/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +1 -14
- package/core/renderers/zelos/drawer.d.ts +1 -1
- package/core/renderers/zelos/info.d.ts +10 -1
- 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/serialization/procedures.d.ts +2 -2
- package/core/serialization/workspace_comments.d.ts +2 -2
- package/core/shortcut_items.d.ts +167 -2
- package/core/shortcut_registry.d.ts +9 -3
- package/core/theme.d.ts +0 -2
- package/core/toast.d.ts +2 -11
- package/core/toolbox/category.d.ts +11 -0
- package/core/toolbox/collapsible_category.d.ts +2 -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/tooltip.d.ts +13 -2
- package/core/trashcan.d.ts +16 -38
- package/core/utils/aria.d.ts +259 -28
- package/core/utils/dom.d.ts +1 -1
- package/core/utils/focusable_tree_traverser.d.ts +2 -2
- package/core/utils/shortcut_formatting.d.ts +22 -0
- package/core/utils/style.d.ts +14 -0
- package/core/utils/toolbox.d.ts +0 -8
- package/core/utils/useragent.d.ts +1 -0
- package/core/variable_map.d.ts +1 -41
- package/core/variable_model.d.ts +1 -7
- package/core/variables.d.ts +7 -8
- package/core/variables_dynamic.d.ts +4 -6
- package/core/workspace.d.ts +7 -85
- package/core/workspace_audio.d.ts +36 -7
- package/core/workspace_focus_target.d.ts +51 -0
- package/core/workspace_svg.d.ts +79 -60
- package/core/xml.d.ts +1 -1
- package/core/zoom_controls.d.ts +6 -59
- package/dart_compressed.js +123 -164
- package/dart_compressed.js.map +1 -1
- package/index.mjs +13 -5
- package/javascript_compressed.js +96 -147
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +142 -178
- package/lua_compressed.js.map +1 -1
- package/media/drop.mp3 +0 -0
- package/msg/ab.js +265 -7
- package/msg/ab.mjs +259 -1
- package/msg/ace.js +266 -8
- package/msg/ace.mjs +259 -1
- package/msg/af.js +265 -7
- package/msg/af.mjs +259 -1
- package/msg/am.js +266 -8
- package/msg/am.mjs +259 -1
- package/msg/ar.js +283 -25
- package/msg/ar.mjs +259 -1
- package/msg/ast.js +266 -8
- package/msg/ast.mjs +259 -1
- package/msg/az.js +266 -8
- package/msg/az.mjs +259 -1
- package/msg/ba.js +265 -7
- package/msg/ba.mjs +259 -1
- package/msg/bcc.js +265 -7
- package/msg/bcc.mjs +259 -1
- package/msg/be-tarask.js +297 -39
- package/msg/be-tarask.mjs +259 -1
- package/msg/be.js +266 -8
- package/msg/be.mjs +259 -1
- package/msg/bg.js +282 -24
- package/msg/bg.mjs +259 -1
- package/msg/bn.js +266 -8
- package/msg/bn.mjs +259 -1
- package/msg/br.js +266 -8
- package/msg/br.mjs +259 -1
- package/msg/bs.js +265 -7
- package/msg/bs.mjs +259 -1
- package/msg/ca.js +265 -7
- package/msg/ca.mjs +259 -1
- package/msg/ce.js +265 -7
- package/msg/ce.mjs +259 -1
- package/msg/cs.js +290 -32
- package/msg/cs.mjs +259 -1
- package/msg/csb.js +723 -0
- package/msg/csb.mjs +704 -0
- package/msg/da.js +284 -26
- package/msg/da.mjs +259 -1
- package/msg/de.js +265 -7
- package/msg/de.mjs +259 -1
- package/msg/diq.js +267 -9
- package/msg/diq.mjs +259 -1
- package/msg/dtp.js +265 -7
- package/msg/dtp.mjs +259 -1
- package/msg/dty.js +265 -7
- package/msg/dty.mjs +259 -1
- package/msg/ee.js +265 -7
- package/msg/ee.mjs +259 -1
- package/msg/el.js +290 -32
- package/msg/el.mjs +259 -1
- package/msg/en-gb.js +266 -8
- package/msg/en-gb.mjs +259 -1
- package/msg/en.js +266 -8
- package/msg/en.mjs +259 -1
- package/msg/eo.js +265 -7
- package/msg/eo.mjs +259 -1
- package/msg/es.js +282 -24
- package/msg/es.mjs +259 -1
- package/msg/et.js +265 -7
- package/msg/et.mjs +259 -1
- package/msg/eu.js +265 -7
- package/msg/eu.mjs +259 -1
- package/msg/fa.js +266 -8
- package/msg/fa.mjs +259 -1
- package/msg/fi.js +284 -26
- package/msg/fi.mjs +259 -1
- package/msg/fo.js +265 -7
- package/msg/fo.mjs +259 -1
- package/msg/fr.js +283 -25
- package/msg/fr.mjs +259 -1
- package/msg/frr.js +266 -8
- package/msg/frr.mjs +259 -1
- package/msg/ga.js +723 -0
- package/msg/{cdo.mjs → ga.mjs} +261 -3
- package/msg/gl.js +290 -32
- package/msg/gl.mjs +259 -1
- package/msg/gn.js +266 -8
- package/msg/gn.mjs +259 -1
- package/msg/gor.js +265 -7
- package/msg/gor.mjs +259 -1
- package/msg/ha.js +265 -7
- package/msg/ha.mjs +259 -1
- package/msg/he.js +313 -55
- package/msg/he.mjs +259 -1
- package/msg/hi.js +265 -7
- package/msg/hi.mjs +259 -1
- package/msg/hr.js +265 -7
- package/msg/hr.mjs +259 -1
- package/msg/hrx.js +265 -7
- package/msg/hrx.mjs +259 -1
- package/msg/hsb.js +265 -7
- package/msg/hsb.mjs +259 -1
- package/msg/hu.js +270 -12
- package/msg/hu.mjs +259 -1
- package/msg/hy.js +265 -7
- package/msg/hy.mjs +259 -1
- package/msg/ia.js +304 -46
- package/msg/ia.mjs +259 -1
- package/msg/id.js +489 -231
- package/msg/id.mjs +259 -1
- package/msg/ig.js +270 -12
- package/msg/ig.mjs +259 -1
- package/msg/inh.js +265 -7
- package/msg/inh.mjs +259 -1
- package/msg/is.js +265 -7
- package/msg/is.mjs +259 -1
- package/msg/it.js +289 -31
- package/msg/it.mjs +259 -1
- package/msg/ja.js +314 -56
- package/msg/ja.mjs +259 -1
- package/msg/ka.js +267 -9
- package/msg/ka.mjs +259 -1
- package/msg/kab.js +273 -15
- package/msg/kab.mjs +259 -1
- package/msg/kbd-cyrl.js +266 -8
- package/msg/kbd-cyrl.mjs +259 -1
- package/msg/km.js +265 -7
- package/msg/km.mjs +259 -1
- package/msg/kn.js +273 -15
- package/msg/kn.mjs +259 -1
- package/msg/ko.js +398 -140
- package/msg/ko.mjs +259 -1
- package/msg/krc.js +723 -0
- package/msg/krc.mjs +704 -0
- package/msg/ksh.js +266 -8
- package/msg/ksh.mjs +259 -1
- package/msg/ku-latn.js +266 -8
- package/msg/ku-latn.mjs +259 -1
- package/msg/ky.js +325 -67
- package/msg/ky.mjs +259 -1
- package/msg/la.js +266 -8
- package/msg/la.mjs +259 -1
- package/msg/lb.js +279 -21
- package/msg/lb.mjs +259 -1
- package/msg/lki.js +265 -7
- package/msg/lki.mjs +259 -1
- package/msg/lo.js +265 -7
- package/msg/lo.mjs +259 -1
- package/msg/lrc.js +265 -7
- package/msg/lrc.mjs +259 -1
- package/msg/lt.js +266 -8
- package/msg/lt.mjs +259 -1
- package/msg/lv.js +276 -18
- package/msg/lv.mjs +259 -1
- package/msg/mg.js +265 -7
- package/msg/mg.mjs +259 -1
- package/msg/mk.js +265 -7
- package/msg/mk.mjs +259 -1
- package/msg/ml.js +265 -7
- package/msg/ml.mjs +259 -1
- package/msg/mnw.js +265 -7
- package/msg/mnw.mjs +259 -1
- package/msg/ms.js +274 -16
- package/msg/ms.mjs +259 -1
- package/msg/mt.js +723 -0
- package/msg/{hak.mjs → mt.mjs} +261 -3
- package/msg/my.js +265 -7
- package/msg/my.mjs +259 -1
- package/msg/mzn.js +266 -8
- package/msg/mzn.mjs +259 -1
- package/msg/nb.js +265 -7
- package/msg/nb.mjs +259 -1
- package/msg/ne.js +275 -17
- package/msg/ne.mjs +259 -1
- package/msg/nl.js +336 -78
- package/msg/nl.mjs +259 -1
- package/msg/oc.js +265 -7
- package/msg/oc.mjs +259 -1
- package/msg/olo.js +266 -8
- package/msg/olo.mjs +259 -1
- package/msg/pa.js +273 -15
- package/msg/pa.mjs +259 -1
- package/msg/pl.js +282 -24
- package/msg/pl.mjs +259 -1
- package/msg/pms.js +283 -25
- package/msg/pms.mjs +259 -1
- package/msg/ps.js +296 -38
- package/msg/ps.mjs +259 -1
- package/msg/pt-br.js +282 -24
- package/msg/pt-br.mjs +259 -1
- package/msg/pt.js +282 -24
- package/msg/pt.mjs +259 -1
- package/msg/ro.js +299 -41
- package/msg/ro.mjs +259 -1
- package/msg/ru.js +283 -25
- package/msg/ru.mjs +259 -1
- package/msg/sc.js +265 -7
- package/msg/sc.mjs +259 -1
- package/msg/sco.js +266 -8
- package/msg/sco.mjs +259 -1
- package/msg/sd.js +265 -7
- package/msg/sd.mjs +259 -1
- package/msg/shn.js +265 -7
- package/msg/shn.mjs +259 -1
- package/msg/si.js +266 -8
- package/msg/si.mjs +259 -1
- package/msg/sk.js +283 -25
- package/msg/sk.mjs +259 -1
- package/msg/skr-arab.js +268 -10
- package/msg/skr-arab.mjs +259 -1
- package/msg/sl.js +283 -25
- package/msg/sl.mjs +259 -1
- package/msg/smn.js +267 -9
- package/msg/smn.mjs +259 -1
- package/msg/sq.js +273 -15
- package/msg/sq.mjs +259 -1
- package/msg/sr-latn.js +265 -7
- package/msg/sr-latn.mjs +259 -1
- package/msg/sr.js +266 -8
- package/msg/sr.mjs +259 -1
- package/msg/sv.js +282 -24
- package/msg/sv.mjs +259 -1
- package/msg/sw.js +266 -8
- package/msg/sw.mjs +259 -1
- package/msg/ta.js +283 -25
- package/msg/ta.mjs +259 -1
- package/msg/tcy.js +328 -70
- package/msg/tcy.mjs +259 -1
- package/msg/tdd.js +265 -7
- package/msg/tdd.mjs +259 -1
- package/msg/te.js +265 -7
- package/msg/te.mjs +259 -1
- package/msg/th.js +266 -8
- package/msg/th.mjs +259 -1
- package/msg/ti.js +265 -7
- package/msg/ti.mjs +259 -1
- package/msg/tl.js +265 -7
- package/msg/tl.mjs +259 -1
- package/msg/tlh.js +265 -7
- package/msg/tlh.mjs +259 -1
- package/msg/tr.js +284 -26
- package/msg/tr.mjs +259 -1
- package/msg/ug-arab.js +265 -7
- package/msg/ug-arab.mjs +259 -1
- package/msg/uk.js +291 -33
- package/msg/uk.mjs +259 -1
- package/msg/ur.js +265 -7
- package/msg/ur.mjs +259 -1
- package/msg/uz.js +298 -40
- package/msg/uz.mjs +259 -1
- package/msg/vi.js +284 -26
- package/msg/vi.mjs +259 -1
- package/msg/xmf.js +265 -7
- package/msg/xmf.mjs +259 -1
- package/msg/yo.js +265 -7
- package/msg/yo.mjs +259 -1
- package/msg/zgh.js +265 -7
- package/msg/zgh.mjs +259 -1
- package/msg/zh-hans.js +283 -25
- package/msg/zh-hans.mjs +259 -1
- package/msg/zh-hant.js +283 -25
- package/msg/zh-hant.mjs +259 -1
- package/package.json +53 -57
- package/php_compressed.js +150 -192
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +85 -126
- 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/msg/cdo.js +0 -465
- package/msg/hak.js +0 -465
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { IDraggable } from '../interfaces/i_draggable.js';
|
|
2
|
+
/**
|
|
3
|
+
* Cardinal directions in which a move can proceed.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum Direction {
|
|
6
|
+
NONE = 0,
|
|
7
|
+
UP = 1,
|
|
8
|
+
DOWN = 2,
|
|
9
|
+
LEFT = 3,
|
|
10
|
+
RIGHT = 4
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Class responsible for coordinating keyboard-driven moves with the workspace
|
|
14
|
+
* and dragging system.
|
|
15
|
+
*/
|
|
16
|
+
export declare class KeyboardMover {
|
|
17
|
+
/**
|
|
18
|
+
* Object responsible for dragging workspace elements in response to move
|
|
19
|
+
* commands.
|
|
20
|
+
*/
|
|
21
|
+
private dragger?;
|
|
22
|
+
/**
|
|
23
|
+
* The object that is currently being moved.
|
|
24
|
+
*/
|
|
25
|
+
private draggable?;
|
|
26
|
+
/**
|
|
27
|
+
* Workspace coordinate that the current move started from.
|
|
28
|
+
*/
|
|
29
|
+
private startLocation?;
|
|
30
|
+
/**
|
|
31
|
+
* The total distance, in workspace coordinates, that the element being moved
|
|
32
|
+
* has been moved since the movement process started.
|
|
33
|
+
*/
|
|
34
|
+
private totalDelta;
|
|
35
|
+
/**
|
|
36
|
+
* The distance to move an item in workspace coordinates.
|
|
37
|
+
*/
|
|
38
|
+
private stepDistance;
|
|
39
|
+
/**
|
|
40
|
+
* Symbol attached to the item being moved to indicate it is in move mode.
|
|
41
|
+
*/
|
|
42
|
+
private moveIndicator?;
|
|
43
|
+
private allowedShortcuts;
|
|
44
|
+
private readonly blurListener;
|
|
45
|
+
static mover: KeyboardMover;
|
|
46
|
+
/** Whether or not something is currently being moved. */
|
|
47
|
+
private moving;
|
|
48
|
+
private constructor();
|
|
49
|
+
/**
|
|
50
|
+
* Returns true iff the given draggable is allowed to be moved.
|
|
51
|
+
*
|
|
52
|
+
* @param draggable The draggable element to try to move.
|
|
53
|
+
* @returns True iff movement is allowed.
|
|
54
|
+
*/
|
|
55
|
+
canMove(draggable: IDraggable): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Returns true iff this Mover is currently moving an element.
|
|
58
|
+
*
|
|
59
|
+
* @returns True iff a workspace element is being moved.
|
|
60
|
+
*/
|
|
61
|
+
isMoving(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Start moving the currently-focused item on workspace, if possible.
|
|
64
|
+
*
|
|
65
|
+
* @param draggable The element to start moving.
|
|
66
|
+
* @param event The keyboard event that triggered this move.
|
|
67
|
+
* @returns True iff a move has successfully begun.
|
|
68
|
+
*/
|
|
69
|
+
startMove(draggable: IDraggable, event?: KeyboardEvent): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Moves the current element in the given direction.
|
|
72
|
+
*
|
|
73
|
+
* @param direction The direction to move the currently-moving element.
|
|
74
|
+
* @param event The event that triggered this move, if any.
|
|
75
|
+
* @returns True iff this action applies and has been performed.
|
|
76
|
+
*/
|
|
77
|
+
move(direction: Direction, event?: KeyboardEvent | PointerEvent): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Finish moving the item that is currently being moved.
|
|
80
|
+
*
|
|
81
|
+
* @param event The event that triggered the end of the move, if any.
|
|
82
|
+
* @returns True iff move successfully finished.
|
|
83
|
+
*/
|
|
84
|
+
finishMove(event?: KeyboardEvent | PointerEvent): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Abort moving the currently-focused item on workspace.
|
|
87
|
+
*
|
|
88
|
+
* @param event The event that triggered the end of the move, if any.
|
|
89
|
+
* @returns True iff move successfully aborted.
|
|
90
|
+
*/
|
|
91
|
+
abortMove(event?: KeyboardEvent | PointerEvent): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Sets the distance by which an object will be moved.
|
|
94
|
+
*
|
|
95
|
+
* @param stepDistance The distance in workspace coordinates that each move
|
|
96
|
+
* should move elements on the workspace by.
|
|
97
|
+
*/
|
|
98
|
+
setMoveDistance(stepDistance: number): void;
|
|
99
|
+
/**
|
|
100
|
+
* Returns a list of the names of shortcuts that are allowed to be run while
|
|
101
|
+
* a keyboard-driven move is in progress.
|
|
102
|
+
*/
|
|
103
|
+
getAllowedShortcuts(): string[];
|
|
104
|
+
/**
|
|
105
|
+
* Adds shortcuts with the given names to the list of shortcuts that are
|
|
106
|
+
* allowed to be run while a keyboard-driven move is in progress.
|
|
107
|
+
*/
|
|
108
|
+
setAllowedShortcuts(shortcutNames: string[]): void;
|
|
109
|
+
/**
|
|
110
|
+
* Repositions the move indicator to the corner of the item being moved.
|
|
111
|
+
*/
|
|
112
|
+
private repositionMoveIndicator;
|
|
113
|
+
/**
|
|
114
|
+
* Returns a bounding box used for positioning the move indicator on a block.
|
|
115
|
+
* Blocks require special treatment because `BlockSvg.getBoundingRectangle()`
|
|
116
|
+
* includes the bounds of nested and subsequent blocks. Since the move
|
|
117
|
+
* indicator is positioned at the top right corner of the bounds, this can
|
|
118
|
+
* result in it appearing to float in empty space when e.g. a small block has
|
|
119
|
+
* a much wider block nested inside a statement input. BlockSvg also provides
|
|
120
|
+
* `getBoundingRectangleWithoutChildren()`, which addresses that case, but is
|
|
121
|
+
* insufficient because in the case of nested *value* blocks in a row, the
|
|
122
|
+
* child blocks' bounds should contribute to the bounding box.
|
|
123
|
+
*
|
|
124
|
+
* @param block The block to retrieve an adjusted bounding box for.
|
|
125
|
+
* @returns A bounding box for the given block whose top-right corner
|
|
126
|
+
* corresponds to the maximum visual extent of the given block's row.
|
|
127
|
+
*/
|
|
128
|
+
private positionForBlockMoveIndicator;
|
|
129
|
+
/**
|
|
130
|
+
* Common clean-up for finish/abort run before terminating the move.
|
|
131
|
+
*/
|
|
132
|
+
private preDragEndCleanup;
|
|
133
|
+
/**
|
|
134
|
+
* Common clean-up for finish/abort run after terminating the move.
|
|
135
|
+
*/
|
|
136
|
+
private postDragEndCleanup;
|
|
137
|
+
/**
|
|
138
|
+
* Returns the total distance current element has moved in pixels.
|
|
139
|
+
*/
|
|
140
|
+
private totalPixelDelta;
|
|
141
|
+
/**
|
|
142
|
+
* Scrolls the current element into view.
|
|
143
|
+
*/
|
|
144
|
+
private scrollCurrentElementIntoView;
|
|
145
|
+
/**
|
|
146
|
+
* Recalculates the total movement delta from the starting location and the
|
|
147
|
+
* current position of the item being moved.
|
|
148
|
+
*/
|
|
149
|
+
private updateTotalDelta;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=keyboard_mover.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
7
|
+
/**
|
|
8
|
+
* Four-way arrow indicator attached to a workspace element to indicate that it
|
|
9
|
+
* is being moved.
|
|
10
|
+
*/
|
|
11
|
+
export declare class MoveIndicator {
|
|
12
|
+
private workspace;
|
|
13
|
+
/**
|
|
14
|
+
* Root SVG element for the indicator.
|
|
15
|
+
*/
|
|
16
|
+
svgRoot: SVGGElement;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new move indicator.
|
|
19
|
+
*
|
|
20
|
+
* @param workspace The workspace the indicator should be displayed on.
|
|
21
|
+
*/
|
|
22
|
+
constructor(workspace: WorkspaceSvg);
|
|
23
|
+
/**
|
|
24
|
+
* Moves this indicator to the specified location.
|
|
25
|
+
*
|
|
26
|
+
* @param x The location on the X axis to move to.
|
|
27
|
+
* @param y The location on the Y axis to move to.
|
|
28
|
+
*/
|
|
29
|
+
moveTo(x: number, y: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* Disposes of this move indicator.
|
|
32
|
+
*/
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=move_indicator.d.ts.map
|
|
@@ -3,13 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from '
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
10
|
-
import type { INavigationPolicy } from '../interfaces/i_navigation_policy.js';
|
|
11
|
-
import type { ISelectable } from '../interfaces/i_selectable.js';
|
|
12
|
-
import { RenderedConnection } from '../rendered_connection.js';
|
|
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';
|
|
13
9
|
/**
|
|
14
10
|
* Set of rules controlling keyboard navigation from a block.
|
|
15
11
|
*/
|
|
@@ -18,7 +14,7 @@ export declare class BlockNavigationPolicy implements INavigationPolicy<BlockSvg
|
|
|
18
14
|
* Returns the first child of the given block.
|
|
19
15
|
*
|
|
20
16
|
* @param current The block to return the first child of.
|
|
21
|
-
* @returns The first field or input of the given block, if any.
|
|
17
|
+
* @returns The first icon, field, or input of the given block, if any.
|
|
22
18
|
*/
|
|
23
19
|
getFirstChild(current: BlockSvg): IFocusableNode | null;
|
|
24
20
|
/**
|
|
@@ -33,18 +29,25 @@ export declare class BlockNavigationPolicy implements INavigationPolicy<BlockSvg
|
|
|
33
29
|
* Returns the next peer node of the given block.
|
|
34
30
|
*
|
|
35
31
|
* @param current The block to find the following element of.
|
|
36
|
-
* @returns The
|
|
37
|
-
*
|
|
32
|
+
* @returns The block's next connection, or the next peer on its parent block,
|
|
33
|
+
* otherwise null.
|
|
38
34
|
*/
|
|
39
35
|
getNextSibling(current: BlockSvg): IFocusableNode | null;
|
|
40
36
|
/**
|
|
41
37
|
* Returns the previous peer node of the given block.
|
|
42
38
|
*
|
|
43
39
|
* @param current The block to find the preceding element of.
|
|
44
|
-
* @returns The block's previous
|
|
45
|
-
*
|
|
40
|
+
* @returns The block's previous connection, or the previous peer on its
|
|
41
|
+
* parent block, otherwise null.
|
|
46
42
|
*/
|
|
47
43
|
getPreviousSibling(current: BlockSvg): IFocusableNode | null;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the visual row ID of the given block.
|
|
46
|
+
*
|
|
47
|
+
* @param current The block to retrieve the row ID of.
|
|
48
|
+
* @returns The row ID of the given block.
|
|
49
|
+
*/
|
|
50
|
+
getRowId(current: BlockSvg): string;
|
|
48
51
|
/**
|
|
49
52
|
* Returns whether or not the given block can be navigated to.
|
|
50
53
|
*
|
|
@@ -60,25 +63,14 @@ export declare class BlockNavigationPolicy implements INavigationPolicy<BlockSvg
|
|
|
60
63
|
*/
|
|
61
64
|
isApplicable(current: any): current is BlockSvg;
|
|
62
65
|
}
|
|
63
|
-
/**
|
|
64
|
-
* Returns the next/previous stack relative to the given element's stack.
|
|
65
|
-
*
|
|
66
|
-
* @param current The element whose stack will be navigated relative to.
|
|
67
|
-
* @param delta The difference in index to navigate; positive values navigate
|
|
68
|
-
* to the nth next stack, while negative values navigate to the nth previous
|
|
69
|
-
* stack.
|
|
70
|
-
* @returns The first element in the stack offset by `delta` relative to the
|
|
71
|
-
* current element's stack, or the last element in the stack offset by
|
|
72
|
-
* `delta` relative to the current element's stack when navigating backwards.
|
|
73
|
-
*/
|
|
74
|
-
export declare function navigateStacks(current: ISelectable, delta: number): IFocusableNode | null;
|
|
75
66
|
/**
|
|
76
67
|
* Returns the next navigable item relative to the provided block child.
|
|
77
68
|
*
|
|
69
|
+
* @param block The block whose children should be navigated.
|
|
78
70
|
* @param current The navigable block child item to navigate relative to.
|
|
79
71
|
* @param delta The difference in index to navigate; positive values navigate
|
|
80
72
|
* forward by n, while negative values navigate backwards by n.
|
|
81
73
|
* @returns The navigable block child offset by `delta` relative to `current`.
|
|
82
74
|
*/
|
|
83
|
-
export declare function navigateBlock(
|
|
75
|
+
export declare function navigateBlock(block: BlockSvg, current: IFocusableNode, delta: number): IFocusableNode | null;
|
|
84
76
|
//# sourceMappingURL=block_navigation_policy.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Bubble } from '../../bubbles/bubble.js';
|
|
7
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
9
|
+
/**
|
|
10
|
+
* Set of rules controlling keyboard navigation from a Bubble.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BubbleNavigationPolicy implements INavigationPolicy<Bubble> {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the first child of the given bubble.
|
|
15
|
+
*
|
|
16
|
+
* @param _current The bubble to return the first child of.
|
|
17
|
+
* @returns Null.
|
|
18
|
+
*/
|
|
19
|
+
getFirstChild(_current: Bubble): IFocusableNode | null;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the parent of the given bubble.
|
|
22
|
+
*
|
|
23
|
+
* @param current The bubble to return the parent of.
|
|
24
|
+
* @returns The parent block of the given bubble.
|
|
25
|
+
*/
|
|
26
|
+
getParent(current: Bubble): IFocusableNode | null;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the next peer node of the given bubble.
|
|
29
|
+
*
|
|
30
|
+
* @param current The bubble to find the following element of.
|
|
31
|
+
* @returns The next navigable item on the bubble's icon's parent block.
|
|
32
|
+
*/
|
|
33
|
+
getNextSibling(current: Bubble): IFocusableNode | null;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the previous peer node of the given bubble.
|
|
36
|
+
*
|
|
37
|
+
* @param current The bubble to find the preceding element of.
|
|
38
|
+
* @returns The previous navigable item on the bubble's icon's parent block.
|
|
39
|
+
*/
|
|
40
|
+
getPreviousSibling(current: Bubble): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given bubble.
|
|
43
|
+
*
|
|
44
|
+
* @param current The bubble to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given bubble.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: Bubble): string;
|
|
48
|
+
/**
|
|
49
|
+
* Returns whether or not the given bubble can be navigated to.
|
|
50
|
+
*
|
|
51
|
+
* @param current The instance to check for navigability.
|
|
52
|
+
* @returns True if the given bubble can be focused.
|
|
53
|
+
*/
|
|
54
|
+
isNavigable(current: Bubble): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Returns whether the given object can be navigated from by this policy.
|
|
57
|
+
*
|
|
58
|
+
* @param current The object to check if this policy applies to.
|
|
59
|
+
* @returns True if the object is an Bubble.
|
|
60
|
+
*/
|
|
61
|
+
isApplicable(current: any): current is Bubble;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=bubble_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 { CommentBarButton } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { CommentBarButton } from '../../comments/comment_bar_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 CommentBarButton.
|
|
11
11
|
*/
|
|
@@ -38,6 +38,13 @@ export declare class CommentBarButtonNavigationPolicy implements INavigationPoli
|
|
|
38
38
|
* @returns The CommentBarButton's previous CommentBarButton, if any.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(current: CommentBarButton): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the row ID of the given CommentBarButton.
|
|
43
|
+
*
|
|
44
|
+
* @param current The CommentBarButton to retrieve the row ID of.
|
|
45
|
+
* @returns The row ID of the given CommentBarButton.
|
|
46
|
+
*/
|
|
47
|
+
getRowId(current: CommentBarButton): string;
|
|
41
48
|
/**
|
|
42
49
|
* Returns whether or not the given CommentBarButton 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 { CommentEditor } from '
|
|
7
|
-
import type { IFocusableNode } from '
|
|
8
|
-
import type { INavigationPolicy } from '
|
|
6
|
+
import { CommentEditor } from '../../comments/comment_editor.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 comment editor.
|
|
11
11
|
* This is a no-op placeholder (other than isNavigable/isApplicable) since
|
|
@@ -16,6 +16,13 @@ export declare class CommentEditorNavigationPolicy implements INavigationPolicy<
|
|
|
16
16
|
getParent(_current: CommentEditor): IFocusableNode | null;
|
|
17
17
|
getNextSibling(_current: CommentEditor): IFocusableNode | null;
|
|
18
18
|
getPreviousSibling(_current: CommentEditor): IFocusableNode | null;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the row ID of the given comment editor.
|
|
21
|
+
*
|
|
22
|
+
* @param current The comment editor to retrieve the row ID of.
|
|
23
|
+
* @returns The row ID of the given comment editor.
|
|
24
|
+
*/
|
|
25
|
+
getRowId(current: CommentEditor): string;
|
|
19
26
|
/**
|
|
20
27
|
* Returns whether or not the given comment editor can be navigated to.
|
|
21
28
|
*
|
|
@@ -3,26 +3,24 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import
|
|
9
|
-
import { RenderedConnection } from '../rendered_connection.js';
|
|
6
|
+
import type { IFocusableNode } from '../../interfaces/i_focusable_node.js';
|
|
7
|
+
import type { INavigationPolicy } from '../../interfaces/i_navigation_policy.js';
|
|
8
|
+
import { RenderedConnection } from '../../rendered_connection.js';
|
|
10
9
|
/**
|
|
11
10
|
* Set of rules controlling keyboard navigation from a connection.
|
|
12
11
|
*/
|
|
13
12
|
export declare class ConnectionNavigationPolicy implements INavigationPolicy<RenderedConnection> {
|
|
14
13
|
/**
|
|
15
|
-
* Returns the first child of
|
|
14
|
+
* Returns the first child of a connection.
|
|
16
15
|
*
|
|
17
|
-
* @
|
|
18
|
-
* @returns The connection's first child element, or null if not none.
|
|
16
|
+
* @returns Null, as connections do not have children.
|
|
19
17
|
*/
|
|
20
|
-
getFirstChild(
|
|
18
|
+
getFirstChild(): IFocusableNode | null;
|
|
21
19
|
/**
|
|
22
20
|
* Returns the parent of the given connection.
|
|
23
21
|
*
|
|
24
22
|
* @param current The connection to return the parent of.
|
|
25
|
-
* @returns The given connection's parent
|
|
23
|
+
* @returns The given connection's parent block.
|
|
26
24
|
*/
|
|
27
25
|
getParent(current: RenderedConnection): IFocusableNode | null;
|
|
28
26
|
/**
|
|
@@ -40,15 +38,12 @@ export declare class ConnectionNavigationPolicy implements INavigationPolicy<Ren
|
|
|
40
38
|
*/
|
|
41
39
|
getPreviousSibling(current: RenderedConnection): IFocusableNode | null;
|
|
42
40
|
/**
|
|
43
|
-
*
|
|
44
|
-
* This is either an output connection, previous connection or undefined.
|
|
45
|
-
* If both connections exist return the one that is actually connected
|
|
46
|
-
* to another block.
|
|
41
|
+
* Returns the row ID of the given connection.
|
|
47
42
|
*
|
|
48
|
-
* @param
|
|
49
|
-
* @returns The
|
|
43
|
+
* @param current The connection to retrieve the row ID of.
|
|
44
|
+
* @returns The row ID of the given connection.
|
|
50
45
|
*/
|
|
51
|
-
|
|
46
|
+
getRowId(current: RenderedConnection): string;
|
|
52
47
|
/**
|
|
53
48
|
* Returns whether or not the given connection can be navigated to.
|
|
54
49
|
*
|
|
@@ -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
|