blockly 11.0.0-beta.5 → 11.0.0-beta.7

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 (139) hide show
  1. package/blockly.min.js +722 -763
  2. package/blockly_compressed.js +676 -680
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks_compressed.js +27 -29
  5. package/blocks_compressed.js.map +1 -1
  6. package/core/block.d.ts +12 -6
  7. package/core/block_svg.d.ts +28 -42
  8. package/core/blockly.d.ts +11 -51
  9. package/core/bubbles/bubble.d.ts +17 -2
  10. package/core/bubbles/mini_workspace_bubble.d.ts +1 -1
  11. package/core/bubbles/text_bubble.d.ts +1 -1
  12. package/core/bubbles/textinput_bubble.d.ts +1 -1
  13. package/core/clipboard.d.ts +0 -19
  14. package/core/comments/comment_view.d.ts +207 -0
  15. package/core/comments/rendered_workspace_comment.d.ts +75 -0
  16. package/core/comments/workspace_comment.d.ts +107 -0
  17. package/core/comments.d.ts +9 -0
  18. package/core/connection.d.ts +1 -1
  19. package/core/delete_area.d.ts +1 -2
  20. package/core/dragging/block_drag_strategy.d.ts +105 -0
  21. package/core/dragging/bubble_drag_strategy.d.ts +20 -0
  22. package/core/dragging/comment_drag_strategy.d.ts +20 -0
  23. package/core/dragging/dragger.d.ts +47 -0
  24. package/core/events/events.d.ts +3 -0
  25. package/core/events/events_click.d.ts +1 -1
  26. package/core/events/events_comment_base.d.ts +6 -1
  27. package/core/events/events_comment_change.d.ts +1 -1
  28. package/core/events/events_comment_collapse.d.ts +39 -0
  29. package/core/events/events_comment_create.d.ts +5 -1
  30. package/core/events/events_comment_delete.d.ts +5 -1
  31. package/core/events/events_comment_move.d.ts +17 -1
  32. package/core/events/utils.d.ts +2 -0
  33. package/core/field_dropdown.d.ts +1 -0
  34. package/core/field_image.d.ts +1 -1
  35. package/core/flyout_base.d.ts +17 -1
  36. package/core/flyout_button.d.ts +26 -1
  37. package/core/generator.d.ts +1 -1
  38. package/core/gesture.d.ts +25 -54
  39. package/core/grid.d.ts +9 -9
  40. package/core/icons/comment_icon.d.ts +8 -3
  41. package/core/icons/icon.d.ts +0 -6
  42. package/core/icons/icon_types.d.ts +2 -2
  43. package/core/icons/mutator_icon.d.ts +1 -16
  44. package/core/icons/warning_icon.d.ts +1 -1
  45. package/core/inputs/input.d.ts +10 -19
  46. package/core/{connection_previewers/insertion_marker_previewer.d.ts → insertion_marker_previewer.d.ts} +3 -3
  47. package/core/interfaces/i_comment_icon.d.ts +21 -0
  48. package/core/interfaces/i_deletable.d.ts +6 -0
  49. package/core/interfaces/i_delete_area.d.ts +1 -2
  50. package/core/interfaces/i_draggable.d.ts +47 -3
  51. package/core/interfaces/i_dragger.d.ts +32 -0
  52. package/core/interfaces/i_has_bubble.d.ts +1 -1
  53. package/core/interfaces/i_parameter_model.d.ts +7 -0
  54. package/core/interfaces/i_procedure_model.d.ts +7 -0
  55. package/core/interfaces/i_selectable.d.ts +5 -3
  56. package/core/internal_constants.d.ts +0 -7
  57. package/core/keyboard_nav/ast_node.d.ts +21 -2
  58. package/core/options.d.ts +1 -0
  59. package/core/registry.d.ts +2 -2
  60. package/core/renderers/common/drawer.d.ts +0 -7
  61. package/core/renderers/common/marker_svg.d.ts +7 -0
  62. package/core/renderers/measurables/icon.d.ts +0 -5
  63. package/core/serialization/priorities.d.ts +2 -0
  64. package/core/serialization/procedures.d.ts +28 -26
  65. package/core/serialization/workspace_comments.d.ts +45 -0
  66. package/core/serialization.d.ts +2 -1
  67. package/core/toolbox/toolbox.d.ts +1 -2
  68. package/core/utils/dom.d.ts +0 -9
  69. package/core/utils/keycodes.d.ts +32 -32
  70. package/core/utils/size.d.ts +10 -0
  71. package/core/utils/string.d.ts +0 -10
  72. package/core/workspace_comment_svg.d.ts +1 -2
  73. package/core/workspace_svg.d.ts +0 -27
  74. package/core/xml.d.ts +9 -3
  75. package/core-node.js +31 -0
  76. package/dart.d.ts +1 -24
  77. package/dart_compressed.js +22 -72
  78. package/dart_compressed.js.map +1 -1
  79. package/generators/dart/dart_generator.d.ts +17 -17
  80. package/generators/dart/text.d.ts +0 -1
  81. package/generators/javascript/javascript_generator.d.ts +34 -35
  82. package/generators/javascript/text.d.ts +0 -1
  83. package/generators/lua/lua_generator.d.ts +10 -10
  84. package/generators/lua/text.d.ts +0 -1
  85. package/generators/php/php_generator.d.ts +36 -36
  86. package/generators/php/text.d.ts +0 -1
  87. package/generators/python/python_generator.d.ts +20 -21
  88. package/generators/python/text.d.ts +0 -1
  89. package/index.js +19 -7
  90. package/javascript.d.ts +1 -41
  91. package/javascript_compressed.js +19 -54
  92. package/javascript_compressed.js.map +1 -1
  93. package/lua.d.ts +1 -18
  94. package/lua_compressed.js +24 -47
  95. package/lua_compressed.js.map +1 -1
  96. package/media/delete-icon.svg +1 -0
  97. package/media/foldout-icon.svg +1 -0
  98. package/media/resize-handle.svg +3 -0
  99. package/msg/ce.d.ts +8 -0
  100. package/msg/dtp.d.ts +8 -0
  101. package/msg/hsb.d.ts +8 -0
  102. package/msg/tdd.d.ts +8 -0
  103. package/package.json +46 -12
  104. package/php.d.ts +1 -43
  105. package/php_compressed.js +13 -46
  106. package/php_compressed.js.map +1 -1
  107. package/python.d.ts +1 -27
  108. package/python_compressed.js +21 -40
  109. package/python_compressed.js.map +1 -1
  110. package/blockly.js +0 -22
  111. package/blocks.js +0 -22
  112. package/browser.js +0 -30
  113. package/core/block_dragger.d.ts +0 -212
  114. package/core/bubble_dragger.d.ts +0 -77
  115. package/core/field_angle.d.ts +0 -208
  116. package/core/field_colour.d.ts +0 -243
  117. package/core/field_multilineinput.d.ts +0 -182
  118. package/core/interfaces/i_block_dragger.d.ts +0 -47
  119. package/core/renderers/minimalist/constants.d.ts +0 -21
  120. package/core/renderers/minimalist/drawer.d.ts +0 -26
  121. package/core/renderers/minimalist/info.d.ts +0 -35
  122. package/core/renderers/minimalist/minimalist.d.ts +0 -12
  123. package/core/renderers/minimalist/renderer.d.ts +0 -48
  124. package/core-browser.js +0 -26
  125. package/core.js +0 -26
  126. package/dart.js +0 -22
  127. package/generators/dart/colour.d.ts +0 -16
  128. package/generators/javascript/colour.d.ts +0 -16
  129. package/generators/lua/colour.d.ts +0 -16
  130. package/generators/php/colour.d.ts +0 -16
  131. package/generators/python/colour.d.ts +0 -16
  132. package/javascript.js +0 -23
  133. package/lua.js +0 -22
  134. package/msg/constants.d.ts +0 -14
  135. package/msg/qqq.d.ts +0 -14
  136. package/msg/synonyms.d.ts +0 -14
  137. package/node.js +0 -21
  138. package/php.js +0 -22
  139. package/python.js +0 -23
