blockly 13.3.0 → 13.4.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/blockly.min.js +1006 -986
  2. package/blockly_compressed.js +888 -873
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +86 -86
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/block.d.ts +2 -2
  7. package/core/block_aria_composer.d.ts +1 -1
  8. package/core/block_svg.d.ts +7 -7
  9. package/core/bubbles/bubble.d.ts +4 -4
  10. package/core/bubbles/mini_workspace_bubble.d.ts +5 -3
  11. package/core/bubbles/text_bubble.d.ts +9 -5
  12. package/core/bubbles/textinput_bubble.d.ts +1 -1
  13. package/core/clipboard/block_paster.d.ts +5 -5
  14. package/core/clipboard/registry.d.ts +1 -1
  15. package/core/clipboard/workspace_comment_paster.d.ts +4 -4
  16. package/core/clipboard.d.ts +1 -1
  17. package/core/comments/comment_editor.d.ts +6 -6
  18. package/core/comments/comment_view.d.ts +3 -3
  19. package/core/comments/rendered_workspace_comment.d.ts +11 -11
  20. package/core/comments/workspace_comment.d.ts +2 -2
  21. package/core/common.d.ts +2 -2
  22. package/core/config.d.ts +37 -11
  23. package/core/contextmenu_registry.d.ts +2 -2
  24. package/core/events/events_block_base.d.ts +2 -1
  25. package/core/events/events_block_change.d.ts +3 -2
  26. package/core/events/events_block_create.d.ts +3 -2
  27. package/core/events/events_block_delete.d.ts +3 -2
  28. package/core/events/events_block_drag.d.ts +2 -2
  29. package/core/events/events_block_field_intermediate_change.d.ts +3 -2
  30. package/core/events/events_block_move.d.ts +2 -1
  31. package/core/events/events_click.d.ts +2 -2
  32. package/core/events/events_comment_base.d.ts +2 -1
  33. package/core/events/events_comment_change.d.ts +2 -1
  34. package/core/events/events_comment_collapse.d.ts +3 -2
  35. package/core/events/events_comment_create.d.ts +2 -1
  36. package/core/events/events_comment_delete.d.ts +2 -1
  37. package/core/events/events_comment_drag.d.ts +2 -2
  38. package/core/events/events_comment_move.d.ts +8 -2
  39. package/core/events/events_comment_resize.d.ts +2 -1
  40. package/core/events/events_selected.d.ts +1 -1
  41. package/core/events/events_theme_change.d.ts +1 -1
  42. package/core/events/events_toolbox_item_select.d.ts +1 -1
  43. package/core/events/events_trashcan_open.d.ts +1 -1
  44. package/core/events/events_var_base.d.ts +2 -1
  45. package/core/events/events_var_create.d.ts +2 -1
  46. package/core/events/events_var_delete.d.ts +2 -1
  47. package/core/events/events_var_rename.d.ts +2 -1
  48. package/core/events/events_var_type_change.d.ts +2 -1
  49. package/core/events/events_viewport.d.ts +1 -1
  50. package/core/field.d.ts +4 -3
  51. package/core/field_checkbox.d.ts +2 -1
  52. package/core/field_dropdown.d.ts +2 -1
  53. package/core/field_image.d.ts +2 -1
  54. package/core/field_input.d.ts +3 -2
  55. package/core/field_label.d.ts +2 -1
  56. package/core/field_label_serializable.d.ts +2 -1
  57. package/core/field_number.d.ts +2 -1
  58. package/core/field_textinput.d.ts +3 -2
  59. package/core/field_variable.d.ts +5 -3
  60. package/core/flyout_base.d.ts +4 -3
  61. package/core/flyout_horizontal.d.ts +13 -0
  62. package/core/flyout_metrics_manager.d.ts +2 -1
  63. package/core/generator.d.ts +1 -1
  64. package/core/gesture.d.ts +2 -2
  65. package/core/grid.d.ts +1 -1
  66. package/core/icons/icon_types.d.ts +4 -4
  67. package/core/icons/registry.d.ts +1 -1
  68. package/core/insertion_marker.d.ts +1 -1
  69. package/core/insertion_marker_previewer.d.ts +3 -3
  70. package/core/interfaces/i_bubble.d.ts +2 -2
  71. package/core/interfaces/i_comment_icon.d.ts +6 -6
  72. package/core/interfaces/i_drag_target.d.ts +2 -2
  73. package/core/interfaces/i_icon.d.ts +1 -1
  74. package/core/interfaces/i_json_block_definition.d.ts +7 -7
  75. package/core/interfaces/i_keyboard_accessible.d.ts +1 -1
  76. package/core/interfaces/i_parameter_model.d.ts +2 -2
  77. package/core/interfaces/i_paster.d.ts +3 -3
  78. package/core/interfaces/i_procedure_block.d.ts +1 -1
  79. package/core/interfaces/i_procedure_map.d.ts +1 -1
  80. package/core/interfaces/i_procedure_model.d.ts +2 -2
  81. package/core/interfaces/i_selectable.d.ts +1 -1
  82. package/core/interfaces/i_variable_backed_parameter_model.d.ts +1 -1
  83. package/core/layer_manager.d.ts +3 -3
  84. package/core/observable_procedure_map.d.ts +1 -1
  85. package/core/procedures.d.ts +1 -1
  86. package/core/render_management.d.ts +1 -1
  87. package/core/rendered_connection.d.ts +1 -1
  88. package/core/renderers/common/info.d.ts +1 -1
  89. package/core/renderers/common/path_object.d.ts +2 -2
  90. package/core/renderers/zelos/drawer.d.ts +1 -1
  91. package/core/renderers/zelos/info.d.ts +1 -1
  92. package/core/serialization/procedures.d.ts +2 -2
  93. package/core/serialization/workspace_comments.d.ts +2 -2
  94. package/core/shortcut_registry.d.ts +2 -2
  95. package/core/utils/aria.d.ts +1 -1
  96. package/core/utils/dom.d.ts +17 -2
  97. package/core/utils/style.d.ts +14 -0
  98. package/core/utils/toolbox.d.ts +0 -8
  99. package/core/variable_map.d.ts +1 -1
  100. package/core/variable_model.d.ts +1 -1
  101. package/core/variables.d.ts +1 -1
  102. package/core/workspace.d.ts +2 -2
  103. package/core/workspace_focus_target.d.ts +6 -1
  104. package/core/workspace_svg.d.ts +3 -3
  105. package/core/xml.d.ts +1 -1
  106. package/dart_compressed.js +25 -25
  107. package/dart_compressed.js.map +1 -1
  108. package/javascript_compressed.js +27 -27
  109. package/javascript_compressed.js.map +1 -1
  110. package/lua_compressed.js +24 -24
  111. package/lua_compressed.js.map +1 -1
  112. package/msg/ab.js +5 -0
  113. package/msg/ab.mjs +5 -0
  114. package/msg/ace.js +5 -0
  115. package/msg/ace.mjs +5 -0
  116. package/msg/af.js +5 -0
  117. package/msg/af.mjs +5 -0
  118. package/msg/am.js +5 -0
  119. package/msg/am.mjs +5 -0
  120. package/msg/ar.js +5 -0
  121. package/msg/ar.mjs +5 -0
  122. package/msg/ast.js +5 -0
  123. package/msg/ast.mjs +5 -0
  124. package/msg/az.js +5 -0
  125. package/msg/az.mjs +5 -0
  126. package/msg/ba.js +5 -0
  127. package/msg/ba.mjs +5 -0
  128. package/msg/bcc.js +5 -0
  129. package/msg/bcc.mjs +5 -0
  130. package/msg/be-tarask.js +5 -0
  131. package/msg/be-tarask.mjs +5 -0
  132. package/msg/be.js +5 -0
  133. package/msg/be.mjs +5 -0
  134. package/msg/bg.js +5 -0
  135. package/msg/bg.mjs +5 -0
  136. package/msg/bn.js +5 -0
  137. package/msg/bn.mjs +5 -0
  138. package/msg/br.js +5 -0
  139. package/msg/br.mjs +5 -0
  140. package/msg/bs.js +5 -0
  141. package/msg/bs.mjs +5 -0
  142. package/msg/ca.js +5 -0
  143. package/msg/ca.mjs +5 -0
  144. package/msg/ce.js +5 -0
  145. package/msg/ce.mjs +5 -0
  146. package/msg/cs.js +5 -0
  147. package/msg/cs.mjs +5 -0
  148. package/msg/csb.js +162 -157
  149. package/msg/csb.mjs +5 -0
  150. package/msg/da.js +5 -0
  151. package/msg/da.mjs +5 -0
  152. package/msg/de.js +5 -0
  153. package/msg/de.mjs +5 -0
  154. package/msg/diq.js +5 -0
  155. package/msg/diq.mjs +5 -0
  156. package/msg/dtp.js +5 -0
  157. package/msg/dtp.mjs +5 -0
  158. package/msg/dty.js +5 -0
  159. package/msg/dty.mjs +5 -0
  160. package/msg/ee.js +5 -0
  161. package/msg/ee.mjs +5 -0
  162. package/msg/el.js +5 -0
  163. package/msg/el.mjs +5 -0
  164. package/msg/en-gb.js +5 -0
  165. package/msg/en-gb.mjs +5 -0
  166. package/msg/en.js +5 -0
  167. package/msg/en.mjs +5 -0
  168. package/msg/eo.js +5 -0
  169. package/msg/eo.mjs +5 -0
  170. package/msg/es.js +5 -0
  171. package/msg/es.mjs +5 -0
  172. package/msg/et.js +5 -0
  173. package/msg/et.mjs +5 -0
  174. package/msg/eu.js +5 -0
  175. package/msg/eu.mjs +5 -0
  176. package/msg/fa.js +5 -0
  177. package/msg/fa.mjs +5 -0
  178. package/msg/fi.js +5 -0
  179. package/msg/fi.mjs +5 -0
  180. package/msg/fo.js +5 -0
  181. package/msg/fo.mjs +5 -0
  182. package/msg/fr.js +10 -5
  183. package/msg/fr.mjs +5 -0
  184. package/msg/frr.js +5 -0
  185. package/msg/frr.mjs +5 -0
  186. package/msg/ga.js +12 -7
  187. package/msg/ga.mjs +5 -0
  188. package/msg/gl.js +5 -0
  189. package/msg/gl.mjs +5 -0
  190. package/msg/gn.js +5 -0
  191. package/msg/gn.mjs +5 -0
  192. package/msg/gor.js +5 -0
  193. package/msg/gor.mjs +5 -0
  194. package/msg/ha.js +5 -0
  195. package/msg/ha.mjs +5 -0
  196. package/msg/he.js +25 -20
  197. package/msg/he.mjs +5 -0
  198. package/msg/hi.js +5 -0
  199. package/msg/hi.mjs +5 -0
  200. package/msg/hr.js +5 -0
  201. package/msg/hr.mjs +5 -0
  202. package/msg/hrx.js +5 -0
  203. package/msg/hrx.mjs +5 -0
  204. package/msg/hsb.js +5 -0
  205. package/msg/hsb.mjs +5 -0
  206. package/msg/hu.js +5 -0
  207. package/msg/hu.mjs +5 -0
  208. package/msg/hy.js +5 -0
  209. package/msg/hy.mjs +5 -0
  210. package/msg/ia.js +5 -0
  211. package/msg/ia.mjs +5 -0
  212. package/msg/id.js +5 -0
  213. package/msg/id.mjs +5 -0
  214. package/msg/ig.js +5 -0
  215. package/msg/ig.mjs +5 -0
  216. package/msg/inh.js +5 -0
  217. package/msg/inh.mjs +5 -0
  218. package/msg/is.js +5 -0
  219. package/msg/is.mjs +5 -0
  220. package/msg/it.js +5 -0
  221. package/msg/it.mjs +5 -0
  222. package/msg/ja.js +5 -0
  223. package/msg/ja.mjs +5 -0
  224. package/msg/ka.js +5 -0
  225. package/msg/ka.mjs +5 -0
  226. package/msg/kab.js +5 -0
  227. package/msg/kab.mjs +5 -0
  228. package/msg/kbd-cyrl.js +5 -0
  229. package/msg/kbd-cyrl.mjs +5 -0
  230. package/msg/km.js +5 -0
  231. package/msg/km.mjs +5 -0
  232. package/msg/kn.js +34 -29
  233. package/msg/kn.mjs +5 -0
  234. package/msg/ko.js +11 -6
  235. package/msg/ko.mjs +5 -0
  236. package/msg/krc.js +5 -0
  237. package/msg/krc.mjs +5 -0
  238. package/msg/ksh.js +5 -0
  239. package/msg/ksh.mjs +5 -0
  240. package/msg/ku-latn.js +5 -0
  241. package/msg/ku-latn.mjs +5 -0
  242. package/msg/ky.js +5 -0
  243. package/msg/ky.mjs +5 -0
  244. package/msg/la.js +5 -0
  245. package/msg/la.mjs +5 -0
  246. package/msg/lb.js +16 -11
  247. package/msg/lb.mjs +5 -0
  248. package/msg/lki.js +5 -0
  249. package/msg/lki.mjs +5 -0
  250. package/msg/lo.js +5 -0
  251. package/msg/lo.mjs +5 -0
  252. package/msg/lrc.js +5 -0
  253. package/msg/lrc.mjs +5 -0
  254. package/msg/lt.js +5 -0
  255. package/msg/lt.mjs +5 -0
  256. package/msg/lv.js +5 -0
  257. package/msg/lv.mjs +5 -0
  258. package/msg/mg.js +5 -0
  259. package/msg/mg.mjs +5 -0
  260. package/msg/mk.js +5 -0
  261. package/msg/mk.mjs +5 -0
  262. package/msg/ml.js +5 -0
  263. package/msg/ml.mjs +5 -0
  264. package/msg/mnw.js +7 -2
  265. package/msg/mnw.mjs +5 -0
  266. package/msg/ms.js +5 -0
  267. package/msg/ms.mjs +5 -0
  268. package/msg/mt.js +5 -0
  269. package/msg/mt.mjs +5 -0
  270. package/msg/my.js +5 -0
  271. package/msg/my.mjs +5 -0
  272. package/msg/mzn.js +5 -0
  273. package/msg/mzn.mjs +5 -0
  274. package/msg/nb.js +5 -0
  275. package/msg/nb.mjs +5 -0
  276. package/msg/ne.js +6 -1
  277. package/msg/ne.mjs +5 -0
  278. package/msg/nl.js +5 -0
  279. package/msg/nl.mjs +5 -0
  280. package/msg/oc.js +5 -0
  281. package/msg/oc.mjs +5 -0
  282. package/msg/olo.js +5 -0
  283. package/msg/olo.mjs +5 -0
  284. package/msg/pa.js +5 -0
  285. package/msg/pa.mjs +5 -0
  286. package/msg/pl.js +5 -0
  287. package/msg/pl.mjs +5 -0
  288. package/msg/pms.js +5 -0
  289. package/msg/pms.mjs +5 -0
  290. package/msg/ps.js +5 -0
  291. package/msg/ps.mjs +5 -0
  292. package/msg/pt-br.js +5 -0
  293. package/msg/pt-br.mjs +5 -0
  294. package/msg/pt.js +5 -0
  295. package/msg/pt.mjs +5 -0
  296. package/msg/ro.js +13 -8
  297. package/msg/ro.mjs +5 -0
  298. package/msg/ru.js +5 -0
  299. package/msg/ru.mjs +5 -0
  300. package/msg/sc.js +5 -0
  301. package/msg/sc.mjs +5 -0
  302. package/msg/sco.js +5 -0
  303. package/msg/sco.mjs +5 -0
  304. package/msg/sd.js +5 -0
  305. package/msg/sd.mjs +5 -0
  306. package/msg/shn.js +5 -0
  307. package/msg/shn.mjs +5 -0
  308. package/msg/si.js +5 -0
  309. package/msg/si.mjs +5 -0
  310. package/msg/sk.js +12 -7
  311. package/msg/sk.mjs +5 -0
  312. package/msg/skr-arab.js +487 -482
  313. package/msg/skr-arab.mjs +5 -0
  314. package/msg/sl.js +5 -0
  315. package/msg/sl.mjs +5 -0
  316. package/msg/smn.js +5 -0
  317. package/msg/smn.mjs +5 -0
  318. package/msg/sq.js +5 -0
  319. package/msg/sq.mjs +5 -0
  320. package/msg/sr-latn.js +5 -0
  321. package/msg/sr-latn.mjs +5 -0
  322. package/msg/sr.js +5 -0
  323. package/msg/sr.mjs +5 -0
  324. package/msg/sv.js +5 -0
  325. package/msg/sv.mjs +5 -0
  326. package/msg/sw.js +5 -0
  327. package/msg/sw.mjs +5 -0
  328. package/msg/ta.js +5 -0
  329. package/msg/ta.mjs +5 -0
  330. package/msg/tcy.js +6 -1
  331. package/msg/tcy.mjs +5 -0
  332. package/msg/tdd.js +23 -18
  333. package/msg/tdd.mjs +5 -0
  334. package/msg/te.js +5 -0
  335. package/msg/te.mjs +5 -0
  336. package/msg/th.js +5 -0
  337. package/msg/th.mjs +5 -0
  338. package/msg/ti.js +5 -0
  339. package/msg/ti.mjs +5 -0
  340. package/msg/tl.js +5 -0
  341. package/msg/tl.mjs +5 -0
  342. package/msg/tlh.js +5 -0
  343. package/msg/tlh.mjs +5 -0
  344. package/msg/tr.js +5 -0
  345. package/msg/tr.mjs +5 -0
  346. package/msg/ug-arab.js +5 -0
  347. package/msg/ug-arab.mjs +5 -0
  348. package/msg/uk.js +5 -0
  349. package/msg/uk.mjs +5 -0
  350. package/msg/ur.js +5 -0
  351. package/msg/ur.mjs +5 -0
  352. package/msg/uz.js +24 -19
  353. package/msg/uz.mjs +5 -0
  354. package/msg/vi.js +5 -0
  355. package/msg/vi.mjs +5 -0
  356. package/msg/xmf.js +5 -0
  357. package/msg/xmf.mjs +5 -0
  358. package/msg/yo.js +5 -0
  359. package/msg/yo.mjs +5 -0
  360. package/msg/zgh.js +5 -0
  361. package/msg/zgh.mjs +5 -0
  362. package/msg/zh-hans.js +5 -0
  363. package/msg/zh-hans.mjs +5 -0
  364. package/msg/zh-hant.js +41 -36
  365. package/msg/zh-hant.mjs +5 -0
  366. package/package.json +12 -18
  367. package/php_compressed.js +21 -21
  368. package/php_compressed.js.map +1 -1
  369. package/python_compressed.js +27 -27
  370. package/python_compressed.js.map +1 -1
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { IVariableModel, IVariableState } from '../interfaces/i_variable_model.js';
12
12
  import type { Workspace } from '../workspace.js';
