blockly 9.0.1 → 9.1.0-beta.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.
Files changed (185) hide show
  1. package/README.md +2 -2
  2. package/blockly.js +1 -1
  3. package/blockly.min.js +332 -312
  4. package/blockly_compressed.js +311 -306
  5. package/blockly_compressed.js.map +1 -1
  6. package/blocks.js +1 -1
  7. package/blocks_compressed.js +1 -1
  8. package/blocks_compressed.js.map +1 -1
  9. package/browser.js +1 -1
  10. package/core/block_drag_surface.d.ts +15 -8
  11. package/core/block_svg.d.ts +10 -4
  12. package/core/blockly.d.ts +8 -20
  13. package/core/bubble.d.ts +32 -32
  14. package/core/comment.d.ts +15 -19
  15. package/core/field_angle.d.ts +15 -2
  16. package/core/field_dropdown.d.ts +19 -24
  17. package/core/field_variable.d.ts +3 -3
  18. package/core/generator.d.ts +4 -4
  19. package/core/interfaces/i_parameter_model.d.ts +8 -0
  20. package/core/interfaces/i_procedure_block.d.ts +13 -0
  21. package/core/interfaces/i_procedure_map.d.ts +16 -0
  22. package/core/menu.d.ts +19 -19
  23. package/core/menuitem.d.ts +8 -8
  24. package/core/mutator.d.ts +13 -13
  25. package/core/procedures/observable_parameter_model.d.ts +11 -0
  26. package/core/procedures/observable_procedure_map.d.ts +6 -1
  27. package/core/procedures/observable_procedure_model.d.ts +7 -3
  28. package/core/procedures/update_procedures.d.ts +13 -0
  29. package/core/procedures.d.ts +4 -0
  30. package/core/rendered_connection.d.ts +1 -1
  31. package/core/renderers/common/constants.d.ts +1 -6
  32. package/core/scrollbar.d.ts +68 -39
  33. package/core/serialization/blocks.d.ts +38 -0
  34. package/core/serialization/priorities.d.ts +4 -0
  35. package/core/serialization/procedures.d.ts +78 -0
  36. package/core/serialization/variables.d.ts +33 -0
  37. package/core/serialization.d.ts +2 -1
  38. package/core/theme.d.ts +5 -5
  39. package/core/warning.d.ts +4 -4
  40. package/core/workspace.d.ts +9 -5
  41. package/core/workspace_svg.d.ts +26 -26
  42. package/core/zoom_controls.d.ts +18 -18
  43. package/core-browser.js +1 -1
  44. package/core.js +1 -1
  45. package/dart.js +1 -1
  46. package/dart_compressed.js +2 -2
  47. package/dart_compressed.js.map +1 -1
  48. package/index.js +1 -1
  49. package/javascript.js +1 -1
  50. package/javascript_compressed.js +4 -5
  51. package/javascript_compressed.js.map +1 -1
  52. package/lua.js +1 -1
  53. package/lua_compressed.js +2 -3
  54. package/lua_compressed.js.map +1 -1
  55. package/msg/ab.js +1 -1
  56. package/msg/ace.js +1 -1
  57. package/msg/af.js +1 -1
  58. package/msg/am.js +1 -1
  59. package/msg/ar.js +1 -1
  60. package/msg/ast.js +1 -1
  61. package/msg/az.js +1 -1
  62. package/msg/ba.js +1 -1
  63. package/msg/bcc.js +1 -1
  64. package/msg/be-tarask.js +1 -1
  65. package/msg/be.js +1 -1
  66. package/msg/bg.js +1 -1
  67. package/msg/bn.js +1 -1
  68. package/msg/br.js +1 -1
  69. package/msg/bs.js +1 -1
  70. package/msg/ca.js +1 -1
  71. package/msg/cdo.js +1 -1
  72. package/msg/cs.js +1 -1
  73. package/msg/da.js +1 -1
  74. package/msg/de.js +1 -1
  75. package/msg/diq.js +1 -1
  76. package/msg/dty.js +1 -1
  77. package/msg/ee.js +1 -1
  78. package/msg/el.js +1 -1
  79. package/msg/en-gb.js +1 -1
  80. package/msg/en.js +1 -1
  81. package/msg/eo.js +1 -1
  82. package/msg/es.js +1 -1
  83. package/msg/et.js +1 -1
  84. package/msg/eu.js +1 -1
  85. package/msg/fa.js +1 -1
  86. package/msg/fi.js +1 -1
  87. package/msg/fo.js +1 -1
  88. package/msg/fr.js +1 -1
  89. package/msg/frr.js +1 -1
  90. package/msg/gl.js +1 -1
  91. package/msg/gn.js +1 -1
  92. package/msg/gor.js +1 -1
  93. package/msg/ha.js +1 -1
  94. package/msg/hak.js +1 -1
  95. package/msg/he.js +1 -1
  96. package/msg/hi.js +1 -1
  97. package/msg/hr.js +1 -1
  98. package/msg/hrx.js +1 -1
  99. package/msg/hu.js +1 -1
  100. package/msg/hy.js +1 -1
  101. package/msg/ia.js +1 -1
  102. package/msg/id.js +1 -1
  103. package/msg/ig.js +1 -1
  104. package/msg/inh.js +1 -1
  105. package/msg/is.js +1 -1
  106. package/msg/it.js +1 -1
  107. package/msg/ja.js +1 -1
  108. package/msg/ka.js +1 -1
  109. package/msg/kab.js +1 -1
  110. package/msg/kbd-cyrl.js +1 -1
  111. package/msg/km.js +1 -1
  112. package/msg/kn.js +1 -1
  113. package/msg/ko.js +1 -1
  114. package/msg/ksh.js +1 -1
  115. package/msg/ku-latn.js +1 -1
  116. package/msg/ky.js +1 -1
  117. package/msg/la.js +1 -1
  118. package/msg/lb.js +1 -1
  119. package/msg/lki.js +1 -1
  120. package/msg/lo.js +1 -1
  121. package/msg/lrc.js +1 -1
  122. package/msg/lt.js +1 -1
  123. package/msg/lv.js +1 -1
  124. package/msg/mg.js +1 -1
  125. package/msg/mk.js +1 -1
  126. package/msg/ml.js +1 -1
  127. package/msg/mnw.js +1 -1
  128. package/msg/ms.js +1 -1
  129. package/msg/my.js +1 -1
  130. package/msg/mzn.js +1 -1
  131. package/msg/nb.js +1 -1
  132. package/msg/ne.js +1 -1
  133. package/msg/nl.js +1 -1
  134. package/msg/oc.js +1 -1
  135. package/msg/olo.js +1 -1
  136. package/msg/pa.js +1 -1
  137. package/msg/pl.js +1 -1
  138. package/msg/pms.js +1 -1
  139. package/msg/ps.js +1 -1
  140. package/msg/pt-br.js +1 -1
  141. package/msg/pt.js +1 -1
  142. package/msg/ro.js +1 -1
  143. package/msg/ru.js +1 -1
  144. package/msg/sc.js +1 -1
  145. package/msg/sco.js +1 -1
  146. package/msg/sd.js +1 -1
  147. package/msg/shn.js +1 -1
  148. package/msg/si.js +1 -1
  149. package/msg/sk.js +1 -1
  150. package/msg/skr-arab.js +1 -1
  151. package/msg/sl.js +1 -1
  152. package/msg/smn.js +1 -1
  153. package/msg/sq.js +1 -1
  154. package/msg/sr-latn.js +1 -1
  155. package/msg/sr.js +1 -1
  156. package/msg/sv.js +1 -1
  157. package/msg/sw.js +1 -1
  158. package/msg/ta.js +1 -1
  159. package/msg/tcy.js +1 -1
  160. package/msg/tdd.js +1 -1
  161. package/msg/te.js +1 -1
  162. package/msg/th.js +1 -1
  163. package/msg/ti.js +1 -1
  164. package/msg/tl.js +1 -1
  165. package/msg/tlh.js +1 -1
  166. package/msg/tr.js +1 -1
  167. package/msg/ug-arab.js +1 -1
  168. package/msg/uk.js +1 -1
  169. package/msg/ur.js +1 -1
  170. package/msg/uz.js +1 -1
  171. package/msg/vi.js +1 -1
  172. package/msg/xmf.js +1 -1
  173. package/msg/yo.js +1 -1
  174. package/msg/yue.js +1 -1
  175. package/msg/zgh.js +1 -1
  176. package/msg/zh-hans.js +1 -1
  177. package/msg/zh-hant.js +1 -1
  178. package/node.js +1 -1
  179. package/package.json +13 -8
  180. package/php.js +1 -1
  181. package/php_compressed.js +2 -3
  182. package/php_compressed.js.map +1 -1
  183. package/python.js +1 -1
  184. package/python_compressed.js +2 -2
  185. package/python_compressed.js.map +1 -1
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
+ import type { ISerializer } from '../interfaces/i_serializer.js';
9
+ import { ObservableProcedureModel } from '../procedures/observable_procedure_model.js';
10
+ import { ObservableParameterModel } from '../procedures/observable_parameter_model.js';
11
+ import type { Workspace } from '../workspace.js';
12
+ /**
13
+ * Representation of a procedure data model.
14
+ */
15
+ export interface State {
16
+ id: string;
17
+ name: string;
18
+ returnTypes: string[] | null;
19
+ parameters?: ParameterState[];
20
+ }
21
+ /**
22
+ * Representation of a parameter data model.
23
+ */
24
+ export interface ParameterState {
25
+ id: string;
26
+ name: string;
27
+ types?: string[];
28
+ }
29
+ /**
30
+ * A newable signature for an IProcedureModel.
31
+ *
32
+ * Refer to
33
+ * https://www.typescriptlang.org/docs/handbook/2/generics.html#using-class-types-in-generics
34
+ * for what is going on with this.
35
+ */
36
+ declare type ProcedureModelConstructor<ProcedureModel extends IProcedureModel> = new (workspace: Workspace, name: string, id: string) => ProcedureModel;
37
+ /**
38
+ * A newable signature for an IParameterModel.
39
+ *
40
+ * Refer to
41
+ * https://www.typescriptlang.org/docs/handbook/2/generics.html#using-class-types-in-generics
42
+ * for what is going on with this.
43
+ */
44
+ declare type ParameterModelConstructor<ParameterModel extends IParameterModel> = new (workspace: Workspace, name: string, id: string) => ParameterModel;
45
+ /** Serializer for saving and loading procedure state. */
46
+ export declare class ProcedureSerializer<ProcedureModel extends IProcedureModel, ParameterModel extends IParameterModel> implements ISerializer {
47
+ private readonly procedureModelClass;
48
+ private readonly parameterModelClass;
49
+ priority: number;
50
+ /**
51
+ * Constructs the procedure serializer.
52
+ *
53
+ * Example usage:
54
+ * new ProcedureSerializer(MyProcedureModelClass, MyParameterModelClass)
55
+ *
56
+ * @param procedureModelClass The class (implementing IProcedureModel) that
57
+ * you want this serializer to deserialize.
58
+ * @param parameterModelClass The class (implementing IParameterModel) that
59
+ * you want this serializer to deserialize.
60
+ */
61
+ constructor(procedureModelClass: ProcedureModelConstructor<ProcedureModel>, parameterModelClass: ParameterModelConstructor<ParameterModel>);
62
+ /** Serializes the procedure models of the given workspace. */
63
+ save(workspace: Workspace): State[] | null;
64
+ /**
65
+ * Deserializes the procedures models defined by the given state into the
66
+ * workspace.
67
+ */
68
+ load(state: State[], workspace: Workspace): void;
69
+ /** Disposes of any procedure models that exist on the workspace. */
70
+ clear(workspace: Workspace): void;
71
+ }
72
+ /**
73
+ * A ProcedureSerializer that deserializes to create the built-in
74
+ * ObservableProcedureModels and ObservableParameterModels.
75
+ */
76
+ export declare const observableProcedureSerializer: ProcedureSerializer<ObservableProcedureModel, ObservableParameterModel>;
77
+ export {};
78
+ //# sourceMappingURL=procedures.d.ts.map
@@ -3,6 +3,8 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import type { ISerializer } from '../interfaces/i_serializer.js';
7
+ import type { Workspace } from '../workspace.js';
6
8
  /**
7
9
  * Represents the state of a given variable.
8
10
  *
@@ -13,4 +15,35 @@ export interface State {
13
15
  id: string;
14
16
  type: string | undefined;
15
17
  }
18
+ /**
19
+ * Serializer for saving and loading variable state.
20
+ *
21
+ * @alias Blockly.serialization.variables.VariableSerializer
22
+ */
23
+ export declare class VariableSerializer implements ISerializer {
24
+ priority: number;
25
+ constructor();
26
+ /**
27
+ * Serializes the variables of the given workspace.
28
+ *
29
+ * @param workspace The workspace to save the variables of.
30
+ * @returns The state of the workspace's variables, or null if there are no
31
+ * variables.
32
+ */
33
+ save(workspace: Workspace): State[] | null;
34
+ /**
35
+ * Deserializes the variable defined by the given state into the given
36
+ * workspace.
37
+ *
38
+ * @param state The state of the variables to deserialize.
39
+ * @param workspace The workspace to deserialize into.
40
+ */
41
+ load(state: State[], workspace: Workspace): void;
42
+ /**
43
+ * Disposes of any variables that exist on the workspace.
44
+ *
45
+ * @param workspace The workspace to clear the variables of.
46
+ */
47
+ clear(workspace: Workspace): void;
48
+ }
16
49
  //# sourceMappingURL=variables.d.ts.map
