@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,14 +3,10 @@
|
|
|
3
3
|
* Copyright 2016 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Components for creating connections between blocks.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
6
|
import type { BlockSvg } from './block_svg.js';
|
|
12
7
|
import { Connection } from './connection.js';
|
|
13
|
-
import {
|
|
8
|
+
import type { InsertionMarker } from './insertion_marker.js';
|
|
9
|
+
import type { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
14
10
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
15
11
|
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
16
12
|
import { Coordinate } from './utils/coordinate.js';
|
|
@@ -24,6 +20,7 @@ export declare class RenderedConnection extends Connection implements IContextMe
|
|
|
24
20
|
private readonly offsetInBlock;
|
|
25
21
|
private trackedState;
|
|
26
22
|
private highlighted;
|
|
23
|
+
private insertionMarker?;
|
|
27
24
|
/** Connection this connection connects to. Null if not connected. */
|
|
28
25
|
targetConnection: RenderedConnection | null;
|
|
29
26
|
/**
|
|
@@ -133,6 +130,18 @@ export declare class RenderedConnection extends Connection implements IContextMe
|
|
|
133
130
|
connection: RenderedConnection | null;
|
|
134
131
|
radius: number;
|
|
135
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Sets the aria role and role description for this connection.
|
|
135
|
+
*
|
|
136
|
+
* @param highlightSvg The focusable element for this connection.
|
|
137
|
+
*/
|
|
138
|
+
setAriaRole(highlightSvg: SVGElement): void;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the aria role, label, and other state for this connection.
|
|
141
|
+
*
|
|
142
|
+
* @param highlightSvg The focusable element for this connection.
|
|
143
|
+
*/
|
|
144
|
+
private recomputeAriaContext;
|
|
136
145
|
/** Add highlighting around this connection. */
|
|
137
146
|
highlight(): void;
|
|
138
147
|
/** Remove the highlighting around this connection. */
|
|
@@ -238,6 +247,24 @@ export declare class RenderedConnection extends Connection implements IContextMe
|
|
|
238
247
|
/** See IFocusableNode.canBeFocused. */
|
|
239
248
|
canBeFocused(): boolean;
|
|
240
249
|
private findHighlightSvg;
|
|
250
|
+
/**
|
|
251
|
+
* Associates the given insertion marker with this connection.
|
|
252
|
+
*
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
attachInsertionMarker(marker: InsertionMarker): void;
|
|
256
|
+
/**
|
|
257
|
+
* Removes the insertion marker associated with this connection, if any.
|
|
258
|
+
*
|
|
259
|
+
* @internal
|
|
260
|
+
*/
|
|
261
|
+
detachInsertionMarker(): void;
|
|
262
|
+
/**
|
|
263
|
+
* Returns the insertion marker associated with this connection, if any.
|
|
264
|
+
*
|
|
265
|
+
* @internal
|
|
266
|
+
*/
|
|
267
|
+
getInsertionMarker(): InsertionMarker | undefined;
|
|
241
268
|
}
|
|
242
269
|
export declare namespace RenderedConnection {
|
|
243
270
|
/**
|
|
@@ -244,8 +244,6 @@ export declare class ConstantProvider {
|
|
|
244
244
|
* The <filter> element to use for a debug highlight, or null if not set.
|
|
245
245
|
*/
|
|
246
246
|
private debugFilter;
|
|
247
|
-
/** The <style> element to use for injecting renderer specific CSS. */
|
|
248
|
-
private cssNode;
|
|
249
247
|
/**
|
|
250
248
|
* Cursor colour.
|
|
251
249
|
*/
|
|
@@ -422,7 +420,6 @@ export declare class ConstantProvider {
|
|
|
422
420
|
* Create any DOM elements that this renderer needs (filters, patterns, etc).
|
|
423
421
|
*
|
|
424
422
|
* @param svg The root of the workspace's SVG.
|
|
425
|
-
* @param tagName The name to use for the CSS style tag.
|
|
426
423
|
* @param selector The CSS selector to use.
|
|
427
424
|
* @param injectionDivIfIsParent The div containing the parent workspace and
|
|
428
425
|
* all related workspaces and block containers, if this renderer is for the
|
|
@@ -430,7 +427,7 @@ export declare class ConstantProvider {
|
|
|
430
427
|
* to this container. Child workspaces should not override the CSS variables
|
|
431
428
|
* created by the parent and thus do not need access to the injection div.
|
|
432
429
|
*/
|
|
433
|
-
createDom(svg: SVGElement,
|
|
430
|
+
createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
|
|
434
431
|
/**
|
|
435
432
|
* Create a filter for highlighting the currently rendering block during
|
|
436
433
|
* render debugging.
|
|
@@ -439,10 +436,10 @@ export declare class ConstantProvider {
|
|
|
439
436
|
/**
|
|
440
437
|
* Inject renderer specific CSS into the page.
|
|
441
438
|
*
|
|
442
|
-
* @param
|
|
443
|
-
* @param selector The CSS selector to
|
|
439
|
+
* @param root The document root to inject the CSS into.
|
|
440
|
+
* @param selector The CSS selector to interpolate into the stylesheet.
|
|
444
441
|
*/
|
|
445
|
-
protected injectCSS_(
|
|
442
|
+
protected injectCSS_(root: Document | ShadowRoot, selector: string): void;
|
|
446
443
|
/**
|
|
447
444
|
* Get any renderer specific CSS to inject when the renderer is initialized.
|
|
448
445
|
*
|
|
@@ -84,5 +84,13 @@ export interface IPathObject {
|
|
|
84
84
|
* @param blockStyle The block style to use.
|
|
85
85
|
*/
|
|
86
86
|
setStyle?(blockStyle: BlockStyle): void;
|
|
87
|
+
/**
|
|
88
|
+
* Add or remove styling indicating that a block will be bumped out and
|
|
89
|
+
* replaced by another block that is mid-move.
|
|
90
|
+
*
|
|
91
|
+
* @param replacing True if the block is at risk of being replaced, false
|
|
92
|
+
* otherwise.
|
|
93
|
+
*/
|
|
94
|
+
updateReplacing?(replacing: boolean): void;
|
|
87
95
|
}
|
|
88
96
|
//# sourceMappingURL=i_path_object.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import { Input } from '../../inputs/input.js';
|
|
7
|
+
import type { Input } from '../../inputs/input.js';
|
|
8
8
|
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
9
9
|
import type { Measurable } from '../measurables/base.js';
|
|
10
10
|
import { BottomRow } from '../measurables/bottom_row.js';
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import type {
|
|
8
|
-
import { RenderedConnection } from '../../rendered_connection.js';
|
|
7
|
+
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
9
8
|
import type { BlockStyle } from '../../theme.js';
|
|
10
|
-
import { Coordinate } from '../../utils/coordinate.js';
|
|
9
|
+
import type { Coordinate } from '../../utils/coordinate.js';
|
|
11
10
|
import type { ConstantProvider } from './constants.js';
|
|
12
11
|
import type { IPathObject } from './i_path_object.js';
|
|
13
12
|
/**
|
|
@@ -105,21 +104,13 @@ export declare class PathObject implements IPathObject {
|
|
|
105
104
|
*/
|
|
106
105
|
updateMovable(enable: boolean): void;
|
|
107
106
|
/**
|
|
108
|
-
* Add or remove styling that
|
|
109
|
-
*
|
|
110
|
-
* Otherwise it will bump.
|
|
107
|
+
* Add or remove styling indicating that a block will be bumped out and
|
|
108
|
+
* replaced by another block that is mid-move.
|
|
111
109
|
*
|
|
112
|
-
* @param
|
|
113
|
-
|
|
114
|
-
updateReplacementFade(enable: boolean): void;
|
|
115
|
-
/**
|
|
116
|
-
* Add or remove styling that shows that if the dragging block is dropped,
|
|
117
|
-
* this block will be connected to the input.
|
|
118
|
-
*
|
|
119
|
-
* @param _conn The connection on the input to highlight.
|
|
120
|
-
* @param _enable True if styling should be added.
|
|
110
|
+
* @param replacing True if the block is at risk of being replaced, false
|
|
111
|
+
* otherwise.
|
|
121
112
|
*/
|
|
122
|
-
|
|
113
|
+
updateReplacing(replacing: boolean): void;
|
|
123
114
|
/** Adds the given path as a connection highlight for the given connection. */
|
|
124
115
|
addConnectionHighlight(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean): SVGElement;
|
|
125
116
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import { Connection } from '../../connection.js';
|
|
8
7
|
import type { IRegistrable } from '../../interfaces/i_registrable.js';
|
|
8
|
+
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
9
9
|
import type { BlockStyle, Theme } from '../../theme.js';
|
|
10
10
|
import { ConstantProvider } from './constants.js';
|
|
11
11
|
import { Drawer } from './drawer.js';
|
|
@@ -113,10 +113,10 @@ export declare class Renderer implements IRegistrable {
|
|
|
113
113
|
/**
|
|
114
114
|
* Determine whether or not to highlight a connection.
|
|
115
115
|
*
|
|
116
|
-
* @param
|
|
116
|
+
* @param connection The connection to determine whether or not to highlight.
|
|
117
117
|
* @returns True if we should highlight the connection.
|
|
118
118
|
*/
|
|
119
|
-
shouldHighlightConnection(
|
|
119
|
+
shouldHighlightConnection(connection: RenderedConnection): boolean;
|
|
120
120
|
/**
|
|
121
121
|
* Checks if an orphaned block can connect to the "end" of the topBlock's
|
|
122
122
|
* block-clump. If the clump is a row the end is the last input. If the clump
|
|
@@ -65,10 +65,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
65
65
|
SELECTED_GLOW_COLOUR: string;
|
|
66
66
|
/** The size of the selected glow. */
|
|
67
67
|
SELECTED_GLOW_SIZE: number;
|
|
68
|
-
/** The replacement glow colour. */
|
|
69
|
-
REPLACEMENT_GLOW_COLOUR: string;
|
|
70
|
-
/** The size of the selected glow. */
|
|
71
|
-
REPLACEMENT_GLOW_SIZE: number;
|
|
72
68
|
/**
|
|
73
69
|
* The ID of the selected glow filter, or the empty string if no filter is
|
|
74
70
|
* set.
|
|
@@ -78,15 +74,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
78
74
|
* The <filter> element to use for a selected glow, or null if not set.
|
|
79
75
|
*/
|
|
80
76
|
private selectedGlowFilter;
|
|
81
|
-
/**
|
|
82
|
-
* The ID of the replacement glow filter, or the empty string if no filter
|
|
83
|
-
* is set.
|
|
84
|
-
*/
|
|
85
|
-
replacementGlowFilterId: string;
|
|
86
|
-
/**
|
|
87
|
-
* The <filter> element to use for a replacement glow, or null if not set.
|
|
88
|
-
*/
|
|
89
|
-
private replacementGlowFilter;
|
|
90
77
|
/**
|
|
91
78
|
* The object containing information about the hexagon used for a boolean
|
|
92
79
|
* reporter block. Null before init is called.
|
|
@@ -159,7 +146,7 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
159
146
|
};
|
|
160
147
|
generateSecondaryColour_(colour: string): string;
|
|
161
148
|
generateTertiaryColour_(colour: string): string;
|
|
162
|
-
createDom(svg: SVGElement,
|
|
149
|
+
createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
|
|
163
150
|
getCSS_(selector: string): string[];
|
|
164
151
|
}
|
|
165
152
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
7
|
import { Drawer as BaseDrawer } from '../common/drawer.js';
|
|
8
|
-
import { Connection } from '../measurables/connection.js';
|
|
8
|
+
import type { Connection } from '../measurables/connection.js';
|
|
9
9
|
import type { InlineInput } from '../measurables/inline_input.js';
|
|
10
10
|
import type { Row } from '../measurables/row.js';
|
|
11
11
|
import type { RenderInfo } from './info.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import { Input } from '../../inputs/input.js';
|
|
7
|
+
import type { Input } from '../../inputs/input.js';
|
|
8
8
|
import { RenderInfo as BaseRenderInfo } from '../common/info.js';
|
|
9
9
|
import type { Measurable } from '../measurables/base.js';
|
|
10
10
|
import type { Row } from '../measurables/row.js';
|
|
@@ -13,6 +13,15 @@ import { BottomRow } from './measurables/bottom_row.js';
|
|
|
13
13
|
import { RightConnectionShape } from './measurables/row_elements.js';
|
|
14
14
|
import { TopRow } from './measurables/top_row.js';
|
|
15
15
|
import type { Renderer } from './renderer.js';
|
|
16
|
+
/**
|
|
17
|
+
* Horizontal inset from a round output-cap tip needed so content at the given
|
|
18
|
+
* vertical distance from the centerline stays inside the circle.
|
|
19
|
+
*
|
|
20
|
+
* @param radius Round cap radius (dynamic connection width).
|
|
21
|
+
* @param distanceFromCenter Vertical distance from the cap centerline.
|
|
22
|
+
* @returns Clearance from the tip to the content edge.
|
|
23
|
+
*/
|
|
24
|
+
export declare function roundCapClearance(radius: number, distanceFromCenter: number): number;
|
|
16
25
|
/**
|
|
17
26
|
* An object containing all sizing information needed to draw this block.
|
|
18
27
|
*
|
|
@@ -21,6 +21,6 @@ export declare class BottomRow extends BaseBottomRow {
|
|
|
21
21
|
/** Render a round corner unless the block has an output connection. */
|
|
22
22
|
hasLeftSquareCorner(block: BlockSvg): boolean;
|
|
23
23
|
/** Render a round corner unless the block has an output connection. */
|
|
24
|
-
hasRightSquareCorner(block: BlockSvg):
|
|
24
|
+
hasRightSquareCorner(block: BlockSvg): boolean;
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=bottom_row.d.ts.map
|
|
@@ -23,6 +23,6 @@ export declare class TopRow extends BaseTopRow {
|
|
|
23
23
|
/** Render a round corner unless the block has an output connection. */
|
|
24
24
|
hasLeftSquareCorner(block: BlockSvg): boolean;
|
|
25
25
|
/** Render a round corner unless the block has an output connection. */
|
|
26
|
-
hasRightSquareCorner(block: BlockSvg):
|
|
26
|
+
hasRightSquareCorner(block: BlockSvg): boolean;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=top_row.d.ts.map
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import type { Connection } from '../../connection.js';
|
|
8
7
|
import type { BlockStyle } from '../../theme.js';
|
|
9
8
|
import { PathObject as BasePathObject } from '../common/path_object.js';
|
|
10
9
|
import type { ConstantProvider } from './constants.js';
|
|
@@ -40,8 +39,6 @@ export declare class PathObject extends BasePathObject {
|
|
|
40
39
|
applyColour(block: BlockSvg): void;
|
|
41
40
|
flipRTL(): void;
|
|
42
41
|
updateSelected(enable: boolean): void;
|
|
43
|
-
updateReplacementFade(enable: boolean): void;
|
|
44
|
-
updateShapeForInputHighlight(conn: Connection, enable: boolean): void;
|
|
45
42
|
/**
|
|
46
43
|
* Method that's called when the drawer is about to draw the block.
|
|
47
44
|
*/
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
+
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
7
8
|
import type { BlockStyle } from '../../theme.js';
|
|
8
9
|
import type { RenderInfo as BaseRenderInfo } from '../common/info.js';
|
|
9
10
|
import { Renderer as BaseRenderer } from '../common/renderer.js';
|
|
@@ -60,5 +61,12 @@ export declare class Renderer extends BaseRenderer {
|
|
|
60
61
|
* @returns The constant provider.
|
|
61
62
|
*/
|
|
62
63
|
getConstants(): ConstantProvider;
|
|
64
|
+
/**
|
|
65
|
+
* Determine whether or not to highlight a connection.
|
|
66
|
+
*
|
|
67
|
+
* @param connection The connection to determine whether or not to highlight.
|
|
68
|
+
* @returns True if we should highlight the connection.
|
|
69
|
+
*/
|
|
70
|
+
shouldHighlightConnection(connection: RenderedConnection): boolean;
|
|
63
71
|
}
|
|
64
72
|
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
-
import { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
6
|
+
import type { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
+
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
8
|
import type { ISerializer } from '../interfaces/i_serializer.js';
|
|
9
9
|
import type { Workspace } from '../workspace.js';
|
|
10
10
|
/** Represents the state of a procedure model. */
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { WorkspaceComment } from '../comments/workspace_comment.js';
|
|
7
|
-
import { ISerializer } from '../interfaces/i_serializer.js';
|
|
8
|
-
import { Workspace } from '../workspace.js';
|
|
7
|
+
import type { ISerializer } from '../interfaces/i_serializer.js';
|
|
8
|
+
import type { Workspace } from '../workspace.js';
|
|
9
9
|
export interface State {
|
|
10
10
|
id?: string;
|
|
11
11
|
text?: string;
|
package/core/shortcut_items.d.ts
CHANGED
|
@@ -14,7 +14,45 @@ export declare enum names {
|
|
|
14
14
|
PASTE = "paste",
|
|
15
15
|
UNDO = "undo",
|
|
16
16
|
REDO = "redo",
|
|
17
|
-
MENU = "menu"
|
|
17
|
+
MENU = "menu",
|
|
18
|
+
FOCUS_WORKSPACE = "focus_workspace",
|
|
19
|
+
FOCUS_TOOLBOX = "focus_toolbox",
|
|
20
|
+
START_MOVE = "start_move",
|
|
21
|
+
START_MOVE_STACK = "start_move_stack",
|
|
22
|
+
FINISH_MOVE = "finish_move",
|
|
23
|
+
ABORT_MOVE = "abort_move",
|
|
24
|
+
MOVE_UP = "move_up",
|
|
25
|
+
MOVE_DOWN = "move_down",
|
|
26
|
+
MOVE_LEFT = "move_left",
|
|
27
|
+
MOVE_RIGHT = "move_right",
|
|
28
|
+
NAVIGATE_RIGHT = "right",
|
|
29
|
+
NAVIGATE_LEFT = "left",
|
|
30
|
+
NAVIGATE_UP = "up",
|
|
31
|
+
NAVIGATE_DOWN = "down",
|
|
32
|
+
DISCONNECT = "disconnect",
|
|
33
|
+
NEXT_STACK = "next_stack",
|
|
34
|
+
PREVIOUS_STACK = "previous_stack",
|
|
35
|
+
INFORMATION = "information",
|
|
36
|
+
EXTENDED_INFORMATION = "extended_information",
|
|
37
|
+
PERFORM_ACTION = "perform_action",
|
|
38
|
+
DUPLICATE = "duplicate",
|
|
39
|
+
CLEANUP = "cleanup",
|
|
40
|
+
SHOW_TOOLTIP = "show_tooltip",
|
|
41
|
+
NEXT_HEADING = "next_heading",
|
|
42
|
+
PREVIOUS_HEADING = "previous_heading",
|
|
43
|
+
TOGGLE_SCREENREADER = "toggle_screenreader",
|
|
44
|
+
JUMP_TOP_STACK = "jump_to_top_of_stack",
|
|
45
|
+
JUMP_BOTTOM_STACK = "jump_to_bottom_of_stack",
|
|
46
|
+
JUMP_BLOCK_START = "jump_to_block_start",
|
|
47
|
+
JUMP_BLOCK_END = "jump_to_block_end",
|
|
48
|
+
JUMP_FIRST_BLOCK = "jump_to_first_block",
|
|
49
|
+
JUMP_LAST_BLOCK = "jump_to_last_block",
|
|
50
|
+
JUMP_PREVIOUS_PAGE = "jump_to_previous_page",
|
|
51
|
+
JUMP_NEXT_PAGE = "jump_to_next_page",
|
|
52
|
+
SCROLL_LEFT = "scroll_left",
|
|
53
|
+
SCROLL_RIGHT = "scroll_right",
|
|
54
|
+
SCROLL_UP = "scroll_up",
|
|
55
|
+
SCROLL_DOWN = "scroll_down"
|
|
18
56
|
}
|
|
19
57
|
/**
|
|
20
58
|
* Keyboard shortcut to hide chaff on escape.
|
|
@@ -46,9 +84,120 @@ export declare function registerUndo(): void;
|
|
|
46
84
|
*/
|
|
47
85
|
export declare function registerRedo(): void;
|
|
48
86
|
/**
|
|
49
|
-
*
|
|
87
|
+
* Registers keyboard shortcuts for keyboard-driven movement of workspace
|
|
88
|
+
* elements.
|
|
89
|
+
*/
|
|
90
|
+
export declare function registerMovementShortcuts(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Keyboard shortcut to show the context menu on ctrl/cmd+Enter, shift+F10, and
|
|
93
|
+
* the menu key.
|
|
50
94
|
*/
|
|
51
95
|
export declare function registerShowContextMenu(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Registers keyboard shortcuts to navigate around the Blockly interface.
|
|
98
|
+
*/
|
|
99
|
+
export declare function registerArrowNavigation(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Registers keyboard shortcut to focus the workspace.
|
|
102
|
+
*/
|
|
103
|
+
export declare function registerFocusWorkspace(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Registers keyboard shortcut to focus the toolbox.
|
|
106
|
+
*/
|
|
107
|
+
export declare function registerFocusToolbox(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Registers keyboard shortcut to announce information about the focused
|
|
110
|
+
* element.
|
|
111
|
+
*/
|
|
112
|
+
export declare function registerReadInformation(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Registers keyboard shortcut to announce an extended description of the
|
|
115
|
+
* focused element.
|
|
116
|
+
*/
|
|
117
|
+
export declare function registerReadExtendedInformation(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Registers keyboard shortcut to disconnect the focused block.
|
|
120
|
+
*/
|
|
121
|
+
export declare function registerDisconnectBlock(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Registers keyboard shortcuts to jump between stacks/top-level items on the
|
|
124
|
+
* workspace.
|
|
125
|
+
*/
|
|
126
|
+
export declare function registerStackNavigation(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Registers keyboard shortcuts to jump between headings (labels) in a flyout.
|
|
129
|
+
*
|
|
130
|
+
* Pressing H moves focus to the next heading; Shift+H moves focus to the
|
|
131
|
+
* previous heading. The shortcut only activates when focus is already inside
|
|
132
|
+
* the flyout; otherwise it returns false so other handlers may take over.
|
|
133
|
+
*/
|
|
134
|
+
export declare function registerHeadingNavigation(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Registers keyboard shortcut to perform an action on the focused element.
|
|
137
|
+
*/
|
|
138
|
+
export declare function registerPerformAction(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Registers keyboard shortcut to duplicate a block or workspace comment.
|
|
141
|
+
*/
|
|
142
|
+
export declare function registerDuplicate(): void;
|
|
143
|
+
/**
|
|
144
|
+
* Registers keyboard shortcut to clean up the workspace.
|
|
145
|
+
*/
|
|
146
|
+
export declare function registerCleanup(): void;
|
|
147
|
+
/**
|
|
148
|
+
* Registers keyboard shortcut to display the tooltip for the focused element.
|
|
149
|
+
*/
|
|
150
|
+
export declare function registerShowTooltip(): void;
|
|
151
|
+
/**
|
|
152
|
+
* Registers keyboard shortcut to toggle on or off various behaviors that
|
|
153
|
+
* improve the experience for individuals using screenreaders.
|
|
154
|
+
*/
|
|
155
|
+
export declare function registerToggleScreenreaderMode(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Registers a keyboard shortcut that sets the focus to the block
|
|
158
|
+
* that owns the current focused node.
|
|
159
|
+
*/
|
|
160
|
+
export declare function registerJumpBlockStart(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Registers a keyboard shortcut that sets the focus to the
|
|
163
|
+
* last input of the block that owns the current focused node.
|
|
164
|
+
*/
|
|
165
|
+
export declare function registerJumpBlockEnd(): void;
|
|
166
|
+
/**
|
|
167
|
+
* Registers a keyboard shortcut that sets the focus to the top block
|
|
168
|
+
* in the current stack.
|
|
169
|
+
*/
|
|
170
|
+
export declare function registerJumpTopStack(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Registers a keyboard shortcut that sets the focus to the bottom block
|
|
173
|
+
* in the current stack.
|
|
174
|
+
*/
|
|
175
|
+
export declare function registerJumpBottomStack(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Registers a keyboard shortcut that sets the focus to the first
|
|
178
|
+
* block in the workspace.
|
|
179
|
+
*/
|
|
180
|
+
export declare function registerJumpFirstBlock(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Registers a keyboard shortcut that sets the focus to the last
|
|
183
|
+
* block in the workspace.
|
|
184
|
+
*/
|
|
185
|
+
export declare function registerJumpLastBlock(): void;
|
|
186
|
+
/**
|
|
187
|
+
* Registers a keyboard shortcut that pages backwards through the items of the
|
|
188
|
+
* focused toolbox or flyout.
|
|
189
|
+
*/
|
|
190
|
+
export declare function registerJumpPreviousPage(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Registers a keyboard shortcut that pages forwards through the items of the
|
|
193
|
+
* focused toolbox or flyout.
|
|
194
|
+
*/
|
|
195
|
+
export declare function registerJumpNextPage(): void;
|
|
196
|
+
/**
|
|
197
|
+
* Registers keyboard shortcuts to scroll the focused workspace or flyout with
|
|
198
|
+
* Ctrl/Cmd + arrow keys.
|
|
199
|
+
*/
|
|
200
|
+
export declare function registerWorkspaceScrollShortcuts(): void;
|
|
52
201
|
/**
|
|
53
202
|
* Registers all default keyboard shortcut item. This should be called once per
|
|
54
203
|
* instance of KeyboardShortcutRegistry.
|
|
@@ -56,4 +205,20 @@ export declare function registerShowContextMenu(): void;
|
|
|
56
205
|
* @internal
|
|
57
206
|
*/
|
|
58
207
|
export declare function registerDefaultShortcuts(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Registers an extended set of keyboard shortcuts used to support deep keyboard
|
|
210
|
+
* navigation of Blockly.
|
|
211
|
+
*/
|
|
212
|
+
export declare function registerKeyboardNavigationShortcuts(): void;
|
|
213
|
+
/**
|
|
214
|
+
* Registers keyboard shortcuts used to announce screen reader information.
|
|
215
|
+
*/
|
|
216
|
+
export declare function registerScreenReaderShortcuts(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Registers keyboard shortcuts used to jump between blocks and stacks in the
|
|
219
|
+
* workspace, between items in the toolbox and flyout, and to scroll the
|
|
220
|
+
* workspace or flyout.
|
|
221
|
+
* Note these are not registered by default, so call this function to enable them if desired.
|
|
222
|
+
*/
|
|
223
|
+
export declare function registerNavigationShortcuts(): void;
|
|
59
224
|
//# sourceMappingURL=shortcut_items.d.ts.map
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @class
|
|
11
11
|
*/
|
|
12
|
-
import { Scope } from './contextmenu_registry.js';
|
|
12
|
+
import type { Scope } from './contextmenu_registry.js';
|
|
13
13
|
import { KeyCodes } from './utils/keycodes.js';
|
|
14
|
-
import { WorkspaceSvg } from './workspace_svg.js';
|
|
14
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
15
15
|
/**
|
|
16
16
|
* Class for the registry of keyboard shortcuts. This is intended to be a
|
|
17
17
|
* singleton. You should not create a new instance, and only access this class
|
|
@@ -21,7 +21,7 @@ export declare class ShortcutRegistry {
|
|
|
21
21
|
static readonly registry: ShortcutRegistry;
|
|
22
22
|
/** Registry of all keyboard shortcuts, keyed by name of shortcut. */
|
|
23
23
|
private shortcuts;
|
|
24
|
-
/** Map of key codes to
|
|
24
|
+
/** Map of key codes to a set of shortcut names. */
|
|
25
25
|
private keyMap;
|
|
26
26
|
/** Resets the existing ShortcutRegistry singleton. */
|
|
27
27
|
private constructor();
|
|
@@ -223,6 +223,12 @@ export declare namespace ShortcutRegistry {
|
|
|
223
223
|
* name.
|
|
224
224
|
*/
|
|
225
225
|
allowCollision?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Display text for the shortcut. This is not used in core but may
|
|
228
|
+
* be used by plugins or applications to provide a user-facing
|
|
229
|
+
* label for the shortcut.
|
|
230
|
+
*/
|
|
231
|
+
displayText?: string | (() => string);
|
|
226
232
|
}
|
|
227
233
|
/** Supported modifiers. */
|
|
228
234
|
enum modifierKeys {
|
package/core/theme.d.ts
CHANGED
|
@@ -135,8 +135,6 @@ export declare namespace Theme {
|
|
|
135
135
|
cursorColour?: string;
|
|
136
136
|
selectedGlowColour?: string;
|
|
137
137
|
selectedGlowOpacity?: number;
|
|
138
|
-
replacementGlowColour?: string;
|
|
139
|
-
replacementGlowOpacity?: number;
|
|
140
138
|
}
|
|
141
139
|
interface FontStyle {
|
|
142
140
|
family?: string;
|
package/core/toast.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import * as aria from './utils/aria.js';
|
|
6
7
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
7
8
|
/**
|
|
8
9
|
* Display/configuration options for a toast notification.
|
|
@@ -30,7 +31,7 @@ export interface ToastOptions {
|
|
|
30
31
|
* How prominently/interrupting the readout of the toast should be for
|
|
31
32
|
* screenreaders. Corresponds to aria-live and defaults to polite.
|
|
32
33
|
*/
|
|
33
|
-
assertiveness?:
|
|
34
|
+
assertiveness?: aria.LiveRegionAssertiveness;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* Class that allows for showing and dismissing temporary notifications.
|
|
@@ -61,14 +62,4 @@ export declare class Toast {
|
|
|
61
62
|
*/
|
|
62
63
|
static hide(workspace: WorkspaceSvg, id?: string): void;
|
|
63
64
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Options for how aggressively toasts should be read out by screenreaders.
|
|
66
|
-
* Values correspond to those for aria-live.
|
|
67
|
-
*/
|
|
68
|
-
export declare namespace Toast {
|
|
69
|
-
enum Assertiveness {
|
|
70
|
-
ASSERTIVE = "assertive",
|
|
71
|
-
POLITE = "polite"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
65
|
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -136,6 +136,12 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
136
136
|
* @returns The hex colour for the category.
|
|
137
137
|
*/
|
|
138
138
|
protected getColour_(categoryDef: CategoryInfo): string;
|
|
139
|
+
/**
|
|
140
|
+
* Returns the colour of this category.
|
|
141
|
+
*
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
getColour(): string;
|
|
139
145
|
/**
|
|
140
146
|
* Sets the colour for the category using the style name and returns the new
|
|
141
147
|
* colour as a hex string.
|
|
@@ -229,6 +235,11 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
229
235
|
getName(): string;
|
|
230
236
|
getParent(): ICollapsibleToolboxItem | null;
|
|
231
237
|
getDiv(): HTMLDivElement | null;
|
|
238
|
+
/**
|
|
239
|
+
* Handles this toolbox category gaining focus by informing its parent
|
|
240
|
+
* toolbox that it has been selected.
|
|
241
|
+
*/
|
|
242
|
+
onNodeFocus(): void;
|
|
232
243
|
/**
|
|
233
244
|
* Gets the contents of the category. These are items that are meant to be
|
|
234
245
|
* displayed in the flyout.
|
|
@@ -67,6 +67,8 @@ export declare class CollapsibleToolboxCategory extends ToolboxCategory implemen
|
|
|
67
67
|
isExpanded(): boolean;
|
|
68
68
|
isCollapsible(): boolean;
|
|
69
69
|
onClick(_e: Event): void;
|
|
70
|
+
/** Sets the visibility of the parent toolbox's flyout. */
|
|
71
|
+
private setFlyoutVisible;
|
|
70
72
|
/** Toggles whether or not the category is expanded. */
|
|
71
73
|
toggleExpanded(): void;
|
|
72
74
|
getDiv(): HTMLDivElement | null;
|
|
@@ -30,6 +30,10 @@ export declare class ToolboxSeparator extends ToolboxItem {
|
|
|
30
30
|
protected createDom_(): HTMLDivElement;
|
|
31
31
|
getDiv(): HTMLDivElement;
|
|
32
32
|
dispose(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Prevents separator toolbox items from gaining focus.
|
|
35
|
+
*/
|
|
36
|
+
canBeFocused(): boolean;
|
|
33
37
|
}
|
|
34
38
|
export declare namespace ToolboxSeparator {
|
|
35
39
|
interface CssConfig {
|