blockly 13.3.0 → 13.4.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 (358) hide show
  1. package/blockly.min.js +147 -143
  2. package/blockly_compressed.js +121 -122
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +21 -21
  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 +2 -2
  11. package/core/bubbles/text_bubble.d.ts +3 -3
  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 +2 -1
  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 +1 -1
  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 +1 -1
  61. package/core/flyout_metrics_manager.d.ts +2 -1
  62. package/core/generator.d.ts +1 -1
  63. package/core/gesture.d.ts +2 -2
  64. package/core/grid.d.ts +1 -1
  65. package/core/icons/icon_types.d.ts +4 -4
  66. package/core/icons/registry.d.ts +1 -1
  67. package/core/insertion_marker.d.ts +1 -1
  68. package/core/insertion_marker_previewer.d.ts +3 -3
  69. package/core/interfaces/i_bubble.d.ts +2 -2
  70. package/core/interfaces/i_comment_icon.d.ts +6 -6
  71. package/core/interfaces/i_drag_target.d.ts +2 -2
  72. package/core/interfaces/i_icon.d.ts +1 -1
  73. package/core/interfaces/i_json_block_definition.d.ts +7 -7
  74. package/core/interfaces/i_keyboard_accessible.d.ts +1 -1
  75. package/core/interfaces/i_parameter_model.d.ts +2 -2
  76. package/core/interfaces/i_paster.d.ts +3 -3
  77. package/core/interfaces/i_procedure_block.d.ts +1 -1
  78. package/core/interfaces/i_procedure_map.d.ts +1 -1
  79. package/core/interfaces/i_procedure_model.d.ts +2 -2
  80. package/core/interfaces/i_selectable.d.ts +1 -1
  81. package/core/interfaces/i_variable_backed_parameter_model.d.ts +1 -1
  82. package/core/layer_manager.d.ts +3 -3
  83. package/core/observable_procedure_map.d.ts +1 -1
  84. package/core/procedures.d.ts +1 -1
  85. package/core/render_management.d.ts +1 -1
  86. package/core/rendered_connection.d.ts +1 -1
  87. package/core/renderers/common/info.d.ts +1 -1
  88. package/core/renderers/common/path_object.d.ts +2 -2
  89. package/core/renderers/zelos/drawer.d.ts +1 -1
  90. package/core/renderers/zelos/info.d.ts +1 -1
  91. package/core/serialization/procedures.d.ts +2 -2
  92. package/core/serialization/workspace_comments.d.ts +2 -2
  93. package/core/shortcut_registry.d.ts +2 -2
  94. package/core/utils/aria.d.ts +1 -1
  95. package/core/utils/style.d.ts +14 -0
  96. package/core/utils/toolbox.d.ts +0 -8
  97. package/core/variable_map.d.ts +1 -1
  98. package/core/variable_model.d.ts +1 -1
  99. package/core/variables.d.ts +1 -1
  100. package/core/workspace.d.ts +2 -2
  101. package/core/workspace_focus_target.d.ts +6 -1
  102. package/core/workspace_svg.d.ts +3 -3
  103. package/core/xml.d.ts +1 -1
  104. package/msg/ab.js +5 -0
  105. package/msg/ab.mjs +5 -0
  106. package/msg/ace.js +5 -0
  107. package/msg/ace.mjs +5 -0
  108. package/msg/af.js +5 -0
  109. package/msg/af.mjs +5 -0
  110. package/msg/am.js +5 -0
  111. package/msg/am.mjs +5 -0
  112. package/msg/ar.js +5 -0
  113. package/msg/ar.mjs +5 -0
  114. package/msg/ast.js +5 -0
  115. package/msg/ast.mjs +5 -0
  116. package/msg/az.js +5 -0
  117. package/msg/az.mjs +5 -0
  118. package/msg/ba.js +5 -0
  119. package/msg/ba.mjs +5 -0
  120. package/msg/bcc.js +5 -0
  121. package/msg/bcc.mjs +5 -0
  122. package/msg/be-tarask.js +5 -0
  123. package/msg/be-tarask.mjs +5 -0
  124. package/msg/be.js +5 -0
  125. package/msg/be.mjs +5 -0
  126. package/msg/bg.js +5 -0
  127. package/msg/bg.mjs +5 -0
  128. package/msg/bn.js +5 -0
  129. package/msg/bn.mjs +5 -0
  130. package/msg/br.js +5 -0
  131. package/msg/br.mjs +5 -0
  132. package/msg/bs.js +5 -0
  133. package/msg/bs.mjs +5 -0
  134. package/msg/ca.js +5 -0
  135. package/msg/ca.mjs +5 -0
  136. package/msg/ce.js +5 -0
  137. package/msg/ce.mjs +5 -0
  138. package/msg/cs.js +5 -0
  139. package/msg/cs.mjs +5 -0
  140. package/msg/csb.js +162 -157
  141. package/msg/csb.mjs +5 -0
  142. package/msg/da.js +5 -0
  143. package/msg/da.mjs +5 -0
  144. package/msg/de.js +5 -0
  145. package/msg/de.mjs +5 -0
  146. package/msg/diq.js +5 -0
  147. package/msg/diq.mjs +5 -0
  148. package/msg/dtp.js +5 -0
  149. package/msg/dtp.mjs +5 -0
  150. package/msg/dty.js +5 -0
  151. package/msg/dty.mjs +5 -0
  152. package/msg/ee.js +5 -0
  153. package/msg/ee.mjs +5 -0
  154. package/msg/el.js +5 -0
  155. package/msg/el.mjs +5 -0
  156. package/msg/en-gb.js +5 -0
  157. package/msg/en-gb.mjs +5 -0
  158. package/msg/en.js +5 -0
  159. package/msg/en.mjs +5 -0
  160. package/msg/eo.js +5 -0
  161. package/msg/eo.mjs +5 -0
  162. package/msg/es.js +5 -0
  163. package/msg/es.mjs +5 -0
  164. package/msg/et.js +5 -0
  165. package/msg/et.mjs +5 -0
  166. package/msg/eu.js +5 -0
  167. package/msg/eu.mjs +5 -0
  168. package/msg/fa.js +5 -0
  169. package/msg/fa.mjs +5 -0
  170. package/msg/fi.js +5 -0
  171. package/msg/fi.mjs +5 -0
  172. package/msg/fo.js +5 -0
  173. package/msg/fo.mjs +5 -0
  174. package/msg/fr.js +10 -5
  175. package/msg/fr.mjs +5 -0
  176. package/msg/frr.js +5 -0
  177. package/msg/frr.mjs +5 -0
  178. package/msg/ga.js +5 -0
  179. package/msg/ga.mjs +5 -0
  180. package/msg/gl.js +5 -0
  181. package/msg/gl.mjs +5 -0
  182. package/msg/gn.js +5 -0
  183. package/msg/gn.mjs +5 -0
  184. package/msg/gor.js +5 -0
  185. package/msg/gor.mjs +5 -0
  186. package/msg/ha.js +5 -0
  187. package/msg/ha.mjs +5 -0
  188. package/msg/he.js +25 -20
  189. package/msg/he.mjs +5 -0
  190. package/msg/hi.js +5 -0
  191. package/msg/hi.mjs +5 -0
  192. package/msg/hr.js +5 -0
  193. package/msg/hr.mjs +5 -0
  194. package/msg/hrx.js +5 -0
  195. package/msg/hrx.mjs +5 -0
  196. package/msg/hsb.js +5 -0
  197. package/msg/hsb.mjs +5 -0
  198. package/msg/hu.js +5 -0
  199. package/msg/hu.mjs +5 -0
  200. package/msg/hy.js +5 -0
  201. package/msg/hy.mjs +5 -0
  202. package/msg/ia.js +5 -0
  203. package/msg/ia.mjs +5 -0
  204. package/msg/id.js +5 -0
  205. package/msg/id.mjs +5 -0
  206. package/msg/ig.js +5 -0
  207. package/msg/ig.mjs +5 -0
  208. package/msg/inh.js +5 -0
  209. package/msg/inh.mjs +5 -0
  210. package/msg/is.js +5 -0
  211. package/msg/is.mjs +5 -0
  212. package/msg/it.js +5 -0
  213. package/msg/it.mjs +5 -0
  214. package/msg/ja.js +5 -0
  215. package/msg/ja.mjs +5 -0
  216. package/msg/ka.js +5 -0
  217. package/msg/ka.mjs +5 -0
  218. package/msg/kab.js +5 -0
  219. package/msg/kab.mjs +5 -0
  220. package/msg/kbd-cyrl.js +5 -0
  221. package/msg/kbd-cyrl.mjs +5 -0
  222. package/msg/km.js +5 -0
  223. package/msg/km.mjs +5 -0
  224. package/msg/kn.js +34 -29
  225. package/msg/kn.mjs +5 -0
  226. package/msg/ko.js +11 -6
  227. package/msg/ko.mjs +5 -0
  228. package/msg/krc.js +5 -0
  229. package/msg/krc.mjs +5 -0
  230. package/msg/ksh.js +5 -0
  231. package/msg/ksh.mjs +5 -0
  232. package/msg/ku-latn.js +5 -0
  233. package/msg/ku-latn.mjs +5 -0
  234. package/msg/ky.js +5 -0
  235. package/msg/ky.mjs +5 -0
  236. package/msg/la.js +5 -0
  237. package/msg/la.mjs +5 -0
  238. package/msg/lb.js +10 -5
  239. package/msg/lb.mjs +5 -0
  240. package/msg/lki.js +5 -0
  241. package/msg/lki.mjs +5 -0
  242. package/msg/lo.js +5 -0
  243. package/msg/lo.mjs +5 -0
  244. package/msg/lrc.js +5 -0
  245. package/msg/lrc.mjs +5 -0
  246. package/msg/lt.js +5 -0
  247. package/msg/lt.mjs +5 -0
  248. package/msg/lv.js +5 -0
  249. package/msg/lv.mjs +5 -0
  250. package/msg/mg.js +5 -0
  251. package/msg/mg.mjs +5 -0
  252. package/msg/mk.js +5 -0
  253. package/msg/mk.mjs +5 -0
  254. package/msg/ml.js +5 -0
  255. package/msg/ml.mjs +5 -0
  256. package/msg/mnw.js +5 -0
  257. package/msg/mnw.mjs +5 -0
  258. package/msg/ms.js +5 -0
  259. package/msg/ms.mjs +5 -0
  260. package/msg/mt.js +5 -0
  261. package/msg/mt.mjs +5 -0
  262. package/msg/my.js +5 -0
  263. package/msg/my.mjs +5 -0
  264. package/msg/mzn.js +5 -0
  265. package/msg/mzn.mjs +5 -0
  266. package/msg/nb.js +5 -0
  267. package/msg/nb.mjs +5 -0
  268. package/msg/ne.js +6 -1
  269. package/msg/ne.mjs +5 -0
  270. package/msg/nl.js +5 -0
  271. package/msg/nl.mjs +5 -0
  272. package/msg/oc.js +5 -0
  273. package/msg/oc.mjs +5 -0
  274. package/msg/olo.js +5 -0
  275. package/msg/olo.mjs +5 -0
  276. package/msg/pa.js +5 -0
  277. package/msg/pa.mjs +5 -0
  278. package/msg/pl.js +5 -0
  279. package/msg/pl.mjs +5 -0
  280. package/msg/pms.js +5 -0
  281. package/msg/pms.mjs +5 -0
  282. package/msg/ps.js +5 -0
  283. package/msg/ps.mjs +5 -0
  284. package/msg/pt-br.js +5 -0
  285. package/msg/pt-br.mjs +5 -0
  286. package/msg/pt.js +5 -0
  287. package/msg/pt.mjs +5 -0
  288. package/msg/ro.js +13 -8
  289. package/msg/ro.mjs +5 -0
  290. package/msg/ru.js +5 -0
  291. package/msg/ru.mjs +5 -0
  292. package/msg/sc.js +5 -0
  293. package/msg/sc.mjs +5 -0
  294. package/msg/sco.js +5 -0
  295. package/msg/sco.mjs +5 -0
  296. package/msg/sd.js +5 -0
  297. package/msg/sd.mjs +5 -0
  298. package/msg/shn.js +5 -0
  299. package/msg/shn.mjs +5 -0
  300. package/msg/si.js +5 -0
  301. package/msg/si.mjs +5 -0
  302. package/msg/sk.js +5 -0
  303. package/msg/sk.mjs +5 -0
  304. package/msg/skr-arab.js +5 -0
  305. package/msg/skr-arab.mjs +5 -0
  306. package/msg/sl.js +5 -0
  307. package/msg/sl.mjs +5 -0
  308. package/msg/smn.js +5 -0
  309. package/msg/smn.mjs +5 -0
  310. package/msg/sq.js +5 -0
  311. package/msg/sq.mjs +5 -0
  312. package/msg/sr-latn.js +5 -0
  313. package/msg/sr-latn.mjs +5 -0
  314. package/msg/sr.js +5 -0
  315. package/msg/sr.mjs +5 -0
  316. package/msg/sv.js +5 -0
  317. package/msg/sv.mjs +5 -0
  318. package/msg/sw.js +5 -0
  319. package/msg/sw.mjs +5 -0
  320. package/msg/ta.js +5 -0
  321. package/msg/ta.mjs +5 -0
  322. package/msg/tcy.js +6 -1
  323. package/msg/tcy.mjs +5 -0
  324. package/msg/tdd.js +5 -0
  325. package/msg/tdd.mjs +5 -0
  326. package/msg/te.js +5 -0
  327. package/msg/te.mjs +5 -0
  328. package/msg/th.js +5 -0
  329. package/msg/th.mjs +5 -0
  330. package/msg/ti.js +5 -0
  331. package/msg/ti.mjs +5 -0
  332. package/msg/tl.js +5 -0
  333. package/msg/tl.mjs +5 -0
  334. package/msg/tlh.js +5 -0
  335. package/msg/tlh.mjs +5 -0
  336. package/msg/tr.js +5 -0
  337. package/msg/tr.mjs +5 -0
  338. package/msg/ug-arab.js +5 -0
  339. package/msg/ug-arab.mjs +5 -0
  340. package/msg/uk.js +5 -0
  341. package/msg/uk.mjs +5 -0
  342. package/msg/ur.js +5 -0
  343. package/msg/ur.mjs +5 -0
  344. package/msg/uz.js +24 -19
  345. package/msg/uz.mjs +5 -0
  346. package/msg/vi.js +5 -0
  347. package/msg/vi.mjs +5 -0
  348. package/msg/xmf.js +5 -0
  349. package/msg/xmf.mjs +5 -0
  350. package/msg/yo.js +5 -0
  351. package/msg/yo.mjs +5 -0
  352. package/msg/zgh.js +5 -0
  353. package/msg/zgh.mjs +5 -0
  354. package/msg/zh-hans.js +5 -0
  355. package/msg/zh-hans.mjs +5 -0
  356. package/msg/zh-hant.js +41 -36
  357. package/msg/zh-hant.mjs +5 -0
  358. package/package.json +11 -14