@@ -6,9 +6,10 @@
6
6
  import * as blocks from './serialization/blocks.js';
7
7
  import * as exceptions from './serialization/exceptions.js';
8
8
  import * as priorities from './serialization/priorities.js';
9
+ import * as procedures from './serialization/procedures.js';
9
10
  import * as registry from './serialization/registry.js';
10
11
  import * as variables from './serialization/variables.js';
11
12
  import * as workspaces from './serialization/workspaces.js';
12
13
  import { ISerializer } from './interfaces/i_serializer.js';
13
- export { blocks, exceptions, priorities, registry, variables, workspaces, ISerializer, };
14
+ export { blocks, exceptions, priorities, procedures, registry, variables, workspaces, ISerializer, };
14
15
  //# sourceMappingURL=serialization.d.ts.map
package/core/theme.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export interface ITheme {
7
7
  blockStyles?: {
8
- [key: string]: BlockStyle;
8
+ [key: string]: Partial<BlockStyle>;
9
9
  };
10
10
  categoryStyles?: {
11
11
  [key: string]: CategoryStyle;
@@ -51,7 +51,7 @@ export declare class Theme implements ITheme {
51
51
  * @param opt_componentStyles A map of Blockly component names to style value.
52
52
  */
53
53
  constructor(name: string, opt_blockStyles?: {
54
- [key: string]: BlockStyle;
54
+ [key: string]: Partial<BlockStyle>;
55
55
  }, opt_categoryStyles?: {
56
56
  [key: string]: CategoryStyle;
57
57
  }, opt_componentStyles?: ComponentStyle);
@@ -115,9 +115,9 @@ export declare class Theme implements ITheme {
115
115
  export declare namespace Theme {
116
116
  interface BlockStyle {
117
117
  colourPrimary: string;
118
- colourSecondary?: string;
119
- colourTertiary?: string;
120
- hat?: string;
118
+ colourSecondary: string;
119
+ colourTertiary: string;
120
+ hat: string;
121
121
  }
122
122
  interface CategoryStyle {
123
123
  colour: string;
package/core/warning.d.ts CHANGED
@@ -12,9 +12,9 @@ import { Icon } from './icon.js';
12
12
  * @alias Blockly.Warning
13
13
  */
14
14
  export declare class Warning extends Icon {
15
- private text_;
15
+ private text;
16
16
  /** The top-level node of the warning text, or null if not created. */
17
- private paragraphElement_;
17
+ private paragraphElement;
18
18
  /** Does this icon get hidden when the block is collapsed? */
19
19
  collapseHidden: boolean;
20
20
  /** @param block The block associated with this warning. */
@@ -32,9 +32,9 @@ export declare class Warning extends Icon {
32
32
  */
33
33
  setVisible(visible: boolean): void;
34
34
  /** Show the bubble. */
35
- private createBubble_;
35
+ private createBubble;
36
36
  /** Dispose of the bubble and references to it. */
37
- private disposeBubble_;
37
+ private disposeBubble;
38
38
  /**
39
39
  * Set this warning's text.
40
40
  *
@@ -14,6 +14,7 @@ import type * as toolbox from './utils/toolbox.js';
14
14
  import { VariableMap } from './variable_map.js';
15
15
  import type { VariableModel } from './variable_model.js';
16
16
  import type { WorkspaceComment } from './workspace_comment.js';
17
+ import { IProcedureMap } from './interfaces/i_procedure_map.js';
17
18
  /**
18
19
  * Class for a workspace. This is a data structure that contains blocks.
19
20
  * There is no UI, and can be created headlessly.
@@ -68,15 +69,16 @@ export declare class Workspace implements IASTNodeLocation {
68
69
  /** Set of databases for rapid lookup of connection locations. */
69
70
  connectionDBList: ConnectionDB[];
70
71
  connectionChecker: IConnectionChecker;
71
- private readonly topBlocks_;
72
- private readonly topComments_;
72
+ private readonly topBlocks;
73
+ private readonly topComments;
73
74
  private readonly commentDB;
74
- private readonly listeners_;
75
+ private readonly listeners;
75
76
  protected undoStack_: Abstract[];
76
77
  protected redoStack_: Abstract[];
77
78
  private readonly blockDB;
78
79
  private readonly typedBlocksDB;
79
- private variableMap_;
80
+ private variableMap;
81
+ private procedureMap;
80
82
  /**
81
83
  * Blocks in the flyout can refer to variables that don't exist in the main
82
84
  * workspace. For instance, the "get item in list" block refers to an
@@ -85,7 +87,7 @@ export declare class Workspace implements IASTNodeLocation {
85
87
  * these by tracking "potential" variables in the flyout. These variables
86
88
  * become real when references to them are dragged into the main workspace.
87
89
  */
88
- private potentialVariableMap_;
90
+ private potentialVariableMap;
89
91
  /** @param opt_options Dictionary of options. */
90
92
  constructor(opt_options?: Options);
91
93
  /**
@@ -419,6 +421,8 @@ export declare class Workspace implements IASTNodeLocation {
419
421
  * @internal
420
422
  */
421
423
  setVariableMap(variableMap: VariableMap): void;
424
+ /** Returns the map of all procedures on the workpace. */
425
+ getProcedureMap(): IProcedureMap;
422
426
  /**
423
427
  * Find the workspace with the specified ID.
424
428
  *
@@ -54,7 +54,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
54
54
  * A wrapper function called when a resize event occurs.
55
55
  * You can pass the result to `eventHandling.unbind`.
56
56
  */
57
- private resizeHandlerWrapper_;
57
+ private resizeHandlerWrapper;
58
58
  /**
59
59
  * The render status of an SVG workspace.
60
60
  * Returns `false` for headless workspaces and true for instances of
@@ -70,7 +70,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
70
70
  * Whether this workspace has resizes enabled.
71
71
  * Disable during batch operations for a performance improvement.
72
72
  */
73
- private resizesEnabled_;
73
+ private resizesEnabled;
74
74
  /**
75
75
  * Current horizontal scrolling offset in pixel units, relative to the
76
76
  * workspace origin.
@@ -138,15 +138,15 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
138
138
  /** Vertical scroll value when scrolling started in pixel units. */
139
139
  startScrollY: number;
140
140
  /** Distance from mouse to object being dragged. */
141
- private dragDeltaXY_;
141
+ private dragDeltaXY;
142
142
  /** Current scale. */
143
143
  scale: number;
144
144
  /** Cached scale value. Used to detect changes in viewport. */
145
- private oldScale_;
145
+ private oldScale;
146
146
  /** Cached viewport top value. Used to detect changes in viewport. */
147
- private oldTop_;
147
+ private oldTop;
148
148
  /** Cached viewport left value. Used to detect changes in viewport. */
149
- private oldLeft_;
149
+ private oldLeft;
150
150
  /** The workspace's trashcan (if any). */
151
151
  trashcan: Trashcan | null;
152
152
  /** This workspace's scrollbars, if they exist. */
@@ -154,7 +154,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
154
154
  /**
155
155
  * Fixed flyout providing blocks which may be dragged into this workspace.
156
156
  */
157
- private flyout_;
157
+ private flyout;
158
158
  /**
159
159
  * Category-based toolbox providing blocks which may be dragged into this
160
160
  * workspace.
@@ -167,32 +167,32 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
167
167
  */
168
168
  currentGesture_: TouchGesture | null;
169
169
  /** This workspace's surface for dragging blocks, if it exists. */
170
- private readonly blockDragSurface_;
170
+ private readonly blockDragSurface;
171
171
  /** This workspace's drag surface, if it exists. */
172
- private readonly workspaceDragSurface_;
172
+ private readonly workspaceDragSurface;
173
173
  /**
174
174
  * Whether to move workspace to the drag surface when it is dragged.
175
175
  * True if it should move, false if it should be translated directly.
176
176
  */
177
- private readonly useWorkspaceDragSurface_;
177
+ private readonly useWorkspaceDragSurface;
178
178
  /**
179
179
  * Whether the drag surface is actively in use. When true, calls to
180
180
  * translate will translate the drag surface instead of the translating the
181
181
  * workspace directly.
182
182
  * This is set to true in setupDragSurface and to false in resetDragSurface.
183
183
  */
184
- private isDragSurfaceActive_;
184
+ private isDragSurfaceActive;
185
185
  /**
186
186
  * The first parent div with 'injectionDiv' in the name, or null if not set.
187
187
  * Access this with getInjectionDiv.
188
188
  */
189
- private injectionDiv_;
189
+ private injectionDiv;
190
190
  /**
191
191
  * Last known position of the page scroll.
192
192
  * This is used to determine whether we have recalculated screen coordinate
193
193
  * stuff since the page scrolled.
194
194
  */
195
- private lastRecordedPageScroll_;
195
+ private lastRecordedPageScroll;
196
196
  /**
197
197
  * Developers may define this function to add custom menu options to the
198
198
  * workspace's context menu or edit the workspace-created set of menu
@@ -210,10 +210,10 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
210
210
  */
211
211
  targetWorkspace: WorkspaceSvg | null;
212
212
  /** Inverted screen CTM, for use in mouseToSvg. */
213
- private inverseScreenCTM_;
213
+ private inverseScreenCTM;
214
214
  /** Inverted screen CTM is dirty, recalculate it. */
215
- private inverseScreenCTMDirty_;
216
- private metricsManager_;
215
+ private inverseScreenCTMDirty;
216
+ private metricsManager;
217
217
  /** @internal */
218
218
  getMetrics: () => Metrics;
219
219
  /** @internal */
@@ -221,15 +221,15 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
221
221
  x?: number;
222
222
  y?: number;
223
223
  }) => void;
224
- private readonly componentManager_;
224
+ private readonly componentManager;
225
225
  /**
226
226
  * List of currently highlighted blocks. Block highlighting is often used
227
227
  * to visually mark blocks currently being executed.
228
228
  */
229
- private readonly highlightedBlocks_;
230
- private audioManager_;
231
- private grid_;
232
- private markerManager_;
229
+ private readonly highlightedBlocks;
230
+ private audioManager;
231
+ private grid;
232
+ private markerManager;
233
233
  /**
234
234
  * Map from function names to callbacks, for deciding what to do when a
235
235
  * custom toolbox category is opened.
@@ -241,16 +241,16 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
241
241
  */
242
242
  private flyoutButtonCallbacks;
243
243
  protected themeManager_: ThemeManager;
244
- private readonly renderer_;
244
+ private readonly renderer;
245
245
  /** Cached parent SVG. */
246
- private cachedParentSvg_;
246
+ private cachedParentSvg;
247
247
  /** True if keyboard accessibility mode is on, false otherwise. */
248
248
  keyboardAccessibilityMode: boolean;
249
249
  /** The list of top-level bounded elements on the workspace. */
250
- private topBoundedElements_;
250
+ private topBoundedElements;
251
251
  /** The recorded drag targets. */
252
- private dragTargetAreas_;
253
- private readonly cachedParentSvgSize_;
252
+ private dragTargetAreas;
253
+ private readonly cachedParentSvgSize;
254
254
  svgGroup_: SVGElement;
255
255
  svgBackground_: SVGElement;
256
256
  svgBlockCanvas_: SVGElement;
@@ -24,17 +24,17 @@ export declare class ZoomControls implements IPositionable {
24
24
  * A handle to use to unbind the mouse down event handler for zoom reset
25
25
  * button. Opaque data returned from browserEvents.conditionalBind.
26
26
  */
27
- private onZoomResetWrapper_;
27
+ private onZoomResetWrapper;
28
28
  /**
29
29
  * A handle to use to unbind the mouse down event handler for zoom in
30
30
  * button. Opaque data returned from browserEvents.conditionalBind.
31
31
  */
32
- private onZoomInWrapper_;
32
+ private onZoomInWrapper;
33
33
  /**
34
34
  * A handle to use to unbind the mouse down event handler for zoom out
35
35
  * button. Opaque data returned from browserEvents.conditionalBind.
36
36
  */
37
- private onZoomOutWrapper_;
37
+ private onZoomOutWrapper;
38
38
  /** The zoom in svg <g> element. */
39
39
  private zoomInGroup;
40
40
  /** The zoom out svg <g> element. */
@@ -42,27 +42,27 @@ export declare class ZoomControls implements IPositionable {
42
42
  /** The zoom reset svg <g> element. */
43
43
  private zoomResetGroup;
44
44
  /** Width of the zoom controls. */
45
- private readonly WIDTH_;
45
+ private readonly WIDTH;
46
46
  /** Height of each zoom control. */
47
- private readonly HEIGHT_;
47
+ private readonly HEIGHT;
48
48
  /** Small spacing used between the zoom in and out control, in pixels. */
49
- private readonly SMALL_SPACING_;
49
+ private readonly SMALL_SPACING;
50
50
  /**
51
51
  * Large spacing used between the zoom in and reset control, in pixels.
52
52
  */
53
- private readonly LARGE_SPACING_;
53
+ private readonly LARGE_SPACING;
54
54
  /** Distance between zoom controls and bottom or top edge of workspace. */
55
- private readonly MARGIN_VERTICAL_;
55
+ private readonly MARGIN_VERTICAL;
56
56
  /** Distance between zoom controls and right or left edge of workspace. */
57
- private readonly MARGIN_HORIZONTAL_;
57
+ private readonly MARGIN_HORIZONTAL;
58
58
  /** The SVG group containing the zoom controls. */
59
59
  private svgGroup;
60
60
  /** Left coordinate of the zoom controls. */
61
- private left_;
61
+ private left;
62
62
  /** Top coordinate of the zoom controls. */
63
- private top_;
63
+ private top;
64
64
  /** Whether this has been initialized. */
65
- private initialized_;
65
+ private initialized;
66
66
  /** @param workspace The workspace to sit in. */
67
67
  constructor(workspace: WorkspaceSvg);
68
68
  /**
@@ -102,7 +102,7 @@ export declare class ZoomControls implements IPositionable {
102
102
  * These IDs must be unique in case there are multiple Blockly instances
103
103
  * on the same page.
104
104
  */
105
- private createZoomOutSvg_;
105
+ private createZoomOutSvg;
106
106
  /**
107
107
  * Create the zoom out icon and its event handler.
108
108
  *
@@ -110,7 +110,7 @@ export declare class ZoomControls implements IPositionable {
110
110
  * These IDs must be unique in case there are multiple Blockly instances
111
111
  * on the same page.
112
112
  */
113
- private createZoomInSvg_;
113
+ private createZoomInSvg;
114
114
  /**
115
115
  * Handles a mouse down event on the zoom in or zoom out buttons on the
116
116
  * workspace.
@@ -119,7 +119,7 @@ export declare class ZoomControls implements IPositionable {
119
119
  * positive amount values zoom in.
120
120
  * @param e A mouse down event.
121
121
  */
122
- private zoom_;
122
+ private zoom;
123
123
  /**
124
124
  * Create the zoom reset icon and its event handler.
125
125
  *
@@ -127,14 +127,14 @@ export declare class ZoomControls implements IPositionable {
127
127
  * These IDs must be unique in case there are multiple Blockly instances
128
128
  * on the same page.
129
129
  */
130
- private createZoomResetSvg_;
130
+ private createZoomResetSvg;
131
131
  /**
132
132
  * Handles a mouse down event on the reset zoom button on the workspace.
133
133
  *
134
134
  * @param e A mouse down event.
135
135
  */
136
- private resetZoom_;
136
+ private resetZoom;
137
137
  /** Fires a zoom control UI event. */
138
- private fireZoomEvent_;
138
+ private fireZoomEvent;
139
139
  }
140
140
  //# sourceMappingURL=zoom_controls.d.ts.map
package/core-browser.js CHANGED
@@ -24,4 +24,4 @@
24
24
 
25
25
 
26
26
  return Blockly;
27
- }));
27
+ }));
package/core.js CHANGED
@@ -27,4 +27,4 @@ if (typeof globalThis.document !== 'object') {
27
27
  }
28
28
 
29
29
  module.exports = Blockly;
30
- })(require('./blockly'));
30
+ })(require('./blockly'));
package/dart.js CHANGED
@@ -19,4 +19,4 @@
19
19
  */
