blockly 9.2.1 → 9.3.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 (299) hide show
  1. package/blockly.min.js +1615 -1509
  2. package/blockly_compressed.js +1249 -1136
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +166 -173
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/any_aliases.d.ts +5 -0
  7. package/core/block.d.ts +49 -17
  8. package/core/block_animations.d.ts +0 -4
  9. package/core/block_dragger.d.ts +1 -6
  10. package/core/block_svg.d.ts +58 -8
  11. package/core/blockly.d.ts +27 -58
  12. package/core/blockly_options.d.ts +0 -2
  13. package/core/blocks.d.ts +0 -2
  14. package/core/browser_events.d.ts +0 -9
  15. package/core/bubble.d.ts +0 -2
  16. package/core/bubble_dragger.d.ts +0 -2
  17. package/core/bump_objects.d.ts +0 -3
  18. package/core/clipboard.d.ts +0 -3
  19. package/core/comment.d.ts +6 -10
  20. package/core/common.d.ts +0 -12
  21. package/core/component_manager.d.ts +0 -2
  22. package/core/connection.d.ts +19 -6
  23. package/core/connection_checker.d.ts +1 -3
  24. package/core/connection_db.d.ts +0 -2
  25. package/core/connection_type.d.ts +0 -2
  26. package/core/constants.d.ts +0 -4
  27. package/core/contextmenu.d.ts +0 -11
  28. package/core/contextmenu_items.d.ts +0 -27
  29. package/core/contextmenu_registry.d.ts +0 -2
  30. package/core/css.d.ts +0 -2
  31. package/core/delete_area.d.ts +0 -2
  32. package/core/dialog.d.ts +0 -6
  33. package/core/drag_target.d.ts +0 -2
  34. package/core/events/events.d.ts +2 -22
  35. package/core/events/events_abstract.d.ts +7 -3
  36. package/core/events/events_block_base.d.ts +2 -3
  37. package/core/events/events_block_change.d.ts +9 -3
  38. package/core/events/events_block_create.d.ts +6 -4
  39. package/core/events/events_block_delete.d.ts +7 -4
  40. package/core/events/events_block_drag.d.ts +7 -3
  41. package/core/events/events_block_move.d.ts +20 -3
  42. package/core/events/events_bubble_open.d.ts +3 -2
  43. package/core/events/events_click.d.ts +6 -3
  44. package/core/events/events_comment_base.d.ts +1 -2
  45. package/core/events/events_comment_change.d.ts +3 -3
  46. package/core/events/events_comment_create.d.ts +2 -3
  47. package/core/events/events_comment_delete.d.ts +2 -3
  48. package/core/events/events_comment_move.d.ts +4 -4
  49. package/core/events/events_marker_move.d.ts +10 -3
  50. package/core/events/events_selected.d.ts +6 -2
  51. package/core/events/events_theme_change.d.ts +2 -3
  52. package/core/events/events_toolbox_item_select.d.ts +3 -3
  53. package/core/events/events_trashcan_open.d.ts +5 -3
  54. package/core/events/events_ui.d.ts +0 -1
  55. package/core/events/events_ui_base.d.ts +0 -2
  56. package/core/events/events_var_base.d.ts +1 -2
  57. package/core/events/events_var_create.d.ts +3 -3
  58. package/core/events/events_var_delete.d.ts +4 -2
  59. package/core/events/events_var_rename.d.ts +4 -2
  60. package/core/events/events_viewport.d.ts +13 -2
  61. package/core/events/utils.d.ts +0 -89
  62. package/core/events/workspace_events.d.ts +2 -6
  63. package/core/extensions.d.ts +0 -8
  64. package/core/field.d.ts +55 -21
  65. package/core/field_angle.d.ts +61 -51
  66. package/core/field_checkbox.d.ts +34 -15
  67. package/core/field_colour.d.ts +56 -46
  68. package/core/field_dropdown.d.ts +35 -19
  69. package/core/field_image.d.ts +10 -14
  70. package/core/field_input.d.ts +39 -25
  71. package/core/field_label.d.ts +7 -10
  72. package/core/field_label_serializable.d.ts +4 -6
  73. package/core/field_multilineinput.d.ts +36 -14
  74. package/core/field_number.d.ts +27 -19
  75. package/core/field_registry.d.ts +0 -3
  76. package/core/field_textinput.d.ts +36 -8
  77. package/core/field_variable.d.ts +30 -18
  78. package/core/flyout_base.d.ts +5 -6
  79. package/core/flyout_button.d.ts +2 -2
  80. package/core/flyout_horizontal.d.ts +0 -2
  81. package/core/flyout_metrics_manager.d.ts +0 -2
  82. package/core/flyout_vertical.d.ts +0 -2
  83. package/core/generator.d.ts +0 -1
  84. package/core/gesture.d.ts +5 -18
  85. package/core/grid.d.ts +0 -2
  86. package/core/icon.d.ts +0 -2
  87. package/core/inject.d.ts +0 -1
  88. package/core/input.d.ts +0 -3
  89. package/core/input_types.d.ts +0 -2
  90. package/core/insertion_marker_manager.d.ts +6 -6
  91. package/core/interfaces/i_ast_node_location.d.ts +0 -2
  92. package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
  93. package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
  94. package/core/interfaces/i_autohideable.d.ts +0 -2
  95. package/core/interfaces/i_block_dragger.d.ts +0 -2
  96. package/core/interfaces/i_bounded_element.d.ts +0 -2
  97. package/core/interfaces/i_bubble.d.ts +0 -2
  98. package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
  99. package/core/interfaces/i_component.d.ts +0 -2
  100. package/core/interfaces/i_connection_checker.d.ts +0 -2
  101. package/core/interfaces/i_contextmenu.d.ts +0 -1
  102. package/core/interfaces/i_copyable.d.ts +3 -2
  103. package/core/interfaces/i_deletable.d.ts +0 -2
  104. package/core/interfaces/i_delete_area.d.ts +0 -2
  105. package/core/interfaces/i_drag_target.d.ts +0 -2
  106. package/core/interfaces/i_draggable.d.ts +0 -2
  107. package/core/interfaces/i_flyout.d.ts +0 -2
  108. package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
  109. package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
  110. package/core/interfaces/i_metrics_manager.d.ts +8 -8
  111. package/core/interfaces/i_movable.d.ts +0 -2
  112. package/core/interfaces/i_positionable.d.ts +0 -2
  113. package/core/interfaces/i_procedure_block.d.ts +3 -0
  114. package/core/interfaces/i_procedure_model.d.ts +0 -5
  115. package/core/interfaces/i_registrable.d.ts +0 -2
  116. package/core/interfaces/i_selectable.d.ts +0 -2
  117. package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
  118. package/core/interfaces/i_serializer.d.ts +0 -2
  119. package/core/interfaces/i_styleable.d.ts +0 -2
  120. package/core/interfaces/i_toolbox.d.ts +0 -2
  121. package/core/interfaces/i_toolbox_item.d.ts +0 -2
  122. package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
  123. package/core/internal_constants.d.ts +0 -5
  124. package/core/keyboard_nav/ast_node.d.ts +0 -3
  125. package/core/keyboard_nav/basic_cursor.d.ts +0 -3
  126. package/core/keyboard_nav/cursor.d.ts +0 -3
  127. package/core/keyboard_nav/marker.d.ts +0 -2
  128. package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
  129. package/core/marker_manager.d.ts +0 -2
  130. package/core/menu.d.ts +0 -2
  131. package/core/menuitem.d.ts +0 -2
  132. package/core/metrics_manager.d.ts +8 -8
  133. package/core/mutator.d.ts +0 -2
  134. package/core/names.d.ts +0 -3
  135. package/core/{procedures/observable_procedure_map.d.ts → observable_procedure_map.d.ts} +4 -5
  136. package/core/options.d.ts +0 -2
  137. package/core/positionable_helpers.d.ts +0 -7
  138. package/core/procedures.d.ts +7 -28
  139. package/core/registry.d.ts +0 -11
  140. package/core/render_management.d.ts +15 -0
  141. package/core/rendered_connection.d.ts +22 -9
  142. package/core/renderers/common/block_rendering.d.ts +0 -3
  143. package/core/renderers/common/constants.d.ts +6 -51
  144. package/core/renderers/common/debug.d.ts +0 -3
  145. package/core/renderers/common/debugger.d.ts +9 -23
  146. package/core/renderers/common/drawer.d.ts +0 -5
  147. package/core/renderers/common/i_path_object.d.ts +0 -17
  148. package/core/renderers/common/info.d.ts +2 -12
  149. package/core/renderers/common/marker_svg.d.ts +2 -4
  150. package/core/renderers/common/path_object.d.ts +0 -24
  151. package/core/renderers/common/renderer.d.ts +5 -20
  152. package/core/renderers/geras/constants.d.ts +0 -5
  153. package/core/renderers/geras/drawer.d.ts +2 -4
  154. package/core/renderers/geras/highlight_constants.d.ts +6 -17
  155. package/core/renderers/geras/highlighter.d.ts +0 -13
  156. package/core/renderers/geras/info.d.ts +2 -5
  157. package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
  158. package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
  159. package/core/renderers/geras/path_object.d.ts +0 -8
  160. package/core/renderers/geras/renderer.d.ts +5 -7
  161. package/core/renderers/measurables/base.d.ts +0 -3
  162. package/core/renderers/measurables/bottom_row.d.ts +0 -9
  163. package/core/renderers/measurables/connection.d.ts +0 -3
  164. package/core/renderers/measurables/external_value_input.d.ts +0 -3
  165. package/core/renderers/measurables/field.d.ts +0 -3
  166. package/core/renderers/measurables/hat.d.ts +0 -3
  167. package/core/renderers/measurables/icon.d.ts +2 -5
  168. package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
  169. package/core/renderers/measurables/inline_input.d.ts +1 -4
  170. package/core/renderers/measurables/input_connection.d.ts +1 -4
  171. package/core/renderers/measurables/input_row.d.ts +0 -7
  172. package/core/renderers/measurables/jagged_edge.d.ts +2 -5
  173. package/core/renderers/measurables/next_connection.d.ts +0 -3
  174. package/core/renderers/measurables/output_connection.d.ts +0 -3
  175. package/core/renderers/measurables/previous_connection.d.ts +0 -3
  176. package/core/renderers/measurables/round_corner.d.ts +0 -3
  177. package/core/renderers/measurables/row.d.ts +0 -39
  178. package/core/renderers/measurables/spacer_row.d.ts +0 -3
  179. package/core/renderers/measurables/square_corner.d.ts +0 -3
  180. package/core/renderers/measurables/statement_input.d.ts +0 -3
  181. package/core/renderers/measurables/top_row.d.ts +0 -6
  182. package/core/renderers/measurables/types.d.ts +0 -31
  183. package/core/renderers/minimalist/constants.d.ts +2 -4
  184. package/core/renderers/minimalist/drawer.d.ts +0 -3
  185. package/core/renderers/minimalist/info.d.ts +0 -4
  186. package/core/renderers/minimalist/renderer.d.ts +0 -3
  187. package/core/renderers/thrasos/info.d.ts +0 -4
  188. package/core/renderers/thrasos/renderer.d.ts +3 -3
  189. package/core/renderers/zelos/constants.d.ts +3 -17
  190. package/core/renderers/zelos/drawer.d.ts +0 -3
  191. package/core/renderers/zelos/info.d.ts +0 -4
  192. package/core/renderers/zelos/marker_svg.d.ts +0 -2
  193. package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
  194. package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
  195. package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
  196. package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
  197. package/core/renderers/zelos/path_object.d.ts +0 -9
  198. package/core/renderers/zelos/renderer.d.ts +3 -5
  199. package/core/scrollbar.d.ts +0 -2
  200. package/core/scrollbar_pair.d.ts +0 -2
  201. package/core/serialization/blocks.d.ts +3 -9
  202. package/core/serialization/exceptions.d.ts +0 -8
  203. package/core/serialization/priorities.d.ts +0 -4
  204. package/core/serialization/procedures.d.ts +0 -7
  205. package/core/serialization/registry.d.ts +0 -2
  206. package/core/serialization/variables.d.ts +0 -4
  207. package/core/serialization/workspaces.d.ts +0 -2
  208. package/core/shortcut_items.d.ts +0 -17
  209. package/core/shortcut_registry.d.ts +0 -2
  210. package/core/sprites.d.ts +0 -2
  211. package/core/theme/classic.d.ts +0 -2
  212. package/core/theme/zelos.d.ts +0 -2
  213. package/core/theme.d.ts +0 -2
  214. package/core/theme_manager.d.ts +3 -6
  215. package/core/toolbox/category.d.ts +5 -7
  216. package/core/toolbox/collapsible_category.d.ts +0 -4
  217. package/core/toolbox/separator.d.ts +0 -2
  218. package/core/toolbox/toolbox.d.ts +2 -5
  219. package/core/toolbox/toolbox_item.d.ts +0 -2
  220. package/core/tooltip.d.ts +0 -29
  221. package/core/touch.d.ts +0 -13
  222. package/core/trashcan.d.ts +0 -2
  223. package/core/utils/aria.d.ts +0 -6
  224. package/core/utils/array.d.ts +0 -1
  225. package/core/utils/colour.d.ts +0 -12
  226. package/core/utils/coordinate.d.ts +0 -2
  227. package/core/utils/deprecation.d.ts +0 -1
  228. package/core/utils/dom.d.ts +0 -25
  229. package/core/utils/idgenerator.d.ts +0 -2
  230. package/core/utils/keycodes.d.ts +0 -2
  231. package/core/utils/math.d.ts +0 -3
  232. package/core/utils/metrics.d.ts +0 -1
  233. package/core/utils/object.d.ts +0 -4
  234. package/core/utils/parsing.d.ts +0 -4
  235. package/core/utils/rect.d.ts +0 -2
  236. package/core/utils/size.d.ts +0 -2
  237. package/core/utils/string.d.ts +0 -6
  238. package/core/utils/style.d.ts +0 -8
  239. package/core/utils/svg.d.ts +0 -2
  240. package/core/utils/svg_math.d.ts +0 -6
  241. package/core/utils/svg_paths.d.ts +0 -8
  242. package/core/utils/toolbox.d.ts +2 -35
  243. package/core/utils/useragent.d.ts +0 -8
  244. package/core/utils/xml.d.ts +9 -8
  245. package/core/utils.d.ts +0 -12
  246. package/core/variable_map.d.ts +1 -3
  247. package/core/variable_model.d.ts +0 -1
  248. package/core/variables.d.ts +13 -17
  249. package/core/variables_dynamic.d.ts +0 -4
  250. package/core/warning.d.ts +0 -2
  251. package/core/widgetdiv.d.ts +0 -10
  252. package/core/workspace.d.ts +3 -3
  253. package/core/workspace_audio.d.ts +0 -2
  254. package/core/workspace_comment.d.ts +1 -3
  255. package/core/workspace_comment_svg.d.ts +1 -3
  256. package/core/workspace_dragger.d.ts +0 -2
  257. package/core/workspace_svg.d.ts +4 -7
  258. package/core/xml.d.ts +1 -13
  259. package/core/zoom_controls.d.ts +4 -15
  260. package/dart_compressed.js +199 -199
  261. package/dart_compressed.js.map +1 -1
  262. package/javascript_compressed.js +168 -168
  263. package/javascript_compressed.js.map +1 -1
  264. package/lua_compressed.js +211 -211
  265. package/lua_compressed.js.map +1 -1
  266. package/msg/bn.js +2 -2
  267. package/msg/bs.js +7 -7
  268. package/msg/de.js +1 -1
  269. package/msg/fi.js +1 -1
  270. package/msg/fr.js +3 -3
  271. package/msg/ia.js +5 -5
  272. package/msg/kn.js +5 -5
  273. package/msg/ko.js +1 -1
  274. package/msg/lb.js +22 -22
  275. package/msg/sd.js +9 -9
  276. package/msg/skr-arab.js +2 -2
  277. package/msg/sl.js +18 -18
  278. package/msg/sw.js +1 -1
  279. package/msg/zh-hans.js +6 -6
  280. package/msg/zh-hant.js +2 -2
  281. package/package.json +9 -9
  282. package/php_compressed.js +185 -185
  283. package/php_compressed.js.map +1 -1
  284. package/python_compressed.js +138 -138
  285. package/python_compressed.js.map +1 -1
  286. package/core/events/events_procedure_base.d.ts +0 -26
  287. package/core/events/events_procedure_change_return.d.ts +0 -40
  288. package/core/events/events_procedure_create.d.ts +0 -34
  289. package/core/events/events_procedure_delete.d.ts +0 -32
  290. package/core/events/events_procedure_enable.d.ts +0 -34
  291. package/core/events/events_procedure_parameter_base.d.ts +0 -26
  292. package/core/events/events_procedure_parameter_create.d.ts +0 -42
  293. package/core/events/events_procedure_parameter_delete.d.ts +0 -41
  294. package/core/events/events_procedure_parameter_rename.d.ts +0 -36
  295. package/core/events/events_procedure_rename.d.ts +0 -35
  296. package/core/procedures/observable_parameter_model.d.ts +0 -62
  297. package/core/procedures/observable_procedure_model.d.ts +0 -75
  298. package/core/procedures/update_procedures.d.ts +0 -13
  299. package/core/utils/sentinel.d.ts +0 -13
