@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
package/core/variable_map.d.ts
CHANGED
|
@@ -3,16 +3,8 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Object representing a map of variables and their types.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_var_delete.js';
|
|
12
|
-
import './events/events_var_rename.js';
|
|
13
|
-
import type { Block } from './block.js';
|
|
14
6
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
15
|
-
import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
7
|
+
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
16
8
|
import type { Workspace } from './workspace.js';
|
|
17
9
|
/**
|
|
18
10
|
* Class for a variable map. This contains a dictionary data structure with
|
|
@@ -45,15 +37,6 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
45
37
|
*/
|
|
46
38
|
renameVariable(variable: IVariableModel<IVariableState>, newName: string): IVariableModel<IVariableState>;
|
|
47
39
|
changeVariableType(variable: IVariableModel<IVariableState>, newType: string): IVariableModel<IVariableState>;
|
|
48
|
-
/**
|
|
49
|
-
* Rename a variable by updating its name in the variable map. Identify the
|
|
50
|
-
* variable to rename with the given ID.
|
|
51
|
-
*
|
|
52
|
-
* @deprecated v12: use VariableMap.renameVariable.
|
|
53
|
-
* @param id ID of the variable to rename.
|
|
54
|
-
* @param newName New variable name.
|
|
55
|
-
*/
|
|
56
|
-
renameVariableById(id: string, newName: string): void;
|
|
57
40
|
/**
|
|
58
41
|
* Update the name of the given variable and refresh all references to it.
|
|
59
42
|
* The new name must not conflict with any existing variable names.
|
|
@@ -99,14 +82,6 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
99
82
|
* @param variable Variable to delete.
|
|
100
83
|
*/
|
|
101
84
|
deleteVariable(variable: IVariableModel<IVariableState>): void;
|
|
102
|
-
/**
|
|
103
|
-
* Delete a variables by the passed in ID and all of its uses from this
|
|
104
|
-
* workspace. May prompt the user for confirmation.
|
|
105
|
-
*
|
|
106
|
-
* @deprecated v12: use Blockly.Variables.deleteVariable.
|
|
107
|
-
* @param id ID of variable to delete.
|
|
108
|
-
*/
|
|
109
|
-
deleteVariableById(id: string): void;
|
|
110
85
|
/**
|
|
111
86
|
* Find the variable by the given name and type and return it. Return null if
|
|
112
87
|
* it is not found.
|
|
@@ -145,20 +120,5 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
145
120
|
* @returns List of variable models.
|
|
146
121
|
*/
|
|
147
122
|
getAllVariables(): IVariableModel<IVariableState>[];
|
|
148
|
-
/**
|
|
149
|
-
* Returns all of the variable names of all types.
|
|
150
|
-
*
|
|
151
|
-
* @deprecated v12: use Blockly.Variables.getAllVariables.
|
|
152
|
-
* @returns All of the variable names of all types.
|
|
153
|
-
*/
|
|
154
|
-
getAllVariableNames(): string[];
|
|
155
|
-
/**
|
|
156
|
-
* Find all the uses of a named variable.
|
|
157
|
-
*
|
|
158
|
-
* @deprecated v12: use Blockly.Variables.getVariableUsesById.
|
|
159
|
-
* @param id ID of the variable to find.
|
|
160
|
-
* @returns Array of block usages.
|
|
161
|
-
*/
|
|
162
|
-
getVariableUsesById(id: string): Block[];
|
|
163
123
|
}
|
|
164
124
|
//# sourceMappingURL=variable_map.d.ts.map
|
package/core/variable_model.d.ts
CHANGED
|
@@ -3,13 +3,7 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
* Components for the variable model.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_var_create.js';
|
|
12
|
-
import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
6
|
+
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
13
7
|
import type { Workspace } from './workspace.js';
|
|
14
8
|
/**
|
|
15
9
|
* Class for a variable model.
|
package/core/variables.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from './block.js';
|
|
7
|
-
import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
7
|
+
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
8
8
|
import type { BlockInfo, FlyoutItemInfo } from './utils/toolbox.js';
|
|
9
9
|
import type { Workspace } from './workspace.js';
|
|
10
10
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
@@ -41,14 +41,13 @@ export declare function allUsedVarModels(ws: Workspace): IVariableModel<IVariabl
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function allDeveloperVariables(workspace: Workspace): string[];
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Construct the elements (blocks and button) required by the flyout for the
|
|
45
|
+
* variable category.
|
|
45
46
|
*
|
|
46
|
-
* @
|
|
47
|
-
* @
|
|
47
|
+
* @param workspace The workspace containing variables.
|
|
48
|
+
* @returns List of flyout contents as JSON.
|
|
48
49
|
*/
|
|
49
|
-
export declare function
|
|
50
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: true): Element[];
|
|
51
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: false): FlyoutItemInfo[];
|
|
50
|
+
export declare function flyoutCategory(workspace: WorkspaceSvg): FlyoutItemInfo[];
|
|
52
51
|
/**
|
|
53
52
|
* Construct the blocks required by the flyout for the variable category.
|
|
54
53
|
*
|
|
@@ -109,7 +108,7 @@ export declare function generateUniqueNameFromOptions(startChar: string, usedNam
|
|
|
109
108
|
* @param opt_type The type of the variable like 'int', 'string', or ''. This
|
|
110
109
|
* will default to '', which is a specific type.
|
|
111
110
|
*/
|
|
112
|
-
export declare function createVariableButtonHandler(workspace:
|
|
111
|
+
export declare function createVariableButtonHandler(workspace: WorkspaceSvg, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
|
|
113
112
|
/**
|
|
114
113
|
* Opens a prompt that allows the user to enter a new name for a variable.
|
|
115
114
|
* Triggers a rename if the new name is valid. Or re-prompts if there is a
|
|
@@ -37,14 +37,12 @@ export declare const onCreateVariableButtonClick_Number: typeof numberButtonClic
|
|
|
37
37
|
declare function colourButtonClickHandler(button: FlyoutButton): void;
|
|
38
38
|
export declare const onCreateVariableButtonClick_Colour: typeof colourButtonClickHandler;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Construct the elements (blocks and button) required by the flyout for the
|
|
41
|
+
* dynamic variables category.
|
|
41
42
|
*
|
|
42
|
-
* @
|
|
43
|
-
* @param workspace The workspace to populate variable blocks for.
|
|
43
|
+
* @returns List of flyout contents as JSON.
|
|
44
44
|
*/
|
|
45
|
-
export declare function
|
|
46
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: true): Element[];
|
|
47
|
-
export declare function flyoutCategory(workspace: WorkspaceSvg, useXml: false): FlyoutItemInfo[];
|
|
45
|
+
export declare function flyoutCategory(workspace: WorkspaceSvg): FlyoutItemInfo[];
|
|
48
46
|
/**
|
|
49
47
|
* Construct the blocks required by the flyout for the variable category.
|
|
50
48
|
*
|
package/core/workspace.d.ts
CHANGED
|
@@ -8,14 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './connection_checker.js';
|
|
12
11
|
import type { Block } from './block.js';
|
|
13
|
-
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
12
|
+
import type { WorkspaceComment } from './comments/workspace_comment.js';
|
|
14
13
|
import type { ConnectionDB } from './connection_db.js';
|
|
15
14
|
import type { Abstract } from './events/events_abstract.js';
|
|
16
15
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
17
16
|
import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
|
|
18
|
-
import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
17
|
+
import type { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
19
18
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
20
19
|
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
21
20
|
import { Options } from './options.js';
|
|
@@ -192,87 +191,6 @@ export declare class Workspace {
|
|
|
192
191
|
getAllBlocks(ordered?: boolean): Block[];
|
|
193
192
|
/** Dispose of all blocks and comments in workspace. */
|
|
194
193
|
clear(): void;
|
|
195
|
-
/**
|
|
196
|
-
* Rename a variable by updating its name in the variable
|
|
197
|
-
* map. Identify the variable to rename with the given ID.
|
|
198
|
-
*
|
|
199
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().renameVariable
|
|
200
|
-
* @param id ID of the variable to rename.
|
|
201
|
-
* @param newName New variable name.
|
|
202
|
-
*/
|
|
203
|
-
renameVariableById(id: string, newName: string): void;
|
|
204
|
-
/**
|
|
205
|
-
* Create a variable with a given name, optional type, and optional ID.
|
|
206
|
-
*
|
|
207
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().createVariable.
|
|
208
|
-
* @param name The name of the variable. This must be unique across variables
|
|
209
|
-
* and procedures.
|
|
210
|
-
* @param opt_type The type of the variable like 'int' or 'string'.
|
|
211
|
-
* Does not need to be unique. Field_variable can filter variables based
|
|
212
|
-
* on their type. This will default to '' which is a specific type.
|
|
213
|
-
* @param opt_id The unique ID of the variable. This will default to a UUID.
|
|
214
|
-
* @returns The newly created variable.
|
|
215
|
-
*/
|
|
216
|
-
createVariable(name: string, opt_type?: string | null, opt_id?: string | null): IVariableModel<IVariableState>;
|
|
217
|
-
/**
|
|
218
|
-
* Find all the uses of the given variable, which is identified by ID.
|
|
219
|
-
*
|
|
220
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariableUsesById
|
|
221
|
-
* @param id ID of the variable to find.
|
|
222
|
-
* @returns Array of block usages.
|
|
223
|
-
*/
|
|
224
|
-
getVariableUsesById(id: string): Block[];
|
|
225
|
-
/**
|
|
226
|
-
* Delete a variables by the passed in ID and all of its uses from this
|
|
227
|
-
* workspace. May prompt the user for confirmation.
|
|
228
|
-
*
|
|
229
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().deleteVariable.
|
|
230
|
-
* @param id ID of variable to delete.
|
|
231
|
-
*/
|
|
232
|
-
deleteVariableById(id: string): void;
|
|
233
|
-
/**
|
|
234
|
-
* Find the variable by the given name and return it. Return null if not
|
|
235
|
-
* found.
|
|
236
|
-
*
|
|
237
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariable.
|
|
238
|
-
* @param name The name to check for.
|
|
239
|
-
* @param opt_type The type of the variable. If not provided it defaults to
|
|
240
|
-
* the empty string, which is a specific type.
|
|
241
|
-
* @returns The variable with the given name.
|
|
242
|
-
*/
|
|
243
|
-
getVariable(name: string, opt_type?: string): IVariableModel<IVariableState> | null;
|
|
244
|
-
/**
|
|
245
|
-
* Find the variable by the given ID and return it. Return null if not found.
|
|
246
|
-
*
|
|
247
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariableById.
|
|
248
|
-
* @param id The ID to check for.
|
|
249
|
-
* @returns The variable with the given ID.
|
|
250
|
-
*/
|
|
251
|
-
getVariableById(id: string): IVariableModel<IVariableState> | null;
|
|
252
|
-
/**
|
|
253
|
-
* Find the variable with the specified type. If type is null, return list of
|
|
254
|
-
* variables with empty string type.
|
|
255
|
-
*
|
|
256
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariablesOfType.
|
|
257
|
-
* @param type Type of the variables to find.
|
|
258
|
-
* @returns The sought after variables of the passed in type. An empty array
|
|
259
|
-
* if none are found.
|
|
260
|
-
*/
|
|
261
|
-
getVariablesOfType(type: string | null): IVariableModel<IVariableState>[];
|
|
262
|
-
/**
|
|
263
|
-
* Return all variables of all types.
|
|
264
|
-
*
|
|
265
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getAllVariables.
|
|
266
|
-
* @returns List of variable models.
|
|
267
|
-
*/
|
|
268
|
-
getAllVariables(): IVariableModel<IVariableState>[];
|
|
269
|
-
/**
|
|
270
|
-
* Returns all variable names of all types.
|
|
271
|
-
*
|
|
272
|
-
* @deprecated v12: use Blockly.Workspace.getVariableMap().getAllVariables.
|
|
273
|
-
* @returns List of all variable names of all types.
|
|
274
|
-
*/
|
|
275
|
-
getAllVariableNames(): string[];
|
|
276
194
|
/**
|
|
277
195
|
* Returns the horizontal offset of the workspace.
|
|
278
196
|
* Intended for LTR/RTL compatibility in XML.
|
|
@@ -353,7 +271,11 @@ export declare class Workspace {
|
|
|
353
271
|
*
|
|
354
272
|
* @param redo False if undo, true if redo.
|
|
355
273
|
*/
|
|
356
|
-
undo(redo
|
|
274
|
+
undo(redo?: boolean): void;
|
|
275
|
+
/**
|
|
276
|
+
* Redoes the previous action.
|
|
277
|
+
*/
|
|
278
|
+
redo(): void;
|
|
357
279
|
/** Clear the undo/redo stacks. */
|
|
358
280
|
clearUndo(): void;
|
|
359
281
|
/**
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
* Object in charge of loading, storing, and playing audio for a
|
|
8
|
-
* workspace.
|
|
9
|
-
*
|
|
10
|
-
* @class
|
|
11
|
-
*/
|
|
6
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
12
7
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
13
8
|
/**
|
|
14
9
|
* Class for loading, storing, and playing audio for a workspace.
|
|
@@ -25,7 +20,7 @@ export declare class WorkspaceAudio {
|
|
|
25
20
|
private readonly context?;
|
|
26
21
|
/**
|
|
27
22
|
* @param parentWorkspace The parent of the workspace this audio object
|
|
28
|
-
* belongs to, or
|
|
23
|
+
* belongs to if it has one, or the workspace that owns this instance.
|
|
29
24
|
*/
|
|
30
25
|
constructor(parentWorkspace: WorkspaceSvg);
|
|
31
26
|
/**
|
|
@@ -50,6 +45,40 @@ export declare class WorkspaceAudio {
|
|
|
50
45
|
* @param opt_volume Volume of sound (0-1).
|
|
51
46
|
*/
|
|
52
47
|
play(name: string, opt_volume?: number): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Plays a beep at the given frequency.
|
|
50
|
+
*
|
|
51
|
+
* @param tone The frequency of the beep to play, in hertz.
|
|
52
|
+
* @param duration The duration of the beep, in seconds. Defaults to 0.2.
|
|
53
|
+
*/
|
|
54
|
+
beep(tone: number, duration?: number): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Plays a standard error beep.
|
|
57
|
+
*/
|
|
58
|
+
playErrorBeep(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* If enabled, plays a tone corresponding to the nesting level of the given
|
|
61
|
+
* node when it differs from the nesting level of the currently focused node.
|
|
62
|
+
* These tones are generally used for accessibility purposes to indicate a
|
|
63
|
+
* scope transition to users who use a screenreader. This method must be
|
|
64
|
+
* called before focus transitions to the given node.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
* @param newNode The soon-to-be-focused node.
|
|
68
|
+
*/
|
|
69
|
+
maybePlayScopeChangeAudioCue(newNode: IFocusableNode): void;
|
|
70
|
+
/**
|
|
71
|
+
* Returns whether or not playing sounds is currently allowed.
|
|
72
|
+
*
|
|
73
|
+
* @returns False if audio is muted or a sound has just been played, otherwise
|
|
74
|
+
* true.
|
|
75
|
+
*/
|
|
76
|
+
private isPlayingAllowed;
|
|
77
|
+
/**
|
|
78
|
+
* Prepares to play audio by recording the time of the last play and resuming
|
|
79
|
+
* the audio context.
|
|
80
|
+
*/
|
|
81
|
+
private prepareToPlay;
|
|
53
82
|
/**
|
|
54
83
|
* @param muted If true, mute sounds. Otherwise, play them.
|
|
55
84
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
7
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
8
|
+
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
9
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
10
|
+
/**
|
|
11
|
+
* A focusable element representing the workspace as a whole.
|
|
12
|
+
*
|
|
13
|
+
* Focus on the workspace itself (i.e. not on any block, comment, or other
|
|
14
|
+
* content) lands here rather than on the workspace's region element. VoiceOver
|
|
15
|
+
* does not announce a region when focus moves into it from a node already
|
|
16
|
+
* inside that region, so focusing the region directly (e.g. after pressing "W"
|
|
17
|
+
* from a block) would be silent. This is an ordinary focusable node, so moving
|
|
18
|
+
* to it is announced. It carries the stack count and a "workspace" role
|
|
19
|
+
* description; the enclosing region keeps a short, stable label
|
|
20
|
+
* ("Blocks workspace.").
|
|
21
|
+
*/
|
|
22
|
+
export declare class WorkspaceFocusTarget implements IFocusableNode, IContextMenu {
|
|
23
|
+
private readonly workspace;
|
|
24
|
+
private readonly element;
|
|
25
|
+
/**
|
|
26
|
+
* @param workspace The workspace this focus target represents.
|
|
27
|
+
* @param element The SVG element that receives focus for the workspace.
|
|
28
|
+
*/
|
|
29
|
+
constructor(workspace: WorkspaceSvg, element: SVGElement);
|
|
30
|
+
/** See IFocusableNode.getFocusableElement. */
|
|
31
|
+
getFocusableElement(): SVGElement;
|
|
32
|
+
/** See IFocusableNode.getFocusableTree. */
|
|
33
|
+
getFocusableTree(): IFocusableTree;
|
|
34
|
+
/** See IFocusableNode.onNodeFocus. */
|
|
35
|
+
onNodeFocus(): void;
|
|
36
|
+
/** See IFocusableNode.onNodeBlur. */
|
|
37
|
+
onNodeBlur(): void;
|
|
38
|
+
/** See IFocusableNode.canBeFocused. */
|
|
39
|
+
canBeFocused(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the workspace this focus target represents.
|
|
42
|
+
*
|
|
43
|
+
* @returns The workspace this focus target represents.
|
|
44
|
+
*/
|
|
45
|
+
getWorkspace(): WorkspaceSvg;
|
|
46
|
+
/**
|
|
47
|
+
* Displays the workspace's context menu.
|
|
48
|
+
*/
|
|
49
|
+
showContextMenu(e: Event): void;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=workspace_focus_target.d.ts.map
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -8,32 +8,26 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './events/events_block_create.js';
|
|
12
|
-
import './events/events_theme_change.js';
|
|
13
|
-
import './events/events_viewport.js';
|
|
14
11
|
import type { Block } from './block.js';
|
|
15
12
|
import type { BlockSvg } from './block_svg.js';
|
|
16
13
|
import * as browserEvents from './browser_events.js';
|
|
17
14
|
import { RenderedWorkspaceComment } from './comments/rendered_workspace_comment.js';
|
|
18
|
-
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
15
|
+
import type { WorkspaceComment } from './comments/workspace_comment.js';
|
|
19
16
|
import { ComponentManager } from './component_manager.js';
|
|
20
|
-
import { ContextMenuOption } from './contextmenu_registry.js';
|
|
17
|
+
import type { ContextMenuOption } from './contextmenu_registry.js';
|
|
21
18
|
import type { FlyoutButton } from './flyout_button.js';
|
|
22
19
|
import { Gesture } from './gesture.js';
|
|
23
20
|
import { Grid } from './grid.js';
|
|
24
21
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
25
|
-
import { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
22
|
+
import type { IContextMenu } from './interfaces/i_contextmenu.js';
|
|
26
23
|
import type { IDragTarget } from './interfaces/i_drag_target.js';
|
|
27
24
|
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
28
25
|
import { type IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
29
26
|
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
30
27
|
import type { IMetricsManager } from './interfaces/i_metrics_manager.js';
|
|
31
28
|
import type { IToolbox } from './interfaces/i_toolbox.js';
|
|
32
|
-
import
|
|
33
|
-
import type { Marker } from './keyboard_nav/marker.js';
|
|
29
|
+
import { Navigator } from './keyboard_nav/navigators/navigator.js';
|
|
34
30
|
import { LayerManager } from './layer_manager.js';
|
|
35
|
-
import { MarkerManager } from './marker_manager.js';
|
|
36
|
-
import { Navigator } from './navigator.js';
|
|
37
31
|
import { Options } from './options.js';
|
|
38
32
|
import type { Renderer } from './renderers/common/renderer.js';
|
|
39
33
|
import type { ScrollbarPair } from './scrollbar_pair.js';
|
|
@@ -48,6 +42,7 @@ import { Svg } from './utils/svg.js';
|
|
|
48
42
|
import * as toolbox from './utils/toolbox.js';
|
|
49
43
|
import { Workspace } from './workspace.js';
|
|
50
44
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
45
|
+
import { WorkspaceFocusTarget } from './workspace_focus_target.js';
|
|
51
46
|
import { ZoomControls } from './zoom_controls.js';
|
|
52
47
|
/**
|
|
53
48
|
* Class for a workspace. This is an onscreen area with optional trashcan,
|
|
@@ -220,7 +215,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
220
215
|
private readonly highlightedBlocks;
|
|
221
216
|
private audioManager;
|
|
222
217
|
private grid;
|
|
223
|
-
private markerManager;
|
|
224
218
|
/**
|
|
225
219
|
* Map from function names to callbacks, for deciding what to do when a
|
|
226
220
|
* custom toolbox category is opened.
|
|
@@ -235,10 +229,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
235
229
|
private readonly renderer;
|
|
236
230
|
/** Cached parent SVG. */
|
|
237
231
|
private cachedParentSvg;
|
|
238
|
-
/** True if keyboard accessibility mode is on, false otherwise. */
|
|
239
|
-
keyboardAccessibilityMode: boolean;
|
|
240
|
-
/** True iff a keyboard-initiated move ("drag") is in progress. */
|
|
241
|
-
keyboardMoveInProgress: boolean;
|
|
242
232
|
/** The list of top-level bounded elements on the workspace. */
|
|
243
233
|
private topBoundedElements;
|
|
244
234
|
/** The recorded drag targets. */
|
|
@@ -250,21 +240,40 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
250
240
|
svgBlockCanvas_: SVGElement;
|
|
251
241
|
svgBubbleCanvas_: SVGElement;
|
|
252
242
|
zoomControls_: ZoomControls | null;
|
|
243
|
+
/**
|
|
244
|
+
* Focus ring in the workspace.
|
|
245
|
+
*/
|
|
246
|
+
private workspaceFocusRing;
|
|
247
|
+
/**
|
|
248
|
+
* Selection ring inside the workspace.
|
|
249
|
+
*/
|
|
250
|
+
private workspaceSelectionRing;
|
|
251
|
+
/**
|
|
252
|
+
* Element that receives focus when the workspace itself (rather than any of
|
|
253
|
+
* its contents) is focused. See {@link WorkspaceFocusTarget}. This is the
|
|
254
|
+
* selection ring (which already represents the workspace being the active
|
|
255
|
+
* node); it's set only for main (non-flyout, non-mutator) workspaces.
|
|
256
|
+
*/
|
|
257
|
+
private workspaceFocusTargetElement;
|
|
258
|
+
/**
|
|
259
|
+
* Focusable node wrapping {@link workspaceFocusTargetElement}, or null if this
|
|
260
|
+
* workspace has no focus target.
|
|
261
|
+
*/
|
|
262
|
+
private workspaceFocusTarget;
|
|
253
263
|
/**
|
|
254
264
|
* Navigator that handles moving focus between items in this workspace in
|
|
255
265
|
* response to keyboard navigation commands.
|
|
256
266
|
*/
|
|
257
267
|
private navigator;
|
|
258
268
|
/**
|
|
259
|
-
*
|
|
269
|
+
* Whether this workspace has ever been focused. Used to announce usage hints
|
|
270
|
+
* to screenreaders on initial focus only.
|
|
260
271
|
*/
|
|
261
|
-
|
|
272
|
+
private static everFocused;
|
|
262
273
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* @returns The marker manager.
|
|
274
|
+
* @param options Dictionary of options.
|
|
266
275
|
*/
|
|
267
|
-
|
|
276
|
+
constructor(options: Options);
|
|
268
277
|
/**
|
|
269
278
|
* Gets the metrics manager for this workspace.
|
|
270
279
|
*
|
|
@@ -284,21 +293,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
284
293
|
* @returns The component manager.
|
|
285
294
|
*/
|
|
286
295
|
getComponentManager(): ComponentManager;
|
|
287
|
-
/**
|
|
288
|
-
* Get the marker with the given ID.
|
|
289
|
-
*
|
|
290
|
-
* @param id The ID of the marker.
|
|
291
|
-
* @returns The marker with the given ID or null if no marker with the given
|
|
292
|
-
* ID exists.
|
|
293
|
-
* @internal
|
|
294
|
-
*/
|
|
295
|
-
getMarker(id: string): Marker | null;
|
|
296
|
-
/**
|
|
297
|
-
* The cursor for this workspace.
|
|
298
|
-
*
|
|
299
|
-
* @returns The cursor for the workspace.
|
|
300
|
-
*/
|
|
301
|
-
getCursor(): LineCursor;
|
|
302
296
|
/**
|
|
303
297
|
* Get the block renderer attached to this workspace.
|
|
304
298
|
*
|
|
@@ -406,6 +400,15 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
406
400
|
* @param handler Data that can be passed to eventHandling.unbind.
|
|
407
401
|
*/
|
|
408
402
|
setResizeHandlerWrapper(handler: browserEvents.Data): void;
|
|
403
|
+
/**
|
|
404
|
+
* Sets Aria labels, roles, etc. for the workspace depending on the type of workspace it is.
|
|
405
|
+
*/
|
|
406
|
+
setInitialAriaContext(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Updates the focus target's label to reflect the number of top-level stacks in the
|
|
409
|
+
* workspace. No-op for workspaces without a focus target (flyouts and mutators).
|
|
410
|
+
*/
|
|
411
|
+
private updateAriaLabel;
|
|
409
412
|
/**
|
|
410
413
|
* Create the workspace DOM elements.
|
|
411
414
|
*
|
|
@@ -487,6 +490,14 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
487
490
|
* trash, zoom, toolbox, etc. (e.g. window resize).
|
|
488
491
|
*/
|
|
489
492
|
resize(): void;
|
|
493
|
+
/**
|
|
494
|
+
* Sizes the given focus/selection ring inside the bounds of the workspace.
|
|
495
|
+
*
|
|
496
|
+
* @param ring The interior workspace ring indicator to resize.
|
|
497
|
+
* @param inset How many pixels in from the bounds of the workspace the ring
|
|
498
|
+
* should be positioned.
|
|
499
|
+
*/
|
|
500
|
+
private resizeWorkspaceRing;
|
|
490
501
|
/**
|
|
491
502
|
* Resizes and repositions workspace chrome if the page has a new
|
|
492
503
|
* scroll position.
|
|
@@ -606,13 +617,12 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
606
617
|
*/
|
|
607
618
|
newComment(id?: string): WorkspaceComment;
|
|
608
619
|
/**
|
|
609
|
-
* Returns the drag target the
|
|
620
|
+
* Returns the drag target at the given point.
|
|
610
621
|
*
|
|
611
|
-
* @param
|
|
612
|
-
* @returns Null if not over a drag target, or the drag target
|
|
613
|
-
* over.
|
|
622
|
+
* @param point A pointer event, or a point in client/viewport coordinates.
|
|
623
|
+
* @returns Null if not over a drag target, or the drag target at that point.
|
|
614
624
|
*/
|
|
615
|
-
getDragTarget(
|
|
625
|
+
getDragTarget(point: PointerEvent | Coordinate): IDragTarget | null;
|
|
616
626
|
/**
|
|
617
627
|
* Handle a pointerdown on SVG drawing surface.
|
|
618
628
|
*
|
|
@@ -633,24 +643,6 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
633
643
|
* @returns New location of object.
|
|
634
644
|
*/
|
|
635
645
|
moveDrag(e: PointerEvent): Coordinate;
|
|
636
|
-
/**
|
|
637
|
-
* Indicate whether a keyboard move is in progress or not.
|
|
638
|
-
*
|
|
639
|
-
* Should be called with true when a keyboard move of an IDraggable
|
|
640
|
-
* is starts, and false when it finishes or is aborted.
|
|
641
|
-
*
|
|
642
|
-
* N.B.: This method is experimental and internal-only. It is
|
|
643
|
-
* intended only to called only from the keyboard navigation plugin.
|
|
644
|
-
* Its signature and behaviour may be modified, or the method
|
|
645
|
-
* removed, at an time without notice and without being treated
|
|
646
|
-
* as a breaking change.
|
|
647
|
-
*
|
|
648
|
-
* TODO(#8960): Delete this.
|
|
649
|
-
*
|
|
650
|
-
* @internal
|
|
651
|
-
* @param inProgress Is a keyboard-initated move in progress?
|
|
652
|
-
*/
|
|
653
|
-
setKeyboardMoveInProgress(inProgress: boolean): void;
|
|
654
646
|
/**
|
|
655
647
|
* Returns true iff the user is currently engaged in a drag gesture,
|
|
656
648
|
* or if a keyboard-initated move is in progress.
|
|
@@ -809,8 +801,9 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
809
801
|
*
|
|
810
802
|
* @param x Target X to scroll to.
|
|
811
803
|
* @param y Target Y to scroll to.
|
|
804
|
+
* @param shouldHidePopups Whether to hide popups. Defaults to true.
|
|
812
805
|
*/
|
|
813
|
-
scroll(x: number, y: number): void;
|
|
806
|
+
scroll(x: number, y: number, shouldHidePopups?: boolean): void;
|
|
814
807
|
/**
|
|
815
808
|
* Find the block on this workspace with the specified ID.
|
|
816
809
|
*
|
|
@@ -1054,6 +1047,17 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
1054
1047
|
getFocusableTree(): IFocusableTree;
|
|
1055
1048
|
/** See IFocusableNode.onNodeFocus. */
|
|
1056
1049
|
onNodeFocus(): void;
|
|
1050
|
+
/**
|
|
1051
|
+
* Handles the workspace's focus target receiving focus, which represents focus
|
|
1052
|
+
* landing on the workspace as a whole.
|
|
1053
|
+
*
|
|
1054
|
+
* @internal
|
|
1055
|
+
*/
|
|
1056
|
+
handleWorkspaceFocusTargetFocus(): void;
|
|
1057
|
+
/**
|
|
1058
|
+
* Announces the screen reader hint the first time any workspace is focused.
|
|
1059
|
+
*/
|
|
1060
|
+
private maybeAnnounceScreenreaderHint;
|
|
1057
1061
|
/** See IFocusableNode.onNodeBlur. */
|
|
1058
1062
|
onNodeBlur(): void;
|
|
1059
1063
|
/** See IFocusableNode.canBeFocused. */
|
|
@@ -1062,6 +1066,16 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
1062
1066
|
getRootFocusableNode(): IFocusableNode;
|
|
1063
1067
|
/** See IFocusableTree.getRestoredFocusableNode. */
|
|
1064
1068
|
getRestoredFocusableNode(previousNode: IFocusableNode | null): IFocusableNode | null;
|
|
1069
|
+
/**
|
|
1070
|
+
* Returns the focusable node representing this workspace as a whole, or null
|
|
1071
|
+
* for workspaces without one (flyouts and mutators).
|
|
1072
|
+
*
|
|
1073
|
+
* Focus lands here when the workspace itself is focused (e.g. via the focus
|
|
1074
|
+
* workspace shortcut) rather than on any of its contents.
|
|
1075
|
+
*
|
|
1076
|
+
* @returns This workspace's focus target node, if any.
|
|
1077
|
+
*/
|
|
1078
|
+
getWorkspaceFocusTarget(): WorkspaceFocusTarget | null;
|
|
1065
1079
|
/** See IFocusableTree.getNestedTrees. */
|
|
1066
1080
|
getNestedTrees(): Array<IFocusableTree>;
|
|
1067
1081
|
/**
|
|
@@ -1077,6 +1091,11 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
1077
1091
|
onTreeFocus(_node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
1078
1092
|
/** See IFocusableTree.onTreeBlur. */
|
|
1079
1093
|
onTreeBlur(nextTree: IFocusableTree | null): void;
|
|
1094
|
+
/**
|
|
1095
|
+
* Handles the user acting on this workspace via keyboard navigation by
|
|
1096
|
+
* prompting them to use the arrow keys (instead of Enter) to navigate.
|
|
1097
|
+
*/
|
|
1098
|
+
performAction(): void;
|
|
1080
1099
|
/**
|
|
1081
1100
|
* Returns an object responsible for coordinating movement of focus between
|
|
1082
1101
|
* items on this workspace in response to keyboard navigation commands.
|
package/core/xml.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { Block } from './block.js';
|
|
|
7
7
|
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
8
8
|
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
9
9
|
import type { Workspace } from './workspace.js';
|
|
10
|
-
import { WorkspaceSvg } from './workspace_svg.js';
|
|
10
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Encode a block tree as XML.
|
|
13
13
|
*
|