20
20
 
21
21
  return BlocklyDart;
22
- }));
22
+ }));
@@ -13,8 +13,8 @@
13
13
  }
14
14
  }(this, function(__parent__) {
15
15
  var $=__parent__.__namespace__;
16
- var module$exports$Blockly$Dart={},module$contents$Blockly$Dart_Variables=$.module$build$src$core$variables,module$contents$Blockly$Dart_stringUtils=$.module$build$src$core$utils$string,module$contents$Blockly$Dart_Generator=$.Generator$$module$build$src$core$generator,module$contents$Blockly$Dart_Names=$.module$build$src$core$names.Names,module$contents$Blockly$Dart_NameType=$.NameType$$module$build$src$core$names,module$contents$Blockly$Dart_inputTypes=$.module$build$src$core$input_types.inputTypes;
17
- module$exports$Blockly$Dart.dartGenerator=new $.Generator$$module$build$src$core$generator("Dart");module$exports$Blockly$Dart.dartGenerator.addReservedWords("assert,break,case,catch,class,const,continue,default,do,else,enum,extends,false,final,finally,for,if,in,is,new,null,rethrow,return,super,switch,this,throw,true,try,var,void,while,with,print,identityHashCode,identical,BidirectionalIterator,Comparable,double,Function,int,Invocation,Iterable,Iterator,List,Map,Match,num,Pattern,RegExp,Set,StackTrace,String,StringSink,Type,bool,DateTime,Deprecated,Duration,Expando,Null,Object,RuneIterator,Runes,Stopwatch,StringBuffer,Symbol,Uri,Comparator,AbstractClassInstantiationError,ArgumentError,AssertionError,CastError,ConcurrentModificationError,CyclicInitializationError,Error,Exception,FallThroughError,FormatException,IntegerDivisionByZeroException,NoSuchMethodError,NullThrownError,OutOfMemoryError,RangeError,StackOverflowError,StateError,TypeError,UnimplementedError,UnsupportedError");
16
+ var module$exports$Blockly$Dart={},module$contents$Blockly$Dart_Variables=$.module$build$src$core$variables,module$contents$Blockly$Dart_stringUtils=$.module$build$src$core$utils$string,module$contents$Blockly$Dart_CodeGenerator=$.CodeGenerator$$module$build$src$core$generator,module$contents$Blockly$Dart_Names=$.module$build$src$core$names.Names,module$contents$Blockly$Dart_NameType=$.NameType$$module$build$src$core$names,module$contents$Blockly$Dart_inputTypes=$.module$build$src$core$input_types.inputTypes;
17
+ module$exports$Blockly$Dart.dartGenerator=new $.CodeGenerator$$module$build$src$core$generator("Dart");module$exports$Blockly$Dart.dartGenerator.addReservedWords("assert,break,case,catch,class,const,continue,default,do,else,enum,extends,false,final,finally,for,if,in,is,new,null,rethrow,return,super,switch,this,throw,true,try,var,void,while,with,print,identityHashCode,identical,BidirectionalIterator,Comparable,double,Function,int,Invocation,Iterable,Iterator,List,Map,Match,num,Pattern,RegExp,Set,StackTrace,String,StringSink,Type,bool,DateTime,Deprecated,Duration,Expando,Null,Object,RuneIterator,Runes,Stopwatch,StringBuffer,Symbol,Uri,Comparator,AbstractClassInstantiationError,ArgumentError,AssertionError,CastError,ConcurrentModificationError,CyclicInitializationError,Error,Exception,FallThroughError,FormatException,IntegerDivisionByZeroException,NoSuchMethodError,NullThrownError,OutOfMemoryError,RangeError,StackOverflowError,StateError,TypeError,UnimplementedError,UnsupportedError");
18
18
  module$exports$Blockly$Dart.dartGenerator.ORDER_ATOMIC=0;module$exports$Blockly$Dart.dartGenerator.ORDER_UNARY_POSTFIX=1;module$exports$Blockly$Dart.dartGenerator.ORDER_UNARY_PREFIX=2;module$exports$Blockly$Dart.dartGenerator.ORDER_MULTIPLICATIVE=3;module$exports$Blockly$Dart.dartGenerator.ORDER_ADDITIVE=4;module$exports$Blockly$Dart.dartGenerator.ORDER_SHIFT=5;module$exports$Blockly$Dart.dartGenerator.ORDER_BITWISE_AND=6;module$exports$Blockly$Dart.dartGenerator.ORDER_BITWISE_XOR=7;
19
19
  module$exports$Blockly$Dart.dartGenerator.ORDER_BITWISE_OR=8;module$exports$Blockly$Dart.dartGenerator.ORDER_RELATIONAL=9;module$exports$Blockly$Dart.dartGenerator.ORDER_EQUALITY=10;module$exports$Blockly$Dart.dartGenerator.ORDER_LOGICAL_AND=11;module$exports$Blockly$Dart.dartGenerator.ORDER_LOGICAL_OR=12;module$exports$Blockly$Dart.dartGenerator.ORDER_IF_NULL=13;module$exports$Blockly$Dart.dartGenerator.ORDER_CONDITIONAL=14;module$exports$Blockly$Dart.dartGenerator.ORDER_CASCADE=15;
20
20
  module$exports$Blockly$Dart.dartGenerator.ORDER_ASSIGNMENT=16;module$exports$Blockly$Dart.dartGenerator.ORDER_NONE=99;module$exports$Blockly$Dart.dartGenerator.isInitialized=!1;