blockly 10.4.1 → 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 +23 -21
- package/blockly_compressed.js +23 -21
- package/blockly_compressed.js.map +1 -1
- package/core/block_dragger.d.ts +27 -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 +2 -2
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.
|
|
@@ -81,13 +88,28 @@ export declare class BlockDragger implements IBlockDragger {
|
|
|
81
88
|
* at the start of the drag, in pixel units.
|
|
82
89
|
*/
|
|
83
90
|
drag(e: PointerEvent, delta: Coordinate): void;
|
|
91
|
+
/**
|
|
92
|
+
* @param draggingBlock The block being dragged.
|
|
93
|
+
* @param dragDelta How far the pointer has moved from the position
|
|
94
|
+
* at the start of the drag, in pixel units.
|
|
95
|
+
*/
|
|
84
96
|
private moveBlock;
|
|
85
97
|
private updateDragTargets;
|
|
86
98
|
/**
|
|
87
99
|
* Returns true if we would delete the block if it was dropped at this time,
|
|
88
100
|
* false otherwise.
|
|
101
|
+
*
|
|
102
|
+
* @param e The most recent move event.
|
|
103
|
+
* @param draggingBlock The block being dragged.
|
|
104
|
+
* @param delta How far the pointer has moved from the position
|
|
105
|
+
* at the start of the drag, in pixel units.
|
|
89
106
|
*/
|
|
90
107
|
private wouldDeleteBlock;
|
|
108
|
+
/**
|
|
109
|
+
* @param draggingBlock The block being dragged.
|
|
110
|
+
* @param dragDelta How far the pointer has moved from the position
|
|
111
|
+
* at the start of the drag, in pixel units.
|
|
112
|
+
*/
|
|
91
113
|
private updateConnectionPreview;
|
|
92
114
|
/**
|
|
93
115
|
* Returns true if the given orphan block can connect at the end of the
|
|
@@ -122,6 +144,11 @@ export declare class BlockDragger implements IBlockDragger {
|
|
|
122
144
|
* at the start of the drag, in pixel units.
|
|
123
145
|
*/
|
|
124
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;
|
|
125
152
|
/**
|
|
126
153
|
* Calculates the drag delta and new location values after a block is dragged.
|
|
127
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blockly",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.5.0-beta.0",
|
|
4
4
|
"description": "Blockly is a library for building visual programming editors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blockly"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"readline-sync": "^1.4.10",
|
|
64
64
|
"rimraf": "^5.0.0",
|
|
65
65
|
"typescript": "^5.0.2",
|
|
66
|
-
"webdriverio": "^8.
|
|
66
|
+
"webdriverio": "^8.32.2",
|
|
67
67
|
"yargs": "^17.2.1"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|