blockly 10.2.0-beta.1 → 10.2.0-beta.3

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 (208) hide show
  1. package/blockly.min.js +1731 -1906
  2. package/blockly_compressed.js +1462 -1614
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +162 -173
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/block.d.ts +10 -0
  7. package/core/block_dragger.d.ts +5 -0
  8. package/core/block_svg.d.ts +14 -4
  9. package/core/component_manager.d.ts +5 -0
  10. package/core/connection.d.ts +5 -0
  11. package/core/contextmenu.d.ts +5 -3
  12. package/core/contextmenu_registry.d.ts +7 -2
  13. package/core/drag_target.d.ts +6 -0
  14. package/core/dropdowndiv.d.ts +5 -0
  15. package/core/events/events_block_base.d.ts +5 -0
  16. package/core/events/events_block_change.d.ts +5 -0
  17. package/core/events/events_block_create.d.ts +5 -0
  18. package/core/events/events_block_delete.d.ts +5 -0
  19. package/core/events/events_block_drag.d.ts +5 -0
  20. package/core/events/events_block_field_intermediate_change.d.ts +6 -0
  21. package/core/events/events_block_move.d.ts +5 -0
  22. package/core/events/events_bubble_open.d.ts +5 -0
  23. package/core/events/events_click.d.ts +5 -0
  24. package/core/events/events_marker_move.d.ts +5 -0
  25. package/core/events/events_ui_base.d.ts +6 -0
  26. package/core/events/events_var_base.d.ts +5 -0
  27. package/core/extensions.d.ts +2 -12
  28. package/core/field.d.ts +17 -3
  29. package/core/field_checkbox.d.ts +5 -0
  30. package/core/field_colour.d.ts +27 -7
  31. package/core/field_image.d.ts +5 -0
  32. package/core/field_input.d.ts +19 -1
  33. package/core/field_label_serializable.d.ts +7 -0
  34. package/core/field_number.d.ts +5 -0
  35. package/core/field_textinput.d.ts +5 -0
  36. package/core/field_variable.d.ts +5 -0
  37. package/core/flyout_metrics_manager.d.ts +5 -0
  38. package/core/generator.d.ts +29 -1
  39. package/core/gesture.d.ts +6 -0
  40. package/core/icons/mutator_icon.d.ts +8 -0
  41. package/core/inputs/input.d.ts +5 -0
  42. package/core/keyboard_nav/ast_node.d.ts +6 -0
  43. package/core/keyboard_nav/marker.d.ts +6 -0
  44. package/core/main.d.ts +6 -4
  45. package/core/marker_manager.d.ts +5 -0
  46. package/core/menuitem.d.ts +5 -0
  47. package/core/metrics_manager.d.ts +5 -0
  48. package/core/options.d.ts +5 -0
  49. package/core/rendered_connection.d.ts +5 -0
  50. package/core/renderers/geras/geras.d.ts +5 -0
  51. package/core/renderers/minimalist/minimalist.d.ts +5 -0
  52. package/core/renderers/thrasos/thrasos.d.ts +5 -0
  53. package/core/renderers/zelos/zelos.d.ts +5 -0
  54. package/core/scrollbar.d.ts +5 -0
  55. package/core/serialization.d.ts +3 -0
  56. package/core/shortcut_registry.d.ts +6 -0
  57. package/core/theme_manager.d.ts +6 -0
  58. package/core/toolbox/collapsible_category.d.ts +5 -0
  59. package/core/toolbox/toolbox.d.ts +5 -0
  60. package/core/toolbox/toolbox_item.d.ts +5 -0
  61. package/core/trashcan.d.ts +5 -0
  62. package/core/utils/coordinate.d.ts +7 -0
  63. package/core/utils/rect.d.ts +7 -0
  64. package/core/utils/size.d.ts +7 -0
  65. package/core/utils/svg.d.ts +6 -0
  66. package/core/variable_map.d.ts +5 -0
  67. package/core/variable_model.d.ts +5 -0
  68. package/core/workspace.d.ts +9 -4
  69. package/core/workspace_comment_svg.d.ts +5 -0
  70. package/core/workspace_svg.d.ts +13 -2
  71. package/core/zoom_controls.d.ts +5 -0
  72. package/dart_compressed.js +88 -97
  73. package/dart_compressed.js.map +1 -1
  74. package/javascript_compressed.js +101 -112
  75. package/javascript_compressed.js.map +1 -1
  76. package/lua_compressed.js +75 -82
  77. package/lua_compressed.js.map +1 -1
  78. package/msg/ab.js +6 -7
  79. package/msg/ace.js +6 -7
  80. package/msg/af.js +6 -7
  81. package/msg/am.js +6 -7
  82. package/msg/ar.js +6 -7
  83. package/msg/ast.js +6 -7
  84. package/msg/az.js +6 -7
  85. package/msg/ba.js +7 -8
  86. package/msg/bcc.js +11 -12
  87. package/msg/be-tarask.js +6 -7
  88. package/msg/be.js +6 -7
  89. package/msg/bg.js +6 -7
  90. package/msg/bn.js +6 -7
  91. package/msg/br.js +6 -7
  92. package/msg/bs.js +6 -7
  93. package/msg/ca.js +6 -7
  94. package/msg/cdo.js +6 -7
  95. package/msg/cs.js +6 -7
  96. package/msg/da.js +6 -7
  97. package/msg/de.js +6 -7
  98. package/msg/diq.js +6 -7
  99. package/msg/dty.js +6 -7
  100. package/msg/ee.js +6 -7
  101. package/msg/el.js +6 -7
  102. package/msg/en-gb.js +6 -7
  103. package/msg/en.js +6 -7
  104. package/msg/eo.js +6 -7
  105. package/msg/es.js +6 -7
  106. package/msg/et.js +6 -7
  107. package/msg/eu.js +6 -7
  108. package/msg/fa.js +6 -7
  109. package/msg/fi.js +6 -7
  110. package/msg/fo.js +6 -7
  111. package/msg/fr.js +7 -8
  112. package/msg/frr.js +6 -7
  113. package/msg/gl.js +246 -247
  114. package/msg/gn.js +8 -9
  115. package/msg/gor.js +6 -7
  116. package/msg/ha.js +6 -7
  117. package/msg/hak.js +6 -7
  118. package/msg/he.js +6 -7
  119. package/msg/hi.js +6 -7
  120. package/msg/hr.js +6 -7
  121. package/msg/hrx.js +6 -7
  122. package/msg/hu.js +6 -7
  123. package/msg/hy.js +6 -7
  124. package/msg/ia.js +6 -7
  125. package/msg/id.js +6 -7
  126. package/msg/ig.js +6 -7
  127. package/msg/inh.js +6 -7
  128. package/msg/is.js +6 -7
  129. package/msg/it.js +6 -7
  130. package/msg/ja.js +6 -7
  131. package/msg/ka.js +6 -7
  132. package/msg/kab.js +6 -7
  133. package/msg/kbd-cyrl.js +6 -7
  134. package/msg/km.js +6 -7
  135. package/msg/kn.js +6 -7
  136. package/msg/ko.js +6 -7
  137. package/msg/ksh.js +6 -7
  138. package/msg/ku-latn.js +6 -7
  139. package/msg/ky.js +9 -10
  140. package/msg/la.js +6 -7
  141. package/msg/lb.js +6 -7
  142. package/msg/lki.js +6 -7
  143. package/msg/lo.js +6 -7
  144. package/msg/lrc.js +6 -7
  145. package/msg/lt.js +7 -8
  146. package/msg/lv.js +6 -7
  147. package/msg/mg.js +6 -7
  148. package/msg/mk.js +6 -7
  149. package/msg/ml.js +6 -7
  150. package/msg/mnw.js +6 -7
  151. package/msg/ms.js +6 -7
  152. package/msg/my.js +6 -7
  153. package/msg/mzn.js +6 -7
  154. package/msg/nb.js +6 -7
  155. package/msg/ne.js +6 -7
  156. package/msg/nl.js +6 -7
  157. package/msg/oc.js +6 -7
  158. package/msg/olo.js +6 -7
  159. package/msg/pa.js +6 -7
  160. package/msg/pl.js +6 -7
  161. package/msg/pms.js +6 -7
  162. package/msg/ps.js +6 -7
  163. package/msg/pt-br.js +12 -13
  164. package/msg/pt.js +6 -7
  165. package/msg/ro.js +6 -7
  166. package/msg/ru.js +6 -7
  167. package/msg/sc.js +6 -7
  168. package/msg/sco.js +6 -7
  169. package/msg/sd.js +6 -7
  170. package/msg/shn.js +6 -7
  171. package/msg/si.js +6 -7
  172. package/msg/sk.js +6 -7
  173. package/msg/skr-arab.js +6 -7
  174. package/msg/sl.js +6 -7
  175. package/msg/smn.js +6 -7
  176. package/msg/sq.js +6 -7
  177. package/msg/sr-latn.js +6 -7
  178. package/msg/sr.js +6 -7
  179. package/msg/sv.js +6 -7
  180. package/msg/sw.js +6 -7
  181. package/msg/ta.js +6 -7
  182. package/msg/tcy.js +6 -7
  183. package/msg/tdd.js +6 -7
  184. package/msg/te.js +6 -7
  185. package/msg/th.js +6 -7
  186. package/msg/ti.js +6 -7
  187. package/msg/tl.js +6 -7
  188. package/msg/tlh.js +6 -7
  189. package/msg/tr.js +6 -7
  190. package/msg/ug-arab.js +6 -7
  191. package/msg/uk.js +6 -7
  192. package/msg/ur.js +6 -7
  193. package/msg/uz.js +6 -7
  194. package/msg/vi.js +6 -7
  195. package/msg/xmf.js +6 -7
  196. package/msg/yo.js +6 -7
  197. package/msg/yue.js +6 -7
  198. package/msg/zgh.js +6 -7
  199. package/msg/zh-hans.js +57 -58
  200. package/msg/zh-hant.js +49 -50
  201. package/package.json +5 -8
  202. package/php_compressed.js +92 -100
  203. package/php_compressed.js.map +1 -1
  204. package/python_compressed.js +82 -92
  205. package/python_compressed.js.map +1 -1
  206. package/closure/goog/base.d.ts +0 -2
  207. package/closure/goog/base_minimal.d.ts +0 -19
  208. package/closure/goog/goog.d.ts +0 -26
