blockly 13.0.0-beta.7 → 13.0.0-beta.9
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 +1335 -2358
- package/blockly_compressed.js +1089 -2024
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +150 -186
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +4 -3
- package/core/block_aria_composer.d.ts +24 -15
- package/core/blockly.d.ts +0 -2
- package/core/inputs/input.d.ts +5 -4
- package/core/zoom_controls.d.ts +1 -1
- package/dart_compressed.js +123 -164
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +96 -148
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +142 -178
- package/lua_compressed.js.map +1 -1
- package/package.json +1 -1
- package/php_compressed.js +150 -191
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +85 -126
- package/python_compressed.js.map +1 -1
package/core/block.d.ts
CHANGED
|
@@ -720,10 +720,11 @@ export declare class Block {
|
|
|
720
720
|
*/
|
|
721
721
|
setAriaRoleDescriptionProvider(description: string | (() => string)): void;
|
|
722
722
|
/**
|
|
723
|
-
* @returns The
|
|
724
|
-
*
|
|
723
|
+
* @returns The string to use as the role description for this block. If a
|
|
724
|
+
* custom provider has been set, use that. Otherwise, return a default
|
|
725
|
+
* description based on the block's properties.
|
|
725
726
|
*/
|
|
726
|
-
getAriaRoleDescription(): string
|
|
727
|
+
getAriaRoleDescription(): string;
|
|
727
728
|
/**
|
|
728
729
|
* Create a human-readable text representation of this block and any children.
|
|
729
730
|
*
|
|
@@ -39,15 +39,16 @@ export declare enum ConnectionPreposition {
|
|
|
39
39
|
* The returned label will be specialized based on whether the block is part of a
|
|
40
40
|
* flyout.
|
|
41
41
|
*
|
|
42
|
+
* Custom input labels (from {@link Input.setAriaLabelProvider}) are not included
|
|
43
|
+
* here; they are used only in move-mode disambiguation and parent-input context
|
|
44
|
+
* via {@link Input.getAriaLabelText}.
|
|
45
|
+
*
|
|
42
46
|
* @internal
|
|
43
47
|
* @param block The block for which an ARIA representation should be created.
|
|
44
48
|
* @param verbosity How much detail to include in the description.
|
|
45
|
-
* @param useCustomInputLabels Whether to use custom labels for inputs, if they
|
|
46
|
-
* exist. We don't want to do this when just reading a block's label, but do
|
|
47
|
-
* want to in other scenarios such as move mode.
|
|
48
49
|
* @returns The ARIA representation for the specified block.
|
|
49
50
|
*/
|
|
50
|
-
export declare function computeAriaLabel(block: BlockSvg, verbosity?: Verbosity
|
|
51
|
+
export declare function computeAriaLabel(block: BlockSvg, verbosity?: Verbosity): string;
|
|
51
52
|
/**
|
|
52
53
|
* Sets the ARIA role and role description for the specified block, accounting
|
|
53
54
|
* for whether the block is part of a flyout.
|
|
@@ -90,21 +91,20 @@ export declare function computeFieldRowLabel(input: Input, lookback: boolean, ve
|
|
|
90
91
|
* their contents are returned as a single item in the array per top-level
|
|
91
92
|
* input.
|
|
92
93
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* move mode or when an input itself is focused.
|
|
94
|
+
* Uses derived labels only (field row text and connected block content via
|
|
95
|
+
* {@link Input.getLabel}). Custom input labels are not included; see
|
|
96
|
+
* {@link Input.getAriaLabelText} for move-mode and parent-input usage.
|
|
97
97
|
*
|
|
98
98
|
* @internal
|
|
99
99
|
* @param block The block to retrieve a list of field/input labels for.
|
|
100
|
-
* @param verbosity
|
|
101
|
-
* @param useCustomLabels whether to use the custom label for an input, if it's present.
|
|
100
|
+
* @param verbosity How much detail to include in each input label.
|
|
102
101
|
* @returns A list of field/input labels for the given block.
|
|
103
102
|
*/
|
|
104
|
-
export declare function getInputLabels(block: BlockSvg, verbosity?: Verbosity
|
|
103
|
+
export declare function getInputLabels(block: BlockSvg, verbosity?: Verbosity): string[];
|
|
105
104
|
/**
|
|
106
|
-
* Returns a subset of labels for inputs on the given block, ending at
|
|
107
|
-
* specified input.
|
|
105
|
+
* Returns a subset of derived labels for inputs on the given block, ending at
|
|
106
|
+
* the specified input. Used to disambiguate move targets and connection
|
|
107
|
+
* highlights when no custom label is set.
|
|
108
108
|
*
|
|
109
109
|
* The subset is determined based on the input type:
|
|
110
110
|
* - For non-statement inputs, only the label for the given input is returned.
|
|
@@ -113,12 +113,21 @@ export declare function getInputLabels(block: BlockSvg, verbosity?: Verbosity, u
|
|
|
113
113
|
* begins immediately after the previous statement input, or at the start of
|
|
114
114
|
* the block if none exists.
|
|
115
115
|
*
|
|
116
|
+
* Label resolution (see also {@link computeMoveConnectionLabel}):
|
|
117
|
+
* 1. Custom labels ({@link Input.getAriaLabelText}) are handled by callers, not here.
|
|
118
|
+
* 2. Derived labels from {@link Input.getLabel} (field row + child blocks).
|
|
119
|
+
* 3. Numbered fallback ({@link Msg.INPUT_LABEL_INDEX}) when tier 2 is empty.
|
|
120
|
+
* For the statement target input, the fallback is omitted if any earlier
|
|
121
|
+
* input in the subset already produced a label.
|
|
122
|
+
*
|
|
116
123
|
* @internal
|
|
117
124
|
* @param block The block to retrieve a list of field/input labels for.
|
|
118
|
-
* @param
|
|
125
|
+
* @param endInput The input that defines the end of the subset.
|
|
126
|
+
* @param includeEndInputChildren Whether to include labels for child blocks
|
|
127
|
+
* connected to the end input.
|
|
119
128
|
* @returns A list of field/input labels for the given block.
|
|
120
129
|
*/
|
|
121
|
-
export declare function getInputLabelsSubset(block: BlockSvg,
|
|
130
|
+
export declare function getInputLabelsSubset(block: BlockSvg, endInput: Input, includeEndInputChildren: boolean): string[];
|
|
122
131
|
/**
|
|
123
132
|
* Returns a translated string describing an in-progress move of a block to a new
|
|
124
133
|
* connection, suitable for announcement on the ARIA live region. The returned string
|
package/core/blockly.d.ts
CHANGED
|
@@ -158,8 +158,6 @@ import { ZoomControls } from './zoom_controls.js';
|
|
|
158
158
|
* This constant is overridden by the build script (npm run build) to the value
|
|
159
159
|
* of the version in package.json. This is done by the Closure Compiler in the
|
|
160
160
|
* buildCompressed gulp task.
|
|
161
|
-
* For local builds, you can pass --define='Blockly.VERSION=X.Y.Z' to the
|
|
162
|
-
* compiler to override this constant.
|
|
163
161
|
*
|
|
164
162
|
* @define {string}
|
|
165
163
|
*/
|
package/core/inputs/input.d.ts
CHANGED
|
@@ -185,13 +185,14 @@ export declare class Input {
|
|
|
185
185
|
*/
|
|
186
186
|
getRowId(): string;
|
|
187
187
|
/**
|
|
188
|
-
* Returns
|
|
189
|
-
* of any
|
|
190
|
-
*
|
|
188
|
+
* Returns a derived accessibility label for this input: field row text plus
|
|
189
|
+
* labels of any connected child blocks (unless excluded). Does not include
|
|
190
|
+
* custom labels from {@link getAriaLabelText}; those are used in move-mode
|
|
191
|
+
* and parent-input context only.
|
|
191
192
|
*
|
|
192
193
|
* @internal
|
|
193
194
|
*/
|
|
194
|
-
getLabel(verbosity?: Verbosity,
|
|
195
|
+
getLabel(verbosity?: Verbosity, includeChildren?: boolean): string;
|
|
195
196
|
/**
|
|
196
197
|
* Returns the index of this input, excluding inputs without connections, on its
|
|
197
198
|
* source block.
|
package/core/zoom_controls.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import './events/events_click.js';
|
|
12
|
-
import { IFocusableNode } from './
|
|
12
|
+
import { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
13
13
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
14
14
|
import type { UiMetrics } from './metrics_manager.js';
|
|
15
15
|
import { Rect } from './utils/rect.js';
|