blockly 11.2.1 → 11.2.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 +83 -83
- package/blockly_compressed.js +67 -67
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +1 -1
- package/blocks_compressed.js.map +1 -1
- package/core/block_svg.d.ts +8 -2
- package/core/bubbles/text_bubble.d.ts +5 -5
- package/core/menu.d.ts +18 -17
- package/dart_compressed.js +1 -1
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +15 -15
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +1 -1
- package/lua_compressed.js.map +1 -1
- package/package.json +2 -2
- package/php_compressed.js +1 -1
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +3 -3
- package/python_compressed.js.map +1 -1
package/core/block_svg.d.ts
CHANGED
|
@@ -132,13 +132,13 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
132
132
|
*
|
|
133
133
|
* @returns #RRGGBB string.
|
|
134
134
|
*/
|
|
135
|
-
getColourSecondary(): string
|
|
135
|
+
getColourSecondary(): string;
|
|
136
136
|
/**
|
|
137
137
|
* Get the tertiary colour of a block.
|
|
138
138
|
*
|
|
139
139
|
* @returns #RRGGBB string.
|
|
140
140
|
*/
|
|
141
|
-
getColourTertiary(): string
|
|
141
|
+
getColourTertiary(): string;
|
|
142
142
|
/** Selects this block. Highlights the block visually. */
|
|
143
143
|
select(): void;
|
|
144
144
|
/** Unselects this block. Unhighlights the block visually. */
|
|
@@ -453,6 +453,12 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
453
453
|
* @throws {Error} if the block style does not exist.
|
|
454
454
|
*/
|
|
455
455
|
setStyle(blockStyleName: string): void;
|
|
456
|
+
/**
|
|
457
|
+
* Returns the BlockStyle object used to style this block.
|
|
458
|
+
*
|
|
459
|
+
* @returns This block's style object.
|
|
460
|
+
*/
|
|
461
|
+
getStyle(): BlockStyle;
|
|
456
462
|
/**
|
|
457
463
|
* Move this block to the front of the visible workspace.
|
|
458
464
|
* <g> tags do not respect z-index so SVG renders them in the
|
|
@@ -26,12 +26,12 @@ export declare class TextBubble extends Bubble {
|
|
|
26
26
|
* broken up by newlines.
|
|
27
27
|
*/
|
|
28
28
|
private stringToSvg;
|
|
29
|
-
/** Creates the paragraph container for this bubble's view's
|
|
29
|
+
/** Creates the paragraph container for this bubble's view's text fragments. */
|
|
30
30
|
private createParagraph;
|
|
31
|
-
/** Creates the
|
|
32
|
-
private
|
|
33
|
-
/** Right aligns the given
|
|
34
|
-
private
|
|
31
|
+
/** Creates the text fragments visualizing the text of this bubble. */
|
|
32
|
+
private createTextFragments;
|
|
33
|
+
/** Right aligns the given text fragments. */
|
|
34
|
+
private rightAlignTextFragments;
|
|
35
35
|
/** Updates the size of this bubble to account for the size of the text. */
|
|
36
36
|
private updateBubbleSize;
|
|
37
37
|
}
|
package/core/menu.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export declare class Menu {
|
|
|
18
18
|
*/
|
|
19
19
|
private readonly menuItems;
|
|
20
20
|
/**
|
|
21
|
-
* Coordinates of the
|
|
22
|
-
* prevent the consequent
|
|
21
|
+
* Coordinates of the pointerdown event that caused this menu to open. Used to
|
|
22
|
+
* prevent the consequent pointerup event due to a simple click from
|
|
23
23
|
* activating a menu item immediately.
|
|
24
24
|
*/
|
|
25
25
|
openingCoords: Coordinate | null;
|
|
@@ -28,14 +28,14 @@ export declare class Menu {
|
|
|
28
28
|
* A value of null means no menu item is highlighted.
|
|
29
29
|
*/
|
|
30
30
|
private highlightedItem;
|
|
31
|
-
/**
|
|
32
|
-
private
|
|
31
|
+
/** Pointer over event data. */
|
|
32
|
+
private pointerMoveHandler;
|
|
33
33
|
/** Click event data. */
|
|
34
34
|
private clickHandler;
|
|
35
|
-
/**
|
|
36
|
-
private
|
|
37
|
-
/**
|
|
38
|
-
private
|
|
35
|
+
/** Pointer enter event data. */
|
|
36
|
+
private pointerEnterHandler;
|
|
37
|
+
/** Pointer leave event data. */
|
|
38
|
+
private pointerLeaveHandler;
|
|
39
39
|
/** Key down event data. */
|
|
40
40
|
private onKeyDownHandler;
|
|
41
41
|
/** The menu's root DOM element. */
|
|
@@ -124,11 +124,12 @@ export declare class Menu {
|
|
|
124
124
|
*/
|
|
125
125
|
private highlightHelper;
|
|
126
126
|
/**
|
|
127
|
-
* Handles
|
|
127
|
+
* Handles pointermove events. Highlight menu items as the user hovers over
|
|
128
|
+
* them.
|
|
128
129
|
*
|
|
129
|
-
* @param e
|
|
130
|
+
* @param e Pointer event to handle.
|
|
130
131
|
*/
|
|
131
|
-
private
|
|
132
|
+
private handlePointerMove;
|
|
132
133
|
/**
|
|
133
134
|
* Handles click events. Pass the event onto the child menuitem to handle.
|
|
134
135
|
*
|
|
@@ -136,17 +137,17 @@ export declare class Menu {
|
|
|
136
137
|
*/
|
|
137
138
|
private handleClick;
|
|
138
139
|
/**
|
|
139
|
-
* Handles
|
|
140
|
+
* Handles pointer enter events. Focus the element.
|
|
140
141
|
*
|
|
141
|
-
* @param _e
|
|
142
|
+
* @param _e Pointer event to handle.
|
|
142
143
|
*/
|
|
143
|
-
private
|
|
144
|
+
private handlePointerEnter;
|
|
144
145
|
/**
|
|
145
|
-
* Handles
|
|
146
|
+
* Handles pointer leave events by clearing the active highlight.
|
|
146
147
|
*
|
|
147
|
-
* @param _e
|
|
148
|
+
* @param _e Pointer event to handle.
|
|
148
149
|
*/
|
|
149
|
-
private
|
|
150
|
+
private handlePointerLeave;
|
|
150
151
|
/**
|
|
151
152
|
* Attempts to handle a keyboard event, if the menu item is enabled, by
|
|
152
153
|
* calling
|
package/dart_compressed.js
CHANGED
|
@@ -79,7 +79,7 @@ List ${b.FUNCTION_NAME_PLACEHOLDER_}(List list, String type, int direction) {
|
|
|
79
79
|
}
|
|
80
80
|
`)+"("+c+', "'+a+'", '+d+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_split$$module$build$src$generators$dart$lists=function(a,b){let c=b.valueToCode(a,"INPUT",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX);b=b.valueToCode(a,"DELIM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"===a)c||(c="''"),a="split";else if("JOIN"===a)c||(c="[]"),a="join";else throw Error("Unknown mode: "+a);return[c+
|
|
81
81
|
"."+a+"("+b+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_reverse$$module$build$src$generators$dart$lists=function(a,b){return["new List.from("+(b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.NONE)||"[]")+".reversed)",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},controls_if$$module$build$src$generators$dart$logic=function(a,b){let c=0,d="",e,f;b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));do f=
|
|
82
|
-
b.valueToCode(a,"IF"+c,Order$$module$build$src$generators$dart$dart_generator.NONE)||"false",e=b.statementToCode(a,"DO"+c),b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=(0<c?"else ":"")+"if ("+f+") {\n"+e+"}",c++;while(a.getInput("IF"+c));if(a.getInput("ELSE")||b.STATEMENT_SUFFIX)e=b.statementToCode(a,"ELSE"),b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=" else {\n"+e+"}";return d+"\n"},logic_compare$$module$build$src$generators$dart$logic=
|
|
82
|
+
b.valueToCode(a,"IF"+c,Order$$module$build$src$generators$dart$dart_generator.NONE)||"false",e=b.statementToCode(a,"DO"+c),b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=(0<c?"else ":"")+"if ("+f+") {\n"+e+"}",c++;while(a.getInput("IF"+c));if(a.getInput("ELSE")||b.STATEMENT_SUFFIX)e=a.getInput("ELSE")?b.statementToCode(a,"ELSE"):"",b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=" else {\n"+e+"}";return d+"\n"},logic_compare$$module$build$src$generators$dart$logic=
|
|
83
83
|
function(a,b){const c={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d="=="===c||"!="===c?Order$$module$build$src$generators$dart$dart_generator.EQUALITY:Order$$module$build$src$generators$dart$dart_generator.RELATIONAL,e=b.valueToCode(a,"A",d)||"0";a=b.valueToCode(a,"B",d)||"0";return[e+" "+c+" "+a,d]},logic_operation$$module$build$src$generators$dart$logic=function(a,b){const c="AND"===a.getFieldValue("OP")?"&&":"||",d="&&"===c?Order$$module$build$src$generators$dart$dart_generator.LOGICAL_AND:
|
|
84
84
|
Order$$module$build$src$generators$dart$dart_generator.LOGICAL_OR;let e=b.valueToCode(a,"A",d);a=b.valueToCode(a,"B",d);e||a?(b="&&"===c?"true":"false",e||(e=b),a||(a=b)):a=e="false";return[e+" "+c+" "+a,d]},logic_negate$$module$build$src$generators$dart$logic=function(a,b){const c=Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX;return["!"+(b.valueToCode(a,"BOOL",c)||"true"),c]},logic_boolean$$module$build$src$generators$dart$logic=function(a,b){return["TRUE"===a.getFieldValue("BOOL")?
|
|
85
85
|
"true":"false",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},logic_null$$module$build$src$generators$dart$logic=function(a,b){return["null",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},logic_ternary$$module$build$src$generators$dart$logic=function(a,b){const c=b.valueToCode(a,"IF",Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL)||"false",d=b.valueToCode(a,"THEN",Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL)||"null";a=b.valueToCode(a,
|