blockly 12.5.0 → 13.0.0-beta.0
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 +653 -541
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +618 -515
- 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_svg.d.ts +39 -16
- package/core/blockly.d.ts +21 -16
- package/core/bubbles/bubble.d.ts +17 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +5 -0
- 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 +84 -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 -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/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 +7 -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 +6 -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 +138 -0
- package/core/keyboard_nav/move_indicator.d.ts +35 -0
- package/core/keyboard_nav/{block_comment_navigation_policy.d.ts → navigation_policies/block_comment_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{block_navigation_policy.d.ts → navigation_policies/block_navigation_policy.d.ts} +17 -25
- 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} +10 -3
- 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 +63 -1
- 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 +12 -22
- package/core/toolbox/toolbox_item.d.ts +4 -0
- package/core/utils/aria.d.ts +292 -23
- package/core/utils/shortcut_formatting.d.ts +24 -0
- package/core/utils/useragent.d.ts +1 -0
- 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 +8 -0
- package/msg/ab.mjs +8 -0
- package/msg/ace.js +8 -0
- package/msg/ace.mjs +8 -0
- package/msg/af.js +8 -0
- package/msg/af.mjs +8 -0
- package/msg/am.js +8 -0
- package/msg/am.mjs +8 -0
- package/msg/ar.js +8 -0
- package/msg/ar.mjs +8 -0
- package/msg/ast.js +8 -0
- package/msg/ast.mjs +8 -0
- package/msg/az.js +8 -0
- package/msg/az.mjs +8 -0
- package/msg/ba.js +8 -0
- package/msg/ba.mjs +8 -0
- package/msg/bcc.js +8 -0
- package/msg/bcc.mjs +8 -0
- package/msg/be-tarask.js +8 -0
- package/msg/be-tarask.mjs +8 -0
- package/msg/be.js +8 -0
- package/msg/be.mjs +8 -0
- package/msg/bg.js +8 -0
- package/msg/bg.mjs +8 -0
- package/msg/bn.js +8 -0
- package/msg/bn.mjs +8 -0
- package/msg/br.js +8 -0
- package/msg/br.mjs +8 -0
- package/msg/bs.js +8 -0
- package/msg/bs.mjs +8 -0
- package/msg/ca.js +8 -0
- package/msg/ca.mjs +8 -0
- package/msg/cdo.js +8 -0
- package/msg/cdo.mjs +8 -0
- package/msg/ce.js +8 -0
- package/msg/ce.mjs +8 -0
- package/msg/cs.js +8 -0
- package/msg/cs.mjs +8 -0
- package/msg/da.js +8 -0
- package/msg/da.mjs +8 -0
- package/msg/de.js +8 -0
- package/msg/de.mjs +8 -0
- package/msg/diq.js +8 -0
- package/msg/diq.mjs +8 -0
- package/msg/dtp.js +8 -0
- package/msg/dtp.mjs +8 -0
- package/msg/dty.js +8 -0
- package/msg/dty.mjs +8 -0
- package/msg/ee.js +8 -0
- package/msg/ee.mjs +8 -0
- package/msg/el.js +8 -0
- package/msg/el.mjs +8 -0
- package/msg/en-gb.js +8 -0
- package/msg/en-gb.mjs +8 -0
- package/msg/en.js +8 -0
- package/msg/en.mjs +8 -0
- package/msg/eo.js +8 -0
- package/msg/eo.mjs +8 -0
- package/msg/es.js +8 -0
- package/msg/es.mjs +8 -0
- package/msg/et.js +8 -0
- package/msg/et.mjs +8 -0
- package/msg/eu.js +8 -0
- package/msg/eu.mjs +8 -0
- package/msg/fa.js +8 -0
- package/msg/fa.mjs +8 -0
- package/msg/fi.js +8 -0
- package/msg/fi.mjs +8 -0
- package/msg/fo.js +8 -0
- package/msg/fo.mjs +8 -0
- package/msg/fr.js +8 -0
- package/msg/fr.mjs +8 -0
- package/msg/frr.js +8 -0
- package/msg/frr.mjs +8 -0
- package/msg/gl.js +8 -0
- package/msg/gl.mjs +8 -0
- package/msg/gn.js +8 -0
- package/msg/gn.mjs +8 -0
- package/msg/gor.js +8 -0
- package/msg/gor.mjs +8 -0
- package/msg/ha.js +8 -0
- package/msg/ha.mjs +8 -0
- package/msg/hak.js +8 -0
- package/msg/hak.mjs +8 -0
- package/msg/he.js +8 -0
- package/msg/he.mjs +8 -0
- package/msg/hi.js +8 -0
- package/msg/hi.mjs +8 -0
- package/msg/hr.js +8 -0
- package/msg/hr.mjs +8 -0
- package/msg/hrx.js +8 -0
- package/msg/hrx.mjs +8 -0
- package/msg/hsb.js +8 -0
- package/msg/hsb.mjs +8 -0
- package/msg/hu.js +8 -0
- package/msg/hu.mjs +8 -0
- package/msg/hy.js +8 -0
- package/msg/hy.mjs +8 -0
- package/msg/ia.js +8 -0
- package/msg/ia.mjs +8 -0
- package/msg/id.js +8 -0
- package/msg/id.mjs +8 -0
- package/msg/ig.js +8 -0
- package/msg/ig.mjs +8 -0
- package/msg/inh.js +8 -0
- package/msg/inh.mjs +8 -0
- package/msg/is.js +8 -0
- package/msg/is.mjs +8 -0
- package/msg/it.js +8 -0
- package/msg/it.mjs +8 -0
- package/msg/ja.js +8 -0
- package/msg/ja.mjs +8 -0
- package/msg/ka.js +8 -0
- package/msg/ka.mjs +8 -0
- package/msg/kab.js +8 -0
- package/msg/kab.mjs +8 -0
- package/msg/kbd-cyrl.js +8 -0
- package/msg/kbd-cyrl.mjs +8 -0
- package/msg/km.js +8 -0
- package/msg/km.mjs +8 -0
- package/msg/kn.js +8 -0
- package/msg/kn.mjs +8 -0
- package/msg/ko.js +8 -0
- package/msg/ko.mjs +8 -0
- package/msg/ksh.js +8 -0
- package/msg/ksh.mjs +8 -0
- package/msg/ku-latn.js +8 -0
- package/msg/ku-latn.mjs +8 -0
- package/msg/ky.js +8 -0
- package/msg/ky.mjs +8 -0
- package/msg/la.js +8 -0
- package/msg/la.mjs +8 -0
- package/msg/lb.js +8 -0
- package/msg/lb.mjs +8 -0
- package/msg/lki.js +8 -0
- package/msg/lki.mjs +8 -0
- package/msg/lo.js +8 -0
- package/msg/lo.mjs +8 -0
- package/msg/lrc.js +8 -0
- package/msg/lrc.mjs +8 -0
- package/msg/lt.js +8 -0
- package/msg/lt.mjs +8 -0
- package/msg/lv.js +8 -0
- package/msg/lv.mjs +8 -0
- package/msg/mg.js +8 -0
- package/msg/mg.mjs +8 -0
- package/msg/mk.js +8 -0
- package/msg/mk.mjs +8 -0
- package/msg/ml.js +8 -0
- package/msg/ml.mjs +8 -0
- package/msg/mnw.js +8 -0
- package/msg/mnw.mjs +8 -0
- package/msg/ms.js +8 -0
- package/msg/ms.mjs +8 -0
- package/msg/my.js +8 -0
- package/msg/my.mjs +8 -0
- package/msg/mzn.js +8 -0
- package/msg/mzn.mjs +8 -0
- package/msg/nb.js +8 -0
- package/msg/nb.mjs +8 -0
- package/msg/ne.js +8 -0
- package/msg/ne.mjs +8 -0
- package/msg/nl.js +8 -0
- package/msg/nl.mjs +8 -0
- package/msg/oc.js +8 -0
- package/msg/oc.mjs +8 -0
- package/msg/olo.js +8 -0
- package/msg/olo.mjs +8 -0
- package/msg/pa.js +8 -0
- package/msg/pa.mjs +8 -0
- package/msg/pl.js +8 -0
- package/msg/pl.mjs +8 -0
- package/msg/pms.js +8 -0
- package/msg/pms.mjs +8 -0
- package/msg/ps.js +8 -0
- package/msg/ps.mjs +8 -0
- package/msg/pt-br.js +8 -0
- package/msg/pt-br.mjs +8 -0
- package/msg/pt.js +8 -0
- package/msg/pt.mjs +8 -0
- package/msg/ro.js +8 -0
- package/msg/ro.mjs +8 -0
- package/msg/ru.js +8 -0
- package/msg/ru.mjs +8 -0
- package/msg/sc.js +8 -0
- package/msg/sc.mjs +8 -0
- package/msg/sco.js +8 -0
- package/msg/sco.mjs +8 -0
- package/msg/sd.js +8 -0
- package/msg/sd.mjs +8 -0
- package/msg/shn.js +8 -0
- package/msg/shn.mjs +8 -0
- package/msg/si.js +8 -0
- package/msg/si.mjs +8 -0
- package/msg/sk.js +8 -0
- package/msg/sk.mjs +8 -0
- package/msg/skr-arab.js +8 -0
- package/msg/skr-arab.mjs +8 -0
- package/msg/sl.js +8 -0
- package/msg/sl.mjs +8 -0
- package/msg/smn.js +8 -0
- package/msg/smn.mjs +8 -0
- package/msg/sq.js +8 -0
- package/msg/sq.mjs +8 -0
- package/msg/sr-latn.js +8 -0
- package/msg/sr-latn.mjs +8 -0
- package/msg/sr.js +8 -0
- package/msg/sr.mjs +8 -0
- package/msg/sv.js +8 -0
- package/msg/sv.mjs +8 -0
- package/msg/sw.js +8 -0
- package/msg/sw.mjs +8 -0
- package/msg/ta.js +8 -0
- package/msg/ta.mjs +8 -0
- package/msg/tcy.js +8 -0
- package/msg/tcy.mjs +8 -0
- package/msg/tdd.js +8 -0
- package/msg/tdd.mjs +8 -0
- package/msg/te.js +8 -0
- package/msg/te.mjs +8 -0
- package/msg/th.js +8 -0
- package/msg/th.mjs +8 -0
- package/msg/ti.js +8 -0
- package/msg/ti.mjs +8 -0
- package/msg/tl.js +8 -0
- package/msg/tl.mjs +8 -0
- package/msg/tlh.js +8 -0
- package/msg/tlh.mjs +8 -0
- package/msg/tr.js +8 -0
- package/msg/tr.mjs +8 -0
- package/msg/ug-arab.js +8 -0
- package/msg/ug-arab.mjs +8 -0
- package/msg/uk.js +8 -0
- package/msg/uk.mjs +8 -0
- package/msg/ur.js +8 -0
- package/msg/ur.mjs +8 -0
- package/msg/uz.js +8 -0
- package/msg/uz.mjs +8 -0
- package/msg/vi.js +8 -0
- package/msg/vi.mjs +8 -0
- package/msg/xmf.js +8 -0
- package/msg/xmf.mjs +8 -0
- package/msg/yo.js +8 -0
- package/msg/yo.mjs +8 -0
- package/msg/zgh.js +8 -0
- package/msg/zgh.mjs +8 -0
- package/msg/zh-hans.js +8 -0
- package/msg/zh-hans.mjs +8 -0
- package/msg/zh-hant.js +8 -0
- package/msg/zh-hant.mjs +8 -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/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/core/registry.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type { ISerializer } from './interfaces/i_serializer.js';
|
|
|
19
19
|
import type { IToolbox } from './interfaces/i_toolbox.js';
|
|
20
20
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
21
21
|
import type { IVariableModel, IVariableModelStatic, IVariableState } from './interfaces/i_variable_model.js';
|
|
22
|
-
import type { LineCursor } from './keyboard_nav/line_cursor.js';
|
|
23
22
|
import type { Options } from './options.js';
|
|
24
23
|
import type { Renderer } from './renderers/common/renderer.js';
|
|
25
24
|
import type { Theme } from './theme.js';
|
|
@@ -50,7 +49,6 @@ export declare class Type<_T> {
|
|
|
50
49
|
toString(): string;
|
|
51
50
|
static CONNECTION_CHECKER: Type<IConnectionChecker>;
|
|
52
51
|
static CONNECTION_PREVIEWER: Type<IConnectionPreviewer>;
|
|
53
|
-
static CURSOR: Type<LineCursor>;
|
|
54
52
|
static EVENT: Type<Abstract>;
|
|
55
53
|
static FIELD: Type<Field<any>>;
|
|
56
54
|
static INPUT: Type<Input>;
|
|
@@ -244,8 +244,6 @@ export declare class ConstantProvider {
|
|
|
244
244
|
* The <filter> element to use for a debug highlight, or null if not set.
|
|
245
245
|
*/
|
|
246
246
|
private debugFilter;
|
|
247
|
-
/** The <style> element to use for injecting renderer specific CSS. */
|
|
248
|
-
private cssNode;
|
|
249
247
|
/**
|
|
250
248
|
* Cursor colour.
|
|
251
249
|
*/
|
|
@@ -422,7 +420,6 @@ export declare class ConstantProvider {
|
|
|
422
420
|
* Create any DOM elements that this renderer needs (filters, patterns, etc).
|
|
423
421
|
*
|
|
424
422
|
* @param svg The root of the workspace's SVG.
|
|
425
|
-
* @param tagName The name to use for the CSS style tag.
|
|
426
423
|
* @param selector The CSS selector to use.
|
|
427
424
|
* @param injectionDivIfIsParent The div containing the parent workspace and
|
|
428
425
|
* all related workspaces and block containers, if this renderer is for the
|
|
@@ -430,7 +427,7 @@ export declare class ConstantProvider {
|
|
|
430
427
|
* to this container. Child workspaces should not override the CSS variables
|
|
431
428
|
* created by the parent and thus do not need access to the injection div.
|
|
432
429
|
*/
|
|
433
|
-
createDom(svg: SVGElement,
|
|
430
|
+
createDom(svg: SVGElement, selector: string, injectionDivIfIsParent?: HTMLElement): void;
|
|
434
431
|
/**
|
|
435
432
|
* Create a filter for highlighting the currently rendering block during
|
|
436
433
|
* render debugging.
|
|
@@ -439,10 +436,10 @@ export declare class ConstantProvider {
|
|
|
439
436
|
/**
|
|
440
437
|
* Inject renderer specific CSS into the page.
|
|
441
438
|
*
|
|
442
|
-
* @param
|
|
443
|
-
* @param selector The CSS selector to
|
|
439
|
+
* @param root The document root to inject the CSS into.
|
|
440
|
+
* @param selector The CSS selector to interpolate into the stylesheet.
|
|
444
441
|
*/
|
|
445
|
-
protected injectCSS_(
|
|
442
|
+
protected injectCSS_(root: Document | ShadowRoot, selector: string): void;
|
|
446
443
|
/**
|
|
447
444
|
* Get any renderer specific CSS to inject when the renderer is initialized.
|
|
448
445
|
*
|
|
@@ -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,26 @@ 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"
|
|
18
37
|
}
|
|
19
38
|
/**
|
|
20
39
|
* Keyboard shortcut to hide chaff on escape.
|
|
@@ -45,10 +64,44 @@ export declare function registerUndo(): void;
|
|
|
45
64
|
* or alt+shift+z.
|
|
46
65
|
*/
|
|
47
66
|
export declare function registerRedo(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Registers keyboard shortcuts for keyboard-driven movement of workspace
|
|
69
|
+
* elements.
|
|
70
|
+
*/
|
|
71
|
+
export declare function registerMovementShortcuts(): void;
|
|
48
72
|
/**
|
|
49
73
|
* Keyboard shortcut to show the context menu on ctrl/cmd+Enter.
|
|
50
74
|
*/
|
|
51
75
|
export declare function registerShowContextMenu(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Registers keyboard shortcuts to navigate around the Blockly interface.
|
|
78
|
+
*/
|
|
79
|
+
export declare function registerArrowNavigation(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Registers keyboard shortcut to focus the workspace.
|
|
82
|
+
*/
|
|
83
|
+
export declare function registerFocusWorkspace(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Registers keyboard shortcut to focus the toolbox.
|
|
86
|
+
*/
|
|
87
|
+
export declare function registerFocusToolbox(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Registers keyboard shortcut to get count of block stacks and comments.
|
|
90
|
+
*/
|
|
91
|
+
export declare function registerWorkspaceOverview(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Registers keyboard shortcut to disconnect the focused block.
|
|
94
|
+
*/
|
|
95
|
+
export declare function registerDisconnectBlock(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Registers keyboard shortcuts to jump between stacks/top-level items on the
|
|
98
|
+
* workspace.
|
|
99
|
+
*/
|
|
100
|
+
export declare function registerStackNavigation(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Registers keyboard shortcut to perform an action on the focused element.
|
|
103
|
+
*/
|
|
104
|
+
export declare function registerPerformAction(): void;
|
|
52
105
|
/**
|
|
53
106
|
* Registers all default keyboard shortcut item. This should be called once per
|
|
54
107
|
* instance of KeyboardShortcutRegistry.
|
|
@@ -56,4 +109,13 @@ export declare function registerShowContextMenu(): void;
|
|
|
56
109
|
* @internal
|
|
57
110
|
*/
|
|
58
111
|
export declare function registerDefaultShortcuts(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Registers an extended set of keyboard shortcuts used to support deep keyboard
|
|
114
|
+
* navigation of Blockly.
|
|
115
|
+
*/
|
|
116
|
+
export declare function registerKeyboardNavigationShortcuts(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Registers keyboard shortcuts used to announce screen reader information.
|
|
119
|
+
*/
|
|
120
|
+
export declare function registerScreenReaderShortcuts(): void;
|
|
59
121
|
//# sourceMappingURL=shortcut_items.d.ts.map
|
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 {
|
|
@@ -16,6 +16,7 @@ import type { ISelectableToolboxItem } from '../interfaces/i_selectable_toolbox_
|
|
|
16
16
|
import type { IStyleable } from '../interfaces/i_styleable.js';
|
|
17
17
|
import type { IToolbox } from '../interfaces/i_toolbox.js';
|
|
18
18
|
import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
|
|
19
|
+
import { ToolboxNavigator } from '../keyboard_nav/navigators/toolbox_navigator.js';
|
|
19
20
|
import type { KeyboardShortcut } from '../shortcut_registry.js';
|
|
20
21
|
import { Rect } from '../utils/rect.js';
|
|
21
22
|
import * as toolbox from '../utils/toolbox.js';
|
|
@@ -62,6 +63,8 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
62
63
|
protected readonly workspace_: WorkspaceSvg;
|
|
63
64
|
/** Whether the mouse is currently being clicked. */
|
|
64
65
|
private mouseDown;
|
|
66
|
+
/** Object used by keyboard navigation to move focus in this toolbox. */
|
|
67
|
+
private navigator;
|
|
65
68
|
/** @param workspace The workspace in which to create new blocks. */
|
|
66
69
|
constructor(workspace: WorkspaceSvg);
|
|
67
70
|
/**
|
|
@@ -367,30 +370,12 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
367
370
|
*/
|
|
368
371
|
private fireSelectEvent;
|
|
369
372
|
/**
|
|
370
|
-
*
|
|
373
|
+
* Sets the currently selected item's expansion state, if possible.
|
|
371
374
|
*
|
|
372
|
-
* @
|
|
375
|
+
* @param expanded True to expand the item or false to collapse it.
|
|
376
|
+
* @returns True if the selected item's expansion state was updated.
|
|
373
377
|
*/
|
|
374
|
-
private
|
|
375
|
-
/**
|
|
376
|
-
* Selects the first child of the currently selected item, or nothing if the
|
|
377
|
-
* toolbox item has no children.
|
|
378
|
-
*
|
|
379
|
-
* @returns True if a child category was selected, false otherwise.
|
|
380
|
-
*/
|
|
381
|
-
private selectChild;
|
|
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;
|
|
378
|
+
private toggleSelectedItem;
|
|
394
379
|
/** Disposes of this toolbox. */
|
|
395
380
|
dispose(): void;
|
|
396
381
|
/** See IFocusableNode.getFocusableElement. */
|
|
@@ -415,5 +400,10 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
415
400
|
onTreeFocus(node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
416
401
|
/** See IFocusableTree.onTreeBlur. */
|
|
417
402
|
onTreeBlur(nextTree: IFocusableTree | null): void;
|
|
403
|
+
/**
|
|
404
|
+
* Returns the Navigator instance to use to move between items in this
|
|
405
|
+
* toolbox.
|
|
406
|
+
*/
|
|
407
|
+
getNavigator(): ToolboxNavigator;
|
|
418
408
|
}
|
|
419
409
|
//# 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
|