13
- import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
13
+ import type { AbstractEventJson } from './events_abstract.js';
14
+ import { Abstract as AbstractEvent } from './events_abstract.js';
14
15
  /**
15
16
  * Abstract class for a variable event.
16
17
  */
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { IVariableModel, IVariableState } from '../interfaces/i_variable_model.js';
12
12
  import type { Workspace } from '../workspace.js';
13
- import { VarBase, VarBaseJson } from './events_var_base.js';
13
+ import type { VarBaseJson } from './events_var_base.js';
14
+ import { VarBase } from './events_var_base.js';
14
15
  import { EventType } from './type.js';
15
16
  /**
16
17
  * Notifies listeners that a variable model has been created.
@@ -5,7 +5,8 @@
5
5
  */
6
6
  import type { IVariableModel, IVariableState } from '../interfaces/i_variable_model.js';
7
7
  import type { Workspace } from '../workspace.js';
8
- import { VarBase, VarBaseJson } from './events_var_base.js';
8
+ import type { VarBaseJson } from './events_var_base.js';
9
+ import { VarBase } from './events_var_base.js';
9
10
  import { EventType } from './type.js';
10
11
  /**
11
12
  * Notifies listeners that a variable model has been deleted.
@@ -5,7 +5,8 @@
5
5
  */