@@ -3,6 +3,12 @@
3
3
  * Copyright 2012 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Utility functions for generating executable code from
8
+ * Blockly code.
9
+ *
10
+ * @class
11
+ */
6
12
  import type { Block } from './block.js';
7
13
  import { Names } from './names.js';
8
14
  import type { Workspace } from './workspace.js';
@@ -85,7 +91,7 @@ export declare class CodeGenerator {
85
91
  [key: string]: string;
86
92
  };
87
93
  /** A database of variable and procedure names. */
88
- protected nameDB_?: Names;
94
+ nameDB_?: Names;
89
95
  /** @param name Language name of this generator. */
90
96
  constructor(name: string);
91
97
  /**
@@ -192,6 +198,28 @@ export declare class CodeGenerator {
192
198
  * desiredName if the former has already been taken by the user.
193
199
  */
194
200
  provideFunction_(desiredName: string, code: string[] | string): string;
201
+ /**
202
+ * Gets a unique, legal name for a user-defined variable.
203
+ * Before calling this method, the `nameDB_` property of the class
204
+ * must have been initialized already. This is typically done in
205
+ * the `init` function of the code generator class.
206
+ *
207
+ * @param nameOrId The ID of the variable to get a name for,
208
+ * or the proposed name for a variable not associated with an id.
209
+ * @returns A unique, legal name for the variable.
210
+ */
211
+ getVariableName(nameOrId: string): string;
212
+ /**
213
+ * Gets a unique, legal name for a user-defined procedure.
214
+ * Before calling this method, the `nameDB_` property of the class
215
+ * must have been initialized already. This is typically done in
216
+ * the `init` function of the code generator class.
217
+ *
218
+ * @param name The proposed name for a procedure.
219
+ * @returns A unique, legal name for the procedure.
220
+ */
221
+ getProcedureName(name: string): string;
222
+ private getName;
195
223
  /**
196
224
  * Hook for code to run before code generation starts.
197
225
  * Subclasses may override this, e.g. to initialise the database of variable
package/core/gesture.d.ts CHANGED
@@ -3,6 +3,12 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * The class representing an in-progress gesture, e.g. a drag,
8
+ * tap, or pinch to zoom.
9
+ *
10
+ * @class
11
+ */
6
12
  import './events/events_click.js';
