@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
|
@@ -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,237 @@
|
|
|
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
|
+
* Returns the navigable top-level items of a tree, in navigation order.
|
|
150
|
+
*
|
|
151
|
+
* For a workspace these are its stacks and comments; for a toolbox its
|
|
152
|
+
* categories; for a flyout its blocks, buttons and labels.
|
|
153
|
+
*
|
|
154
|
+
* @param root The root node of the tree to list, defaulting to the root of
|
|
155
|
+
* the currently focused tree.
|
|
156
|
+
* @returns The navigable top-level items, or an empty list if there is no
|
|
157
|
+
* tree to list.
|
|
158
|
+
*/
|
|
159
|
+
getNavigableItems(root?: IFocusableNode | undefined): IFocusableNode[];
|
|
160
|
+
/**
|
|
161
|
+
* Get the first navigable node on the workspace, or null if none exist.
|
|
162
|
+
*
|
|
163
|
+
* @returns The first navigable node on the workspace, or null.
|
|
164
|
+
*/
|
|
165
|
+
getFirstNode(): IFocusableNode | null;
|
|
166
|
+
/**
|
|
167
|
+
* Get the last navigable node on the workspace, or null if none exist.
|
|
168
|
+
*
|
|
169
|
+
* @returns The last navigable node on the workspace, or null.
|
|
170
|
+
*/
|
|
171
|
+
getLastNode(): IFocusableNode | null;
|
|
172
|
+
/**
|
|
173
|
+
* Determines whether navigation is allowed between two nodes.
|
|
174
|
+
*
|
|
175
|
+
* @param current The starting node for proposed navigation.
|
|
176
|
+
* @param candidate The proposed destination node.
|
|
177
|
+
* @param direction The direction in which the user is navigating.
|
|
178
|
+
* @returns True if navigation should be allowed to proceed, or false to find
|
|
179
|
+
* a different candidate.
|
|
180
|
+
*/
|
|
181
|
+
protected transitionAllowed(current: IFocusableNode, candidate: IFocusableNode, direction: NavigationDirection): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the leftmost node in the same row as the given node.
|
|
184
|
+
*
|
|
185
|
+
* @param node The node to find the leftmost sibling of.
|
|
186
|
+
* @returns The leftmost sibling of the given node in the same row.
|
|
187
|
+
*/
|
|
188
|
+
private getLeftmostSibling;
|
|
189
|
+
/**
|
|
190
|
+
* Returns the last node in a stack of blocks or other top-level workspace
|
|
191
|
+
* entity.
|
|
192
|
+
*
|
|
193
|
+
* @param stackRoot A top-level item to get the last node of.
|
|
194
|
+
* @param stopIfFound A sentinel node that terminates traversal if
|
|
195
|
+
* encountered; typically the root node of the next stack.
|
|
196
|
+
* @returns The last node in the given stack.
|
|
197
|
+
*/
|
|
198
|
+
private getLastNodeInStack;
|
|
199
|
+
private getRowId;
|
|
200
|
+
/**
|
|
201
|
+
* Returns the next/previous stack relative to the given element's stack.
|
|
202
|
+
*
|
|
203
|
+
* @internal
|
|
204
|
+
* @param current The element whose stack will be navigated relative to.
|
|
205
|
+
* @param delta The difference in index to navigate; positive values navigate
|
|
206
|
+
* to the nth next stack, while negative values navigate to the nth
|
|
207
|
+
* previous stack.
|
|
208
|
+
* @returns The first element in the stack offset by `delta` relative to the
|
|
209
|
+
* current element's stack, or the last element in the stack offset by
|
|
210
|
+
* `delta` relative to the current element's stack when navigating backwards.
|
|
211
|
+
*/
|
|
212
|
+
navigateStacks(current: IFocusableNode, delta: number): IFocusableNode | null;
|
|
213
|
+
/**
|
|
214
|
+
* Returns a list of all top-level focusable items on the given node's
|
|
215
|
+
* focusable tree.
|
|
216
|
+
*
|
|
217
|
+
* @param current The node whose root focusable tree to retrieve the top-level
|
|
218
|
+
* items of.
|
|
219
|
+
* @returns A list of all top-level items on the given node's parent tree.
|
|
220
|
+
*/
|
|
221
|
+
protected getTopLevelItems(current: IFocusableNode): IFocusableNode[];
|
|
222
|
+
/**
|
|
223
|
+
* Returns whether or not the given node is navigable.
|
|
224
|
+
*
|
|
225
|
+
* @param node A focusable node to check the navigability of.
|
|
226
|
+
* @returns True if the node is navigable, otherwise false.
|
|
227
|
+
*/
|
|
228
|
+
protected isNavigable(node: IFocusableNode): boolean | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Returns the block that the given node is a child of.
|
|
231
|
+
*
|
|
232
|
+
* @returns The parent block of the node if any, otherwise null.
|
|
233
|
+
*/
|
|
234
|
+
getSourceBlockFromNode(node: IFocusableNode | null): BlockSvg | null;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
237
|
+
//# 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
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
export declare class KeyboardNavigationController {
|
|
12
12
|
/** Whether the user is actively using keyboard navigation. */
|
|
13
13
|
private isActive;
|
|
14
|
+
/** Whether to play audio cues when navigating between scope levels. */
|
|
15
|
+
private scopeChangeAudioCuesEnabled;
|
|
14
16
|
/** Css class name added to body if keyboard nav is active. */
|
|
15
17
|
private activeClassName;
|
|
16
18
|
/**
|
|
@@ -40,6 +42,16 @@ export declare class KeyboardNavigationController {
|
|
|
40
42
|
* (e.g., has recently taken some action that is only relevant to keyboard users)
|
|
41
43
|
*/
|
|
42
44
|
getIsActive(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Sets whether or not audio cues should be played when keyboard navigation
|
|
47
|
+
* transitions between blocks of different nesting levels.
|
|
48
|
+
*/
|
|
49
|
+
setScopeChangeAudioCuesEnabled(enabled: boolean): void;
|
|
50
|
+
/**
|
|
51
|
+
* Returns whether or not audio cues should be played when keyboard navigation
|
|
52
|
+
* transitions between blocks of different nesting levels.
|
|
53
|
+
*/
|
|
54
|
+
getScopeChangeAudioCuesEnabled(): boolean;
|
|
43
55
|
/** Adds or removes the css class that indicates keyboard navigation is active. */
|
|
44
56
|
private updateActiveVisualization;
|
|
45
57
|
}
|
package/core/layer_manager.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
7
|
-
import { IRenderedElement } from './interfaces/i_rendered_element.js';
|
|
8
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
9
|
-
import { WorkspaceSvg } from './workspace_svg.js';
|
|
7
|
+
import type { IRenderedElement } from './interfaces/i_rendered_element.js';
|
|
8
|
+
import type { Coordinate } from './utils/coordinate.js';
|
|
9
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare class LayerManager {
|
|
12
12
|
private workspace;
|
package/core/menu.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export declare class Menu {
|
|
|
41
41
|
private element;
|
|
42
42
|
/** ARIA name for this menu. */
|
|
43
43
|
private roleName;
|
|
44
|
+
/** The menu's ID. */
|
|
45
|
+
private id;
|
|
44
46
|
/** Constructs a new Menu instance. */
|
|
45
47
|
constructor();
|
|
46
48
|
/**
|
|
@@ -166,5 +168,6 @@ export declare class Menu {
|
|
|
166
168
|
* @returns The MenuItem objects displayed in this menu.
|
|
167
169
|
*/
|
|
168
170
|
private getMenuItems;
|
|
171
|
+
getId(): string;
|
|
169
172
|
}
|
|
170
173
|
//# sourceMappingURL=menu.d.ts.map
|
package/core/menuitem.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import * as aria from './utils/aria.js';
|
|
|
15
15
|
export declare class MenuItem {
|
|
16
16
|
private readonly content;
|
|
17
17
|
private readonly opt_value?;
|
|
18
|
+
private readonly ariaLabel?;
|
|
18
19
|
/** Is the menu item clickable, as opposed to greyed-out. */
|
|
19
20
|
private enabled;
|
|
20
21
|
/** The DOM element for the menu item. */
|
|
@@ -31,18 +32,24 @@ export declare class MenuItem {
|
|
|
31
32
|
private highlight;
|
|
32
33
|
/** Bound function to call when this menu item is clicked. */
|
|
33
34
|
private actionHandler;
|
|
35
|
+
/** The unique ID for this menu item. */
|
|
36
|
+
private id;
|
|
34
37
|
/**
|
|
35
38
|
* @param content Text caption to display as the content of the item, or a
|
|
36
39
|
* HTML element to display.
|
|
37
40
|
* @param opt_value Data/model associated with the menu item.
|
|
38
41
|
*/
|
|
39
|
-
constructor(content: string | HTMLElement, opt_value?: string | undefined);
|
|
42
|
+
constructor(content: string | HTMLElement, opt_value?: string | undefined, ariaLabel?: string | undefined);
|
|
40
43
|
/**
|
|
41
44
|
* Creates the menuitem's DOM.
|
|
42
45
|
*
|
|
43
46
|
* @returns Completed DOM.
|
|
44
47
|
*/
|
|
45
48
|
createDom(): Element;
|
|
49
|
+
/**
|
|
50
|
+
* Gets the ARIA label for this menu item.
|
|
51
|
+
*/
|
|
52
|
+
getAriaLabel(): string;
|
|
46
53
|
/** Dispose of this menu item. */
|
|
47
54
|
dispose(): void;
|
|
48
55
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2022 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
6
|
+
import type { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
7
7
|
import type { IProcedureModel } from './interfaces/i_procedure_model.js';
|
|
8
8
|
export declare class ObservableProcedureMap extends Map<string, IProcedureModel> implements IProcedureMap {
|
|
9
9
|
/** @internal */
|
package/core/options.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare class Options {
|
|
|
76
76
|
/**
|
|
77
77
|
* @param options Dictionary of options.
|
|
78
78
|
* Specification:
|
|
79
|
-
* https://
|
|
79
|
+
* https://docs.blockly.com/guides/configure/configuration_struct/#the-options-dictionary
|
|
80
80
|
*/
|
|
81
81
|
constructor(options: BlocklyOptions);
|
|
82
82
|
/**
|
|
@@ -91,7 +91,7 @@ export declare class Options {
|
|
|
91
91
|
/**
|
|
92
92
|
* Parse the user-specified zoom options, using reasonable defaults where
|
|
93
93
|
* behaviour is unspecified. See zoom documentation:
|
|
94
|
-
* https://
|
|
94
|
+
* https://docs.blockly.com/guides/configure/zoom/
|
|
95
95
|
*
|
|
96
96
|
* @param options Dictionary of options.
|
|
97
97
|
* @returns Normalized zoom options.
|
|
@@ -100,7 +100,7 @@ export declare class Options {
|
|
|
100
100
|
/**
|
|
101
101
|
* Parse the user-specified grid options, using reasonable defaults where
|
|
102
102
|
* behaviour is unspecified. See grid documentation:
|
|
103
|
-
* https://
|
|
103
|
+
* https://docs.blockly.com/guides/configure/grid/
|
|
104
104
|
*
|
|
105
105
|
* @param options Dictionary of options.
|
|
106
106
|
* @returns Normalized grid options.
|
|
@@ -108,7 +108,7 @@ export declare class Options {
|
|
|
108
108
|
private static parseGridOptions;
|
|
109
109
|
/**
|
|
110
110
|
* Parse the user-specified theme options, using the classic theme as a
|
|
111
|
-
* default. https://
|
|
111
|
+
* default. https://docs.blockly.com/guides/configure/appearance/themes/
|
|
112
112
|
*
|
|
113
113
|
* @param options Dictionary of options.
|
|
114
114
|
* @returns A Blockly Theme.
|
package/core/procedures.d.ts
CHANGED
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* Copyright 2012 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import './events/events_block_change.js';
|
|
7
6
|
import type { Block } from './block.js';
|
|
8
7
|
import type { Abstract } from './events/events_abstract.js';
|
|
9
|
-
import { Field } from './field.js';
|
|
8
|
+
import type { Field } from './field.js';
|
|
10
9
|
import { ProcedureTuple } from './interfaces/i_legacy_procedure_blocks.js';
|
|
11
10
|
import { IParameterModel } from './interfaces/i_parameter_model.js';
|
|
12
11
|
import { IProcedureBlock, isProcedureBlock } from './interfaces/i_procedure_block.js';
|
|
@@ -65,14 +64,12 @@ export declare function isNameUsed(name: string, workspace: Workspace, opt_exclu
|
|
|
65
64
|
*/
|
|
66
65
|
export declare function rename(this: Field, name: string): string;
|
|
67
66
|
/**
|
|
68
|
-
*
|
|
67
|
+
* Construct the blocks required by the flyout for the procedure category.
|
|
69
68
|
*
|
|
70
|
-
* @
|
|
71
|
-
* @
|
|
69
|
+
* @param workspace The workspace containing procedures.
|
|
70
|
+
* @returns List of flyout contents as JSON.
|
|
72
71
|
*/
|
|
73
|
-
export declare function
|
|
74
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: true): Element[];
|
|
75
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: false): FlyoutItemInfo[];
|
|
72
|
+
export declare function flyoutCategory(workspace: WorkspaceSvg): FlyoutItemInfo[];
|
|
76
73
|
/**
|
|
77
74
|
* Listens for when a procedure mutator is opened. Then it triggers a flyout
|
|
78
75
|
* update and adds a mutator change listener to the mutator workspace.
|
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>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from './block_svg.js';
|
|
6
|
+
import type { BlockSvg } from './block_svg.js';
|
|
7
7
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
8
8
|
/**
|
|
9
9
|
* Registers that the given block and all of its parents need to be rerendered,
|