blockly 12.3.0-beta.0 → 12.3.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 +52 -51
- package/blockly_compressed.js +52 -51
- package/blockly_compressed.js.map +1 -1
- package/core/block.d.ts +1 -1
- package/core/field.d.ts +0 -3
- package/core/field_input.d.ts +8 -4
- package/core/field_registry.d.ts +2 -2
- package/core/focus_manager.d.ts +4 -0
- package/core/interfaces/i_focusable_node.d.ts +3 -0
- package/core/keyboard_nav/line_cursor.d.ts +1 -1
- package/package.json +4 -2
package/core/block.d.ts
CHANGED
|
@@ -542,7 +542,7 @@ export declare class Block {
|
|
|
542
542
|
/**
|
|
543
543
|
* Returns a generator that provides every field on the block.
|
|
544
544
|
*
|
|
545
|
-
* @
|
|
545
|
+
* @returns A generator that can be used to iterate the fields on the block.
|
|
546
546
|
*/
|
|
547
547
|
getFields(): Generator<Field, undefined, void>;
|
|
548
548
|
/**
|
package/core/field.d.ts
CHANGED
|
@@ -86,9 +86,6 @@ export declare abstract class Field<T = any> implements IKeyboardAccessible, IRe
|
|
|
86
86
|
* through to super, but it must exist per the JS spec.
|
|
87
87
|
*/
|
|
88
88
|
protected get size_(): Size;
|
|
89
|
-
/**
|
|
90
|
-
* Sets the size of this field.
|
|
91
|
-
*/
|
|
92
89
|
protected set size_(newValue: Size);
|
|
93
90
|
/** The rendered field's SVG group element. */
|
|
94
91
|
protected fieldGroup_: SVGGElement | null;
|
package/core/field_input.d.ts
CHANGED
|
@@ -62,10 +62,6 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
62
62
|
* are not. Editable fields should also be serializable.
|
|
63
63
|
*/
|
|
64
64
|
SERIALIZABLE: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Sets the size of this field. Although this appears to be a no-op, it must
|
|
67
|
-
* exist since the getter is overridden below.
|
|
68
|
-
*/
|
|
69
65
|
protected set size_(newValue: Size);
|
|
70
66
|
/**
|
|
71
67
|
* Returns the size of this field, with a minimum width of 14.
|
|
@@ -229,6 +225,14 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
229
225
|
* div.
|
|
230
226
|
*/
|
|
231
227
|
repositionForWindowResize(): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Position a field's text element after a size change. This handles both LTR
|
|
230
|
+
* and RTL positioning.
|
|
231
|
+
*
|
|
232
|
+
* @param xMargin x offset to use when positioning the text element.
|
|
233
|
+
* @param contentWidth The content width.
|
|
234
|
+
*/
|
|
235
|
+
protected positionTextElement_(xMargin: number, contentWidth: number): void;
|
|
232
236
|
/**
|
|
233
237
|
* Use the `getText_` developer hook to override the field's text
|
|
234
238
|
* representation. When we're currently editing, return the current HTML value
|
package/core/field_registry.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ export interface RegistrableField {
|
|
|
48
48
|
* @param type The field type name as used in the JSON definition.
|
|
49
49
|
* @param fieldClass The field class containing a fromJson function that can
|
|
50
50
|
* construct an instance of the field.
|
|
51
|
-
* @throws {Error} if the type name is empty
|
|
52
|
-
*
|
|
51
|
+
* @throws {Error} if the type name is empty or the fieldClass is not an object
|
|
52
|
+
* containing a fromJson function.
|
|
53
53
|
*/
|
|
54
54
|
export declare function register(type: string, fieldClass: RegistrableField): void;
|
|
55
55
|
/**
|
package/core/focus_manager.d.ts
CHANGED
|
@@ -155,6 +155,8 @@ export declare class FocusManager {
|
|
|
155
155
|
* Note that this may update the specified node's element's tabindex to ensure
|
|
156
156
|
* that it can be properly read out by screenreaders while focused.
|
|
157
157
|
*
|
|
158
|
+
* The focused node will not be automatically scrolled into view.
|
|
159
|
+
*
|
|
158
160
|
* @param focusableNode The node that should receive active focus.
|
|
159
161
|
*/
|
|
160
162
|
focusNode(focusableNode: IFocusableNode): void;
|
|
@@ -175,6 +177,8 @@ export declare class FocusManager {
|
|
|
175
177
|
* the returned lambda is called. Additionally, only 1 ephemeral focus context
|
|
176
178
|
* can be active at any given time (attempting to activate more than one
|
|
177
179
|
* simultaneously will result in an error being thrown).
|
|
180
|
+
*
|
|
181
|
+
* This method does not scroll the ephemerally focused element into view.
|
|
178
182
|
*/
|
|
179
183
|
takeEphemeralFocus(focusableElement: HTMLElement | SVGElement): ReturnEphemeralFocus;
|
|
180
184
|
/**
|
|
@@ -55,6 +55,9 @@ export interface IFocusableNode {
|
|
|
55
55
|
* they should avoid the following:
|
|
56
56
|
* - Creating or removing DOM elements (including via the renderer or drawer).
|
|
57
57
|
* - Affecting focus via DOM focus() calls or the FocusManager.
|
|
58
|
+
*
|
|
59
|
+
* Implementations may consider scrolling themselves into view here; that is
|
|
60
|
+
* not handled by the focus manager.
|
|
58
61
|
*/
|
|
59
62
|
onNodeFocus(): void;
|
|
60
63
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { BlockSvg } from '../block_svg.js';
|
|
15
15
|
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
16
|
-
import { WorkspaceSvg } from '../workspace_svg.js';
|
|
16
|
+
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
17
17
|
import { Marker } from './marker.js';
|
|
18
18
|
/**
|
|
19
19
|
* Class for a line cursor.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blockly",
|
|
3
|
-
"version": "12.3.0
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "Blockly is a library for building visual programming editors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blockly"
|
|
@@ -76,12 +76,13 @@
|
|
|
76
76
|
"@microsoft/api-extractor": "^7.29.5",
|
|
77
77
|
"ajv": "^8.17.1",
|
|
78
78
|
"async-done": "^2.0.0",
|
|
79
|
-
"chai": "^
|
|
79
|
+
"chai": "^6.0.1",
|
|
80
80
|
"concurrently": "^9.0.1",
|
|
81
81
|
"eslint": "^9.15.0",
|
|
82
82
|
"eslint-config-google": "^0.14.0",
|
|
83
83
|
"eslint-config-prettier": "^10.1.1",
|
|
84
84
|
"eslint-plugin-jsdoc": "^52.0.2",
|
|
85
|
+
"eslint-plugin-mocha": "^11.1.0",
|
|
85
86
|
"eslint-plugin-prettier": "^5.2.1",
|
|
86
87
|
"glob": "^11.0.1",
|
|
87
88
|
"globals": "^16.0.0",
|
|
@@ -104,6 +105,7 @@
|
|
|
104
105
|
"patch-package": "^8.0.0",
|
|
105
106
|
"prettier": "^3.3.3",
|
|
106
107
|
"prettier-plugin-organize-imports": "^4.0.0",
|
|
108
|
+
"puppeteer-core": "^24.17.0",
|
|
107
109
|
"readline-sync": "^1.4.10",
|
|
108
110
|
"rimraf": "^5.0.0",
|
|
109
111
|
"typescript": "^5.3.3",
|