6
6
  import type { IVariableModel, IVariableState } from '../interfaces/i_variable_model.js';
7
7
  import type { Workspace } from '../workspace.js';
8
- import { VarBase, VarBaseJson } from './events_var_base.js';
8
+ import type { VarBaseJson } from './events_var_base.js';
9
+ import { VarBase } from './events_var_base.js';
9
10
  import { EventType } from './type.js';
10
11
  /**
11
12
  * Notifies listeners that a variable model was renamed.
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { IVariableModel, IVariableState } from '../interfaces/i_variable_model.js';
12
12
  import type { Workspace } from '../workspace.js';
13
- import { VarBase, VarBaseJson } from './events_var_base.js';
13
+ import type { VarBaseJson } from './events_var_base.js';
14
+ import { VarBase } from './events_var_base.js';
14
15
  import { EventType } from './type.js';
15
16
  /**
16
17
  * Notifies listeners that a variable's type has changed.
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Workspace } from '../workspace.js';
7
- import { AbstractEventJson } from './events_abstract.js';
7
+ import type { AbstractEventJson } from './events_abstract.js';
8
8
  import { UiBase } from './events_ui_base.js';
9
9
  import { EventType } from './type.js';
10
10
  /**
package/core/field.d.ts CHANGED
@@ -16,7 +16,7 @@ import type { IFocusableNode } from './interfaces/i_focusable_node.js';
16
16
  import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
17
17
  import type { IKeyboardAccessible } from './interfaces/i_keyboard_accessible.js';
18
18
  import type { IRegistrable } from './interfaces/i_registrable.js';
19
- import { ISerializable } from './interfaces/i_serializable.js';
19
+ import type { ISerializable } from './interfaces/i_serializable.js';
20
20
  import type { ConstantProvider } from './renderers/common/constants.js';
21
21
  import type { KeyboardShortcut } from './shortcut_registry.js';
22
22
  import * as Tooltip from './tooltip.js';
@@ -726,8 +726,9 @@ export declare abstract class Field<T = any> implements IKeyboardAccessible, IRe
726
726
  */
