@cp949/phyx-blockly 12.5.1-p1 → 13.4.0-patch.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/blockly.min.js +2280 -2126
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +1767 -1794
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +151 -177
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +41 -19
- package/core/block_aria_composer.d.ts +158 -0
- package/core/block_svg.d.ts +88 -35
- package/core/blockly.d.ts +22 -22
- package/core/bubbles/bubble.d.ts +59 -5
- package/core/bubbles/mini_workspace_bubble.d.ts +11 -3
- package/core/bubbles/text_bubble.d.ts +7 -4
- package/core/bubbles/textinput_bubble.d.ts +11 -1
- package/core/clipboard/block_paster.d.ts +5 -5
- package/core/clipboard/registry.d.ts +1 -1
- package/core/clipboard/workspace_comment_paster.d.ts +4 -4
- package/core/clipboard.d.ts +1 -1
- package/core/comments/collapse_comment_bar_button.d.ts +7 -4
- package/core/comments/comment_bar_button.d.ts +15 -1
- package/core/comments/comment_editor.d.ts +21 -6
- package/core/comments/comment_view.d.ts +5 -5
- package/core/comments/delete_comment_bar_button.d.ts +7 -4
- package/core/comments/rendered_workspace_comment.d.ts +17 -12
- package/core/comments/workspace_comment.d.ts +2 -2
- package/core/common.d.ts +10 -3
- package/core/component_manager.d.ts +2 -0
- package/core/config.d.ts +37 -11
- package/core/connection_db.d.ts +40 -0
- package/core/contextmenu_registry.d.ts +12 -2
- package/core/css.d.ts +2 -1
- package/core/dragging/block_drag_strategy.d.ts +196 -19
- package/core/dragging/bubble_drag_strategy.d.ts +5 -4
- package/core/dragging/comment_drag_strategy.d.ts +4 -4
- package/core/dragging/dragger.d.ts +14 -14
- package/core/events/events_block_base.d.ts +2 -1
- package/core/events/events_block_change.d.ts +3 -2
- package/core/events/events_block_create.d.ts +3 -5
- package/core/events/events_block_delete.d.ts +3 -5
- package/core/events/events_block_drag.d.ts +2 -2
- package/core/events/events_block_field_intermediate_change.d.ts +3 -2
- package/core/events/events_block_move.d.ts +2 -1
- package/core/events/events_click.d.ts +2 -2
- package/core/events/events_comment_base.d.ts +2 -1
- package/core/events/events_comment_change.d.ts +2 -1
- package/core/events/events_comment_collapse.d.ts +3 -2
- package/core/events/events_comment_create.d.ts +2 -4
- package/core/events/events_comment_delete.d.ts +2 -4
- package/core/events/events_comment_drag.d.ts +2 -2
- package/core/events/events_comment_move.d.ts +2 -1
- package/core/events/events_comment_resize.d.ts +2 -1
- package/core/events/events_selected.d.ts +1 -1
- package/core/events/events_theme_change.d.ts +1 -1
- package/core/events/events_toolbox_item_select.d.ts +1 -1
- package/core/events/events_trashcan_open.d.ts +1 -1
- package/core/events/events_var_base.d.ts +2 -1
- package/core/events/events_var_create.d.ts +2 -1
- package/core/events/events_var_delete.d.ts +2 -1
- package/core/events/events_var_rename.d.ts +2 -1
- package/core/events/events_var_type_change.d.ts +2 -1
- package/core/events/events_viewport.d.ts +1 -1
- package/core/field.d.ts +120 -13
- package/core/field_checkbox.d.ts +31 -4
- package/core/field_dropdown.d.ts +68 -4
- package/core/field_image.d.ts +54 -2
- package/core/field_input.d.ts +38 -13
- package/core/field_label.d.ts +31 -2
- package/core/field_label_serializable.d.ts +3 -2
- package/core/field_number.d.ts +14 -3
- package/core/field_textinput.d.ts +15 -5
- package/core/field_variable.d.ts +16 -6
- package/core/flyout_base.d.ts +12 -126
- package/core/flyout_button.d.ts +11 -0
- package/core/flyout_horizontal.d.ts +0 -11
- package/core/flyout_metrics_manager.d.ts +2 -1
- package/core/flyout_vertical.d.ts +0 -11
- package/core/focus_manager.d.ts +52 -2
- package/core/generator.d.ts +2 -2
- package/core/gesture.d.ts +2 -21
- package/core/grid.d.ts +2 -2
- package/core/hints.d.ts +78 -0
- package/core/icons/comment_icon.d.ts +8 -0
- package/core/icons/icon.d.ts +20 -0
- package/core/icons/icon_types.d.ts +4 -4
- package/core/icons/mutator_icon.d.ts +8 -0
- package/core/icons/registry.d.ts +1 -1
- package/core/icons/warning_icon.d.ts +8 -0
- package/core/inputs/input.d.ts +58 -2
- package/core/insertion_marker.d.ts +54 -0
- package/core/insertion_marker_previewer.d.ts +20 -4
- package/core/interfaces/i_bounded_element.d.ts +7 -0
- package/core/interfaces/i_bubble.d.ts +3 -2
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +5 -1
- package/core/interfaces/i_comment_icon.d.ts +6 -6
- package/core/interfaces/i_drag_target.d.ts +2 -2
- package/core/interfaces/i_draggable.d.ts +22 -17
- package/core/interfaces/i_dragger.d.ts +19 -10
- package/core/interfaces/i_flyout.d.ts +1 -31
- package/core/interfaces/i_flyout_inflater.d.ts +9 -0
- package/core/interfaces/i_focusable_node.d.ts +8 -0
- package/core/interfaces/i_focusable_tree.d.ts +8 -0
- package/core/interfaces/i_icon.d.ts +1 -1
- package/core/interfaces/i_json_block_definition.d.ts +113 -0
- package/core/interfaces/i_keyboard_accessible.d.ts +1 -1
- package/core/interfaces/i_navigation_policy.d.ts +12 -0
- package/core/interfaces/i_parameter_model.d.ts +2 -2
- package/core/interfaces/i_paster.d.ts +3 -3
- package/core/interfaces/i_procedure_block.d.ts +1 -1
- package/core/interfaces/i_procedure_map.d.ts +1 -1
- package/core/interfaces/i_procedure_model.d.ts +2 -2
- package/core/interfaces/i_selectable.d.ts +3 -3
- package/core/interfaces/i_selectable_toolbox_item.d.ts +3 -3
- package/core/interfaces/i_toolbox.d.ts +4 -0
- package/core/interfaces/i_toolbox_item.d.ts +6 -0
- package/core/interfaces/i_variable_backed_parameter_model.d.ts +1 -1
- package/core/keyboard_nav/keyboard_mover.d.ts +151 -0
- package/core/keyboard_nav/move_indicator.d.ts +35 -0
- package/core/keyboard_nav/{block_navigation_policy.d.ts → navigation_policies/block_navigation_policy.d.ts} +17 -25
- package/core/keyboard_nav/navigation_policies/bubble_navigation_policy.d.ts +63 -0
- package/core/keyboard_nav/{comment_bar_button_navigation_policy.d.ts → navigation_policies/comment_bar_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{comment_editor_navigation_policy.d.ts → navigation_policies/comment_editor_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{connection_navigation_policy.d.ts → navigation_policies/connection_navigation_policy.d.ts} +11 -16
- package/core/keyboard_nav/{field_navigation_policy.d.ts → navigation_policies/field_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_button_navigation_policy.d.ts → navigation_policies/flyout_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_separator_navigation_policy.d.ts → navigation_policies/flyout_separator_navigation_policy.d.ts} +9 -3
- package/core/keyboard_nav/{icon_navigation_policy.d.ts → navigation_policies/icon_navigation_policy.d.ts} +12 -5
- package/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.d.ts +64 -0
- package/core/keyboard_nav/{workspace_comment_navigation_policy.d.ts → navigation_policies/workspace_comment_navigation_policy.d.ts} +14 -9
- package/core/keyboard_nav/{workspace_navigation_policy.d.ts → navigation_policies/workspace_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/navigators/flyout_navigator.d.ts +63 -0
- package/core/keyboard_nav/navigators/navigator.d.ts +237 -0
- package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
- package/core/keyboard_navigation_controller.d.ts +12 -0
- package/core/layer_manager.d.ts +3 -3
- package/core/menu.d.ts +3 -0
- package/core/menuitem.d.ts +8 -1
- package/core/observable_procedure_map.d.ts +1 -1
- package/core/options.d.ts +4 -4
- package/core/procedures.d.ts +5 -8
- package/core/registry.d.ts +0 -2
- package/core/render_management.d.ts +1 -1
- package/core/rendered_connection.d.ts +33 -6
- package/core/renderers/common/constants.d.ts +4 -7
- package/core/renderers/common/i_path_object.d.ts +8 -0
- package/core/renderers/common/info.d.ts +1 -1
- package/core/renderers/common/path_object.d.ts +7 -16
- package/core/renderers/common/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +1 -14
- package/core/renderers/zelos/drawer.d.ts +1 -1
- package/core/renderers/zelos/info.d.ts +10 -1
- package/core/renderers/zelos/measurables/bottom_row.d.ts +1 -1
- package/core/renderers/zelos/measurables/top_row.d.ts +1 -1
- package/core/renderers/zelos/path_object.d.ts +0 -3
- package/core/renderers/zelos/renderer.d.ts +8 -0
- package/core/serialization/procedures.d.ts +2 -2
- package/core/serialization/workspace_comments.d.ts +2 -2
- package/core/shortcut_items.d.ts +167 -2
- package/core/shortcut_registry.d.ts +9 -3
- package/core/theme.d.ts +0 -2
- package/core/toast.d.ts +2 -11
- package/core/toolbox/category.d.ts +11 -0
- package/core/toolbox/collapsible_category.d.ts +2 -0
- package/core/toolbox/separator.d.ts +4 -0
- package/core/toolbox/toolbox.d.ts +17 -33
- package/core/toolbox/toolbox_item.d.ts +4 -0
- package/core/tooltip.d.ts +13 -2
- package/core/trashcan.d.ts +16 -38
- package/core/utils/aria.d.ts +259 -28
- package/core/utils/dom.d.ts +1 -1
- package/core/utils/focusable_tree_traverser.d.ts +2 -2
- package/core/utils/shortcut_formatting.d.ts +22 -0
- package/core/utils/style.d.ts +14 -0
- package/core/utils/toolbox.d.ts +0 -8
- package/core/utils/useragent.d.ts +1 -0
- package/core/variable_map.d.ts +1 -41
- package/core/variable_model.d.ts +1 -7
- package/core/variables.d.ts +7 -8
- package/core/variables_dynamic.d.ts +4 -6
- package/core/workspace.d.ts +7 -85
- package/core/workspace_audio.d.ts +36 -7
- package/core/workspace_focus_target.d.ts +51 -0
- package/core/workspace_svg.d.ts +79 -60
- package/core/xml.d.ts +1 -1
- package/core/zoom_controls.d.ts +6 -59
- package/dart_compressed.js +123 -164
- package/dart_compressed.js.map +1 -1
- package/index.mjs +13 -5
- package/javascript_compressed.js +96 -147
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +142 -178
- package/lua_compressed.js.map +1 -1
- package/media/drop.mp3 +0 -0
- package/msg/ab.js +265 -7
- package/msg/ab.mjs +259 -1
- package/msg/ace.js +266 -8
- package/msg/ace.mjs +259 -1
- package/msg/af.js +265 -7
- package/msg/af.mjs +259 -1
- package/msg/am.js +266 -8
- package/msg/am.mjs +259 -1
- package/msg/ar.js +283 -25
- package/msg/ar.mjs +259 -1
- package/msg/ast.js +266 -8
- package/msg/ast.mjs +259 -1
- package/msg/az.js +266 -8
- package/msg/az.mjs +259 -1
- package/msg/ba.js +265 -7
- package/msg/ba.mjs +259 -1
- package/msg/bcc.js +265 -7
- package/msg/bcc.mjs +259 -1
- package/msg/be-tarask.js +297 -39
- package/msg/be-tarask.mjs +259 -1
- package/msg/be.js +266 -8
- package/msg/be.mjs +259 -1
- package/msg/bg.js +282 -24
- package/msg/bg.mjs +259 -1
- package/msg/bn.js +266 -8
- package/msg/bn.mjs +259 -1
- package/msg/br.js +266 -8
- package/msg/br.mjs +259 -1
- package/msg/bs.js +265 -7
- package/msg/bs.mjs +259 -1
- package/msg/ca.js +265 -7
- package/msg/ca.mjs +259 -1
- package/msg/ce.js +265 -7
- package/msg/ce.mjs +259 -1
- package/msg/cs.js +290 -32
- package/msg/cs.mjs +259 -1
- package/msg/csb.js +723 -0
- package/msg/csb.mjs +704 -0
- package/msg/da.js +284 -26
- package/msg/da.mjs +259 -1
- package/msg/de.js +265 -7
- package/msg/de.mjs +259 -1
- package/msg/diq.js +267 -9
- package/msg/diq.mjs +259 -1
- package/msg/dtp.js +265 -7
- package/msg/dtp.mjs +259 -1
- package/msg/dty.js +265 -7
- package/msg/dty.mjs +259 -1
- package/msg/ee.js +265 -7
- package/msg/ee.mjs +259 -1
- package/msg/el.js +290 -32
- package/msg/el.mjs +259 -1
- package/msg/en-gb.js +266 -8
- package/msg/en-gb.mjs +259 -1
- package/msg/en.js +266 -8
- package/msg/en.mjs +259 -1
- package/msg/eo.js +265 -7
- package/msg/eo.mjs +259 -1
- package/msg/es.js +282 -24
- package/msg/es.mjs +259 -1
- package/msg/et.js +265 -7
- package/msg/et.mjs +259 -1
- package/msg/eu.js +265 -7
- package/msg/eu.mjs +259 -1
- package/msg/fa.js +266 -8
- package/msg/fa.mjs +259 -1
- package/msg/fi.js +284 -26
- package/msg/fi.mjs +259 -1
- package/msg/fo.js +265 -7
- package/msg/fo.mjs +259 -1
- package/msg/fr.js +283 -25
- package/msg/fr.mjs +259 -1
- package/msg/frr.js +266 -8
- package/msg/frr.mjs +259 -1
- package/msg/ga.js +723 -0
- package/msg/{cdo.mjs → ga.mjs} +261 -3
- package/msg/gl.js +290 -32
- package/msg/gl.mjs +259 -1
- package/msg/gn.js +266 -8
- package/msg/gn.mjs +259 -1
- package/msg/gor.js +265 -7
- package/msg/gor.mjs +259 -1
- package/msg/ha.js +265 -7
- package/msg/ha.mjs +259 -1
- package/msg/he.js +313 -55
- package/msg/he.mjs +259 -1
- package/msg/hi.js +265 -7
- package/msg/hi.mjs +259 -1
- package/msg/hr.js +265 -7
- package/msg/hr.mjs +259 -1
- package/msg/hrx.js +265 -7
- package/msg/hrx.mjs +259 -1
- package/msg/hsb.js +265 -7
- package/msg/hsb.mjs +259 -1
- package/msg/hu.js +270 -12
- package/msg/hu.mjs +259 -1
- package/msg/hy.js +265 -7
- package/msg/hy.mjs +259 -1
- package/msg/ia.js +304 -46
- package/msg/ia.mjs +259 -1
- package/msg/id.js +489 -231
- package/msg/id.mjs +259 -1
- package/msg/ig.js +270 -12
- package/msg/ig.mjs +259 -1
- package/msg/inh.js +265 -7
- package/msg/inh.mjs +259 -1
- package/msg/is.js +265 -7
- package/msg/is.mjs +259 -1
- package/msg/it.js +289 -31
- package/msg/it.mjs +259 -1
- package/msg/ja.js +314 -56
- package/msg/ja.mjs +259 -1
- package/msg/ka.js +267 -9
- package/msg/ka.mjs +259 -1
- package/msg/kab.js +273 -15
- package/msg/kab.mjs +259 -1
- package/msg/kbd-cyrl.js +266 -8
- package/msg/kbd-cyrl.mjs +259 -1
- package/msg/km.js +265 -7
- package/msg/km.mjs +259 -1
- package/msg/kn.js +273 -15
- package/msg/kn.mjs +259 -1
- package/msg/ko.js +398 -140
- package/msg/ko.mjs +259 -1
- package/msg/krc.js +723 -0
- package/msg/krc.mjs +704 -0
- package/msg/ksh.js +266 -8
- package/msg/ksh.mjs +259 -1
- package/msg/ku-latn.js +266 -8
- package/msg/ku-latn.mjs +259 -1
- package/msg/ky.js +325 -67
- package/msg/ky.mjs +259 -1
- package/msg/la.js +266 -8
- package/msg/la.mjs +259 -1
- package/msg/lb.js +279 -21
- package/msg/lb.mjs +259 -1
- package/msg/lki.js +265 -7
- package/msg/lki.mjs +259 -1
- package/msg/lo.js +265 -7
- package/msg/lo.mjs +259 -1
- package/msg/lrc.js +265 -7
- package/msg/lrc.mjs +259 -1
- package/msg/lt.js +266 -8
- package/msg/lt.mjs +259 -1
- package/msg/lv.js +276 -18
- package/msg/lv.mjs +259 -1
- package/msg/mg.js +265 -7
- package/msg/mg.mjs +259 -1
- package/msg/mk.js +265 -7
- package/msg/mk.mjs +259 -1
- package/msg/ml.js +265 -7
- package/msg/ml.mjs +259 -1
- package/msg/mnw.js +265 -7
- package/msg/mnw.mjs +259 -1
- package/msg/ms.js +274 -16
- package/msg/ms.mjs +259 -1
- package/msg/mt.js +723 -0
- package/msg/{hak.mjs → mt.mjs} +261 -3
- package/msg/my.js +265 -7
- package/msg/my.mjs +259 -1
- package/msg/mzn.js +266 -8
- package/msg/mzn.mjs +259 -1
- package/msg/nb.js +265 -7
- package/msg/nb.mjs +259 -1
- package/msg/ne.js +275 -17
- package/msg/ne.mjs +259 -1
- package/msg/nl.js +336 -78
- package/msg/nl.mjs +259 -1
- package/msg/oc.js +265 -7
- package/msg/oc.mjs +259 -1
- package/msg/olo.js +266 -8
- package/msg/olo.mjs +259 -1
- package/msg/pa.js +273 -15
- package/msg/pa.mjs +259 -1
- package/msg/pl.js +282 -24
- package/msg/pl.mjs +259 -1
- package/msg/pms.js +283 -25
- package/msg/pms.mjs +259 -1
- package/msg/ps.js +296 -38
- package/msg/ps.mjs +259 -1
- package/msg/pt-br.js +282 -24
- package/msg/pt-br.mjs +259 -1
- package/msg/pt.js +282 -24
- package/msg/pt.mjs +259 -1
- package/msg/ro.js +299 -41
- package/msg/ro.mjs +259 -1
- package/msg/ru.js +283 -25
- package/msg/ru.mjs +259 -1
- package/msg/sc.js +265 -7
- package/msg/sc.mjs +259 -1
- package/msg/sco.js +266 -8
- package/msg/sco.mjs +259 -1
- package/msg/sd.js +265 -7
- package/msg/sd.mjs +259 -1
- package/msg/shn.js +265 -7
- package/msg/shn.mjs +259 -1
- package/msg/si.js +266 -8
- package/msg/si.mjs +259 -1
- package/msg/sk.js +283 -25
- package/msg/sk.mjs +259 -1
- package/msg/skr-arab.js +268 -10
- package/msg/skr-arab.mjs +259 -1
- package/msg/sl.js +283 -25
- package/msg/sl.mjs +259 -1
- package/msg/smn.js +267 -9
- package/msg/smn.mjs +259 -1
- package/msg/sq.js +273 -15
- package/msg/sq.mjs +259 -1
- package/msg/sr-latn.js +265 -7
- package/msg/sr-latn.mjs +259 -1
- package/msg/sr.js +266 -8
- package/msg/sr.mjs +259 -1
- package/msg/sv.js +282 -24
- package/msg/sv.mjs +259 -1
- package/msg/sw.js +266 -8
- package/msg/sw.mjs +259 -1
- package/msg/ta.js +283 -25
- package/msg/ta.mjs +259 -1
- package/msg/tcy.js +328 -70
- package/msg/tcy.mjs +259 -1
- package/msg/tdd.js +265 -7
- package/msg/tdd.mjs +259 -1
- package/msg/te.js +265 -7
- package/msg/te.mjs +259 -1
- package/msg/th.js +266 -8
- package/msg/th.mjs +259 -1
- package/msg/ti.js +265 -7
- package/msg/ti.mjs +259 -1
- package/msg/tl.js +265 -7
- package/msg/tl.mjs +259 -1
- package/msg/tlh.js +265 -7
- package/msg/tlh.mjs +259 -1
- package/msg/tr.js +284 -26
- package/msg/tr.mjs +259 -1
- package/msg/ug-arab.js +265 -7
- package/msg/ug-arab.mjs +259 -1
- package/msg/uk.js +291 -33
- package/msg/uk.mjs +259 -1
- package/msg/ur.js +265 -7
- package/msg/ur.mjs +259 -1
- package/msg/uz.js +298 -40
- package/msg/uz.mjs +259 -1
- package/msg/vi.js +284 -26
- package/msg/vi.mjs +259 -1
- package/msg/xmf.js +265 -7
- package/msg/xmf.mjs +259 -1
- package/msg/yo.js +265 -7
- package/msg/yo.mjs +259 -1
- package/msg/zgh.js +265 -7
- package/msg/zgh.mjs +259 -1
- package/msg/zh-hans.js +283 -25
- package/msg/zh-hans.mjs +259 -1
- package/msg/zh-hant.js +283 -25
- package/msg/zh-hant.mjs +259 -1
- package/package.json +53 -57
- package/php_compressed.js +150 -192
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +85 -126
- package/python_compressed.js.map +1 -1
- package/core/flyout_navigator.d.ts +0 -11
- package/core/keyboard_nav/block_comment_navigation_policy.d.ts +0 -56
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +0 -65
- package/core/keyboard_nav/line_cursor.d.ts +0 -187
- package/core/keyboard_nav/marker.d.ts +0 -53
- package/core/marker_manager.d.ts +0 -72
- package/core/navigator.d.ts +0 -65
- package/media/sprites.png +0 -0
- package/msg/cdo.js +0 -465
- package/msg/hak.js +0 -465
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Coordinate } from '../utils/coordinate';
|
|
6
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
7
|
+
import type { IBoundedElement } from './i_bounded_element.js';
|
|
8
|
+
import type { ISelectable } from './i_selectable.js';
|
|
9
|
+
export declare enum DragDisposition {
|
|
10
|
+
COMMIT = 1,
|
|
11
|
+
DELETE = 2,
|
|
12
|
+
REVERT = 3
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* Represents an object that can be dragged.
|
|
9
16
|
*/
|
|
10
|
-
export interface IDraggable extends IDragStrategy {
|
|
17
|
+
export interface IDraggable extends IDragStrategy, IBoundedElement, ISelectable {
|
|
11
18
|
/**
|
|
12
|
-
* Returns the current location of the draggable in workspace
|
|
13
|
-
* coordinates.
|
|
19
|
+
* Returns the current location of the draggable in workspace coordinates.
|
|
14
20
|
*
|
|
15
21
|
* @returns Coordinate of current location on workspace.
|
|
16
22
|
*/
|
|
@@ -23,31 +29,30 @@ export interface IDragStrategy {
|
|
|
23
29
|
* Handles any drag startup (e.g moving elements to the front of the
|
|
24
30
|
* workspace).
|
|
25
31
|
*
|
|
26
|
-
* @param e
|
|
27
|
-
*
|
|
28
|
-
*
|
|
32
|
+
* @param e Event that started the drag; can be used to check modifier keys,
|
|
33
|
+
* etc. May be missing when dragging is triggered programmatically rather
|
|
34
|
+
* than by user.
|
|
29
35
|
*/
|
|
30
|
-
startDrag(e?: PointerEvent):
|
|
36
|
+
startDrag(e?: PointerEvent | KeyboardEvent): IDraggable;
|
|
31
37
|
/**
|
|
32
38
|
* Handles moving elements to the new location, and updating any
|
|
33
39
|
* visuals based on that (e.g connection previews for blocks).
|
|
34
40
|
*
|
|
35
41
|
* @param newLoc Workspace coordinate to which the draggable has
|
|
36
42
|
* been dragged.
|
|
37
|
-
* @param e
|
|
38
|
-
*
|
|
43
|
+
* @param e Event that continued the drag. Can be used to check modifier
|
|
44
|
+
* keys, etc.
|
|
39
45
|
*/
|
|
40
|
-
drag(newLoc: Coordinate, e?: PointerEvent): void;
|
|
46
|
+
drag(newLoc: Coordinate, e?: PointerEvent | KeyboardEvent): void;
|
|
41
47
|
/**
|
|
42
|
-
* Handles any drag cleanup, including e.g. connecting or deleting
|
|
43
|
-
* blocks.
|
|
48
|
+
* Handles any drag cleanup, including e.g. connecting or deleting blocks.
|
|
44
49
|
*
|
|
45
50
|
* @param newLoc Workspace coordinate at which the drag finished.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
51
|
+
* @param e Event that finished the drag. Can be used to check modifier keys,
|
|
52
|
+
* etc.
|
|
53
|
+
* @param disposition The end result of the drag.
|
|
49
54
|
*/
|
|
50
|
-
endDrag(e
|
|
55
|
+
endDrag(e: PointerEvent | KeyboardEvent | undefined, disposition: DragDisposition): void;
|
|
51
56
|
/** Moves the draggable back to where it was at the start of the drag. */
|
|
52
57
|
revertDrag(): void;
|
|
53
58
|
}
|
|
@@ -3,30 +3,39 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Coordinate } from '../utils/coordinate';
|
|
6
|
+
import type { Coordinate } from '../utils/coordinate';
|
|
7
|
+
import type { IDraggable } from './i_draggable';
|
|
7
8
|
export interface IDragger {
|
|
8
9
|
/**
|
|
9
10
|
* Handles any drag startup.
|
|
10
11
|
*
|
|
11
|
-
* @param e
|
|
12
|
+
* @param e Event that started the drag.
|
|
12
13
|
*/
|
|
13
|
-
onDragStart(e
|
|
14
|
+
onDragStart(e?: PointerEvent | KeyboardEvent): IDraggable;
|
|
14
15
|
/**
|
|
15
16
|
* Handles dragging, including calculating where the element should
|
|
16
17
|
* actually be moved to.
|
|
17
18
|
*
|
|
18
|
-
* @param e
|
|
19
|
-
* @param totalDelta The total distance, in pixels, that the
|
|
19
|
+
* @param e Event that continued the drag.
|
|
20
|
+
* @param totalDelta The total distance, in pixels, that the draggable
|
|
20
21
|
* has moved since the start of the drag.
|
|
21
22
|
*/
|
|
22
|
-
onDrag(e: PointerEvent, totalDelta: Coordinate): void;
|
|
23
|
+
onDrag(e: PointerEvent | KeyboardEvent | undefined, totalDelta: Coordinate): void;
|
|
23
24
|
/**
|
|
24
|
-
* Handles any drag cleanup.
|
|
25
|
+
* Handles any drag cleanup when a drag finishes normally.
|
|
25
26
|
*
|
|
26
|
-
* @param e
|
|
27
|
-
* @param totalDelta The total distance, in pixels, that the
|
|
27
|
+
* @param e Event that finished the drag.
|
|
28
|
+
* @param totalDelta The total distance, in pixels, that the draggable
|
|
28
29
|
* has moved since the start of the drag.
|
|
29
30
|
*/
|
|
30
|
-
onDragEnd(e: PointerEvent, totalDelta: Coordinate): void;
|
|
31
|
+
onDragEnd(e: PointerEvent | KeyboardEvent | undefined, totalDelta: Coordinate): void;
|
|
32
|
+
/**
|
|
33
|
+
* Handles any drag cleanup when a drag is reverted.
|
|
34
|
+
*
|
|
35
|
+
* @param e Event that finished the drag.
|
|
36
|
+
* @param totalDelta The total distance, in pixels, that the draggable
|
|
37
|
+
* has moved since the start of the drag.
|
|
38
|
+
*/
|
|
39
|
+
onDragRevert(e: PointerEvent | KeyboardEvent | undefined, totalDelta: Coordinate): void;
|
|
31
40
|
}
|
|
32
41
|
//# sourceMappingURL=i_dragger.d.ts.map
|
|
@@ -3,18 +3,15 @@
|
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { BlockSvg } from '../block_svg.js';
|
|
7
6
|
import type { FlyoutItem } from '../flyout_item.js';
|
|
8
|
-
import type { Coordinate } from '../utils/coordinate.js';
|
|
9
7
|
import type { Svg } from '../utils/svg.js';
|
|
10
8
|
import type { FlyoutDefinition } from '../utils/toolbox.js';
|
|
11
9
|
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
12
|
-
import { IFocusableTree } from './i_focusable_tree.js';
|
|
13
10
|
import type { IRegistrable } from './i_registrable.js';
|
|
14
11
|
/**
|
|
15
12
|
* Interface for a flyout.
|
|
16
13
|
*/
|
|
17
|
-
export interface IFlyout extends IRegistrable
|
|
14
|
+
export interface IFlyout extends IRegistrable {
|
|
18
15
|
/** Whether the flyout is laid out horizontally or not. */
|
|
19
16
|
horizontalLayout: boolean;
|
|
20
17
|
/** Is RTL vs LTR. */
|
|
@@ -105,14 +102,6 @@ export interface IFlyout extends IRegistrable, IFocusableTree {
|
|
|
105
102
|
* @returns List of flyout items.
|
|
106
103
|
*/
|
|
107
104
|
getContents(): FlyoutItem[];
|
|
108
|
-
/**
|
|
109
|
-
* Create a copy of this block on the workspace.
|
|
110
|
-
*
|
|
111
|
-
* @param originalBlock The block to copy from the flyout.
|
|
112
|
-
* @returns The newly created block.
|
|
113
|
-
* @throws {Error} if something went wrong with deserialization.
|
|
114
|
-
*/
|
|
115
|
-
createBlock(originalBlock: BlockSvg): BlockSvg;
|
|
116
105
|
/** Reflow blocks and their mats. */
|
|
117
106
|
reflow(): void;
|
|
118
107
|
/**
|
|
@@ -134,25 +123,6 @@ export interface IFlyout extends IRegistrable, IFocusableTree {
|
|
|
134
123
|
getY(): number;
|
|
135
124
|
/** Position the flyout. */
|
|
136
125
|
position(): void;
|
|
137
|
-
/**
|
|
138
|
-
* Determine if a drag delta is toward the workspace, based on the position
|
|
139
|
-
* and orientation of the flyout. This is used in determineDragIntention_ to
|
|
140
|
-
* determine if a new block should be created or if the flyout should scroll.
|
|
141
|
-
*
|
|
142
|
-
* @param currentDragDeltaXY How far the pointer has moved from the position
|
|
143
|
-
* at mouse down, in pixel units.
|
|
144
|
-
* @returns True if the drag is toward the workspace.
|
|
145
|
-
*/
|
|
146
|
-
isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Does this flyout allow you to create a new instance of the given block?
|
|
149
|
-
* Used for deciding if a block can be "dragged out of" the flyout.
|
|
150
|
-
*
|
|
151
|
-
* @param block The block to copy from the flyout.
|
|
152
|
-
* @returns True if you can create a new instance of the block, false
|
|
153
|
-
* otherwise.
|
|
154
|
-
*/
|
|
155
|
-
isBlockCreatable(block: BlockSvg): boolean;
|
|
156
126
|
/** Scroll the flyout to the beginning of its contents. */
|
|
157
127
|
scrollToStart(): void;
|
|
158
128
|
}
|
|
@@ -7,6 +7,15 @@ export interface IFlyoutInflater {
|
|
|
7
7
|
* Note that this method's interface is identical to that in ISerializer, to
|
|
8
8
|
* allow for code reuse.
|
|
9
9
|
*
|
|
10
|
+
* You must ensure that any item created by this method has the appropriate
|
|
11
|
+
* ARIA markup:
|
|
12
|
+
* - The role of the element's focusable element should be set to `listitem`.
|
|
13
|
+
* - The focusable element must have an `id` attribute.
|
|
14
|
+
* - Any DOM parents of the focusable element should set their role to
|
|
15
|
+
* `presentation` to avoid interfering with flyout list navigation.
|
|
16
|
+
* - If the element is not focusable, it must be hidden from the ARIA tree.
|
|
17
|
+
* Only do this if the content should be inaccessible to screenreaders.
|
|
18
|
+
*
|
|
10
19
|
* @param state A JSON representation of an element to inflate on the flyout.
|
|
11
20
|
* @param flyout The flyout on whose workspace the inflated element
|
|
12
21
|
* should be created. If the inflated element is an `IRenderedElement` it
|
|
@@ -93,6 +93,14 @@ export interface IFocusableNode {
|
|
|
93
93
|
* @returns Whether this node can be focused by FocusManager.
|
|
94
94
|
*/
|
|
95
95
|
canBeFocused(): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Optional method invoked when this node has focus and the user acts on it by
|
|
98
|
+
* pressing Enter or Space. Behavior should generally be similar to the node
|
|
99
|
+
* being clicked on.
|
|
100
|
+
*
|
|
101
|
+
* @param e The event that triggered this action, if any.
|
|
102
|
+
*/
|
|
103
|
+
performAction?(e?: Event): void;
|
|
96
104
|
}
|
|
97
105
|
/**
|
|
98
106
|
* Determines whether the provided object fulfills the contract of
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { Navigator } from '../keyboard_nav/navigators/navigator';
|
|
6
7
|
import type { IFocusableNode } from './i_focusable_node.js';
|
|
7
8
|
/**
|
|
8
9
|
* Represents a tree of focusable elements with its own active/passive focus
|
|
@@ -113,6 +114,13 @@ export interface IFocusableTree {
|
|
|
113
114
|
* as in the case that Blockly is entirely losing DOM focus).
|
|
114
115
|
*/
|
|
115
116
|
onTreeBlur(nextTree: IFocusableTree | null): void;
|
|
117
|
+
/**
|
|
118
|
+
* Returns a Navigator instance to be used to determine the navigation order
|
|
119
|
+
* between IFocusableNodes contained within this IFocusableTree. Generally
|
|
120
|
+
* this can just be an instance of Navigator, but trees may choose to return a
|
|
121
|
+
* subclass to customize navigation behavior within their context.
|
|
122
|
+
*/
|
|
123
|
+
getNavigator(): Navigator;
|
|
116
124
|
}
|
|
117
125
|
/**
|
|
118
126
|
* Determines whether the provided object fulfills the contract of
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { IconType } from '../icons/icon_types.js';
|
|
7
7
|
import type { Coordinate } from '../utils/coordinate.js';
|
|
8
8
|
import type { Size } from '../utils/size.js';
|
|
9
|
-
import { IFocusableNode } from './i_focusable_node.js';
|
|
9
|
+
import type { IFocusableNode } from './i_focusable_node.js';
|
|
10
10
|
export interface IIcon extends IFocusableNode {
|
|
11
11
|
/**
|
|
12
12
|
* @returns the IconType representing the type of the icon. This value should
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { FieldCheckboxFromJsonConfig } from '../field_checkbox.js';
|
|
7
|
+
import type { FieldDropdownFromJsonConfig } from '../field_dropdown';
|
|
8
|
+
import type { FieldImageFromJsonConfig } from '../field_image';
|
|
9
|
+
import type { FieldNumberFromJsonConfig } from '../field_number';
|
|
10
|
+
import type { FieldTextInputFromJsonConfig } from '../field_textinput';
|
|
11
|
+
import type { FieldVariableFromJsonConfig } from '../field_variable';
|
|
12
|
+
import type { Align } from '../inputs/align.js';
|
|
13
|
+
/**
|
|
14
|
+
* Defines the JSON structure for a block definition.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const blockDef: JsonBlockDefinition = {
|
|
19
|
+
* type: 'custom_block',
|
|
20
|
+
* message0: 'move %1 steps',
|
|
21
|
+
* args0: [
|
|
22
|
+
* {
|
|
23
|
+
* 'type': 'field_number',
|
|
24
|
+
* 'name': 'INPUT',
|
|
25
|
+
* },
|
|
26
|
+
* ],
|
|
27
|
+
* previousStatement: null,
|
|
28
|
+
* nextStatement: null,
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export interface JsonBlockDefinition {
|
|
33
|
+
type: string;
|
|
34
|
+
style?: string | null;
|
|
35
|
+
colour?: string | number;
|
|
36
|
+
output?: string | string[] | null;
|
|
37
|
+
previousStatement?: string | string[] | null;
|
|
38
|
+
nextStatement?: string | string[] | null;
|
|
39
|
+
outputShape?: number;
|
|
40
|
+
inputsInline?: boolean;
|
|
41
|
+
tooltip?: string;
|
|
42
|
+
helpUrl?: string;
|
|
43
|
+
ariaRoleDescription?: string;
|
|
44
|
+
extensions?: string[];
|
|
45
|
+
mutator?: string;
|
|
46
|
+
enableContextMenu?: boolean;
|
|
47
|
+
suppressPrefixSuffix?: boolean;
|
|
48
|
+
[key: `message${number}`]: string | undefined;
|
|
49
|
+
[key: `args${number}`]: JsonBlockArg[] | undefined;
|
|
50
|
+
[key: `implicitAlign${number}`]: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
export type JsonBlockArg = InputValueArg | InputStatementArg | InputDummyArg | InputEndRowArg | FieldInputArg | FieldNumberArg | FieldDropdownArg | FieldCheckboxArg | FieldImageArg | FieldVariableArg | UnknownArg;
|
|
53
|
+
interface UnknownArg {
|
|
54
|
+
type: string;
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A custom ARIA label for the input, used in place of the label derived from
|
|
59
|
+
* the input's preceding fields. May contain message references of the form
|
|
60
|
+
* `%{BKY_...}`, which are replaced with the corresponding `Blockly.Msg` value.
|
|
61
|
+
*/
|
|
62
|
+
type AriaLabelText = string;
|
|
63
|
+
/** Input args */
|
|
64
|
+
interface InputValueArg {
|
|
65
|
+
type: 'input_value';
|
|
66
|
+
name?: string;
|
|
67
|
+
check?: string | string[];
|
|
68
|
+
align?: Align;
|
|
69
|
+
ariaLabelText?: AriaLabelText;
|
|
70
|
+
}
|
|
71
|
+
interface InputStatementArg {
|
|
72
|
+
type: 'input_statement';
|
|
73
|
+
name?: string;
|
|
74
|
+
check?: string | string[];
|
|
75
|
+
ariaLabelText?: AriaLabelText;
|
|
76
|
+
}
|
|
77
|
+
interface InputDummyArg {
|
|
78
|
+
type: 'input_dummy';
|
|
79
|
+
name?: string;
|
|
80
|
+
ariaLabelText?: AriaLabelText;
|
|
81
|
+
}
|
|
82
|
+
interface InputEndRowArg {
|
|
83
|
+
type: 'input_end_row';
|
|
84
|
+
name?: string;
|
|
85
|
+
ariaLabelText?: AriaLabelText;
|
|
86
|
+
}
|
|
87
|
+
/** Field args */
|
|
88
|
+
interface FieldInputArg extends FieldTextInputFromJsonConfig {
|
|
89
|
+
type: 'field_input';
|
|
90
|
+
name?: string;
|
|
91
|
+
}
|
|
92
|
+
interface FieldNumberArg extends FieldNumberFromJsonConfig {
|
|
93
|
+
type: 'field_number';
|
|
94
|
+
name?: string;
|
|
95
|
+
}
|
|
96
|
+
interface FieldDropdownArg extends FieldDropdownFromJsonConfig {
|
|
97
|
+
type: 'field_dropdown';
|
|
98
|
+
name?: string;
|
|
99
|
+
}
|
|
100
|
+
interface FieldCheckboxArg extends FieldCheckboxFromJsonConfig {
|
|
101
|
+
type: 'field_checkbox';
|
|
102
|
+
name?: string;
|
|
103
|
+
}
|
|
104
|
+
interface FieldImageArg extends FieldImageFromJsonConfig {
|
|
105
|
+
type: 'field_image';
|
|
106
|
+
name?: string;
|
|
107
|
+
}
|
|
108
|
+
interface FieldVariableArg extends FieldVariableFromJsonConfig {
|
|
109
|
+
type: 'field_variable';
|
|
110
|
+
name?: string;
|
|
111
|
+
}
|
|
112
|
+
export {};
|
|
113
|
+
//# sourceMappingURL=i_json_block_definition.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { KeyboardShortcut } from '../shortcut_registry.js';
|
|
6
|
+
import type { KeyboardShortcut } from '../shortcut_registry.js';
|
|
7
7
|
/**
|
|
8
8
|
* An interface for an object that handles keyboard shortcuts.
|
|
9
9
|
*/
|
|
@@ -38,6 +38,18 @@ export interface INavigationPolicy<T> {
|
|
|
38
38
|
* there is none.
|
|
39
39
|
*/
|
|
40
40
|
getPreviousSibling(current: T): IFocusableNode | null;
|
|
41
|
+
/**
|
|
42
|
+
* Returns an ID corresponding to the visual "row" the given element is part
|
|
43
|
+
* of. All elements on the same visual row should share the same ID. For
|
|
44
|
+
* example, icons share their parent block's row ID, as do inline connected
|
|
45
|
+
* blocks or value inputs. Statement inputs, external inputs, or blocks
|
|
46
|
+
* connected to one another's previous or next connections form distinct
|
|
47
|
+
* visual rows and should have distinct row IDs.
|
|
48
|
+
*
|
|
49
|
+
* @param current The element to return the row ID of.
|
|
50
|
+
* @returns The row ID of the given element.
|
|
51
|
+
*/
|
|
52
|
+
getRowId(current: T): string;
|
|
41
53
|
/**
|
|
42
54
|
* Returns whether or not the given instance should be reachable via keyboard
|
|
43
55
|
* navigation.
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2022 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { ParameterState } from '../serialization/procedures';
|
|
7
|
-
import { IProcedureModel } from './i_procedure_model';
|
|
6
|
+
import type { ParameterState } from '../serialization/procedures';
|
|
7
|
+
import type { IProcedureModel } from './i_procedure_model';
|
|
8
8
|
/**
|
|
9
9
|
* A data model for a procedure.
|
|
10
10
|
*/
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Coordinate } from '../utils/coordinate.js';
|
|
7
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
8
|
-
import { ICopyable, ICopyData } from './i_copyable.js';
|
|
6
|
+
import type { Coordinate } from '../utils/coordinate.js';
|
|
7
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
8
|
+
import type { ICopyable, ICopyData } from './i_copyable.js';
|
|
9
9
|
/** An object that can paste data into a workspace. */
|
|
10
10
|
export interface IPaster<U extends ICopyData, T extends ICopyable<U>> {
|
|
11
11
|
paste(copyData: U, workspace: WorkspaceSvg, coordinate?: Coordinate): T | null;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
|
-
import { IProcedureModel } from './i_procedure_model.js';
|
|
7
|
+
import type { IProcedureModel } from './i_procedure_model.js';
|
|
8
8
|
/** The interface for a block which models a procedure. */
|
|
9
9
|
export interface IProcedureBlock {
|
|
10
10
|
getProcedureModel(): IProcedureModel;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2022 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IProcedureModel } from './i_procedure_model.js';
|
|
6
|
+
import type { IProcedureModel } from './i_procedure_model.js';
|
|
7
7
|
export interface IProcedureMap extends Map<string, IProcedureModel> {
|
|
8
8
|
/**
|
|
9
9
|
* Adds the given ProcedureModel to the map of procedure models, so that
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2022 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { State } from '../serialization/procedures.js';
|
|
7
|
-
import { IParameterModel } from './i_parameter_model.js';
|
|
6
|
+
import type { State } from '../serialization/procedures.js';
|
|
7
|
+
import type { IParameterModel } from './i_parameter_model.js';
|
|
8
8
|
/**
|
|
9
9
|
* A data model for a procedure.
|
|
10
10
|
*/
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
7
|
-
import { IFocusableNode } from './i_focusable_node.js';
|
|
6
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
7
|
+
import type { IFocusableNode } from './i_focusable_node.js';
|
|
8
8
|
/**
|
|
9
9
|
* The interface for an object that is selectable.
|
|
10
10
|
*
|
|
@@ -15,7 +15,7 @@ import { IFocusableNode } from './i_focusable_node.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export interface ISelectable extends IFocusableNode {
|
|
17
17
|
id: string;
|
|
18
|
-
workspace:
|
|
18
|
+
workspace: WorkspaceSvg;
|
|
19
19
|
/** Select this. Highlight it visually. */
|
|
20
20
|
select(): void;
|
|
21
21
|
/** Unselect this. Unhighlight it visually. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { FlyoutItemInfoArray } from '../utils/toolbox';
|
|
7
|
-
import type
|
|
7
|
+
import { type IToolboxItem } from './i_toolbox_item.js';
|
|
8
8
|
/**
|
|
9
9
|
* Interface for an item in the toolbox that can be selected.
|
|
10
10
|
*/
|
|
@@ -45,7 +45,7 @@ export interface ISelectableToolboxItem extends IToolboxItem {
|
|
|
45
45
|
onClick(_e: Event): void;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Type guard that checks whether an
|
|
48
|
+
* Type guard that checks whether an object is an ISelectableToolboxItem.
|
|
49
49
|
*/
|
|
50
|
-
export declare function isSelectableToolboxItem(
|
|
50
|
+
export declare function isSelectableToolboxItem(obj: any): obj is ISelectableToolboxItem;
|
|
51
51
|
//# sourceMappingURL=i_selectable_toolbox_item.d.ts.map
|
|
@@ -98,5 +98,9 @@ export interface IToolbox extends IRegistrable, IFocusableTree {
|
|
|
98
98
|
setSelectedItem(item: IToolboxItem | null): void;
|
|
99
99
|
/** Disposes of this toolbox. */
|
|
100
100
|
dispose(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Returns a list of items in this toolbox.
|
|
103
|
+
*/
|
|
104
|
+
getToolboxItems(): IToolboxItem[];
|
|
101
105
|
}
|
|
102
106
|
//# sourceMappingURL=i_toolbox.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { IFocusableNode } from './i_focusable_node.js';
|
|
7
|
+
import type { IToolbox } from './i_toolbox.js';
|
|
7
8
|
/**
|
|
8
9
|
* Interface for an item in the toolbox.
|
|
9
10
|
*/
|
|
@@ -67,5 +68,10 @@ export interface IToolboxItem extends IFocusableNode {
|
|
|
67
68
|
* @param isVisible True if category should be visible.
|
|
68
69
|
*/
|
|
69
70
|
setVisible_(isVisible: boolean): void;
|
|
71
|
+
getParentToolbox(): IToolbox;
|
|
70
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Type guard that checks whether an object is an IToolboxItem.
|
|
75
|
+
*/
|
|
76
|
+
export declare function isToolboxItem(obj: any): obj is IToolboxItem;
|
|
71
77
|
//# sourceMappingURL=i_toolbox_item.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IParameterModel } from './i_parameter_model.js';
|
|
6
|
+
import type { IParameterModel } from './i_parameter_model.js';
|
|
7
7
|
import type { IVariableModel, IVariableState } from './i_variable_model.js';
|
|
8
8
|
/** Interface for a parameter model that holds a variable model. */
|
|
9
9
|
export interface IVariableBackedParameterModel extends IParameterModel {
|