@@ -11,49 +11,36 @@ import type { IPathObject } from './i_path_object.js';
11
11
  /**
12
12
  * An object that handles creating and setting each of the SVG elements
13
13
  * used by the renderer.
14
- *
15
- * @alias Blockly.blockRendering.PathObject
16
14
  */
17
15
  export declare class PathObject implements IPathObject {
18
16
  svgRoot: SVGElement;
19
- /** @internal */
20
17
  svgPath: SVGElement;
21
18
  /**
22
19
  * Holds the cursors svg element when the cursor is attached to the block.
23
20
  * This is null if there is no cursor on the block.
24
- *
25
- * @internal
26
21
  */
27
22
  cursorSvg: SVGElement | null;
28
23
  /**
29
24
  * Holds the markers svg element when the marker is attached to the block.
30
25
  * This is null if there is no marker on the block.
31
- *
32
- * @internal
33
26
  */
34
27
  markerSvg: SVGElement | null;
35
- /** @internal */
36
28
  constants: ConstantProvider;
37
- /** @internal */
38
29
  style: BlockStyle;
39
30
  /**
40
31
  * @param root The root SVG element.
41
32
  * @param style The style object to use for colouring.
42
33
  * @param constants The renderer's constants.
43
- * @internal
44
34
  */
45
35
  constructor(root: SVGElement, style: BlockStyle, constants: ConstantProvider);
46
36
  /**
47
37
  * Set the path generated by the renderer onto the respective SVG element.
48
38
  *
49
39
  * @param pathString The path.
50
- * @internal
51
40
  */
52
41
  setPath(pathString: string): void;
53
42
  /**
54
43
  * Flip the SVG paths in RTL.
55
- *
56
- * @internal
57
44
  */
58
45
  flipRTL(): void;
59
46
  /**
@@ -61,7 +48,6 @@ export declare class PathObject implements IPathObject {
61
48
  *
62
49
  * @param cursorSvg The SVG root of the cursor to be added to the block SVG
63
50
  * group.
64
- * @internal
65
51
  */
66
52
  setCursorSvg(cursorSvg: SVGElement): void;
67
53
  /**
@@ -69,7 +55,6 @@ export declare class PathObject implements IPathObject {
69
55
  *
70
56
  * @param markerSvg The SVG root of the marker to be added to the block SVG
71
57
  * group.
72
- * @internal
73
58
  */
74
59
  setMarkerSvg(markerSvg: SVGElement): void;
75
60
  /**
@@ -77,14 +62,12 @@ export declare class PathObject implements IPathObject {
77
62
  * the paths belong to a shadow block.
78
63
  *
79
64
  * @param block The source block.
80
- * @internal
81
65
  */
82
66
  applyColour(block: BlockSvg): void;
83
67
  /**
84
68
  * Set the style.
85
69
  *
86
70
  * @param blockStyle The block style to use.
87
- * @internal
88
71
  */
89
72
  setStyle(blockStyle: BlockStyle): void;
90
73
  /**
@@ -100,7 +83,6 @@ export declare class PathObject implements IPathObject {
100
83
  * often used to visually mark blocks currently being executed.
101
84
  *
102
85
  * @param enable True if highlighted.
103
- * @internal
104
86
  */
105
87
  updateHighlighted(enable: boolean): void;
106
88
  /**
@@ -119,7 +101,6 @@ export declare class PathObject implements IPathObject {
119
101
  * Add or remove styling showing that a block is selected.
120
102
  *
121
103
  * @param enable True if selection is enabled, false otherwise.
122
- * @internal
123
104
  */
124
105
  updateSelected(enable: boolean): void;
125
106
  /**
@@ -127,21 +108,18 @@ export declare class PathObject implements IPathObject {
127
108
  *
128
109
  * @param enable True if the block is being dragged over a delete area, false
129
110
  * otherwise.
130
- * @internal
131
111
  */
132
112
  updateDraggingDelete(enable: boolean): void;
133
113
  /**
134
114
  * Add or remove styling showing that a block is an insertion marker.
135
115
  *
136
116
  * @param enable True if the block is an insertion marker, false otherwise.
137
- * @internal
138
117
  */
139
118
  updateInsertionMarker(enable: boolean): void;
140
119
  /**
141
120
  * Add or remove styling showing that a block is movable.
142
121
  *
143
122
  * @param enable True if the block is movable, false otherwise.
144
- * @internal
145
123
  */
146
124
  updateMovable(enable: boolean): void;
147
125
  /**
@@ -150,7 +128,6 @@ export declare class PathObject implements IPathObject {
150
128
  * Otherwise it will bump.
151
129
  *
152
130
  * @param enable True if styling should be added.
153
- * @internal
154
131
  */
155
132
  updateReplacementFade(enable: boolean): void;
156
133
  /**
@@ -159,7 +136,6 @@ export declare class PathObject implements IPathObject {
159
136
  *
160
137
  * @param _conn The connection on the input to highlight.
161
138
  * @param _enable True if styling should be added.
162
- * @internal
163
139
  */
164
140
  updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
165
141
  }
