@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/bubbles/bubble.d.ts
CHANGED
|
@@ -3,21 +3,28 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
7
|
+
import type { IBubble } from '../interfaces/i_bubble.js';
|
|
7
8
|
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
8
9
|
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
9
10
|
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
10
|
-
import { ISelectable } from '../interfaces/i_selectable.js';
|
|
11
|
+
import type { ISelectable } from '../interfaces/i_selectable.js';
|
|
11
12
|
import { Coordinate } from '../utils/coordinate.js';
|
|
12
13
|
import { Rect } from '../utils/rect.js';
|
|
13
14
|
import { Size } from '../utils/size.js';
|
|
14
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
15
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
16
|
+
/**
|
|
17
|
+
* Represents a either a string or a function that, when called, can provide a
|
|
18
|
+
* custom ARIA string to represent a bubble, or null if the default fallback
|
|
19
|
+
* should be used. See setAriaLabelProvider for more context.
|
|
20
|
+
*/
|
|
21
|
+
export type AriaLabelProvider = string | ((bubble: Bubble) => string | null);
|
|
15
22
|
/**
|
|
16
23
|
* The abstract pop-up bubble class. This creates a UI that looks like a speech
|
|
17
24
|
* bubble, where it has a "tail" that points to the block, and a "head" that
|
|
18
25
|
* displays arbitrary svg elements.
|
|
19
26
|
*/
|
|
20
|
-
export declare abstract class Bubble implements IBubble, ISelectable, IFocusableNode {
|
|
27
|
+
export declare abstract class Bubble implements IBubble, ISelectable, IFocusableNode, IBoundedElement {
|
|
21
28
|
readonly workspace: WorkspaceSvg;
|
|
22
29
|
protected anchor: Coordinate;
|
|
23
30
|
protected ownerRect?: Rect | undefined;
|
|
@@ -65,6 +72,7 @@ export declare abstract class Bubble implements IBubble, ISelectable, IFocusable
|
|
|
65
72
|
private relativeLeft;
|
|
66
73
|
private dragStrategy;
|
|
67
74
|
private focusableElement;
|
|
75
|
+
private ariaLabelProvider;
|
|
68
76
|
/**
|
|
69
77
|
* @param workspace The workspace this bubble belongs to.
|
|
70
78
|
* @param anchor The anchor location of the thing this bubble is attached to.
|
|
@@ -126,6 +134,14 @@ export declare abstract class Bubble implements IBubble, ISelectable, IFocusable
|
|
|
126
134
|
* @internal
|
|
127
135
|
*/
|
|
128
136
|
moveTo(x: number, y: number): void;
|
|
137
|
+
/**
|
|
138
|
+
* Moves the bubble by the given amounts in the x and y directions.
|
|
139
|
+
*
|
|
140
|
+
* @param dx The distance to move along the x axis.
|
|
141
|
+
* @param dy The distance to move along the y axis.
|
|
142
|
+
* @param _reason A description of why this move is happening.
|
|
143
|
+
*/
|
|
144
|
+
moveBy(dx: number, dy: number, _reason?: string[]): void;
|
|
129
145
|
/**
|
|
130
146
|
* Positions the bubble "optimally" so that the most of it is visible and
|
|
131
147
|
* it does not overlap the rect (if provided).
|
|
@@ -182,6 +198,12 @@ export declare abstract class Bubble implements IBubble, ISelectable, IFocusable
|
|
|
182
198
|
bringToFront(): boolean;
|
|
183
199
|
/** @internal */
|
|
184
200
|
getRelativeToSurfaceXY(): Coordinate;
|
|
201
|
+
/**
|
|
202
|
+
* Returns the bounds of this bubble.
|
|
203
|
+
*
|
|
204
|
+
* @returns A bounding box for this bubble.
|
|
205
|
+
*/
|
|
206
|
+
getBoundingRectangle(): Rect;
|
|
185
207
|
/** @internal */
|
|
186
208
|
getSvgRoot(): SVGElement;
|
|
187
209
|
/**
|
|
@@ -201,7 +223,7 @@ export declare abstract class Bubble implements IBubble, ISelectable, IFocusable
|
|
|
201
223
|
/** Returns whether this bubble is movable or not. */
|
|
202
224
|
isMovable(): boolean;
|
|
203
225
|
/** Starts a drag on the bubble. */
|
|
204
|
-
startDrag():
|
|
226
|
+
startDrag(): IBubble;
|
|
205
227
|
/** Drags the bubble to the given location. */
|
|
206
228
|
drag(newLoc: Coordinate): void;
|
|
207
229
|
/** Ends the drag on the bubble. */
|
|
@@ -224,5 +246,37 @@ export declare abstract class Bubble implements IBubble, ISelectable, IFocusable
|
|
|
224
246
|
* Returns the object that owns/hosts this bubble, if any.
|
|
225
247
|
*/
|
|
226
248
|
getOwner(): (IHasBubble & IFocusableNode) | undefined;
|
|
249
|
+
/**
|
|
250
|
+
* Recomputes the ARIA label and role for this bubble. This is automatically called
|
|
251
|
+
* during initialization, but implementations may find it useful to call this if
|
|
252
|
+
* the bubble's label should be changed.
|
|
253
|
+
*
|
|
254
|
+
* Bubbles use a default non-specific label unless they're customized otherwise
|
|
255
|
+
* which is the responsibility of the bubble's owner rather than bubble
|
|
256
|
+
* implementations. Customization can be done via setAriaLabelProvider.
|
|
257
|
+
*/
|
|
258
|
+
protected recomputeAriaContext(): void;
|
|
259
|
+
/**
|
|
260
|
+
* Sets a custom ARIA label provider for this bubble, or null if it should be reset
|
|
261
|
+
* to use the default method.
|
|
262
|
+
*
|
|
263
|
+
* Bubbles do not compute ARIA labels specifically to their implementation since
|
|
264
|
+
* they can be rather general-purpose. Instead, owners of the specific bubble
|
|
265
|
+
* instance (such as an icon) are responsible for defining custom label providers
|
|
266
|
+
* for their bubbles.
|
|
267
|
+
*
|
|
268
|
+
* Note that calling this isn't sufficient for it to actually be used.
|
|
269
|
+
* recomputeAriaContext will likely also need to be called to actually apply the
|
|
270
|
+
* custom label to the bubble's focusable element.
|
|
271
|
+
*/
|
|
272
|
+
setAriaLabelProvider(provider: AriaLabelProvider | null): void;
|
|
273
|
+
/**
|
|
274
|
+
* Returns the ARIA label to use for this bubble based on the provider set via
|
|
275
|
+
* setAriaLabelProvider. This will return null if the provider is absent or
|
|
276
|
+
* returns null.
|
|
277
|
+
*
|
|
278
|
+
* @returns The ARIA label to use for this bubble, or null if one is not provided.
|
|
279
|
+
*/
|
|
280
|
+
getAriaLabel(): string | null;
|
|
227
281
|
}
|
|
228
282
|
//# sourceMappingURL=bubble.d.ts.map
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlocklyOptions } from '../blockly_options.js';
|
|
7
|
-
import { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
7
|
+
import type { Abstract as AbstractEvent } from '../events/events_abstract.js';
|
|
8
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
9
|
+
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
8
10
|
import { Options } from '../options.js';
|
|
9
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
10
12
|
import type { Rect } from '../utils/rect.js';
|
|
11
13
|
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
14
|
import { Bubble } from './bubble.js';
|
|
@@ -18,6 +20,7 @@ export declare class MiniWorkspaceBubble extends Bubble {
|
|
|
18
20
|
readonly workspace: WorkspaceSvg;
|
|
19
21
|
protected anchor: Coordinate;
|
|
20
22
|
protected ownerRect?: Rect | undefined;
|
|
23
|
+
protected owner?: (IHasBubble & IFocusableNode) | undefined;
|
|
21
24
|
/**
|
|
22
25
|
* The minimum amount of change to the mini workspace view to trigger
|
|
23
26
|
* resizing the bubble.
|
|
@@ -38,7 +41,7 @@ export declare class MiniWorkspaceBubble extends Bubble {
|
|
|
38
41
|
*/
|
|
39
42
|
private autoLayout;
|
|
40
43
|
/** @internal */
|
|
41
|
-
constructor(workspaceOptions: BlocklyOptions, workspace: WorkspaceSvg, anchor: Coordinate, ownerRect?: Rect | undefined);
|
|
44
|
+
constructor(workspaceOptions: BlocklyOptions, workspace: WorkspaceSvg, anchor: Coordinate, ownerRect?: Rect | undefined, owner?: (IHasBubble & IFocusableNode) | undefined);
|
|
42
45
|
dispose(): void;
|
|
43
46
|
/** @internal */
|
|
44
47
|
getWorkspace(): WorkspaceSvg;
|
|
@@ -80,5 +83,10 @@ export declare class MiniWorkspaceBubble extends Bubble {
|
|
|
80
83
|
moveTo(x: number, y: number): void;
|
|
81
84
|
/** @internal */
|
|
82
85
|
newWorkspaceSvg(options: Options): WorkspaceSvg;
|
|
86
|
+
/**
|
|
87
|
+
* Handles the user acting on this bubble via keyboard navigation by focusing
|
|
88
|
+
* the mutator workspace.
|
|
89
|
+
*/
|
|
90
|
+
performAction(): void;
|
|
83
91
|
}
|
|
84
92
|
//# sourceMappingURL=mini_workspace_bubble.d.ts.map
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
7
|
+
import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
8
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
9
|
+
import type { Rect } from '../utils/rect.js';
|
|
10
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
9
11
|
import { Bubble } from './bubble.js';
|
|
10
12
|
/**
|
|
11
13
|
* A bubble that displays non-editable text. Used by the warning icon.
|
|
@@ -15,8 +17,9 @@ export declare class TextBubble extends Bubble {
|
|
|
15
17
|
readonly workspace: WorkspaceSvg;
|
|
16
18
|
protected anchor: Coordinate;
|
|
17
19
|
protected ownerRect?: Rect | undefined;
|
|
20
|
+
protected owner?: (IHasBubble & IFocusableNode) | undefined;
|
|
18
21
|
private paragraph;
|
|
19
|
-
constructor(text: string, workspace: WorkspaceSvg, anchor: Coordinate, ownerRect?: Rect | undefined);
|
|
22
|
+
constructor(text: string, workspace: WorkspaceSvg, anchor: Coordinate, ownerRect?: Rect | undefined, owner?: (IHasBubble & IFocusableNode) | undefined);
|
|
20
23
|
/** @returns the current text of this text bubble. */
|
|
21
24
|
getText(): string;
|
|
22
25
|
/** Sets the current text of this text bubble, and updates the display. */
|
|
@@ -9,7 +9,7 @@ import type { IHasBubble } from '../interfaces/i_has_bubble.js';
|
|
|
9
9
|
import { Coordinate } from '../utils/coordinate.js';
|
|
10
10
|
import { Rect } from '../utils/rect.js';
|
|
11
11
|
import { Size } from '../utils/size.js';
|
|
12
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
13
13
|
import { Bubble } from './bubble.js';
|
|
14
14
|
/**
|
|
15
15
|
* A bubble that displays editable text. It can also be resized by the user.
|
|
@@ -43,6 +43,7 @@ export declare class TextInputBubble extends Bubble {
|
|
|
43
43
|
private editable;
|
|
44
44
|
/** View responsible for supporting text editing. */
|
|
45
45
|
private editor;
|
|
46
|
+
private readonly textChangeListener;
|
|
46
47
|
/**
|
|
47
48
|
* @param workspace The workspace this bubble belongs to.
|
|
48
49
|
* @param anchor The anchor location of the thing this bubble is attached to.
|
|
@@ -98,5 +99,14 @@ export declare class TextInputBubble extends Bubble {
|
|
|
98
99
|
* @internal
|
|
99
100
|
*/
|
|
100
101
|
getEditor(): CommentEditor;
|
|
102
|
+
/**
|
|
103
|
+
* Handles the user acting on this bubble via keyboard navigation by focusing
|
|
104
|
+
* the comment editor.
|
|
105
|
+
*/
|
|
106
|
+
performAction(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Dispose of this bubble.
|
|
109
|
+
*/
|
|
110
|
+
dispose(): void;
|
|
101
111
|
}
|
|
102
112
|
//# sourceMappingURL=textinput_bubble.d.ts.map
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from '../block_svg.js';
|
|
7
|
-
import { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
-
import { IPaster } from '../interfaces/i_paster.js';
|
|
9
|
-
import { State } from '../serialization/blocks.js';
|
|
6
|
+
import type { BlockSvg } from '../block_svg.js';
|
|
7
|
+
import type { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
+
import type { IPaster } from '../interfaces/i_paster.js';
|
|
9
|
+
import type { State } from '../serialization/blocks.js';
|
|
10
10
|
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
12
|
export declare class BlockPaster implements IPaster<BlockCopyData, BlockSvg> {
|
|
13
13
|
static TYPE: string;
|
|
14
14
|
paste(copyData: BlockCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): BlockSvg | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
|
|
6
|
+
import type { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
|
|
7
7
|
import type { IPaster } from '../interfaces/i_paster.js';
|
|
8
8
|
/**
|
|
9
9
|
* Registers the given paster so that it cna be used for pasting.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
7
|
-
import { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
-
import { IPaster } from '../interfaces/i_paster.js';
|
|
6
|
+
import type { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
|
|
7
|
+
import type { ICopyData } from '../interfaces/i_copyable.js';
|
|
8
|
+
import type { IPaster } from '../interfaces/i_paster.js';
|
|
9
9
|
import * as commentSerialiation from '../serialization/workspace_comments.js';
|
|
10
10
|
import { Coordinate } from '../utils/coordinate.js';
|
|
11
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
12
|
export declare class WorkspaceCommentPaster implements IPaster<WorkspaceCommentCopyData, RenderedWorkspaceComment> {
|
|
13
13
|
static TYPE: string;
|
|
14
14
|
paste(copyData: WorkspaceCommentCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): RenderedWorkspaceComment | null;
|
package/core/clipboard.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { BlockCopyData, BlockPaster } from './clipboard/block_paster.js';
|
|
7
7
|
import * as registry from './clipboard/registry.js';
|
|
8
8
|
import type { ICopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
9
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
9
|
+
import type { Coordinate } from './utils/coordinate.js';
|
|
10
10
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Copy a copyable item, and record its data and the workspace it was
|
|
@@ -14,10 +14,6 @@ export declare const COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER = "_collapse_b
|
|
|
14
14
|
* Button that toggles the collapsed state of a comment.
|
|
15
15
|
*/
|
|
16
16
|
export declare class CollapseCommentBarButton extends CommentBarButton {
|
|
17
|
-
protected readonly id: string;
|
|
18
|
-
protected readonly workspace: WorkspaceSvg;
|
|
19
|
-
protected readonly container: SVGGElement;
|
|
20
|
-
protected readonly commentView: CommentView;
|
|
21
17
|
/**
|
|
22
18
|
* Opaque ID used to unbind event handlers during disposal.
|
|
23
19
|
*/
|
|
@@ -48,5 +44,12 @@ export declare class CollapseCommentBarButton extends CommentBarButton {
|
|
|
48
44
|
* @param e The event that triggered this action.
|
|
49
45
|
*/
|
|
50
46
|
performAction(e?: Event): void;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the ARIA label to use for this button (defaults to null). Note that this
|
|
49
|
+
* method will only be called and apply when recomputeAriaContext is called.
|
|
50
|
+
*
|
|
51
|
+
* @returns The ARIA label to use for this button, or null to use a default.
|
|
52
|
+
*/
|
|
53
|
+
protected getAriaLabel(): string;
|
|
51
54
|
}
|
|
52
55
|
//# sourceMappingURL=collapse_comment_bar_button.d.ts.map
|
|
@@ -11,7 +11,7 @@ import type { CommentView } from './comment_view.js';
|
|
|
11
11
|
* Button displayed on a comment's top bar.
|
|
12
12
|
*/
|
|
13
13
|
export declare abstract class CommentBarButton implements IFocusableNode {
|
|
14
|
-
|
|
14
|
+
readonly id: string;
|
|
15
15
|
protected readonly workspace: WorkspaceSvg;
|
|
16
16
|
protected readonly container: SVGGElement;
|
|
17
17
|
protected readonly commentView: CommentView;
|
|
@@ -58,5 +58,19 @@ export declare abstract class CommentBarButton implements IFocusableNode {
|
|
|
58
58
|
onNodeBlur(): void;
|
|
59
59
|
/** Returns whether this button can be focused. True if it is visible. */
|
|
60
60
|
canBeFocused(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Recomputes the ARIA label and role for this button. Note that this is not
|
|
63
|
+
* automatically called during initialization and must be called once a button's
|
|
64
|
+
* focusable element (icon) is initialized. Implementations may also find it useful
|
|
65
|
+
* to call this if the button's label should be changed.
|
|
66
|
+
*/
|
|
67
|
+
protected recomputeAriaContext(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the ARIA label to use for this button (defaults to null). Note that this
|
|
70
|
+
* method will only be called and apply when recomputeAriaContext is called.
|
|
71
|
+
*
|
|
72
|
+
* @returns The ARIA label to use for this button, or null to use a default.
|
|
73
|
+
*/
|
|
74
|
+
protected getAriaLabel(): string | null;
|
|
61
75
|
}
|
|
62
76
|
//# sourceMappingURL=comment_bar_button.d.ts.map
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import type { BlockSvg } from '../block_svg.js';
|
|
7
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
8
|
+
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
9
|
+
import type { Size } from '../utils/size.js';
|
|
10
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
+
import type { RenderedWorkspaceComment } from './rendered_workspace_comment.js';
|
|
10
12
|
/**
|
|
11
13
|
* String added to the ID of a workspace comment to identify
|
|
12
14
|
* the focusable node for the comment editor.
|
|
@@ -16,7 +18,7 @@ export declare const COMMENT_EDITOR_FOCUS_IDENTIFIER = "_comment_textarea_";
|
|
|
16
18
|
export declare class CommentEditor implements IFocusableNode {
|
|
17
19
|
workspace: WorkspaceSvg;
|
|
18
20
|
private onFinishEditing?;
|
|
19
|
-
id
|
|
21
|
+
id: string;
|
|
20
22
|
/** The foreignObject containing the HTML text area. */
|
|
21
23
|
private foreignObject;
|
|
22
24
|
/** The text area where the user can type. */
|
|
@@ -25,13 +27,26 @@ export declare class CommentEditor implements IFocusableNode {
|
|
|
25
27
|
private textChangeListeners;
|
|
26
28
|
/** The current text of the comment. Updates on text area change. */
|
|
27
29
|
private text;
|
|
28
|
-
|
|
30
|
+
/** The parent object that owns this comment editor. */
|
|
31
|
+
private parent?;
|
|
32
|
+
constructor(workspace: WorkspaceSvg, commentId: string, onFinishEditing?: (() => void) | undefined);
|
|
29
33
|
/** Gets the dom structure for this comment editor. */
|
|
30
34
|
getDom(): SVGForeignObjectElement;
|
|
31
35
|
/** Gets the current text of the comment. */
|
|
32
36
|
getText(): string;
|
|
33
37
|
/** Sets the current text of the comment and fires change listeners. */
|
|
34
38
|
setText(text: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the parent object that owns this comment editor.
|
|
41
|
+
*
|
|
42
|
+
* @param newParent The parent of this comment editor.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
setParent(newParent: BlockSvg | RenderedWorkspaceComment): void;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the parent object that owns this comment editor, if any.
|
|
48
|
+
*/
|
|
49
|
+
getParent(): BlockSvg | RenderedWorkspaceComment | undefined;
|
|
35
50
|
/**
|
|
36
51
|
* Triggers listeners when the text of the comment changes, either
|
|
37
52
|
* programmatically or manually by the user.
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
7
|
-
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
6
|
+
import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
8
7
|
import { Coordinate } from '../utils/coordinate.js';
|
|
9
8
|
import { Size } from '../utils/size.js';
|
|
10
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
|
-
import { CommentBarButton } from './comment_bar_button.js';
|
|
9
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
10
|
+
import type { CommentBarButton } from './comment_bar_button.js';
|
|
11
|
+
import { CommentEditor } from './comment_editor.js';
|
|
12
12
|
export declare class CommentView implements IRenderedElement {
|
|
13
13
|
readonly workspace: WorkspaceSvg;
|
|
14
14
|
readonly commentId: string;
|
|
@@ -84,7 +84,7 @@ export declare class CommentView implements IRenderedElement {
|
|
|
84
84
|
*
|
|
85
85
|
* @returns The FocusableNode representing the editor portion of this comment.
|
|
86
86
|
*/
|
|
87
|
-
getEditorFocusableNode():
|
|
87
|
+
getEditorFocusableNode(): CommentEditor;
|
|
88
88
|
/** Creates the DOM elements for the comment resize handle. */
|
|
89
89
|
private createResizeHandle;
|
|
90
90
|
/** Returns the root SVG group element of the comment view. */
|
|
@@ -14,10 +14,6 @@ export declare const COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER = "_delete_bar_b
|
|
|
14
14
|
* Button that deletes a comment.
|
|
15
15
|
*/
|
|
16
16
|
export declare class DeleteCommentBarButton extends CommentBarButton {
|
|
17
|
-
protected readonly id: string;
|
|
18
|
-
protected readonly workspace: WorkspaceSvg;
|
|
19
|
-
protected readonly container: SVGGElement;
|
|
20
|
-
protected readonly commentView: CommentView;
|
|
21
17
|
/**
|
|
22
18
|
* Opaque ID used to unbind event handlers during disposal.
|
|
23
19
|
*/
|
|
@@ -48,5 +44,12 @@ export declare class DeleteCommentBarButton extends CommentBarButton {
|
|
|
48
44
|
* @param e The event that triggered this action.
|
|
49
45
|
*/
|
|
50
46
|
performAction(e?: Event): void;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the ARIA label to use for this button (defaults to null). Note that this
|
|
49
|
+
* method will only be called and apply when recomputeAriaContext is called.
|
|
50
|
+
*
|
|
51
|
+
* @returns The ARIA label to use for this button, or null to use a default.
|
|
52
|
+
*/
|
|
53
|
+
protected getAriaLabel(): string;
|
|
51
54
|
}
|
|
52
55
|
//# sourceMappingURL=delete_comment_bar_button.d.ts.map
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
|
|
7
|
-
import { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
8
|
-
import { IContextMenu } from '../interfaces/i_contextmenu.js';
|
|
9
|
-
import { ICopyable } from '../interfaces/i_copyable.js';
|
|
10
|
-
import { IDeletable } from '../interfaces/i_deletable.js';
|
|
11
|
-
import { IDraggable } from '../interfaces/i_draggable.js';
|
|
12
|
-
import { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
6
|
+
import type { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
|
|
7
|
+
import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
|
|
8
|
+
import type { IContextMenu } from '../interfaces/i_contextmenu.js';
|
|
9
|
+
import type { ICopyable } from '../interfaces/i_copyable.js';
|
|
10
|
+
import type { IDeletable } from '../interfaces/i_deletable.js';
|
|
11
|
+
import type { IDraggable } from '../interfaces/i_draggable.js';
|
|
12
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
13
13
|
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
14
|
-
import { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
15
|
-
import { ISelectable } from '../interfaces/i_selectable.js';
|
|
14
|
+
import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
|
|
15
|
+
import type { ISelectable } from '../interfaces/i_selectable.js';
|
|
16
16
|
import { Coordinate } from '../utils/coordinate.js';
|
|
17
17
|
import { Rect } from '../utils/rect.js';
|
|
18
|
-
import { Size } from '../utils/size.js';
|
|
19
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
18
|
+
import type { Size } from '../utils/size.js';
|
|
19
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
20
20
|
import { CommentView } from './comment_view.js';
|
|
21
21
|
import { WorkspaceComment } from './workspace_comment.js';
|
|
22
22
|
export declare class RenderedWorkspaceComment extends WorkspaceComment implements IBoundedElement, IRenderedElement, IDraggable, ISelectable, IDeletable, ICopyable<WorkspaceCommentCopyData>, IContextMenu, IFocusableNode {
|
|
@@ -83,7 +83,7 @@ export declare class RenderedWorkspaceComment extends WorkspaceComment implement
|
|
|
83
83
|
/** Returns whether this comment is movable or not. */
|
|
84
84
|
isMovable(): boolean;
|
|
85
85
|
/** Starts a drag on the comment. */
|
|
86
|
-
startDrag():
|
|
86
|
+
startDrag(): RenderedWorkspaceComment;
|
|
87
87
|
/** Drags the comment to the given location. */
|
|
88
88
|
drag(newLoc: Coordinate): void;
|
|
89
89
|
/** Ends the drag on the comment. */
|
|
@@ -117,5 +117,10 @@ export declare class RenderedWorkspaceComment extends WorkspaceComment implement
|
|
|
117
117
|
onNodeBlur(): void;
|
|
118
118
|
/** See IFocusableNode.canBeFocused. */
|
|
119
119
|
canBeFocused(): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Handles the user acting on this comment via keyboard navigation.
|
|
122
|
+
* Expands the comment and focuses its editor.
|
|
123
|
+
*/
|
|
124
|
+
performAction(): void;
|
|
120
125
|
}
|
|
121
126
|
//# sourceMappingURL=rendered_workspace_comment.d.ts.map
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Coordinate } from '../utils/coordinate.js';
|
|
7
|
-
import { Size } from '../utils/size.js';
|
|
8
|
-
import { Workspace } from '../workspace.js';
|
|
7
|
+
import type { Size } from '../utils/size.js';
|
|
8
|
+
import type { Workspace } from '../workspace.js';
|
|
9
9
|
export declare class WorkspaceComment {
|
|
10
10
|
readonly workspace: Workspace;
|
|
11
11
|
/** The unique identifier for this comment. */
|
package/core/common.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from './block.js';
|
|
7
|
-
import { BlockDefinition } from './blocks.js';
|
|
7
|
+
import type { BlockDefinition } from './blocks.js';
|
|
8
8
|
import type { Connection } from './connection.js';
|
|
9
|
-
import { ISelectable } from './interfaces/i_selectable.js';
|
|
9
|
+
import type { ISelectable } from './interfaces/i_selectable.js';
|
|
10
10
|
import type { Workspace } from './workspace.js';
|
|
11
11
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
12
12
|
/**
|
|
@@ -33,6 +33,13 @@ export declare function registerWorkspace(workspace: Workspace): void;
|
|
|
33
33
|
*
|
|
34
34
|
* @param workspace
|
|
35
35
|
*/
|
|
36
|
+
export declare function unregisterWorkspace(workspace: Workspace): void;
|
|
37
|
+
/**
|
|
38
|
+
* Unregister a workspace from the workspace db.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated v13: use Blockly.common.unregisterWorkspace
|
|
41
|
+
* @param workspace
|
|
42
|
+
*/
|
|
36
43
|
export declare function unregisterWorkpace(workspace: Workspace): void;
|
|
37
44
|
/**
|
|
38
45
|
* Returns the last used top level workspace (based on focus). Try not to use
|
|
@@ -79,7 +86,7 @@ export declare function fireSelectedEvent(newSelection: ISelectable | null): voi
|
|
|
79
86
|
*
|
|
80
87
|
* @returns The parent container.
|
|
81
88
|
*/
|
|
82
|
-
export declare function getParentContainer(): Element | null;
|
|
89
|
+
export declare function getParentContainer(workspace?: Workspace): Element | null;
|
|
83
90
|
/**
|
|
84
91
|
* Set the parent container. This is the container element that the WidgetDiv,
|
|
85
92
|
* DropDownDiv, and Tooltip are rendered into the first time `Blockly.inject`
|
|
@@ -12,12 +12,14 @@ import type { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
|
12
12
|
import type { IComponent } from './interfaces/i_component.js';
|
|
13
13
|
import type { IDeleteArea } from './interfaces/i_delete_area.js';
|
|
14
14
|
import type { IDragTarget } from './interfaces/i_drag_target.js';
|
|
15
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
15
16
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
16
17
|
declare class Capability<_T> {
|
|
17
18
|
static POSITIONABLE: Capability<IPositionable>;
|
|
18
19
|
static DRAG_TARGET: Capability<IDragTarget>;
|
|
19
20
|
static DELETE_AREA: Capability<IDeleteArea>;
|
|
20
21
|
static AUTOHIDEABLE: Capability<IAutoHideable>;
|
|
22
|
+
static FOCUSABLE: Capability<IFocusableNode>;
|
|
21
23
|
private readonly name;
|
|
22
24
|
/** @param name The name of the component capability. */
|
|
23
25
|
constructor(name: string);
|
package/core/config.d.ts
CHANGED
|
@@ -4,21 +4,47 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Object holding all the values on Blockly that we expect developers to be
|
|
8
|
+
* able to change.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
export declare const config: {
|
|
11
|
+
/**
|
|
12
|
+
* Number of pixels the mouse must move before a drag starts.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
11
15
|
dragRadius: number;
|
|
16
|
+
/**
|
|
17
|
+
* Number of pixels the mouse must move before a drag/scroll starts from the
|
|
18
|
+
* flyout. Because the drag-intention is determined when this is reached, it
|
|
19
|
+
* is larger than dragRadius so that the drag-direction is clearer.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
12
22
|
flyoutDragRadius: number;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum misalignment between connections for them to snap together.
|
|
25
|
+
* Default is 28.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
13
28
|
snapRadius: number;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum misalignment between connections for them to snap together.
|
|
31
|
+
* This should be the same as the snap radius.
|
|
32
|
+
* Default is 28.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
connectingSnapRadius: number;
|
|
36
|
+
/**
|
|
37
|
+
* How much to prefer staying connected to the current connection over moving
|
|
38
|
+
* to a new connection. The current previewed connection is considered to be
|
|
39
|
+
* this much closer to the matching connection on the block than it actually
|
|
40
|
+
* is.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
14
43
|
currentConnectionPreference: number;
|
|
44
|
+
/**
|
|
45
|
+
* Delay in ms between trigger and bumping unconnected block out of alignment.
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
15
48
|
bumpDelay: number;
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Object holding all the values on Blockly that we expect developers to be
|
|
20
|
-
* able to change.
|
|
21
|
-
*/
|
|
22
|
-
export declare const config: Config;
|
|
23
|
-
export {};
|
|
49
|
+
};
|
|
24
50
|
//# sourceMappingURL=config.d.ts.map
|