package/core/block.d.ts CHANGED
@@ -17,8 +17,7 @@ import type { Abstract } from './events/events_abstract.js';
17
17
  import type { Field } from './field.js';
18
18
  import { Input } from './inputs/input.js';
19
19
  import type { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
20
- import type { IDeletable } from './interfaces/i_deletable.js';
21
- import type { IIcon } from './interfaces/i_icon.js';
20
+ import { type IIcon } from './interfaces/i_icon.js';
22
21
  import type { MutatorIcon } from './icons/mutator_icon.js';
23
22
  import * as Tooltip from './tooltip.js';
24
23
  import { Coordinate } from './utils/coordinate.js';
@@ -30,7 +29,7 @@ import { IconType } from './icons/icon_types.js';
30
29
  * Class for one block.
31
30
  * Not normally called directly, workspace.newBlock() is preferred.
32
31
  */
33
- export declare class Block implements IASTNodeLocation, IDeletable {
32
+ export declare class Block implements IASTNodeLocation {
34
33
  /**
35
34
  * An optional callback method to use whenever the block's parent workspace
36
35
  * changes. This is usually only called from the constructor, the block type
@@ -138,7 +137,13 @@ export declare class Block implements IASTNodeLocation, IDeletable {
138
137
  /**
139
138
  * Is the current block currently in the process of being disposed?
140
139
  */
141
- private disposing;
140
+ protected disposing: boolean;
141
+ /**
142
+ * Has this block been fully initialized? E.g. all fields initailized.
143
+ *
144
+ * @internal
145
+ */
146
+ initialized: boolean;
142
147
  private readonly xy_;
143
148
  isInFlyout: boolean;
144
149
  isInMutator: boolean;
@@ -147,7 +152,8 @@ export declare class Block implements IASTNodeLocation, IDeletable {
147
152
  protected isInsertionMarker_: boolean;
148
153
  /** Name of the type of hat. */
149
154
  hat?: string;
150
- rendered: boolean | null;
155
+ /** Is this block a BlockSVG? */
156
+ readonly rendered: boolean;
151
157
  /**
152
158
  * String for block help, or function that returns a URL. Null for no help.
153
159
  */
@@ -181,7 +187,7 @@ export declare class Block implements IASTNodeLocation, IDeletable {
181
187
  * statement with the previous statement. Otherwise, dispose of all
182
188
  * children of this block.
183
189
  */
184
- dispose(healStack: boolean): void;
190
+ dispose(healStack?: boolean): void;
185
191
  /**
186
192
  * Disposes of this block without doing things required by the top block.
187
193
  * E.g. does not fire events, unplug the block, etc.
@@ -10,7 +10,6 @@
10
10
  */
11
11
  import './events/events_selected.js';
12
12
  import { Block } from './block.js';
13
- import { CommentIcon } from './icons/comment_icon.js';
14
13
  import type { Connection } from './connection.js';
15
14
  import { ConnectionType } from './connection_type.js';
16
15
  import { ContextMenuOption, LegacyContextMenuOption } from './contextmenu_registry.js';
@@ -19,7 +18,7 @@ import type { Input } from './inputs/input.js';
19
18
  import type { IASTNodeLocationSvg } from './interfaces/i_ast_node_location_svg.js';
20
19
  import type { IBoundedElement } from './interfaces/i_bounded_element.js';
21
20
  import type { ICopyable } from './interfaces/i_copyable.js';
22
- import type { IDraggable } from './interfaces/i_draggable.js';
21
+ import type { IDragStrategy, IDraggable } from './interfaces/i_draggable.js';
23
22
  import { IIcon } from './interfaces/i_icon.js';
24
23
  import { MutatorIcon } from './icons/mutator_icon.js';
25
24
  import { RenderedConnection } from './rendered_connection.js';
@@ -27,16 +26,17 @@ import type { IPathObject } from './renderers/common/i_path_object.js';
27
26
  import type { BlockStyle } from './theme.js';
28
27
  import { Coordinate } from './utils/coordinate.js';
29
28
  import { Rect } from './utils/rect.js';
30
- import { WarningIcon } from './icons/warning_icon.js';
31
29
  import type { Workspace } from './workspace.js';
32
30
  import type { WorkspaceSvg } from './workspace_svg.js';
33
31
  import { IconType } from './icons/icon_types.js';
34
32
  import { BlockCopyData } from './clipboard/block_paster.js';
33
+ import { IDeletable } from './blockly.js';
34
+ import { FlyoutItemInfo } from './utils/toolbox.js';
35
35
  /**
36
36
  * Class for a block's SVG representation.
37
37
  * Not normally called directly, workspace.newBlock() is preferred.
38
38
  */
39
- export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBoundedElement, ICopyable<BlockCopyData>, IDraggable {
39
+ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBoundedElement, ICopyable<BlockCopyData>, IDraggable, IDeletable {
40
40
  /**
41
41
  * Constant for identifying rows that are to be rendered inline.
42
42
  * Don't collide with Blockly.inputTypes.
@@ -68,17 +68,12 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
68
68
  private warningTextDb;
69
69
  /** Block's mutator icon (if any). */
70
70
  mutator: MutatorIcon | null;
71
- /**
72
- * Block's warning icon (if any).
73
- *
74
- * @deprecated Use `setWarningText` to modify warnings on this block.
75
- */
76
- warning: WarningIcon | null;
77
71
  private svgGroup_;
78
72
  style: BlockStyle;
79
73
  /** @internal */
80
74
  pathObject: IPathObject;
81
- rendered: boolean;
75
+ /** Is this block a BlockSVG? */
76
+ readonly rendered = true;
82
77
  private visuallyDisabled;
83
78
  /**
84
79
  * Is this block currently rendering? Used to stop recursive render calls
@@ -92,11 +87,6 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
92
87
  nextConnection: RenderedConnection;
93
88
  previousConnection: RenderedConnection;
94
89
  private translation;
95
- /**
96
- * The ID of the setTimeout callback for bumping neighbours, or 0 if no bump
97
- * is currently scheduled.
98
- */
99
- private bumpNeighboursPid;
100
90
  /** Whether this block is currently being dragged. */
101
91
  private dragging;
102
92
  /**
@@ -107,6 +97,7 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
107
97
  * @internal
108
98
  */
109
99
  relativeCoords: Coordinate;
100
+ private dragStrategy;
110
101
  /**
111
102
  * @param workspace The block's workspace.
112
103
  * @param prototypeName Name of the language object containing type-specific
@@ -132,15 +123,9 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
132
123
  * @returns #RRGGBB string.
133
124
  */
134
125
  getColourTertiary(): string | undefined;
135
- /**
136
- * Selects this block. Highlights the block visually and fires a select event
137
- * if the block is not already selected.
138
- */
126
+ /** Selects this block. Highlights the block visually. */
139
127
  select(): void;
140
- /**
141
- * Unselects this block. Unhighlights the block and fires a select (false)
142
- * event if the block is currently selected.
143
- */
128
+ /** Unselects this block. Unhighlights the blockv visually. */
144
129
  unselect(): void;
145
130
  /**
146
131
  * Sets the parent of this block to be a new block or null.
@@ -349,14 +334,6 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
349
334
  * @internal
350
335
  */
351
336
  updateDisabled(): void;
352
- /**
353
- * Get the comment icon attached to this block, or null if the block has no
354
- * comment.
355
- *
356
- * @returns The comment icon attached to this block, or null.
357
- * @deprecated Use getIcon. To be remove in v11.
358
- */
359
- getCommentIcon(): CommentIcon | null;
360
337
  /**
361
338
  * Set this block's warning text.
362
339
  *
@@ -506,8 +483,7 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
506
483
  * Returns connections originating from this block.
507
484
  *
508
485
  * @param all If true, return all connections even hidden ones.
509
- * Otherwise, for a non-rendered block return an empty list, and for a
510
- * collapsed block don't return inputs connections.
486
+ * Otherwise, for a collapsed block don't return inputs connections.
511
487
  * @returns Array of connections.
512
488
  * @internal
513
489
  */
@@ -562,14 +538,8 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
562
538
  */
563
539
  bumpNeighbours(): void;
564
540
  /**
565
- * Bumps unconnected blocks out of alignment.
566
- */
567
- private bumpNeighboursInternal;
568
- /**
569
- * Schedule snapping to grid and bumping neighbours to occur after a brief
570
- * delay.
571
- *
572
- * @internal
541
+ * Snap to grid, and then bump neighbouring blocks away at the end of the next
542
+ * render.
573
543
  */
574
544
  scheduleSnapAndBump(): void;
575
545
  /**
@@ -674,5 +644,21 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
674
644
  * @internal
675
645
  */
676
646
  highlightShapeForInput(conn: RenderedConnection, add: boolean): void;
647
+ /** Sets the drag strategy for this block. */
648
+ setDragStrategy(dragStrategy: IDragStrategy): void;
649
+ /** Returns whether this block is movable or not. */
650
+ isMovable(): boolean;
651
+ /** Starts a drag on the block. */
652
+ startDrag(e?: PointerEvent): void;
653
+ /** Drags the block to the given location. */
654
+ drag(newLoc: Coordinate, e?: PointerEvent): void;
655
+ /** Ends the drag on the block. */
656
+ endDrag(e?: PointerEvent): void;
657
+ /** Moves the block back to where it was at the start of a drag. */
658
+ revertDrag(): void;
659
+ /**
660
+ * Returns a representation of this block that can be displayed in a flyout.
661
+ */
662
+ toFlyoutData(): FlyoutItemInfo[];
677
663
  }
678
664
  //# sourceMappingURL=block_svg.d.ts.map
package/core/blockly.d.ts CHANGED
@@ -9,14 +9,11 @@ import './events/events_ui_base.js';
9
9
  import './events/events_var_create.js';
10
10
  import { Block } from './block.js';
11
11
  import * as blockAnimations from './block_animations.js';
12
- import { BlockDragger } from './block_dragger.js';
13
12
  import { BlockSvg } from './block_svg.js';
14
13
  import { BlocklyOptions } from './blockly_options.js';
15
14
  import { Blocks } from './blocks.js';
16
15
  import * as browserEvents from './browser_events.js';
17
- import { Bubble } from './bubbles/bubble.js';
18
16
  import * as bubbles from './bubbles.js';
19
- import { BubbleDragger } from './bubble_dragger.js';
20
17
  import * as bumpObjects from './bump_objects.js';
21
18
  import * as clipboard from './clipboard.js';
22
19
  import * as common from './common.js';
@@ -29,22 +26,21 @@ import { ConnectionType } from './connection_type.js';
29
26
  import * as ContextMenu from './contextmenu.js';
30
27
  import * as ContextMenuItems from './contextmenu_items.js';
31
28
  import { ContextMenuRegistry } from './contextmenu_registry.js';
29
+ import * as comments from './comments.js';
32
30
  import * as Css from './css.js';
33
31
  import { DeleteArea } from './delete_area.js';
34
32
  import * as dialog from './dialog.js';
33
+ import { Dragger } from './dragging/dragger.js';
35
34
  import { DragTarget } from './drag_target.js';
36
35
  import * as dropDownDiv from './dropdowndiv.js';
37
36
  import * as Events from './events/events.js';
38
37
  import * as Extensions from './extensions.js';
39
38
  import { Field, FieldConfig, FieldValidator, UnattachedFieldError } from './field.js';
40
- import { FieldAngle, FieldAngleConfig, FieldAngleFromJsonConfig, FieldAngleValidator } from './field_angle.js';
41
39
  import { FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator } from './field_checkbox.js';
42
- import { FieldColour, FieldColourConfig, FieldColourFromJsonConfig, FieldColourValidator } from './field_colour.js';
43
40
  import { FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption } from './field_dropdown.js';
44
41
  import { FieldImage, FieldImageConfig, FieldImageFromJsonConfig } from './field_image.js';
45
42
  import { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig } from './field_label.js';
46
43
  import { FieldLabelSerializable } from './field_label_serializable.js';
47
- import { FieldMultilineInput, FieldMultilineInputConfig, FieldMultilineInputFromJsonConfig, FieldMultilineInputValidator } from './field_multilineinput.js';
48
44
  import { FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator } from './field_number.js';
49
45
  import * as fieldRegistry from './field_registry.js';
50
46
  import { FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator } from './field_textinput.js';
@@ -59,17 +55,14 @@ import { Gesture } from './gesture.js';
59
55
  import { Grid } from './grid.js';
60
56
  import * as icons from './icons.js';
61
57
  import { inject } from './inject.js';
62
- import { Align } from './inputs/align.js';
63
58
  import { Input } from './inputs/input.js';
64
- import { inputTypes } from './inputs/input_types.js';
65
59
  import * as inputs from './inputs.js';
66
60
  import { InsertionMarkerManager } from './insertion_marker_manager.js';
67
- import { InsertionMarkerPreviewer } from './connection_previewers/insertion_marker_previewer.js';
61
+ import { InsertionMarkerPreviewer } from './insertion_marker_previewer.js';
68
62
  import { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
69
63
  import { IASTNodeLocationSvg } from './interfaces/i_ast_node_location_svg.js';
70
64
  import { IASTNodeLocationWithBlock } from './interfaces/i_ast_node_location_with_block.js';
71
65
  import { IAutoHideable } from './interfaces/i_autohideable.js';
72
- import { IBlockDragger } from './interfaces/i_block_dragger.js';
73
66
  import { IBoundedElement } from './interfaces/i_bounded_element.js';
74
67
  import { IBubble } from './interfaces/i_bubble.js';
75
68
  import { ICollapsibleToolboxItem } from './interfaces/i_collapsible_toolbox_item.js';
@@ -78,10 +71,10 @@ import { IConnectionChecker } from './interfaces/i_connection_checker.js';
78
71
  import { IConnectionPreviewer } from './interfaces/i_connection_previewer.js';
79
72
  import { IContextMenu } from './interfaces/i_contextmenu.js';
80
73
  import { ICopyable, isCopyable } from './interfaces/i_copyable.js';
81
- import { IDeletable } from './interfaces/i_deletable.js';
74
+ import { IDeletable, isDeletable } from './interfaces/i_deletable.js';
82
75
  import { IDeleteArea } from './interfaces/i_delete_area.js';
83
76
  import { IDragTarget } from './interfaces/i_drag_target.js';
84
- import { IDraggable } from './interfaces/i_draggable.js';
77
+ import { IDraggable, isDraggable } from './interfaces/i_draggable.js';
85
78
  import { IFlyout } from './interfaces/i_flyout.js';
86
79
  import { IHasBubble, hasBubble } from './interfaces/i_has_bubble.js';
87
80
  import { IIcon, isIcon } from './interfaces/i_icon.js';
@@ -92,7 +85,7 @@ import { IObservable, isObservable } from './interfaces/i_observable.js';
92
85
  import { IPaster, isPaster } from './interfaces/i_paster.js';
93
86
  import { IPositionable } from './interfaces/i_positionable.js';
94
87
  import { IRegistrable } from './interfaces/i_registrable.js';
95
- import { ISelectable } from './interfaces/i_selectable.js';
88
+ import { ISelectable, isSelectable } from './interfaces/i_selectable.js';
96
89
  import { ISelectableToolboxItem } from './interfaces/i_selectable_toolbox_item.js';
97
90
  import { ISerializable, isSerializable } from './interfaces/i_serializable.js';
98
91
  import { IStyleable } from './interfaces/i_styleable.js';
@@ -119,7 +112,6 @@ import * as renderManagement from './render_management.js';
119
112
  import * as blockRendering from './renderers/common/block_rendering.js';
120
113
  import * as constants from './constants.js';
121
114
  import * as geras from './renderers/geras/geras.js';
122
- import * as minimalist from './renderers/minimalist/minimalist.js';
123
115
  import * as thrasos from './renderers/thrasos/thrasos.js';
124
116
  import * as zelos from './renderers/zelos/zelos.js';
125
117
  import { Scrollbar } from './scrollbar.js';
@@ -163,21 +155,6 @@ import { ZoomControls } from './zoom_controls.js';
163
155
  * @define {string}
164
156
  */
165
157
  export declare const VERSION = "uncompiled";
166
- /**
167
- * @see Blockly.Input.Align.LEFT
168
- * @deprecated Use `Blockly.inputs.Align.LEFT`. To be removed in v11.
169
- */
170
- export declare const ALIGN_LEFT = Align.LEFT;
171
- /**
172
- * @see Blockly.Input.Align.CENTRE
173
- * @deprecated Use `Blockly.inputs.Align.CENTER`. To be removed in v11.
174
- */
175
- export declare const ALIGN_CENTRE = Align.CENTRE;
176
- /**
177
- * @see Blockly.Input.Align.RIGHT
178
- * @deprecated Use `Blockly.inputs.Align.RIGHT`. To be removed in v11.
179
- */
180
- export declare const ALIGN_RIGHT = Align.RIGHT;
181
158
  /**
182
159
  * @see ConnectionType.INPUT_VALUE
183
160
  */
@@ -194,11 +171,6 @@ export declare const NEXT_STATEMENT = ConnectionType.NEXT_STATEMENT;
194
171
  * @see ConnectionType.PREVIOUS_STATEMENT
195
172
  */
196
173
  export declare const PREVIOUS_STATEMENT = ConnectionType.PREVIOUS_STATEMENT;
197
- /**
198
- * @see inputTypes.DUMMY_INPUT
199
- * @deprecated Use `Blockly.inputs.inputTypes.DUMMY`. To be removed in v11.
200
- */
201
- export declare const DUMMY_INPUT = inputTypes.DUMMY;
202
174
  /** Aliases for toolbox positions. */
203
175
  /**
204
176
  * @see toolbox.Position.TOP
@@ -265,7 +237,6 @@ export declare const defineBlocksWithJsonArray: typeof common.defineBlocksWithJs
265
237
  */
266
238
  export declare const setParentContainer: typeof common.setParentContainer;
267
239
  export declare const COLLAPSE_CHARS = 30;
268
- export declare const DRAG_STACK = true;
269
240
  export declare const OPPOSITE_TYPE: number[];
270
241
  export declare const RENAME_VARIABLE_ID = "RENAME_VARIABLE_ID";
271
242
  export declare const DELETE_VARIABLE_ID = "DELETE_VARIABLE_ID";
@@ -314,7 +285,6 @@ export { constants };
314
285
  export { dialog };
315
286
  export { fieldRegistry };
316
287
  export { geras };
317
- export { minimalist };
318
288
  export { registry };
319
289
  export { thrasos };
320
290
  export { uiPosition };
@@ -324,13 +294,9 @@ export { ASTNode };
324
294
  export { BasicCursor };
325
295
  export { Block };
326
296
  export { BlocklyOptions };
327
- export { BlockDragger };
328
297
  export { BlockSvg };
329
298
  export { Blocks };
330
299
  export { bubbles };
331
- /** @deprecated Use Blockly.bubbles.Bubble instead. To be removed in v11. */
332
- export { Bubble };
333
- export { BubbleDragger };
334
300
  export { CollapsibleToolboxCategory };
335
301
  export { ComponentManager };
336
302
  export { Connection };
@@ -338,19 +304,18 @@ export { ConnectionType };
338
304
  export { ConnectionChecker };
339
305
  export { ConnectionDB };
340
306
  export { ContextMenuRegistry };
307
+ export { comments };
341
308
  export { Cursor };
342
309
  export { DeleteArea };
310
+ export { Dragger };
343
311
  export { DragTarget };
344
312
  export declare const DropDownDiv: typeof dropDownDiv;
345
313
  export { Field, FieldConfig, FieldValidator, UnattachedFieldError };
346
- export { FieldAngle, FieldAngleConfig, FieldAngleFromJsonConfig, FieldAngleValidator, };
347
314
  export { FieldCheckbox, FieldCheckboxConfig, FieldCheckboxFromJsonConfig, FieldCheckboxValidator, };
348
- export { FieldColour, FieldColourConfig, FieldColourFromJsonConfig, FieldColourValidator, };
349
315
  export { FieldDropdown, FieldDropdownConfig, FieldDropdownFromJsonConfig, FieldDropdownValidator, MenuGenerator, MenuGeneratorFunction, MenuOption, };
350
316
  export { FieldImage, FieldImageConfig, FieldImageFromJsonConfig };
351
317
  export { FieldLabel, FieldLabelConfig, FieldLabelFromJsonConfig };
352
318
  export { FieldLabelSerializable };
353
- export { FieldMultilineInput, FieldMultilineInputConfig, FieldMultilineInputFromJsonConfig, FieldMultilineInputValidator, };
354
319
  export { FieldNumber, FieldNumberConfig, FieldNumberFromJsonConfig, FieldNumberValidator, };
355
320
  export { FieldTextInput, FieldTextInputConfig, FieldTextInputFromJsonConfig, FieldTextInputValidator, };
356
321
  export { FieldVariable, FieldVariableConfig, FieldVariableFromJsonConfig, FieldVariableValidator, };
@@ -366,7 +331,6 @@ export { IASTNodeLocation };
366
331
  export { IASTNodeLocationSvg };
367
332
  export { IASTNodeLocationWithBlock };
368
333
  export { IAutoHideable };
369
- export { IBlockDragger };
370
334
  export { IBoundedElement };
371
335
  export { IBubble };
372
336
  export { ICollapsibleToolboxItem };
@@ -376,10 +340,10 @@ export { IConnectionPreviewer };
376
340
  export { IContextMenu };
377
341
  export { icons };
378
342
  export { ICopyable, isCopyable };
379
- export { IDeletable };
343
+ export { IDeletable, isDeletable };
380
344
  export { IDeleteArea };
381
345
  export { IDragTarget };
382
- export { IDraggable };
346
+ export { IDraggable, isDraggable };
383
347
  export { IFlyout };
384
348
  export { IHasBubble, hasBubble };
385
349
  export { IIcon, isIcon };
@@ -394,7 +358,7 @@ export { IObservable, isObservable };
394
358
  export { IPaster, isPaster };
395
359
  export { IPositionable };
396
360
  export { IRegistrable };
397
- export { ISelectable };
361
+ export { ISelectable, isSelectable };
398
362
  export { ISelectableToolboxItem };
399
363
  export { ISerializable, isSerializable };
400
364
  export { IStyleable };
@@ -433,10 +397,6 @@ export { WorkspaceDragger };
433
397
  export { WorkspaceSvg };
434
398
  export { ZoomControls };
435
399
  export { config };
436
- /** @deprecated Use Blockly.ConnectionType instead. */
437
- export declare const connectionTypes: typeof ConnectionType;
438
400
  export { inject };
439
- /** @deprecated Use Blockly.inputs.inputTypes instead. To be removed in v11. */
440
- export { inputTypes };
441
401
  export { serialization };
442
402
  //# sourceMappingURL=blockly.d.ts.map
@@ -8,13 +8,14 @@ import { Coordinate } from '../utils/coordinate.js';
8
8
  import { Rect } from '../utils/rect.js';
9
9
  import { Size } from '../utils/size.js';
10
10
  import { WorkspaceSvg } from '../workspace_svg.js';
11
+ import { ISelectable } from '../blockly.js';
11
12
  /**
12
13
  * The abstract pop-up bubble class. This creates a UI that looks like a speech
13
14
  * bubble, where it has a "tail" that points to the block, and a "head" that
14
15
  * displays arbitrary svg elements.
15
16
  */
16
- export declare abstract class Bubble implements IBubble {
17
- protected readonly workspace: WorkspaceSvg;
17
+ export declare abstract class Bubble implements IBubble, ISelectable {
18
+ readonly workspace: WorkspaceSvg;
18
19
  protected anchor: Coordinate;
19
20
  protected ownerRect?: Rect | undefined;
20
21
  /** The width of the border around the bubble. */
@@ -37,6 +38,7 @@ export declare abstract class Bubble implements IBubble {
37
38
  static readonly TAIL_BEND = 4;
38
39
  /** Distance between arrow point and anchor point. */
39
40
  static readonly ANCHOR_RADIUS = 8;
41
+ id: string;
40
42
  /** The SVG group containing all parts of the bubble. */
41
43
  protected svgRoot: SVGGElement;
42
44
  /** The SVG path for the arrow from the anchor to the bubble. */
@@ -57,6 +59,7 @@ export declare abstract class Bubble implements IBubble {
57
59
  private relativeTop;
58
60
  /** The position of the left of the bubble realtive to its anchor. */
59
61
  private relativeLeft;
62
+ private dragStrategy;
60
63
  /**
61
64
  * @param workspace The workspace this bubble belongs to.
62
65
  * @param anchor The anchor location of the thing this bubble is attached to.
@@ -175,5 +178,17 @@ export declare abstract class Bubble implements IBubble {
175
178
  isDeletable(): boolean;
176
179
  /** @internal */
177
180
  showContextMenu(_e: Event): void;
181
+ /** Returns whether this bubble is movable or not. */
182
+ isMovable(): boolean;
183
+ /** Starts a drag on the bubble. */
184
+ startDrag(): void;
185
+ /** Drags the bubble to the given location. */
186
+ drag(newLoc: Coordinate): void;
187
+ /** Ends the drag on the bubble. */
188
+ endDrag(): void;
189
+ /** Moves the bubble back to where it was at the start of a drag. */
190
+ revertDrag(): void;
191
+ select(): void;
192
+ unselect(): void;
178
193
  }
179
194
  //# sourceMappingURL=bubble.d.ts.map
@@ -15,7 +15,7 @@ import type { WorkspaceSvg } from '../workspace_svg.js';
15
15
  * Used by the mutator icon.
16
16
  */
17
17
  export declare class MiniWorkspaceBubble extends Bubble {
18
- protected readonly workspace: WorkspaceSvg;
18
+ readonly workspace: WorkspaceSvg;
19
19
  protected anchor: Coordinate;
20
20
  protected ownerRect?: Rect | undefined;
21
21
  /**
@@ -12,7 +12,7 @@ import { WorkspaceSvg } from '../workspace_svg.js';
12
12
  */
13
13
  export declare class TextBubble extends Bubble {
14
14
  private text;
15
- protected readonly workspace: WorkspaceSvg;
15
+ readonly workspace: WorkspaceSvg;
16
16
  protected anchor: Coordinate;
17
17
  protected ownerRect?: Rect | undefined;
18
18
  private paragraph;
@@ -13,7 +13,7 @@ import { WorkspaceSvg } from '../workspace_svg.js';
13
13
  * Used by the comment icon.
14
14
  */
15
15
  export declare class TextInputBubble extends Bubble {
16
- protected readonly workspace: WorkspaceSvg;
16
+ readonly workspace: WorkspaceSvg;
17
17
  protected anchor: Coordinate;
18
18
  protected ownerRect?: Rect | undefined;
19
19
  /** The root of the elements specific to the text element. */
@@ -8,14 +8,6 @@ import { BlockPaster } from './clipboard/block_paster.js';
8
8
  import { WorkspaceSvg } from './workspace_svg.js';
9
9
  import * as registry from './clipboard/registry.js';
10
10
  import { Coordinate } from './utils/coordinate.js';
11
- /**
12
- * Copy a copyable element onto the local clipboard.
13
- *
14
- * @param toCopy The copyable element to be copied.
15
- * @deprecated v11. Use `myCopyable.toCopyData()` instead. To be removed v12.
16
- * @internal
17
- */
18
- export declare function copy<T extends ICopyData>(toCopy: ICopyable<T>): T | null;
19
11
  /**
20
12
  * Private version of copy for stubbing in tests.
21
13
  */
@@ -35,17 +27,6 @@ export declare function paste<T extends ICopyData>(copyData: T, workspace: Works
35
27
  * @returns the pasted thing if the paste was successful, null otherwise.
36
28
  */
37
29
  export declare function paste(): ICopyable<ICopyData> | null;
38
- /**
39
- * Duplicate this copy-paste-able element.
40
- *
41
- * @param toDuplicate The element to be duplicated.
42
- * @returns The element that was duplicated, or null if the duplication failed.
43
- * @deprecated v11. Use
44
- * `Blockly.clipboard.paste(myCopyable.toCopyData(), myWorkspace)` instead.
45
- * To be removed v12.
46
- * @internal
47
- */
48
- export declare function duplicate<U extends ICopyData, T extends ICopyable<U> & IHasWorkspace>(toDuplicate: T): T | null;
49
30
  /**
50
31
  * Private version of duplicate for stubbing in tests.
51
32
  */