@@ -19,30 +19,23 @@ import { RenderInfo } from './info.js';
19
19
  import { MarkerSvg } from './marker_svg.js';
20
20
  /**
21
21
  * The base class for a block renderer.
22
- *
23
- * @alias Blockly.blockRendering.Renderer
24
22
  */
25
23
  export declare class Renderer implements IRegistrable {
26
24
  /** The renderer's constant provider. */
27
25
  protected constants_: ConstantProvider;
28
- /** @internal */
29
- name: string;
26
+ protected name: string;
30
27
  /**
31
28
  * Rendering constant overrides, passed in through options.
32
- *
33
- * @internal
34
29
  */
35
- overrides: object | null;
30
+ protected overrides: object | null;
36
31
  /**
37
32
  * @param name The renderer name.
38
- * @internal
39
33
  */
40
34
  constructor(name: string);
41
35
  /**
42
36
  * Gets the class name that identifies this renderer.
43
37
  *
44
38
  * @returns The CSS class name.
45
- * @internal
46
39
  */
47
40
  getClassName(): string;
48
41
  /**
@@ -50,13 +43,14 @@ export declare class Renderer implements IRegistrable {
50
43
  *
51
44
  * @param theme The workspace theme object.
52
45
  * @param opt_rendererOverrides Rendering constant overrides.
53
- * @internal
54
46
  */
55
47
  init(theme: Theme, opt_rendererOverrides?: {
56
48
  [rendererConstant: string]: any;
57
49
  }): void;
58
50
  /**
59
51
  * Create any DOM elements that this renderer needs.
52
+ * If you need to create additional DOM elements, override the
53
+ * {@link ConstantProvider#createDom} method instead.
60
54
  *
61
55
  * @param svg The root of the workspace's SVG.
62
56
  * @param theme The workspace theme object.
@@ -68,14 +62,11 @@ export declare class Renderer implements IRegistrable {
68
62
  *
69
63
  * @param svg The root of the workspace's SVG.
70
64
  * @param theme The workspace theme object.
71
- * @internal
72
65
  */
73
66
  refreshDom(svg: SVGElement, theme: Theme): void;
74
67
  /**
75
68
  * Dispose of this renderer.
76
69
  * Delete all DOM elements that this renderer and its constants created.
77
- *
78
- * @internal
79
70
  */
80
71
  dispose(): void;
81
72
  /**
@@ -114,7 +105,6 @@ export declare class Renderer implements IRegistrable {
114
105
  * @param workspace The workspace the marker belongs to.
115
106
  * @param marker The marker.
116
107
  * @returns The object in charge of drawing the marker.
117
- * @internal
118
108
  */
119
109
  makeMarkerDrawer(workspace: WorkspaceSvg, marker: Marker): MarkerSvg;
120
110
  /**
@@ -123,7 +113,6 @@ export declare class Renderer implements IRegistrable {
123
113
  * @param root The root SVG element.
124
114
  * @param style The style object to use for colouring.
125
115
  * @returns The renderer path object.
126
- * @internal
127
116
  */
128
117
  makePathObject(root: SVGElement, style: BlockStyle): IPathObject;
129
118
  /**
@@ -131,7 +120,6 @@ export declare class Renderer implements IRegistrable {
131
120
  * called, the renderer has already been initialized.
132
121
  *
133
122
  * @returns The constant provider.
134
- * @internal
135
123
  */
136
124
  getConstants(): ConstantProvider;
137
125
  /**
@@ -139,7 +127,6 @@ export declare class Renderer implements IRegistrable {
139
127
  *
140
128
  * @param _conn The connection to determine whether or not to highlight.
141
129
  * @returns True if we should highlight the connection.
142
- * @internal
143
130
  */
144
131
  shouldHighlightConnection(_conn: Connection): boolean;
145
132
  /**
@@ -153,9 +140,8 @@ export declare class Renderer implements IRegistrable {
153
140
  * @param orphanBlock The orphan block that wants to find a home.
154
141
  * @param localType The type of the connection being dragged.
155
142
  * @returns Whether there is a home for the orphan or not.
156
- * @internal
157
143
  */
158
- orphanCanConnectAtEnd(topBlock: BlockSvg, orphanBlock: BlockSvg, localType: number): boolean;
144
+ protected orphanCanConnectAtEnd(topBlock: BlockSvg, orphanBlock: BlockSvg, localType: number): boolean;
159
145
  /**
160
146
  * Chooses a connection preview method based on the available connection, the
161
147
  * current dragged connection, and the block being dragged.
@@ -164,7 +150,6 @@ export declare class Renderer implements IRegistrable {
164
150
  * @param local The connection currently being dragged.
165
151
  * @param topBlock The block currently being dragged.
166
152
  * @returns The preview type to display.
167
- * @internal
168
153
  */
169
154
  getConnectionPreviewMethod(closest: RenderedConnection, local: RenderedConnection, topBlock: BlockSvg): PreviewType;
170
155
  /**
@@ -6,8 +6,6 @@
6
6
  import { ConstantProvider as BaseConstantProvider } from '../common/constants.js';
7
7
  /**
8
8
  * An object that provides constants for rendering blocks in Geras mode.
9
- *
10
- * @alias Blockly.geras.ConstantProvider
11
9
  */
12
10
  export declare class ConstantProvider extends BaseConstantProvider {
13
11
  FIELD_TEXT_BASELINE_CENTER: boolean;
@@ -18,9 +16,6 @@ export declare class ConstantProvider extends BaseConstantProvider {
18
16
  */
19
17
  MAX_BOTTOM_WIDTH: number;
20
18
  STATEMENT_BOTTOM_SPACER: number;
21
- /**
22
- * @internal
23
- */
24
19
  constructor();
25
20
  getCSS_(selector: string): string[];
26
21
  }
@@ -11,9 +11,8 @@ import { Highlighter } from './highlighter.js';
11
11
  import type { RenderInfo } from './info.js';
12
12
  import type { InlineInput } from './measurables/inline_input.js';
13
13
  /**
14
- * An object that draws a block based on the given rendering information.
15
- *
16
- * @alias Blockly.geras.Drawer
14
+ * An object that draws a block based on the given rendering information,
15
+ * customized for the geras renderer.
17
16
  */
18
17
  export declare class Drawer extends BaseDrawer {
19
18
  highlighter_: Highlighter;
@@ -22,7 +21,6 @@ export declare class Drawer extends BaseDrawer {
22
21
  * @param block The block to render.
23
22
  * @param info An object containing all information needed to render this
24
23
  * block.
25
- * @internal
26
24
  */
27
25
  constructor(block: BlockSvg, info: RenderInfo);
28
26
  draw(): void;
@@ -46,8 +46,6 @@ export interface JaggedTeeth {
46
46
  * Some highlights are simple offsets of the parent paths and can be generated
47
47
  * programmatically. Others, especially on curves, are just made out of piles
48
48
  * of constants and are hard to tweak.
49
- *
50
- * @alias Blockly.geras.HighlightConstantProvider
51
49
  */
52
50
  export declare class HighlightConstantProvider {
53
51
  constantProvider: ConstantProvider;
@@ -62,50 +60,41 @@ export declare class HighlightConstantProvider {
62
60
  START_HAT: StartHat;
63
61
  /**
64
62
  * @param constants The rendering constants provider.
65
- * @internal
66
63
  */
67
64
  constructor(constants: ConstantProvider);
68
65
  /**
69
66
  * Initialize shape objects based on the constants set in the constructor.
70
- *
71
- * @internal
72
67
  */
73
68
  init(): void;
74
69
  /**
75
70
  * @returns An object containing sizing and path information about inside
76
71
  * corner highlights.
77
- * @internal
78
72
  */
79
- makeInsideCorner(): InsideCorner;
73
+ protected makeInsideCorner(): InsideCorner;
80
74
  /**
81
75
  * @returns An object containing sizing and path information about outside
82
76
  * corner highlights.
83
- * @internal
84
77
  */
85
- makeOutsideCorner(): OutsideCorner;
78
+ protected makeOutsideCorner(): OutsideCorner;
86
79
  /**
87
80
  * @returns An object containing sizing and path information about puzzle tab
88
81
  * highlights.
89
- * @internal
90
82
  */
91
- makePuzzleTab(): PuzzleTab;
83
+ protected makePuzzleTab(): PuzzleTab;
92
84
  /**
93
85
  * @returns An object containing sizing and path information about notch
94
86
  * highlights.
95
- * @internal
96
87
  */
97
- makeNotch(): Notch;
88
+ protected makeNotch(): Notch;
98
89
  /**
99
90
  * @returns An object containing sizing and path information about collapsed
100
91
  * block edge highlights.
101
- * @internal
102
92
  */
103
- makeJaggedTeeth(): JaggedTeeth;
93
+ protected makeJaggedTeeth(): JaggedTeeth;
104
94
  /**
105
95
  * @returns An object containing sizing and path information about start
106
96
  * highlights.
107
- * @internal
108
97
  */
109
- makeStartHat(): StartHat;
98
+ protected makeStartHat(): StartHat;
110
99
  }
111
100
  //# sourceMappingURL=highlight_constants.d.ts.map
@@ -20,8 +20,6 @@ import type { InlineInput } from './measurables/inline_input.js';
20
20
  * position of each part of the block. The resulting paths are not continuous
21
21
  * or closed paths. The highlights for tabs and notches are loosely based on
22
22
  * tab and notch shapes, but are not exactly the same.
23
- *
24
- * @alias Blockly.geras.Highlighter
25
23
  */
26
24
  export declare class Highlighter {
27
25
  info_: RenderInfo;
@@ -40,69 +38,58 @@ export declare class Highlighter {
40
38
  /**
41
39
  * @param info An object containing all information needed to render this
42
40
  * block.
43
- * @internal
44
41
  */
45
42
  constructor(info: RenderInfo);
46
43
  /**
47
44
  * Get the steps for the highlight path.
48
45
  *
49
46
  * @returns The steps for the highlight path.
50
- * @internal
51
47
  */
52
48
  getPath(): string;
53
49
  /**
54
50
  * Add a highlight to the top corner of a block.
55
51
  *
56
52
  * @param row The top row of the block.
57
- * @internal
58
53
  */
59
54
  drawTopCorner(row: TopRow): void;
60
55
  /**
61
56
  * Add a highlight on a jagged edge for a collapsed block.
62
57
  *
63
58
  * @param row The row to highlight.
64
- * @internal
65
59
  */
66
60
  drawJaggedEdge_(row: Row): void;
67
61
  /**
68
62
  * Add a highlight on a value input.
69
63
  *
70
64
  * @param row The row the input belongs to.
71
- * @internal
72
65
  */
73
66
  drawValueInput(row: Row): void;
74
67
  /**
75
68
  * Add a highlight on a statement input.
76
69
  *
77
70
  * @param row The row to highlight.
78
- * @internal
79
71
  */
80
72
  drawStatementInput(row: Row): void;
81
73
  /**
82
74
  * Add a highlight on the right side of a row.
83
75
  *
84
76
  * @param row The row to highlight.
85
- * @internal
86
77
  */
87
78
  drawRightSideRow(row: Row): void;
88
79
  /**
89
80
  * Add a highlight to the bottom row.
90
81
  *
91
82
  * @param row The row to highlight.
92
- * @internal
93
83
  */
94
84
  drawBottomRow(row: BottomRow): void;
95
85
  /**
96
86
  * Draw the highlight on the left side of the block.
97
- *
98
- * @internal
99
87
  */
100
88
  drawLeft(): void;
101
89
  /**
102
90
  * Add a highlight to an inline input.
103
91
  *
104
92
  * @param input The input to highlight.
105
- * @internal
106
93
  */
107
94
  drawInlineInput(input: InlineInput): void;
108
95
  }
@@ -11,13 +11,12 @@ import type { Row } from '../measurables/row.js';
11
11
  import type { ConstantProvider } from './constants.js';
12
12
  import type { Renderer } from './renderer.js';
13
13
  /**
14
- * An object containing all sizing information needed to draw this block.
14
+ * An object containing all sizing information needed to draw this block,
15
+ * customized for the geras renderer.
15
16
  *
16
17
  * This measure pass does not propagate changes to the block (although fields
17
18
  * may choose to rerender when getSize() is called). However, calling it
18
19
  * repeatedly may be expensive.
19
- *
20
- * @alias Blockly.geras.RenderInfo
21
20
  */
22
21
  export declare class RenderInfo extends BaseRenderInfo {
23
22
  constants_: ConstantProvider;
@@ -25,14 +24,12 @@ export declare class RenderInfo extends BaseRenderInfo {
25
24
  /**
26
25
  * @param renderer The renderer in use.
27
26
  * @param block The block to measure.
28
- * @internal
29
27
  */
30
28
  constructor(renderer: Renderer, block: BlockSvg);
31
29
  /**
32
30
  * Get the block renderer in use.
33
31
  *
34
32
  * @returns The block renderer in use.
35
- * @internal
36
33
  */
37
34
  getRenderer(): Renderer;
38
35
  populateBottomRow_(): void;
@@ -10,15 +10,12 @@ import type { ConstantProvider as GerasConstantProvider } from '../constants.js'
10
10
  /**
11
11
  * An object containing information about the space an inline input takes up
12
12
  * during rendering.
13
- *
14
- * @alias Blockly.geras.InlineInput
15
13
  */
16
14
  export declare class InlineInput extends BaseInlineInput {
17
15
  constants_: GerasConstantProvider;
18
16
  /**
19
17
  * @param constants The rendering constants provider.
20
18
  * @param input The inline input to measure and store information for.
21
- * @internal
22
19
  */
23
20
  constructor(constants: BaseConstantProvider, input: Input);
24
21
  }
@@ -10,15 +10,12 @@ import type { ConstantProvider as GerasConstantProvider } from '../constants.js'
10
10
  /**
11
11
  * An object containing information about the space a statement input takes up
12
12
  * during rendering.
13
- *
14
- * @alias Blockly.geras.StatementInput
15
13
  */
16
14
  export declare class StatementInput extends BaseStatementInput {
17
15
  constants_: GerasConstantProvider;
18
16
  /**
19
17
  * @param constants The rendering constants provider.
20
18
  * @param input The statement input to measure and store information for.
21
- * @internal
22
19
  */
23
20
  constructor(constants: BaseConstantProvider, input: Input);
24
21
  }
@@ -10,26 +10,19 @@ import type { ConstantProvider } from './constants.js';
10
10
  /**
11
11
  * An object that handles creating and setting each of the SVG elements
12
12
  * used by the renderer.
13
- *
14
- * @alias Blockly.geras.PathObject
15
13
  */
16
14
  export declare class PathObject extends BasePathObject {
17
15
  constants: ConstantProvider;
18
- /** @internal */
19
16
  svgPathDark: SVGElement;
20
- /** @internal */
21
17
  svgPathLight: SVGElement;
22
18
  /**
23
19
  * The colour of the dark path on the block in '#RRGGBB' format.
24
- *
25
- * @internal
26
20
  */
27
21
  colourDark: string;
28
22
  /**
29
23
  * @param root The root SVG element.
30
24
  * @param style The style object to use for colouring.
31
25
  * @param constants The renderer's constants.
32
- * @internal
33
26
  */
34
27
  constructor(root: SVGElement, style: BlockStyle, constants: ConstantProvider);
35
28
  setPath(mainPath: string): void;
@@ -37,7 +30,6 @@ export declare class PathObject extends BasePathObject {
37
30
  * Set the highlight path generated by the renderer onto the SVG element.
38
31
  *
39
32
  * @param highlightPath The highlight path.
40
- * @internal
41
33
  */
42
34
  setHighlightPath(highlightPath: string): void;
43
35
  flipRTL(): void;
@@ -13,23 +13,23 @@ import { HighlightConstantProvider } from './highlight_constants.js';
13
13
  import { RenderInfo } from './info.js';
14
14
  import { PathObject } from './path_object.js';
15
15
  /**
16
- * The geras renderer.
16
+ * The geras renderer. This renderer was designed to be backwards compatible
17
+ * with pre-2019 Blockly. Newer projects that are not constrained by backwards
18
+ * compatibility should use thrasos, which is a more modern take on this
19
+ * renderer.
17
20
  *
18
- * @alias Blockly.geras.Renderer
21
+ * Geras is the ancient Greek spirit of old age.
19
22
  */
20
23
  export declare class Renderer extends BaseRenderer {
21
24
  /** The renderer's highlight constant provider. */
22
25
  private highlightConstants_;
23
26
  /**
24
27
  * @param name The renderer name.
25
- * @internal
26
28
  */
27
29
  constructor(name: string);
28
30
  /**
29
31
  * Initialize the renderer. Geras has a highlight provider in addition to
30
32
  * the normal constant provider.
31
- *
32
- * @internal
33
33
  */
34
34
  init(theme: Theme, opt_rendererOverrides?: {
35
35
  [rendererConstant: string]: any;
@@ -58,7 +58,6 @@ export declare class Renderer extends BaseRenderer {
58
58
  * @param root The root SVG element.
59
59
  * @param style The style object to use for colouring.
60
60
  * @returns The renderer path object.
61
- * @internal
62
61
  */
63
62
  makePathObject(root: SVGElement, style: BlockStyle): PathObject;
64
63
  /**
@@ -72,7 +71,6 @@ export declare class Renderer extends BaseRenderer {
72
71
  * is called, the renderer has already been initialized.
73
72
  *
74
73
  * @returns The highlight constant provider.
75
- * @internal
76
74
  */
77
75
  getHighlightConstants(): HighlightConstantProvider;
78
76
  }
@@ -8,8 +8,6 @@ import type { ConstantProvider } from '../common/constants.js';
8
8
  * The base class to represent a part of a block that takes up space during
9
9
  * rendering. The constructor for each non-spacer Measurable records the size
10
10
  * of the block element (e.g. field, statement input).
11
- *
12
- * @alias Blockly.blockRendering.Measurable
13
11
  */
14
12
  export declare class Measurable {
15
13
  width: number;
@@ -22,7 +20,6 @@ export declare class Measurable {
22
20
  protected readonly constants_: ConstantProvider;
23
21
  /**
24
22
  * @param constants The rendering constants provider.
25
- * @internal
26
23
  */
27
24
  constructor(constants: ConstantProvider);
28
25
  }
@@ -12,28 +12,20 @@ import { Row } from './row.js';
12
12
  * a block as well as spacing information for the bottom row.
13
13
  * Elements in a bottom row can consist of corners, spacers and next
14
14
  * connections.
15
- *
16
- * @alias Blockly.blockRendering.BottomRow
17
15
  */
18
16
  export declare class BottomRow extends Row {
19
17
  /**
20
18
  * Whether this row has a next connection.
21
- *
22
- * @internal
23
19
  */
24
20
  hasNextConnection: boolean;
25
21
  /**
26
22
  * The next connection on the row, if any.
27
- *
28
- * @internal
29
23
  */
30
24
  connection: NextConnection | null;
31
25
  /**
32
26
  * The amount that the bottom of the block extends below the horizontal
33
27
  * edge, e.g. because of a next connection. Must be non-negative (see
34
28
  * #2820).
35
- *
36
- * @internal
37
29
  */
38
30
  descenderHeight: number;
39
31
  /**
@@ -43,7 +35,6 @@ export declare class BottomRow extends Row {
43
35
  baseline: number;
44
36
  /**
45
37
  * @param constants The rendering constants provider.
46
- * @internal
47
38
  */
48
39
  constructor(constants: ConstantProvider);
49
40
  /**
@@ -9,8 +9,6 @@ import { Measurable } from './base.js';
9
9
  /**
10
10
  * The base class to represent a connection and the space that it takes up on
11
11
  * the block.
12
- *
13
- * @alias Blockly.blockRendering.Connection
14
12
  */
15
13
  export declare class Connection extends Measurable {
16
14
  connectionModel: RenderedConnection;
@@ -20,7 +18,6 @@ export declare class Connection extends Measurable {
20
18
  * @param constants The rendering constants provider.
21
19
  * @param connectionModel The connection object on the block that this
22
20
  * represents.
23
- * @internal
24
21
  */
25
22
  constructor(constants: ConstantProvider, connectionModel: RenderedConnection);
26
23
  }
@@ -9,8 +9,6 @@ import { InputConnection } from './input_connection.js';
9
9
  /**
10
10
  * An object containing information about the space an external value input
11
11
  * takes up during rendering
12
- *
13
- * @alias Blockly.blockRendering.ExternalValueInput
14
12
  */
15
13
  export declare class ExternalValueInput extends InputConnection {
16
14
  height: number;
@@ -21,7 +19,6 @@ export declare class ExternalValueInput extends InputConnection {
21
19
  /**
22
20
  * @param constants The rendering constants provider.
23
21
  * @param input The external value input to measure and store information for.
24
- * @internal
25
22
  */
26
23
  constructor(constants: ConstantProvider, input: Input);
27
24
  }
@@ -10,8 +10,6 @@ import { Measurable } from './base.js';
10
10
  /**
11
11
  * An object containing information about the space a field takes up during
12
12
  * rendering
13
- *
14
- * @alias Blockly.blockRendering.Field
15
13
  */
16
14
  export declare class Field extends Measurable {
17
15
  field: BlocklyField;
@@ -24,7 +22,6 @@ export declare class Field extends Measurable {
24
22
  * @param constants The rendering constants provider.
25
23
  * @param field The field to measure and store information for.
26
24
  * @param parentInput The parent input for the field.
27
- * @internal
28
25
  */
29
26
  constructor(constants: ConstantProvider, field: BlocklyField, parentInput: Input);
30
27
  }