blockly 9.3.0-beta.0 → 9.3.1

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 (282) hide show
  1. package/blockly.min.js +1674 -1520
  2. package/blockly_compressed.js +1313 -1152
  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_drag_surface.d.ts +135 -0
  10. package/core/block_dragger.d.ts +2 -7
  11. package/core/block_svg.d.ts +72 -9
  12. package/core/blockly.d.ts +29 -58
  13. package/core/blockly_options.d.ts +0 -2
  14. package/core/blocks.d.ts +0 -2
  15. package/core/browser_events.d.ts +0 -9
  16. package/core/bubble.d.ts +6 -4
  17. package/core/bubble_dragger.d.ts +2 -3
  18. package/core/bump_objects.d.ts +0 -3
  19. package/core/clipboard.d.ts +0 -3
  20. package/core/comment.d.ts +6 -10
  21. package/core/common.d.ts +0 -12
  22. package/core/component_manager.d.ts +0 -2
  23. package/core/connection.d.ts +19 -6
  24. package/core/connection_checker.d.ts +1 -3
  25. package/core/connection_db.d.ts +0 -2
  26. package/core/connection_type.d.ts +0 -2
  27. package/core/constants.d.ts +0 -4
  28. package/core/contextmenu.d.ts +0 -11
  29. package/core/contextmenu_items.d.ts +0 -27
  30. package/core/contextmenu_registry.d.ts +0 -2
  31. package/core/css.d.ts +0 -2
  32. package/core/delete_area.d.ts +0 -2
  33. package/core/dialog.d.ts +0 -6
  34. package/core/drag_target.d.ts +0 -2
  35. package/core/events/events_abstract.d.ts +0 -3
  36. package/core/events/events_block_base.d.ts +0 -2
  37. package/core/events/events_block_change.d.ts +0 -2
  38. package/core/events/events_block_create.d.ts +0 -2
  39. package/core/events/events_block_delete.d.ts +0 -2
  40. package/core/events/events_block_drag.d.ts +0 -2
  41. package/core/events/events_block_move.d.ts +0 -2
  42. package/core/events/events_bubble_open.d.ts +0 -2
  43. package/core/events/events_click.d.ts +0 -2
  44. package/core/events/events_comment_base.d.ts +0 -2
  45. package/core/events/events_comment_change.d.ts +0 -2
  46. package/core/events/events_comment_create.d.ts +0 -2
  47. package/core/events/events_comment_delete.d.ts +0 -2
  48. package/core/events/events_comment_move.d.ts +0 -2
  49. package/core/events/events_marker_move.d.ts +0 -2
  50. package/core/events/events_selected.d.ts +0 -2
  51. package/core/events/events_theme_change.d.ts +0 -2
  52. package/core/events/events_toolbox_item_select.d.ts +0 -2
  53. package/core/events/events_trashcan_open.d.ts +0 -2
  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 +0 -2
  57. package/core/events/events_var_create.d.ts +0 -2
  58. package/core/events/events_viewport.d.ts +0 -2
  59. package/core/events/utils.d.ts +0 -73
  60. package/core/events/workspace_events.d.ts +0 -2
  61. package/core/extensions.d.ts +0 -8
  62. package/core/field.d.ts +16 -15
  63. package/core/field_angle.d.ts +60 -50
  64. package/core/field_checkbox.d.ts +22 -10
  65. package/core/field_colour.d.ts +55 -42
  66. package/core/field_dropdown.d.ts +34 -18
  67. package/core/field_image.d.ts +9 -12
  68. package/core/field_input.d.ts +34 -11
  69. package/core/field_label.d.ts +7 -10
  70. package/core/field_label_serializable.d.ts +4 -6
  71. package/core/field_multilineinput.d.ts +34 -12
  72. package/core/field_number.d.ts +27 -19
  73. package/core/field_registry.d.ts +0 -3
  74. package/core/field_textinput.d.ts +28 -12
  75. package/core/field_variable.d.ts +28 -16
  76. package/core/flyout_base.d.ts +5 -6
  77. package/core/flyout_button.d.ts +2 -2
  78. package/core/flyout_horizontal.d.ts +0 -2
  79. package/core/flyout_metrics_manager.d.ts +0 -2
  80. package/core/flyout_vertical.d.ts +0 -2
  81. package/core/generator.d.ts +0 -1
  82. package/core/gesture.d.ts +4 -17
  83. package/core/grid.d.ts +0 -2
  84. package/core/icon.d.ts +0 -2
  85. package/core/inject.d.ts +0 -1
  86. package/core/input.d.ts +0 -3
  87. package/core/input_types.d.ts +0 -2
  88. package/core/insertion_marker_manager.d.ts +6 -6
  89. package/core/interfaces/i_ast_node_location.d.ts +0 -2
  90. package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
  91. package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
  92. package/core/interfaces/i_autohideable.d.ts +0 -2
  93. package/core/interfaces/i_block_dragger.d.ts +1 -3
  94. package/core/interfaces/i_bounded_element.d.ts +0 -2
  95. package/core/interfaces/i_bubble.d.ts +6 -4
  96. package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
  97. package/core/interfaces/i_component.d.ts +0 -2
  98. package/core/interfaces/i_connection_checker.d.ts +0 -2
  99. package/core/interfaces/i_contextmenu.d.ts +0 -1
  100. package/core/interfaces/i_copyable.d.ts +3 -2
  101. package/core/interfaces/i_deletable.d.ts +0 -2
  102. package/core/interfaces/i_delete_area.d.ts +0 -2
  103. package/core/interfaces/i_drag_target.d.ts +0 -2
  104. package/core/interfaces/i_draggable.d.ts +0 -2
  105. package/core/interfaces/i_flyout.d.ts +0 -2
  106. package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
  107. package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
  108. package/core/interfaces/i_metrics_manager.d.ts +0 -2
  109. package/core/interfaces/i_movable.d.ts +0 -2
  110. package/core/interfaces/i_positionable.d.ts +0 -2
  111. package/core/interfaces/i_procedure_model.d.ts +0 -5
  112. package/core/interfaces/i_registrable.d.ts +0 -2
  113. package/core/interfaces/i_selectable.d.ts +0 -2
  114. package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
  115. package/core/interfaces/i_serializer.d.ts +0 -2
  116. package/core/interfaces/i_styleable.d.ts +0 -2
  117. package/core/interfaces/i_toolbox.d.ts +0 -2
  118. package/core/interfaces/i_toolbox_item.d.ts +0 -2
  119. package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
  120. package/core/internal_constants.d.ts +0 -5
  121. package/core/keyboard_nav/ast_node.d.ts +0 -3
  122. package/core/keyboard_nav/basic_cursor.d.ts +0 -3
  123. package/core/keyboard_nav/cursor.d.ts +0 -3
  124. package/core/keyboard_nav/marker.d.ts +0 -2
  125. package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
  126. package/core/marker_manager.d.ts +0 -2
  127. package/core/menu.d.ts +0 -2
  128. package/core/menuitem.d.ts +0 -2
  129. package/core/metrics_manager.d.ts +0 -2
  130. package/core/mutator.d.ts +0 -2
  131. package/core/names.d.ts +0 -3
  132. package/core/options.d.ts +0 -2
  133. package/core/positionable_helpers.d.ts +0 -7
  134. package/core/procedures.d.ts +2 -25
  135. package/core/registry.d.ts +0 -11
  136. package/core/render_management.d.ts +15 -0
  137. package/core/rendered_connection.d.ts +22 -9
  138. package/core/renderers/common/block_rendering.d.ts +0 -3
  139. package/core/renderers/common/constants.d.ts +6 -51
  140. package/core/renderers/common/debug.d.ts +0 -3
  141. package/core/renderers/common/debugger.d.ts +9 -23
  142. package/core/renderers/common/drawer.d.ts +0 -5
  143. package/core/renderers/common/i_path_object.d.ts +0 -17
  144. package/core/renderers/common/info.d.ts +2 -12
  145. package/core/renderers/common/marker_svg.d.ts +2 -4
  146. package/core/renderers/common/path_object.d.ts +0 -24
  147. package/core/renderers/common/renderer.d.ts +5 -20
  148. package/core/renderers/geras/constants.d.ts +0 -5
  149. package/core/renderers/geras/drawer.d.ts +2 -4
  150. package/core/renderers/geras/highlight_constants.d.ts +6 -17
  151. package/core/renderers/geras/highlighter.d.ts +0 -13
  152. package/core/renderers/geras/info.d.ts +2 -5
  153. package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
  154. package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
  155. package/core/renderers/geras/path_object.d.ts +0 -8
  156. package/core/renderers/geras/renderer.d.ts +5 -7
  157. package/core/renderers/measurables/base.d.ts +0 -3
  158. package/core/renderers/measurables/bottom_row.d.ts +0 -9
  159. package/core/renderers/measurables/connection.d.ts +0 -3
  160. package/core/renderers/measurables/external_value_input.d.ts +0 -3
  161. package/core/renderers/measurables/field.d.ts +0 -3
  162. package/core/renderers/measurables/hat.d.ts +0 -3
  163. package/core/renderers/measurables/icon.d.ts +2 -5
  164. package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
  165. package/core/renderers/measurables/inline_input.d.ts +1 -4
  166. package/core/renderers/measurables/input_connection.d.ts +1 -4
  167. package/core/renderers/measurables/input_row.d.ts +0 -7
  168. package/core/renderers/measurables/jagged_edge.d.ts +2 -5
  169. package/core/renderers/measurables/next_connection.d.ts +0 -3
  170. package/core/renderers/measurables/output_connection.d.ts +0 -3
  171. package/core/renderers/measurables/previous_connection.d.ts +0 -3
  172. package/core/renderers/measurables/round_corner.d.ts +0 -3
  173. package/core/renderers/measurables/row.d.ts +0 -39
  174. package/core/renderers/measurables/spacer_row.d.ts +0 -3
  175. package/core/renderers/measurables/square_corner.d.ts +0 -3
  176. package/core/renderers/measurables/statement_input.d.ts +0 -3
  177. package/core/renderers/measurables/top_row.d.ts +0 -6
  178. package/core/renderers/measurables/types.d.ts +0 -31
  179. package/core/renderers/minimalist/constants.d.ts +2 -4
  180. package/core/renderers/minimalist/drawer.d.ts +0 -3
  181. package/core/renderers/minimalist/info.d.ts +0 -4
  182. package/core/renderers/minimalist/renderer.d.ts +0 -3
  183. package/core/renderers/thrasos/info.d.ts +0 -4
  184. package/core/renderers/thrasos/renderer.d.ts +3 -3
  185. package/core/renderers/zelos/constants.d.ts +3 -17
  186. package/core/renderers/zelos/drawer.d.ts +0 -3
  187. package/core/renderers/zelos/info.d.ts +0 -4
  188. package/core/renderers/zelos/marker_svg.d.ts +0 -2
  189. package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
  190. package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
  191. package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
  192. package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
  193. package/core/renderers/zelos/path_object.d.ts +0 -9
  194. package/core/renderers/zelos/renderer.d.ts +3 -5
  195. package/core/scrollbar.d.ts +0 -2
  196. package/core/scrollbar_pair.d.ts +0 -2
  197. package/core/serialization/blocks.d.ts +3 -9
  198. package/core/serialization/exceptions.d.ts +0 -8
  199. package/core/serialization/priorities.d.ts +0 -4
  200. package/core/serialization/registry.d.ts +0 -2
  201. package/core/serialization/variables.d.ts +0 -4
  202. package/core/serialization/workspaces.d.ts +0 -2
  203. package/core/shortcut_items.d.ts +0 -17
  204. package/core/shortcut_registry.d.ts +0 -2
  205. package/core/sprites.d.ts +0 -2
  206. package/core/theme/classic.d.ts +0 -2
  207. package/core/theme/zelos.d.ts +0 -2
  208. package/core/theme.d.ts +0 -2
  209. package/core/theme_manager.d.ts +3 -6
  210. package/core/toolbox/category.d.ts +5 -7
  211. package/core/toolbox/collapsible_category.d.ts +0 -4
  212. package/core/toolbox/separator.d.ts +0 -2
  213. package/core/toolbox/toolbox.d.ts +2 -5
  214. package/core/toolbox/toolbox_item.d.ts +0 -2
  215. package/core/tooltip.d.ts +0 -29
  216. package/core/touch.d.ts +0 -13
  217. package/core/trashcan.d.ts +0 -2
  218. package/core/utils/aria.d.ts +0 -6
  219. package/core/utils/array.d.ts +0 -1
  220. package/core/utils/colour.d.ts +0 -12
  221. package/core/utils/coordinate.d.ts +0 -2
  222. package/core/utils/deprecation.d.ts +0 -1
  223. package/core/utils/dom.d.ts +0 -25
  224. package/core/utils/idgenerator.d.ts +0 -2
  225. package/core/utils/keycodes.d.ts +0 -2
  226. package/core/utils/math.d.ts +0 -3
  227. package/core/utils/metrics.d.ts +0 -1
  228. package/core/utils/object.d.ts +0 -4
  229. package/core/utils/parsing.d.ts +0 -4
  230. package/core/utils/rect.d.ts +0 -2
  231. package/core/utils/size.d.ts +0 -2
  232. package/core/utils/string.d.ts +0 -6
  233. package/core/utils/style.d.ts +0 -8
  234. package/core/utils/svg.d.ts +0 -2
  235. package/core/utils/svg_math.d.ts +0 -6
  236. package/core/utils/svg_paths.d.ts +0 -8
  237. package/core/utils/toolbox.d.ts +2 -35
  238. package/core/utils/useragent.d.ts +0 -8
  239. package/core/utils/xml.d.ts +9 -8
  240. package/core/utils.d.ts +0 -12
  241. package/core/variable_map.d.ts +1 -3
  242. package/core/variable_model.d.ts +0 -1
  243. package/core/variables.d.ts +13 -17
  244. package/core/variables_dynamic.d.ts +0 -4
  245. package/core/warning.d.ts +0 -2
  246. package/core/widgetdiv.d.ts +0 -10
  247. package/core/workspace.d.ts +3 -3
  248. package/core/workspace_audio.d.ts +0 -2
  249. package/core/workspace_comment.d.ts +1 -3
  250. package/core/workspace_comment_svg.d.ts +16 -5
  251. package/core/workspace_drag_surface_svg.d.ts +74 -0
  252. package/core/workspace_dragger.d.ts +3 -2
  253. package/core/workspace_svg.d.ts +48 -8
  254. package/core/xml.d.ts +1 -13
  255. package/core/zoom_controls.d.ts +4 -15
  256. package/dart_compressed.js +199 -199
  257. package/dart_compressed.js.map +1 -1
  258. package/javascript_compressed.js +168 -168
  259. package/javascript_compressed.js.map +1 -1
  260. package/lua_compressed.js +211 -211
  261. package/lua_compressed.js.map +1 -1
  262. package/msg/bn.js +2 -2
  263. package/msg/bs.js +7 -7
  264. package/msg/de.js +1 -1
  265. package/msg/fi.js +1 -1
  266. package/msg/fr.js +3 -3
  267. package/msg/ia.js +5 -5
  268. package/msg/kn.js +5 -5
  269. package/msg/ko.js +1 -1
  270. package/msg/lb.js +22 -22
  271. package/msg/sd.js +9 -9
  272. package/msg/skr-arab.js +2 -2
  273. package/msg/sl.js +18 -18
  274. package/msg/sw.js +1 -1
  275. package/msg/zh-hans.js +6 -6
  276. package/msg/zh-hant.js +2 -2
  277. package/package.json +6 -6
  278. package/php_compressed.js +185 -185
  279. package/php_compressed.js.map +1 -1
  280. package/python_compressed.js +138 -138
  281. package/python_compressed.js.map +1 -1
  282. package/core/utils/sentinel.d.ts +0 -18