727
727
  protected getAbsoluteXY_(): Coordinate;
728
728
  /**
729
- * Whether this field references any Blockly variables. If true it may need
730
- * to be handled differently during serialization and deserialization.
729
+ * Whether this field references any Blockly variables. If true it may need
730
+ * to be handled differently during serialization and deserialization, and
731
+ * this field's value must correspond to the ID of an existing variable.
731
732
  * Subclasses may override this.
732
733
  *
733
734
  * @returns True if this field has any variable references.
@@ -8,7 +8,8 @@
8
8
  *
9
9
  * @class
10
10
  */
11
- import { Field, FieldConfig, FieldValidator } from './field.js';
11
+ import type { FieldConfig, FieldValidator } from './field.js';
12
+ import { Field } from './field.js';
12
13
  type BoolString = 'TRUE' | 'FALSE';
13
14
  type CheckboxBool = BoolString | boolean;
14
15
  /**
@@ -3,7 +3,8 @@
3
3
  * Copyright 2012 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { Field, FieldConfig, FieldValidator } from './field.js';
6
+ import type { FieldConfig, FieldValidator } from './field.js';
7
+ import { Field } from './field.js';
7
8
  import { Menu } from './menu.js';
8
9
  import { MenuItem } from './menuitem.js';
9
10
  /**
@@ -8,7 +8,8 @@
8
8
  *
9
9
  * @class
10
10
  */
