blockly 11.2.0-beta.1 → 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 +164 -163
- package/blockly_compressed.js +158 -158
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +6 -5
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +19 -19
- package/core/block_svg.d.ts +3 -10
- package/core/component_manager.d.ts +1 -1
- 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_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/marker_manager.d.ts +3 -3
- package/core/options.d.ts +4 -4
- package/core/scrollbar_pair.d.ts +1 -1
- package/core/shortcut_registry.d.ts +2 -2
- 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/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 +7 -7
- package/package.json +7 -6
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
|
*
|
|
@@ -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
|
/**
|
|
@@ -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_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
|
/**
|
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 {
|
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.
|
|
@@ -154,14 +154,14 @@ export declare class ShortcutRegistry {
|
|
|
154
154
|
* @param e A key down event.
|
|
155
155
|
* @returns The serialized key code for the given event.
|
|
156
156
|
*/
|
|
157
|
-
private
|
|
157
|
+
private serializeKeyEvent;
|
|
158
158
|
/**
|
|
159
159
|
* Checks whether any of the given modifiers are not valid.
|
|
160
160
|
*
|
|
161
161
|
* @param modifiers List of modifiers to be used with the key.
|
|
162
162
|
* @throws {Error} if the modifier is not in the valid modifiers list.
|
|
163
163
|
*/
|
|
164
|
-
private
|
|
164
|
+
private checkModifiers;
|
|
165
165
|
/**
|
|
166
166
|
* Creates the serialized key code that will be used in the key map.
|
|
167
167
|
*
|
package/core/theme_manager.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class ThemeManager {
|
|
|
19
19
|
private readonly workspace;
|
|
20
20
|
private theme;
|
|
21
21
|
/** A list of workspaces that are subscribed to this theme. */
|
|
22
|
-
private
|
|
22
|
+
private subscribedWorkspaces;
|
|
23
23
|
private componentDB;
|
|
24
24
|
/**
|
|
25
25
|
* @param workspace The main workspace.
|
|
@@ -143,7 +143,7 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
143
143
|
* @param styleName Name of the style.
|
|
144
144
|
* @returns The hex colour for the category.
|
|
145
145
|
*/
|
|
146
|
-
private
|
|
146
|
+
private getColourfromStyle;
|
|
147
147
|
/**
|
|
148
148
|
* Gets the HTML element that is clickable.
|
|
149
149
|
* The parent toolbox element receives clicks. The parent toolbox will add an
|
|
@@ -160,7 +160,7 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
160
160
|
* reference string pointing to one of those two values.
|
|
161
161
|
* @returns The hex colour for the category.
|
|
162
162
|
*/
|
|
163
|
-
private
|
|
163
|
+
private parseColour;
|
|
164
164
|
/**
|
|
165
165
|
* Adds appropriate classes to display an open icon.
|
|
166
166
|
*
|
|
@@ -40,7 +40,7 @@ export declare class CollapsibleToolboxCategory extends ToolboxCategory implemen
|
|
|
40
40
|
*
|
|
41
41
|
* @param itemDef The information needed to create a toolbox item.
|
|
42
42
|
*/
|
|
43
|
-
private
|
|
43
|
+
private createToolboxItem;
|
|
44
44
|
init(): void;
|
|
45
45
|
createDom_(): HTMLDivElement;
|
|
46
46
|
createIconDom_(): HTMLSpanElement;
|
|
@@ -15,7 +15,7 @@ export declare class ToolboxSeparator extends ToolboxItem {
|
|
|
15
15
|
static registrationName: string;
|
|
16
16
|
/** All the CSS class names that are used to create a separator. */
|
|
17
17
|
protected cssConfig_: CssConfig;
|
|
18
|
-
private
|
|
18
|
+
private htmlDiv;
|
|
19
19
|
/**
|
|
20
20
|
* @param separatorDef The information needed to create a separator.
|
|
21
21
|
* @param toolbox The parent toolbox for the separator.
|
|
@@ -29,7 +29,7 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
29
29
|
*/
|
|
30
30
|
id: string;
|
|
31
31
|
protected toolboxDef_: toolbox.ToolboxInfo;
|
|
32
|
-
private readonly
|
|
32
|
+
private readonly horizontalLayout;
|
|
33
33
|
/** The HTML container for the toolbox. */
|
|
34
34
|
HtmlDiv: HTMLDivElement | null;
|
|
35
35
|
/** The HTML container for the contents of a toolbox. */
|
|
@@ -44,7 +44,7 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
44
44
|
protected height_: number;
|
|
45
45
|
RTL: boolean;
|
|
46
46
|
/** The flyout for the toolbox. */
|
|
47
|
-
private
|
|
47
|
+
private flyout;
|
|
48
48
|
protected contentMap_: {
|
|
49
49
|
[key: string]: IToolboxItem;
|
|
50
50
|
};
|
|
@@ -140,7 +140,7 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
140
140
|
* the toolbox.
|
|
141
141
|
* @param fragment The document fragment to add the child toolbox elements to.
|
|
142
142
|
*/
|
|
143
|
-
private
|
|
143
|
+
private createToolboxItem;
|
|
144
144
|
/**
|
|
145
145
|
* Adds an item to the toolbox.
|
|
146
146
|
*
|
|
@@ -364,32 +364,32 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
364
364
|
* @param oldItem The previously selected toolbox item.
|
|
365
365
|
* @param newItem The newly selected toolbox item.
|
|
366
366
|
*/
|
|
367
|
-
private
|
|
367
|
+
private fireSelectEvent;
|
|
368
368
|
/**
|
|
369
369
|
* Closes the current item if it is expanded, or selects the parent.
|
|
370
370
|
*
|
|
371
371
|
* @returns True if a parent category was selected, false otherwise.
|
|
372
372
|
*/
|
|
373
|
-
private
|
|
373
|
+
private selectParent;
|
|
374
374
|
/**
|
|
375
375
|
* Selects the first child of the currently selected item, or nothing if the
|
|
376
376
|
* toolbox item has no children.
|
|
377
377
|
*
|
|
378
378
|
* @returns True if a child category was selected, false otherwise.
|
|
379
379
|
*/
|
|
380
|
-
private
|
|
380
|
+
private selectChild;
|
|
381
381
|
/**
|
|
382
382
|
* Selects the next visible toolbox item.
|
|
383
383
|
*
|
|
384
384
|
* @returns True if a next category was selected, false otherwise.
|
|
385
385
|
*/
|
|
386
|
-
private
|
|
386
|
+
private selectNext;
|
|
387
387
|
/**
|
|
388
388
|
* Selects the previous visible toolbox item.
|
|
389
389
|
*
|
|
390
390
|
* @returns True if a previous category was selected, false otherwise.
|
|
391
391
|
*/
|
|
392
|
-
private
|
|
392
|
+
private selectPrevious;
|
|
393
393
|
/** Disposes of this toolbox. */
|
|
394
394
|
dispose(): void;
|
|
395
395
|
}
|
package/core/variable_map.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare class VariableMap {
|
|
|
54
54
|
* @param newName New variable name.
|
|
55
55
|
* @param blocks The list of all blocks in the workspace.
|
|
56
56
|
*/
|
|
57
|
-
private
|
|
57
|
+
private renameVariableAndUses;
|
|
58
58
|
/**
|
|
59
59
|
* Update the name of the given variable to the same name as an existing
|
|
60
60
|
* variable. The two variables are coalesced into a single variable with the
|
|
@@ -66,7 +66,7 @@ export declare class VariableMap {
|
|
|
66
66
|
* @param conflictVar The variable that was already using newName.
|
|
67
67
|
* @param blocks The list of all blocks in the workspace.
|
|
68
68
|
*/
|
|
69
|
-
private
|
|
69
|
+
private renameVariableWithConflict;
|
|
70
70
|
/**
|
|
71
71
|
* Create a variable with a given name, optional type, and optional ID.
|
|
72
72
|
*
|
package/core/variable_model.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class VariableModel {
|
|
|
20
20
|
workspace: Workspace;
|
|
21
21
|
name: string;
|
|
22
22
|
type: string;
|
|
23
|
-
private readonly
|
|
23
|
+
private readonly id;
|
|
24
24
|
/**
|
|
25
25
|
* @param workspace The variable's workspace.
|
|
26
26
|
* @param name The name of the variable. This is the user-visible name (e.g.
|
package/core/workspace.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
107
107
|
* @returns The comparison value. This tells Array.sort() how to change object
|
|
108
108
|
* a's index.
|
|
109
109
|
*/
|
|
110
|
-
private
|
|
110
|
+
private sortObjects;
|
|
111
111
|
/**
|
|
112
112
|
* Adds a block to the list of top blocks.
|
|
113
113
|
*
|
|
@@ -12,8 +12,8 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class WorkspaceDragger {
|
|
14
14
|
private workspace;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly
|
|
15
|
+
private readonly horizontalScrollEnabled;
|
|
16
|
+
private readonly verticalScrollEnabled;
|
|
17
17
|
protected startScrollXY_: Coordinate;
|
|
18
18
|
/** @param workspace The workspace to drag. */
|
|
19
19
|
constructor(workspace: WorkspaceSvg);
|