@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,6 +3,11 @@
|
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Toolbox from whence to create blocks.
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
6
11
|
import * as browserEvents from '../browser_events.js';
|
|
7
12
|
import { DeleteArea } from '../delete_area.js';
|
|
8
13
|
import '../events/events_toolbox_item_select.js';
|
|
@@ -16,6 +21,7 @@ import type { ISelectableToolboxItem } from '../interfaces/i_selectable_toolbox_
|
|
|
16
21
|
import type { IStyleable } from '../interfaces/i_styleable.js';
|
|
17
22
|
import type { IToolbox } from '../interfaces/i_toolbox.js';
|
|
18
23
|
import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
|
|
24
|
+
import { ToolboxNavigator } from '../keyboard_nav/navigators/toolbox_navigator.js';
|
|
19
25
|
import type { KeyboardShortcut } from '../shortcut_registry.js';
|
|
20
26
|
import { Rect } from '../utils/rect.js';
|
|
21
27
|
import * as toolbox from '../utils/toolbox.js';
|
|
@@ -62,6 +68,8 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
62
68
|
protected readonly workspace_: WorkspaceSvg;
|
|
63
69
|
/** Whether the mouse is currently being clicked. */
|
|
64
70
|
private mouseDown;
|
|
71
|
+
/** Object used by keyboard navigation to move focus in this toolbox. */
|
|
72
|
+
private navigator;
|
|
65
73
|
/** @param workspace The workspace in which to create new blocks. */
|
|
66
74
|
constructor(workspace: WorkspaceSvg);
|
|
67
75
|
/**
|
|
@@ -176,17 +184,6 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
176
184
|
* ignored.
|
|
177
185
|
*/
|
|
178
186
|
getClientRect(): Rect | null;
|
|
179
|
-
/**
|
|
180
|
-
* Returns whether the provided block or bubble would be deleted if dropped on
|
|
181
|
-
* this area.
|
|
182
|
-
* This method should check if the element is deletable and is always called
|
|
183
|
-
* before onDragEnter/onDragOver/onDragExit.
|
|
184
|
-
*
|
|
185
|
-
* @param element The block or bubble currently being dragged.
|
|
186
|
-
* @returns Whether the element provided would be deleted if dropped on this
|
|
187
|
-
* area.
|
|
188
|
-
*/
|
|
189
|
-
wouldDelete(element: IDraggable): boolean;
|
|
190
187
|
/**
|
|
191
188
|
* Handles when a cursor with a block or bubble enters this drag target.
|
|
192
189
|
*
|
|
@@ -367,30 +364,12 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
367
364
|
*/
|
|
368
365
|
private fireSelectEvent;
|
|
369
366
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* @returns True if a parent category was selected, false otherwise.
|
|
373
|
-
*/
|
|
374
|
-
private selectParent;
|
|
375
|
-
/**
|
|
376
|
-
* Selects the first child of the currently selected item, or nothing if the
|
|
377
|
-
* toolbox item has no children.
|
|
367
|
+
* Sets the currently selected item's expansion state, if possible.
|
|
378
368
|
*
|
|
379
|
-
* @
|
|
369
|
+
* @param expanded True to expand the item or false to collapse it.
|
|
370
|
+
* @returns True if the selected item's expansion state was updated.
|
|
380
371
|
*/
|
|
381
|
-
private
|
|
382
|
-
/**
|
|
383
|
-
* Selects the next visible toolbox item.
|
|
384
|
-
*
|
|
385
|
-
* @returns True if a next category was selected, false otherwise.
|
|
386
|
-
*/
|
|
387
|
-
private selectNext;
|
|
388
|
-
/**
|
|
389
|
-
* Selects the previous visible toolbox item.
|
|
390
|
-
*
|
|
391
|
-
* @returns True if a previous category was selected, false otherwise.
|
|
392
|
-
*/
|
|
393
|
-
private selectPrevious;
|
|
372
|
+
private toggleSelectedItem;
|
|
394
373
|
/** Disposes of this toolbox. */
|
|
395
374
|
dispose(): void;
|
|
396
375
|
/** See IFocusableNode.getFocusableElement. */
|
|
@@ -415,5 +394,10 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
415
394
|
onTreeFocus(node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
416
395
|
/** See IFocusableTree.onTreeBlur. */
|
|
417
396
|
onTreeBlur(nextTree: IFocusableTree | null): void;
|
|
397
|
+
/**
|
|
398
|
+
* Returns the Navigator instance to use to move between items in this
|
|
399
|
+
* toolbox.
|
|
400
|
+
*/
|
|
401
|
+
getNavigator(): ToolboxNavigator;
|
|
418
402
|
}
|
|
419
403
|
//# sourceMappingURL=toolbox.d.ts.map
|
|
@@ -105,5 +105,9 @@ export declare class ToolboxItem implements IToolboxItem {
|
|
|
105
105
|
onNodeBlur(): void;
|
|
106
106
|
/** See IFocusableNode.canBeFocused. */
|
|
107
107
|
canBeFocused(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Returns the toolbox this toolbox item belongs to.
|
|
110
|
+
*/
|
|
111
|
+
getParentToolbox(): IToolbox;
|
|
108
112
|
}
|
|
109
113
|
//# sourceMappingURL=toolbox_item.d.ts.map
|
package/core/tooltip.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Copyright 2011 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
7
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
6
8
|
/**
|
|
7
9
|
* A type which can define a tooltip.
|
|
8
10
|
* Either a string, an object containing a tooltip property, or a function which
|
|
@@ -23,9 +25,10 @@ export type CustomTooltip = (p1: Element, p2: Element) => any;
|
|
|
23
25
|
* Sets a custom function that will be called if present instead of the default
|
|
24
26
|
* tooltip UI.
|
|
25
27
|
*
|
|
26
|
-
* @param customFn A custom tooltip used to render an alternate tooltip UI
|
|
28
|
+
* @param customFn A custom tooltip used to render an alternate tooltip UI, or
|
|
29
|
+
* undefined to use the default implementation.
|
|
27
30
|
*/
|
|
28
|
-
export declare function setCustomTooltip(customFn: CustomTooltip): void;
|
|
31
|
+
export declare function setCustomTooltip(customFn: CustomTooltip | undefined): void;
|
|
29
32
|
/**
|
|
30
33
|
* Gets the custom tooltip function.
|
|
31
34
|
*
|
|
@@ -101,6 +104,14 @@ export declare function dispose(): void;
|
|
|
101
104
|
* Hide the tooltip.
|
|
102
105
|
*/
|
|
103
106
|
export declare function hide(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Display the tooltip for a given target.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
* @param target The node upon which the tooltip should be displayed.
|
|
112
|
+
* @param workspace The target node's workspace.
|
|
113
|
+
*/
|
|
114
|
+
export declare function display(target: IFocusableNode, workspace?: WorkspaceSvg): void;
|
|
104
115
|
/**
|
|
105
116
|
* Hide any in-progress tooltips and block showing new tooltips until the next
|
|
106
117
|
* call to unblock().
|
package/core/trashcan.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { DeleteArea } from './delete_area.js';
|
|
7
7
|
import './events/events_trashcan_open.js';
|
|
8
8
|
import type { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
9
|
+
import type { IComponent } from './interfaces/i_component';
|
|
9
10
|
import type { IDraggable } from './interfaces/i_draggable.js';
|
|
10
11
|
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
11
12
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
@@ -15,13 +16,20 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
15
16
|
/**
|
|
16
17
|
* Class for a trash can.
|
|
17
18
|
*/
|
|
18
|
-
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable {
|
|
19
|
+
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable, IComponent {
|
|
19
20
|
private workspace;
|
|
20
21
|
/**
|
|
21
|
-
* The
|
|
22
|
+
* The id for this component that is used to register with the
|
|
22
23
|
* ComponentManager.
|
|
23
24
|
*/
|
|
24
25
|
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* A globally unique ID for this particular trashcan. Component Manager IDs
|
|
28
|
+
* (the ID above) are 1:1 with classes, but if there are multiple workspaces
|
|
29
|
+
* with trashcans on a page, each actual trashcan DOM element needs a unique
|
|
30
|
+
* ID to support focusable node resolution. This ID is for that purpose.
|
|
31
|
+
*/
|
|
32
|
+
private uniqueId;
|
|
25
33
|
/**
|
|
26
34
|
* A list of JSON (stored as strings) representing blocks in the trashcan.
|
|
27
35
|
*/
|
|
@@ -34,19 +42,8 @@ export declare class Trashcan extends DeleteArea implements IAutoHideable, IPosi
|
|
|
34
42
|
flyout: IFlyout | null;
|
|
35
43
|
/** Current open/close state of the lid. */
|
|
36
44
|
isLidOpen: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* The minimum openness of the lid. Used to indicate if the trashcan
|
|
39
|
-
* contains blocks.
|
|
40
|
-
*/
|
|
41
|
-
private minOpenness;
|
|
42
45
|
/** The SVG group containing the trash can. */
|
|
43
46
|
private svgGroup;
|
|
44
|
-
/** The SVG image element of the trash can lid. */
|
|
45
|
-
private svgLid;
|
|
46
|
-
/** Task ID of opening/closing animation. */
|
|
47
|
-
private lidTask;
|
|
48
|
-
/** Current state of lid opening (0.0 = closed, 1.0 = open). */
|
|
49
|
-
private lidOpen;
|
|
50
47
|
/** Left coordinate of the trash can. */
|
|
51
48
|
private left;
|
|
52
49
|
/** Top coordinate of the trash can. */
|
|
@@ -148,22 +145,6 @@ export declare class Trashcan extends DeleteArea implements IAutoHideable, IPosi
|
|
|
148
145
|
* @internal
|
|
149
146
|
*/
|
|
150
147
|
setLidOpen(state: boolean): void;
|
|
151
|
-
/** Rotate the lid open or closed by one step. Then wait and recurse. */
|
|
152
|
-
private animateLid;
|
|
153
|
-
/**
|
|
154
|
-
* Set the angle of the trashcan's lid.
|
|
155
|
-
*
|
|
156
|
-
* @param lidAngle The angle at which to set the lid.
|
|
157
|
-
*/
|
|
158
|
-
private setLidAngle;
|
|
159
|
-
/**
|
|
160
|
-
* Sets the minimum openness of the trashcan lid. If the lid is currently
|
|
161
|
-
* closed, this will update lid's position.
|
|
162
|
-
*
|
|
163
|
-
* @param newMin The new minimum openness of the lid. Should be between 0
|
|
164
|
-
* and 1.
|
|
165
|
-
*/
|
|
166
|
-
private setMinOpenness;
|
|
167
148
|
/**
|
|
168
149
|
* Flip the lid shut.
|
|
169
150
|
* Called externally after a drag.
|
|
@@ -171,6 +152,12 @@ export declare class Trashcan extends DeleteArea implements IAutoHideable, IPosi
|
|
|
171
152
|
closeLid(): void;
|
|
172
153
|
/** Inspect the contents of the trash. */
|
|
173
154
|
click(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Activates the trashcan when Enter or Space is pressed.
|
|
157
|
+
*
|
|
158
|
+
* @param e A keydown event.
|
|
159
|
+
*/
|
|
160
|
+
private onKeyDown;
|
|
174
161
|
/**
|
|
175
162
|
* Fires a UI event for trashcan flyout open or close.
|
|
176
163
|
*
|
|
@@ -183,15 +170,6 @@ export declare class Trashcan extends DeleteArea implements IAutoHideable, IPosi
|
|
|
183
170
|
* @param e A mouse down event.
|
|
184
171
|
*/
|
|
185
172
|
private blockMouseDownWhenOpenable;
|
|
186
|
-
/**
|
|
187
|
-
* Indicate that the trashcan can be clicked (by opening it) if it has blocks.
|
|
188
|
-
*/
|
|
189
|
-
private mouseOver;
|
|
190
|
-
/**
|
|
191
|
-
* Close the lid of the trashcan if it was open (Vis. it was indicating it had
|
|
192
|
-
* blocks).
|
|
193
|
-
*/
|
|
194
|
-
private mouseOut;
|
|
195
173
|
/**
|
|
196
174
|
* Handle a BLOCK_DELETE event. Adds deleted blocks oldXml to the content
|
|
197
175
|
* array.
|
package/core/utils/aria.d.ts
CHANGED
|
@@ -4,66 +4,297 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* ARIA
|
|
8
|
-
* Copied from Closure's goog.a11y.aria.
|
|
7
|
+
* ARIA state values for LivePriority.
|
|
8
|
+
* Copied from Closure's goog.a11y.aria.LivePriority
|
|
9
|
+
*/
|
|
10
|
+
export declare enum LiveRegionAssertiveness {
|
|
11
|
+
ASSERTIVE = "assertive",
|
|
12
|
+
OFF = "off",
|
|
13
|
+
POLITE = "polite"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Customization options that can be passed when using `announceDynamicAriaState`.
|
|
17
|
+
*/
|
|
18
|
+
export interface DynamicAnnouncementOptions {
|
|
19
|
+
/** The custom ARIA `Role` that should be used for the announcement container. */
|
|
20
|
+
role?: Role;
|
|
21
|
+
/**
|
|
22
|
+
* How assertive the announcement should be.
|
|
23
|
+
*
|
|
24
|
+
* Important*: It was found through testing that `ASSERTIVE` announcements are
|
|
25
|
+
* often outright ignored by some screen readers, so it's generally recommended
|
|
26
|
+
* to always use `POLITE` unless specifically tested across supported readers.
|
|
27
|
+
*/
|
|
28
|
+
assertiveness?: LiveRegionAssertiveness;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A valid ARIA role for a Blockly DOM element. See also setRole() and getRole().
|
|
32
|
+
*
|
|
33
|
+
* This should be used instead of directly setting an element's role attribute.
|
|
9
34
|
*/
|
|
10
35
|
export declare enum Role {
|
|
36
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/application_role. */
|
|
37
|
+
APPLICATION = "application",
|
|
38
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/button_role. */
|
|
39
|
+
BUTTON = "button",
|
|
40
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/checkbox_role. */
|
|
41
|
+
CHECKBOX = "checkbox",
|
|
42
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/dialog_role. */
|
|
43
|
+
DIALOG = "dialog",
|
|
44
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/figure_role. */
|
|
45
|
+
FIGURE = "figure",
|
|
46
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/generic_role. */
|
|
47
|
+
GENERIC = "generic",
|
|
48
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/grid_role. */
|
|
11
49
|
GRID = "grid",
|
|
50
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/gridcell_role. */
|
|
12
51
|
GRIDCELL = "gridcell",
|
|
52
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/group_role. */
|
|
13
53
|
GROUP = "group",
|
|
54
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/list_role. */
|
|
55
|
+
LIST = "list",
|
|
56
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/listbox_role. */
|
|
14
57
|
LISTBOX = "listbox",
|
|
58
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/listitem_role. */
|
|
59
|
+
LISTITEM = "listitem",
|
|
60
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menu_role. */
|
|
15
61
|
MENU = "menu",
|
|
62
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menuitem_role. */
|
|
16
63
|
MENUITEM = "menuitem",
|
|
17
|
-
|
|
64
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/none_role. */
|
|
65
|
+
NONE = "none",
|
|
66
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/option_role. */
|
|
18
67
|
OPTION = "option",
|
|
19
|
-
|
|
68
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role. */
|
|
69
|
+
REGION = "region",
|
|
70
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/row_role. */
|
|
20
71
|
ROW = "row",
|
|
21
|
-
|
|
22
|
-
|
|
72
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/search_role. */
|
|
73
|
+
SEARCH = "search",
|
|
74
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role. */
|
|
23
75
|
SEPARATOR = "separator",
|
|
24
|
-
|
|
76
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role. */
|
|
77
|
+
STATUS = "status",
|
|
78
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/textbox_role. */
|
|
79
|
+
TEXTBOX = "textbox",
|
|
80
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/tree_role. */
|
|
81
|
+
TREE = "tree",
|
|
82
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/treeitem_role. */
|
|
83
|
+
TREEITEM = "treeitem"
|
|
25
84
|
}
|
|
26
85
|
/**
|
|
27
|
-
* ARIA
|
|
28
|
-
*
|
|
86
|
+
* A possible ARIA attribute state for a Blockly DOM element. See also setState() and getState().
|
|
87
|
+
*
|
|
88
|
+
* This should be used instead of directly setting aria-* attributes on elements.
|
|
29
89
|
*/
|
|
30
90
|
export declare enum State {
|
|
91
|
+
/**
|
|
92
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-activedescendant.
|
|
93
|
+
*
|
|
94
|
+
* Value: ID of a DOM element.
|
|
95
|
+
*/
|
|
31
96
|
ACTIVEDESCENDANT = "activedescendant",
|
|
32
|
-
|
|
97
|
+
/**
|
|
98
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-atomic.
|
|
99
|
+
*
|
|
100
|
+
* Value: one of {true, false}.
|
|
101
|
+
*/
|
|
102
|
+
ATOMIC = "atomic",
|
|
103
|
+
/**
|
|
104
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-checked.
|
|
105
|
+
*
|
|
106
|
+
* Value: one of {true, false, mixed, undefined}.
|
|
107
|
+
*/
|
|
108
|
+
CHECKED = "checked",
|
|
109
|
+
/**
|
|
110
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-controls.
|
|
111
|
+
*
|
|
112
|
+
* Value: an array of element IDs.
|
|
113
|
+
*/
|
|
114
|
+
CONTROLS = "controls",
|
|
115
|
+
/**
|
|
116
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-disabled.
|
|
117
|
+
*
|
|
118
|
+
* Value: one of {true, false}.
|
|
119
|
+
*/
|
|
33
120
|
DISABLED = "disabled",
|
|
121
|
+
/**
|
|
122
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-expanded.
|
|
123
|
+
*
|
|
124
|
+
* Value: one of {true, false, undefined}.
|
|
125
|
+
*/
|
|
34
126
|
EXPANDED = "expanded",
|
|
127
|
+
/**
|
|
128
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-haspopup.
|
|
129
|
+
*
|
|
130
|
+
* Value: one of {true, false, menu, listbox, tree, grid, dialog}.
|
|
131
|
+
*/
|
|
132
|
+
HASPOPUP = "haspopup",
|
|
133
|
+
/**
|
|
134
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden.
|
|
135
|
+
*
|
|
136
|
+
* Value: one of {true, false,undefined}.
|
|
137
|
+
*/
|
|
138
|
+
HIDDEN = "hidden",
|
|
139
|
+
/**
|
|
140
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid.
|
|
141
|
+
*
|
|
142
|
+
* Value: one of {true, false, grammar, spelling}.
|
|
143
|
+
*/
|
|
35
144
|
INVALID = "invalid",
|
|
145
|
+
/**
|
|
146
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label.
|
|
147
|
+
*
|
|
148
|
+
* Value: a string.
|
|
149
|
+
*/
|
|
36
150
|
LABEL = "label",
|
|
151
|
+
/**
|
|
152
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-labelledby.
|
|
153
|
+
*
|
|
154
|
+
* Value: an array of element IDs.
|
|
155
|
+
*/
|
|
37
156
|
LABELLEDBY = "labelledby",
|
|
157
|
+
/**
|
|
158
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-level.
|
|
159
|
+
*
|
|
160
|
+
* Value: an integer.
|
|
161
|
+
*/
|
|
38
162
|
LEVEL = "level",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
163
|
+
/**
|
|
164
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-live.
|
|
165
|
+
*
|
|
166
|
+
* Value: one of {polite, assertive, off}.
|
|
167
|
+
*/
|
|
168
|
+
LIVE = "live",
|
|
169
|
+
/**
|
|
170
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-pressed.
|
|
171
|
+
*
|
|
172
|
+
* Value: one of {true, false, mixed, undefined}.
|
|
173
|
+
*/
|
|
174
|
+
PRESSED = "pressed",
|
|
175
|
+
/**
|
|
176
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-roledescription.
|
|
177
|
+
*
|
|
178
|
+
* Value: a string.
|
|
179
|
+
*/
|
|
180
|
+
ROLEDESCRIPTION = "roledescription",
|
|
181
|
+
/**
|
|
182
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-selected.
|
|
183
|
+
*
|
|
184
|
+
* Value:one of {true, false, undefined}.
|
|
185
|
+
*/
|
|
42
186
|
SELECTED = "selected",
|
|
43
|
-
|
|
187
|
+
/**
|
|
188
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuemax.
|
|
189
|
+
*
|
|
190
|
+
* Value: a number representing the maximum allowed value for a range widget.
|
|
191
|
+
*/
|
|
44
192
|
VALUEMAX = "valuemax",
|
|
193
|
+
/**
|
|
194
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuemin.
|
|
195
|
+
*
|
|
196
|
+
* Value: a number representing the minimum allowed value for a range widget.
|
|
197
|
+
*/
|
|
45
198
|
VALUEMIN = "valuemin",
|
|
46
|
-
|
|
47
|
-
|
|
199
|
+
/**
|
|
200
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-owns
|
|
201
|
+
*
|
|
202
|
+
* Value: a space-separated list of element IDs that are owned by the current element.
|
|
203
|
+
*/
|
|
204
|
+
OWNS = "owns"
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Used to control how verbose generated a11y labels are.
|
|
208
|
+
*/
|
|
209
|
+
export declare enum Verbosity {
|
|
210
|
+
TERSE = 0,
|
|
211
|
+
STANDARD = 1,
|
|
212
|
+
LOQUACIOUS = 2
|
|
48
213
|
}
|
|
49
214
|
/**
|
|
50
|
-
*
|
|
215
|
+
* Removes the ARIA role from an element.
|
|
51
216
|
*
|
|
52
|
-
* Similar to Closure's goog.a11y.aria
|
|
217
|
+
* Similar to Closure's goog.a11y.aria.removeRole
|
|
53
218
|
*
|
|
54
|
-
* @param element DOM
|
|
55
|
-
* @param roleName Role name.
|
|
219
|
+
* @param element DOM element to remove the role from.
|
|
56
220
|
*/
|
|
57
|
-
export declare function
|
|
221
|
+
export declare function removeRole(element: Element): void;
|
|
58
222
|
/**
|
|
59
|
-
*
|
|
60
|
-
* Copied from Closure's goog.a11y.aria
|
|
223
|
+
* Updates the specific role for the specified element.
|
|
61
224
|
*
|
|
62
|
-
* @param element
|
|
63
|
-
* @param
|
|
64
|
-
*
|
|
65
|
-
|
|
66
|
-
|
|
225
|
+
* @param element The element whose ARIA role should be changed.
|
|
226
|
+
* @param roleName The new role for the specified element, or null if its role
|
|
227
|
+
* should be cleared.
|
|
228
|
+
*/
|
|
229
|
+
export declare function setRole(element: Element, roleName: Role | null): void;
|
|
230
|
+
/**
|
|
231
|
+
* Returns the ARIA role of the specified element, or null if it either doesn't
|
|
232
|
+
* have a designated role or if that role is unknown.
|
|
233
|
+
*
|
|
234
|
+
* @param element The element from which to retrieve its ARIA role.
|
|
235
|
+
* @returns The ARIA role of the element, or null if undefined or unknown.
|
|
236
|
+
*/
|
|
237
|
+
export declare function getRole(element: Element): Role | null;
|
|
238
|
+
/**
|
|
239
|
+
* Sets the specified ARIA state by its name and value for the specified
|
|
240
|
+
* element.
|
|
241
|
+
*
|
|
242
|
+
* Note that the type of value is not validated against the specific type of
|
|
243
|
+
* state being changed, so it's up to callers to ensure the correct value is
|
|
244
|
+
* used for the given state.
|
|
245
|
+
*
|
|
246
|
+
* @param element The element whose ARIA state may be changed.
|
|
247
|
+
* @param stateName The state to change.
|
|
248
|
+
* @param value The new value to specify for the provided state.
|
|
67
249
|
*/
|
|
68
250
|
export declare function setState(element: Element, stateName: State, value: string | boolean | number | string[]): void;
|
|
251
|
+
/**
|
|
252
|
+
* Clears the specified ARIA state by removing any related attributes from the
|
|
253
|
+
* specified element that have been set using setState().
|
|
254
|
+
*
|
|
255
|
+
* @param element The element whose ARIA state may be changed.
|
|
256
|
+
* @param stateName The state to clear from the provided element.
|
|
257
|
+
*/
|
|
258
|
+
export declare function clearState(element: Element, stateName: State): void;
|
|
259
|
+
/**
|
|
260
|
+
* Returns a string representation of the specified state for the specified
|
|
261
|
+
* element, or null if it's not defined or specified.
|
|
262
|
+
*
|
|
263
|
+
* Note that an explicit set state of 'null' will return the 'null' string, not
|
|
264
|
+
* the value null.
|
|
265
|
+
*
|
|
266
|
+
* @param element The element whose state is being retrieved.
|
|
267
|
+
* @param stateName The state to retrieve.
|
|
268
|
+
* @returns The string representation of the requested state for the specified
|
|
269
|
+
* element, or null if not defined.
|
|
270
|
+
*/
|
|
271
|
+
export declare function getState(element: Element, stateName: State): string | null;
|
|
272
|
+
/**
|
|
273
|
+
* Creates an ARIA live region under the specified parent Element to be used
|
|
274
|
+
* for all dynamic announcements via `announceDynamicAriaState`. This must be
|
|
275
|
+
* called only once and before any dynamic announcements can be made.
|
|
276
|
+
*
|
|
277
|
+
* @param parent The container element to which the live region will be appended.
|
|
278
|
+
*/
|
|
279
|
+
export declare function initializeGlobalAriaLiveRegion(parent: HTMLElement): void;
|
|
280
|
+
/**
|
|
281
|
+
* Requests that the specified text be read to the user if a screen reader is
|
|
282
|
+
* currently active.
|
|
283
|
+
*
|
|
284
|
+
* This relies on a centrally managed ARIA live region that is hidden from the
|
|
285
|
+
* visual DOM. This live region is designed to try and ensure the text is read,
|
|
286
|
+
* including if the same text is issued multiple times consecutively. Note that
|
|
287
|
+
* `initializeGlobalAriaLiveRegion` must be called before this can be used.
|
|
288
|
+
*
|
|
289
|
+
* Callers should use this judiciously. It's often considered bad practice to
|
|
290
|
+
* over-announce information that can be inferred from other sources on the page,
|
|
291
|
+
* so this ought to be used only when certain context cannot be easily determined
|
|
292
|
+
* (such as dynamic states that may not have perfect ARIA representations or
|
|
293
|
+
* indications).
|
|
294
|
+
*
|
|
295
|
+
* @param text The text to read to the user.
|
|
296
|
+
* @param options Custom options to configure the announcement. This defaults to
|
|
297
|
+
* the status role and polite assertiveness.
|
|
298
|
+
*/
|
|
299
|
+
export declare function announceDynamicAriaState(text: string, options?: DynamicAnnouncementOptions): void;
|
|
69
300
|
//# sourceMappingURL=aria.d.ts.map
|
package/core/utils/dom.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ export declare class FocusableTreeTraverser {
|
|
|
34
34
|
* the specified IFocusableTree.
|
|
35
35
|
*
|
|
36
36
|
* If the element exists within the specified tree's DOM structure but does
|
|
37
|
-
* not directly correspond to a node
|
|
38
|
-
* root) will be returned to represent the provided element.
|
|
37
|
+
* not directly correspond to a node and is not a tab stop, the nearest parent
|
|
38
|
+
* node (or the tree's root) will be returned to represent the provided element.
|
|
39
39
|
*
|
|
40
40
|
* If the tree contains another nested IFocusableTree, the nested tree may be
|
|
41
41
|
* traversed but its nodes will never be returned here per the contract of
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Find the primary shortcut for this platform and return it as single string
|
|
8
|
+
* in a short user facing format.
|
|
9
|
+
*
|
|
10
|
+
* @param shortcutName The keyboard shortcut name, e.g. "cut".
|
|
11
|
+
* @returns The formatted shortcut.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getShortcutKeysShort(shortcutName: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Find the relevant shortcuts for the given shortcut for the current platform.
|
|
16
|
+
* Keys are returned in a long user facing format, e.g. "Command ⌘ Option ⌥ C"
|
|
17
|
+
*
|
|
18
|
+
* @param shortcutName The keyboard shortcut name, e.g. "cut".
|
|
19
|
+
* @returns The formatted shortcuts as individual keys.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getShortcutKeysLong(shortcutName: string): string[][];
|
|
22
|
+
//# sourceMappingURL=shortcut_formatting.d.ts.map
|
package/core/utils/style.d.ts
CHANGED
|
@@ -53,6 +53,20 @@ export declare function getViewportPageOffset(): Coordinate;
|
|
|
53
53
|
* @returns The computed border widths.
|
|
54
54
|
*/
|
|
55
55
|
export declare function getBorderBox(element: Element): Rect;
|
|
56
|
+
/**
|
|
57
|
+
* Converts a point in page coordinates into the equivalent CSS `left`/`top`
|
|
58
|
+
* for an absolutely positioned child of `container`.
|
|
59
|
+
*
|
|
60
|
+
* Those properties are resolved against the container's padding box, so the
|
|
61
|
+
* container's border widths have to be subtracted along with its position.
|
|
62
|
+
*
|
|
63
|
+
* @param x Horizontal page coordinate.
|
|
64
|
+
* @param y Vertical page coordinate.
|
|
65
|
+
* @param container The relatively positioned parent element.
|
|
66
|
+
* @returns The equivalent point relative to the container's padding box.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare function pageToContainerOffset(x: number, y: number, container: Element): Coordinate;
|
|
56
70
|
/**
|
|
57
71
|
* Changes the scroll position of `container` with the minimum amount so
|
|
58
72
|
* that the content and the borders of the given `element` become visible.
|
package/core/utils/toolbox.d.ts
CHANGED
|
@@ -154,10 +154,6 @@ export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition
|
|
|
154
154
|
* @internal
|
|
155
155
|
*/
|
|
156
156
|
export declare function hasCategories(toolboxJson: ToolboxInfo | null): boolean;
|
|
157
|
-
/**
|
|
158
|
-
* Private version of hasCategories for stubbing in tests.
|
|
159
|
-
*/
|
|
160
|
-
declare function hasCategoriesInternal(toolboxJson: ToolboxInfo | null): boolean;
|
|
161
157
|
/**
|
|
162
158
|
* Whether or not the category is collapsible.
|
|
163
159
|
*
|
|
@@ -173,8 +169,4 @@ export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boole
|
|
|
173
169
|
* @returns DOM tree of blocks, or null.
|
|
174
170
|
*/
|
|
175
171
|
export declare function parseToolboxTree(toolboxDef: Element | null | string): Element | null;
|
|
176
|
-
export declare const TEST_ONLY: {
|
|
177
|
-
hasCategoriesInternal: typeof hasCategoriesInternal;
|
|
178
|
-
};
|
|
179
|
-
export {};
|
|
180
172
|
//# sourceMappingURL=toolbox.d.ts.map
|