@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/field_image.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import type { FieldConfig } from './field.js';
|
|
12
|
+
import { Field } from './field.js';
|
|
12
13
|
/**
|
|
13
14
|
* Class for an image on a block.
|
|
14
15
|
*/
|
|
@@ -51,7 +52,7 @@ export declare class FieldImage extends Field<string> {
|
|
|
51
52
|
* @param flipRtl Whether to flip the icon in RTL.
|
|
52
53
|
* @param config A map of options used to configure the field.
|
|
53
54
|
* See the [field creation documentation]{@link
|
|
54
|
-
* https://
|
|
55
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/image/#creation}
|
|
55
56
|
* for a list of properties this parameter supports.
|
|
56
57
|
*/
|
|
57
58
|
constructor(src: string | typeof Field.SKIP_SETUP, width: string | number, height: string | number, alt?: string, onClick?: (p1: FieldImage) => void, flipRtl?: boolean, config?: FieldImageConfig);
|
|
@@ -129,6 +130,57 @@ export declare class FieldImage extends Field<string> {
|
|
|
129
130
|
* @internal
|
|
130
131
|
*/
|
|
131
132
|
static fromJson(options: FieldImageFromJsonConfig): FieldImage;
|
|
133
|
+
/**
|
|
134
|
+
* Gets an ARIA-friendly label representation of this field's type.
|
|
135
|
+
*
|
|
136
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
137
|
+
* version of the ARIA representation of the field's type.
|
|
138
|
+
*
|
|
139
|
+
* @returns An ARIA representation of the field's type or a default if it is
|
|
140
|
+
* unspecified.
|
|
141
|
+
*/
|
|
142
|
+
getAriaTypeName(): string | null;
|
|
143
|
+
/**
|
|
144
|
+
* Gets an ARIA-friendly label representation of this field's value.
|
|
145
|
+
*
|
|
146
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
147
|
+
* version of the ARIA representation of the field's value.
|
|
148
|
+
*
|
|
149
|
+
* @returns An ARIA representation of the field's text, or null if no text is
|
|
150
|
+
* currently defined or known for the field.
|
|
151
|
+
*/
|
|
152
|
+
getAriaValue(): string | null;
|
|
153
|
+
/**
|
|
154
|
+
* Computes a descriptive ARIA label to represent this field with configurable
|
|
155
|
+
* verbosity.
|
|
156
|
+
*
|
|
157
|
+
* A 'verbose' label includes type information, if available, whereas a
|
|
158
|
+
* non-verbose label only contains the field's value.
|
|
159
|
+
*
|
|
160
|
+
* Note that this will always return the latest representation of the field's
|
|
161
|
+
* label which may differ from any previously set ARIA label for the field
|
|
162
|
+
* itself. Implementations are largely responsible for ensuring that the
|
|
163
|
+
* field's ARIA label is set correctly at relevant moments in the field's
|
|
164
|
+
* lifecycle (such as when its value changes).
|
|
165
|
+
*
|
|
166
|
+
* Finally, it is never guaranteed that implementations use the label returned
|
|
167
|
+
* by this method for their actual ARIA label. Some implementations may rely
|
|
168
|
+
* on other contexts to convey information like the field's value. Example:
|
|
169
|
+
* checkboxes represent their checked/non-checked status (i.e. value) through
|
|
170
|
+
* a separate ARIA property.
|
|
171
|
+
*
|
|
172
|
+
* Returns an empty string on clickable images (buttons), as we do not want to
|
|
173
|
+
* include image buttons on the block-level ARIA label. When the button is
|
|
174
|
+
* focused the label is set in recomputeAriaContext below.
|
|
175
|
+
*
|
|
176
|
+
* @param includeTypeInfo Whether to include the field's type information in
|
|
177
|
+
* the returned label, if available.
|
|
178
|
+
*/
|
|
179
|
+
computeAriaLabel(includeTypeInfo: boolean): string;
|
|
180
|
+
/**
|
|
181
|
+
* Customizes label and sets additional aria state.
|
|
182
|
+
*/
|
|
183
|
+
recomputeAriaContext(): boolean;
|
|
132
184
|
}
|
|
133
185
|
/**
|
|
134
186
|
* Config options for the image field.
|
package/core/field_input.d.ts
CHANGED
|
@@ -3,14 +3,9 @@
|
|
|
3
3
|
* Copyright 2012 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_block_change.js';
|
|
12
|
-
import { Field, FieldConfig, FieldValidator } from './field.js';
|
|
13
|
-
import { Size } from './utils/size.js';
|
|
6
|
+
import type { FieldConfig, FieldValidator } from './field.js';
|
|
7
|
+
import { Field } from './field.js';
|
|
8
|
+
import type { Size } from './utils/size.js';
|
|
14
9
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
15
10
|
/**
|
|
16
11
|
* Supported types for FieldInput subclasses.
|
|
@@ -21,7 +16,7 @@ type InputTypes = string | number;
|
|
|
21
16
|
/**
|
|
22
17
|
* Abstract class for an editable input field.
|
|
23
18
|
*
|
|
24
|
-
* @
|
|
19
|
+
* @template T - The value stored on the field.
|
|
25
20
|
* @internal
|
|
26
21
|
*/
|
|
27
22
|
export declare abstract class FieldInput<T extends InputTypes> extends Field<string | T> {
|
|
@@ -40,6 +35,10 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
40
35
|
* True if the value currently displayed in the field's editory UI is valid.
|
|
41
36
|
*/
|
|
42
37
|
protected isTextValid_: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The warning icon to display on invalid input
|
|
40
|
+
*/
|
|
41
|
+
protected warningIcon: SVGElement | null;
|
|
43
42
|
/**
|
|
44
43
|
* The intial value of the field when the user opened an editor to change its
|
|
45
44
|
* value. When the editor is disposed, an event will be fired that uses this
|
|
@@ -78,13 +77,15 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
78
77
|
* to abort the change.
|
|
79
78
|
* @param config A map of options used to configure the field.
|
|
80
79
|
* See the [field creation documentation]{@link
|
|
81
|
-
* https://
|
|
80
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/text-input/#creation}
|
|
82
81
|
* for a list of properties this parameter supports.
|
|
83
82
|
*/
|
|
84
83
|
constructor(value?: string | typeof Field.SKIP_SETUP, validator?: FieldInputValidator<T> | null, config?: FieldInputConfig);
|
|
85
84
|
protected configure_(config: FieldInputConfig): void;
|
|
86
85
|
initView(): void;
|
|
87
86
|
isFullBlockField(): boolean;
|
|
87
|
+
/** Creates the DOM elements for the invalid input warning icon. */
|
|
88
|
+
protected createWarningIcon(): SVGElement | null;
|
|
88
89
|
/**
|
|
89
90
|
* Called by setValue if the text input is not valid. If the field is
|
|
90
91
|
* currently being edited it reverts value of the field to the previous
|
|
@@ -130,6 +131,7 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
130
131
|
* block field or not.
|
|
131
132
|
*/
|
|
132
133
|
protected render_(): void;
|
|
134
|
+
protected renderWarningIcon(rtl: boolean, isValid: boolean): void;
|
|
133
135
|
/**
|
|
134
136
|
* Set whether this field is spellchecked by the browser.
|
|
135
137
|
*
|
|
@@ -218,8 +220,8 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
218
220
|
protected resizeEditor_(): void;
|
|
219
221
|
/**
|
|
220
222
|
* Handles repositioning the WidgetDiv used for input fields when the
|
|
221
|
-
* workspace is resized.
|
|
222
|
-
* position of the text input
|
|
223
|
+
* workspace is resized. Scrolls this field into view, then updates the
|
|
224
|
+
* position of the text input.
|
|
223
225
|
*
|
|
224
226
|
* @returns True for rendered workspaces, as we never want to hide the widget
|
|
225
227
|
* div.
|
|
@@ -263,6 +265,29 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
263
265
|
* @returns The value to store.
|
|
264
266
|
*/
|
|
265
267
|
protected getValueFromEditorText_(text: string): any;
|
|
268
|
+
/**
|
|
269
|
+
* Gets an ARIA-friendly label representation of this field's type.
|
|
270
|
+
*
|
|
271
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
272
|
+
* version of the ARIA representation of the field's type.
|
|
273
|
+
*
|
|
274
|
+
* @returns An ARIA representation of the field's type or a default if it is
|
|
275
|
+
* unspecified.
|
|
276
|
+
*/
|
|
277
|
+
getAriaTypeName(): string | null;
|
|
278
|
+
/**
|
|
279
|
+
* Gets an ARIA-friendly label representation of this field's value.
|
|
280
|
+
*
|
|
281
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
282
|
+
* version of the ARIA representation of the field's value.
|
|
283
|
+
*
|
|
284
|
+
* @returns An ARIA representation of the field's text.
|
|
285
|
+
*/
|
|
286
|
+
getAriaValue(): string | null;
|
|
287
|
+
/**
|
|
288
|
+
* Customizes the label for this field to include "editable" if it applies.
|
|
289
|
+
*/
|
|
290
|
+
recomputeAriaContext(): boolean;
|
|
266
291
|
}
|
|
267
292
|
/**
|
|
268
293
|
* Config options for the input field.
|
|
@@ -276,7 +301,7 @@ export interface FieldInputConfig extends FieldConfig {
|
|
|
276
301
|
* A function that is called to validate changes to the field's value before
|
|
277
302
|
* they are set.
|
|
278
303
|
*
|
|
279
|
-
* @see {@link https://
|
|
304
|
+
* @see {@link https://docs.blockly.com/guides/create-custom-blocks/fields/validators/#return-values}
|
|
280
305
|
* @param newValue The value to be validated.
|
|
281
306
|
* @returns One of three instructions for setting the new value: `T`, `null`,
|
|
282
307
|
* or `undefined`.
|
package/core/field_label.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @class
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import type { FieldConfig } from './field.js';
|
|
13
|
+
import { Field } from './field.js';
|
|
13
14
|
/**
|
|
14
15
|
* Class for a non-editable, non-serializable text field.
|
|
15
16
|
*/
|
|
@@ -23,6 +24,7 @@ export declare class FieldLabel extends Field<string> {
|
|
|
23
24
|
EDITABLE: boolean;
|
|
24
25
|
/** Text labels should not truncate. */
|
|
25
26
|
maxDisplayLength: number;
|
|
27
|
+
isLabelField(): boolean;
|
|
26
28
|
/**
|
|
27
29
|
* @param value The initial value of the field. Should cast to a string.
|
|
28
30
|
* Defaults to an empty string if null or undefined. Also accepts
|
|
@@ -32,7 +34,7 @@ export declare class FieldLabel extends Field<string> {
|
|
|
32
34
|
* @param textClass Optional CSS class for the field's text.
|
|
33
35
|
* @param config A map of options used to configure the field.
|
|
34
36
|
* See the [field creation documentation]{@link
|
|
35
|
-
* https://
|
|
37
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/label/#creation}
|
|
36
38
|
* for a list of properties this parameter supports.
|
|
37
39
|
*/
|
|
38
40
|
constructor(value?: string | typeof Field.SKIP_SETUP, textClass?: string, config?: FieldLabelConfig);
|
|
@@ -41,6 +43,33 @@ export declare class FieldLabel extends Field<string> {
|
|
|
41
43
|
* Create block UI for this label.
|
|
42
44
|
*/
|
|
43
45
|
initView(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Computes a descriptive ARIA label to represent this field with configurable
|
|
48
|
+
* verbosity.
|
|
49
|
+
*
|
|
50
|
+
* A 'verbose' label includes type information, if available, whereas a
|
|
51
|
+
* non-verbose label only contains the field's value.
|
|
52
|
+
*
|
|
53
|
+
* Note that this will always return the latest representation of the field's
|
|
54
|
+
* label which may differ from any previously set ARIA label for the field
|
|
55
|
+
* itself. Implementations are largely responsible for ensuring that the
|
|
56
|
+
* field's ARIA label is set correctly at relevant moments in the field's
|
|
57
|
+
* lifecycle (such as when its value changes).
|
|
58
|
+
*
|
|
59
|
+
* Finally, it is never guaranteed that implementations use the label returned
|
|
60
|
+
* by this method for their actual ARIA label. Some implementations may rely
|
|
61
|
+
* on other contexts to convey information like the field's value. Example:
|
|
62
|
+
* checkboxes represent their checked/non-checked status (i.e. value) through
|
|
63
|
+
* a separate ARIA property.
|
|
64
|
+
*
|
|
65
|
+
* Unlike other built-in fields, FieldLabel does return an empty string when its
|
|
66
|
+
* value is empty. This is because empty labels are sometimes used for layout
|
|
67
|
+
* purposes.
|
|
68
|
+
*
|
|
69
|
+
* @param includeTypeInfo Whether to include the field's type information in
|
|
70
|
+
* the returned label, if available.
|
|
71
|
+
*/
|
|
72
|
+
computeAriaLabel(includeTypeInfo?: boolean): string;
|
|
44
73
|
/**
|
|
45
74
|
* Ensure that the input value casts to a valid string.
|
|
46
75
|
*
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @class
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import type { FieldLabelConfig, FieldLabelFromJsonConfig } from './field_label.js';
|
|
14
|
+
import { FieldLabel } from './field_label.js';
|
|
14
15
|
/**
|
|
15
16
|
* Class for a non-editable, serializable text field.
|
|
16
17
|
*/
|
|
@@ -32,7 +33,7 @@ export declare class FieldLabelSerializable extends FieldLabel {
|
|
|
32
33
|
* @param textClass Optional CSS class for the field's text.
|
|
33
34
|
* @param config A map of options used to configure the field.
|
|
34
35
|
* See the [field creation documentation]{@link
|
|
35
|
-
* https://
|
|
36
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/label-serializable/#creation}
|
|
36
37
|
* for a list of properties this parameter supports.
|
|
37
38
|
*/
|
|
38
39
|
constructor(value?: string, textClass?: string, config?: FieldLabelConfig);
|
package/core/field_number.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import { Field } from './field.js';
|
|
12
|
-
import {
|
|
12
|
+
import type { FieldInputConfig, FieldInputValidator } from './field_input.js';
|
|
13
|
+
import { FieldInput } from './field_input.js';
|
|
13
14
|
/**
|
|
14
15
|
* Class for an editable number field.
|
|
15
16
|
*/
|
|
@@ -43,7 +44,7 @@ export declare class FieldNumber extends FieldInput<number> {
|
|
|
43
44
|
* to abort the change.
|
|
44
45
|
* @param config A map of options used to configure the field.
|
|
45
46
|
* See the [field creation documentation]{@link
|
|
46
|
-
* https://
|
|
47
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/number/#creation}
|
|
47
48
|
* for a list of properties this parameter supports.
|
|
48
49
|
*/
|
|
49
50
|
constructor(value?: string | number | typeof Field.SKIP_SETUP, min?: string | number | null, max?: string | number | null, precision?: string | number | null, validator?: FieldNumberValidator | null, config?: FieldNumberConfig);
|
|
@@ -160,6 +161,16 @@ export declare class FieldNumber extends FieldInput<number> {
|
|
|
160
161
|
* @internal
|
|
161
162
|
*/
|
|
162
163
|
static fromJson(options: FieldNumberFromJsonConfig): FieldNumber;
|
|
164
|
+
/**
|
|
165
|
+
* Gets an ARIA-friendly label representation of this field's type.
|
|
166
|
+
*
|
|
167
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
168
|
+
* version of the ARIA representation of the field's type.
|
|
169
|
+
*
|
|
170
|
+
* @returns An ARIA representation of the field's type or a default if it is
|
|
171
|
+
* unspecified.
|
|
172
|
+
*/
|
|
173
|
+
getAriaTypeName(): string | null;
|
|
163
174
|
}
|
|
164
175
|
/**
|
|
165
176
|
* Config options for the number field.
|
|
@@ -179,7 +190,7 @@ export interface FieldNumberFromJsonConfig extends FieldNumberConfig {
|
|
|
179
190
|
* A function that is called to validate changes to the field's value before
|
|
180
191
|
* they are set.
|
|
181
192
|
*
|
|
182
|
-
* @see {@link https://
|
|
193
|
+
* @see {@link https://docs.blockly.com/guides/create-custom-blocks/fields/validators/#return-values}
|
|
183
194
|
* @param newValue The value to be validated.
|
|
184
195
|
* @returns One of three instructions for setting the new value: `T`, `null`,
|
|
185
196
|
* or `undefined`.
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './
|
|
12
|
-
import {
|
|
13
|
-
import { FieldInput
|
|
11
|
+
import type { Field } from './field.js';
|
|
12
|
+
import type { FieldInputConfig, FieldInputValidator } from './field_input.js';
|
|
13
|
+
import { FieldInput } from './field_input.js';
|
|
14
14
|
/**
|
|
15
15
|
* Class for an editable text field.
|
|
16
16
|
*/
|
|
@@ -26,7 +26,7 @@ export declare class FieldTextInput extends FieldInput<string> {
|
|
|
26
26
|
* to abort the change.
|
|
27
27
|
* @param config A map of options used to configure the field.
|
|
28
28
|
* See the [field creation documentation]{@link
|
|
29
|
-
* https://
|
|
29
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/text-input/#creation}
|
|
30
30
|
* for a list of properties this parameter supports.
|
|
31
31
|
*/
|
|
32
32
|
constructor(value?: string | typeof Field.SKIP_SETUP, validator?: FieldTextInputValidator | null, config?: FieldTextInputConfig);
|
|
@@ -48,6 +48,16 @@ export declare class FieldTextInput extends FieldInput<string> {
|
|
|
48
48
|
* @internal
|
|
49
49
|
*/
|
|
50
50
|
static fromJson(options: FieldTextInputFromJsonConfig): FieldTextInput;
|
|
51
|
+
/**
|
|
52
|
+
* Gets an ARIA-friendly label representation of this field's type.
|
|
53
|
+
*
|
|
54
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
55
|
+
* version of the ARIA representation of the field's type.
|
|
56
|
+
*
|
|
57
|
+
* @returns An ARIA representation of the field's type or a default if it is
|
|
58
|
+
* unspecified.
|
|
59
|
+
*/
|
|
60
|
+
getAriaTypeName(): string | null;
|
|
51
61
|
}
|
|
52
62
|
/**
|
|
53
63
|
* Config options for the text input field.
|
|
@@ -63,7 +73,7 @@ export interface FieldTextInputFromJsonConfig extends FieldTextInputConfig {
|
|
|
63
73
|
* A function that is called to validate changes to the field's value before
|
|
64
74
|
* they are set.
|
|
65
75
|
*
|
|
66
|
-
* @see {@link https://
|
|
76
|
+
* @see {@link https://docs.blockly.com/guides/create-custom-blocks/fields/validators/#return-values}
|
|
67
77
|
* @param newValue The value to be validated.
|
|
68
78
|
* @returns One of three instructions for setting the new value: `T`, `null`,
|
|
69
79
|
* or `undefined`.
|
package/core/field_variable.d.ts
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './events/events_block_change.js';
|
|
12
11
|
import type { Block } from './block.js';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import type { FieldConfig } from './field.js';
|
|
13
|
+
import { Field } from './field.js';
|
|
14
|
+
import type { FieldDropdownValidator, MenuGenerator, MenuOption } from './field_dropdown.js';
|
|
15
|
+
import { FieldDropdown } from './field_dropdown.js';
|
|
16
|
+
import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
16
17
|
import type { Menu } from './menu.js';
|
|
17
18
|
import type { MenuItem } from './menuitem.js';
|
|
18
19
|
/**
|
|
@@ -52,7 +53,7 @@ export declare class FieldVariable extends FieldDropdown {
|
|
|
52
53
|
* is not provided.
|
|
53
54
|
* @param config A map of options used to configure the field.
|
|
54
55
|
* See the [field creation documentation]{@link
|
|
55
|
-
* https://
|
|
56
|
+
* https://docs.blockly.com/guides/create-custom-blocks/fields/built-in-fields/variable/#creation}
|
|
56
57
|
* for a list of properties this parameter supports.
|
|
57
58
|
*/
|
|
58
59
|
constructor(varName: string | null | typeof Field.SKIP_SETUP, validator?: FieldVariableValidator, variableTypes?: string[] | null, defaultType?: string, config?: FieldVariableConfig);
|
|
@@ -228,6 +229,15 @@ export declare class FieldVariable extends FieldDropdown {
|
|
|
228
229
|
* @returns Array of variable names/id tuples.
|
|
229
230
|
*/
|
|
230
231
|
static dropdownCreate(this: FieldVariable): MenuOption[];
|
|
232
|
+
/**
|
|
233
|
+
* Gets an ARIA-friendly label representation of this field's value.
|
|
234
|
+
*
|
|
235
|
+
* Implementations are responsible for, and encouraged to, return a localized
|
|
236
|
+
* version of the ARIA representation of the field's value.
|
|
237
|
+
*
|
|
238
|
+
* @returns An ARIA representation of the field's text.
|
|
239
|
+
*/
|
|
240
|
+
getAriaValue(): string;
|
|
231
241
|
}
|
|
232
242
|
/**
|
|
233
243
|
* Config options for the variable field.
|
|
@@ -246,7 +256,7 @@ export interface FieldVariableFromJsonConfig extends FieldVariableConfig {
|
|
|
246
256
|
* A function that is called to validate changes to the field's value before
|
|
247
257
|
* they are set.
|
|
248
258
|
*
|
|
249
|
-
* @see {@link https://
|
|
259
|
+
* @see {@link https://docs.blockly.com/guides/create-custom-blocks/fields/validators/#return-values}
|
|
250
260
|
* @param newValue The value to be validated.
|
|
251
261
|
* @returns One of three instructions for setting the new value: `T`, `null`,
|
|
252
262
|
* or `undefined`.
|
package/core/flyout_base.d.ts
CHANGED
|
@@ -3,43 +3,23 @@
|
|
|
3
3
|
* Copyright 2011 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Flyout tray containing blocks which may be created.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import { BlockSvg } from './block_svg.js';
|
|
12
6
|
import { DeleteArea } from './delete_area.js';
|
|
13
7
|
import { FlyoutItem } from './flyout_item.js';
|
|
14
|
-
import { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
8
|
+
import type { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
15
9
|
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
16
10
|
import type { IFlyoutInflater } from './interfaces/i_flyout_inflater.js';
|
|
17
|
-
import { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
18
|
-
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
19
11
|
import type { Options } from './options.js';
|
|
20
|
-
import * as blocks from './serialization/blocks.js';
|
|
21
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
22
12
|
import { Svg } from './utils/svg.js';
|
|
23
13
|
import * as toolbox from './utils/toolbox.js';
|
|
24
14
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
25
15
|
/**
|
|
26
16
|
* Class for a flyout.
|
|
27
17
|
*/
|
|
28
|
-
export declare abstract class Flyout extends DeleteArea implements IAutoHideable, IFlyout
|
|
18
|
+
export declare abstract class Flyout extends DeleteArea implements IAutoHideable, IFlyout {
|
|
29
19
|
/**
|
|
30
20
|
* Position the flyout.
|
|
31
21
|
*/
|
|
32
22
|
abstract position(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Determine if a drag delta is toward the workspace, based on the position
|
|
35
|
-
* and orientation of the flyout. This is used in determineDragIntention_ to
|
|
36
|
-
* determine if a new block should be created or if the flyout should scroll.
|
|
37
|
-
*
|
|
38
|
-
* @param currentDragDeltaXY How far the pointer has
|
|
39
|
-
* moved from the position at mouse down, in pixel units.
|
|
40
|
-
* @returns True if the drag is toward the workspace.
|
|
41
|
-
*/
|
|
42
|
-
abstract isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;
|
|
43
23
|
/**
|
|
44
24
|
* Sets the translation of the flyout to match the scrollbars.
|
|
45
25
|
*
|
|
@@ -151,27 +131,6 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
151
131
|
* Height of flyout.
|
|
152
132
|
*/
|
|
153
133
|
protected height_: number;
|
|
154
|
-
/**
|
|
155
|
-
* Range of a drag angle from a flyout considered "dragging toward
|
|
156
|
-
* workspace". Drags that are within the bounds of this many degrees from
|
|
157
|
-
* the orthogonal line to the flyout edge are considered to be "drags toward
|
|
158
|
-
* the workspace".
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
*
|
|
162
|
-
* ```
|
|
163
|
-
* Flyout Edge Workspace
|
|
164
|
-
* [block] / <-within this angle, drags "toward workspace" |
|
|
165
|
-
* [block] ---- orthogonal to flyout boundary ---- |
|
|
166
|
-
* [block] \ |
|
|
167
|
-
* ```
|
|
168
|
-
*
|
|
169
|
-
* The angle is given in degrees from the orthogonal.
|
|
170
|
-
*
|
|
171
|
-
* This is used to know when to create a new block and when to scroll the
|
|
172
|
-
* flyout. Setting it to 360 means that all drags create a new block.
|
|
173
|
-
*/
|
|
174
|
-
protected dragAngleRange_: number;
|
|
175
134
|
/**
|
|
176
135
|
* The path around the background of the flyout, which will be filled with a
|
|
177
136
|
* background colour.
|
|
@@ -309,6 +268,16 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
309
268
|
* toolbox definition, or a string with the name of the dynamic category.
|
|
310
269
|
*/
|
|
311
270
|
show(flyoutDef: toolbox.FlyoutDefinition | string): void;
|
|
271
|
+
/**
|
|
272
|
+
* Updates the aria attributes for the entire flyout dom.
|
|
273
|
+
* This needs to do two things:
|
|
274
|
+
* 1. Set aria-owns on the flyout's workspace canvas to include the ids of all
|
|
275
|
+
* focusable elements in the flyout.
|
|
276
|
+
* 2. Update the aria attributes on the flyout's workspace. This can't be done at workspace
|
|
277
|
+
* creation because the workspace may not have all required information until the flyout
|
|
278
|
+
* is fully shown.
|
|
279
|
+
*/
|
|
280
|
+
protected updateAriaContext(): void;
|
|
312
281
|
/**
|
|
313
282
|
* Create the contents array and gaps array necessary to create the layout for
|
|
314
283
|
* the flyout.
|
|
@@ -348,25 +317,6 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
348
317
|
* @param e Pointer down event.
|
|
349
318
|
*/
|
|
350
319
|
private onMouseDown;
|
|
351
|
-
/**
|
|
352
|
-
* Does this flyout allow you to create a new instance of the given block?
|
|
353
|
-
* Used for deciding if a block can be "dragged out of" the flyout.
|
|
354
|
-
*
|
|
355
|
-
* @param block The block to copy from the flyout.
|
|
356
|
-
* @returns True if you can create a new instance of the block, false
|
|
357
|
-
* otherwise.
|
|
358
|
-
* @internal
|
|
359
|
-
*/
|
|
360
|
-
isBlockCreatable(block: BlockSvg): boolean;
|
|
361
|
-
/**
|
|
362
|
-
* Create a copy of this block on the workspace.
|
|
363
|
-
*
|
|
364
|
-
* @param originalBlock The block to copy from the flyout.
|
|
365
|
-
* @returns The newly created block.
|
|
366
|
-
* @throws {Error} if something went wrong with deserialization.
|
|
367
|
-
* @internal
|
|
368
|
-
*/
|
|
369
|
-
createBlock(originalBlock: BlockSvg): BlockSvg;
|
|
370
320
|
/**
|
|
371
321
|
* Reflow flyout contents.
|
|
372
322
|
*/
|
|
@@ -377,20 +327,6 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
377
327
|
* @internal
|
|
378
328
|
*/
|
|
379
329
|
isScrollable(): boolean;
|
|
380
|
-
/**
|
|
381
|
-
* Serialize a block to JSON.
|
|
382
|
-
*
|
|
383
|
-
* @param block The block to serialize.
|
|
384
|
-
* @returns A serialized representation of the block.
|
|
385
|
-
*/
|
|
386
|
-
protected serializeBlock(block: BlockSvg): blocks.State;
|
|
387
|
-
/**
|
|
388
|
-
* Positions a block on the target workspace.
|
|
389
|
-
*
|
|
390
|
-
* @param oldBlock The flyout block being copied.
|
|
391
|
-
* @param block The block to posiiton.
|
|
392
|
-
*/
|
|
393
|
-
private positionNewBlock;
|
|
394
330
|
/**
|
|
395
331
|
* Returns the inflater responsible for constructing items of the given type.
|
|
396
332
|
*
|
|
@@ -399,55 +335,5 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
399
335
|
* is registered for that type.
|
|
400
336
|
*/
|
|
401
337
|
protected getInflaterForType(type: string): IFlyoutInflater | null;
|
|
402
|
-
/**
|
|
403
|
-
* See IFocusableNode.getFocusableElement.
|
|
404
|
-
*
|
|
405
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
406
|
-
*/
|
|
407
|
-
getFocusableElement(): HTMLElement | SVGElement;
|
|
408
|
-
/**
|
|
409
|
-
* See IFocusableNode.getFocusableTree.
|
|
410
|
-
*
|
|
411
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
412
|
-
*/
|
|
413
|
-
getFocusableTree(): IFocusableTree;
|
|
414
|
-
/** See IFocusableNode.onNodeFocus. */
|
|
415
|
-
onNodeFocus(): void;
|
|
416
|
-
/** See IFocusableNode.onNodeBlur. */
|
|
417
|
-
onNodeBlur(): void;
|
|
418
|
-
/** See IFocusableNode.canBeFocused. */
|
|
419
|
-
canBeFocused(): boolean;
|
|
420
|
-
/**
|
|
421
|
-
* See IFocusableNode.getRootFocusableNode.
|
|
422
|
-
*
|
|
423
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
424
|
-
*/
|
|
425
|
-
getRootFocusableNode(): IFocusableNode;
|
|
426
|
-
/**
|
|
427
|
-
* See IFocusableNode.getRestoredFocusableNode.
|
|
428
|
-
*
|
|
429
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
430
|
-
*/
|
|
431
|
-
getRestoredFocusableNode(_previousNode: IFocusableNode | null): IFocusableNode | null;
|
|
432
|
-
/**
|
|
433
|
-
* See IFocusableNode.getNestedTrees.
|
|
434
|
-
*
|
|
435
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
436
|
-
*/
|
|
437
|
-
getNestedTrees(): Array<IFocusableTree>;
|
|
438
|
-
/**
|
|
439
|
-
* See IFocusableNode.lookUpFocusableNode.
|
|
440
|
-
*
|
|
441
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
442
|
-
*/
|
|
443
|
-
lookUpFocusableNode(_id: string): IFocusableNode | null;
|
|
444
|
-
/** See IFocusableTree.onTreeFocus. */
|
|
445
|
-
onTreeFocus(_node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
446
|
-
/**
|
|
447
|
-
* See IFocusableNode.onTreeBlur.
|
|
448
|
-
*
|
|
449
|
-
* @deprecated v12: Use the Flyout's workspace for focus operations, instead.
|
|
450
|
-
*/
|
|
451
|
-
onTreeBlur(_nextTree: IFocusableTree | null): void;
|
|
452
338
|
}
|
|
453
339
|
//# sourceMappingURL=flyout_base.d.ts.map
|
package/core/flyout_button.d.ts
CHANGED
|
@@ -136,5 +136,16 @@ export declare class FlyoutButton implements IBoundedElement, IRenderedElement,
|
|
|
136
136
|
onNodeBlur(): void;
|
|
137
137
|
/** See IFocusableNode.canBeFocused. */
|
|
138
138
|
canBeFocused(): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Returns the ID of this FlyoutButton.
|
|
141
|
+
*/
|
|
142
|
+
getId(): string;
|
|
143
|
+
/**
|
|
144
|
+
* Handles the user acting on this button via keyboard navigation.
|
|
145
|
+
* Invokes the click handler callback for buttons. For labels, which are not
|
|
146
|
+
* interactive, shows a toast directing the user to navigate using the arrow
|
|
147
|
+
* keys or the next-heading shortcut.
|
|
148
|
+
*/
|
|
149
|
+
performAction(): void;
|
|
139
150
|
}
|
|
140
151
|
//# sourceMappingURL=flyout_button.d.ts.map
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { Flyout } from './flyout_base.js';
|
|
7
7
|
import type { FlyoutItem } from './flyout_item.js';
|
|
8
8
|
import type { Options } from './options.js';
|
|
9
|
-
import type { Coordinate } from './utils/coordinate.js';
|
|
10
9
|
import { Rect } from './utils/rect.js';
|
|
11
10
|
/**
|
|
12
11
|
* Class for a flyout.
|
|
@@ -60,16 +59,6 @@ export declare class HorizontalFlyout extends Flyout {
|
|
|
60
59
|
* @param contents The flyout items to lay out.
|
|
61
60
|
*/
|
|
62
61
|
protected layout_(contents: FlyoutItem[]): void;
|
|
63
|
-
/**
|
|
64
|
-
* Determine if a drag delta is toward the workspace, based on the position
|
|
65
|
-
* and orientation of the flyout. This is used in determineDragIntention_ to
|
|
66
|
-
* determine if a new block should be created or if the flyout should scroll.
|
|
67
|
-
*
|
|
68
|
-
* @param currentDragDeltaXY How far the pointer has moved from the position
|
|
69
|
-
* at mouse down, in pixel units.
|
|
70
|
-
* @returns True if the drag is toward the workspace.
|
|
71
|
-
*/
|
|
72
|
-
isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;
|
|
73
62
|
/**
|
|
74
63
|
* Returns the bounding rectangle of the drag target area in pixel units
|
|
75
64
|
* relative to viewport.
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
12
|
-
import { ContainerRegion
|
|
12
|
+
import type { ContainerRegion } from './metrics_manager.js';
|
|
13
|
+
import { MetricsManager } from './metrics_manager.js';
|
|
13
14
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
14
15
|
/**
|
|
15
16
|
* Calculates metrics for a flyout's workspace.
|