package/core/block.d.ts CHANGED
@@ -9,12 +9,12 @@ import type { Abstract } from './events/events_abstract.js';
9
9
  import type { Field } from './field.js';
10
10
  import { IconType } from './icons/icon_types.js';
11
11
  import type { MutatorIcon } from './icons/mutator_icon.js';
12
- import { Input } from './inputs/input.js';
12
+ import type { Input } from './inputs/input.js';
13
13
  import { type IIcon } from './interfaces/i_icon.js';
14
14
  import type { IVariableModel, IVariableState } from './interfaces/i_variable_model.js';
15
15
  import * as Tooltip from './tooltip.js';
16
16
  import { Coordinate } from './utils/coordinate.js';
17
- import { Size } from './utils/size.js';
17
+ import type { Size } from './utils/size.js';
18
18
  import type { Workspace } from './workspace.js';
19
19
  /**
20
20
  * Class for one block.
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { BlockSvg } from './block_svg.js';
7
7
  import type { Input } from './inputs/input.js';
8
- import { RenderedConnection } from './rendered_connection.js';
8
+ import type { RenderedConnection } from './rendered_connection.js';
9
9
  import { Verbosity } from './utils/aria.js';
10
10
  /**
11
11
  * Prepositions to use when describing the relationship between two blocks based
@@ -9,28 +9,28 @@
9
9
  * @class
10
10
  */
