blockly 9.0.0-beta.1 → 9.0.0-beta.3
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 +569 -542
- package/blockly_compressed.js +563 -536
- 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 +11 -8
- 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
|
@@ -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 { CommentBase } from './events_comment_base.js';
|
|
7
|
+
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a comment change event.
|
|
10
10
|
*
|
|
@@ -12,8 +12,8 @@ import { CommentBase } from './events_comment_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class CommentChange extends CommentBase {
|
|
14
14
|
type: string;
|
|
15
|
-
oldContents_
|
|
16
|
-
newContents_
|
|
15
|
+
oldContents_?: string;
|
|
16
|
+
newContents_?: string;
|
|
17
17
|
/**
|
|
18
18
|
* @param opt_comment The comment that is being changed. Undefined for a
|
|
19
19
|
* blank event.
|
|
@@ -26,13 +26,13 @@ export declare class CommentChange extends CommentBase {
|
|
|
26
26
|
*
|
|
27
27
|
* @returns JSON representation.
|
|
28
28
|
*/
|
|
29
|
-
toJson():
|
|
29
|
+
toJson(): CommentChangeJson;
|
|
30
30
|
/**
|
|
31
31
|
* Decode the JSON event.
|
|
32
32
|
*
|
|
33
33
|
* @param json JSON representation.
|
|
34
34
|
*/
|
|
35
|
-
fromJson(json:
|
|
35
|
+
fromJson(json: CommentChangeJson): void;
|
|
36
36
|
/**
|
|
37
37
|
* Does this event record any change of state?
|
|
38
38
|
*
|
|
@@ -46,4 +46,8 @@ export declare class CommentChange extends CommentBase {
|
|
|
46
46
|
*/
|
|
47
47
|
run(forward: boolean): void;
|
|
48
48
|
}
|
|
49
|
+
export interface CommentChangeJson extends CommentBaseJson {
|
|
50
|
+
oldContents: string;
|
|
51
|
+
newContents: string;
|
|
52
|
+
}
|
|
49
53
|
//# sourceMappingURL=events_comment_change.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 { CommentBase } from './events_comment_base.js';
|
|
7
|
+
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a comment creation event.
|
|
10
10
|
*
|
|
@@ -12,7 +12,7 @@ import { CommentBase } from './events_comment_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class CommentCreate extends CommentBase {
|
|
14
14
|
type: string;
|
|
15
|
-
xml
|
|
15
|
+
xml?: Element | DocumentFragment;
|
|
16
16
|
/**
|
|
17
17
|
* @param opt_comment The created comment.
|
|
18
18
|
* Undefined for a blank event.
|
|
@@ -23,13 +23,13 @@ export declare class CommentCreate extends CommentBase {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns JSON representation.
|
|
25
25
|
*/
|
|
26
|
-
toJson():
|
|
26
|
+
toJson(): CommentCreateJson;
|
|
27
27
|
/**
|
|
28
28
|
* Decode the JSON event.
|
|
29
29
|
*
|
|
30
30
|
* @param json JSON representation.
|
|
31
31
|
*/
|
|
32
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: CommentCreateJson): void;
|
|
33
33
|
/**
|
|
34
34
|
* Run a creation event.
|
|
35
35
|
*
|
|
@@ -37,4 +37,7 @@ export declare class CommentCreate extends CommentBase {
|
|
|
37
37
|
*/
|
|
38
38
|
run(forward: boolean): void;
|
|
39
39
|
}
|
|
40
|
+
export interface CommentCreateJson extends CommentBaseJson {
|
|
41
|
+
xml: string;
|
|
42
|
+
}
|
|
40
43
|
//# sourceMappingURL=events_comment_create.d.ts.map
|
|
@@ -12,24 +12,12 @@ import { CommentBase } from './events_comment_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class CommentDelete extends CommentBase {
|
|
14
14
|
type: string;
|
|
15
|
-
xml
|
|
15
|
+
xml?: Element;
|
|
16
16
|
/**
|
|
17
17
|
* @param opt_comment The deleted comment.
|
|
18
18
|
* Undefined for a blank event.
|
|
19
19
|
*/
|
|
20
20
|
constructor(opt_comment?: WorkspaceComment);
|
|
21
|
-
/**
|
|
22
|
-
* Encode the event as JSON.
|
|
23
|
-
*
|
|
24
|
-
* @returns JSON representation.
|
|
25
|
-
*/
|
|
26
|
-
toJson(): any;
|
|
27
|
-
/**
|
|
28
|
-
* Decode the JSON event.
|
|
29
|
-
*
|
|
30
|
-
* @param json JSON representation.
|
|
31
|
-
*/
|
|
32
|
-
fromJson(json: any): void;
|
|
33
21
|
/**
|
|
34
22
|
* Run a creation event.
|
|
35
23
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Coordinate } from '../utils/coordinate.js';
|
|
7
7
|
import type { WorkspaceComment } from '../workspace_comment.js';
|
|
8
|
-
import { CommentBase } from './events_comment_base.js';
|
|
8
|
+
import { CommentBase, CommentBaseJson } from './events_comment_base.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for a comment move event. Created before the move.
|
|
11
11
|
*
|
|
@@ -13,10 +13,10 @@ import { CommentBase } from './events_comment_base.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class CommentMove extends CommentBase {
|
|
15
15
|
type: string;
|
|
16
|
-
comment_
|
|
17
|
-
oldCoordinate_
|
|
16
|
+
comment_?: WorkspaceComment;
|
|
17
|
+
oldCoordinate_?: Coordinate;
|
|
18
18
|
/** The location after the move, in workspace coordinates. */
|
|
19
|
-
newCoordinate_
|
|
19
|
+
newCoordinate_?: Coordinate;
|
|
20
20
|
/**
|
|
21
21
|
* @param opt_comment The comment that is being moved. Undefined for a blank
|
|
22
22
|
* event.
|
|
@@ -39,13 +39,13 @@ export declare class CommentMove extends CommentBase {
|
|
|
39
39
|
*
|
|
40
40
|
* @returns JSON representation.
|
|
41
41
|
*/
|
|
42
|
-
toJson():
|
|
42
|
+
toJson(): CommentMoveJson;
|
|
43
43
|
/**
|
|
44
44
|
* Decode the JSON event.
|
|
45
45
|
*
|
|
46
46
|
* @param json JSON representation.
|
|
47
47
|
*/
|
|
48
|
-
fromJson(json:
|
|
48
|
+
fromJson(json: CommentMoveJson): void;
|
|
49
49
|
/**
|
|
50
50
|
* Does this event record any change of state?
|
|
51
51
|
*
|
|
@@ -59,4 +59,8 @@ export declare class CommentMove extends CommentBase {
|
|
|
59
59
|
*/
|
|
60
60
|
run(forward: boolean): void;
|
|
61
61
|
}
|
|
62
|
+
export interface CommentMoveJson extends CommentBaseJson {
|
|
63
|
+
oldCoordinate: string;
|
|
64
|
+
newCoordinate: string;
|
|
65
|
+
}
|
|
62
66
|
//# sourceMappingURL=events_comment_move.d.ts.map
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { Block } from '../block.js';
|
|
7
7
|
import { ASTNode } from '../keyboard_nav/ast_node.js';
|
|
8
|
+
import { AbstractEventJson } from './events_abstract.js';
|
|
8
9
|
import { UiBase } from './events_ui_base.js';
|
|
9
10
|
/**
|
|
10
11
|
* Class for a marker move event.
|
|
@@ -12,8 +13,8 @@ import { UiBase } from './events_ui_base.js';
|
|
|
12
13
|
* @alias Blockly.Events.MarkerMove
|
|
13
14
|
*/
|
|
14
15
|
export declare class MarkerMove extends UiBase {
|
|
15
|
-
blockId
|
|
16
|
-
oldNode?: ASTNode
|
|
16
|
+
blockId?: string;
|
|
17
|
+
oldNode?: ASTNode;
|
|
17
18
|
newNode?: ASTNode;
|
|
18
19
|
isCursor?: boolean;
|
|
19
20
|
type: string;
|
|
@@ -33,12 +34,18 @@ export declare class MarkerMove extends UiBase {
|
|
|
33
34
|
*
|
|
34
35
|
* @returns JSON representation.
|
|
35
36
|
*/
|
|
36
|
-
toJson():
|
|
37
|
+
toJson(): MarkerMoveJson;
|
|
37
38
|
/**
|
|
38
39
|
* Decode the JSON event.
|
|
39
40
|
*
|
|
40
41
|
* @param json JSON representation.
|
|
41
42
|
*/
|
|
42
|
-
fromJson(json:
|
|
43
|
+
fromJson(json: MarkerMoveJson): void;
|
|
44
|
+
}
|
|
45
|
+
export interface MarkerMoveJson extends AbstractEventJson {
|
|
46
|
+
isCursor: boolean;
|
|
47
|
+
blockId?: string;
|
|
48
|
+
oldNode?: ASTNode;
|
|
49
|
+
newNode: ASTNode;
|
|
43
50
|
}
|
|
44
51
|
//# sourceMappingURL=events_marker_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 { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import { UiBase } from './events_ui_base.js';
|
|
7
8
|
/**
|
|
8
9
|
* Class for a selected event.
|
|
@@ -10,8 +11,8 @@ import { UiBase } from './events_ui_base.js';
|
|
|
10
11
|
* @alias Blockly.Events.Selected
|
|
11
12
|
*/
|
|
12
13
|
export declare class Selected extends UiBase {
|
|
13
|
-
oldElementId?: string
|
|
14
|
-
newElementId?: string
|
|
14
|
+
oldElementId?: string;
|
|
15
|
+
newElementId?: string;
|
|
15
16
|
type: string;
|
|
16
17
|
/**
|
|
17
18
|
* @param opt_oldElementId The ID of the previously selected element. Null if
|
|
@@ -27,12 +28,16 @@ export declare class Selected extends UiBase {
|
|
|
27
28
|
*
|
|
28
29
|
* @returns JSON representation.
|
|
29
30
|
*/
|
|
30
|
-
toJson():
|
|
31
|
+
toJson(): SelectedJson;
|
|
31
32
|
/**
|
|
32
33
|
* Decode the JSON event.
|
|
33
34
|
*
|
|
34
35
|
* @param json JSON representation.
|
|
35
36
|
*/
|
|
36
|
-
fromJson(json:
|
|
37
|
+
fromJson(json: SelectedJson): void;
|
|
38
|
+
}
|
|
39
|
+
export interface SelectedJson extends AbstractEventJson {
|
|
40
|
+
oldElementId?: string;
|
|
41
|
+
newElementId?: string;
|
|
37
42
|
}
|
|
38
43
|
//# sourceMappingURL=events_selected.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 { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import { UiBase } from './events_ui_base.js';
|
|
7
8
|
/**
|
|
8
9
|
* Class for a theme change event.
|
|
@@ -23,12 +24,15 @@ export declare class ThemeChange extends UiBase {
|
|
|
23
24
|
*
|
|
24
25
|
* @returns JSON representation.
|
|
25
26
|
*/
|
|
26
|
-
toJson():
|
|
27
|
+
toJson(): ThemeChangeJson;
|
|
27
28
|
/**
|
|
28
29
|
* Decode the JSON event.
|
|
29
30
|
*
|
|
30
31
|
* @param json JSON representation.
|
|
31
32
|
*/
|
|
32
|
-
fromJson(json:
|
|
33
|
+
fromJson(json: ThemeChangeJson): void;
|
|
34
|
+
}
|
|
35
|
+
export interface ThemeChangeJson extends AbstractEventJson {
|
|
36
|
+
themeName: string;
|
|
33
37
|
}
|
|
34
38
|
//# sourceMappingURL=events_theme_change.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 { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import { UiBase } from './events_ui_base.js';
|
|
7
8
|
/**
|
|
8
9
|
* Class for a toolbox item select event.
|
|
@@ -10,8 +11,8 @@ import { UiBase } from './events_ui_base.js';
|
|
|
10
11
|
* @alias Blockly.Events.ToolboxItemSelect
|
|
11
12
|
*/
|
|
12
13
|
export declare class ToolboxItemSelect extends UiBase {
|
|
13
|
-
oldItem?: string
|
|
14
|
-
newItem?: string
|
|
14
|
+
oldItem?: string;
|
|
15
|
+
newItem?: string;
|
|
15
16
|
type: string;
|
|
16
17
|
/**
|
|
17
18
|
* @param opt_oldItem The previously selected toolbox item.
|
|
@@ -27,12 +28,16 @@ export declare class ToolboxItemSelect extends UiBase {
|
|
|
27
28
|
*
|
|
28
29
|
* @returns JSON representation.
|
|
29
30
|
*/
|
|
30
|
-
toJson():
|
|
31
|
+
toJson(): ToolboxItemSelectJson;
|
|
31
32
|
/**
|
|
32
33
|
* Decode the JSON event.
|
|
33
34
|
*
|
|
34
35
|
* @param json JSON representation.
|
|
35
36
|
*/
|
|
36
|
-
fromJson(json:
|
|
37
|
+
fromJson(json: ToolboxItemSelectJson): void;
|
|
38
|
+
}
|
|
39
|
+
export interface ToolboxItemSelectJson extends AbstractEventJson {
|
|
40
|
+
oldItem?: string;
|
|
41
|
+
newItem?: string;
|
|
37
42
|
}
|
|
38
43
|
//# sourceMappingURL=events_toolbox_item_select.d.ts.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import { UiBase } from './events_ui_base.js';
|
|
7
8
|
/**
|
|
8
9
|
* Class for a trashcan open event.
|
|
@@ -24,12 +25,15 @@ export declare class TrashcanOpen extends UiBase {
|
|
|
24
25
|
*
|
|
25
26
|
* @returns JSON representation.
|
|
26
27
|
*/
|
|
27
|
-
toJson():
|
|
28
|
+
toJson(): TrashcanOpenJson;
|
|
28
29
|
/**
|
|
29
30
|
* Decode the JSON event.
|
|
30
31
|
*
|
|
31
32
|
* @param json JSON representation.
|
|
32
33
|
*/
|
|
33
|
-
fromJson(json:
|
|
34
|
+
fromJson(json: TrashcanOpenJson): void;
|
|
35
|
+
}
|
|
36
|
+
export interface TrashcanOpenJson extends AbstractEventJson {
|
|
37
|
+
isOpen: boolean;
|
|
34
38
|
}
|
|
35
39
|
//# sourceMappingURL=events_trashcan_open.d.ts.map
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { VariableModel } from '../variable_model.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 variable event.
|
|
10
10
|
*
|
|
11
11
|
* @alias Blockly.Events.VarBase
|
|
12
12
|
*/
|
|
13
13
|
export declare class VarBase extends AbstractEvent {
|
|
14
|
-
isBlank:
|
|
15
|
-
varId
|
|
16
|
-
workspaceId: string;
|
|
14
|
+
isBlank: boolean;
|
|
15
|
+
varId?: string;
|
|
17
16
|
/**
|
|
18
17
|
* @param opt_variable The variable this event corresponds to. Undefined for
|
|
19
18
|
* a blank event.
|
|
@@ -24,12 +23,15 @@ export declare class VarBase extends AbstractEvent {
|
|
|
24
23
|
*
|
|
25
24
|
* @returns JSON representation.
|
|
26
25
|
*/
|
|
27
|
-
toJson():
|
|
26
|
+
toJson(): VarBaseJson;
|
|
28
27
|
/**
|
|
29
28
|
* Decode the JSON event.
|
|
30
29
|
*
|
|
31
30
|
* @param json JSON representation.
|
|
32
31
|
*/
|
|
33
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: VarBaseJson): void;
|
|
33
|
+
}
|
|
34
|
+
export interface VarBaseJson extends AbstractEventJson {
|
|
35
|
+
varId: string;
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=events_var_base.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { VariableModel } from '../variable_model.js';
|
|
7
|
-
import { VarBase } from './events_var_base.js';
|
|
7
|
+
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a variable creation event.
|
|
10
10
|
*
|
|
@@ -12,8 +12,8 @@ import { VarBase } from './events_var_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class VarCreate extends VarBase {
|
|
14
14
|
type: string;
|
|
15
|
-
varType
|
|
16
|
-
varName
|
|
15
|
+
varType?: string;
|
|
16
|
+
varName?: string;
|
|
17
17
|
/**
|
|
18
18
|
* @param opt_variable The created variable. Undefined for a blank event.
|
|
19
19
|
*/
|
|
@@ -23,13 +23,13 @@ export declare class VarCreate extends VarBase {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns JSON representation.
|
|
25
25
|
*/
|
|
26
|
-
toJson():
|
|
26
|
+
toJson(): VarCreateJson;
|
|
27
27
|
/**
|
|
28
28
|
* Decode the JSON event.
|
|
29
29
|
*
|
|
30
30
|
* @param json JSON representation.
|
|
31
31
|
*/
|
|
32
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: VarCreateJson): void;
|
|
33
33
|
/**
|
|
34
34
|
* Run a variable creation event.
|
|
35
35
|
*
|
|
@@ -37,4 +37,8 @@ export declare class VarCreate extends VarBase {
|
|
|
37
37
|
*/
|
|
38
38
|
run(forward: boolean): void;
|
|
39
39
|
}
|
|
40
|
+
export interface VarCreateJson extends VarBaseJson {
|
|
41
|
+
varType: string;
|
|
42
|
+
varName: string;
|
|
43
|
+
}
|
|
40
44
|
//# sourceMappingURL=events_var_create.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { VariableModel } from '../variable_model.js';
|
|
7
|
-
import { VarBase } from './events_var_base.js';
|
|
7
|
+
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a variable deletion event.
|
|
10
10
|
*
|
|
@@ -12,8 +12,8 @@ import { VarBase } from './events_var_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class VarDelete extends VarBase {
|
|
14
14
|
type: string;
|
|
15
|
-
varType
|
|
16
|
-
varName
|
|
15
|
+
varType?: string;
|
|
16
|
+
varName?: string;
|
|
17
17
|
/**
|
|
18
18
|
* @param opt_variable The deleted variable. Undefined for a blank event.
|
|
19
19
|
*/
|
|
@@ -23,13 +23,13 @@ export declare class VarDelete extends VarBase {
|
|
|
23
23
|
*
|
|
24
24
|
* @returns JSON representation.
|
|
25
25
|
*/
|
|
26
|
-
toJson():
|
|
26
|
+
toJson(): VarDeleteJson;
|
|
27
27
|
/**
|
|
28
28
|
* Decode the JSON event.
|
|
29
29
|
*
|
|
30
30
|
* @param json JSON representation.
|
|
31
31
|
*/
|
|
32
|
-
fromJson(json:
|
|
32
|
+
fromJson(json: VarDeleteJson): void;
|
|
33
33
|
/**
|
|
34
34
|
* Run a variable deletion event.
|
|
35
35
|
*
|
|
@@ -37,4 +37,8 @@ export declare class VarDelete extends VarBase {
|
|
|
37
37
|
*/
|
|
38
38
|
run(forward: boolean): void;
|
|
39
39
|
}
|
|
40
|
+
export interface VarDeleteJson extends VarBaseJson {
|
|
41
|
+
varType: string;
|
|
42
|
+
varName: string;
|
|
43
|
+
}
|
|
40
44
|
//# sourceMappingURL=events_var_delete.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { VariableModel } from '../variable_model.js';
|
|
7
|
-
import { VarBase } from './events_var_base.js';
|
|
7
|
+
import { VarBase, VarBaseJson } from './events_var_base.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a variable rename event.
|
|
10
10
|
*
|
|
@@ -12,8 +12,8 @@ import { VarBase } from './events_var_base.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class VarRename extends VarBase {
|
|
14
14
|
type: string;
|
|
15
|
-
oldName
|
|
16
|
-
newName
|
|
15
|
+
oldName?: string;
|
|
16
|
+
newName?: string;
|
|
17
17
|
/**
|
|
18
18
|
* @param opt_variable The renamed variable. Undefined for a blank event.
|
|
19
19
|
* @param newName The new name the variable will be changed to.
|
|
@@ -24,13 +24,13 @@ export declare class VarRename extends VarBase {
|
|
|
24
24
|
*
|
|
25
25
|
* @returns JSON representation.
|
|
26
26
|
*/
|
|
27
|
-
toJson():
|
|
27
|
+
toJson(): VarRenameJson;
|
|
28
28
|
/**
|
|
29
29
|
* Decode the JSON event.
|
|
30
30
|
*
|
|
31
31
|
* @param json JSON representation.
|
|
32
32
|
*/
|
|
33
|
-
fromJson(json:
|
|
33
|
+
fromJson(json: VarRenameJson): void;
|
|
34
34
|
/**
|
|
35
35
|
* Run a variable rename event.
|
|
36
36
|
*
|
|
@@ -38,4 +38,8 @@ export declare class VarRename extends VarBase {
|
|
|
38
38
|
*/
|
|
39
39
|
run(forward: boolean): void;
|
|
40
40
|
}
|
|
41
|
+
export interface VarRenameJson extends VarBaseJson {
|
|
42
|
+
oldName: string;
|
|
43
|
+
newName: string;
|
|
44
|
+
}
|
|
41
45
|
//# sourceMappingURL=events_var_rename.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 { AbstractEventJson } from './events_abstract.js';
|
|
6
7
|
import { UiBase } from './events_ui_base.js';
|
|
7
8
|
/**
|
|
8
9
|
* Class for a viewport change event.
|
|
@@ -32,12 +33,18 @@ export declare class ViewportChange extends UiBase {
|
|
|
32
33
|
*
|
|
33
34
|
* @returns JSON representation.
|
|
34
35
|
*/
|
|
35
|
-
toJson():
|
|
36
|
+
toJson(): ViewportChangeJson;
|
|
36
37
|
/**
|
|
37
38
|
* Decode the JSON event.
|
|
38
39
|
*
|
|
39
40
|
* @param json JSON representation.
|
|
40
41
|
*/
|
|
41
|
-
fromJson(json:
|
|
42
|
+
fromJson(json: ViewportChangeJson): void;
|
|
43
|
+
}
|
|
44
|
+
export interface ViewportChangeJson extends AbstractEventJson {
|
|
45
|
+
viewTop: number;
|
|
46
|
+
viewLeft: number;
|
|
47
|
+
scale: number;
|
|
48
|
+
oldScale: number;
|
|
42
49
|
}
|
|
43
50
|
//# sourceMappingURL=events_viewport.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { Workspace } from '../workspace.js';
|
|
7
|
-
import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
7
|
+
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
8
8
|
/**
|
|
9
9
|
* Class for a finished loading event.
|
|
10
10
|
* Used to notify the developer when the workspace has finished loading (i.e
|
|
@@ -15,10 +15,8 @@ import { Abstract as AbstractEvent } from './events_abstract.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export declare class FinishedLoading extends AbstractEvent {
|
|
17
17
|
isBlank: boolean;
|
|
18
|
-
workspaceId: string;
|
|
19
18
|
recordUndo: boolean;
|
|
20
19
|
type: string;
|
|
21
|
-
group: any;
|
|
22
20
|
/**
|
|
23
21
|
* @param opt_workspace The workspace that has finished loading. Undefined
|
|
24
22
|
* for a blank event.
|
|
@@ -29,12 +27,15 @@ export declare class FinishedLoading extends AbstractEvent {
|
|
|
29
27
|
*
|
|
30
28
|
* @returns JSON representation.
|
|
31
29
|
*/
|
|
32
|
-
toJson():
|
|
30
|
+
toJson(): FinishedLoadingJson;
|
|
33
31
|
/**
|
|
34
32
|
* Decode the JSON event.
|
|
35
33
|
*
|
|
36
34
|
* @param json JSON representation.
|
|
37
35
|
*/
|
|
38
|
-
fromJson(json:
|
|
36
|
+
fromJson(json: FinishedLoadingJson): void;
|
|
37
|
+
}
|
|
38
|
+
export interface FinishedLoadingJson extends AbstractEventJson {
|
|
39
|
+
workspaceId: string;
|
|
39
40
|
}
|
|
40
41
|
//# sourceMappingURL=workspace_events.d.ts.map
|
package/core/field.d.ts
CHANGED
|
@@ -23,8 +23,6 @@ import { Size } from './utils/size.js';
|
|
|
23
23
|
* @alias Blockly.Field
|
|
24
24
|
*/
|
|
25
25
|
export declare abstract class Field implements IASTNodeLocationSvg, IASTNodeLocationWithBlock, IKeyboardAccessible, IRegistrable {
|
|
26
|
-
/** The default value for this field. */
|
|
27
|
-
protected DEFAULT_VALUE: any;
|
|
28
26
|
/** Non-breaking space. */
|
|
29
27
|
static readonly NBSP = "\u00A0";
|
|
30
28
|
/**
|
package/core/gesture.d.ts
CHANGED
|
@@ -58,19 +58,13 @@ export declare class Gesture {
|
|
|
58
58
|
* workspaces on a page; this is more accurate than using
|
|
59
59
|
* Blockly.common.getMainWorkspace().
|
|
60
60
|
*/
|
|
61
|
-
protected startWorkspace_: WorkspaceSvg;
|
|
61
|
+
protected startWorkspace_: WorkspaceSvg | null;
|
|
62
62
|
/**
|
|
63
63
|
* Whether the pointer has at any point moved out of the drag radius.
|
|
64
64
|
* A gesture that exceeds the drag radius is a drag even if it ends exactly
|
|
65
65
|
* at its start point.
|
|
66
66
|
*/
|
|
67
67
|
private hasExceededDragRadius_;
|
|
68
|
-
/** Whether the workspace is currently being dragged. */
|
|
69
|
-
private isDraggingWorkspace_;
|
|
70
|
-
/** Whether the block is currently being dragged. */
|
|
71
|
-
private isDraggingBlock_;
|
|
72
|
-
/** Whether the bubble is currently being dragged. */
|
|
73
|
-
private isDraggingBubble_;
|
|
74
68
|
/**
|
|
75
69
|
* A handle to use to unbind a mouse move listener at the end of a drag.
|
|
76
70
|
* Opaque data returned from Blockly.bindEventWithChecks_.
|
|
@@ -150,7 +144,10 @@ export declare class Gesture {
|
|
|
150
144
|
*/
|
|
151
145
|
private updateIsDraggingBubble_;
|
|
152
146
|
/**
|
|
153
|
-
*
|
|
147
|
+
* Check whether to start a block drag. If a block should be dragged, either
|
|
148
|
+
* from the flyout or in the workspace, create the necessary BlockDragger and
|
|
149
|
+
* start the drag.
|
|
150
|
+
*
|
|
154
151
|
* This function should be called on a mouse/touch move event the first time
|
|
155
152
|
* the drag radius is exceeded. It should be called no more than once per
|
|
156
153
|
* gesture. If a block should be dragged, either from the flyout or in the
|
|
@@ -161,7 +158,9 @@ export declare class Gesture {
|
|
|
161
158
|
*/
|
|
162
159
|
private updateIsDraggingBlock_;
|
|
163
160
|
/**
|
|
164
|
-
*
|
|
161
|
+
* Check whether to start a workspace drag. If a workspace is being dragged,
|
|
162
|
+
* create the necessary WorkspaceDragger and start the drag.
|
|
163
|
+
*
|
|
165
164
|
* This function should be called on a mouse/touch move event the first time
|
|
166
165
|
* the drag radius is exceeded. It should be called no more than once per
|
|
167
166
|
* gesture. If a workspace is being dragged this function creates the
|
package/core/grid.d.ts
CHANGED
package/core/icon.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { Size } from './utils/size.js';
|
|
|
13
13
|
* @alias Blockly.Icon
|
|
14
14
|
*/
|
|
15
15
|
export declare abstract class Icon {
|
|
16
|
-
protected block_: BlockSvg;
|
|
16
|
+
protected block_: BlockSvg | null;
|
|
17
17
|
/** The icon SVG group. */
|
|
18
18
|
iconGroup_: SVGGElement | null;
|
|
19
19
|
/** Whether this icon gets hidden when the block is collapsed. */
|
|
@@ -25,7 +25,7 @@ export declare abstract class Icon {
|
|
|
25
25
|
/** Absolute coordinate of icon's center. */
|
|
26
26
|
protected iconXY_: Coordinate | null;
|
|
27
27
|
/** @param block The block associated with this icon. */
|
|
28
|
-
constructor(block: BlockSvg);
|
|
28
|
+
constructor(block: BlockSvg | null);
|
|
29
29
|
/** Create the icon on the block. */
|
|
30
30
|
createIcon(): void;
|
|
31
31
|
/** Dispose of this icon. */
|
|
@@ -83,5 +83,9 @@ export declare abstract class Icon {
|
|
|
83
83
|
* @param _visible True if the icon should be visible.
|
|
84
84
|
*/
|
|
85
85
|
setVisible(_visible: boolean): void;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the block this icon is attached to.
|
|
88
|
+
*/
|
|
89
|
+
protected getBlock(): BlockSvg;
|
|
86
90
|
}
|
|
87
91
|
//# sourceMappingURL=icon.d.ts.map
|