blockly 9.3.3 → 10.0.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/README.md +9 -7
- package/blockly.min.js +1314 -1415
- package/blockly_compressed.js +1067 -1110
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +120 -136
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +59 -32
- package/core/block_dragger.d.ts +2 -2
- package/core/block_svg.d.ts +38 -67
- package/core/blockly.d.ts +18 -112
- package/core/browser_events.d.ts +1 -2
- package/core/bubble_dragger.d.ts +1 -2
- package/core/{bubble.d.ts → bubble_old.d.ts} +3 -7
- package/core/bubbles/bubble.d.ts +174 -0
- package/core/bubbles/mini_workspace_bubble.d.ts +80 -0
- package/core/bubbles/text_bubble.d.ts +35 -0
- package/core/bubbles/textinput_bubble.d.ts +89 -0
- package/core/bump_objects.d.ts +6 -4
- package/core/connection.d.ts +19 -9
- package/core/connection_db.d.ts +4 -4
- package/core/contextmenu.d.ts +1 -2
- package/core/events/events.d.ts +1 -4
- package/core/events/events_abstract.d.ts +0 -6
- package/core/events/events_block_base.d.ts +0 -6
- package/core/events/events_block_change.d.ts +0 -6
- package/core/events/events_block_create.d.ts +0 -6
- package/core/events/events_block_delete.d.ts +0 -6
- package/core/events/events_block_drag.d.ts +0 -6
- package/core/events/events_block_move.d.ts +21 -7
- package/core/events/events_bubble_open.d.ts +0 -6
- package/core/events/events_click.d.ts +0 -6
- package/core/events/events_comment_base.d.ts +0 -6
- package/core/events/events_comment_change.d.ts +0 -6
- package/core/events/events_comment_create.d.ts +0 -6
- package/core/events/events_comment_move.d.ts +0 -6
- package/core/events/events_marker_move.d.ts +0 -6
- package/core/events/events_selected.d.ts +0 -6
- package/core/events/events_theme_change.d.ts +0 -6
- package/core/events/events_toolbox_item_select.d.ts +0 -6
- package/core/events/events_trashcan_open.d.ts +0 -6
- package/core/events/events_var_base.d.ts +0 -6
- package/core/events/events_var_create.d.ts +0 -6
- package/core/events/events_var_delete.d.ts +0 -6
- package/core/events/events_var_rename.d.ts +0 -6
- package/core/events/events_viewport.d.ts +0 -6
- package/core/events/utils.d.ts +1 -1
- package/core/events/workspace_events.d.ts +1 -16
- package/core/field.d.ts +31 -5
- package/core/field_checkbox.d.ts +1 -1
- package/core/field_colour.d.ts +0 -2
- package/core/field_dropdown.d.ts +11 -13
- package/core/field_image.d.ts +5 -5
- package/core/field_input.d.ts +9 -2
- package/core/field_label.d.ts +3 -1
- package/core/field_number.d.ts +4 -4
- package/core/field_variable.d.ts +5 -5
- package/core/flyout_base.d.ts +23 -25
- package/core/flyout_button.d.ts +9 -9
- package/core/flyout_horizontal.d.ts +1 -1
- package/core/flyout_vertical.d.ts +1 -1
- package/core/generator.d.ts +15 -2
- package/core/gesture.d.ts +58 -41
- package/core/icons/comment_icon.d.ts +108 -0
- package/core/icons/exceptions.d.ts +14 -0
- package/core/icons/icon.d.ts +38 -0
- package/core/icons/icon_types.d.ts +22 -0
- package/core/icons/mutator_icon.d.ts +90 -0
- package/core/icons/registry.d.ts +23 -0
- package/core/icons/warning_icon.d.ts +67 -0
- package/core/icons.d.ts +12 -0
- package/core/inputs/dummy_input.d.ts +20 -0
- package/core/{input.d.ts → inputs/input.d.ts} +20 -13
- package/core/{input_types.d.ts → inputs/input_types.d.ts} +2 -1
- package/core/inputs/statement_input.d.ts +22 -0
- package/core/inputs/value_input.d.ts +20 -0
- package/core/interfaces/i_block_dragger.d.ts +1 -1
- package/core/interfaces/i_bounded_element.d.ts +2 -1
- package/core/interfaces/i_bubble.d.ts +2 -14
- package/core/interfaces/i_has_bubble.d.ts +14 -0
- package/core/interfaces/i_icon.d.ts +75 -0
- package/core/interfaces/i_serializable.d.ts +24 -0
- package/core/keyboard_nav/ast_node.d.ts +15 -15
- package/core/keyboard_nav/basic_cursor.d.ts +2 -2
- package/core/keyboard_nav/marker.d.ts +2 -2
- package/core/main.d.ts +0 -10
- package/core/marker_manager.d.ts +0 -1
- package/core/names.d.ts +4 -4
- package/core/options.d.ts +3 -3
- package/core/procedures.d.ts +1 -4
- package/core/registry.d.ts +5 -0
- package/core/render_management.d.ts +9 -1
- package/core/rendered_connection.d.ts +7 -7
- package/core/renderers/common/block_rendering.d.ts +0 -10
- package/core/renderers/common/constants.d.ts +5 -7
- package/core/renderers/common/drawer.d.ts +7 -2
- package/core/renderers/common/info.d.ts +1 -4
- package/core/renderers/common/marker_svg.d.ts +4 -4
- package/core/renderers/common/renderer.d.ts +0 -9
- package/core/renderers/geras/highlighter.d.ts +1 -1
- package/core/renderers/geras/info.d.ts +1 -1
- package/core/renderers/geras/measurables/inline_input.d.ts +1 -1
- package/core/renderers/geras/measurables/statement_input.d.ts +1 -1
- package/core/renderers/geras/renderer.d.ts +1 -1
- package/core/renderers/measurables/external_value_input.d.ts +1 -1
- package/core/renderers/measurables/field.d.ts +1 -1
- package/core/renderers/measurables/icon.d.ts +5 -1
- package/core/renderers/measurables/inline_input.d.ts +1 -1
- package/core/renderers/measurables/input_connection.d.ts +1 -1
- package/core/renderers/measurables/statement_input.d.ts +1 -1
- package/core/renderers/zelos/constants.d.ts +2 -2
- package/core/renderers/zelos/info.d.ts +2 -2
- package/core/renderers/zelos/marker_svg.d.ts +3 -3
- package/core/renderers/zelos/measurables/inputs.d.ts +1 -1
- package/core/renderers/zelos/path_object.d.ts +3 -3
- package/core/scrollbar.d.ts +0 -2
- package/core/scrollbar_pair.d.ts +0 -2
- package/core/serialization/blocks.d.ts +3 -3
- package/core/serialization/exceptions.d.ts +11 -0
- package/core/shortcut_registry.d.ts +2 -2
- package/core/theme_manager.d.ts +0 -1
- package/core/touch.d.ts +0 -43
- package/core/trashcan.d.ts +19 -21
- package/core/utils/dom.d.ts +2 -2
- package/core/utils/object.d.ts +0 -25
- package/core/utils/rect.d.ts +2 -0
- package/core/utils/style.d.ts +0 -12
- package/core/utils/svg_math.d.ts +0 -8
- package/core/utils/xml.d.ts +15 -22
- package/core/utils.d.ts +0 -138
- package/core/widgetdiv.d.ts +5 -0
- package/core/workspace.d.ts +9 -3
- package/core/workspace_comment.d.ts +3 -3
- package/core/workspace_comment_svg.d.ts +31 -44
- package/core/workspace_dragger.d.ts +1 -4
- package/core/workspace_svg.d.ts +13 -50
- package/core/xml.d.ts +0 -12
- package/core-browser.js +0 -1
- package/core.js +0 -1
- package/dart_compressed.js +124 -159
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +127 -169
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +119 -142
- package/lua_compressed.js.map +1 -1
- package/msg/constants.d.ts +1 -3
- package/msg/msg.d.ts +1 -2
- package/msg/qqq.d.ts +1 -3
- package/msg/synonyms.d.ts +1 -3
- package/package.json +12 -13
- package/php_compressed.js +131 -161
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +118 -149
- package/python_compressed.js.map +1 -1
- package/core/comment.d.ts +0 -115
- package/core/events/events_ui.d.ts +0 -40
- package/core/icon.d.ts +0 -89
- package/core/mutator.d.ts +0 -142
- package/core/renderers/common/debug.d.ts +0 -29
- package/core/renderers/common/debugger.d.ts +0 -117
- package/core/warning.d.ts +0 -53
package/core/widgetdiv.d.ts
CHANGED
|
@@ -65,4 +65,9 @@ export declare function hideIfOwner(oldOwner: unknown): void;
|
|
|
65
65
|
* @internal
|
|
66
66
|
*/
|
|
67
67
|
export declare function positionWithAnchor(viewportBBox: Rect, anchorBBox: Rect, widgetSize: Size, rtl: boolean): void;
|
|
68
|
+
/**
|
|
69
|
+
* Reposition the widget div if the owner of it says to.
|
|
70
|
+
* If the owner isn't a field, just give up and hide it.
|
|
71
|
+
*/
|
|
72
|
+
export declare function repositionForWindowResize(): void;
|
|
68
73
|
//# sourceMappingURL=widgetdiv.d.ts.map
|
package/core/workspace.d.ts
CHANGED
|
@@ -91,8 +91,6 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
91
91
|
/**
|
|
92
92
|
* Dispose of this workspace.
|
|
93
93
|
* Unlink from all DOM elements to prevent memory leaks.
|
|
94
|
-
*
|
|
95
|
-
* @suppress {checkTypes}
|
|
96
94
|
*/
|
|
97
95
|
dispose(): void;
|
|
98
96
|
/**
|
|
@@ -342,7 +340,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
342
340
|
* @param func Function to call.
|
|
343
341
|
* @returns Obsolete return value, ignore.
|
|
344
342
|
*/
|
|
345
|
-
addChangeListener(func:
|
|
343
|
+
addChangeListener(func: (e: Abstract) => void): Function;
|
|
346
344
|
/**
|
|
347
345
|
* Stop listening for this workspace's changes.
|
|
348
346
|
*
|
|
@@ -423,6 +421,14 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
423
421
|
setVariableMap(variableMap: VariableMap): void;
|
|
424
422
|
/** Returns the map of all procedures on the workpace. */
|
|
425
423
|
getProcedureMap(): IProcedureMap;
|
|
424
|
+
/**
|
|
425
|
+
* Returns the root workspace of this workspace if the workspace has
|
|
426
|
+
* parent(s).
|
|
427
|
+
*
|
|
428
|
+
* E.g. workspaces in flyouts and mini workspace bubbles have parent
|
|
429
|
+
* workspaces.
|
|
430
|
+
*/
|
|
431
|
+
getRootWorkspace(): Workspace | null;
|
|
426
432
|
/**
|
|
427
433
|
* Find the workspace with the specified ID.
|
|
428
434
|
*
|
|
@@ -15,9 +15,9 @@ export declare class WorkspaceComment {
|
|
|
15
15
|
protected height_: number;
|
|
16
16
|
protected width_: number;
|
|
17
17
|
protected RTL: boolean;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
18
|
+
private deletable;
|
|
19
|
+
private movable;
|
|
20
|
+
private editable;
|
|
21
21
|
protected content_: string;
|
|
22
22
|
/** Whether this comment has been disposed. */
|
|
23
23
|
protected disposed_: boolean;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import './events/events_selected.js';
|
|
7
|
-
import type { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
8
7
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
9
8
|
import type { IBubble } from './interfaces/i_bubble.js';
|
|
10
9
|
import type { CopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
@@ -27,25 +26,24 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
27
26
|
private static readonly TOP_OFFSET;
|
|
28
27
|
workspace: WorkspaceSvg;
|
|
29
28
|
/** Mouse up event data. */
|
|
30
|
-
private
|
|
29
|
+
private onMouseUpWrapper;
|
|
31
30
|
/** Mouse move event data. */
|
|
32
|
-
private
|
|
31
|
+
private onMouseMoveWrapper;
|
|
33
32
|
/** Whether event handlers have been initialized. */
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
private
|
|
39
|
-
private
|
|
40
|
-
private
|
|
41
|
-
private
|
|
42
|
-
private
|
|
43
|
-
private
|
|
44
|
-
private readonly
|
|
33
|
+
private eventsInit;
|
|
34
|
+
private textarea;
|
|
35
|
+
private svgRectTarget;
|
|
36
|
+
private svgHandleTarget;
|
|
37
|
+
private foreignObject;
|
|
38
|
+
private resizeGroup;
|
|
39
|
+
private deleteGroup;
|
|
40
|
+
private deleteIconBorder;
|
|
41
|
+
private focused;
|
|
42
|
+
private autoLayout;
|
|
43
|
+
private readonly svgGroup;
|
|
45
44
|
svgRect_: SVGRectElement;
|
|
46
45
|
/** Whether the comment is rendered onscreen and is a part of the DOM. */
|
|
47
|
-
private
|
|
48
|
-
private readonly useDragSurface_;
|
|
46
|
+
private rendered;
|
|
49
47
|
/**
|
|
50
48
|
* @param workspace The block's workspace.
|
|
51
49
|
* @param content The content of this workspace comment.
|
|
@@ -74,7 +72,7 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
74
72
|
*
|
|
75
73
|
* @param e Pointer down event.
|
|
76
74
|
*/
|
|
77
|
-
private
|
|
75
|
+
private pathMouseDown;
|
|
78
76
|
/**
|
|
79
77
|
* Show the context menu for this workspace comment.
|
|
80
78
|
*
|
|
@@ -147,23 +145,12 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
147
145
|
*/
|
|
148
146
|
translate(x: number, y: number): void;
|
|
149
147
|
/**
|
|
150
|
-
* Move this comment
|
|
151
|
-
* positioning. Generally should be called at the same time as
|
|
152
|
-
* setDragging(true). Does nothing if useDragSurface_ is false.
|
|
148
|
+
* Move this comment during a drag.
|
|
153
149
|
*
|
|
154
|
-
* @internal
|
|
155
|
-
*/
|
|
156
|
-
moveToDragSurface(): void;
|
|
157
|
-
/**
|
|
158
|
-
* Move this comment during a drag, taking into account whether we are using a
|
|
159
|
-
* drag surface to translate blocks.
|
|
160
|
-
*
|
|
161
|
-
* @param dragSurface The surface that carries rendered items during a drag,
|
|
162
|
-
* or null if no drag surface is in use.
|
|
163
150
|
* @param newLoc The location to translate to, in workspace coordinates.
|
|
164
151
|
* @internal
|
|
165
152
|
*/
|
|
166
|
-
moveDuringDrag(
|
|
153
|
+
moveDuringDrag(newLoc: Coordinate): void;
|
|
167
154
|
/**
|
|
168
155
|
* Move the bubble group to the specified location in workspace coordinates.
|
|
169
156
|
*
|
|
@@ -176,7 +163,7 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
176
163
|
* Clear the comment of transform="..." attributes.
|
|
177
164
|
* Used when the comment is switching from 3d to 2d transform or vice versa.
|
|
178
165
|
*/
|
|
179
|
-
private
|
|
166
|
+
private clearTransformAttributes;
|
|
180
167
|
/**
|
|
181
168
|
* Returns the coordinates of a bounding box describing the dimensions of this
|
|
182
169
|
* comment.
|
|
@@ -286,64 +273,64 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
286
273
|
*
|
|
287
274
|
* @returns The top-level node of the editor.
|
|
288
275
|
*/
|
|
289
|
-
private
|
|
276
|
+
private createEditor;
|
|
290
277
|
/** Add the resize icon to the DOM */
|
|
291
|
-
private
|
|
278
|
+
private addResizeDom;
|
|
292
279
|
/** Add the delete icon to the DOM */
|
|
293
|
-
private
|
|
280
|
+
private addDeleteDom;
|
|
294
281
|
/**
|
|
295
282
|
* Handle a pointerdown on comment's resize corner.
|
|
296
283
|
*
|
|
297
284
|
* @param e Pointer down event.
|
|
298
285
|
*/
|
|
299
|
-
private
|
|
286
|
+
private resizeMouseDown;
|
|
300
287
|
/**
|
|
301
288
|
* Handle a pointerdown on comment's delete icon.
|
|
302
289
|
*
|
|
303
290
|
* @param e Pointer down event.
|
|
304
291
|
*/
|
|
305
|
-
private
|
|
292
|
+
private deleteMouseDown;
|
|
306
293
|
/**
|
|
307
294
|
* Handle a pointerout on comment's delete icon.
|
|
308
295
|
*
|
|
309
296
|
* @param _e Pointer out event.
|
|
310
297
|
*/
|
|
311
|
-
private
|
|
298
|
+
private deleteMouseOut;
|
|
312
299
|
/**
|
|
313
300
|
* Handle a pointerup on comment's delete icon.
|
|
314
301
|
*
|
|
315
302
|
* @param e Pointer up event.
|
|
316
303
|
*/
|
|
317
|
-
private
|
|
304
|
+
private deleteMouseUp;
|
|
318
305
|
/** Stop binding to the global pointerup and pointermove events. */
|
|
319
|
-
private
|
|
306
|
+
private unbindDragEvents;
|
|
320
307
|
/**
|
|
321
308
|
* Handle a pointerup event while dragging a comment's border or resize
|
|
322
309
|
* handle.
|
|
323
310
|
*
|
|
324
311
|
* @param _e Pointer up event.
|
|
325
312
|
*/
|
|
326
|
-
private
|
|
313
|
+
private resizeMouseUp;
|
|
327
314
|
/**
|
|
328
315
|
* Resize this comment to follow the pointer.
|
|
329
316
|
*
|
|
330
317
|
* @param e Pointer move event.
|
|
331
318
|
*/
|
|
332
|
-
private
|
|
319
|
+
private resizeMouseMove;
|
|
333
320
|
/**
|
|
334
321
|
* Callback function triggered when the comment has resized.
|
|
335
322
|
* Resize the text area accordingly.
|
|
336
323
|
*/
|
|
337
|
-
private
|
|
324
|
+
private resizeComment;
|
|
338
325
|
/**
|
|
339
326
|
* Set size
|
|
340
327
|
*
|
|
341
328
|
* @param width width of the container
|
|
342
329
|
* @param height height of the container
|
|
343
330
|
*/
|
|
344
|
-
private
|
|
331
|
+
private setSize;
|
|
345
332
|
/** Dispose of any rendered comment components. */
|
|
346
|
-
private
|
|
333
|
+
private disposeInternal;
|
|
347
334
|
/**
|
|
348
335
|
* Set the focus on the text area.
|
|
349
336
|
*
|
|
@@ -8,9 +8,7 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* Class for a workspace dragger. It moves the workspace around when it is
|
|
10
10
|
* being dragged by a mouse or touch.
|
|
11
|
-
*
|
|
12
|
-
* and how to do translations based on that. This simply passes the right
|
|
13
|
-
* commands based on events.
|
|
11
|
+
*
|
|
14
12
|
*/
|
|
15
13
|
export declare class WorkspaceDragger {
|
|
16
14
|
private workspace;
|
|
@@ -22,7 +20,6 @@ export declare class WorkspaceDragger {
|
|
|
22
20
|
/**
|
|
23
21
|
* Sever all links from this object.
|
|
24
22
|
*
|
|
25
|
-
* @suppress {checkTypes}
|
|
26
23
|
* @internal
|
|
27
24
|
*/
|
|
28
25
|
dispose(): void;
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import './events/events_block_create.js';
|
|
|
7
7
|
import './events/events_theme_change.js';
|
|
8
8
|
import './events/events_viewport.js';
|
|
9
9
|
import type { Block } from './block.js';
|
|
10
|
-
import type { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
11
10
|
import type { BlockSvg } from './block_svg.js';
|
|
12
11
|
import * as browserEvents from './browser_events.js';
|
|
13
12
|
import { ComponentManager } from './component_manager.js';
|
|
@@ -40,7 +39,6 @@ import type { VariableModel } from './variable_model.js';
|
|
|
40
39
|
import { Workspace } from './workspace.js';
|
|
41
40
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
42
41
|
import { WorkspaceComment } from './workspace_comment.js';
|
|
43
|
-
import type { WorkspaceDragSurfaceSvg } from './workspace_drag_surface_svg.js';
|
|
44
42
|
import { ZoomControls } from './zoom_controls.js';
|
|
45
43
|
import { ContextMenuOption } from './contextmenu_registry.js';
|
|
46
44
|
/**
|
|
@@ -164,22 +162,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
164
162
|
* @internal
|
|
165
163
|
*/
|
|
166
164
|
currentGesture_: Gesture | null;
|
|
167
|
-
/** This workspace's surface for dragging blocks, if it exists. */
|
|
168
|
-
private readonly blockDragSurface;
|
|
169
|
-
/** This workspace's drag surface, if it exists. */
|
|
170
|
-
private readonly workspaceDragSurface;
|
|
171
|
-
/**
|
|
172
|
-
* Whether to move workspace to the drag surface when it is dragged.
|
|
173
|
-
* True if it should move, false if it should be translated directly.
|
|
174
|
-
*/
|
|
175
|
-
private readonly useWorkspaceDragSurface;
|
|
176
|
-
/**
|
|
177
|
-
* Whether the drag surface is actively in use. When true, calls to
|
|
178
|
-
* translate will translate the drag surface instead of the translating the
|
|
179
|
-
* workspace directly.
|
|
180
|
-
* This is set to true in setupDragSurface and to false in resetDragSurface.
|
|
181
|
-
*/
|
|
182
|
-
private isDragSurfaceActive;
|
|
183
165
|
/**
|
|
184
166
|
* The first parent div with 'injectionDiv' in the name, or null if not set.
|
|
185
167
|
* Access this with getInjectionDiv.
|
|
@@ -256,10 +238,8 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
256
238
|
zoomControls_: ZoomControls | null;
|
|
257
239
|
/**
|
|
258
240
|
* @param options Dictionary of options.
|
|
259
|
-
* @param opt_blockDragSurface Drag surface for blocks.
|
|
260
|
-
* @param opt_wsDragSurface Drag surface for the workspace.
|
|
261
241
|
*/
|
|
262
|
-
constructor(options: Options
|
|
242
|
+
constructor(options: Options);
|
|
263
243
|
/**
|
|
264
244
|
* Get the marker manager for this workspace.
|
|
265
245
|
*
|
|
@@ -428,8 +408,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
428
408
|
/**
|
|
429
409
|
* Dispose of this workspace.
|
|
430
410
|
* Unlink from all DOM elements to prevent memory leaks.
|
|
431
|
-
*
|
|
432
|
-
* @suppress {checkTypes}
|
|
433
411
|
*/
|
|
434
412
|
dispose(): void;
|
|
435
413
|
/**
|
|
@@ -545,29 +523,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
545
523
|
* the Blockly div.
|
|
546
524
|
*/
|
|
547
525
|
translate(x: number, y: number): void;
|
|
548
|
-
/**
|
|
549
|
-
* Called at the end of a workspace drag to take the contents
|
|
550
|
-
* out of the drag surface and put them back into the workspace SVG.
|
|
551
|
-
* Does nothing if the workspace drag surface is not enabled.
|
|
552
|
-
*
|
|
553
|
-
* @internal
|
|
554
|
-
*/
|
|
555
|
-
resetDragSurface(): void;
|
|
556
|
-
/**
|
|
557
|
-
* Called at the beginning of a workspace drag to move contents of
|
|
558
|
-
* the workspace to the drag surface.
|
|
559
|
-
* Does nothing if the drag surface is not enabled.
|
|
560
|
-
*
|
|
561
|
-
* @internal
|
|
562
|
-
*/
|
|
563
|
-
setupDragSurface(): void;
|
|
564
|
-
/**
|
|
565
|
-
* Gets the drag surface blocks are moved to when a drag is started.
|
|
566
|
-
*
|
|
567
|
-
* @returns This workspace's block drag surface, if one is in use.
|
|
568
|
-
* @internal
|
|
569
|
-
*/
|
|
570
|
-
getBlockDragSurface(): BlockDragSurfaceSvg | null;
|
|
571
526
|
/**
|
|
572
527
|
* Returns the horizontal offset of the workspace.
|
|
573
528
|
* Intended for LTR/RTL compatibility in XML.
|
|
@@ -617,8 +572,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
617
572
|
*
|
|
618
573
|
* @param xmlComment XML workspace comment element.
|
|
619
574
|
* @returns The pasted workspace comment.
|
|
620
|
-
* @suppress {checkTypes} Suppress checks while workspace comments are not
|
|
621
|
-
* bundled in.
|
|
622
575
|
*/
|
|
623
576
|
private pasteWorkspaceComment_;
|
|
624
577
|
/**
|
|
@@ -878,6 +831,7 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
878
831
|
* @param comment comment to remove.
|
|
879
832
|
*/
|
|
880
833
|
removeTopComment(comment: WorkspaceComment): void;
|
|
834
|
+
getRootWorkspace(): WorkspaceSvg | null;
|
|
881
835
|
/**
|
|
882
836
|
* Adds a bounded element to the list of top bounded elements.
|
|
883
837
|
*
|
|
@@ -999,9 +953,18 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
999
953
|
/**
|
|
1000
954
|
* Close tooltips, context menus, dropdown selections, etc.
|
|
1001
955
|
*
|
|
1002
|
-
* @param
|
|
956
|
+
* @param onlyClosePopups Whether only popups should be closed. Defaults to
|
|
957
|
+
* false.
|
|
958
|
+
*/
|
|
959
|
+
hideChaff(onlyClosePopups?: boolean): void;
|
|
960
|
+
/**
|
|
961
|
+
* Hide any autohideable components (like flyout, trashcan, and any
|
|
962
|
+
* user-registered components).
|
|
963
|
+
*
|
|
964
|
+
* @param onlyClosePopups Whether only popups should be closed. Defaults to
|
|
965
|
+
* false.
|
|
1003
966
|
*/
|
|
1004
|
-
|
|
967
|
+
hideComponents(onlyClosePopups?: boolean): void;
|
|
1005
968
|
/**
|
|
1006
969
|
* Sets the X/Y translations of a top level workspace.
|
|
1007
970
|
*
|
package/core/xml.d.ts
CHANGED
|
@@ -56,16 +56,6 @@ export declare function domToText(dom: Node): string;
|
|
|
56
56
|
* @returns Text representation.
|
|
57
57
|
*/
|
|
58
58
|
export declare function domToPrettyText(dom: Node): string;
|
|
59
|
-
/**
|
|
60
|
-
* Converts an XML string into a DOM structure.
|
|
61
|
-
*
|
|
62
|
-
* @param text An XML string.
|
|
63
|
-
* @returns A DOM object representing the singular child of the document
|
|
64
|
-
* element.
|
|
65
|
-
* @throws if the text doesn't parse.
|
|
66
|
-
* @deprecated Moved to core/utils/xml.js.
|
|
67
|
-
*/
|
|
68
|
-
export declare function textToDom(text: string): Element;
|
|
69
59
|
/**
|
|
70
60
|
* Clear the given workspace then decode an XML DOM and
|
|
71
61
|
* create blocks on the workspace.
|
|
@@ -81,8 +71,6 @@ export declare function clearWorkspaceAndLoadFromXml(xml: Element, workspace: Wo
|
|
|
81
71
|
* @param xml XML DOM.
|
|
82
72
|
* @param workspace The workspace.
|
|
83
73
|
* @returns An array containing new block IDs.
|
|
84
|
-
* @suppress {strictModuleDepCheck} Suppress module check while workspace
|
|
85
|
-
* comments are not bundled in.
|
|
86
74
|
*/
|
|
87
75
|
export declare function domToWorkspace(xml: Element, workspace: Workspace): string[];
|
|
88
76
|
/**
|
package/core-browser.js
CHANGED