@@ -12,13 +12,10 @@ import { RenderedConnection } from '../../rendered_connection.js';
12
12
  *
13
13
  * @param _root The root SVG element.
14
14
  * @param _constants The renderer's constants.
15
- * @alias Blockly.blockRendering.IPathObject
16
15
  */
17
16
  export interface IPathObject {
18
17
  /**
19
18
  * The primary path of the block.
20
- *
21
- * @internal
22
19
  */
23
20
  svgPath: SVGElement;
24
21
  /** The renderer's constant provider. */
@@ -39,7 +36,6 @@ export interface IPathObject {
39
36
  * Set the path generated by the renderer onto the respective SVG element.
40
37
  *
41
38
  * @param pathString The path.
42
- * @internal
43
39
  */
44
40
  setPath(pathString: string): void;
45
41
  /**
@@ -47,20 +43,16 @@ export interface IPathObject {
47
43
  * the paths belong to a shadow block.
48
44
  *
49
45
  * @param block The source block.
50
- * @internal
51
46
  */
52
47
  applyColour(block: BlockSvg): void;
53
48
  /**
54
49
  * Update the style.
55
50
  *
56
51
  * @param blockStyle The block style to use.
57
- * @internal
58
52
  */
59
53
  setStyle(blockStyle: BlockStyle): void;
60
54
  /**
61
55
  * Flip the SVG paths in RTL.
62
- *
63
- * @internal
64
56
  */
65
57
  flipRTL(): void;
66
58
  /**
@@ -68,7 +60,6 @@ export interface IPathObject {
68
60
  *
69
61
  * @param cursorSvg The SVG root of the cursor to be added to the block SVG
70
62
  * group.
71
- * @internal
72
63
  */
73
64
  setCursorSvg(cursorSvg: SVGElement): void;
74
65
  /**
@@ -76,7 +67,6 @@ export interface IPathObject {
76
67
  *
77
68
  * @param markerSvg The SVG root of the marker to be added to the block SVG
78
69
  * group.
79
- * @internal
80
70
  */
81
71
  setMarkerSvg(markerSvg: SVGElement): void;
82
72
  /**
@@ -84,14 +74,12 @@ export interface IPathObject {
84
74
  * often used to visually mark blocks currently being executed.
85
75
  *
86
76
  * @param highlighted True if highlighted.
87
- * @internal
88
77
  */
89
78
  updateHighlighted(highlighted: boolean): void;
90
79
  /**
91
80
  * Add or remove styling showing that a block is selected.
92
81
  *
93
82
  * @param enable True if selection is enabled, false otherwise.
94
- * @internal
95
83
  */
96
84
  updateSelected(enabled: boolean): void;
97
85
  /**
@@ -99,21 +87,18 @@ export interface IPathObject {
99
87
  *
100
88
  * @param enable True if the block is being dragged over a delete area, false
101
89
  * otherwise.
102
- * @internal
103
90
  */
104
91
  updateDraggingDelete(enabled: boolean): void;
105
92
  /**
106
93
  * Add or remove styling showing that a block is an insertion marker.
107
94
  *
108
95
  * @param enable True if the block is an insertion marker, false otherwise.
109
- * @internal
110
96
  */
111
97
  updateInsertionMarker(enabled: boolean): void;
112
98
  /**
113
99
  * Add or remove styling showing that a block is movable.
114
100
  *
115
101
  * @param enable True if the block is movable, false otherwise.
116
- * @internal
117
102
  */
118
103
  updateMovable(enabled: boolean): void;
119
104
  /**
@@ -122,7 +107,6 @@ export interface IPathObject {
122
107
  * Otherwise it will bump.
123
108
  *
124
109
  * @param enable True if styling should be added.
125
- * @internal
126
110
  */
127
111
  updateReplacementFade(enabled: boolean): void;
128
112
  /**
@@ -131,7 +115,6 @@ export interface IPathObject {
131
115
  *
132
116
  * @param conn The connection on the input to highlight.
133
117
  * @param enable True if styling should be added.
134
- * @internal
135
118
  */
136
119
  updateShapeForInputHighlight(conn: RenderedConnection, enable: boolean): void;
137
120
  }
@@ -21,8 +21,6 @@ import type { Renderer } from './renderer.js';
21
21
  * This measure pass does not propagate changes to the block (although fields
22
22
  * may choose to rerender when getSize() is called). However, calling it
23
23
  * repeatedly may be expensive.
24
- *
25
- * @alias Blockly.blockRendering.RenderInfo
26
24
  */
27
25
  export declare class RenderInfo {
28
26
  block_: BlockSvg;
@@ -57,14 +55,12 @@ export declare class RenderInfo {
57
55
  /**
58
56
  * @param renderer The renderer in use.
59
57
  * @param block The block to measure.
60
- * @internal
61
58
  */
62
59
  constructor(renderer: Renderer, block: BlockSvg);
63
60
  /**
64
61
  * Get the block renderer in use.
65
62
  *
66
63
  * @returns The block renderer in use.
67
- * @internal
68
64
  */
69
65
  getRenderer(): Renderer;
70
66
  /**
@@ -74,8 +70,6 @@ export declare class RenderInfo {
74
70
  * This measure pass does not propagate changes to the block (although fields
75
71
  * may choose to rerender when getSize() is called). However, calling it
76
72
  * repeatedly may be expensive.
77
- *
78
- * @internal
79
73
  */
80
74
  measure(): void;
81
75
  /**
@@ -85,16 +79,12 @@ export declare class RenderInfo {
85
79
  protected createRows_(): void;
86
80
  /**
87
81
  * Create all non-spacer elements that belong on the top row.
88
- *
89
- * @internal
90
82
  */
91
- populateTopRow_(): void;
83
+ protected populateTopRow_(): void;
92
84
  /**
93
85
  * Create all non-spacer elements that belong on the bottom row.
94
- *
95
- * @internal
96
86
  */
97
- populateBottomRow_(): void;
87
+ protected populateBottomRow_(): void;
98
88
  /**
99
89
  * Add an input element to the active row, if needed, and record the type of
100
90
  * the input on the row.
@@ -11,9 +11,8 @@ import type { RenderedConnection } from '../../rendered_connection.js';
11
11
  import type { WorkspaceSvg } from '../../workspace_svg.js';
12
12
  import type { ConstantProvider, Notch, PuzzleTab } from './constants.js';
13
13
  /**
14
- * Class for a marker.
15
- *
16
- * @alias Blockly.blockRendering.MarkerSvg
14
+ * Class for a marker, containing methods for graphically rendering a marker as
15
+ * SVG.
17
16
  */
18
17
  export declare class MarkerSvg {
19
18
  private readonly workspace;
@@ -64,7 +63,6 @@ export declare class MarkerSvg {
64
63
  * Create the DOM element for the marker.
65
64
  *
66
65
  * @returns The marker controls SVG group.
67
- * @internal
68
66
  */
69
67
  createDom(): SVGElement;
70
68
  /**
@@ -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
  }