11
11
  import { Block } from './block.js';
12
- import { BlockCopyData } from './clipboard/block_paster.js';
12
+ import type { BlockCopyData } from './clipboard/block_paster.js';
13
13
  import type { Connection } from './connection.js';
14
14
  import { ConnectionType } from './connection_type.js';
15
- import { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
16
- import { IconType } from './icons/icon_types.js';
15
+ import type { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
16
+ import type { IconType } from './icons/icon_types.js';
17
17
  import { MutatorIcon } from './icons/mutator_icon.js';
18
18
  import type { Input } from './inputs/input.js';
19
19
  import type { IBoundedElement } from './interfaces/i_bounded_element.js';
20
- import { IContextMenu } from './interfaces/i_contextmenu.js';
20
+ import type { IContextMenu } from './interfaces/i_contextmenu.js';
21
21
  import type { ICopyable } from './interfaces/i_copyable.js';
22
- import { IDeletable } from './interfaces/i_deletable.js';
22
+ import type { IDeletable } from './interfaces/i_deletable.js';
23
23
  import type { DragDisposition, IDragStrategy, IDraggable } from './interfaces/i_draggable.js';
24
24
  import type { IFocusableNode } from './interfaces/i_focusable_node.js';
25
25
  import type { IFocusableTree } from './interfaces/i_focusable_tree.js';
26
- import { IIcon } from './interfaces/i_icon.js';
26
+ import type { IIcon } from './interfaces/i_icon.js';
27
27
  import { RenderedConnection } from './rendered_connection.js';
28
28
  import type { IPathObject } from './renderers/common/i_path_object.js';
29
29
  import type { BlockStyle } from './theme.js';
30
30
  import * as aria from './utils/aria.js';
31
31
  import { Coordinate } from './utils/coordinate.js';
32
32
  import { Rect } from './utils/rect.js';
33
- import { FlyoutItemInfo } from './utils/toolbox.js';
33
+ import type { FlyoutItemInfo } from './utils/toolbox.js';
34
34
  import type { Workspace } from './workspace.js';
35
35
  import type { WorkspaceSvg } from './workspace_svg.js';
36
36
  /**
@@ -3,16 +3,16 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IBoundedElement } from '../interfaces/i_bounded_element.js';
7
- import { IBubble } from '../interfaces/i_bubble.js';
6
+ import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
7
+ import type { IBubble } from '../interfaces/i_bubble.js';
8
8
  import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
9
9
  import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
10
10
  import type { IHasBubble } from '../interfaces/i_has_bubble.js';
11
- import { ISelectable } from '../interfaces/i_selectable.js';
11
+ import type { ISelectable } from '../interfaces/i_selectable.js';
12
12
  import { Coordinate } from '../utils/coordinate.js';
13
13
  import { Rect } from '../utils/rect.js';
14
14
  import { Size } from '../utils/size.js';
15
- import { WorkspaceSvg } from '../workspace_svg.js';
15
+ import type { WorkspaceSvg } from '../workspace_svg.js';
16
16
  /**
17
17
  * Represents a either a string or a function that, when called, can provide a
18
18
  * custom ARIA string to represent a bubble, or null if the default fallback
@@ -4,11 +4,11 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { BlocklyOptions } from '../blockly_options.js';
7
- import { Abstract as AbstractEvent } from '../events/events_abstract.js';
7
+ import type { Abstract as AbstractEvent } from '../events/events_abstract.js';
8
8
  import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
9
9
  import type { IHasBubble } from '../interfaces/i_has_bubble.js';
10
10
  import { Options } from '../options.js';
11
- import { Coordinate } from '../utils/coordinate.js';
11
+ import type { Coordinate } from '../utils/coordinate.js';
12
12
  import type { Rect } from '../utils/rect.js';
13
13
  import type { WorkspaceSvg } from '../workspace_svg.js';
14
14
  import { Bubble } from './bubble.js';
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
7
7
  import type { IHasBubble } from '../interfaces/i_has_bubble.js';
8
- import { Coordinate } from '../utils/coordinate.js';
9
- import { Rect } from '../utils/rect.js';
10
- import { WorkspaceSvg } from '../workspace_svg.js';
8
+ import type { Coordinate } from '../utils/coordinate.js';
9
+ import type { Rect } from '../utils/rect.js';
10
+ import type { WorkspaceSvg } from '../workspace_svg.js';
11
11
  import { Bubble } from './bubble.js';
12
12
  /**
13
13
  * A bubble that displays non-editable text. Used by the warning icon.
@@ -9,7 +9,7 @@ import type { IHasBubble } from '../interfaces/i_has_bubble.js';
9
9
  import { Coordinate } from '../utils/coordinate.js';
10
10
  import { Rect } from '../utils/rect.js';
11
11
  import { Size } from '../utils/size.js';
12
- import { WorkspaceSvg } from '../workspace_svg.js';
12
+ import type { WorkspaceSvg } from '../workspace_svg.js';
13
13
  import { Bubble } from './bubble.js';
14
14
  /**
15
15
  * A bubble that displays editable text. It can also be resized by the user.
@@ -3,12 +3,12 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { BlockSvg } from '../block_svg.js';
7
- import { ICopyData } from '../interfaces/i_copyable.js';
8
- import { IPaster } from '../interfaces/i_paster.js';
9
- import { State } from '../serialization/blocks.js';
6
+ import type { BlockSvg } from '../block_svg.js';
7
+ import type { ICopyData } from '../interfaces/i_copyable.js';
8
+ import type { IPaster } from '../interfaces/i_paster.js';
9
+ import type { State } from '../serialization/blocks.js';
10
10
  import { Coordinate } from '../utils/coordinate.js';
11
- import { WorkspaceSvg } from '../workspace_svg.js';
11
+ import type { WorkspaceSvg } from '../workspace_svg.js';
12
12
  export declare class BlockPaster implements IPaster<BlockCopyData, BlockSvg> {
13
13
  static TYPE: string;
14
14
  paste(copyData: BlockCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): BlockSvg | null;
@@ -3,7 +3,7 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
6
+ import type { ICopyable, ICopyData } from '../interfaces/i_copyable.js';
7
7
  import type { IPaster } from '../interfaces/i_paster.js';
8
8
  /**
9
9
  * Registers the given paster so that it cna be used for pasting.
@@ -3,12 +3,12 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
7
- import { ICopyData } from '../interfaces/i_copyable.js';
8
- import { IPaster } from '../interfaces/i_paster.js';
6
+ import type { RenderedWorkspaceComment } from '../comments/rendered_workspace_comment.js';
7
+ import type { ICopyData } from '../interfaces/i_copyable.js';
8
+ import type { IPaster } from '../interfaces/i_paster.js';
9
9
  import * as commentSerialiation from '../serialization/workspace_comments.js';
10
10
  import { Coordinate } from '../utils/coordinate.js';
11
- import { WorkspaceSvg } from '../workspace_svg.js';
11
+ import type { WorkspaceSvg } from '../workspace_svg.js';
12
12
  export declare class WorkspaceCommentPaster implements IPaster<WorkspaceCommentCopyData, RenderedWorkspaceComment> {
13
13
  static TYPE: string;
14
14
  paste(copyData: WorkspaceCommentCopyData, workspace: WorkspaceSvg, coordinate?: Coordinate): RenderedWorkspaceComment | null;
@@ -6,7 +6,7 @@
6
6
  import { BlockCopyData, BlockPaster } from './clipboard/block_paster.js';
7
7
  import * as registry from './clipboard/registry.js';
8
8
  import type { ICopyData, ICopyable } from './interfaces/i_copyable.js';
9
- import { Coordinate } from './utils/coordinate.js';
9
+ import type { Coordinate } from './utils/coordinate.js';
10
10
  import { WorkspaceSvg } from './workspace_svg.js';
11
11
  /**
12
12
  * Copy a copyable item, and record its data and the workspace it was
@@ -3,12 +3,12 @@
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 { IFocusableNode } from '../interfaces/i_focusable_node.js';
8
- import { IFocusableTree } from '../interfaces/i_focusable_tree.js';
9
- import { Size } from '../utils/size.js';
10
- import { WorkspaceSvg } from '../workspace_svg.js';
11
- import { RenderedWorkspaceComment } from './rendered_workspace_comment.js';
6
+ import type { BlockSvg } from '../block_svg.js';
7
+ import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
8
+ import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
9
+ import type { Size } from '../utils/size.js';
10
+ import type { WorkspaceSvg } from '../workspace_svg.js';
11
+ import type { RenderedWorkspaceComment } from './rendered_workspace_comment.js';
12
12
  /**
13
13
  * String added to the ID of a workspace comment to identify
14
14
  * the focusable node for the comment editor.
@@ -3,11 +3,11 @@
3
3
  * Copyright 2024 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { IRenderedElement } from '../interfaces/i_rendered_element.js';
6
+ import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
7
7
  import { Coordinate } from '../utils/coordinate.js';
8
8
  import { Size } from '../utils/size.js';
9
- import { WorkspaceSvg } from '../workspace_svg.js';
10
- import { CommentBarButton } from './comment_bar_button.js';
9
+ import type { WorkspaceSvg } from '../workspace_svg.js';
10
+ import type { CommentBarButton } from './comment_bar_button.js';
11
11
  import { CommentEditor } from './comment_editor.js';
12
12
  export declare class CommentView implements IRenderedElement {
13
13
  readonly workspace: WorkspaceSvg;
@@ -3,20 +3,20 @@
3
3
  * Copyright 2024 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
7
- import { IBoundedElement } from '../interfaces/i_bounded_element.js';
8
- import { IContextMenu } from '../interfaces/i_contextmenu.js';
9
- import { ICopyable } from '../interfaces/i_copyable.js';
10
- import { IDeletable } from '../interfaces/i_deletable.js';
11
- import { IDraggable } from '../interfaces/i_draggable.js';
12
- import { IFocusableNode } from '../interfaces/i_focusable_node.js';
6
+ import type { WorkspaceCommentCopyData } from '../clipboard/workspace_comment_paster.js';
7
+ import type { IBoundedElement } from '../interfaces/i_bounded_element.js';
8
+ import type { IContextMenu } from '../interfaces/i_contextmenu.js';
9
+ import type { ICopyable } from '../interfaces/i_copyable.js';
10
+ import type { IDeletable } from '../interfaces/i_deletable.js';
11
+ import type { IDraggable } from '../interfaces/i_draggable.js';
12
+ import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
13
13
  import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
14
- import { IRenderedElement } from '../interfaces/i_rendered_element.js';
15
- import { ISelectable } from '../interfaces/i_selectable.js';
14
+ import type { IRenderedElement } from '../interfaces/i_rendered_element.js';
15
+ import type { ISelectable } from '../interfaces/i_selectable.js';
16
16
  import { Coordinate } from '../utils/coordinate.js';
17
17
  import { Rect } from '../utils/rect.js';
18
- import { Size } from '../utils/size.js';
19
- import { WorkspaceSvg } from '../workspace_svg.js';
18
+ import type { Size } from '../utils/size.js';
19
+ import type { WorkspaceSvg } from '../workspace_svg.js';
20
20
  import { CommentView } from './comment_view.js';
21
21
  import { WorkspaceComment } from './workspace_comment.js';
22
22
  export declare class RenderedWorkspaceComment extends WorkspaceComment implements IBoundedElement, IRenderedElement, IDraggable, ISelectable, IDeletable, ICopyable<WorkspaceCommentCopyData>, IContextMenu, IFocusableNode {
@@ -4,8 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { Coordinate } from '../utils/coordinate.js';
7
- import { Size } from '../utils/size.js';
8
- import { Workspace } from '../workspace.js';
7
+ import type { Size } from '../utils/size.js';
8
+ import type { Workspace } from '../workspace.js';
9
9
  export declare class WorkspaceComment {
10
10
  readonly workspace: Workspace;
11
11
  /** The unique identifier for this comment. */
package/core/common.d.ts CHANGED
@@ -4,9 +4,9 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import type { Block } from './block.js';
7
- import { BlockDefinition } from './blocks.js';
7
+ import type { BlockDefinition } from './blocks.js';
8
8
  import type { Connection } from './connection.js';
9
- import { ISelectable } from './interfaces/i_selectable.js';
9
+ import type { ISelectable } from './interfaces/i_selectable.js';
10
10
  import type { Workspace } from './workspace.js';
11
11
  import type { WorkspaceSvg } from './workspace_svg.js';
12
12
  /**
package/core/config.d.ts CHANGED
@@ -4,21 +4,47 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  /**
7
- * All the values that we expect developers to be able to change
8
- * before injecting Blockly.
7
+ * Object holding all the values on Blockly that we expect developers to be
8
+ * able to change.
9
9
  */
10
- interface Config {
10
+ export declare const config: {
11
+ /**
12
+ * Number of pixels the mouse must move before a drag starts.
13
+ *
14
+ */
11
15
  dragRadius: number;
16
+ /**
17
+ * Number of pixels the mouse must move before a drag/scroll starts from the
18
+ * flyout. Because the drag-intention is determined when this is reached, it
19
+ * is larger than dragRadius so that the drag-direction is clearer.
20
+ *
21
+ */
12
22
  flyoutDragRadius: number;
23
+ /**
24
+ * Maximum misalignment between connections for them to snap together.
25
+ * Default is 28.
26
+ *
27
+ */
13
28
  snapRadius: number;
29
+ /**
30
+ * Maximum misalignment between connections for them to snap together.
31
+ * This should be the same as the snap radius.
32
+ * Default is 28.
33
+ *
34
+ */
35
+ connectingSnapRadius: number;
36
+ /**
37
+ * How much to prefer staying connected to the current connection over moving
38
+ * to a new connection. The current previewed connection is considered to be
39
+ * this much closer to the matching connection on the block than it actually
40
+ * is.
41
+ *
42
+ */
14
43
  currentConnectionPreference: number;
44
+ /**
45
+ * Delay in ms between trigger and bumping unconnected block out of alignment.
46
+ *
47
+ */
15
48
  bumpDelay: number;
16
- connectingSnapRadius: number;
17
- }
18
- /**
19
- * Object holding all the values on Blockly that we expect developers to be
20
- * able to change.
21
- */
22
- export declare const config: Config;
23
- export {};
49
+ };
24
50
  //# sourceMappingURL=config.d.ts.map
@@ -9,9 +9,9 @@
9
9
  * @class
10
10
  */
11
11
  import type { BlockSvg } from './block_svg.js';
12
- import { RenderedWorkspaceComment } from './comments/rendered_workspace_comment.js';
12
+ import type { RenderedWorkspaceComment } from './comments/rendered_workspace_comment.js';
13
13
  import type { IFocusableNode } from './interfaces/i_focusable_node.js';
14
- import { Coordinate } from './utils/coordinate.js';
14
+ import type { Coordinate } from './utils/coordinate.js';
15
15
  import type { WorkspaceSvg } from './workspace_svg.js';
16
16
  /**
17
17
  * Class for the registry of context menu items. This is intended to be a
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { Block } from '../block.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 any event related to blocks.
16
17
  */
@@ -10,8 +10,9 @@
10
10
  */
11
11
  import type { Block } from '../block.js';
12
12
  import type { BlockSvg } from '../block_svg.js';
13
- import { Workspace } from '../workspace.js';
14
- import { BlockBase, BlockBaseJson } from './events_block_base.js';
13
+ import type { Workspace } from '../workspace.js';
14
+ import type { BlockBaseJson } from './events_block_base.js';
15
+ import { BlockBase } from './events_block_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners when some element of a block has changed (e.g.
@@ -10,8 +10,9 @@
10
10
  */
11
11
  import type { Block } from '../block.js';
12
12
  import * as blocks from '../serialization/blocks.js';
13
- import { Workspace } from '../workspace.js';
14
- import { BlockBase, BlockBaseJson } from './events_block_base.js';
13
+ import type { Workspace } from '../workspace.js';
14
+ import type { BlockBaseJson } from './events_block_base.js';
15
+ import { BlockBase } from './events_block_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners when a block (or connected stack of blocks) is
@@ -10,8 +10,9 @@
10
10
  */
11
11
  import type { Block } from '../block.js';
12
12
  import * as blocks from '../serialization/blocks.js';
13
- import { Workspace } from '../workspace.js';
14
- import { BlockBase, BlockBaseJson } from './events_block_base.js';
13
+ import type { Workspace } from '../workspace.js';
14
+ import type { BlockBaseJson } from './events_block_base.js';
15
+ import { BlockBase } from './events_block_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners when a block (or connected stack of blocks) is
@@ -9,8 +9,8 @@
9
9
  * @class
10
10
  */
11
11
  import type { Block } from '../block.js';
12
- import { Workspace } from '../workspace.js';
13
- import { AbstractEventJson } from './events_abstract.js';
12
+ import type { Workspace } from '../workspace.js';
13
+ import type { AbstractEventJson } from './events_abstract.js';
14
14
  import { UiBase } from './events_ui_base.js';
15
15
  import { EventType } from './type.js';
16
16
  /**
@@ -10,8 +10,9 @@
10
10
  * @class
11
11
  */
12
12
  import type { Block } from '../block.js';
13
- import { Workspace } from '../workspace.js';
14
- import { BlockBase, BlockBaseJson } from './events_block_base.js';
13
+ import type { Workspace } from '../workspace.js';
14
+ import type { BlockBaseJson } from './events_block_base.js';
15
+ import { BlockBase } from './events_block_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners when the value of a block's field has changed but the
@@ -11,7 +11,8 @@
11
11
  import type { Block } from '../block.js';
12
12
  import { Coordinate } from '../utils/coordinate.js';
13
13
  import type { Workspace } from '../workspace.js';
14
- import { BlockBase, BlockBaseJson } from './events_block_base.js';
14
+ import type { BlockBaseJson } from './events_block_base.js';
15
+ import { BlockBase } from './events_block_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners when a block is moved. This could be from one
@@ -9,8 +9,8 @@
9
9
  * @class
10
10
  */
11
11
  import type { Block } from '../block.js';
12
- import { Workspace } from '../workspace.js';
13
- import { AbstractEventJson } from './events_abstract.js';
12
+ import type { Workspace } from '../workspace.js';
13
+ import type { AbstractEventJson } from './events_abstract.js';
14
14
  import { UiBase } from './events_ui_base.js';
15
15
  import { EventType } from './type.js';
16
16
  /**
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { WorkspaceComment } from '../comments/workspace_comment.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
  import type { CommentCreate } from './events_comment_create.js';
15
16
  import type { CommentDelete } from './events_comment_delete.js';
16
17
  /**
@@ -10,7 +10,8 @@
10
10
  */
11
11
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
12
12
  import type { Workspace } from '../workspace.js';
13
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
13
+ import type { CommentBaseJson } from './events_comment_base.js';
14
+ import { CommentBase } from './events_comment_base.js';
14
15
  import { EventType } from './type.js';
15
16
  /**
16
17
  * Notifies listeners that the contents of a workspace comment has changed.
@@ -3,9 +3,10 @@
3
3
  * Copyright 2024 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { WorkspaceComment } from '../comments/workspace_comment.js';
6
+ import type { WorkspaceComment } from '../comments/workspace_comment.js';
7
7
  import type { Workspace } from '../workspace.js';
8
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
8
+ import type { CommentBaseJson } from './events_comment_base.js';
9
+ import { CommentBase } from './events_comment_base.js';
9
10
  import { EventType } from './type.js';
10
11
  export declare class CommentCollapse extends CommentBase {
11
12
  newCollapsed?: boolean | undefined;
@@ -11,7 +11,8 @@
11
11
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
12
12
  import * as comments from '../serialization/workspace_comments.js';
13
13
  import type { Workspace } from '../workspace.js';
14
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
14
+ import type { CommentBaseJson } from './events_comment_base.js';
15
+ import { CommentBase } from './events_comment_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners that a workspace comment was created.
@@ -11,7 +11,8 @@
11
11
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
12
12
  import * as comments from '../serialization/workspace_comments.js';
13
13
  import type { Workspace } from '../workspace.js';
14
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
14
+ import type { CommentBaseJson } from './events_comment_base.js';
15
+ import { CommentBase } from './events_comment_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners that a workspace comment has been deleted.
@@ -7,8 +7,8 @@
7
7
  * Events fired when a workspace comment is dragged.
8
8
  */
9
9
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
10
- import { Workspace } from '../workspace.js';
11
- import { AbstractEventJson } from './events_abstract.js';
10
+ import type { Workspace } from '../workspace.js';
11
+ import type { AbstractEventJson } from './events_abstract.js';
12
12
  import { UiBase } from './events_ui_base.js';
13
13
  import { EventType } from './type.js';
14
14
  /**
@@ -11,7 +11,8 @@
11
11
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
12
12
  import { Coordinate } from '../utils/coordinate.js';
13
13
  import type { Workspace } from '../workspace.js';
14
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
14
+ import type { CommentBaseJson } from './events_comment_base.js';
15
+ import { CommentBase } from './events_comment_base.js';
15
16
  import { EventType } from './type.js';
16
17
  /**
17
18
  * Notifies listeners that a workspace comment has moved.
@@ -9,7 +9,8 @@
9
9
  import type { WorkspaceComment } from '../comments/workspace_comment.js';
10
10
  import { Size } from '../utils/size.js';
11
11
  import type { Workspace } from '../workspace.js';
12
- import { CommentBase, CommentBaseJson } from './events_comment_base.js';
12
+ import type { CommentBaseJson } from './events_comment_base.js';
13
+ import { CommentBase } from './events_comment_base.js';
13
14
  import { EventType } from './type.js';
14
15
  /**
15
16
  * Notifies listeners that a workspace comment has resized.
@@ -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
  /**
@@ -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
  /**
@@ -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
  /**
@@ -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
  /**
@@ -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.