blockly 10.4.2 → 10.5.0-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.
- package/blockly.min.js +27 -25
- package/blockly_compressed.js +27 -25
- package/blockly_compressed.js.map +1 -1
- package/core/block_dragger.d.ts +12 -0
- package/core/blockly.d.ts +1 -1
- package/core/events/events_click.d.ts +1 -1
- package/core/{connection_previewers/insertion_marker_previewer.d.ts → insertion_marker_previewer.d.ts} +3 -3
- package/package.json +1 -1
package/core/block_dragger.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ export declare class BlockDragger implements IBlockDragger {
|
|
|
31
31
|
/** Whether the block would be deleted if dropped immediately. */
|
|
32
32
|
protected wouldDeleteBlock_: boolean;
|
|
33
33
|
protected startXY_: Coordinate;
|
|
34
|
+
/** The parent block at the start of the drag. */
|
|
35
|
+
private startParentConn;
|
|
36
|
+
/**
|
|
37
|
+
* The child block at the start of the drag. Only gets set if
|
|
38
|
+
* `healStack` is true.
|
|
39
|
+
*/
|
|
40
|
+
private startChildConn;
|
|
34
41
|
/**
|
|
35
42
|
* @deprecated To be removed in v11. Updating icons is now handled by the
|
|
36
43
|
* block's `moveDuringDrag` method.
|
|
@@ -137,6 +144,11 @@ export declare class BlockDragger implements IBlockDragger {
|
|
|
137
144
|
* at the start of the drag, in pixel units.
|
|
138
145
|
*/
|
|
139
146
|
endDrag(e: PointerEvent, currentDragDeltaXY: Coordinate): void;
|
|
147
|
+
/**
|
|
148
|
+
* Moves the dragged block back to its original position before the start of
|
|
149
|
+
* the drag. Reconnects any parent and child blocks.\
|
|
150
|
+
*/
|
|
151
|
+
private moveToOriginalPosition;
|
|
140
152
|
/**
|
|
141
153
|
* Calculates the drag delta and new location values after a block is dragged.
|
|
142
154
|
*
|
package/core/blockly.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ import { Input } from './inputs/input.js';
|
|
|
64
64
|
import { inputTypes } from './inputs/input_types.js';
|
|
65
65
|
import * as inputs from './inputs.js';
|
|
66
66
|
import { InsertionMarkerManager } from './insertion_marker_manager.js';
|
|
67
|
-
import { InsertionMarkerPreviewer } from './
|
|
67
|
+
import { InsertionMarkerPreviewer } from './insertion_marker_previewer.js';
|
|
68
68
|
import { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
|
|
69
69
|
import { IASTNodeLocationSvg } from './interfaces/i_ast_node_location_svg.js';
|
|
70
70
|
import { IASTNodeLocationWithBlock } from './interfaces/i_ast_node_location_with_block.js';
|
|
@@ -13,7 +13,7 @@ import { AbstractEventJson } from './events_abstract.js';
|
|
|
13
13
|
import { UiBase } from './events_ui_base.js';
|
|
14
14
|
import { Workspace } from '../workspace.js';
|
|
15
15
|
/**
|
|
16
|
-
* Notifies listeners that
|
|
16
|
+
* Notifies listeners that some blockly element was clicked.
|
|
17
17
|
*/
|
|
18
18
|
export declare class Click extends UiBase {
|
|
19
19
|
/** The ID of the block that was clicked, if a block was clicked. */
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2024 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { BlockSvg } from '
|
|
7
|
-
import { IConnectionPreviewer } from '
|
|
8
|
-
import { RenderedConnection } from '
|
|
6
|
+
import { BlockSvg } from './block_svg.js';
|
|
7
|
+
import { IConnectionPreviewer } from './interfaces/i_connection_previewer.js';
|
|
8
|
+
import { RenderedConnection } from './rendered_connection.js';
|
|
9
9
|
export declare class InsertionMarkerPreviewer implements IConnectionPreviewer {
|
|
10
10
|
private readonly workspace;
|
|
11
11
|
private fadedBlock;
|