11
- import { Field, FieldConfig } from './field.js';
11
+ import type { FieldConfig } from './field.js';
12
+ import { Field } from './field.js';
12
13
  /**
13
14
  * Class for an image on a block.
14
15
  */
@@ -3,8 +3,9 @@
3
3
  * Copyright 2012 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { Field, FieldConfig, FieldValidator } from './field.js';
7
- import { Size } from './utils/size.js';
6
+ import type { FieldConfig, FieldValidator } from './field.js';
7
+ import { Field } from './field.js';
8
+ import type { Size } from './utils/size.js';
8
9
  import type { WorkspaceSvg } from './workspace_svg.js';
9
10
  /**
10
11
  * Supported types for FieldInput subclasses.
@@ -9,7 +9,8 @@
9
9
  *
10
10
  * @class
11
11
  */
12
- import { Field, FieldConfig } from './field.js';
12
+ import type { FieldConfig } from './field.js';
13
+ import { Field } from './field.js';
13
14
  /**
14
15
  * Class for a non-editable, non-serializable text field.
15
16
  */
@@ -10,7 +10,8 @@
10
10
  *
11
11
  * @class
12
12
  */
13
- import { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig } from './field_label.js';
13
+ import type { FieldLabelConfig, FieldLabelFromJsonConfig } from './field_label.js';
14
+ import { FieldLabel } from './field_label.js';
14
15
  /**
15
16
  * Class for a non-editable, serializable text field.
16
17
  */
@@ -9,7 +9,8 @@
9
9
  * @class
10
10
  */
11
11
  import { Field } from './field.js';
12
- import { FieldInput, FieldInputConfig, FieldInputValidator } from './field_input.js';
12
+ import type { FieldInputConfig, FieldInputValidator } from './field_input.js';
13
+ import { FieldInput } from './field_input.js';
13
14
  /**
14
15
  * Class for an editable number field.
15
16
  */
@@ -8,8 +8,9 @@
8
8
  *
9
9
  * @class
10
10
  */
11
- import { Field } from './field.js';
12
- import { FieldInput, FieldInputConfig, FieldInputValidator } from './field_input.js';
11
+ import type { Field } from './field.js';
12
+ import type { FieldInputConfig, FieldInputValidator } from './field_input.js';
13
+ import { FieldInput } from './field_input.js';
13
14
  /**
14
15
  * Class for an editable text field.
15
16
  */
@@ -9,9 +9,11 @@
9
9
  * @class
10
10
  */
11
11
  import type { Block } from './block.js';