7
13
  import type { BlockSvg } from './block_svg.js';
8
14
  import { BubbleDragger } from './bubble_dragger.js';
@@ -35,6 +35,14 @@ export declare class MutatorIcon extends Icon implements IHasBubble {
35
35
  private rootBlock;
36
36
  /** The PID tracking updating the workkspace in response to user events. */
37
37
  private updateWorkspacePid;
38
+ /**
39
+ * The change listener in the main workspace that triggers the saveConnections
40
+ * method when anything in the main workspace changes.
41
+ *
42
+ * Only actually registered to listen for events while the mutator bubble is
43
+ * open.
44
+ */
45
+ private saveConnectionsListener;
38
46
  constructor(flyoutBlockTypes: string[], sourceBlock: BlockSvg);
39
47
  getType(): IconType<MutatorIcon>;
40
48
  initView(pointerdownListener: (e: PointerEvent) => void): void;
@@ -3,6 +3,11 @@
3
3
  * Copyright 2012 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing an input (value, statement, or dummy).
8
+ *
9
+ * @class
10
+ */
6
11
  import '../field_label.js';
7
12
  import type { Block } from '../block.js';
8
13
  import type { BlockSvg } from '../block_svg.js';
@@ -3,6 +3,12 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * The class representing an AST node.
8
+ * Used to traverse the Blockly AST.
9
+ *
10
+ * @class
11
+ */
6
12
  import type { Block } from '../block.js';
7
13
  import type { Connection } from '../connection.js';
8
14
  import type { Field } from '../field.js';
@@ -3,6 +3,12 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * The class representing a marker.
8
+ * Used primarily for keyboard navigation to show a marked location.
9
+ *
10
+ * @class
11
+ */
6
12
  import type { MarkerSvg } from '../renderers/common/marker_svg.js';
7
13
  import type { ASTNode } from './ast_node.js';
8
14
  /**
package/core/main.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- declare const Blockly: any;
2
- declare const Msg: any;
3
- declare const colour: any;
4
- declare const deprecation: any;
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
5
7
  //# sourceMappingURL=main.d.ts.map
@@ -3,6 +3,11 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object in charge of managing markers and the cursor.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { Cursor } from './keyboard_nav/cursor.js';
7
12
  import type { Marker } from './keyboard_nav/marker.js';
8
13
  import type { WorkspaceSvg } from './workspace_svg.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Blockly menu item similar to Closure's goog.ui.MenuItem
8
+ *
9
+ * @class
10
+ */
6
11
  import * as aria from './utils/aria.js';
7
12
  /**
8
13
  * Class representing an item in a menu.
@@ -3,6 +3,11 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Calculates and reports workspace metrics.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { IFlyout } from './interfaces/i_flyout.js';
7
12
  import type { IMetricsManager } from './interfaces/i_metrics_manager.js';
8
13
  import type { IToolbox } from './interfaces/i_toolbox.js';
package/core/options.d.ts CHANGED
@@ -3,6 +3,11 @@
3
3
  * Copyright 2016 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object that controls settings for the workspace.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { BlocklyOptions } from './blockly_options.js';
7
12
  import { Theme } from './theme.js';
8
13
  import type { Metrics } from './utils/metrics.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2016 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Components for creating connections between blocks.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { Block } from './block.js';
7
12
  import type { BlockSvg } from './block_svg.js';
8
13
  import { Connection } from './connection.js';
@@ -1,4 +1,9 @@
1
1
  /** @file Re-exports of Blockly.geras.* modules. */
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
2
7
  import { ConstantProvider } from './constants.js';
3
8
  import { Drawer } from './drawer.js';
4
9
  import { HighlightConstantProvider } from './highlight_constants.js';
@@ -1,4 +1,9 @@
1
1
  /** @file Re-exports of Blockly.minimalist.* modules. */
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
2
7
  import { ConstantProvider } from './constants.js';
3
8
  import { Drawer } from './drawer.js';
4
9
  import { RenderInfo } from './info.js';
@@ -1,4 +1,9 @@
1
1
  /** @file Re-exports of Blockly.thrasos.* modules. */
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
2
7
  import { RenderInfo } from './info.js';
3
8
  import { Renderer } from './renderer.js';
4
9
  export { Renderer, RenderInfo };
@@ -1,4 +1,9 @@
1
1
  /** @file Re-exports of Blockly.zelos.* modules. */
2
+ /**
3
+ * @license
4
+ * Copyright 2021 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
2
7
  import { ConstantProvider } from './constants.js';
3
8
  import { Drawer } from './drawer.js';
4
9
  import { RenderInfo } from './info.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2011 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a scrollbar.
8
+ *
9
+ * @class
10
+ */
6
11
  import * as browserEvents from './browser_events.js';
7
12
  import { Coordinate } from './utils/coordinate.js';
8
13
  import type { Metrics } from './utils/metrics.js';
@@ -3,6 +3,9 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Serialization methods.
8
+ */
6
9
  import * as blocks from './serialization/blocks.js';
7
10
  import * as exceptions from './serialization/exceptions.js';
8
11
  import * as priorities from './serialization/priorities.js';
@@ -3,6 +3,12 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * The namespace used to keep track of keyboard shortcuts and the
8
+ * key codes used to execute those shortcuts.
9
+ *
10
+ * @class
11
+ */
6
12
  import { KeyCodes } from './utils/keycodes.js';
7
13
  import { WorkspaceSvg } from './workspace_svg.js';
8
14
  /**
@@ -3,6 +3,12 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object in charge of storing and updating a workspace theme
8
+ * and UI components.
9
+ *
10
+ * @class
11
+ */
6
12
  import type { Theme } from './theme.js';
7
13
  import type { Workspace } from './workspace.js';
8
14
  import type { WorkspaceSvg } from './workspace_svg.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * A toolbox category used to organize blocks in the toolbox.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { ICollapsibleToolboxItem } from '../interfaces/i_collapsible_toolbox_item.js';
7
12
  import type { IToolbox } from '../interfaces/i_toolbox.js';
8
13
  import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Toolbox from whence to create blocks.
8
+ *
9
+ * @class
10
+ */
6
11
  import '../events/events_toolbox_item_select.js';
7
12
  import * as browserEvents from '../browser_events.js';
8
13
  import { DeleteArea } from '../delete_area.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * An item in the toolbox.
8
+ *
9
+ * @class
10
+ */
6
11
  import type { ICollapsibleToolboxItem } from '../interfaces/i_collapsible_toolbox_item.js';
7
12
  import type { IToolbox } from '../interfaces/i_toolbox.js';
8
13
  import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2011 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a trash can icon.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_trashcan_open.js';
7
12
  import { DeleteArea } from './delete_area.js';
8
13
  import type { IAutoHideable } from './interfaces/i_autohideable.js';
@@ -3,6 +3,13 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Utility methods for coordinate manipulation.
8
+ * These methods are not specific to Blockly, and could be factored out into
9
+ * a JavaScript framework such as Closure.
10
+ *
11
+ * @class
12
+ */
6
13
  /**
7
14
  * Class for representing coordinates and positions.
8
15
  */
@@ -3,6 +3,13 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Utility methods for rectangle manipulation.
8
+ * These methods are not specific to Blockly, and could be factored out into
9
+ * a JavaScript framework such as Closure.
10
+ *
11
+ * @class
12
+ */
6
13
  /**
7
14
  * Class for representing rectangular regions.
8
15
  */
@@ -3,6 +3,13 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Utility methods for size calculation.
8
+ * These methods are not specific to Blockly, and could be factored out into
9
+ * a JavaScript framework such as Closure.
10
+ *
11
+ * @class
12
+ */
6
13
  /**
7
14
  * Class for representing sizes consisting of a width and height.
8
15
  */
@@ -3,6 +3,12 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Defines the Svg class. Its constants enumerate
8
+ * all SVG tag names used by Blockly.
9
+ *
10
+ * @class
11
+ */
6
12
  /**
7
13
  * A name with the type of the SVG element stored in the generic.
8
14
  */
@@ -3,6 +3,11 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a map of variables and their types.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_var_delete.js';
7
12
  import './events/events_var_rename.js';
8
13
  import type { Block } from './block.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Components for the variable model.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_var_create.js';
7
12
  import type { Workspace } from './workspace.js';
8
13
  /**
@@ -3,6 +3,11 @@
3
3
  * Copyright 2012 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a workspace.
8
+ *
9
+ * @class
10
+ */
6
11
  import './connection_checker.js';
7
12
  import type { Block } from './block.js';
8
13
  import type { ConnectionDB } from './connection_db.js';
@@ -122,7 +127,7 @@ export declare class Workspace implements IASTNodeLocation {
122
127
  * @param ordered Sort the list if true.
123
128
  * @returns The top-level block objects.
124
129
  */
125
- getTopBlocks(ordered: boolean): Block[];
130
+ getTopBlocks(ordered?: boolean): Block[];
126
131
  /**
127
132
  * Add a block to the list of blocks keyed by type.
128
133
  *
@@ -143,7 +148,7 @@ export declare class Workspace implements IASTNodeLocation {
143
148
  * @param ordered Sort the list if true.
144
149
  * @returns The blocks of the given type.
145
150
  */
146
- getBlocksByType(type: string, ordered: boolean): Block[];
151
+ getBlocksByType(type: string, ordered?: boolean): Block[];
147
152
  /**
148
153
  * Adds a comment to the list of top comments.
149
154
  *
@@ -166,7 +171,7 @@ export declare class Workspace implements IASTNodeLocation {
166
171
  * @returns The top-level comment objects.
167
172
  * @internal
168
173
  */
169
- getTopComments(ordered: boolean): WorkspaceComment[];
174
+ getTopComments(ordered?: boolean): WorkspaceComment[];
170
175
  /**
171
176
  * Find all blocks in workspace. Blocks are optionally sorted
172
177
  * by position; top to bottom (with slight LTR or RTL bias).
@@ -174,7 +179,7 @@ export declare class Workspace implements IASTNodeLocation {
174
179
  * @param ordered Sort the list if true.
175
180
  * @returns Array of blocks.
176
181
  */
177
- getAllBlocks(ordered: boolean): Block[];
182
+ getAllBlocks(ordered?: boolean): Block[];
178
183
  /** Dispose of all blocks and comments in workspace. */
179
184
  clear(): void;
180
185
  /**
@@ -3,6 +3,11 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a code comment on a rendered workspace.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_selected.js';
7
12
  import type { IBoundedElement } from './interfaces/i_bounded_element.js';
8
13
  import type { IBubble } from './interfaces/i_bubble.js';
@@ -3,6 +3,11 @@
3
3
  * Copyright 2014 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a workspace rendered as SVG.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_block_create.js';
7
12
  import './events/events_theme_change.js';
8
13
  import './events/events_viewport.js';
@@ -384,6 +389,12 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
384
389
  * @internal
385
390
  */
386
391
  getInjectionDiv(): Element;
392
+ /**
393
+ * Returns the SVG group for the workspace.
394
+ *
395
+ * @returns The SVG group for the workspace.
396
+ */
397
+ getSvgGroup(): Element;
387
398
  /**
388
399
  * Get the SVG block canvas for the workspace.
389
400
  *
@@ -802,7 +813,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
802
813
  * @param ordered Sort the list if true.
803
814
  * @returns Array of blocks.
804
815
  */
805
- getAllBlocks(ordered: boolean): BlockSvg[];
816
+ getAllBlocks(ordered?: boolean): BlockSvg[];
806
817
  /**
807
818
  * Finds the top-level blocks and returns them. Blocks are optionally sorted
808
819
  * by position; top to bottom (with slight LTR or RTL bias).
@@ -810,7 +821,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
810
821
  * @param ordered Sort the list if true.
811
822
  * @returns The top-level block objects.
812
823
  */
813
- getTopBlocks(ordered: boolean): BlockSvg[];
824
+ getTopBlocks(ordered?: boolean): BlockSvg[];
814
825
  /**
815
826
  * Adds a block to the list of top blocks.
816
827
  *
@@ -3,6 +3,11 @@
3
3
  * Copyright 2015 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ /**
7
+ * Object representing a zoom icons.
8
+ *
9
+ * @class
10
+ */
6
11
  import './events/events_click.js';
7
12
  import type { IPositionable } from './interfaces/i_positionable.js';
8
13
  import type { UiMetrics } from './metrics_manager.js';