blockly 13.0.0 → 13.1.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 +42 -16
- package/blockly.min.js +1078 -1031
- package/blockly_compressed.js +945 -918
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +85 -85
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +0 -8
- package/core/block_aria_composer.d.ts +13 -2
- package/core/block_svg.d.ts +13 -1
- package/core/blockly.d.ts +0 -4
- package/core/component_manager.d.ts +2 -0
- package/core/field.d.ts +8 -2
- package/core/field_checkbox.d.ts +0 -1
- package/core/field_dropdown.d.ts +1 -1
- package/core/field_input.d.ts +0 -6
- package/core/field_label.d.ts +1 -0
- package/core/field_textinput.d.ts +0 -1
- package/core/field_variable.d.ts +0 -1
- package/core/gesture.d.ts +0 -7
- package/core/inputs/input.d.ts +0 -1
- package/core/procedures.d.ts +0 -1
- package/core/rendered_connection.d.ts +6 -0
- package/core/shortcut_items.d.ts +42 -1
- package/core/toolbox/collapsible_category.d.ts +2 -0
- package/core/trashcan.d.ts +2 -8
- package/core/utils/aria.d.ts +2 -2
- package/core/variable_map.d.ts +0 -7
- package/core/variable_model.d.ts +0 -6
- package/core/workspace.d.ts +0 -1
- package/core/workspace_focus_target.d.ts +46 -0
- package/core/workspace_svg.d.ts +40 -9
- package/core/zoom_controls.d.ts +0 -46
- package/dart_compressed.js +23 -23
- package/javascript_compressed.js +26 -26
- package/lua_compressed.js +41 -41
- package/msg/ab.js +22 -2
- package/msg/ab.mjs +20 -0
- package/msg/ace.js +22 -2
- package/msg/ace.mjs +20 -0
- package/msg/af.js +22 -2
- package/msg/af.mjs +20 -0
- package/msg/am.js +22 -2
- package/msg/am.mjs +20 -0
- package/msg/ar.js +30 -10
- package/msg/ar.mjs +20 -0
- package/msg/ast.js +22 -2
- package/msg/ast.mjs +20 -0
- package/msg/az.js +22 -2
- package/msg/az.mjs +20 -0
- package/msg/ba.js +22 -2
- package/msg/ba.mjs +20 -0
- package/msg/bcc.js +22 -2
- package/msg/bcc.mjs +20 -0
- package/msg/be-tarask.js +22 -2
- package/msg/be-tarask.mjs +20 -0
- package/msg/be.js +22 -2
- package/msg/be.mjs +20 -0
- package/msg/bg.js +24 -4
- package/msg/bg.mjs +20 -0
- package/msg/bn.js +22 -2
- package/msg/bn.mjs +20 -0
- package/msg/br.js +22 -2
- package/msg/br.mjs +20 -0
- package/msg/bs.js +22 -2
- package/msg/bs.mjs +20 -0
- package/msg/ca.js +27 -7
- package/msg/ca.mjs +20 -0
- package/msg/ce.js +22 -2
- package/msg/ce.mjs +20 -0
- package/msg/cs.js +22 -2
- package/msg/cs.mjs +20 -0
- package/msg/csb.js +22 -2
- package/msg/csb.mjs +20 -0
- package/msg/da.js +22 -2
- package/msg/da.mjs +20 -0
- package/msg/de.js +22 -2
- package/msg/de.mjs +20 -0
- package/msg/diq.js +22 -2
- package/msg/diq.mjs +20 -0
- package/msg/dtp.js +22 -2
- package/msg/dtp.mjs +20 -0
- package/msg/dty.js +22 -2
- package/msg/dty.mjs +20 -0
- package/msg/ee.js +22 -2
- package/msg/ee.mjs +20 -0
- package/msg/el.js +22 -2
- package/msg/el.mjs +20 -0
- package/msg/en-gb.js +22 -2
- package/msg/en-gb.mjs +20 -0
- package/msg/en.js +22 -2
- package/msg/en.mjs +20 -0
- package/msg/eo.js +22 -2
- package/msg/eo.mjs +20 -0
- package/msg/es.js +22 -2
- package/msg/es.mjs +20 -0
- package/msg/et.js +22 -2
- package/msg/et.mjs +20 -0
- package/msg/eu.js +22 -2
- package/msg/eu.mjs +20 -0
- package/msg/fa.js +22 -2
- package/msg/fa.mjs +20 -0
- package/msg/fi.js +22 -2
- package/msg/fi.mjs +20 -0
- package/msg/fo.js +22 -2
- package/msg/fo.mjs +20 -0
- package/msg/fr.js +24 -4
- package/msg/fr.mjs +20 -0
- package/msg/frr.js +22 -2
- package/msg/frr.mjs +20 -0
- package/msg/ga.js +238 -218
- package/msg/ga.mjs +20 -0
- package/msg/gl.js +184 -164
- package/msg/gl.mjs +20 -0
- package/msg/gn.js +22 -2
- package/msg/gn.mjs +20 -0
- package/msg/gor.js +22 -2
- package/msg/gor.mjs +20 -0
- package/msg/ha.js +22 -2
- package/msg/ha.mjs +20 -0
- package/msg/he.js +24 -4
- package/msg/he.mjs +20 -0
- package/msg/hi.js +22 -2
- package/msg/hi.mjs +20 -0
- package/msg/hr.js +22 -2
- package/msg/hr.mjs +20 -0
- package/msg/hrx.js +22 -2
- package/msg/hrx.mjs +20 -0
- package/msg/hsb.js +22 -2
- package/msg/hsb.mjs +20 -0
- package/msg/hu.js +32 -12
- package/msg/hu.mjs +20 -0
- package/msg/hy.js +22 -2
- package/msg/hy.mjs +20 -0
- package/msg/ia.js +22 -2
- package/msg/ia.mjs +20 -0
- package/msg/id.js +22 -2
- package/msg/id.mjs +20 -0
- package/msg/ig.js +22 -2
- package/msg/ig.mjs +20 -0
- package/msg/inh.js +22 -2
- package/msg/inh.mjs +20 -0
- package/msg/is.js +22 -2
- package/msg/is.mjs +20 -0
- package/msg/it.js +22 -2
- package/msg/it.mjs +20 -0
- package/msg/ja.js +22 -2
- package/msg/ja.mjs +20 -0
- package/msg/ka.js +22 -2
- package/msg/ka.mjs +20 -0
- package/msg/kab.js +22 -2
- package/msg/kab.mjs +20 -0
- package/msg/kbd-cyrl.js +22 -2
- package/msg/kbd-cyrl.mjs +20 -0
- package/msg/km.js +22 -2
- package/msg/km.mjs +20 -0
- package/msg/kn.js +22 -2
- package/msg/kn.mjs +20 -0
- package/msg/ko.js +23 -3
- package/msg/ko.mjs +20 -0
- package/msg/krc.js +22 -2
- package/msg/krc.mjs +20 -0
- package/msg/ksh.js +22 -2
- package/msg/ksh.mjs +20 -0
- package/msg/ku-latn.js +22 -2
- package/msg/ku-latn.mjs +20 -0
- package/msg/ky.js +22 -2
- package/msg/ky.mjs +20 -0
- package/msg/la.js +22 -2
- package/msg/la.mjs +20 -0
- package/msg/lb.js +27 -7
- package/msg/lb.mjs +20 -0
- package/msg/lki.js +22 -2
- package/msg/lki.mjs +20 -0
- package/msg/lo.js +22 -2
- package/msg/lo.mjs +20 -0
- package/msg/lrc.js +22 -2
- package/msg/lrc.mjs +20 -0
- package/msg/lt.js +22 -2
- package/msg/lt.mjs +20 -0
- package/msg/lv.js +22 -2
- package/msg/lv.mjs +20 -0
- package/msg/mg.js +22 -2
- package/msg/mg.mjs +20 -0
- package/msg/mk.js +22 -2
- package/msg/mk.mjs +20 -0
- package/msg/ml.js +22 -2
- package/msg/ml.mjs +20 -0
- package/msg/mnw.js +22 -2
- package/msg/mnw.mjs +20 -0
- package/msg/ms.js +22 -2
- package/msg/ms.mjs +20 -0
- package/msg/mt.js +22 -2
- package/msg/mt.mjs +20 -0
- package/msg/my.js +22 -2
- package/msg/my.mjs +20 -0
- package/msg/mzn.js +22 -2
- package/msg/mzn.mjs +20 -0
- package/msg/nb.js +22 -2
- package/msg/nb.mjs +20 -0
- package/msg/ne.js +22 -2
- package/msg/ne.mjs +20 -0
- package/msg/nl.js +150 -130
- package/msg/nl.mjs +20 -0
- package/msg/oc.js +22 -2
- package/msg/oc.mjs +20 -0
- package/msg/olo.js +22 -2
- package/msg/olo.mjs +20 -0
- package/msg/pa.js +22 -2
- package/msg/pa.mjs +20 -0
- package/msg/pl.js +22 -2
- package/msg/pl.mjs +20 -0
- package/msg/pms.js +116 -96
- package/msg/pms.mjs +20 -0
- package/msg/ps.js +22 -2
- package/msg/ps.mjs +20 -0
- package/msg/pt-br.js +22 -2
- package/msg/pt-br.mjs +20 -0
- package/msg/pt.js +22 -2
- package/msg/pt.mjs +20 -0
- package/msg/ro.js +22 -2
- package/msg/ro.mjs +20 -0
- package/msg/ru.js +22 -2
- package/msg/ru.mjs +20 -0
- package/msg/sc.js +22 -2
- package/msg/sc.mjs +20 -0
- package/msg/sco.js +22 -2
- package/msg/sco.mjs +20 -0
- package/msg/sd.js +22 -2
- package/msg/sd.mjs +20 -0
- package/msg/shn.js +22 -2
- package/msg/shn.mjs +20 -0
- package/msg/si.js +22 -2
- package/msg/si.mjs +20 -0
- package/msg/sk.js +235 -215
- package/msg/sk.mjs +20 -0
- package/msg/skr-arab.js +22 -2
- package/msg/skr-arab.mjs +20 -0
- package/msg/sl.js +22 -2
- package/msg/sl.mjs +20 -0
- package/msg/smn.js +22 -2
- package/msg/smn.mjs +20 -0
- package/msg/sq.js +22 -2
- package/msg/sq.mjs +20 -0
- package/msg/sr-latn.js +22 -2
- package/msg/sr-latn.mjs +20 -0
- package/msg/sr.js +22 -2
- package/msg/sr.mjs +20 -0
- package/msg/sv.js +22 -2
- package/msg/sv.mjs +20 -0
- package/msg/sw.js +22 -2
- package/msg/sw.mjs +20 -0
- package/msg/ta.js +22 -2
- package/msg/ta.mjs +20 -0
- package/msg/tcy.js +22 -2
- package/msg/tcy.mjs +20 -0
- package/msg/tdd.js +22 -2
- package/msg/tdd.mjs +20 -0
- package/msg/te.js +22 -2
- package/msg/te.mjs +20 -0
- package/msg/th.js +22 -2
- package/msg/th.mjs +20 -0
- package/msg/ti.js +22 -2
- package/msg/ti.mjs +20 -0
- package/msg/tl.js +22 -2
- package/msg/tl.mjs +20 -0
- package/msg/tlh.js +22 -2
- package/msg/tlh.mjs +20 -0
- package/msg/tr.js +36 -16
- package/msg/tr.mjs +20 -0
- package/msg/ug-arab.js +22 -2
- package/msg/ug-arab.mjs +20 -0
- package/msg/uk.js +22 -2
- package/msg/uk.mjs +20 -0
- package/msg/ur.js +22 -2
- package/msg/ur.mjs +20 -0
- package/msg/uz.js +22 -2
- package/msg/uz.mjs +20 -0
- package/msg/vi.js +22 -2
- package/msg/vi.mjs +20 -0
- package/msg/xmf.js +22 -2
- package/msg/xmf.mjs +20 -0
- package/msg/yo.js +22 -2
- package/msg/yo.mjs +20 -0
- package/msg/zgh.js +22 -2
- package/msg/zgh.mjs +20 -0
- package/msg/zh-hans.js +62 -42
- package/msg/zh-hans.mjs +20 -0
- package/msg/zh-hant.js +22 -2
- package/msg/zh-hant.mjs +20 -0
- package/package.json +13 -13
- package/php_compressed.js +21 -21
- package/python_compressed.js +27 -27
package/core/block.d.ts
CHANGED
|
@@ -3,14 +3,6 @@
|
|
|
3
3
|
* Copyright 2011 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* The class representing one block.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_block_change.js';
|
|
12
|
-
import './events/events_block_create.js';
|
|
13
|
-
import './events/events_block_delete.js';
|
|
14
6
|
import { Connection } from './connection.js';
|
|
15
7
|
import { ConnectionType } from './connection_type.js';
|
|
16
8
|
import type { Abstract } from './events/events_abstract.js';
|
|
@@ -46,9 +46,10 @@ export declare enum ConnectionPreposition {
|
|
|
46
46
|
* @internal
|
|
47
47
|
* @param block The block for which an ARIA representation should be created.
|
|
48
48
|
* @param verbosity How much detail to include in the description.
|
|
49
|
+
* @param fullBlockFieldLabel An optional override for input labels for full-block fields
|
|
49
50
|
* @returns The ARIA representation for the specified block.
|
|
50
51
|
*/
|
|
51
|
-
export declare function computeAriaLabel(block: BlockSvg, verbosity?: Verbosity): string;
|
|
52
|
+
export declare function computeAriaLabel(block: BlockSvg, verbosity?: Verbosity, fullBlockFieldLabel?: string | undefined): string;
|
|
52
53
|
/**
|
|
53
54
|
* Sets the ARIA role and role description for the specified block, accounting
|
|
54
55
|
* for whether the block is part of a flyout.
|
|
@@ -83,6 +84,15 @@ export declare function configureAriaRole(block: BlockSvg): void;
|
|
|
83
84
|
* lookback is specified) as the given input.
|
|
84
85
|
*/
|
|
85
86
|
export declare function computeFieldRowLabel(input: Input, lookback: boolean, verbosity?: Verbosity): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Returns text indicating that a block is the root block of a stack.
|
|
89
|
+
*
|
|
90
|
+
* @internal
|
|
91
|
+
* @param block The block to retrieve a label for.
|
|
92
|
+
* @returns Text indicating that the block begins a stack, or undefined if it
|
|
93
|
+
* does not.
|
|
94
|
+
*/
|
|
95
|
+
export declare function getBeginStackLabel(block: BlockSvg): string | undefined;
|
|
86
96
|
/**
|
|
87
97
|
* Returns a list of accessibility labels for fields and inputs on a block.
|
|
88
98
|
* Each entry in the returned array corresponds to one of: (a) a label for a
|
|
@@ -98,9 +108,10 @@ export declare function computeFieldRowLabel(input: Input, lookback: boolean, ve
|
|
|
98
108
|
* @internal
|
|
99
109
|
* @param block The block to retrieve a list of field/input labels for.
|
|
100
110
|
* @param verbosity How much detail to include in each input label.
|
|
111
|
+
* @param fullBlockFieldLabel An optional override for full-block fields.
|
|
101
112
|
* @returns A list of field/input labels for the given block.
|
|
102
113
|
*/
|
|
103
|
-
export declare function getInputLabels(block: BlockSvg, verbosity?: Verbosity): string[];
|
|
114
|
+
export declare function getInputLabels(block: BlockSvg, verbosity?: Verbosity, fullBlockFieldLabel?: string | undefined): string[];
|
|
104
115
|
/**
|
|
105
116
|
* Returns a subset of derived labels for inputs on the given block, ending at
|
|
106
117
|
* the specified input. Used to disambiguate move targets and connection
|
package/core/block_svg.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './events/events_selected.js';
|
|
12
11
|
import { Block } from './block.js';
|
|
13
12
|
import { BlockCopyData } from './clipboard/block_paster.js';
|
|
14
13
|
import type { Connection } from './connection.js';
|
|
@@ -495,6 +494,19 @@ export declare class BlockSvg extends Block implements IBoundedElement, IContext
|
|
|
495
494
|
* adjusting its parents.
|
|
496
495
|
*/
|
|
497
496
|
bringToFront(blockOnly?: boolean): void;
|
|
497
|
+
/**
|
|
498
|
+
* Reorders this block's SVG root and those of its parents (unless
|
|
499
|
+
* `blockOnly`` is set to `true`) to the end of their respective parents so
|
|
500
|
+
* they render on top of their siblings.
|
|
501
|
+
*
|
|
502
|
+
* Unlike `bringToFront`, this does not preserve focus across the reorder, so
|
|
503
|
+
* it is safe to call from within a focus callback
|
|
504
|
+
*
|
|
505
|
+
* @param blockOnly True to only move this block to the front without
|
|
506
|
+
* adjusting its parents.
|
|
507
|
+
* @internal
|
|
508
|
+
*/
|
|
509
|
+
moveSvgRootToFront(blockOnly?: boolean): void;
|
|
498
510
|
/**
|
|
499
511
|
* Set whether this block can chain onto the bottom of another block.
|
|
500
512
|
*
|
package/core/blockly.d.ts
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
* Copyright 2011 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import './events/events_block_create.js';
|
|
7
|
-
import './events/workspace_events.js';
|
|
8
|
-
import './events/events_ui_base.js';
|
|
9
|
-
import './events/events_var_create.js';
|
|
10
6
|
import { Block } from './block.js';
|
|
11
7
|
import * as blockAnimations from './block_animations.js';
|
|
12
8
|
import { BlockFlyoutInflater } from './block_flyout_inflater.js';
|
|
@@ -12,12 +12,14 @@ import type { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
|
12
12
|
import type { IComponent } from './interfaces/i_component.js';
|
|
13
13
|
import type { IDeleteArea } from './interfaces/i_delete_area.js';
|
|
14
14
|
import type { IDragTarget } from './interfaces/i_drag_target.js';
|
|
15
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
15
16
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
16
17
|
declare class Capability<_T> {
|
|
17
18
|
static POSITIONABLE: Capability<IPositionable>;
|
|
18
19
|
static DRAG_TARGET: Capability<IDragTarget>;
|
|
19
20
|
static DELETE_AREA: Capability<IDeleteArea>;
|
|
20
21
|
static AUTOHIDEABLE: Capability<IAutoHideable>;
|
|
22
|
+
static FOCUSABLE: Capability<IFocusableNode>;
|
|
21
23
|
private readonly name;
|
|
22
24
|
/** @param name The name of the component capability. */
|
|
23
25
|
constructor(name: string);
|
package/core/field.d.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @class
|
|
12
12
|
*/
|
|
13
|
-
import './events/events_block_change.js';
|
|
14
13
|
import type { Block } from './block.js';
|
|
15
14
|
import type { Input } from './inputs/input.js';
|
|
16
15
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
@@ -277,6 +276,13 @@ export declare abstract class Field<T = any> implements IKeyboardAccessible, IRe
|
|
|
277
276
|
* with this method.
|
|
278
277
|
*/
|
|
279
278
|
isFullBlockField(): boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Returns whether this field is a static text label (ex. FieldLabel).
|
|
281
|
+
* Used internally instead of `instanceof FieldLabel` to avoid circular imports.
|
|
282
|
+
*
|
|
283
|
+
* @internal
|
|
284
|
+
*/
|
|
285
|
+
isLabelField(): boolean;
|
|
280
286
|
/**
|
|
281
287
|
* Create a field border rect element. Not to be overridden by subclasses.
|
|
282
288
|
* Instead modify the result of the function inside initView, or create a
|
|
@@ -771,7 +777,7 @@ export declare abstract class Field<T = any> implements IKeyboardAccessible, IRe
|
|
|
771
777
|
*
|
|
772
778
|
* @returns true if the element is in the accessibility tree, false if the aria state is hidden
|
|
773
779
|
*/
|
|
774
|
-
|
|
780
|
+
recomputeAriaContext(): boolean;
|
|
775
781
|
/**
|
|
776
782
|
* Subclasses should reimplement this method to construct their Field
|
|
777
783
|
* subclass from a JSON arg object.
|
package/core/field_checkbox.d.ts
CHANGED
package/core/field_dropdown.d.ts
CHANGED
|
@@ -279,7 +279,7 @@ export declare class FieldDropdown extends Field<string> {
|
|
|
279
279
|
*/
|
|
280
280
|
private getSelectedAriaLabel;
|
|
281
281
|
/**
|
|
282
|
-
*
|
|
282
|
+
* Sets additional aria state.
|
|
283
283
|
*/
|
|
284
284
|
recomputeAriaContext(): boolean;
|
|
285
285
|
/**
|
package/core/field_input.d.ts
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
* Copyright 2012 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Text input field.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_block_change.js';
|
|
12
6
|
import { Field, FieldConfig, FieldValidator } from './field.js';
|
|
13
7
|
import { Size } from './utils/size.js';
|
|
14
8
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
package/core/field_label.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class FieldLabel extends Field<string> {
|
|
|
23
23
|
EDITABLE: boolean;
|
|
24
24
|
/** Text labels should not truncate. */
|
|
25
25
|
maxDisplayLength: number;
|
|
26
|
+
isLabelField(): boolean;
|
|
26
27
|
/**
|
|
27
28
|
* @param value The initial value of the field. Should cast to a string.
|
|
28
29
|
* Defaults to an empty string if null or undefined. Also accepts
|
package/core/field_variable.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './events/events_block_change.js';
|
|
12
11
|
import type { Block } from './block.js';
|
|
13
12
|
import { Field, FieldConfig } from './field.js';
|
|
14
13
|
import { FieldDropdown, FieldDropdownValidator, MenuGenerator, MenuOption } from './field_dropdown.js';
|
package/core/gesture.d.ts
CHANGED
|
@@ -3,13 +3,6 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* The class representing an in-progress gesture, e.g. a drag,
|
|
8
|
-
* tap, or pinch to zoom.
|
|
9
|
-
*
|
|
10
|
-
* @class
|
|
11
|
-
*/
|
|
12
|
-
import './events/events_click.js';
|
|
13
6
|
import type { BlockSvg } from './block_svg.js';
|
|
14
7
|
import { RenderedWorkspaceComment } from './comments.js';
|
|
15
8
|
import type { Field } from './field.js';
|
package/core/inputs/input.d.ts
CHANGED
package/core/procedures.d.ts
CHANGED
|
@@ -128,6 +128,12 @@ export declare class RenderedConnection extends Connection implements IContextMe
|
|
|
128
128
|
connection: RenderedConnection | null;
|
|
129
129
|
radius: number;
|
|
130
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* Sets the aria role and role description for this connection.
|
|
133
|
+
*
|
|
134
|
+
* @param highlightSvg The focusable element for this connection.
|
|
135
|
+
*/
|
|
136
|
+
setAriaRole(highlightSvg: SVGElement): void;
|
|
131
137
|
/**
|
|
132
138
|
* Sets the aria role, label, and other state for this connection.
|
|
133
139
|
*
|
package/core/shortcut_items.d.ts
CHANGED
|
@@ -40,7 +40,13 @@ export declare enum names {
|
|
|
40
40
|
SHOW_TOOLTIP = "show_tooltip",
|
|
41
41
|
NEXT_HEADING = "next_heading",
|
|
42
42
|
PREVIOUS_HEADING = "previous_heading",
|
|
43
|
-
TOGGLE_SCREENREADER = "toggle_screenreader"
|
|
43
|
+
TOGGLE_SCREENREADER = "toggle_screenreader",
|
|
44
|
+
JUMP_TOP_STACK = "jump_to_top_of_stack",
|
|
45
|
+
JUMP_BOTTOM_STACK = "jump_to_bottom_of_stack",
|
|
46
|
+
JUMP_BLOCK_START = "jump_to_block_start",
|
|
47
|
+
JUMP_BLOCK_END = "jump_to_block_end",
|
|
48
|
+
JUMP_FIRST_BLOCK = "jump_to_first_block",
|
|
49
|
+
JUMP_LAST_BLOCK = "jump_to_last_block"
|
|
44
50
|
}
|
|
45
51
|
/**
|
|
46
52
|
* Keyboard shortcut to hide chaff on escape.
|
|
@@ -141,6 +147,36 @@ export declare function registerShowTooltip(): void;
|
|
|
141
147
|
* improve the experience for individuals using screenreaders.
|
|
142
148
|
*/
|
|
143
149
|
export declare function registerToggleScreenreaderMode(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Registers a keyboard shortcut that sets the focus to the block
|
|
152
|
+
* that owns the current focused node.
|
|
153
|
+
*/
|
|
154
|
+
export declare function registerJumpBlockStart(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Registers a keyboard shortcut that sets the focus to the
|
|
157
|
+
* last input of the block that owns the current focused node.
|
|
158
|
+
*/
|
|
159
|
+
export declare function registerJumpBlockEnd(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Registers a keyboard shortcut that sets the focus to the top block
|
|
162
|
+
* in the current stack.
|
|
163
|
+
*/
|
|
164
|
+
export declare function registerJumpTopStack(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Registers a keyboard shortcut that sets the focus to the bottom block
|
|
167
|
+
* in the current stack.
|
|
168
|
+
*/
|
|
169
|
+
export declare function registerJumpBottomStack(): void;
|
|
170
|
+
/**
|
|
171
|
+
* Registers a keyboard shortcut that sets the focus to the first
|
|
172
|
+
* block in the workspace.
|
|
173
|
+
*/
|
|
174
|
+
export declare function registerJumpFirstBlock(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Registers a keyboard shortcut that sets the focus to the last
|
|
177
|
+
* block in the workspace.
|
|
178
|
+
*/
|
|
179
|
+
export declare function registerJumpLastBlock(): void;
|
|
144
180
|
/**
|
|
145
181
|
* Registers all default keyboard shortcut item. This should be called once per
|
|
146
182
|
* instance of KeyboardShortcutRegistry.
|
|
@@ -157,4 +193,9 @@ export declare function registerKeyboardNavigationShortcuts(): void;
|
|
|
157
193
|
* Registers keyboard shortcuts used to announce screen reader information.
|
|
158
194
|
*/
|
|
159
195
|
export declare function registerScreenReaderShortcuts(): void;
|
|
196
|
+
/**
|
|
197
|
+
* Registers keyboard shortcuts used to jump between blocks and stacks in the workspace.
|
|
198
|
+
* Note these are not registered by default, so call this function to enable them if desired.
|
|
199
|
+
*/
|
|
200
|
+
export declare function registerNavigationShortcuts(): void;
|
|
160
201
|
//# sourceMappingURL=shortcut_items.d.ts.map
|
|
@@ -67,6 +67,8 @@ export declare class CollapsibleToolboxCategory extends ToolboxCategory implemen
|
|
|
67
67
|
isExpanded(): boolean;
|
|
68
68
|
isCollapsible(): boolean;
|
|
69
69
|
onClick(_e: Event): void;
|
|
70
|
+
/** Sets the visibility of the parent toolbox's flyout. */
|
|
71
|
+
private setFlyoutVisible;
|
|
70
72
|
/** Toggles whether or not the category is expanded. */
|
|
71
73
|
toggleExpanded(): void;
|
|
72
74
|
getDiv(): HTMLDivElement | null;
|
package/core/trashcan.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { DeleteArea } from './delete_area.js';
|
|
7
7
|
import './events/events_trashcan_open.js';
|
|
8
8
|
import type { IAutoHideable } from './interfaces/i_autohideable.js';
|
|
9
|
+
import type { IComponent } from './interfaces/i_component';
|
|
9
10
|
import type { IDraggable } from './interfaces/i_draggable.js';
|
|
10
11
|
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
11
12
|
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
@@ -16,7 +17,7 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
16
17
|
/**
|
|
17
18
|
* Class for a trash can.
|
|
18
19
|
*/
|
|
19
|
-
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable, IFocusableNode {
|
|
20
|
+
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable, IFocusableNode, IComponent {
|
|
20
21
|
private workspace;
|
|
21
22
|
/**
|
|
22
23
|
* The id for this component that is used to register with the
|
|
@@ -186,12 +187,5 @@ export declare class Trashcan extends DeleteArea implements IAutoHideable, IPosi
|
|
|
186
187
|
onNodeBlur(): void;
|
|
187
188
|
canBeFocused(): boolean;
|
|
188
189
|
performAction(): void;
|
|
189
|
-
/**
|
|
190
|
-
* Retrieves the globally unique ID of this Trashcan instance. Used for focus
|
|
191
|
-
* management.
|
|
192
|
-
*
|
|
193
|
-
* @internal
|
|
194
|
-
*/
|
|
195
|
-
getGloballyUniqueId(): string;
|
|
196
190
|
}
|
|
197
191
|
//# sourceMappingURL=trashcan.d.ts.map
|
package/core/utils/aria.d.ts
CHANGED
|
@@ -61,10 +61,10 @@ export declare enum Role {
|
|
|
61
61
|
MENU = "menu",
|
|
62
62
|
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/menuitem_role. */
|
|
63
63
|
MENUITEM = "menuitem",
|
|
64
|
+
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/none_role. */
|
|
65
|
+
NONE = "none",
|
|
64
66
|
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/option_role. */
|
|
65
67
|
OPTION = "option",
|
|
66
|
-
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/presentation_role. */
|
|
67
|
-
PRESENTATION = "presentation",
|
|
68
68
|
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role. */
|
|
69
69
|
REGION = "region",
|
|
70
70
|
/** See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/row_role. */
|
package/core/variable_map.d.ts
CHANGED
|
@@ -3,13 +3,6 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Object representing a map of variables and their types.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_var_delete.js';
|
|
12
|
-
import './events/events_var_rename.js';
|
|
13
6
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
14
7
|
import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
15
8
|
import type { Workspace } from './workspace.js';
|
package/core/variable_model.d.ts
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Components for the variable model.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_var_create.js';
|
|
12
6
|
import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
|
|
13
7
|
import type { Workspace } from './workspace.js';
|
|
14
8
|
/**
|
package/core/workspace.d.ts
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Raspberry Pi Foundation
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
7
|
+
import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
|
|
8
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
9
|
+
/**
|
|
10
|
+
* A focusable element representing the workspace as a whole.
|
|
11
|
+
*
|
|
12
|
+
* Focus on the workspace itself (i.e. not on any block, comment, or other
|
|
13
|
+
* content) lands here rather than on the workspace's region element. VoiceOver
|
|
14
|
+
* does not announce a region when focus moves into it from a node already
|
|
15
|
+
* inside that region, so focusing the region directly (e.g. after pressing "W"
|
|
16
|
+
* from a block) would be silent. This is an ordinary focusable node, so moving
|
|
17
|
+
* to it is announced. It carries the stack count and a "workspace" role
|
|
18
|
+
* description; the enclosing region keeps a short, stable label
|
|
19
|
+
* ("Blocks workspace.").
|
|
20
|
+
*/
|
|
21
|
+
export declare class WorkspaceFocusTarget implements IFocusableNode {
|
|
22
|
+
private readonly workspace;
|
|
23
|
+
private readonly element;
|
|
24
|
+
/**
|
|
25
|
+
* @param workspace The workspace this focus target represents.
|
|
26
|
+
* @param element The SVG element that receives focus for the workspace.
|
|
27
|
+
*/
|
|
28
|
+
constructor(workspace: WorkspaceSvg, element: SVGElement);
|
|
29
|
+
/** See IFocusableNode.getFocusableElement. */
|
|
30
|
+
getFocusableElement(): SVGElement;
|
|
31
|
+
/** See IFocusableNode.getFocusableTree. */
|
|
32
|
+
getFocusableTree(): IFocusableTree;
|
|
33
|
+
/** See IFocusableNode.onNodeFocus. */
|
|
34
|
+
onNodeFocus(): void;
|
|
35
|
+
/** See IFocusableNode.onNodeBlur. */
|
|
36
|
+
onNodeBlur(): void;
|
|
37
|
+
/** See IFocusableNode.canBeFocused. */
|
|
38
|
+
canBeFocused(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the workspace this focus target represents.
|
|
41
|
+
*
|
|
42
|
+
* @returns The workspace this focus target represents.
|
|
43
|
+
*/
|
|
44
|
+
getWorkspace(): WorkspaceSvg;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=workspace_focus_target.d.ts.map
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
|
-
import './events/events_block_create.js';
|
|
12
|
-
import './events/events_theme_change.js';
|
|
13
|
-
import './events/events_viewport.js';
|
|
14
11
|
import type { Block } from './block.js';
|
|
15
12
|
import type { BlockSvg } from './block_svg.js';
|
|
16
13
|
import * as browserEvents from './browser_events.js';
|
|
@@ -45,6 +42,7 @@ import { Svg } from './utils/svg.js';
|
|
|
45
42
|
import * as toolbox from './utils/toolbox.js';
|
|
46
43
|
import { Workspace } from './workspace.js';
|
|
47
44
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
45
|
+
import { WorkspaceFocusTarget } from './workspace_focus_target.js';
|
|
48
46
|
import { ZoomControls } from './zoom_controls.js';
|
|
49
47
|
/**
|
|
50
48
|
* Class for a workspace. This is an onscreen area with optional trashcan,
|
|
@@ -250,6 +248,18 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
250
248
|
* Selection ring inside the workspace.
|
|
251
249
|
*/
|
|
252
250
|
private workspaceSelectionRing;
|
|
251
|
+
/**
|
|
252
|
+
* Element that receives focus when the workspace itself (rather than any of
|
|
253
|
+
* its contents) is focused. See {@link WorkspaceFocusTarget}. This is the
|
|
254
|
+
* selection ring (which already represents the workspace being the active
|
|
255
|
+
* node); it's set only for main (non-flyout, non-mutator) workspaces.
|
|
256
|
+
*/
|
|
257
|
+
private workspaceFocusTargetElement;
|
|
258
|
+
/**
|
|
259
|
+
* Focusable node wrapping {@link workspaceFocusTargetElement}, or null if this
|
|
260
|
+
* workspace has no focus target.
|
|
261
|
+
*/
|
|
262
|
+
private workspaceFocusTarget;
|
|
253
263
|
/**
|
|
254
264
|
* Navigator that handles moving focus between items in this workspace in
|
|
255
265
|
* response to keyboard navigation commands.
|
|
@@ -395,7 +405,8 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
395
405
|
*/
|
|
396
406
|
setInitialAriaContext(): void;
|
|
397
407
|
/**
|
|
398
|
-
* Updates the
|
|
408
|
+
* Updates the focus target's label to reflect the number of top-level stacks in the
|
|
409
|
+
* workspace. No-op for workspaces without a focus target (flyouts and mutators).
|
|
399
410
|
*/
|
|
400
411
|
private updateAriaLabel;
|
|
401
412
|
/**
|
|
@@ -606,13 +617,12 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
606
617
|
*/
|
|
607
618
|
newComment(id?: string): WorkspaceComment;
|
|
608
619
|
/**
|
|
609
|
-
* Returns the drag target the
|
|
620
|
+
* Returns the drag target at the given point.
|
|
610
621
|
*
|
|
611
|
-
* @param
|
|
612
|
-
* @returns Null if not over a drag target, or the drag target
|
|
613
|
-
* over.
|
|
622
|
+
* @param point A pointer event, or a point in client/viewport coordinates.
|
|
623
|
+
* @returns Null if not over a drag target, or the drag target at that point.
|
|
614
624
|
*/
|
|
615
|
-
getDragTarget(
|
|
625
|
+
getDragTarget(point: PointerEvent | Coordinate): IDragTarget | null;
|
|
616
626
|
/**
|
|
617
627
|
* Handle a pointerdown on SVG drawing surface.
|
|
618
628
|
*
|
|
@@ -1036,6 +1046,17 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
1036
1046
|
getFocusableTree(): IFocusableTree;
|
|
1037
1047
|
/** See IFocusableNode.onNodeFocus. */
|
|
1038
1048
|
onNodeFocus(): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* Handles the workspace's focus target receiving focus, which represents focus
|
|
1051
|
+
* landing on the workspace as a whole.
|
|
1052
|
+
*
|
|
1053
|
+
* @internal
|
|
1054
|
+
*/
|
|
1055
|
+
handleWorkspaceFocusTargetFocus(): void;
|
|
1056
|
+
/**
|
|
1057
|
+
* Announces the screen reader hint the first time any workspace is focused.
|
|
1058
|
+
*/
|
|
1059
|
+
private maybeAnnounceScreenreaderHint;
|
|
1039
1060
|
/** See IFocusableNode.onNodeBlur. */
|
|
1040
1061
|
onNodeBlur(): void;
|
|
1041
1062
|
/** See IFocusableNode.canBeFocused. */
|
|
@@ -1044,6 +1065,16 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
1044
1065
|
getRootFocusableNode(): IFocusableNode;
|
|
1045
1066
|
/** See IFocusableTree.getRestoredFocusableNode. */
|
|
1046
1067
|
getRestoredFocusableNode(previousNode: IFocusableNode | null): IFocusableNode | null;
|
|
1068
|
+
/**
|
|
1069
|
+
* Returns the focusable node representing this workspace as a whole, or null
|
|
1070
|
+
* for workspaces without one (flyouts and mutators).
|
|
1071
|
+
*
|
|
1072
|
+
* Focus lands here when the workspace itself is focused (e.g. via the focus
|
|
1073
|
+
* workspace shortcut) rather than on any of its contents.
|
|
1074
|
+
*
|
|
1075
|
+
* @returns This workspace's focus target node, if any.
|
|
1076
|
+
*/
|
|
1077
|
+
getWorkspaceFocusTarget(): WorkspaceFocusTarget | null;
|
|
1047
1078
|
/** See IFocusableTree.getNestedTrees. */
|
|
1048
1079
|
getNestedTrees(): Array<IFocusableTree>;
|
|
1049
1080
|
/**
|
package/core/zoom_controls.d.ts
CHANGED
|
@@ -3,48 +3,10 @@
|
|
|
3
3
|
* Copyright 2015 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Object representing a zoom icons.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import './events/events_click.js';
|
|
12
|
-
import { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
13
6
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
14
7
|
import type { UiMetrics } from './metrics_manager.js';
|
|
15
8
|
import { Rect } from './utils/rect.js';
|
|
16
9
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
17
|
-
/**
|
|
18
|
-
* Base class for an individual zoom control (in, out, reset).
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
declare abstract class ZoomControl implements IFocusableNode {
|
|
23
|
-
protected workspace: WorkspaceSvg;
|
|
24
|
-
protected group: SVGGElement;
|
|
25
|
-
private pointerDownHandler;
|
|
26
|
-
private id;
|
|
27
|
-
constructor(workspace: WorkspaceSvg, group: SVGGElement);
|
|
28
|
-
getId(): string;
|
|
29
|
-
/**
|
|
30
|
-
* Handles a mouse down event on the zoom in or zoom out buttons on the
|
|
31
|
-
* workspace.
|
|
32
|
-
*
|
|
33
|
-
* @param amount Amount of zooming. Negative amount values zoom out, and
|
|
34
|
-
* positive amount values zoom in.
|
|
35
|
-
* @param e A mouse down or keydown event.
|
|
36
|
-
*/
|
|
37
|
-
protected zoom(amount: number, e: Event): void;
|
|
38
|
-
/** Fires a zoom control UI event. */
|
|
39
|
-
protected fireZoomEvent(): void;
|
|
40
|
-
getFocusableElement(): SVGGElement;
|
|
41
|
-
getFocusableTree(): WorkspaceSvg;
|
|
42
|
-
onNodeFocus(): void;
|
|
43
|
-
onNodeBlur(): void;
|
|
44
|
-
canBeFocused(): boolean;
|
|
45
|
-
abstract performAction(_e: Event): void;
|
|
46
|
-
dispose(): void;
|
|
47
|
-
}
|
|
48
10
|
/**
|
|
49
11
|
* Class for a zoom controls.
|
|
50
12
|
*/
|
|
@@ -115,13 +77,5 @@ export declare class ZoomControls implements IPositionable {
|
|
|
115
77
|
* @param savedPositions List of rectangles that are already on the workspace.
|
|
116
78
|
*/
|
|
117
79
|
position(metrics: UiMetrics, savedPositions: Rect[]): void;
|
|
118
|
-
/**
|
|
119
|
-
* Returns the individual zoom control, if any, with the given ID. Used for
|
|
120
|
-
* focus management.
|
|
121
|
-
*
|
|
122
|
-
* @internal
|
|
123
|
-
*/
|
|
124
|
-
getControlWithId(id: string): ZoomControl | undefined;
|
|
125
80
|
}
|
|
126
|
-
export {};
|
|
127
81
|
//# sourceMappingURL=zoom_controls.d.ts.map
|