12
- import { Field, FieldConfig } from './field.js';
13
- import { FieldDropdown, FieldDropdownValidator, MenuGenerator, MenuOption } from './field_dropdown.js';
14
- import { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
12
+ import type { FieldConfig } from './field.js';
13
+ import { Field } from './field.js';
14
+ import type { FieldDropdownValidator, MenuGenerator, MenuOption } from './field_dropdown.js';
15
+ import { FieldDropdown } from './field_dropdown.js';
16
+ import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
15
17
  import type { Menu } from './menu.js';
16
18
  import type { MenuItem } from './menuitem.js';
17
19
  /**
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { DeleteArea } from './delete_area.js';
7
7
  import { FlyoutItem } from './flyout_item.js';
8
- import { IAutoHideable } from './interfaces/i_autohideable.js';
8
+ import type { IAutoHideable } from './interfaces/i_autohideable.js';
9
9
  import type { IFlyout } from './interfaces/i_flyout.js';
10
10
  import type { IFlyoutInflater } from './interfaces/i_flyout_inflater.js';
11
11
  import type { Options } from './options.js';
@@ -292,11 +292,12 @@ export declare abstract class Flyout extends DeleteArea implements IAutoHideable
292
292
  * separators as needed.
293
293
  *
294
294
  * When multiple separators occur one after another, the value of the last one
295
- * takes precedence and the earlier separators in the group are removed.
295
+ * takes precedence and the earlier separators in the group are removed. A
296
+ * separator at the end is removed outright.
296
297
  *
297
298
  * @param contents The list of flyout contents to flatten separators in.
298
299
  * @returns An updated list of flyout contents with only one separator between
299
- * each non-separator item.
300
+ * each non-separator item, and none at the end.
300
301
  */
301
302
  protected normalizeSeparators(contents: FlyoutItem[]): FlyoutItem[];
302
303
  /**
@@ -53,6 +53,12 @@ export declare class HorizontalFlyout extends Flyout {
53
53
  * @param e Mouse wheel scroll event.
54
54
  */
55
55
  protected wheel_(e: WheelEvent): void;
56
+ /**
57
+ * Sets the items that will be displayed in this flyout.
58
+ *
59
+ * @param contents The new items to display in the flyout.
60
+ */
61
+ setContents(contents: FlyoutItem[]): void;
56
62
  /**
57
63
  * Lay out the blocks in the flyout.
58
64
  *
@@ -72,5 +78,12 @@ export declare class HorizontalFlyout extends Flyout {
72
78
  * For RTL: Lay out the blocks right-aligned.
73
79
  */
74
80
  protected reflowInternal_(): void;
81
+ /**
82
+ * Shifts the contents so they end at the flyout's right padding. Contents
83
+ * wider than the flyout start at the left padding instead, keeping them
84
+ * within the scrollable area; scrollToStart then scrolls to the right end,
85
+ * so they still read from the right and overflow to the left.
86
+ */
87
+ private alignContentsRight;
75
88
  }
76
89
  //# sourceMappingURL=flyout_horizontal.d.ts.map
@@ -9,7 +9,8 @@
9
9
  * @class
10
10
  */
11
11
  import type { IFlyout } from './interfaces/i_flyout.js';
12
- import { ContainerRegion, MetricsManager } from './metrics_manager.js';
12
+ import type { ContainerRegion } from './metrics_manager.js';
13
+ import { MetricsManager } from './metrics_manager.js';
13
14
  import type { WorkspaceSvg } from './workspace_svg.js';
14
15
  /**
15
16
  * Calculates metrics for a flyout's workspace.
@@ -10,7 +10,7 @@
10
10
  * @class
11
11
  */
12
12
  import type { Block } from './block.js';
13
- import { Names } from './names.js';
13
+ import type { Names } from './names.js';
14
14
  import type { Workspace } from './workspace.js';
15
15
  /**
16
16
  * Deprecated, no-longer used type declaration for per-block-type generator
package/core/gesture.d.ts CHANGED
@@ -4,10 +4,10 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from './block_svg.js';
7
- import { RenderedWorkspaceComment } from './comments.js';
7
+ import type { RenderedWorkspaceComment } from './comments.js';
8
8
  import type { Field } from './field.js';
9
9
  import type { IBubble } from './interfaces/i_bubble.js';
10
- import { IDragger } from './interfaces/i_dragger.js';
10
+ import type { IDragger } from './interfaces/i_dragger.js';
11
11
  import type { IFlyout } from './interfaces/i_flyout.js';
12
12
  import type { IIcon } from './interfaces/i_icon.js';
13
13
  import { Coordinate } from './utils/coordinate.js';
package/core/grid.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @class
11
11
  */
12
- import { GridOptions } from './options.js';
12
+ import type { GridOptions } from './options.js';
13
13
  import { Coordinate } from './utils/coordinate.js';
14
14
  /**
15
15
  * Class for a workspace's grid.
@@ -3,10 +3,10 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { ICommentIcon } from '../interfaces/i_comment_icon.js';
7
- import { IIcon } from '../interfaces/i_icon.js';
8
- import { MutatorIcon } from './mutator_icon.js';
9
- import { WarningIcon } from './warning_icon.js';
6
+ import type { ICommentIcon } from '../interfaces/i_comment_icon.js';
7
+ import type { IIcon } from '../interfaces/i_icon.js';
8
+ import type { MutatorIcon } from './mutator_icon.js';
9
+ import type { WarningIcon } from './warning_icon.js';
10
10
  /**
11
11
  * Defines the type of an icon, so that it can be retrieved from block.getIcon
12
12
  */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { Block } from '../block.js';
7
7
  import type { IIcon } from '../interfaces/i_icon.js';
8
- import { IconType } from './icon_types.js';
8
+ import type { IconType } from './icon_types.js';
9
9
  /**
10
10
  * Registers the given icon so that it can be deserialized.
11
11
  *
@@ -3,7 +3,7 @@
3
3
  * Copyright 2026 Raspberry Pi Foundation
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { RenderedConnection } from './rendered_connection.js';
6
+ import type { RenderedConnection } from './rendered_connection.js';
7
7
  import { Size } from './utils/size.js';
8
8
  /**
9
9
  * Visual representation of a mid-drag block if it were to be connected.
@@ -3,9 +3,9 @@
3
3
  * Copyright 2024 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { BlockSvg } from './block_svg.js';
7
- import { IConnectionPreviewer } from './interfaces/i_connection_previewer.js';
8
- import { RenderedConnection } from './rendered_connection.js';
6
+ import type { BlockSvg } from './block_svg.js';
7
+ import type { IConnectionPreviewer } from './interfaces/i_connection_previewer.js';
8
+ import type { RenderedConnection } from './rendered_connection.js';
9
9
  import * as blocks from './serialization/blocks.js';
10
10
  export declare class InsertionMarkerPreviewer implements IConnectionPreviewer {
11
11
  private readonly workspace;
@@ -4,10 +4,10 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Coordinate } from '../utils/coordinate.js';
7
- import { IBoundedElement } from './i_bounded_element.js';
7
+ import type { IBoundedElement } from './i_bounded_element.js';
8
8
  import type { IContextMenu } from './i_contextmenu.js';
9
9
  import type { IDraggable } from './i_draggable.js';
10
- import { ISelectable } from './i_selectable.js';
10
+ import type { ISelectable } from './i_selectable.js';
11
11
  /**
12
12
  * A bubble interface.
13
13
  */
