blockly 9.0.0-beta.1 → 9.0.0-beta.2
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 +581 -557
- package/blockly_compressed.js +575 -551
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +6 -6
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +11 -0
- package/core/block_svg.d.ts +3 -3
- package/core/blockly.d.ts +2 -2
- package/core/events/events.d.ts +50 -24
- package/core/events/events_abstract.d.ts +8 -4
- package/core/events/events_block_base.d.ts +8 -6
- package/core/events/events_block_change.d.ts +14 -8
- package/core/events/events_block_create.d.ts +12 -6
- package/core/events/events_block_delete.d.ts +14 -7
- package/core/events/events_block_drag.d.ts +9 -3
- package/core/events/events_block_move.d.ts +15 -9
- package/core/events/events_bubble_open.d.ts +16 -5
- package/core/events/events_click.d.ts +15 -5
- package/core/events/events_comment_base.d.ts +7 -5
- package/core/events/events_comment_change.d.ts +9 -5
- package/core/events/events_comment_create.d.ts +7 -4
- package/core/events/events_comment_delete.d.ts +1 -13
- package/core/events/events_comment_move.d.ts +10 -6
- package/core/events/events_marker_move.d.ts +11 -4
- package/core/events/events_selected.d.ts +9 -4
- package/core/events/events_theme_change.d.ts +6 -2
- package/core/events/events_toolbox_item_select.d.ts +9 -4
- package/core/events/events_trashcan_open.d.ts +6 -2
- package/core/events/events_var_base.d.ts +8 -6
- package/core/events/events_var_create.d.ts +9 -5
- package/core/events/events_var_delete.d.ts +9 -5
- package/core/events/events_var_rename.d.ts +9 -5
- package/core/events/events_viewport.d.ts +9 -2
- package/core/events/workspace_events.d.ts +6 -5
- package/core/field.d.ts +0 -2
- package/core/gesture.d.ts +8 -9
- package/core/grid.d.ts +1 -1
- package/core/icon.d.ts +6 -2
- package/core/interfaces/i_component.d.ts +1 -1
- package/core/menu.d.ts +2 -1
- package/core/msg.d.ts +14 -0
- package/core/mutator.d.ts +1 -1
- package/core/rendered_connection.d.ts +1 -0
- package/core/renderers/common/constants.d.ts +8 -1
- package/core/renderers/common/drawer.d.ts +4 -3
- package/core/renderers/common/i_path_object.d.ts +22 -16
- package/core/renderers/common/info.d.ts +3 -3
- package/core/renderers/common/marker_svg.d.ts +7 -5
- package/core/renderers/common/path_object.d.ts +3 -3
- package/core/renderers/geras/constants.d.ts +4 -2
- package/core/renderers/geras/drawer.d.ts +2 -1
- package/core/renderers/geras/path_object.d.ts +0 -1
- package/core/renderers/measurables/icon.d.ts +1 -0
- package/core/renderers/measurables/row.d.ts +3 -3
- package/core/renderers/measurables/top_row.d.ts +0 -1
- package/core/renderers/minimalist/info.d.ts +1 -0
- package/core/renderers/thrasos/info.d.ts +1 -3
- package/core/renderers/zelos/constants.d.ts +20 -41
- package/core/renderers/zelos/measurables/inputs.d.ts +0 -1
- package/core/renderers/zelos/path_object.d.ts +1 -1
- package/core/theme.d.ts +27 -27
- package/core/toolbox/category.d.ts +18 -17
- package/core/toolbox/toolbox.d.ts +1 -1
- package/core/touch_gesture.d.ts +3 -2
- package/core/utils/coordinate.d.ts +1 -1
- package/core/utils/dom.d.ts +6 -7
- package/core/utils/idgenerator.d.ts +1 -1
- package/core/zoom_controls.d.ts +1 -1
- package/core-browser.js +0 -6
- package/core.js +0 -6
- package/dart.d.ts +1 -2
- package/javascript.d.ts +1 -2
- package/lua.d.ts +1 -2
- package/msg/ab.d.ts +8 -0
- package/msg/ace.d.ts +8 -0
- package/msg/af.d.ts +8 -0
- package/msg/am.d.ts +8 -0
- package/msg/ar.d.ts +8 -0
- package/msg/ast.d.ts +8 -0
- package/msg/az.d.ts +8 -0
- package/msg/ba.d.ts +8 -0
- package/msg/bcc.d.ts +8 -0
- package/msg/be-tarask.d.ts +8 -0
- package/msg/be.d.ts +8 -0
- package/msg/bg.d.ts +8 -0
- package/msg/bn.d.ts +8 -0
- package/msg/br.d.ts +8 -0
- package/msg/bs.d.ts +8 -0
- package/msg/ca.d.ts +8 -0
- package/msg/cdo.d.ts +8 -0
- package/msg/constants.d.ts +16 -0
- package/msg/cs.d.ts +8 -0
- package/msg/da.d.ts +8 -0
- package/msg/de.d.ts +8 -0
- package/msg/diq.d.ts +8 -0
- package/msg/dty.d.ts +8 -0
- package/msg/ee.d.ts +8 -0
- package/msg/el.d.ts +8 -0
- package/msg/en-gb.d.ts +8 -0
- package/msg/en.d.ts +8 -0
- package/msg/eo.d.ts +8 -0
- package/msg/es.d.ts +8 -0
- package/msg/et.d.ts +8 -0
- package/msg/eu.d.ts +8 -0
- package/msg/fa.d.ts +8 -0
- package/msg/fi.d.ts +8 -0
- package/msg/fo.d.ts +8 -0
- package/msg/fr.d.ts +8 -0
- package/msg/frr.d.ts +8 -0
- package/msg/gl.d.ts +8 -0
- package/msg/gn.d.ts +8 -0
- package/msg/gor.d.ts +8 -0
- package/msg/ha.d.ts +8 -0
- package/msg/hak.d.ts +8 -0
- package/msg/he.d.ts +8 -0
- package/msg/hi.d.ts +8 -0
- package/msg/hr.d.ts +8 -0
- package/msg/hrx.d.ts +8 -0
- package/msg/hu.d.ts +8 -0
- package/msg/hy.d.ts +8 -0
- package/msg/ia.d.ts +8 -0
- package/msg/id.d.ts +8 -0
- package/msg/ig.d.ts +8 -0
- package/msg/inh.d.ts +8 -0
- package/msg/is.d.ts +8 -0
- package/msg/it.d.ts +8 -0
- package/msg/ja.d.ts +8 -0
- package/msg/ka.d.ts +8 -0
- package/msg/kab.d.ts +8 -0
- package/msg/kbd-cyrl.d.ts +8 -0
- package/msg/km.d.ts +8 -0
- package/msg/kn.d.ts +8 -0
- package/msg/ko.d.ts +8 -0
- package/msg/ksh.d.ts +8 -0
- package/msg/ku-latn.d.ts +8 -0
- package/msg/ky.d.ts +8 -0
- package/msg/la.d.ts +8 -0
- package/msg/lb.d.ts +8 -0
- package/msg/lki.d.ts +8 -0
- package/msg/lo.d.ts +8 -0
- package/msg/lrc.d.ts +8 -0
- package/msg/lt.d.ts +8 -0
- package/msg/lv.d.ts +8 -0
- package/msg/mg.d.ts +8 -0
- package/msg/mk.d.ts +8 -0
- package/msg/ml.d.ts +8 -0
- package/msg/mnw.d.ts +8 -0
- package/msg/ms.d.ts +8 -0
- package/msg/msg.d.ts +429 -432
- package/msg/my.d.ts +8 -0
- package/msg/mzn.d.ts +8 -0
- package/msg/nb.d.ts +8 -0
- package/msg/ne.d.ts +8 -0
- package/msg/nl.d.ts +8 -0
- package/msg/oc.d.ts +8 -0
- package/msg/olo.d.ts +8 -0
- package/msg/pa.d.ts +8 -0
- package/msg/pl.d.ts +8 -0
- package/msg/pms.d.ts +8 -0
- package/msg/ps.d.ts +8 -0
- package/msg/pt-br.d.ts +8 -0
- package/msg/pt.d.ts +8 -0
- package/msg/qqq.d.ts +16 -0
- package/msg/ro.d.ts +8 -0
- package/msg/ru.d.ts +8 -0
- package/msg/sc.d.ts +8 -0
- package/msg/sco.d.ts +8 -0
- package/msg/sd.d.ts +8 -0
- package/msg/shn.d.ts +8 -0
- package/msg/si.d.ts +8 -0
- package/msg/sk.d.ts +8 -0
- package/msg/skr-arab.d.ts +8 -0
- package/msg/sl.d.ts +8 -0
- package/msg/smn.d.ts +8 -0
- package/msg/sq.d.ts +8 -0
- package/msg/sr-latn.d.ts +8 -0
- package/msg/sr.d.ts +8 -0
- package/msg/sv.d.ts +8 -0
- package/msg/sw.d.ts +8 -0
- package/msg/synonyms.d.ts +16 -0
- package/msg/ta.d.ts +8 -0
- package/msg/tcy.d.ts +8 -0
- package/msg/te.d.ts +8 -0
- package/msg/th.d.ts +8 -0
- package/msg/ti.d.ts +8 -0
- package/msg/tl.d.ts +8 -0
- package/msg/tlh.d.ts +8 -0
- package/msg/tr.d.ts +8 -0
- package/msg/ug-arab.d.ts +8 -0
- package/msg/uk.d.ts +8 -0
- package/msg/ur.d.ts +8 -0
- package/msg/uz.d.ts +8 -0
- package/msg/vi.d.ts +8 -0
- package/msg/xmf.d.ts +8 -0
- package/msg/yo.d.ts +8 -0
- package/msg/yue.d.ts +8 -0
- package/msg/zgh.d.ts +8 -0
- package/msg/zh-hans.d.ts +8 -0
- package/msg/zh-hant.d.ts +8 -0
- package/package.json +3 -3
- package/php.d.ts +1 -2
- package/python.d.ts +1 -2
package/core/block.d.ts
CHANGED
|
@@ -121,6 +121,10 @@ export declare class Block implements IASTNodeLocation, IDeletable {
|
|
|
121
121
|
private isShadow_;
|
|
122
122
|
protected collapsed_: boolean;
|
|
123
123
|
protected outputShape_: number | null;
|
|
124
|
+
/**
|
|
125
|
+
* Is the current block currently in the process of being disposed?
|
|
126
|
+
*/
|
|
127
|
+
private disposing;
|
|
124
128
|
/**
|
|
125
129
|
* A string representing the comment attached to this block.
|
|
126
130
|
*
|
|
@@ -173,6 +177,13 @@ export declare class Block implements IASTNodeLocation, IDeletable {
|
|
|
173
177
|
* @suppress {checkTypes}
|
|
174
178
|
*/
|
|
175
179
|
dispose(healStack: boolean): void;
|
|
180
|
+
/**
|
|
181
|
+
* Returns true if the block is either in the process of being disposed, or
|
|
182
|
+
* is disposed.
|
|
183
|
+
*
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
isDeadOrDying(): boolean;
|
|
176
187
|
/**
|
|
177
188
|
* Call initModel on all fields on the block.
|
|
178
189
|
* May be called more than once.
|
package/core/block_svg.d.ts
CHANGED
|
@@ -108,13 +108,13 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
108
108
|
*
|
|
109
109
|
* @returns #RRGGBB string.
|
|
110
110
|
*/
|
|
111
|
-
getColourSecondary(): string |
|
|
111
|
+
getColourSecondary(): string | undefined;
|
|
112
112
|
/**
|
|
113
113
|
* Get the tertiary colour of a block.
|
|
114
114
|
*
|
|
115
115
|
* @returns #RRGGBB string.
|
|
116
116
|
*/
|
|
117
|
-
getColourTertiary(): string |
|
|
117
|
+
getColourTertiary(): string | undefined;
|
|
118
118
|
/**
|
|
119
119
|
* Selects this block. Highlights the block visually and fires a select event
|
|
120
120
|
* if the block is not already selected.
|
|
@@ -651,6 +651,6 @@ export declare class BlockSvg extends Block implements IASTNodeLocationSvg, IBou
|
|
|
651
651
|
* @param add True if highlighting should be added.
|
|
652
652
|
* @internal
|
|
653
653
|
*/
|
|
654
|
-
highlightShapeForInput(conn:
|
|
654
|
+
highlightShapeForInput(conn: RenderedConnection, add: boolean): void;
|
|
655
655
|
}
|
|
656
656
|
//# sourceMappingURL=block_svg.d.ts.map
|
package/core/blockly.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ import { MarkerManager } from './marker_manager.js';
|
|
|
102
102
|
import { Menu } from './menu.js';
|
|
103
103
|
import { MenuItem } from './menuitem.js';
|
|
104
104
|
import { MetricsManager } from './metrics_manager.js';
|
|
105
|
-
import { Msg } from './msg.js';
|
|
105
|
+
import { Msg, setLocale } from './msg.js';
|
|
106
106
|
import { Mutator } from './mutator.js';
|
|
107
107
|
import { Names } from './names.js';
|
|
108
108
|
import { Options } from './options.js';
|
|
@@ -538,7 +538,7 @@ export { Menu };
|
|
|
538
538
|
export { MenuItem };
|
|
539
539
|
export { MetricsManager };
|
|
540
540
|
export { Mutator };
|
|
541
|
-
export { Msg };
|
|
541
|
+
export { Msg, setLocale };
|
|
542
542
|
export { Names };
|
|
543
543
|
export { Options };
|
|
544
544
|
export { RenderedConnection };
|
package/core/events/events.d.ts
CHANGED
|
@@ -3,61 +3,87 @@
|
|
|
3
3
|
* Copyright 2016 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
7
|
-
import { BlockBase } from './events_block_base.js';
|
|
8
|
-
import { BlockChange } from './events_block_change.js';
|
|
9
|
-
import { BlockCreate } from './events_block_create.js';
|
|
10
|
-
import { BlockDelete } from './events_block_delete.js';
|
|
11
|
-
import { BlockDrag } from './events_block_drag.js';
|
|
12
|
-
import { BlockMove } from './events_block_move.js';
|
|
13
|
-
import { BubbleOpen } from './events_bubble_open.js';
|
|
14
|
-
import { Click } from './events_click.js';
|
|
15
|
-
import { CommentBase } from './events_comment_base.js';
|
|
16
|
-
import { CommentChange } from './events_comment_change.js';
|
|
17
|
-
import { CommentCreate } from './events_comment_create.js';
|
|
6
|
+
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
7
|
+
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
8
|
+
import { BlockChange, BlockChangeJson } from './events_block_change.js';
|
|
9
|
+
import { BlockCreate, BlockCreateJson } from './events_block_create.js';
|
|
10
|
+
import { BlockDelete, BlockDeleteJson } from './events_block_delete.js';
|
|
11
|
+
import { BlockDrag, BlockDragJson } from './events_block_drag.js';
|
|
12
|
+
import { BlockMove, BlockMoveJson } from './events_block_move.js';
|
|
13
|
+
import { BubbleOpen, BubbleOpenJson, BubbleType } from './events_bubble_open.js';
|
|
14
|
+
import { Click, ClickJson, ClickTarget } from './events_click.js';
|
|
15
|
+
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
16
|
+
import { CommentChange, CommentChangeJson } from './events_comment_change.js';
|
|
17
|
+
import { CommentCreate, CommentCreateJson } from './events_comment_create.js';
|
|
18
18
|
import { CommentDelete } from './events_comment_delete.js';
|
|
19
|
-
import { CommentMove } from './events_comment_move.js';
|
|
20
|
-
import { MarkerMove } from './events_marker_move.js';
|
|
21
|
-
import { Selected } from './events_selected.js';
|
|
22
|
-
import { ThemeChange } from './events_theme_change.js';
|
|
23
|
-
import { ToolboxItemSelect } from './events_toolbox_item_select.js';
|
|
24
|
-
import { TrashcanOpen } from './events_trashcan_open.js';
|
|
19
|
+
import { CommentMove, CommentMoveJson } from './events_comment_move.js';
|
|
20
|
+
import { MarkerMove, MarkerMoveJson } from './events_marker_move.js';
|
|
21
|
+
import { Selected, SelectedJson } from './events_selected.js';
|
|
22
|
+
import { ThemeChange, ThemeChangeJson } from './events_theme_change.js';
|
|
23
|
+
import { ToolboxItemSelect, ToolboxItemSelectJson } from './events_toolbox_item_select.js';
|
|
24
|
+
import { TrashcanOpen, TrashcanOpenJson } from './events_trashcan_open.js';
|
|
25
25
|
import { Ui } from './events_ui.js';
|
|
26
26
|
import { UiBase } from './events_ui_base.js';
|
|
27
|
-
import { VarBase } from './events_var_base.js';
|
|
28
|
-
import { VarCreate } from './events_var_create.js';
|
|
29
|
-
import { VarDelete } from './events_var_delete.js';
|
|
30
|
-
import { VarRename } from './events_var_rename.js';
|
|
31
|
-
import { ViewportChange } from './events_viewport.js';
|
|
27
|
+
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
28
|
+
import { VarCreate, VarCreateJson } from './events_var_create.js';
|
|
29
|
+
import { VarDelete, VarDeleteJson } from './events_var_delete.js';
|
|
30
|
+
import { VarRename, VarRenameJson } from './events_var_rename.js';
|
|
31
|
+
import { ViewportChange, ViewportChangeJson } from './events_viewport.js';
|
|
32
32
|
import * as eventUtils from './utils.js';
|
|
33
|
-
import { FinishedLoading } from './workspace_events.js';
|
|
33
|
+
import { FinishedLoading, FinishedLoadingJson } from './workspace_events.js';
|
|
34
34
|
export declare const Abstract: typeof AbstractEvent;
|
|
35
|
+
export { AbstractEventJson };
|
|
35
36
|
export { BubbleOpen };
|
|
37
|
+
export { BubbleOpenJson };
|
|
38
|
+
export { BubbleType };
|
|
36
39
|
export { BlockBase };
|
|
40
|
+
export { BlockBaseJson };
|
|
37
41
|
export { BlockChange };
|
|
42
|
+
export { BlockChangeJson };
|
|
38
43
|
export { BlockCreate };
|
|
44
|
+
export { BlockCreateJson };
|
|
39
45
|
export { BlockDelete };
|
|
46
|
+
export { BlockDeleteJson };
|
|
40
47
|
export { BlockDrag };
|
|
48
|
+
export { BlockDragJson };
|
|
41
49
|
export { BlockMove };
|
|
50
|
+
export { BlockMoveJson };
|
|
42
51
|
export { Click };
|
|
52
|
+
export { ClickJson };
|
|
53
|
+
export { ClickTarget };
|
|
43
54
|
export { CommentBase };
|
|
55
|
+
export { CommentBaseJson };
|
|
44
56
|
export { CommentChange };
|
|
57
|
+
export { CommentChangeJson };
|
|
45
58
|
export { CommentCreate };
|
|
59
|
+
export { CommentCreateJson };
|
|
46
60
|
export { CommentDelete };
|
|
47
61
|
export { CommentMove };
|
|
62
|
+
export { CommentMoveJson };
|
|
48
63
|
export { FinishedLoading };
|
|
64
|
+
export { FinishedLoadingJson };
|
|
49
65
|
export { MarkerMove };
|
|
66
|
+
export { MarkerMoveJson };
|
|
50
67
|
export { Selected };
|
|
68
|
+
export { SelectedJson };
|
|
51
69
|
export { ThemeChange };
|
|
70
|
+
export { ThemeChangeJson };
|
|
52
71
|
export { ToolboxItemSelect };
|
|
72
|
+
export { ToolboxItemSelectJson };
|
|
53
73
|
export { TrashcanOpen };
|
|
74
|
+
export { TrashcanOpenJson };
|
|
54
75
|
export { Ui };
|
|
55
76
|
export { UiBase };
|
|
56
77
|
export { VarBase };
|
|
78
|
+
export { VarBaseJson };
|
|
57
79
|
export { VarCreate };
|
|
80
|
+
export { VarCreateJson };
|
|
58
81
|
export { VarDelete };
|
|
82
|
+
export { VarDeleteJson };
|
|
59
83
|
export { VarRename };
|
|
84
|
+
export { VarRenameJson };
|
|
60
85
|
export { ViewportChange };
|
|
86
|
+
export { ViewportChangeJson };
|
|
61
87
|
export declare const BLOCK_CHANGE = "change";
|
|
62
88
|
export declare const BLOCK_CREATE = "create";
|
|
63
89
|
export declare const BLOCK_DELETE = "delete";
|
|
@@ -11,7 +11,7 @@ import type { Workspace } from '../workspace.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class Abstract {
|
|
13
13
|
/** Whether or not the event is blank (to be populated by fromJson). */
|
|
14
|
-
isBlank: boolean
|
|
14
|
+
abstract isBlank: boolean;
|
|
15
15
|
/** The workspace identifier for this event. */
|
|
16
16
|
workspaceId?: string;
|
|
17
17
|
group: string;
|
|
@@ -19,7 +19,7 @@ export declare abstract class Abstract {
|
|
|
19
19
|
/** Whether or not the event is a UI event. */
|
|
20
20
|
isUiEvent: boolean;
|
|
21
21
|
/** Type of this event. */
|
|
22
|
-
type
|
|
22
|
+
type: string;
|
|
23
23
|
/** @alias Blockly.Events.Abstract */
|
|
24
24
|
constructor();
|
|
25
25
|
/**
|
|
@@ -27,13 +27,13 @@ export declare abstract class Abstract {
|
|
|
27
27
|
*
|
|
28
28
|
* @returns JSON representation.
|
|
29
29
|
*/
|
|
30
|
-
toJson():
|
|
30
|
+
toJson(): AbstractEventJson;
|
|
31
31
|
/**
|
|
32
32
|
* Decode the JSON event.
|
|
33
33
|
*
|
|
34
34
|
* @param json JSON representation.
|
|
35
35
|
*/
|
|
36
|
-
fromJson(json:
|
|
36
|
+
fromJson(json: AbstractEventJson): void;
|
|
37
37
|
/**
|
|
38
38
|
* Does this event record any change of state?
|
|
39
39
|
*
|
|
@@ -55,4 +55,8 @@ export declare abstract class Abstract {
|
|
|
55
55
|
*/
|
|
56
56
|
getEventWorkspace_(): Workspace;
|
|
57
57
|
}
|
|
58
|
+
export interface AbstractEventJson {
|
|
59
|
+
type: string;
|
|
60
|
+
group: string;
|
|
61
|
+
}
|
|
58
62
|
//# sourceMappingURL=events_abstract.d.ts.map
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
|
-
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
7
|
+
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
8
8
|
/**
|
|
9
9
|
* Abstract class for a block event.
|
|
10
10
|
*
|
|
11
11
|
* @alias Blockly.Events.BlockBase
|
|
12
12
|
*/
|
|
13
13
|
export declare class BlockBase extends AbstractEvent {
|
|
14
|
-
isBlank:
|
|
15
|
-
blockId
|
|
16
|
-
workspaceId: string;
|
|
14
|
+
isBlank: boolean;
|
|
15
|
+
blockId?: string;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_block The block this event corresponds to.
|
|
19
18
|
* Undefined for a blank event.
|
|
@@ -24,12 +23,15 @@ export declare class BlockBase extends AbstractEvent {
|
|
|
24
23
|
*
|
|
25
24
|
* @returns JSON representation.
|
|
26
25
|
*/
|
|
27
|
-
toJson():
|
|
26
|
+
toJson(): AbstractEventJson;
|
|
28
27
|
/**
|
|
29
28
|
* Decode the JSON event.
|
|
30
29
|
*
|
|
31
30
|
* @param json JSON representation.
|
|
32
31
|
*/
|
|
33
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: BlockBaseJson): void;
|
|
33
|
+
}
|
|
34
|
+
export interface BlockBaseJson extends AbstractEventJson {
|
|
35
|
+
blockId: string;
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=events_block_base.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
7
|
import type { BlockSvg } from '../block_svg.js';
|
|
8
|
-
import { BlockBase } from './events_block_base.js';
|
|
8
|
+
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a block change event.
|
|
11
11
|
*
|
|
@@ -13,10 +13,10 @@ import { BlockBase } from './events_block_base.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class BlockChange extends BlockBase {
|
|
15
15
|
type: string;
|
|
16
|
-
element
|
|
17
|
-
name
|
|
18
|
-
oldValue:
|
|
19
|
-
newValue:
|
|
16
|
+
element?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
oldValue: unknown;
|
|
19
|
+
newValue: unknown;
|
|
20
20
|
/**
|
|
21
21
|
* @param opt_block The changed block. Undefined for a blank event.
|
|
22
22
|
* @param opt_element One of 'field', 'comment', 'disabled', etc.
|
|
@@ -24,19 +24,19 @@ export declare class BlockChange extends BlockBase {
|
|
|
24
24
|
* @param opt_oldValue Previous value of element.
|
|
25
25
|
* @param opt_newValue New value of element.
|
|
26
26
|
*/
|
|
27
|
-
constructor(opt_block?: Block, opt_element?: string, opt_name?: string | null, opt_oldValue?:
|
|
27
|
+
constructor(opt_block?: Block, opt_element?: string, opt_name?: string | null, opt_oldValue?: unknown, opt_newValue?: unknown);
|
|
28
28
|
/**
|
|
29
29
|
* Encode the event as JSON.
|
|
30
30
|
*
|
|
31
31
|
* @returns JSON representation.
|
|
32
32
|
*/
|
|
33
|
-
toJson():
|
|
33
|
+
toJson(): BlockChangeJson;
|
|
34
34
|
/**
|
|
35
35
|
* Decode the JSON event.
|
|
36
36
|
*
|
|
37
37
|
* @param json JSON representation.
|
|
38
38
|
*/
|
|
39
|
-
fromJson(json:
|
|
39
|
+
fromJson(json: BlockChangeJson): void;
|
|
40
40
|
/**
|
|
41
41
|
* Does this event record any change of state?
|
|
42
42
|
*
|
|
@@ -59,4 +59,10 @@ export declare class BlockChange extends BlockBase {
|
|
|
59
59
|
*/
|
|
60
60
|
static getExtraBlockState_(block: BlockSvg): string;
|
|
61
61
|
}
|
|
62
|
+
export interface BlockChangeJson extends BlockBaseJson {
|
|
63
|
+
element: string;
|
|
64
|
+
name?: string;
|
|
65
|
+
newValue: unknown;
|
|
66
|
+
oldValue: unknown;
|
|
67
|
+
}
|
|
62
68
|
//# sourceMappingURL=events_block_change.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
7
|
import * as blocks from '../serialization/blocks.js';
|
|
8
|
-
import { BlockBase } from './events_block_base.js';
|
|
8
|
+
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a block creation event.
|
|
11
11
|
*
|
|
@@ -13,9 +13,9 @@ import { BlockBase } from './events_block_base.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class BlockCreate extends BlockBase {
|
|
15
15
|
type: string;
|
|
16
|
-
xml
|
|
17
|
-
ids
|
|
18
|
-
json
|
|
16
|
+
xml?: Element | DocumentFragment;
|
|
17
|
+
ids?: string[];
|
|
18
|
+
json?: blocks.State;
|
|
19
19
|
/** @param opt_block The created block. Undefined for a blank event. */
|
|
20
20
|
constructor(opt_block?: Block);
|
|
21
21
|
/**
|
|
@@ -23,13 +23,13 @@ export declare class BlockCreate extends BlockBase {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns JSON representation.
|
|
25
25
|
*/
|
|
26
|
-
toJson():
|
|
26
|
+
toJson(): BlockCreateJson;
|
|
27
27
|
/**
|
|
28
28
|
* Decode the JSON event.
|
|
29
29
|
*
|
|
30
30
|
* @param json JSON representation.
|
|
31
31
|
*/
|
|
32
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: BlockCreateJson): void;
|
|
33
33
|
/**
|
|
34
34
|
* Run a creation event.
|
|
35
35
|
*
|
|
@@ -37,4 +37,10 @@ export declare class BlockCreate extends BlockBase {
|
|
|
37
37
|
*/
|
|
38
38
|
run(forward: boolean): void;
|
|
39
39
|
}
|
|
40
|
+
export interface BlockCreateJson extends BlockBaseJson {
|
|
41
|
+
xml: string;
|
|
42
|
+
ids: string[];
|
|
43
|
+
json: object;
|
|
44
|
+
recordUndo?: boolean;
|
|
45
|
+
}
|
|
40
46
|
//# sourceMappingURL=events_block_create.d.ts.map
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
7
|
import * as blocks from '../serialization/blocks.js';
|
|
8
|
-
import { BlockBase } from './events_block_base.js';
|
|
8
|
+
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a block deletion event.
|
|
11
11
|
*
|
|
12
12
|
* @alias Blockly.Events.BlockDelete
|
|
13
13
|
*/
|
|
14
14
|
export declare class BlockDelete extends BlockBase {
|
|
15
|
+
oldXml?: Element | DocumentFragment;
|
|
16
|
+
ids?: string[];
|
|
17
|
+
wasShadow?: boolean;
|
|
18
|
+
oldJson?: blocks.State;
|
|
15
19
|
type: string;
|
|
16
|
-
oldXml: any;
|
|
17
|
-
ids: string[];
|
|
18
|
-
wasShadow: boolean;
|
|
19
|
-
oldJson: blocks.State;
|
|
20
20
|
/** @param opt_block The deleted block. Undefined for a blank event. */
|
|
21
21
|
constructor(opt_block?: Block);
|
|
22
22
|
/**
|
|
@@ -24,13 +24,13 @@ export declare class BlockDelete extends BlockBase {
|
|
|
24
24
|
*
|
|
25
25
|
* @returns JSON representation.
|
|
26
26
|
*/
|
|
27
|
-
toJson():
|
|
27
|
+
toJson(): BlockDeleteJson;
|
|
28
28
|
/**
|
|
29
29
|
* Decode the JSON event.
|
|
30
30
|
*
|
|
31
31
|
* @param json JSON representation.
|
|
32
32
|
*/
|
|
33
|
-
fromJson(json:
|
|
33
|
+
fromJson(json: BlockDeleteJson): void;
|
|
34
34
|
/**
|
|
35
35
|
* Run a deletion event.
|
|
36
36
|
*
|
|
@@ -38,4 +38,11 @@ export declare class BlockDelete extends BlockBase {
|
|
|
38
38
|
*/
|
|
39
39
|
run(forward: boolean): void;
|
|
40
40
|
}
|
|
41
|
+
export interface BlockDeleteJson extends BlockBaseJson {
|
|
42
|
+
oldXml: string;
|
|
43
|
+
ids: string[];
|
|
44
|
+
wasShadow: boolean;
|
|
45
|
+
oldJson: blocks.State;
|
|
46
|
+
recordUndo?: boolean;
|
|
47
|
+
}
|
|
41
48
|
//# sourceMappingURL=events_block_delete.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
|
+
import { AbstractEventJson } from './events_abstract.js';
|
|
7
8
|
import { UiBase } from './events_ui_base.js';
|
|
8
9
|
/**
|
|
9
10
|
* Class for a block drag event.
|
|
@@ -11,7 +12,7 @@ import { UiBase } from './events_ui_base.js';
|
|
|
11
12
|
* @alias Blockly.Events.BlockDrag
|
|
12
13
|
*/
|
|
13
14
|
export declare class BlockDrag extends UiBase {
|
|
14
|
-
blockId
|
|
15
|
+
blockId?: string;
|
|
15
16
|
isStart?: boolean;
|
|
16
17
|
blocks?: Block[];
|
|
17
18
|
type: string;
|
|
@@ -29,12 +30,17 @@ export declare class BlockDrag extends UiBase {
|
|
|
29
30
|
*
|
|
30
31
|
* @returns JSON representation.
|
|
31
32
|
*/
|
|
32
|
-
toJson():
|
|
33
|
+
toJson(): BlockDragJson;
|
|
33
34
|
/**
|
|
34
35
|
* Decode the JSON event.
|
|
35
36
|
*
|
|
36
37
|
* @param json JSON representation.
|
|
37
38
|
*/
|
|
38
|
-
fromJson(json:
|
|
39
|
+
fromJson(json: BlockDragJson): void;
|
|
40
|
+
}
|
|
41
|
+
export interface BlockDragJson extends AbstractEventJson {
|
|
42
|
+
isStart: boolean;
|
|
43
|
+
blockId: string;
|
|
44
|
+
blocks?: Block[];
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=events_block_drag.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
7
|
import { Coordinate } from '../utils/coordinate.js';
|
|
8
|
-
import { BlockBase } from './events_block_base.js';
|
|
8
|
+
import { BlockBase, BlockBaseJson } from './events_block_base.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a block move event. Created before the move.
|
|
11
11
|
*
|
|
@@ -13,12 +13,12 @@ import { BlockBase } from './events_block_base.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class BlockMove extends BlockBase {
|
|
15
15
|
type: string;
|
|
16
|
-
oldParentId
|
|
17
|
-
oldInputName
|
|
18
|
-
oldCoordinate
|
|
19
|
-
newParentId
|
|
20
|
-
newInputName
|
|
21
|
-
newCoordinate
|
|
16
|
+
oldParentId?: string;
|
|
17
|
+
oldInputName?: string;
|
|
18
|
+
oldCoordinate?: Coordinate;
|
|
19
|
+
newParentId?: string;
|
|
20
|
+
newInputName?: string;
|
|
21
|
+
newCoordinate?: Coordinate;
|
|
22
22
|
/** @param opt_block The moved block. Undefined for a blank event. */
|
|
23
23
|
constructor(opt_block?: Block);
|
|
24
24
|
/**
|
|
@@ -26,13 +26,13 @@ export declare class BlockMove extends BlockBase {
|
|
|
26
26
|
*
|
|
27
27
|
* @returns JSON representation.
|
|
28
28
|
*/
|
|
29
|
-
toJson():
|
|
29
|
+
toJson(): BlockMoveJson;
|
|
30
30
|
/**
|
|
31
31
|
* Decode the JSON event.
|
|
32
32
|
*
|
|
33
33
|
* @param json JSON representation.
|
|
34
34
|
*/
|
|
35
|
-
fromJson(json:
|
|
35
|
+
fromJson(json: BlockMoveJson): void;
|
|
36
36
|
/** Record the block's new location. Called after the move. */
|
|
37
37
|
recordNew(): void;
|
|
38
38
|
/**
|
|
@@ -55,4 +55,10 @@ export declare class BlockMove extends BlockBase {
|
|
|
55
55
|
*/
|
|
56
56
|
run(forward: boolean): void;
|
|
57
57
|
}
|
|
58
|
+
export interface BlockMoveJson extends BlockBaseJson {
|
|
59
|
+
newParentId?: string;
|
|
60
|
+
newInputName?: string;
|
|
61
|
+
newCoordinate?: string;
|
|
62
|
+
recordUndo?: boolean;
|
|
63
|
+
}
|
|
58
64
|
//# sourceMappingURL=events_block_move.d.ts.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import type { BlockSvg } from '../block_svg.js';
|
|
7
8
|
import { UiBase } from './events_ui_base.js';
|
|
8
9
|
/**
|
|
@@ -11,9 +12,9 @@ import { UiBase } from './events_ui_base.js';
|
|
|
11
12
|
* @alias Blockly.Events.BubbleOpen
|
|
12
13
|
*/
|
|
13
14
|
export declare class BubbleOpen extends UiBase {
|
|
14
|
-
blockId
|
|
15
|
+
blockId?: string;
|
|
15
16
|
isOpen?: boolean;
|
|
16
|
-
bubbleType?:
|
|
17
|
+
bubbleType?: BubbleType;
|
|
17
18
|
type: string;
|
|
18
19
|
/**
|
|
19
20
|
* @param opt_block The associated block. Undefined for a blank event.
|
|
@@ -22,18 +23,28 @@ export declare class BubbleOpen extends UiBase {
|
|
|
22
23
|
* @param opt_bubbleType The type of bubble. One of 'mutator', 'comment' or
|
|
23
24
|
* 'warning'. Undefined for a blank event.
|
|
24
25
|
*/
|
|
25
|
-
constructor(opt_block?: BlockSvg, opt_isOpen?: boolean, opt_bubbleType?:
|
|
26
|
+
constructor(opt_block?: BlockSvg, opt_isOpen?: boolean, opt_bubbleType?: BubbleType);
|
|
26
27
|
/**
|
|
27
28
|
* Encode the event as JSON.
|
|
28
29
|
*
|
|
29
30
|
* @returns JSON representation.
|
|
30
31
|
*/
|
|
31
|
-
toJson():
|
|
32
|
+
toJson(): BubbleOpenJson;
|
|
32
33
|
/**
|
|
33
34
|
* Decode the JSON event.
|
|
34
35
|
*
|
|
35
36
|
* @param json JSON representation.
|
|
36
37
|
*/
|
|
37
|
-
fromJson(json:
|
|
38
|
+
fromJson(json: BubbleOpenJson): void;
|
|
39
|
+
}
|
|
40
|
+
export declare enum BubbleType {
|
|
41
|
+
MUTATOR = "mutator",
|
|
42
|
+
COMMENT = "comment",
|
|
43
|
+
WARNING = "warning"
|
|
44
|
+
}
|
|
45
|
+
export interface BubbleOpenJson extends AbstractEventJson {
|
|
46
|
+
isOpen: boolean;
|
|
47
|
+
bubbleType: BubbleType;
|
|
48
|
+
blockId: string;
|
|
38
49
|
}
|
|
39
50
|
//# sourceMappingURL=events_bubble_open.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
|
+
import { AbstractEventJson } from './events_abstract.js';
|
|
7
8
|
import { UiBase } from './events_ui_base.js';
|
|
8
9
|
/**
|
|
9
10
|
* Class for a click event.
|
|
@@ -11,8 +12,8 @@ import { UiBase } from './events_ui_base.js';
|
|
|
11
12
|
* @alias Blockly.Events.Click
|
|
12
13
|
*/
|
|
13
14
|
export declare class Click extends UiBase {
|
|
14
|
-
blockId
|
|
15
|
-
targetType?:
|
|
15
|
+
blockId?: string;
|
|
16
|
+
targetType?: ClickTarget;
|
|
16
17
|
type: string;
|
|
17
18
|
/**
|
|
18
19
|
* @param opt_block The affected block. Null for click events that do not have
|
|
@@ -23,18 +24,27 @@ export declare class Click extends UiBase {
|
|
|
23
24
|
* @param opt_targetType The type of element targeted by this click event.
|
|
24
25
|
* Undefined for a blank event.
|
|
25
26
|
*/
|
|
26
|
-
constructor(opt_block?: Block | null, opt_workspaceId?: string | null, opt_targetType?:
|
|
27
|
+
constructor(opt_block?: Block | null, opt_workspaceId?: string | null, opt_targetType?: ClickTarget);
|
|
27
28
|
/**
|
|
28
29
|
* Encode the event as JSON.
|
|
29
30
|
*
|
|
30
31
|
* @returns JSON representation.
|
|
31
32
|
*/
|
|
32
|
-
toJson():
|
|
33
|
+
toJson(): ClickJson;
|
|
33
34
|
/**
|
|
34
35
|
* Decode the JSON event.
|
|
35
36
|
*
|
|
36
37
|
* @param json JSON representation.
|
|
37
38
|
*/
|
|
38
|
-
fromJson(json:
|
|
39
|
+
fromJson(json: ClickJson): void;
|
|
40
|
+
}
|
|
41
|
+
export declare enum ClickTarget {
|
|
42
|
+
BLOCK = "block",
|
|
43
|
+
WORKSPACE = "workspace",
|
|
44
|
+
ZOOM_CONTROLS = "zoom_controls"
|
|
45
|
+
}
|
|
46
|
+
export interface ClickJson extends AbstractEventJson {
|
|
47
|
+
targetType: ClickTarget;
|
|
48
|
+
blockId?: string;
|
|
39
49
|
}
|
|
40
50
|
//# sourceMappingURL=events_click.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { WorkspaceComment } from '../workspace_comment.js';
|
|
7
|
-
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
7
|
+
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
8
8
|
import type { CommentCreate } from './events_comment_create.js';
|
|
9
9
|
import type { CommentDelete } from './events_comment_delete.js';
|
|
10
10
|
/**
|
|
@@ -14,8 +14,7 @@ import type { CommentDelete } from './events_comment_delete.js';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class CommentBase extends AbstractEvent {
|
|
16
16
|
isBlank: boolean;
|
|
17
|
-
commentId
|
|
18
|
-
workspaceId: string;
|
|
17
|
+
commentId?: string;
|
|
19
18
|
/**
|
|
20
19
|
* @param opt_comment The comment this event corresponds to. Undefined for a
|
|
21
20
|
* blank event.
|
|
@@ -26,13 +25,13 @@ export declare class CommentBase extends AbstractEvent {
|
|
|
26
25
|
*
|
|
27
26
|
* @returns JSON representation.
|
|
28
27
|
*/
|
|
29
|
-
toJson():
|
|
28
|
+
toJson(): CommentBaseJson;
|
|
30
29
|
/**
|
|
31
30
|
* Decode the JSON event.
|
|
32
31
|
*
|
|
33
32
|
* @param json JSON representation.
|
|
34
33
|
*/
|
|
35
|
-
fromJson(json:
|
|
34
|
+
fromJson(json: CommentBaseJson): void;
|
|
36
35
|
/**
|
|
37
36
|
* Helper function for Comment[Create|Delete]
|
|
38
37
|
*
|
|
@@ -41,4 +40,7 @@ export declare class CommentBase extends AbstractEvent {
|
|
|
41
40
|
*/
|
|
42
41
|
static CommentCreateDeleteHelper(event: CommentCreate | CommentDelete, create: boolean): void;
|
|
43
42
|
}
|
|
43
|
+
export interface CommentBaseJson extends AbstractEventJson {
|
|
44
|
+
commentId: string;
|
|
45
|
+
}
|
|
44
46
|
//# sourceMappingURL=events_comment_base.d.ts.map
|