blockly 12.5.1 → 13.0.0-beta.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/blockly.min.js +1541 -700
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +1449 -674
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +16 -16
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +1 -1
- package/core/block_aria_composer.d.ts +119 -0
- package/core/block_svg.d.ts +59 -16
- package/core/blockly.d.ts +21 -16
- package/core/bubbles/bubble.d.ts +17 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +9 -1
- package/core/bubbles/text_bubble.d.ts +4 -1
- package/core/bubbles/textinput_bubble.d.ts +5 -0
- package/core/comments/comment_editor.d.ts +2 -2
- package/core/comments/rendered_workspace_comment.d.ts +6 -1
- package/core/common.d.ts +1 -1
- package/core/css.d.ts +2 -1
- package/core/dragging/block_drag_strategy.d.ts +126 -14
- 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 +13 -14
- package/core/events/events_block_create.d.ts +0 -3
- package/core/events/events_block_delete.d.ts +0 -3
- package/core/events/events_comment_create.d.ts +0 -3
- package/core/events/events_comment_delete.d.ts +0 -3
- package/core/field.d.ts +69 -2
- package/core/field_input.d.ts +23 -0
- package/core/flyout_base.d.ts +1 -125
- package/core/flyout_button.d.ts +9 -0
- package/core/flyout_horizontal.d.ts +0 -11
- package/core/flyout_vertical.d.ts +0 -11
- package/core/focus_manager.d.ts +47 -2
- package/core/gesture.d.ts +0 -12
- package/core/hints.d.ts +44 -0
- package/core/icons/icon.d.ts +6 -0
- package/core/inputs/input.d.ts +22 -1
- 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_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_focusable_node.d.ts +8 -0
- package/core/interfaces/i_focusable_tree.d.ts +8 -0
- package/core/interfaces/i_json_block_definition.d.ts +102 -0
- package/core/interfaces/i_navigation_policy.d.ts +12 -0
- package/core/interfaces/i_selectable.d.ts +2 -2
- 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/keyboard_nav/keyboard_mover.d.ts +149 -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 +225 -0
- package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
- package/core/registry.d.ts +0 -2
- package/core/renderers/common/constants.d.ts +4 -7
- package/core/renderers/common/i_path_object.d.ts +8 -0
- package/core/renderers/common/path_object.d.ts +5 -14
- package/core/renderers/common/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +1 -14
- 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/shortcut_items.d.ts +73 -1
- package/core/shortcut_registry.d.ts +6 -0
- package/core/theme.d.ts +0 -2
- package/core/toast.d.ts +2 -11
- package/core/toolbox/category.d.ts +5 -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/utils/aria.d.ts +245 -28
- package/core/utils/dom.d.ts +1 -1
- package/core/utils/shortcut_formatting.d.ts +22 -0
- package/core/utils/useragent.d.ts +1 -0
- package/core/variables.d.ts +1 -1
- package/core/workspace_audio.d.ts +23 -0
- package/core/workspace_svg.d.ts +8 -50
- package/dart_compressed.js +9 -9
- package/dart_compressed.js.map +1 -1
- package/index.mjs +13 -5
- package/javascript_compressed.js +11 -10
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +7 -7
- package/lua_compressed.js.map +1 -1
- package/msg/ab.js +65 -0
- package/msg/ab.mjs +65 -0
- package/msg/ace.js +65 -0
- package/msg/ace.mjs +65 -0
- package/msg/af.js +65 -0
- package/msg/af.mjs +65 -0
- package/msg/am.js +65 -0
- package/msg/am.mjs +65 -0
- package/msg/ar.js +65 -0
- package/msg/ar.mjs +65 -0
- package/msg/ast.js +65 -0
- package/msg/ast.mjs +65 -0
- package/msg/az.js +65 -0
- package/msg/az.mjs +65 -0
- package/msg/ba.js +65 -0
- package/msg/ba.mjs +65 -0
- package/msg/bcc.js +65 -0
- package/msg/bcc.mjs +65 -0
- package/msg/be-tarask.js +65 -0
- package/msg/be-tarask.mjs +65 -0
- package/msg/be.js +65 -0
- package/msg/be.mjs +65 -0
- package/msg/bg.js +65 -0
- package/msg/bg.mjs +65 -0
- package/msg/bn.js +65 -0
- package/msg/bn.mjs +65 -0
- package/msg/br.js +65 -0
- package/msg/br.mjs +65 -0
- package/msg/bs.js +65 -0
- package/msg/bs.mjs +65 -0
- package/msg/ca.js +65 -0
- package/msg/ca.mjs +65 -0
- package/msg/cdo.js +65 -0
- package/msg/cdo.mjs +65 -0
- package/msg/ce.js +65 -0
- package/msg/ce.mjs +65 -0
- package/msg/cs.js +65 -0
- package/msg/cs.mjs +65 -0
- package/msg/da.js +65 -0
- package/msg/da.mjs +65 -0
- package/msg/de.js +65 -0
- package/msg/de.mjs +65 -0
- package/msg/diq.js +65 -0
- package/msg/diq.mjs +65 -0
- package/msg/dtp.js +65 -0
- package/msg/dtp.mjs +65 -0
- package/msg/dty.js +65 -0
- package/msg/dty.mjs +65 -0
- package/msg/ee.js +65 -0
- package/msg/ee.mjs +65 -0
- package/msg/el.js +65 -0
- package/msg/el.mjs +65 -0
- package/msg/en-gb.js +65 -0
- package/msg/en-gb.mjs +65 -0
- package/msg/en.js +65 -0
- package/msg/en.mjs +65 -0
- package/msg/eo.js +65 -0
- package/msg/eo.mjs +65 -0
- package/msg/es.js +65 -0
- package/msg/es.mjs +65 -0
- package/msg/et.js +65 -0
- package/msg/et.mjs +65 -0
- package/msg/eu.js +65 -0
- package/msg/eu.mjs +65 -0
- package/msg/fa.js +65 -0
- package/msg/fa.mjs +65 -0
- package/msg/fi.js +65 -0
- package/msg/fi.mjs +65 -0
- package/msg/fo.js +65 -0
- package/msg/fo.mjs +65 -0
- package/msg/fr.js +65 -0
- package/msg/fr.mjs +65 -0
- package/msg/frr.js +65 -0
- package/msg/frr.mjs +65 -0
- package/msg/gl.js +65 -0
- package/msg/gl.mjs +65 -0
- package/msg/gn.js +65 -0
- package/msg/gn.mjs +65 -0
- package/msg/gor.js +65 -0
- package/msg/gor.mjs +65 -0
- package/msg/ha.js +65 -0
- package/msg/ha.mjs +65 -0
- package/msg/hak.js +65 -0
- package/msg/hak.mjs +65 -0
- package/msg/he.js +65 -0
- package/msg/he.mjs +65 -0
- package/msg/hi.js +65 -0
- package/msg/hi.mjs +65 -0
- package/msg/hr.js +65 -0
- package/msg/hr.mjs +65 -0
- package/msg/hrx.js +65 -0
- package/msg/hrx.mjs +65 -0
- package/msg/hsb.js +65 -0
- package/msg/hsb.mjs +65 -0
- package/msg/hu.js +65 -0
- package/msg/hu.mjs +65 -0
- package/msg/hy.js +65 -0
- package/msg/hy.mjs +65 -0
- package/msg/ia.js +65 -0
- package/msg/ia.mjs +65 -0
- package/msg/id.js +65 -0
- package/msg/id.mjs +65 -0
- package/msg/ig.js +65 -0
- package/msg/ig.mjs +65 -0
- package/msg/inh.js +65 -0
- package/msg/inh.mjs +65 -0
- package/msg/is.js +65 -0
- package/msg/is.mjs +65 -0
- package/msg/it.js +65 -0
- package/msg/it.mjs +65 -0
- package/msg/ja.js +65 -0
- package/msg/ja.mjs +65 -0
- package/msg/ka.js +65 -0
- package/msg/ka.mjs +65 -0
- package/msg/kab.js +65 -0
- package/msg/kab.mjs +65 -0
- package/msg/kbd-cyrl.js +65 -0
- package/msg/kbd-cyrl.mjs +65 -0
- package/msg/km.js +65 -0
- package/msg/km.mjs +65 -0
- package/msg/kn.js +65 -0
- package/msg/kn.mjs +65 -0
- package/msg/ko.js +65 -0
- package/msg/ko.mjs +65 -0
- package/msg/ksh.js +65 -0
- package/msg/ksh.mjs +65 -0
- package/msg/ku-latn.js +65 -0
- package/msg/ku-latn.mjs +65 -0
- package/msg/ky.js +65 -0
- package/msg/ky.mjs +65 -0
- package/msg/la.js +65 -0
- package/msg/la.mjs +65 -0
- package/msg/lb.js +65 -0
- package/msg/lb.mjs +65 -0
- package/msg/lki.js +65 -0
- package/msg/lki.mjs +65 -0
- package/msg/lo.js +65 -0
- package/msg/lo.mjs +65 -0
- package/msg/lrc.js +65 -0
- package/msg/lrc.mjs +65 -0
- package/msg/lt.js +65 -0
- package/msg/lt.mjs +65 -0
- package/msg/lv.js +65 -0
- package/msg/lv.mjs +65 -0
- package/msg/mg.js +65 -0
- package/msg/mg.mjs +65 -0
- package/msg/mk.js +65 -0
- package/msg/mk.mjs +65 -0
- package/msg/ml.js +65 -0
- package/msg/ml.mjs +65 -0
- package/msg/mnw.js +65 -0
- package/msg/mnw.mjs +65 -0
- package/msg/ms.js +65 -0
- package/msg/ms.mjs +65 -0
- package/msg/my.js +65 -0
- package/msg/my.mjs +65 -0
- package/msg/mzn.js +65 -0
- package/msg/mzn.mjs +65 -0
- package/msg/nb.js +65 -0
- package/msg/nb.mjs +65 -0
- package/msg/ne.js +65 -0
- package/msg/ne.mjs +65 -0
- package/msg/nl.js +65 -0
- package/msg/nl.mjs +65 -0
- package/msg/oc.js +65 -0
- package/msg/oc.mjs +65 -0
- package/msg/olo.js +65 -0
- package/msg/olo.mjs +65 -0
- package/msg/pa.js +65 -0
- package/msg/pa.mjs +65 -0
- package/msg/pl.js +65 -0
- package/msg/pl.mjs +65 -0
- package/msg/pms.js +65 -0
- package/msg/pms.mjs +65 -0
- package/msg/ps.js +65 -0
- package/msg/ps.mjs +65 -0
- package/msg/pt-br.js +65 -0
- package/msg/pt-br.mjs +65 -0
- package/msg/pt.js +65 -0
- package/msg/pt.mjs +65 -0
- package/msg/ro.js +65 -0
- package/msg/ro.mjs +65 -0
- package/msg/ru.js +65 -0
- package/msg/ru.mjs +65 -0
- package/msg/sc.js +65 -0
- package/msg/sc.mjs +65 -0
- package/msg/sco.js +65 -0
- package/msg/sco.mjs +65 -0
- package/msg/sd.js +65 -0
- package/msg/sd.mjs +65 -0
- package/msg/shn.js +65 -0
- package/msg/shn.mjs +65 -0
- package/msg/si.js +65 -0
- package/msg/si.mjs +65 -0
- package/msg/sk.js +65 -0
- package/msg/sk.mjs +65 -0
- package/msg/skr-arab.js +65 -0
- package/msg/skr-arab.mjs +65 -0
- package/msg/sl.js +65 -0
- package/msg/sl.mjs +65 -0
- package/msg/smn.js +65 -0
- package/msg/smn.mjs +65 -0
- package/msg/sq.js +65 -0
- package/msg/sq.mjs +65 -0
- package/msg/sr-latn.js +65 -0
- package/msg/sr-latn.mjs +65 -0
- package/msg/sr.js +65 -0
- package/msg/sr.mjs +65 -0
- package/msg/sv.js +65 -0
- package/msg/sv.mjs +65 -0
- package/msg/sw.js +65 -0
- package/msg/sw.mjs +65 -0
- package/msg/ta.js +65 -0
- package/msg/ta.mjs +65 -0
- package/msg/tcy.js +65 -0
- package/msg/tcy.mjs +65 -0
- package/msg/tdd.js +65 -0
- package/msg/tdd.mjs +65 -0
- package/msg/te.js +65 -0
- package/msg/te.mjs +65 -0
- package/msg/th.js +65 -0
- package/msg/th.mjs +65 -0
- package/msg/ti.js +65 -0
- package/msg/ti.mjs +65 -0
- package/msg/tl.js +65 -0
- package/msg/tl.mjs +65 -0
- package/msg/tlh.js +65 -0
- package/msg/tlh.mjs +65 -0
- package/msg/tr.js +65 -0
- package/msg/tr.mjs +65 -0
- package/msg/ug-arab.js +65 -0
- package/msg/ug-arab.mjs +65 -0
- package/msg/uk.js +65 -0
- package/msg/uk.mjs +65 -0
- package/msg/ur.js +65 -0
- package/msg/ur.mjs +65 -0
- package/msg/uz.js +65 -0
- package/msg/uz.mjs +65 -0
- package/msg/vi.js +65 -0
- package/msg/vi.mjs +65 -0
- package/msg/xmf.js +65 -0
- package/msg/xmf.mjs +65 -0
- package/msg/yo.js +65 -0
- package/msg/yo.mjs +65 -0
- package/msg/zgh.js +65 -0
- package/msg/zgh.mjs +65 -0
- package/msg/zh-hans.js +65 -0
- package/msg/zh-hans.mjs +65 -0
- package/msg/zh-hant.js +65 -0
- package/msg/zh-hant.mjs +65 -0
- package/package.json +11 -11
- package/php_compressed.js +2 -2
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +2 -2
- 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
|
@@ -84,5 +84,13 @@ export interface IPathObject {
|
|
|
84
84
|
* @param blockStyle The block style to use.
|
|
85
85
|
*/
|
|
86
86
|
setStyle?(blockStyle: BlockStyle): void;
|
|
87
|
+
/**
|
|
88
|
+
* Add or remove styling indicating that a block will be bumped out and
|
|
89
|
+
* replaced by another block that is mid-move.
|
|
90
|
+
*
|
|
91
|
+
* @param replacing True if the block is at risk of being replaced, false
|
|
92
|
+
* otherwise.
|
|
93
|
+
*/
|
|
94
|
+
updateReplacing?(replacing: boolean): void;
|
|
87
95
|
}
|
|
88
96
|
//# sourceMappingURL=i_path_object.d.ts.map
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import type { Connection } from '../../connection.js';
|
|
8
7
|
import { RenderedConnection } from '../../rendered_connection.js';
|
|
9
8
|
import type { BlockStyle } from '../../theme.js';
|
|
10
9
|
import { Coordinate } from '../../utils/coordinate.js';
|
|
@@ -105,21 +104,13 @@ export declare class PathObject implements IPathObject {
|
|
|
105
104
|
*/
|
|
106
105
|
updateMovable(enable: boolean): void;
|
|
107
106
|
/**
|
|
108
|
-
* Add or remove styling that
|
|
109
|
-
*
|
|
110
|
-
* Otherwise it will bump.
|
|
107
|
+
* Add or remove styling indicating that a block will be bumped out and
|
|
108
|
+
* replaced by another block that is mid-move.
|
|
111
109
|
*
|
|
112
|
-
* @param
|
|
113
|
-
|
|
114
|
-
updateReplacementFade(enable: boolean): void;
|
|
115
|
-
/**
|
|
116
|
-
* Add or remove styling that shows that if the dragging block is dropped,
|
|
117
|
-
* this block will be connected to the input.
|
|
118
|
-
*
|
|
119
|
-
* @param _conn The connection on the input to highlight.
|
|
120
|
-
* @param _enable True if styling should be added.
|
|
110
|
+
* @param replacing True if the block is at risk of being replaced, false
|
|
111
|
+
* otherwise.
|
|
121
112
|
*/
|
|
122
|
-
|
|
113
|
+
updateReplacing(replacing: boolean): void;
|
|
123
114
|
/** Adds the given path as a connection highlight for the given connection. */
|
|
124
115
|
addConnectionHighlight(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean): SVGElement;
|
|
125
116
|
/**
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import { Connection } from '../../connection.js';
|
|
8
7
|
import type { IRegistrable } from '../../interfaces/i_registrable.js';
|
|
8
|
+
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
9
9
|
import type { BlockStyle, Theme } from '../../theme.js';
|
|
10
10
|
import { ConstantProvider } from './constants.js';
|
|
11
11
|
import { Drawer } from './drawer.js';
|
|
@@ -113,10 +113,10 @@ export declare class Renderer implements IRegistrable {
|
|
|
113
113
|
/**
|
|
114
114
|
* Determine whether or not to highlight a connection.
|
|
115
115
|
*
|
|
116
|
-
* @param
|
|
116
|
+
* @param connection The connection to determine whether or not to highlight.
|
|
117
117
|
* @returns True if we should highlight the connection.
|
|
118
118
|
*/
|
|
119
|
-
shouldHighlightConnection(
|
|
119
|
+
shouldHighlightConnection(connection: RenderedConnection): boolean;
|
|
120
120
|
/**
|
|
121
121
|
* Checks if an orphaned block can connect to the "end" of the topBlock's
|
|
122
122
|
* block-clump. If the clump is a row the end is the last input. If the clump
|
|
@@ -65,10 +65,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
65
65
|
SELECTED_GLOW_COLOUR: string;
|
|
66
66
|
/** The size of the selected glow. */
|
|
67
67
|
SELECTED_GLOW_SIZE: number;
|
|
68
|
-
/** The replacement glow colour. */
|
|
69
|
-
REPLACEMENT_GLOW_COLOUR: string;
|
|
70
|
-
/** The size of the selected glow. */
|
|
71
|
-
REPLACEMENT_GLOW_SIZE: number;
|
|
72
68
|
/**
|
|
73
69
|
* The ID of the selected glow filter, or the empty string if no filter is
|
|
74
70
|
* set.
|
|
@@ -78,15 +74,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
78
74
|
* The <filter> element to use for a selected glow, or null if not set.
|
|
79
75
|
*/
|
|
80
76
|
private selectedGlowFilter;
|
|
81
|
-
/**
|
|
82
|
-
* The ID of the replacement glow filter, or the empty string if no filter
|
|
83
|
-
* is set.
|
|
84
|
-
*/
|
|
85
|
-
replacementGlowFilterId: string;
|
|
86
|
-
/**
|
|
87
|
-
* The <filter> element to use for a replacement glow, or null if not set.
|
|
88
|
-
*/
|
|
89
|
-
private replacementGlowFilter;
|
|
90
77
|
/**
|
|
91
78
|
* The object containing information about the hexagon used for a boolean
|
|
92
79
|
* reporter block. Null before init is called.
|
|
@@ -159,7 +146,7 @@ export declare class ConstantProvider extends BaseConstantProvider {
|
|
|
159
146
|
};
|
|
160
147
|
generateSecondaryColour_(colour: string): string;
|
|
161
148
|
generateTertiaryColour_(colour: string): string;
|
|
162
|
-
createDom(svg: SVGElement,
|
|
149
|
+
createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
|
|
163
150
|
getCSS_(selector: string): string[];
|
|
164
151
|
}
|
|
165
152
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -21,6 +21,6 @@ export declare class BottomRow extends BaseBottomRow {
|
|
|
21
21
|
/** Render a round corner unless the block has an output connection. */
|
|
22
22
|
hasLeftSquareCorner(block: BlockSvg): boolean;
|
|
23
23
|
/** Render a round corner unless the block has an output connection. */
|
|
24
|
-
hasRightSquareCorner(block: BlockSvg):
|
|
24
|
+
hasRightSquareCorner(block: BlockSvg): boolean;
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=bottom_row.d.ts.map
|
|
@@ -23,6 +23,6 @@ export declare class TopRow extends BaseTopRow {
|
|
|
23
23
|
/** Render a round corner unless the block has an output connection. */
|
|
24
24
|
hasLeftSquareCorner(block: BlockSvg): boolean;
|
|
25
25
|
/** Render a round corner unless the block has an output connection. */
|
|
26
|
-
hasRightSquareCorner(block: BlockSvg):
|
|
26
|
+
hasRightSquareCorner(block: BlockSvg): boolean;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=top_row.d.ts.map
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import type { Connection } from '../../connection.js';
|
|
8
7
|
import type { BlockStyle } from '../../theme.js';
|
|
9
8
|
import { PathObject as BasePathObject } from '../common/path_object.js';
|
|
10
9
|
import type { ConstantProvider } from './constants.js';
|
|
@@ -40,8 +39,6 @@ export declare class PathObject extends BasePathObject {
|
|
|
40
39
|
applyColour(block: BlockSvg): void;
|
|
41
40
|
flipRTL(): void;
|
|
42
41
|
updateSelected(enable: boolean): void;
|
|
43
|
-
updateReplacementFade(enable: boolean): void;
|
|
44
|
-
updateShapeForInputHighlight(conn: Connection, enable: boolean): void;
|
|
45
42
|
/**
|
|
46
43
|
* Method that's called when the drawer is about to draw the block.
|
|
47
44
|
*/
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
+
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
7
8
|
import type { BlockStyle } from '../../theme.js';
|
|
8
9
|
import type { RenderInfo as BaseRenderInfo } from '../common/info.js';
|
|
9
10
|
import { Renderer as BaseRenderer } from '../common/renderer.js';
|
|
@@ -60,5 +61,12 @@ export declare class Renderer extends BaseRenderer {
|
|
|
60
61
|
* @returns The constant provider.
|
|
61
62
|
*/
|
|
62
63
|
getConstants(): ConstantProvider;
|
|
64
|
+
/**
|
|
65
|
+
* Determine whether or not to highlight a connection.
|
|
66
|
+
*
|
|
67
|
+
* @param connection The connection to determine whether or not to highlight.
|
|
68
|
+
* @returns True if we should highlight the connection.
|
|
69
|
+
*/
|
|
70
|
+
shouldHighlightConnection(connection: RenderedConnection): boolean;
|
|
63
71
|
}
|
|
64
72
|
//# sourceMappingURL=renderer.d.ts.map
|
package/core/shortcut_items.d.ts
CHANGED
|
@@ -14,7 +14,28 @@ export declare enum names {
|
|
|
14
14
|
PASTE = "paste",
|
|
15
15
|
UNDO = "undo",
|
|
16
16
|
REDO = "redo",
|
|
17
|
-
MENU = "menu"
|
|
17
|
+
MENU = "menu",
|
|
18
|
+
FOCUS_WORKSPACE = "focus_workspace",
|
|
19
|
+
FOCUS_TOOLBOX = "focus_toolbox",
|
|
20
|
+
START_MOVE = "start_move",
|
|
21
|
+
START_MOVE_STACK = "start_move_stack",
|
|
22
|
+
FINISH_MOVE = "finish_move",
|
|
23
|
+
ABORT_MOVE = "abort_move",
|
|
24
|
+
MOVE_UP = "move_up",
|
|
25
|
+
MOVE_DOWN = "move_down",
|
|
26
|
+
MOVE_LEFT = "move_left",
|
|
27
|
+
MOVE_RIGHT = "move_right",
|
|
28
|
+
NAVIGATE_RIGHT = "right",
|
|
29
|
+
NAVIGATE_LEFT = "left",
|
|
30
|
+
NAVIGATE_UP = "up",
|
|
31
|
+
NAVIGATE_DOWN = "down",
|
|
32
|
+
DISCONNECT = "disconnect",
|
|
33
|
+
NEXT_STACK = "next_stack",
|
|
34
|
+
PREVIOUS_STACK = "previous_stack",
|
|
35
|
+
INFORMATION = "information",
|
|
36
|
+
PERFORM_ACTION = "perform_action",
|
|
37
|
+
DUPLICATE = "duplicate",
|
|
38
|
+
CLEANUP = "cleanup"
|
|
18
39
|
}
|
|
19
40
|
/**
|
|
20
41
|
* Keyboard shortcut to hide chaff on escape.
|
|
@@ -45,10 +66,52 @@ export declare function registerUndo(): void;
|
|
|
45
66
|
* or alt+shift+z.
|
|
46
67
|
*/
|
|
47
68
|
export declare function registerRedo(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Registers keyboard shortcuts for keyboard-driven movement of workspace
|
|
71
|
+
* elements.
|
|
72
|
+
*/
|
|
73
|
+
export declare function registerMovementShortcuts(): void;
|
|
48
74
|
/**
|
|
49
75
|
* Keyboard shortcut to show the context menu on ctrl/cmd+Enter.
|
|
50
76
|
*/
|
|
51
77
|
export declare function registerShowContextMenu(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Registers keyboard shortcuts to navigate around the Blockly interface.
|
|
80
|
+
*/
|
|
81
|
+
export declare function registerArrowNavigation(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Registers keyboard shortcut to focus the workspace.
|
|
84
|
+
*/
|
|
85
|
+
export declare function registerFocusWorkspace(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Registers keyboard shortcut to focus the toolbox.
|
|
88
|
+
*/
|
|
89
|
+
export declare function registerFocusToolbox(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Registers keyboard shortcut to get count of block stacks and comments.
|
|
92
|
+
*/
|
|
93
|
+
export declare function registerWorkspaceOverview(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Registers keyboard shortcut to disconnect the focused block.
|
|
96
|
+
*/
|
|
97
|
+
export declare function registerDisconnectBlock(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Registers keyboard shortcuts to jump between stacks/top-level items on the
|
|
100
|
+
* workspace.
|
|
101
|
+
*/
|
|
102
|
+
export declare function registerStackNavigation(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Registers keyboard shortcut to perform an action on the focused element.
|
|
105
|
+
*/
|
|
106
|
+
export declare function registerPerformAction(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Registers keyboard shortcut to duplicate a block or workspace comment.
|
|
109
|
+
*/
|
|
110
|
+
export declare function registerDuplicate(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Registers keyboard shortcut to clean up the workspace.
|
|
113
|
+
*/
|
|
114
|
+
export declare function registerCleanup(): void;
|
|
52
115
|
/**
|
|
53
116
|
* Registers all default keyboard shortcut item. This should be called once per
|
|
54
117
|
* instance of KeyboardShortcutRegistry.
|
|
@@ -56,4 +119,13 @@ export declare function registerShowContextMenu(): void;
|
|
|
56
119
|
* @internal
|
|
57
120
|
*/
|
|
58
121
|
export declare function registerDefaultShortcuts(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Registers an extended set of keyboard shortcuts used to support deep keyboard
|
|
124
|
+
* navigation of Blockly.
|
|
125
|
+
*/
|
|
126
|
+
export declare function registerKeyboardNavigationShortcuts(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Registers keyboard shortcuts used to announce screen reader information.
|
|
129
|
+
*/
|
|
130
|
+
export declare function registerScreenReaderShortcuts(): void;
|
|
59
131
|
//# sourceMappingURL=shortcut_items.d.ts.map
|
|
@@ -223,6 +223,12 @@ export declare namespace ShortcutRegistry {
|
|
|
223
223
|
* name.
|
|
224
224
|
*/
|
|
225
225
|
allowCollision?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Display text for the shortcut. This is not used in core but may
|
|
228
|
+
* be used by plugins or applications to provide a user-facing
|
|
229
|
+
* label for the shortcut.
|
|
230
|
+
*/
|
|
231
|
+
displayText?: string | (() => string);
|
|
226
232
|
}
|
|
227
233
|
/** Supported modifiers. */
|
|
228
234
|
enum modifierKeys {
|
package/core/theme.d.ts
CHANGED
|
@@ -135,8 +135,6 @@ export declare namespace Theme {
|
|
|
135
135
|
cursorColour?: string;
|
|
136
136
|
selectedGlowColour?: string;
|
|
137
137
|
selectedGlowOpacity?: number;
|
|
138
|
-
replacementGlowColour?: string;
|
|
139
|
-
replacementGlowOpacity?: number;
|
|
140
138
|
}
|
|
141
139
|
interface FontStyle {
|
|
142
140
|
family?: string;
|
package/core/toast.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import * as aria from './utils/aria.js';
|
|
6
7
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
7
8
|
/**
|
|
8
9
|
* Display/configuration options for a toast notification.
|
|
@@ -30,7 +31,7 @@ export interface ToastOptions {
|
|
|
30
31
|
* How prominently/interrupting the readout of the toast should be for
|
|
31
32
|
* screenreaders. Corresponds to aria-live and defaults to polite.
|
|
32
33
|
*/
|
|
33
|
-
assertiveness?:
|
|
34
|
+
assertiveness?: aria.LiveRegionAssertiveness;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* Class that allows for showing and dismissing temporary notifications.
|
|
@@ -61,14 +62,4 @@ export declare class Toast {
|
|
|
61
62
|
*/
|
|
62
63
|
static hide(workspace: WorkspaceSvg, id?: string): void;
|
|
63
64
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Options for how aggressively toasts should be read out by screenreaders.
|
|
66
|
-
* Values correspond to those for aria-live.
|
|
67
|
-
*/
|
|
68
|
-
export declare namespace Toast {
|
|
69
|
-
enum Assertiveness {
|
|
70
|
-
ASSERTIVE = "assertive",
|
|
71
|
-
POLITE = "polite"
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
65
|
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -229,6 +229,11 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
229
229
|
getName(): string;
|
|
230
230
|
getParent(): ICollapsibleToolboxItem | null;
|
|
231
231
|
getDiv(): HTMLDivElement | null;
|
|
232
|
+
/**
|
|
233
|
+
* Handles this toolbox category gaining focus by informing its parent
|
|
234
|
+
* toolbox that it has been selected.
|
|
235
|
+
*/
|
|
236
|
+
onNodeFocus(): void;
|
|
232
237
|
/**
|
|
233
238
|
* Gets the contents of the category. These are items that are meant to be
|
|
234
239
|
* displayed in the flyout.
|
|
@@ -30,6 +30,10 @@ export declare class ToolboxSeparator extends ToolboxItem {
|
|
|
30
30
|
protected createDom_(): HTMLDivElement;
|
|
31
31
|
getDiv(): HTMLDivElement;
|
|
32
32
|
dispose(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Prevents separator toolbox items from gaining focus.
|
|
35
|
+
*/
|
|
36
|
+
canBeFocused(): boolean;
|
|
33
37
|
}
|
|
34
38
|
export declare namespace ToolboxSeparator {
|
|
35
39
|
interface CssConfig {
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Toolbox from whence to create blocks.
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
6
11
|
import * as browserEvents from '../browser_events.js';
|
|
7
12
|
import { DeleteArea } from '../delete_area.js';
|
|
8
13
|
import '../events/events_toolbox_item_select.js';
|
|
@@ -16,6 +21,7 @@ import type { ISelectableToolboxItem } from '../interfaces/i_selectable_toolbox_
|
|
|
16
21
|
import type { IStyleable } from '../interfaces/i_styleable.js';
|
|
17
22
|
import type { IToolbox } from '../interfaces/i_toolbox.js';
|
|
18
23
|
import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
|
|
24
|
+
import { ToolboxNavigator } from '../keyboard_nav/navigators/toolbox_navigator.js';
|
|
19
25
|
import type { KeyboardShortcut } from '../shortcut_registry.js';
|
|
20
26
|
import { Rect } from '../utils/rect.js';
|
|
21
27
|
import * as toolbox from '../utils/toolbox.js';
|
|
@@ -62,6 +68,8 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
62
68
|
protected readonly workspace_: WorkspaceSvg;
|
|
63
69
|
/** Whether the mouse is currently being clicked. */
|
|
64
70
|
private mouseDown;
|
|
71
|
+
/** Object used by keyboard navigation to move focus in this toolbox. */
|
|
72
|
+
private navigator;
|
|
65
73
|
/** @param workspace The workspace in which to create new blocks. */
|
|
66
74
|
constructor(workspace: WorkspaceSvg);
|
|
67
75
|
/**
|
|
@@ -176,17 +184,6 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
176
184
|
* ignored.
|
|
177
185
|
*/
|
|
178
186
|
getClientRect(): Rect | null;
|
|
179
|
-
/**
|
|
180
|
-
* Returns whether the provided block or bubble would be deleted if dropped on
|
|
181
|
-
* this area.
|
|
182
|
-
* This method should check if the element is deletable and is always called
|
|
183
|
-
* before onDragEnter/onDragOver/onDragExit.
|
|
184
|
-
*
|
|
185
|
-
* @param element The block or bubble currently being dragged.
|
|
186
|
-
* @returns Whether the element provided would be deleted if dropped on this
|
|
187
|
-
* area.
|
|
188
|
-
*/
|
|
189
|
-
wouldDelete(element: IDraggable): boolean;
|
|
190
187
|
/**
|
|
191
188
|
* Handles when a cursor with a block or bubble enters this drag target.
|
|
192
189
|
*
|
|
@@ -367,30 +364,12 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
367
364
|
*/
|
|
368
365
|
private fireSelectEvent;
|
|
369
366
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* @returns True if a parent category was selected, false otherwise.
|
|
373
|
-
*/
|
|
374
|
-
private selectParent;
|
|
375
|
-
/**
|
|
376
|
-
* Selects the first child of the currently selected item, or nothing if the
|
|
377
|
-
* toolbox item has no children.
|
|
367
|
+
* Sets the currently selected item's expansion state, if possible.
|
|
378
368
|
*
|
|
379
|
-
* @
|
|
369
|
+
* @param expanded True to expand the item or false to collapse it.
|
|
370
|
+
* @returns True if the selected item's expansion state was updated.
|
|
380
371
|
*/
|
|
381
|
-
private
|
|
382
|
-
/**
|
|
383
|
-
* Selects the next visible toolbox item.
|
|
384
|
-
*
|
|
385
|
-
* @returns True if a next category was selected, false otherwise.
|
|
386
|
-
*/
|
|
387
|
-
private selectNext;
|
|
388
|
-
/**
|
|
389
|
-
* Selects the previous visible toolbox item.
|
|
390
|
-
*
|
|
391
|
-
* @returns True if a previous category was selected, false otherwise.
|
|
392
|
-
*/
|
|
393
|
-
private selectPrevious;
|
|
372
|
+
private toggleSelectedItem;
|
|
394
373
|
/** Disposes of this toolbox. */
|
|
395
374
|
dispose(): void;
|
|
396
375
|
/** See IFocusableNode.getFocusableElement. */
|
|
@@ -415,5 +394,10 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
415
394
|
onTreeFocus(node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
416
395
|
/** See IFocusableTree.onTreeBlur. */
|
|
417
396
|
onTreeBlur(nextTree: IFocusableTree | null): void;
|
|
397
|
+
/**
|
|
398
|
+
* Returns the Navigator instance to use to move between items in this
|
|
399
|
+
* toolbox.
|
|
400
|
+
*/
|
|
401
|
+
getNavigator(): ToolboxNavigator;
|
|
418
402
|
}
|
|
419
403
|
//# sourceMappingURL=toolbox.d.ts.map
|
|
@@ -105,5 +105,9 @@ export declare class ToolboxItem implements IToolboxItem {
|
|
|
105
105
|
onNodeBlur(): void;
|
|
106
106
|
/** See IFocusableNode.canBeFocused. */
|
|
107
107
|
canBeFocused(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Returns the toolbox this toolbox item belongs to.
|
|
110
|
+
*/
|
|
111
|
+
getParentToolbox(): IToolbox;
|
|
108
112
|
}
|
|
109
113
|
//# sourceMappingURL=toolbox_item.d.ts.map
|