blockly 11.2.0-beta.0 → 11.2.0-beta.2
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 +265 -261
- package/blockly_compressed.js +236 -233
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +29 -28
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +19 -19
- package/core/block_svg.d.ts +3 -10
- package/core/bubbles/textinput_bubble.d.ts +5 -0
- package/core/component_manager.d.ts +1 -1
- package/core/connection.d.ts +3 -3
- package/core/contextmenu_registry.d.ts +1 -1
- package/core/dragging/block_drag_strategy.d.ts +2 -0
- package/core/events/events_block_move.d.ts +1 -1
- package/core/field.d.ts +5 -5
- package/core/field_checkbox.d.ts +1 -1
- package/core/field_dropdown.d.ts +34 -0
- package/core/field_input.d.ts +5 -5
- package/core/flyout_base.d.ts +1 -1
- package/core/flyout_metrics_manager.d.ts +1 -1
- package/core/generator.d.ts +1 -1
- package/core/gesture.d.ts +1 -1
- package/core/icons/comment_icon.d.ts +2 -3
- package/core/marker_manager.d.ts +3 -3
- package/core/options.d.ts +4 -4
- package/core/rendered_connection.d.ts +10 -5
- package/core/scrollbar_pair.d.ts +1 -1
- package/core/shortcut_registry.d.ts +72 -12
- package/core/theme_manager.d.ts +1 -1
- package/core/toolbox/category.d.ts +2 -2
- package/core/toolbox/collapsible_category.d.ts +1 -1
- package/core/toolbox/separator.d.ts +1 -1
- package/core/toolbox/toolbox.d.ts +8 -8
- package/core/utils/drag.d.ts +33 -0
- package/core/utils/rect.d.ts +26 -0
- package/core/variable_map.d.ts +2 -2
- package/core/variable_model.d.ts +1 -1
- package/core/workspace.d.ts +1 -1
- package/core/workspace_audio.d.ts +1 -1
- package/core/workspace_dragger.d.ts +2 -2
- package/core/workspace_svg.d.ts +8 -10
- package/package.json +9 -8
package/core/block.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
55
55
|
* Colour of the block as HSV hue value (0-360)
|
|
56
56
|
* This may be null if the block colour was not set via a hue number.
|
|
57
57
|
*/
|
|
58
|
-
private
|
|
58
|
+
private hue;
|
|
59
59
|
/** Colour of the block in '#RRGGBB' format. */
|
|
60
60
|
protected colour_: string;
|
|
61
61
|
/** Name of the block style. */
|
|
@@ -134,10 +134,10 @@ export declare class Block implements IASTNodeLocation {
|
|
|
134
134
|
contextMenu: boolean;
|
|
135
135
|
protected parentBlock_: this | null;
|
|
136
136
|
protected childBlocks_: this[];
|
|
137
|
-
private
|
|
138
|
-
private
|
|
139
|
-
private
|
|
140
|
-
private
|
|
137
|
+
private deletable;
|
|
138
|
+
private movable;
|
|
139
|
+
private editable;
|
|
140
|
+
private shadow;
|
|
141
141
|
protected collapsed_: boolean;
|
|
142
142
|
protected outputShape_: number | null;
|
|
143
143
|
/**
|
|
@@ -150,7 +150,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
150
150
|
* @internal
|
|
151
151
|
*/
|
|
152
152
|
initialized: boolean;
|
|
153
|
-
private readonly
|
|
153
|
+
private readonly xy;
|
|
154
154
|
isInFlyout: boolean;
|
|
155
155
|
isInMutator: boolean;
|
|
156
156
|
RTL: boolean;
|
|
@@ -165,7 +165,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
165
165
|
*/
|
|
166
166
|
helpUrl: string | (() => string) | null;
|
|
167
167
|
/** A bound callback function to use when the parent workspace changes. */
|
|
168
|
-
private
|
|
168
|
+
private onchangeWrapper;
|
|
169
169
|
/**
|
|
170
170
|
* A count of statement inputs on the block.
|
|
171
171
|
*
|
|
@@ -230,7 +230,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
230
230
|
* @param opt_healStack Disconnect right-side block and connect to left-side
|
|
231
231
|
* block. Defaults to false.
|
|
232
232
|
*/
|
|
233
|
-
private
|
|
233
|
+
private unplugFromRow;
|
|
234
234
|
/**
|
|
235
235
|
* Returns the connection on the value input that is connected to another
|
|
236
236
|
* block. When an insertion marker is connected to a connection with a block
|
|
@@ -240,7 +240,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
240
240
|
*
|
|
241
241
|
* @returns The connection on the value input, or null.
|
|
242
242
|
*/
|
|
243
|
-
private
|
|
243
|
+
private getOnlyValueConnection;
|
|
244
244
|
/**
|
|
245
245
|
* Unplug this statement block from its superior block. Optionally reconnect
|
|
246
246
|
* the block underneath with the block on top.
|
|
@@ -248,7 +248,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
248
248
|
* @param opt_healStack Disconnect child statement and reconnect stack.
|
|
249
249
|
* Defaults to false.
|
|
250
250
|
*/
|
|
251
|
-
private
|
|
251
|
+
private unplugFromStack;
|
|
252
252
|
/**
|
|
253
253
|
* Returns all connections originating from this block.
|
|
254
254
|
*
|
|
@@ -783,14 +783,14 @@ export declare class Block implements IASTNodeLocation {
|
|
|
783
783
|
* @param json Structured data describing the block.
|
|
784
784
|
* @param warningPrefix Warning prefix string identifying block.
|
|
785
785
|
*/
|
|
786
|
-
private
|
|
786
|
+
private jsonInitColour;
|
|
787
787
|
/**
|
|
788
788
|
* Initialize the style of this block from the JSON description.
|
|
789
789
|
*
|
|
790
790
|
* @param json Structured data describing the block.
|
|
791
791
|
* @param warningPrefix Warning prefix string identifying block.
|
|
792
792
|
*/
|
|
793
|
-
private
|
|
793
|
+
private jsonInitStyle;
|
|
794
794
|
/**
|
|
795
795
|
* Add key/values from mixinObj to this block object. By default, this method
|
|
796
796
|
* will check that the keys in mixinObj will not overwrite existing values in
|
|
@@ -812,7 +812,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
812
812
|
* of newline tokens, how should it be aligned?
|
|
813
813
|
* @param warningPrefix Warning prefix string identifying block.
|
|
814
814
|
*/
|
|
815
|
-
private
|
|
815
|
+
private interpolate;
|
|
816
816
|
/**
|
|
817
817
|
* Validates that the tokens are within the correct bounds, with no
|
|
818
818
|
* duplicates, and that all of the arguments are referred to. Throws errors if
|
|
@@ -821,7 +821,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
821
821
|
* @param tokens An array of tokens to validate
|
|
822
822
|
* @param argsCount The number of args that need to be referred to.
|
|
823
823
|
*/
|
|
824
|
-
private
|
|
824
|
+
private validateTokens;
|
|
825
825
|
/**
|
|
826
826
|
* Inserts args in place of numerical tokens. String args are converted to
|
|
827
827
|
* JSON that defines a label field. Newline characters are converted to
|
|
@@ -834,7 +834,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
834
834
|
* or dummy inputs, if necessary.
|
|
835
835
|
* @returns The JSON definitions of field and inputs to add to the block.
|
|
836
836
|
*/
|
|
837
|
-
private
|
|
837
|
+
private interpolateArguments;
|
|
838
838
|
/**
|
|
839
839
|
* Creates a field from the JSON definition of a field. If a field with the
|
|
840
840
|
* given type cannot be found, this attempts to create a different field using
|
|
@@ -843,7 +843,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
843
843
|
* @param element The element to try to turn into a field.
|
|
844
844
|
* @returns The field defined by the JSON, or null if one couldn't be created.
|
|
845
845
|
*/
|
|
846
|
-
private
|
|
846
|
+
private fieldFromJson;
|
|
847
847
|
/**
|
|
848
848
|
* Creates an input from the JSON definition of an input. Sets the input's
|
|
849
849
|
* check and alignment if they are provided.
|
|
@@ -854,7 +854,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
854
854
|
* @returns The input that has been created, or null if one could not be
|
|
855
855
|
* created for some reason (should never happen).
|
|
856
856
|
*/
|
|
857
|
-
private
|
|
857
|
+
private inputFromJson;
|
|
858
858
|
/**
|
|
859
859
|
* Returns true if the given string matches one of the input keywords.
|
|
860
860
|
*
|
|
@@ -862,7 +862,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
862
862
|
* @returns True if the given string matches one of the input keywords, false
|
|
863
863
|
* otherwise.
|
|
864
864
|
*/
|
|
865
|
-
private
|
|
865
|
+
private isInputKeyword;
|
|
866
866
|
/**
|
|
867
867
|
* Turns a string into the JSON definition of a label field. If the string
|
|
868
868
|
* becomes an empty string when trimmed, this returns null.
|
|
@@ -870,7 +870,7 @@ export declare class Block implements IASTNodeLocation {
|
|
|
870
870
|
* @param str String to turn into the JSON definition of a label field.
|
|
871
871
|
* @returns The JSON definition or null.
|
|
872
872
|
*/
|
|
873
|
-
private
|
|
873
|
+
private stringToFieldJson;
|
|
874
874
|
/**
|
|
875
875
|
* Move a named input to a different location on this block.
|
|
876
876
|
*
|
package/core/block_svg.d.ts
CHANGED
|
@@ -91,20 +91,13 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
91
91
|
private warningTextDb;
|
|
92
92
|
/** Block's mutator icon (if any). */
|
|
93
93
|
mutator: MutatorIcon | null;
|
|
94
|
-
private
|
|
94
|
+
private svgGroup;
|
|
95
95
|
style: BlockStyle;
|
|
96
96
|
/** @internal */
|
|
97
97
|
pathObject: IPathObject;
|
|
98
98
|
/** Is this block a BlockSVG? */
|
|
99
99
|
readonly rendered = true;
|
|
100
100
|
private visuallyDisabled;
|
|
101
|
-
/**
|
|
102
|
-
* Is this block currently rendering? Used to stop recursive render calls
|
|
103
|
-
* from actually triggering a re-render.
|
|
104
|
-
*/
|
|
105
|
-
private renderIsInProgress_;
|
|
106
|
-
/** Whether mousedown events have been bound yet. */
|
|
107
|
-
private eventsInit_;
|
|
108
101
|
workspace: WorkspaceSvg;
|
|
109
102
|
outputConnection: RenderedConnection;
|
|
110
103
|
nextConnection: RenderedConnection;
|
|
@@ -238,7 +231,7 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
238
231
|
* Makes sure that when the block is collapsed, it is rendered correctly
|
|
239
232
|
* for that state.
|
|
240
233
|
*/
|
|
241
|
-
private
|
|
234
|
+
private updateCollapsed;
|
|
242
235
|
/**
|
|
243
236
|
* Open the next (or previous) FieldTextInput.
|
|
244
237
|
*
|
|
@@ -251,7 +244,7 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
251
244
|
*
|
|
252
245
|
* @param e Pointer down event.
|
|
253
246
|
*/
|
|
254
|
-
private
|
|
247
|
+
private onMouseDown;
|
|
255
248
|
/**
|
|
256
249
|
* Load the block's help page in a new window.
|
|
257
250
|
*
|
|
@@ -42,6 +42,7 @@ export declare class TextInputBubble extends Bubble {
|
|
|
42
42
|
private readonly DEFAULT_SIZE;
|
|
43
43
|
/** The minimum size of this bubble, including borders. */
|
|
44
44
|
private readonly MIN_SIZE;
|
|
45
|
+
private editable;
|
|
45
46
|
/**
|
|
46
47
|
* @param workspace The workspace this bubble belongs to.
|
|
47
48
|
* @param anchor The anchor location of the thing this bubble is attached to.
|
|
@@ -54,6 +55,10 @@ export declare class TextInputBubble extends Bubble {
|
|
|
54
55
|
getText(): string;
|
|
55
56
|
/** Sets the text of this bubble. Calls change listeners. */
|
|
56
57
|
setText(text: string): void;
|
|
58
|
+
/** Sets whether or not the text in the bubble is editable. */
|
|
59
|
+
setEditable(editable: boolean): void;
|
|
60
|
+
/** Returns whether or not the text in the bubble is editable. */
|
|
61
|
+
isEditable(): boolean;
|
|
57
62
|
/** Adds a change listener to be notified when this bubble's text changes. */
|
|
58
63
|
addTextChangeListener(listener: () => void): void;
|
|
59
64
|
/** Adds a change listener to be notified when this bubble's size changes. */
|
|
@@ -18,7 +18,7 @@ declare class Capability<_T> {
|
|
|
18
18
|
static DRAG_TARGET: Capability<IDragTarget>;
|
|
19
19
|
static DELETE_AREA: Capability<IDeleteArea>;
|
|
20
20
|
static AUTOHIDEABLE: Capability<IAutoHideable>;
|
|
21
|
-
private readonly
|
|
21
|
+
private readonly name;
|
|
22
22
|
/** @param name The name of the component capability. */
|
|
23
23
|
constructor(name: string);
|
|
24
24
|
/**
|
package/core/connection.d.ts
CHANGED
|
@@ -102,11 +102,11 @@ export declare class Connection implements IASTNodeLocationWithBlock {
|
|
|
102
102
|
* Called when an attempted connection fails. NOP by default (i.e. for
|
|
103
103
|
* headless workspaces).
|
|
104
104
|
*
|
|
105
|
-
* @param
|
|
106
|
-
* to.
|
|
105
|
+
* @param _superiorConnection Connection that this connection failed to connect
|
|
106
|
+
* to. The provided connection should be the superior connection.
|
|
107
107
|
* @internal
|
|
108
108
|
*/
|
|
109
|
-
onFailedConnect(
|
|
109
|
+
onFailedConnect(_superiorConnection: Connection): void;
|
|
110
110
|
/**
|
|
111
111
|
* Connect this connection to another connection.
|
|
112
112
|
*
|
|
@@ -19,7 +19,7 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
19
19
|
export declare class ContextMenuRegistry {
|
|
20
20
|
static registry: ContextMenuRegistry;
|
|
21
21
|
/** Registry of all registered RegistryItems, keyed by ID. */
|
|
22
|
-
private
|
|
22
|
+
private registeredItems;
|
|
23
23
|
/** Resets the existing singleton instance of ContextMenuRegistry. */
|
|
24
24
|
constructor();
|
|
25
25
|
/** Clear and recreate the registry. */
|
|
@@ -96,6 +96,8 @@ export declare class BlockDragStrategy implements IDragStrategy {
|
|
|
96
96
|
* connections.
|
|
97
97
|
*/
|
|
98
98
|
endDrag(e?: PointerEvent): void;
|
|
99
|
+
/** Disposes of any state at the end of the drag. */
|
|
100
|
+
private disposeStep;
|
|
99
101
|
/** Connects the given candidate connections. */
|
|
100
102
|
private applyConnections;
|
|
101
103
|
/**
|
package/core/field.d.ts
CHANGED
|
@@ -74,18 +74,18 @@ export declare abstract class Field<T = any> implements IASTNodeLocationSvg, IAS
|
|
|
74
74
|
* Used to cache the field's tooltip value if setTooltip is called when the
|
|
75
75
|
* field is not yet initialized. Is *not* guaranteed to be accurate.
|
|
76
76
|
*/
|
|
77
|
-
private
|
|
77
|
+
private tooltip;
|
|
78
78
|
protected size_: Size;
|
|
79
79
|
/**
|
|
80
80
|
* Holds the cursors svg element when the cursor is attached to the field.
|
|
81
81
|
* This is null if there is no cursor on the field.
|
|
82
82
|
*/
|
|
83
|
-
private
|
|
83
|
+
private cursorSvg;
|
|
84
84
|
/**
|
|
85
85
|
* Holds the markers svg element when the marker is attached to the field.
|
|
86
86
|
* This is null if there is no marker on the field.
|
|
87
87
|
*/
|
|
88
|
-
private
|
|
88
|
+
private markerSvg;
|
|
89
89
|
/** The rendered field's SVG group element. */
|
|
90
90
|
protected fieldGroup_: SVGGElement | null;
|
|
91
91
|
/** The rendered field's SVG border element. */
|
|
@@ -95,7 +95,7 @@ export declare abstract class Field<T = any> implements IASTNodeLocationSvg, IAS
|
|
|
95
95
|
/** The rendered field's text content element. */
|
|
96
96
|
protected textContent_: Text | null;
|
|
97
97
|
/** Mouse down event listener data. */
|
|
98
|
-
private
|
|
98
|
+
private mouseDownWrapper;
|
|
99
99
|
/** Constants associated with the source block's renderer. */
|
|
100
100
|
protected constants_: ConstantProvider | null;
|
|
101
101
|
/**
|
|
@@ -564,7 +564,7 @@ export declare abstract class Field<T = any> implements IASTNodeLocationSvg, IAS
|
|
|
564
564
|
* @param fireChangeEvent Whether to fire a change event if the value changes.
|
|
565
565
|
* @returns New value, or an Error object.
|
|
566
566
|
*/
|
|
567
|
-
private
|
|
567
|
+
private processValidation;
|
|
568
568
|
/**
|
|
569
569
|
* Get the current value of the field.
|
|
570
570
|
*
|
package/core/field_checkbox.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ export declare class FieldCheckbox extends Field<CheckboxBool> {
|
|
|
117
117
|
* @param value The value to convert.
|
|
118
118
|
* @returns The converted value.
|
|
119
119
|
*/
|
|
120
|
-
private
|
|
120
|
+
private convertValueToBool;
|
|
121
121
|
/**
|
|
122
122
|
* Construct a FieldCheckbox from a JSON arg object.
|
|
123
123
|
*
|
package/core/field_dropdown.d.ts
CHANGED
|
@@ -54,6 +54,13 @@ export declare class FieldDropdown extends Field<string> {
|
|
|
54
54
|
suffixField: string | null;
|
|
55
55
|
private selectedOption;
|
|
56
56
|
clickTarget_: SVGElement | null;
|
|
57
|
+
/**
|
|
58
|
+
* The y offset from the top of the field to the top of the image, if an image
|
|
59
|
+
* is selected.
|
|
60
|
+
*/
|
|
61
|
+
protected static IMAGE_Y_OFFSET: number;
|
|
62
|
+
/** The total vertical padding above and below an image. */
|
|
63
|
+
protected static IMAGE_Y_PADDING: number;
|
|
57
64
|
/**
|
|
58
65
|
* @param menuGenerator A non-empty array of options for a dropdown list, or a
|
|
59
66
|
* function which generates these options. Also accepts Field.SKIP_SETUP
|
|
@@ -196,6 +203,33 @@ export declare class FieldDropdown extends Field<string> {
|
|
|
196
203
|
* @internal
|
|
197
204
|
*/
|
|
198
205
|
static fromJson(options: FieldDropdownFromJsonConfig): FieldDropdown;
|
|
206
|
+
/**
|
|
207
|
+
* Factor out common words in statically defined options.
|
|
208
|
+
* Create prefix and/or suffix labels.
|
|
209
|
+
*/
|
|
210
|
+
protected trimOptions(options: MenuOption[]): {
|
|
211
|
+
options: MenuOption[];
|
|
212
|
+
prefix?: string;
|
|
213
|
+
suffix?: string;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Use the calculated prefix and suffix lengths to trim all of the options in
|
|
217
|
+
* the given array.
|
|
218
|
+
*
|
|
219
|
+
* @param options Array of option tuples:
|
|
220
|
+
* (human-readable text or image, language-neutral name).
|
|
221
|
+
* @param prefixLength The length of the common prefix.
|
|
222
|
+
* @param suffixLength The length of the common suffix
|
|
223
|
+
* @returns A new array with all of the option text trimmed.
|
|
224
|
+
*/
|
|
225
|
+
private applyTrim;
|
|
226
|
+
/**
|
|
227
|
+
* Validates the data structure to be processed as an options list.
|
|
228
|
+
*
|
|
229
|
+
* @param options The proposed dropdown options.
|
|
230
|
+
* @throws {TypeError} If proposed options are incorrectly structured.
|
|
231
|
+
*/
|
|
232
|
+
protected validateOptions(options: MenuOption[]): void;
|
|
199
233
|
}
|
|
200
234
|
/**
|
|
201
235
|
* Definition of a human-readable image dropdown option.
|
package/core/field_input.d.ts
CHANGED
|
@@ -47,9 +47,9 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
47
47
|
*/
|
|
48
48
|
protected valueWhenEditorWasOpened_: string | T | null;
|
|
49
49
|
/** Key down event data. */
|
|
50
|
-
private
|
|
50
|
+
private onKeyDownWrapper;
|
|
51
51
|
/** Key input event data. */
|
|
52
|
-
private
|
|
52
|
+
private onKeyInputWrapper;
|
|
53
53
|
/**
|
|
54
54
|
* Whether the field should consider the whole parent block to be its click
|
|
55
55
|
* target.
|
|
@@ -150,13 +150,13 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
150
150
|
* Mobile browsers may have issues with in-line textareas (focus and
|
|
151
151
|
* keyboards).
|
|
152
152
|
*/
|
|
153
|
-
private
|
|
153
|
+
private showPromptEditor;
|
|
154
154
|
/**
|
|
155
155
|
* Create and show a text input editor that sits directly over the text input.
|
|
156
156
|
*
|
|
157
157
|
* @param quietInput True if editor should be created without focus.
|
|
158
158
|
*/
|
|
159
|
-
private
|
|
159
|
+
private showInlineEditor;
|
|
160
160
|
/**
|
|
161
161
|
* Create the text input editor widget.
|
|
162
162
|
*
|
|
@@ -193,7 +193,7 @@ export declare abstract class FieldInput<T extends InputTypes> extends Field<str
|
|
|
193
193
|
*
|
|
194
194
|
* @param _e Keyboard event.
|
|
195
195
|
*/
|
|
196
|
-
private
|
|
196
|
+
private onHtmlInputChange;
|
|
197
197
|
/**
|
|
198
198
|
* Set the HTML input value and the field's internal value. The difference
|
|
199
199
|
* between this and `setValue` is that this also updates the HTML input
|
package/core/flyout_base.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
|
|
|
150
150
|
/**
|
|
151
151
|
* Whether the flyout is visible.
|
|
152
152
|
*/
|
|
153
|
-
private
|
|
153
|
+
private visible;
|
|
154
154
|
/**
|
|
155
155
|
* Whether the workspace containing this flyout is visible.
|
|
156
156
|
*/
|
|
@@ -29,7 +29,7 @@ export declare class FlyoutMetricsManager extends MetricsManager {
|
|
|
29
29
|
*
|
|
30
30
|
* @returns The bounding box of the blocks on the workspace.
|
|
31
31
|
*/
|
|
32
|
-
private
|
|
32
|
+
private getBoundingBox;
|
|
33
33
|
getContentMetrics(opt_getWorkspaceCoordinates?: boolean): {
|
|
34
34
|
height: number;
|
|
35
35
|
width: number;
|
package/core/generator.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import type { Workspace } from './workspace.js';
|
|
|
19
19
|
* @deprecated
|
|
20
20
|
* @see {@link https://developers.google.com/blockly/guides/create-custom-blocks/generating-code}
|
|
21
21
|
* @param block The Block instance to generate code for.
|
|
22
|
-
* @param
|
|
22
|
+
* @param generator The CodeGenerator calling the function.
|
|
23
23
|
* @returns A string containing the generated code (for statement blocks),
|
|
24
24
|
* or a [code, precedence] tuple (for value/expression blocks), or
|
|
25
25
|
* null if no code should be emitted for block.
|
package/core/gesture.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export declare class Gesture {
|
|
|
101
101
|
/** The event that most recently updated this gesture. */
|
|
102
102
|
private mostRecentEvent;
|
|
103
103
|
/** Boolean for whether or not this gesture is a multi-touch gesture. */
|
|
104
|
-
private
|
|
104
|
+
private multiTouch;
|
|
105
105
|
/** A map of cached points used for tracking multi-touch gestures. */
|
|
106
106
|
private cachedPoints;
|
|
107
107
|
/**
|
|
@@ -22,10 +22,8 @@ export declare class CommentIcon extends Icon implements IHasBubble, ISerializab
|
|
|
22
22
|
* weight values are rendered farther toward the end of the block.
|
|
23
23
|
*/
|
|
24
24
|
static readonly WEIGHT = 3;
|
|
25
|
-
/** The bubble used to show
|
|
25
|
+
/** The bubble used to show comment text to the user. */
|
|
26
26
|
private textInputBubble;
|
|
27
|
-
/** The bubble used to show non-editable text to the user. */
|
|
28
|
-
private textBubble;
|
|
29
27
|
/** The text of this comment. */
|
|
30
28
|
private text;
|
|
31
29
|
/** The size of this comment (which is applied to the editable bubble). */
|
|
@@ -90,6 +88,7 @@ export declare class CommentIcon extends Icon implements IHasBubble, ISerializab
|
|
|
90
88
|
private showEditableBubble;
|
|
91
89
|
/** Shows the non editable text bubble for this comment. */
|
|
92
90
|
private showNonEditableBubble;
|
|
91
|
+
protected createBubble(): void;
|
|
93
92
|
/** Hides any open bubbles owned by this comment. */
|
|
94
93
|
private hideBubble;
|
|
95
94
|
/**
|
package/core/marker_manager.d.ts
CHANGED
|
@@ -19,13 +19,13 @@ export declare class MarkerManager {
|
|
|
19
19
|
/** The name of the local marker. */
|
|
20
20
|
static readonly LOCAL_MARKER = "local_marker_1";
|
|
21
21
|
/** The cursor. */
|
|
22
|
-
private
|
|
22
|
+
private cursor;
|
|
23
23
|
/** The cursor's SVG element. */
|
|
24
|
-
private
|
|
24
|
+
private cursorSvg;
|
|
25
25
|
/** The map of markers for the workspace. */
|
|
26
26
|
private markers;
|
|
27
27
|
/** The marker's SVG element. */
|
|
28
|
-
private
|
|
28
|
+
private markerSvg;
|
|
29
29
|
/**
|
|
30
30
|
* @param workspace The workspace for the marker manager.
|
|
31
31
|
* @internal
|
package/core/options.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export declare class Options {
|
|
|
87
87
|
* @param hasCategories Whether the workspace has categories or not.
|
|
88
88
|
* @returns Normalized move options.
|
|
89
89
|
*/
|
|
90
|
-
private static
|
|
90
|
+
private static parseMoveOptions;
|
|
91
91
|
/**
|
|
92
92
|
* Parse the user-specified zoom options, using reasonable defaults where
|
|
93
93
|
* behaviour is unspecified. See zoom documentation:
|
|
@@ -96,7 +96,7 @@ export declare class Options {
|
|
|
96
96
|
* @param options Dictionary of options.
|
|
97
97
|
* @returns Normalized zoom options.
|
|
98
98
|
*/
|
|
99
|
-
private static
|
|
99
|
+
private static parseZoomOptions;
|
|
100
100
|
/**
|
|
101
101
|
* Parse the user-specified grid options, using reasonable defaults where
|
|
102
102
|
* behaviour is unspecified. See grid documentation:
|
|
@@ -105,7 +105,7 @@ export declare class Options {
|
|
|
105
105
|
* @param options Dictionary of options.
|
|
106
106
|
* @returns Normalized grid options.
|
|
107
107
|
*/
|
|
108
|
-
private static
|
|
108
|
+
private static parseGridOptions;
|
|
109
109
|
/**
|
|
110
110
|
* Parse the user-specified theme options, using the classic theme as a
|
|
111
111
|
* default. https://developers.google.com/blockly/guides/configure/web/themes
|
|
@@ -113,7 +113,7 @@ export declare class Options {
|
|
|
113
113
|
* @param options Dictionary of options.
|
|
114
114
|
* @returns A Blockly Theme.
|
|
115
115
|
*/
|
|
116
|
-
private static
|
|
116
|
+
private static parseThemeOptions;
|
|
117
117
|
}
|
|
118
118
|
export declare namespace Options {
|
|
119
119
|
interface GridOptions {
|
|
@@ -60,10 +60,15 @@ export declare class RenderedConnection extends Connection {
|
|
|
60
60
|
* Move the block(s) belonging to the connection to a point where they don't
|
|
61
61
|
* visually interfere with the specified connection.
|
|
62
62
|
*
|
|
63
|
-
* @param
|
|
63
|
+
* @param superiorConnection The connection to move away from. The provided
|
|
64
|
+
* connection should be the superior connection and should not be
|
|
65
|
+
* connected to this connection.
|
|
66
|
+
* @param initiatedByThis Whether or not the block group that was manipulated
|
|
67
|
+
* recently causing bump checks is associated with the inferior
|
|
68
|
+
* connection. Defaults to false.
|
|
64
69
|
* @internal
|
|
65
70
|
*/
|
|
66
|
-
bumpAwayFrom(
|
|
71
|
+
bumpAwayFrom(superiorConnection: RenderedConnection, initiatedByThis?: boolean): void;
|
|
67
72
|
/**
|
|
68
73
|
* Change the connection's coordinates.
|
|
69
74
|
*
|
|
@@ -162,11 +167,11 @@ export declare class RenderedConnection extends Connection {
|
|
|
162
167
|
* Bumps this connection away from the other connection. Called when an
|
|
163
168
|
* attempted connection fails.
|
|
164
169
|
*
|
|
165
|
-
* @param
|
|
166
|
-
* to.
|
|
170
|
+
* @param superiorConnection Connection that this connection failed to connect
|
|
171
|
+
* to. The provided connection should be the superior connection.
|
|
167
172
|
* @internal
|
|
168
173
|
*/
|
|
169
|
-
onFailedConnect(
|
|
174
|
+
onFailedConnect(superiorConnection: Connection): void;
|
|
170
175
|
/**
|
|
171
176
|
* Disconnect two blocks that are connected by this connection.
|
|
172
177
|
*
|
package/core/scrollbar_pair.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class ScrollbarPair {
|
|
|
15
15
|
vScroll: Scrollbar | null;
|
|
16
16
|
corner_: SVGRectElement | null;
|
|
17
17
|
/** Previously recorded metrics from the workspace. */
|
|
18
|
-
private
|
|
18
|
+
private oldHostMetrics;
|
|
19
19
|
/**
|
|
20
20
|
* @param workspace Workspace to bind the scrollbars to.
|
|
21
21
|
* @param addHorizontal Whether to add a horizontal scrollbar.
|