@@ -3,12 +3,12 @@
3
3
  * Copyright 2024 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { CommentState } from '../icons/comment_icon.js';
7
- import { Coordinate } from '../utils/coordinate.js';
8
- import { Size } from '../utils/size.js';
9
- import { IHasBubble } from './i_has_bubble.js';
10
- import { IIcon } from './i_icon.js';
11
- import { ISerializable } from './i_serializable.js';
6
+ import type { CommentState } from '../icons/comment_icon.js';
7
+ import type { Coordinate } from '../utils/coordinate.js';
8
+ import type { Size } from '../utils/size.js';
9
+ import type { IHasBubble } from './i_has_bubble.js';
10
+ import type { IIcon } from './i_icon.js';
11
+ import type { ISerializable } from './i_serializable.js';
12
12
  export interface ICommentIcon extends IIcon, IHasBubble, ISerializable {
13
13
  setText(text: string): void;
14
14
  getText(): string;
@@ -3,9 +3,9 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { Rect } from '../utils/rect.js';
6
+ import type { Rect } from '../utils/rect.js';
7
7
  import type { IComponent } from './i_component.js';
8
- import { IDraggable } from './i_draggable.js';
8
+ import type { IDraggable } from './i_draggable.js';
9
9
  /**
10
10
  * Interface for a component with custom behaviour when a block or bubble is
11
11
  * dragged over or dropped on top of it.
@@ -6,7 +6,7 @@
6
6
  import type { IconType } from '../icons/icon_types.js';
7
7
  import type { Coordinate } from '../utils/coordinate.js';
8
8
  import type { Size } from '../utils/size.js';
9
- import { IFocusableNode } from './i_focusable_node.js';
9
+ import type { IFocusableNode } from './i_focusable_node.js';
10
10
  export interface IIcon extends IFocusableNode {
11
11
  /**
12
12
  * @returns the IconType representing the type of the icon. This value should
@@ -3,13 +3,13 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { FieldCheckboxFromJsonConfig } from '../field_checkbox.js';
7
- import { FieldDropdownFromJsonConfig } from '../field_dropdown';
8
- import { FieldImageFromJsonConfig } from '../field_image';
9
- import { FieldNumberFromJsonConfig } from '../field_number';
10
- import { FieldTextInputFromJsonConfig } from '../field_textinput';
11
- import { FieldVariableFromJsonConfig } from '../field_variable';
12
- import { Align } from '../inputs/align.js';
6
+ import type { FieldCheckboxFromJsonConfig } from '../field_checkbox.js';
7
+ import type { FieldDropdownFromJsonConfig } from '../field_dropdown';
8
+ import type { FieldImageFromJsonConfig } from '../field_image';
9
+ import type { FieldNumberFromJsonConfig } from '../field_number';
10
+ import type { FieldTextInputFromJsonConfig } from '../field_textinput';
11
+ import type { FieldVariableFromJsonConfig } from '../field_variable';
12
+ import type { Align } from '../inputs/align.js';
13
13
  /**
14
14
  * Defines the JSON structure for a block definition.
15
15
  *
@@ -3,7 +3,7 @@
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { KeyboardShortcut } from '../shortcut_registry.js';
6
+ import type { KeyboardShortcut } from '../shortcut_registry.js';
7
7
  /**
8
8
  * An interface for an object that handles keyboard shortcuts.
9
9
  */
@@ -3,8 +3,8 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { ParameterState } from '../serialization/procedures';
7
- import { IProcedureModel } from './i_procedure_model';
6
+ import type { ParameterState } from '../serialization/procedures';
7
+ import type { IProcedureModel } from './i_procedure_model';
8
8
  /**
9
9
  * A data model for a procedure.
10
10
  */
@@ -3,9 +3,9 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { Coordinate } from '../utils/coordinate.js';
7
- import { WorkspaceSvg } from '../workspace_svg.js';
8
- import { ICopyable, ICopyData } from './i_copyable.js';
6
+ import type { Coordinate } from '../utils/coordinate.js';
7
+ import type { WorkspaceSvg } from '../workspace_svg.js';
8
+ import type { ICopyable, ICopyData } from './i_copyable.js';
9
9
  /** An object that can paste data into a workspace. */
10
10
  export interface IPaster<U extends ICopyData, T extends ICopyable<U>> {
11
11
  paste(copyData: U, workspace: WorkspaceSvg, coordinate?: Coordinate): T | null;
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Block } from '../block.js';
7
- import { IProcedureModel } from './i_procedure_model.js';
7
+ import type { IProcedureModel } from './i_procedure_model.js';
8
8
  /** The interface for a block which models a procedure. */
9
9
  export interface IProcedureBlock {
10
10
  getProcedureModel(): IProcedureModel;
@@ -3,7 +3,7 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IProcedureModel } from './i_procedure_model.js';
6
+ import type { IProcedureModel } from './i_procedure_model.js';
7
7
  export interface IProcedureMap extends Map<string, IProcedureModel> {
8
8
  /**
9
9
  * Adds the given ProcedureModel to the map of procedure models, so that
@@ -3,8 +3,8 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { State } from '../serialization/procedures.js';
7
- import { IParameterModel } from './i_parameter_model.js';
6
+ import type { State } from '../serialization/procedures.js';
7
+ import type { IParameterModel } from './i_parameter_model.js';
8
8
  /**
9
9
  * A data model for a procedure.
10
10
  */
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { WorkspaceSvg } from '../workspace_svg.js';
7
- import { IFocusableNode } from './i_focusable_node.js';
7
+ import type { IFocusableNode } from './i_focusable_node.js';
8
8
  /**
9
9
  * The interface for an object that is selectable.
10
10
  *
@@ -3,7 +3,7 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IParameterModel } from './i_parameter_model.js';
6
+ import type { IParameterModel } from './i_parameter_model.js';
7
7
  import type { IVariableModel, IVariableState } from './i_variable_model.js';
8
8
  /** Interface for a parameter model that holds a variable model. */
9
9
  export interface IVariableBackedParameterModel extends IParameterModel {
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { IFocusableNode } from './interfaces/i_focusable_node.js';
7
- import { IRenderedElement } from './interfaces/i_rendered_element.js';
8
- import { Coordinate } from './utils/coordinate.js';
9
- import { WorkspaceSvg } from './workspace_svg.js';
7
+ import type { IRenderedElement } from './interfaces/i_rendered_element.js';
8
+ import type { Coordinate } from './utils/coordinate.js';
9
+ import type { WorkspaceSvg } from './workspace_svg.js';
10
10
  /** @internal */
11
11
  export declare class LayerManager {
12
12
  private workspace;
@@ -3,7 +3,7 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IProcedureMap } from './interfaces/i_procedure_map.js';
6
+ import type { IProcedureMap } from './interfaces/i_procedure_map.js';
7
7
  import type { IProcedureModel } from './interfaces/i_procedure_model.js';
8
8
  export declare class ObservableProcedureMap extends Map<string, IProcedureModel> implements IProcedureMap {
9
9
  /** @internal */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { Block } from './block.js';
7
7
  import type { Abstract } from './events/events_abstract.js';
8
- import { Field } from './field.js';
8
+ import type { Field } from './field.js';
9
9
  import { ProcedureTuple } from './interfaces/i_legacy_procedure_blocks.js';
10
10
  import { IParameterModel } from './interfaces/i_parameter_model.js';
11
11
  import { IProcedureBlock, isProcedureBlock } from './interfaces/i_procedure_block.js';
@@ -3,7 +3,7 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { BlockSvg } from './block_svg.js';
6
+ import type { BlockSvg } from './block_svg.js';
7
7
  import type { WorkspaceSvg } from './workspace_svg.js';
8
8
  /**
9
9
  * Registers that the given block and all of its parents need to be rerendered,
@@ -6,7 +6,7 @@
6
6
  import type { BlockSvg } from './block_svg.js';
7
7
  import { Connection } from './connection.js';
8
8
  import type { InsertionMarker } from './insertion_marker.js';
9
- import { IContextMenu } from './interfaces/i_contextmenu.js';
9
+ import type { IContextMenu } from './interfaces/i_contextmenu.js';
10
10
  import type { IFocusableNode } from './interfaces/i_focusable_node.js';
11
11
  import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
12
12
  import { Coordinate } from './utils/coordinate.js';
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import { Input } from '../../inputs/input.js';
7
+ import type { Input } from '../../inputs/input.js';
8
8
  import type { RenderedConnection } from '../../rendered_connection.js';
9
9
  import type { Measurable } from '../measurables/base.js';
10
10
  import { BottomRow } from '../measurables/bottom_row.js';
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import { RenderedConnection } from '../../rendered_connection.js';
7
+ import type { RenderedConnection } from '../../rendered_connection.js';
8
8
  import type { BlockStyle } from '../../theme.js';
9
- import { Coordinate } from '../../utils/coordinate.js';
9
+ import type { Coordinate } from '../../utils/coordinate.js';
10
10
  import type { ConstantProvider } from './constants.js';
11
11
  import type { IPathObject } from './i_path_object.js';
12
12
  /**
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
7
  import { Drawer as BaseDrawer } from '../common/drawer.js';
8
- import { Connection } from '../measurables/connection.js';
8
+ import type { Connection } from '../measurables/connection.js';
9
9
  import type { InlineInput } from '../measurables/inline_input.js';
10
10
  import type { Row } from '../measurables/row.js';
11
11
  import type { RenderInfo } from './info.js';
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlockSvg } from '../../block_svg.js';
7
- import { Input } from '../../inputs/input.js';
7
+ import type { Input } from '../../inputs/input.js';
8
8
  import { RenderInfo as BaseRenderInfo } from '../common/info.js';
9
9
  import type { Measurable } from '../measurables/base.js';
10
10
  import type { Row } from '../measurables/row.js';
@@ -3,8 +3,8 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IParameterModel } from '../interfaces/i_parameter_model.js';
7
- import { IProcedureModel } from '../interfaces/i_procedure_model.js';
6
+ import type { IParameterModel } from '../interfaces/i_parameter_model.js';
7
+ import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
8
8
  import type { ISerializer } from '../interfaces/i_serializer.js';
9
9
  import type { Workspace } from '../workspace.js';
10
10
  /** Represents the state of a procedure model. */