blockly 12.0.0-beta.4 → 12.0.0-beta.6
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 +715 -664
- package/blockly.mjs +11 -1
- package/blockly_compressed.js +679 -661
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +3 -3
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +1 -16
- package/core/block_svg.d.ts +19 -31
- package/core/blockly.d.ts +15 -7
- package/core/bubbles/bubble.d.ts +22 -3
- package/core/bubbles/textinput_bubble.d.ts +3 -5
- package/core/comments/rendered_workspace_comment.d.ts +11 -0
- package/core/common.d.ts +19 -7
- package/core/connection.d.ts +3 -2
- package/core/contextmenu_registry.d.ts +11 -9
- package/core/dialog.d.ts +36 -16
- package/core/events/events.d.ts +0 -2
- package/core/events/predicates.d.ts +0 -3
- package/core/events/utils.d.ts +1 -5
- package/core/field.d.ts +28 -30
- package/core/field_dropdown.d.ts +17 -3
- package/core/field_image.d.ts +0 -2
- package/core/field_input.d.ts +9 -0
- package/core/field_variable.d.ts +0 -2
- package/core/flyout_base.d.ts +25 -1
- package/core/flyout_button.d.ts +15 -13
- package/core/flyout_item.d.ts +3 -9
- package/core/flyout_navigator.d.ts +11 -0
- package/core/flyout_separator.d.ts +20 -1
- package/core/focus_manager.d.ts +86 -14
- package/core/icons/comment_icon.d.ts +3 -0
- package/core/icons/icon.d.ts +13 -0
- package/core/icons/mutator_icon.d.ts +3 -0
- package/core/icons/warning_icon.d.ts +3 -0
- package/core/interfaces/i_autohideable.d.ts +2 -0
- package/core/interfaces/i_bubble.d.ts +2 -1
- package/core/interfaces/i_flyout.d.ts +2 -1
- package/core/interfaces/i_focusable_node.d.ts +71 -8
- package/core/interfaces/i_focusable_tree.d.ts +67 -0
- package/core/interfaces/i_has_bubble.d.ts +13 -0
- package/core/interfaces/i_icon.d.ts +2 -1
- package/core/interfaces/i_navigation_policy.d.ts +63 -0
- package/core/interfaces/i_selectable.d.ts +7 -1
- package/core/interfaces/i_toolbox.d.ts +2 -1
- package/core/interfaces/i_toolbox_item.d.ts +2 -1
- package/core/keyboard_nav/block_navigation_policy.d.ts +59 -0
- package/core/keyboard_nav/connection_navigation_policy.d.ts +67 -0
- package/core/keyboard_nav/field_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/flyout_button_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +65 -0
- package/core/keyboard_nav/flyout_separator_navigation_policy.d.ts +33 -0
- package/core/keyboard_nav/line_cursor.d.ts +24 -185
- package/core/keyboard_nav/marker.d.ts +17 -29
- package/core/keyboard_nav/workspace_navigation_policy.d.ts +56 -0
- package/core/layer_manager.d.ts +3 -2
- package/core/marker_manager.d.ts +0 -26
- package/core/navigator.d.ts +65 -0
- package/core/rendered_connection.d.ts +24 -1
- package/core/renderers/common/block_rendering.d.ts +1 -2
- package/core/renderers/common/drawer.d.ts +1 -1
- package/core/renderers/common/i_path_object.d.ts +1 -25
- package/core/renderers/common/path_object.d.ts +1 -26
- package/core/renderers/common/renderer.d.ts +0 -11
- package/core/renderers/zelos/drawer.d.ts +1 -1
- package/core/renderers/zelos/renderer.d.ts +0 -11
- package/core/renderers/zelos/zelos.d.ts +1 -2
- package/core/shortcut_registry.d.ts +7 -2
- package/core/toast.d.ts +74 -0
- package/core/toolbox/toolbox.d.ts +25 -1
- package/core/toolbox/toolbox_item.d.ts +11 -0
- package/core/utils/aria.d.ts +5 -2
- package/core/utils/object.d.ts +3 -0
- package/core/variable_map.d.ts +11 -6
- package/core/variables.d.ts +3 -1
- package/core/workspace.d.ts +11 -11
- package/core/workspace_dragger.d.ts +5 -0
- package/core/workspace_svg.d.ts +99 -48
- package/index.mjs +11 -1
- package/msg/ab.js +33 -0
- package/msg/ab.mjs +33 -0
- package/msg/ace.js +33 -0
- package/msg/ace.mjs +33 -0
- package/msg/af.js +33 -0
- package/msg/af.mjs +33 -0
- package/msg/am.js +33 -0
- package/msg/am.mjs +33 -0
- package/msg/ar.js +33 -0
- package/msg/ar.mjs +33 -0
- package/msg/ast.js +33 -0
- package/msg/ast.mjs +33 -0
- package/msg/az.js +33 -0
- package/msg/az.mjs +33 -0
- package/msg/ba.js +33 -0
- package/msg/ba.mjs +33 -0
- package/msg/bcc.js +33 -0
- package/msg/bcc.mjs +33 -0
- package/msg/be-tarask.js +33 -0
- package/msg/be-tarask.mjs +33 -0
- package/msg/be.js +33 -0
- package/msg/be.mjs +33 -0
- package/msg/bg.js +33 -0
- package/msg/bg.mjs +33 -0
- package/msg/bn.js +33 -0
- package/msg/bn.mjs +33 -0
- package/msg/br.js +33 -0
- package/msg/br.mjs +33 -0
- package/msg/bs.js +33 -0
- package/msg/bs.mjs +33 -0
- package/msg/ca.js +33 -0
- package/msg/ca.mjs +33 -0
- package/msg/cdo.js +33 -0
- package/msg/cdo.mjs +33 -0
- package/msg/ce.js +33 -0
- package/msg/ce.mjs +33 -0
- package/msg/cs.js +33 -0
- package/msg/cs.mjs +33 -0
- package/msg/da.js +33 -0
- package/msg/da.mjs +33 -0
- package/msg/de.js +33 -0
- package/msg/de.mjs +33 -0
- package/msg/diq.js +33 -0
- package/msg/diq.mjs +33 -0
- package/msg/dtp.js +33 -0
- package/msg/dtp.mjs +33 -0
- package/msg/dty.js +33 -0
- package/msg/dty.mjs +33 -0
- package/msg/ee.js +33 -0
- package/msg/ee.mjs +33 -0
- package/msg/el.js +33 -0
- package/msg/el.mjs +33 -0
- package/msg/en-gb.js +33 -0
- package/msg/en-gb.mjs +33 -0
- package/msg/en.js +33 -0
- package/msg/en.mjs +33 -0
- package/msg/eo.js +33 -0
- package/msg/eo.mjs +33 -0
- package/msg/es.js +33 -0
- package/msg/es.mjs +33 -0
- package/msg/et.js +33 -0
- package/msg/et.mjs +33 -0
- package/msg/eu.js +33 -0
- package/msg/eu.mjs +33 -0
- package/msg/fa.js +33 -0
- package/msg/fa.mjs +33 -0
- package/msg/fi.js +33 -0
- package/msg/fi.mjs +33 -0
- package/msg/fo.js +33 -0
- package/msg/fo.mjs +33 -0
- package/msg/fr.js +33 -0
- package/msg/fr.mjs +33 -0
- package/msg/frr.js +33 -0
- package/msg/frr.mjs +33 -0
- package/msg/gl.js +33 -0
- package/msg/gl.mjs +33 -0
- package/msg/gn.js +33 -0
- package/msg/gn.mjs +33 -0
- package/msg/gor.js +33 -0
- package/msg/gor.mjs +33 -0
- package/msg/ha.js +33 -0
- package/msg/ha.mjs +33 -0
- package/msg/hak.js +33 -0
- package/msg/hak.mjs +33 -0
- package/msg/he.js +33 -0
- package/msg/he.mjs +33 -0
- package/msg/hi.js +33 -0
- package/msg/hi.mjs +33 -0
- package/msg/hr.js +33 -0
- package/msg/hr.mjs +33 -0
- package/msg/hrx.js +33 -0
- package/msg/hrx.mjs +33 -0
- package/msg/hsb.js +33 -0
- package/msg/hsb.mjs +33 -0
- package/msg/hu.js +33 -0
- package/msg/hu.mjs +33 -0
- package/msg/hy.js +33 -0
- package/msg/hy.mjs +33 -0
- package/msg/ia.js +33 -0
- package/msg/ia.mjs +33 -0
- package/msg/id.js +33 -0
- package/msg/id.mjs +33 -0
- package/msg/ig.js +33 -0
- package/msg/ig.mjs +33 -0
- package/msg/inh.js +33 -0
- package/msg/inh.mjs +33 -0
- package/msg/is.js +33 -0
- package/msg/is.mjs +33 -0
- package/msg/it.js +33 -0
- package/msg/it.mjs +33 -0
- package/msg/ja.js +33 -0
- package/msg/ja.mjs +33 -0
- package/msg/ka.js +33 -0
- package/msg/ka.mjs +33 -0
- package/msg/kab.js +33 -0
- package/msg/kab.mjs +33 -0
- package/msg/kbd-cyrl.js +33 -0
- package/msg/kbd-cyrl.mjs +33 -0
- package/msg/km.js +33 -0
- package/msg/km.mjs +33 -0
- package/msg/kn.js +33 -0
- package/msg/kn.mjs +33 -0
- package/msg/ko.js +33 -0
- package/msg/ko.mjs +33 -0
- package/msg/ksh.js +33 -0
- package/msg/ksh.mjs +33 -0
- package/msg/ku-latn.js +33 -0
- package/msg/ku-latn.mjs +33 -0
- package/msg/ky.js +33 -0
- package/msg/ky.mjs +33 -0
- package/msg/la.js +33 -0
- package/msg/la.mjs +33 -0
- package/msg/lb.js +33 -0
- package/msg/lb.mjs +33 -0
- package/msg/lki.js +33 -0
- package/msg/lki.mjs +33 -0
- package/msg/lo.js +33 -0
- package/msg/lo.mjs +33 -0
- package/msg/lrc.js +33 -0
- package/msg/lrc.mjs +33 -0
- package/msg/lt.js +33 -0
- package/msg/lt.mjs +33 -0
- package/msg/lv.js +33 -0
- package/msg/lv.mjs +33 -0
- package/msg/mg.js +33 -0
- package/msg/mg.mjs +33 -0
- package/msg/mk.js +33 -0
- package/msg/mk.mjs +33 -0
- package/msg/ml.js +33 -0
- package/msg/ml.mjs +33 -0
- package/msg/mnw.js +33 -0
- package/msg/mnw.mjs +33 -0
- package/msg/ms.js +33 -0
- package/msg/ms.mjs +33 -0
- package/msg/my.js +33 -0
- package/msg/my.mjs +33 -0
- package/msg/mzn.js +33 -0
- package/msg/mzn.mjs +33 -0
- package/msg/nb.js +33 -0
- package/msg/nb.mjs +33 -0
- package/msg/ne.js +33 -0
- package/msg/ne.mjs +33 -0
- package/msg/nl.js +33 -0
- package/msg/nl.mjs +33 -0
- package/msg/oc.js +33 -0
- package/msg/oc.mjs +33 -0
- package/msg/olo.js +33 -0
- package/msg/olo.mjs +33 -0
- package/msg/pa.js +33 -0
- package/msg/pa.mjs +33 -0
- package/msg/pl.js +33 -0
- package/msg/pl.mjs +33 -0
- package/msg/pms.js +33 -0
- package/msg/pms.mjs +33 -0
- package/msg/ps.js +33 -0
- package/msg/ps.mjs +33 -0
- package/msg/pt-br.js +33 -0
- package/msg/pt-br.mjs +33 -0
- package/msg/pt.js +33 -0
- package/msg/pt.mjs +33 -0
- package/msg/ro.js +33 -0
- package/msg/ro.mjs +33 -0
- package/msg/ru.js +33 -0
- package/msg/ru.mjs +33 -0
- package/msg/sc.js +33 -0
- package/msg/sc.mjs +33 -0
- package/msg/sco.js +33 -0
- package/msg/sco.mjs +33 -0
- package/msg/sd.js +33 -0
- package/msg/sd.mjs +33 -0
- package/msg/shn.js +33 -0
- package/msg/shn.mjs +33 -0
- package/msg/si.js +33 -0
- package/msg/si.mjs +33 -0
- package/msg/sk.js +33 -0
- package/msg/sk.mjs +33 -0
- package/msg/skr-arab.js +33 -0
- package/msg/skr-arab.mjs +33 -0
- package/msg/sl.js +33 -0
- package/msg/sl.mjs +33 -0
- package/msg/smn.js +33 -0
- package/msg/smn.mjs +33 -0
- package/msg/sq.js +33 -0
- package/msg/sq.mjs +33 -0
- package/msg/sr-latn.js +33 -0
- package/msg/sr-latn.mjs +33 -0
- package/msg/sr.js +33 -0
- package/msg/sr.mjs +33 -0
- package/msg/sv.js +33 -0
- package/msg/sv.mjs +33 -0
- package/msg/sw.js +33 -0
- package/msg/sw.mjs +33 -0
- package/msg/ta.js +33 -0
- package/msg/ta.mjs +33 -0
- package/msg/tcy.js +33 -0
- package/msg/tcy.mjs +33 -0
- package/msg/tdd.js +33 -0
- package/msg/tdd.mjs +33 -0
- package/msg/te.js +33 -0
- package/msg/te.mjs +33 -0
- package/msg/th.js +33 -0
- package/msg/th.mjs +33 -0
- package/msg/ti.js +33 -0
- package/msg/ti.mjs +33 -0
- package/msg/tl.js +33 -0
- package/msg/tl.mjs +33 -0
- package/msg/tlh.js +33 -0
- package/msg/tlh.mjs +33 -0
- package/msg/tr.js +33 -0
- package/msg/tr.mjs +33 -0
- package/msg/ug-arab.js +33 -0
- package/msg/ug-arab.mjs +33 -0
- package/msg/uk.js +33 -0
- package/msg/uk.mjs +33 -0
- package/msg/ur.js +33 -0
- package/msg/ur.mjs +33 -0
- package/msg/uz.js +33 -0
- package/msg/uz.mjs +33 -0
- package/msg/vi.js +33 -0
- package/msg/vi.mjs +33 -0
- package/msg/xmf.js +33 -0
- package/msg/xmf.mjs +33 -0
- package/msg/yo.js +33 -0
- package/msg/yo.mjs +33 -0
- package/msg/zgh.js +33 -0
- package/msg/zgh.mjs +33 -0
- package/msg/zh-hans.js +33 -0
- package/msg/zh-hans.mjs +33 -0
- package/msg/zh-hant.js +33 -0
- package/msg/zh-hant.mjs +33 -0
- package/package.json +4 -4
- package/core/events/events_marker_move.d.ts +0 -69
- package/core/interfaces/i_ast_node_location.d.ts +0 -11
- package/core/interfaces/i_ast_node_location_svg.d.ts +0 -24
- package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -19
- package/core/keyboard_nav/ast_node.d.ts +0 -297
- package/core/renderers/common/marker_svg.d.ts +0 -256
- package/core/renderers/zelos/marker_svg.d.ts +0 -49
|
@@ -23,16 +23,6 @@ export interface IPathObject {
|
|
|
23
23
|
constants: ConstantProvider;
|
|
24
24
|
/** The primary path of the block. */
|
|
25
25
|
style: BlockStyle;
|
|
26
|
-
/**
|
|
27
|
-
* Holds the cursors SVG element when the cursor is attached to the block.
|
|
28
|
-
* This is null if there is no cursor on the block.
|
|
29
|
-
*/
|
|
30
|
-
cursorSvg: SVGElement | null;
|
|
31
|
-
/**
|
|
32
|
-
* Holds the markers SVG element when the marker is attached to the block.
|
|
33
|
-
* This is null if there is no marker on the block.
|
|
34
|
-
*/
|
|
35
|
-
markerSvg: SVGElement | null;
|
|
36
26
|
/**
|
|
37
27
|
* Set the path generated by the renderer onto the respective SVG element.
|
|
38
28
|
*
|
|
@@ -43,20 +33,6 @@ export interface IPathObject {
|
|
|
43
33
|
* Flip the SVG paths in RTL.
|
|
44
34
|
*/
|
|
45
35
|
flipRTL(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Add the cursor SVG to this block's SVG group.
|
|
48
|
-
*
|
|
49
|
-
* @param cursorSvg The SVG root of the cursor to be added to the block SVG
|
|
50
|
-
* group.
|
|
51
|
-
*/
|
|
52
|
-
setCursorSvg(cursorSvg: SVGElement): void;
|
|
53
|
-
/**
|
|
54
|
-
* Add the marker SVG to this block's SVG group.
|
|
55
|
-
*
|
|
56
|
-
* @param markerSvg The SVG root of the marker to be added to the block SVG
|
|
57
|
-
* group.
|
|
58
|
-
*/
|
|
59
|
-
setMarkerSvg(markerSvg: SVGElement): void;
|
|
60
36
|
/**
|
|
61
37
|
* Set whether the block shows a highlight or not. Block highlighting is
|
|
62
38
|
* often used to visually mark blocks currently being executed.
|
|
@@ -90,7 +66,7 @@ export interface IPathObject {
|
|
|
90
66
|
*/
|
|
91
67
|
updateMovable(enabled: boolean): void;
|
|
92
68
|
/** Adds the given path as a connection highlight for the given connection. */
|
|
93
|
-
addConnectionHighlight?(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean):
|
|
69
|
+
addConnectionHighlight?(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean): SVGElement;
|
|
94
70
|
/**
|
|
95
71
|
* Apply the stored colours to the block's path, taking into account whether
|
|
96
72
|
* the paths belong to a shadow block.
|
|
@@ -17,16 +17,6 @@ import type { IPathObject } from './i_path_object.js';
|
|
|
17
17
|
export declare class PathObject implements IPathObject {
|
|
18
18
|
svgRoot: SVGElement;
|
|
19
19
|
svgPath: SVGElement;
|
|
20
|
-
/**
|
|
21
|
-
* Holds the cursors svg element when the cursor is attached to the block.
|
|
22
|
-
* This is null if there is no cursor on the block.
|
|
23
|
-
*/
|
|
24
|
-
cursorSvg: SVGElement | null;
|
|
25
|
-
/**
|
|
26
|
-
* Holds the markers svg element when the marker is attached to the block.
|
|
27
|
-
* This is null if there is no marker on the block.
|
|
28
|
-
*/
|
|
29
|
-
markerSvg: SVGElement | null;
|
|
30
20
|
constants: ConstantProvider;
|
|
31
21
|
style: BlockStyle;
|
|
32
22
|
/** Highlight paths associated with connections. */
|
|
@@ -49,20 +39,6 @@ export declare class PathObject implements IPathObject {
|
|
|
49
39
|
* Flip the SVG paths in RTL.
|
|
50
40
|
*/
|
|
51
41
|
flipRTL(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Add the cursor SVG to this block's SVG group.
|
|
54
|
-
*
|
|
55
|
-
* @param cursorSvg The SVG root of the cursor to be added to the block SVG
|
|
56
|
-
* group.
|
|
57
|
-
*/
|
|
58
|
-
setCursorSvg(cursorSvg: SVGElement): void;
|
|
59
|
-
/**
|
|
60
|
-
* Add the marker SVG to this block's SVG group.
|
|
61
|
-
*
|
|
62
|
-
* @param markerSvg The SVG root of the marker to be added to the block SVG
|
|
63
|
-
* group.
|
|
64
|
-
*/
|
|
65
|
-
setMarkerSvg(markerSvg: SVGElement): void;
|
|
66
42
|
/**
|
|
67
43
|
* Apply the stored colours to the block's path, taking into account whether
|
|
68
44
|
* the paths belong to a shadow block.
|
|
@@ -145,8 +121,7 @@ export declare class PathObject implements IPathObject {
|
|
|
145
121
|
*/
|
|
146
122
|
updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
|
|
147
123
|
/** Adds the given path as a connection highlight for the given connection. */
|
|
148
|
-
addConnectionHighlight(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean):
|
|
149
|
-
private currentHighlightMatchesNew;
|
|
124
|
+
addConnectionHighlight(connection: RenderedConnection, connectionPath: string, offset: Coordinate, rtl: boolean): SVGElement;
|
|
150
125
|
/**
|
|
151
126
|
* Removes any highlight associated with the given connection, if it exists.
|
|
152
127
|
*/
|
|
@@ -6,14 +6,11 @@
|
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
7
|
import { Connection } from '../../connection.js';
|
|
8
8
|
import type { IRegistrable } from '../../interfaces/i_registrable.js';
|
|
9
|
-
import type { Marker } from '../../keyboard_nav/marker.js';
|
|
10
9
|
import type { BlockStyle, Theme } from '../../theme.js';
|
|
11
|
-
import type { WorkspaceSvg } from '../../workspace_svg.js';
|
|
12
10
|
import { ConstantProvider } from './constants.js';
|
|
13
11
|
import { Drawer } from './drawer.js';
|
|
14
12
|
import type { IPathObject } from './i_path_object.js';
|
|
15
13
|
import { RenderInfo } from './info.js';
|
|
16
|
-
import { MarkerSvg } from './marker_svg.js';
|
|
17
14
|
/**
|
|
18
15
|
* The base class for a block renderer.
|
|
19
16
|
*/
|
|
@@ -98,14 +95,6 @@ export declare class Renderer implements IRegistrable {
|
|
|
98
95
|
* @returns The drawer.
|
|
99
96
|
*/
|
|
100
97
|
protected makeDrawer_(block: BlockSvg, info: RenderInfo): Drawer;
|
|
101
|
-
/**
|
|
102
|
-
* Create a new instance of the renderer's marker drawer.
|
|
103
|
-
*
|
|
104
|
-
* @param workspace The workspace the marker belongs to.
|
|
105
|
-
* @param marker The marker.
|
|
106
|
-
* @returns The object in charge of drawing the marker.
|
|
107
|
-
*/
|
|
108
|
-
makeMarkerDrawer(workspace: WorkspaceSvg, marker: Marker): MarkerSvg;
|
|
109
98
|
/**
|
|
110
99
|
* Create a new instance of a renderer path object.
|
|
111
100
|
*
|
|
@@ -46,6 +46,6 @@ export declare class Drawer extends BaseDrawer {
|
|
|
46
46
|
private getInlineInputPath;
|
|
47
47
|
drawStatementInput_(row: Row): void;
|
|
48
48
|
/** Returns a path to highlight the given connection. */
|
|
49
|
-
drawConnectionHighlightPath(measurable: Connection):
|
|
49
|
+
drawConnectionHighlightPath(measurable: Connection): SVGElement | undefined;
|
|
50
50
|
}
|
|
51
51
|
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -4,15 +4,12 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { BlockSvg } from '../../block_svg.js';
|
|
7
|
-
import type { Marker } from '../../keyboard_nav/marker.js';
|
|
8
7
|
import type { BlockStyle } from '../../theme.js';
|
|
9
|
-
import type { WorkspaceSvg } from '../../workspace_svg.js';
|
|
10
8
|
import type { RenderInfo as BaseRenderInfo } from '../common/info.js';
|
|
11
9
|
import { Renderer as BaseRenderer } from '../common/renderer.js';
|
|
12
10
|
import { ConstantProvider } from './constants.js';
|
|
13
11
|
import { Drawer } from './drawer.js';
|
|
14
12
|
import { RenderInfo } from './info.js';
|
|
15
|
-
import { MarkerSvg } from './marker_svg.js';
|
|
16
13
|
import { PathObject } from './path_object.js';
|
|
17
14
|
/**
|
|
18
15
|
* The zelos renderer. This renderer emulates Scratch-style and MakeCode-style
|
|
@@ -48,14 +45,6 @@ export declare class Renderer extends BaseRenderer {
|
|
|
48
45
|
* @returns The drawer.
|
|
49
46
|
*/
|
|
50
47
|
protected makeDrawer_(block: BlockSvg, info: BaseRenderInfo): Drawer;
|
|
51
|
-
/**
|
|
52
|
-
* Create a new instance of the renderer's cursor drawer.
|
|
53
|
-
*
|
|
54
|
-
* @param workspace The workspace the cursor belongs to.
|
|
55
|
-
* @param marker The marker.
|
|
56
|
-
* @returns The object in charge of drawing the marker.
|
|
57
|
-
*/
|
|
58
|
-
makeMarkerDrawer(workspace: WorkspaceSvg, marker: Marker): MarkerSvg;
|
|
59
48
|
/**
|
|
60
49
|
* Create a new instance of a renderer path object.
|
|
61
50
|
*
|
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
import { ConstantProvider } from './constants.js';
|
|
8
8
|
import { Drawer } from './drawer.js';
|
|
9
9
|
import { RenderInfo } from './info.js';
|
|
10
|
-
import { MarkerSvg } from './marker_svg.js';
|
|
11
10
|
import { BottomRow } from './measurables/bottom_row.js';
|
|
12
11
|
import { StatementInput } from './measurables/inputs.js';
|
|
13
12
|
import { RightConnectionShape } from './measurables/row_elements.js';
|
|
14
13
|
import { TopRow } from './measurables/top_row.js';
|
|
15
14
|
import { PathObject } from './path_object.js';
|
|
16
15
|
import { Renderer } from './renderer.js';
|
|
17
|
-
export { BottomRow, ConstantProvider, Drawer,
|
|
16
|
+
export { BottomRow, ConstantProvider, Drawer, PathObject, Renderer, RenderInfo, RightConnectionShape, StatementInput, TopRow, };
|
|
18
17
|
//# sourceMappingURL=zelos.d.ts.map
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @class
|
|
11
11
|
*/
|
|
12
|
+
import { Scope } from './contextmenu_registry.js';
|
|
12
13
|
import { KeyCodes } from './utils/keycodes.js';
|
|
13
14
|
import { WorkspaceSvg } from './workspace_svg.js';
|
|
14
15
|
/**
|
|
@@ -183,12 +184,14 @@ export declare namespace ShortcutRegistry {
|
|
|
183
184
|
* @param e The event that caused the shortcut to be activated.
|
|
184
185
|
* @param shortcut The `KeyboardShortcut` that was activated
|
|
185
186
|
* (i.e., the one this callback is attached to).
|
|
187
|
+
* @param scope Information about the focused item when the
|
|
188
|
+
* shortcut was invoked.
|
|
186
189
|
* @returns Returning true ends processing of the invoked keycode.
|
|
187
190
|
* Returning false causes processing to continue with the
|
|
188
191
|
* next-most-recently registered shortcut for the invoked
|
|
189
192
|
* keycode.
|
|
190
193
|
*/
|
|
191
|
-
callback?: (workspace: WorkspaceSvg, e: Event, shortcut: KeyboardShortcut) => boolean;
|
|
194
|
+
callback?: (workspace: WorkspaceSvg, e: Event, shortcut: KeyboardShortcut, scope: Scope) => boolean;
|
|
192
195
|
/** The name of the shortcut. Should be unique. */
|
|
193
196
|
name: string;
|
|
194
197
|
/**
|
|
@@ -198,9 +201,11 @@ export declare namespace ShortcutRegistry {
|
|
|
198
201
|
*
|
|
199
202
|
* @param workspace The `WorkspaceSvg` where the shortcut was
|
|
200
203
|
* invoked.
|
|
204
|
+
* @param scope Information about the focused item when the
|
|
205
|
+
* shortcut would be invoked.
|
|
201
206
|
* @returns True iff `callback` function should be called.
|
|
202
207
|
*/
|
|
203
|
-
preconditionFn?: (workspace: WorkspaceSvg) => boolean;
|
|
208
|
+
preconditionFn?: (workspace: WorkspaceSvg, scope: Scope) => boolean;
|
|
204
209
|
/** Optional arbitray extra data attached to the shortcut. */
|
|
205
210
|
metadata?: object;
|
|
206
211
|
/**
|
package/core/toast.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
7
|
+
/**
|
|
8
|
+
* Display/configuration options for a toast notification.
|
|
9
|
+
*/
|
|
10
|
+
export interface ToastOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Toast ID. If set along with `oncePerSession`, will cause subsequent toasts
|
|
13
|
+
* with this ID to not be shown.
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Flag to show the toast once per session only.
|
|
18
|
+
* Subsequent calls are ignored.
|
|
19
|
+
*/
|
|
20
|
+
oncePerSession?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Text of the message to display on the toast.
|
|
23
|
+
*/
|
|
24
|
+
message: string;
|
|
25
|
+
/**
|
|
26
|
+
* Duration in seconds before the toast is removed. Defaults to 5.
|
|
27
|
+
*/
|
|
28
|
+
duration?: number;
|
|
29
|
+
/**
|
|
30
|
+
* How prominently/interrupting the readout of the toast should be for
|
|
31
|
+
* screenreaders. Corresponds to aria-live and defaults to polite.
|
|
32
|
+
*/
|
|
33
|
+
assertiveness?: Toast.Assertiveness;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Class that allows for showing and dismissing temporary notifications.
|
|
37
|
+
*/
|
|
38
|
+
export declare class Toast {
|
|
39
|
+
/** IDs of toasts that have previously been shown. */
|
|
40
|
+
private static shownIds;
|
|
41
|
+
/**
|
|
42
|
+
* Shows a toast notification.
|
|
43
|
+
*
|
|
44
|
+
* @param workspace The workspace to show the toast on.
|
|
45
|
+
* @param options Configuration options for the toast message, duration, etc.
|
|
46
|
+
*/
|
|
47
|
+
static show(workspace: WorkspaceSvg, options: ToastOptions): void;
|
|
48
|
+
/**
|
|
49
|
+
* Creates the DOM representation of a toast.
|
|
50
|
+
*
|
|
51
|
+
* @param workspace The workspace to inject the toast notification onto.
|
|
52
|
+
* @param options Configuration options for the toast.
|
|
53
|
+
* @returns The root DOM element of the toast.
|
|
54
|
+
*/
|
|
55
|
+
protected static createDom(workspace: WorkspaceSvg, options: ToastOptions): HTMLDivElement;
|
|
56
|
+
/**
|
|
57
|
+
* Dismiss a toast, e.g. in response to a user action.
|
|
58
|
+
*
|
|
59
|
+
* @param workspace The workspace to dismiss a toast in.
|
|
60
|
+
* @param id The toast ID, or undefined to clear any toast.
|
|
61
|
+
*/
|
|
62
|
+
static hide(workspace: WorkspaceSvg, id?: string): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Options for how aggressively toasts should be read out by screenreaders.
|
|
66
|
+
* Values correspond to those for aria-live.
|
|
67
|
+
*/
|
|
68
|
+
export declare namespace Toast {
|
|
69
|
+
enum Assertiveness {
|
|
70
|
+
ASSERTIVE = "assertive",
|
|
71
|
+
POLITE = "polite"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -9,6 +9,8 @@ import '../events/events_toolbox_item_select.js';
|
|
|
9
9
|
import type { IAutoHideable } from '../interfaces/i_autohideable.js';
|
|
10
10
|
import type { IDraggable } from '../interfaces/i_draggable.js';
|
|
11
11
|
import type { IFlyout } from '../interfaces/i_flyout.js';
|
|
12
|
+
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
13
|
+
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
12
14
|
import type { IKeyboardAccessible } from '../interfaces/i_keyboard_accessible.js';
|
|
13
15
|
import type { ISelectableToolboxItem } from '../interfaces/i_selectable_toolbox_item.js';
|
|
14
16
|
import type { IStyleable } from '../interfaces/i_styleable.js';
|
|
@@ -22,7 +24,7 @@ import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
|
22
24
|
* Class for a Toolbox.
|
|
23
25
|
* Creates the toolbox's DOM.
|
|
24
26
|
*/
|
|
25
|
-
export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeyboardAccessible, IStyleable, IToolbox {
|
|
27
|
+
export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeyboardAccessible, IStyleable, IToolbox, IFocusableNode {
|
|
26
28
|
/**
|
|
27
29
|
* The unique ID for this component that is used to register with the
|
|
28
30
|
* ComponentManager.
|
|
@@ -389,5 +391,27 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
389
391
|
private selectPrevious;
|
|
390
392
|
/** Disposes of this toolbox. */
|
|
391
393
|
dispose(): void;
|
|
394
|
+
/** See IFocusableNode.getFocusableElement. */
|
|
395
|
+
getFocusableElement(): HTMLElement | SVGElement;
|
|
396
|
+
/** See IFocusableNode.getFocusableTree. */
|
|
397
|
+
getFocusableTree(): IFocusableTree;
|
|
398
|
+
/** See IFocusableNode.onNodeFocus. */
|
|
399
|
+
onNodeFocus(): void;
|
|
400
|
+
/** See IFocusableNode.onNodeBlur. */
|
|
401
|
+
onNodeBlur(): void;
|
|
402
|
+
/** See IFocusableNode.canBeFocused. */
|
|
403
|
+
canBeFocused(): boolean;
|
|
404
|
+
/** See IFocusableTree.getRootFocusableNode. */
|
|
405
|
+
getRootFocusableNode(): IFocusableNode;
|
|
406
|
+
/** See IFocusableTree.getRestoredFocusableNode. */
|
|
407
|
+
getRestoredFocusableNode(previousNode: IFocusableNode | null): IFocusableNode | null;
|
|
408
|
+
/** See IFocusableTree.getNestedTrees. */
|
|
409
|
+
getNestedTrees(): Array<IFocusableTree>;
|
|
410
|
+
/** See IFocusableTree.lookUpFocusableNode. */
|
|
411
|
+
lookUpFocusableNode(id: string): IFocusableNode | null;
|
|
412
|
+
/** See IFocusableTree.onTreeFocus. */
|
|
413
|
+
onTreeFocus(node: IFocusableNode, _previousTree: IFocusableTree | null): void;
|
|
414
|
+
/** See IFocusableTree.onTreeBlur. */
|
|
415
|
+
onTreeBlur(_nextTree: IFocusableTree | null): void;
|
|
392
416
|
}
|
|
393
417
|
//# sourceMappingURL=toolbox.d.ts.map
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import type { ICollapsibleToolboxItem } from '../interfaces/i_collapsible_toolbox_item.js';
|
|
12
|
+
import type { IFocusableTree } from '../interfaces/i_focusable_tree.js';
|
|
12
13
|
import type { IToolbox } from '../interfaces/i_toolbox.js';
|
|
13
14
|
import type { IToolboxItem } from '../interfaces/i_toolbox_item.js';
|
|
14
15
|
import type * as toolbox from '../utils/toolbox.js';
|
|
@@ -94,5 +95,15 @@ export declare class ToolboxItem implements IToolboxItem {
|
|
|
94
95
|
* @param _isVisible True if category should be visible.
|
|
95
96
|
*/
|
|
96
97
|
setVisible_(_isVisible: boolean): void;
|
|
98
|
+
/** See IFocusableNode.getFocusableElement. */
|
|
99
|
+
getFocusableElement(): HTMLElement | SVGElement;
|
|
100
|
+
/** See IFocusableNode.getFocusableTree. */
|
|
101
|
+
getFocusableTree(): IFocusableTree;
|
|
102
|
+
/** See IFocusableNode.onNodeFocus. */
|
|
103
|
+
onNodeFocus(): void;
|
|
104
|
+
/** See IFocusableNode.onNodeBlur. */
|
|
105
|
+
onNodeBlur(): void;
|
|
106
|
+
/** See IFocusableNode.canBeFocused. */
|
|
107
|
+
canBeFocused(): boolean;
|
|
97
108
|
}
|
|
98
109
|
//# sourceMappingURL=toolbox_item.d.ts.map
|
package/core/utils/aria.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare enum Role {
|
|
|
20
20
|
ROW = "row",
|
|
21
21
|
TREE = "tree",
|
|
22
22
|
TREEITEM = "treeitem",
|
|
23
|
-
SEPARATOR = "separator"
|
|
23
|
+
SEPARATOR = "separator",
|
|
24
|
+
STATUS = "status"
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* ARIA states and properties.
|
|
@@ -41,7 +42,9 @@ export declare enum State {
|
|
|
41
42
|
SELECTED = "selected",
|
|
42
43
|
SETSIZE = "setsize",
|
|
43
44
|
VALUEMAX = "valuemax",
|
|
44
|
-
VALUEMIN = "valuemin"
|
|
45
|
+
VALUEMIN = "valuemin",
|
|
46
|
+
LIVE = "live",
|
|
47
|
+
HIDDEN = "hidden"
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Sets the role of an element.
|
package/core/utils/object.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Complete a deep merge of all members of a source object with a target object.
|
|
8
8
|
*
|
|
9
|
+
* N.B. This is not a very sophisticated merge algorithm and does not
|
|
10
|
+
* handle complex cases. Use with caution.
|
|
11
|
+
*
|
|
9
12
|
* @param target Target.
|
|
10
13
|
* @param source Source.
|
|
11
14
|
* @returns The resulting object.
|
package/core/variable_map.d.ts
CHANGED
|
@@ -21,14 +21,19 @@ import type { Workspace } from './workspace.js';
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class VariableMap implements IVariableMap<IVariableModel<IVariableState>> {
|
|
23
23
|
workspace: Workspace;
|
|
24
|
+
potentialMap: boolean;
|
|
24
25
|
/**
|
|
25
26
|
* A map from variable type to map of IDs to variables. The maps contain
|
|
26
27
|
* all of the named variables in the workspace, including variables that are
|
|
27
28
|
* not currently in use.
|
|
28
29
|
*/
|
|
29
30
|
private variableMap;
|
|
30
|
-
/**
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* @param workspace The workspace this map belongs to.
|
|
33
|
+
* @param potentialMap True if this holds variables that don't exist in the
|
|
34
|
+
* workspace yet.
|
|
35
|
+
*/
|
|
36
|
+
constructor(workspace: Workspace, potentialMap?: boolean);
|
|
32
37
|
/** Clear the variable map. Fires events for every deletion. */
|
|
33
38
|
clear(): void;
|
|
34
39
|
/**
|
|
@@ -44,7 +49,7 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
44
49
|
* Rename a variable by updating its name in the variable map. Identify the
|
|
45
50
|
* variable to rename with the given ID.
|
|
46
51
|
*
|
|
47
|
-
* @deprecated v12
|
|
52
|
+
* @deprecated v12: use VariableMap.renameVariable.
|
|
48
53
|
* @param id ID of the variable to rename.
|
|
49
54
|
* @param newName New variable name.
|
|
50
55
|
*/
|
|
@@ -98,7 +103,7 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
98
103
|
* Delete a variables by the passed in ID and all of its uses from this
|
|
99
104
|
* workspace. May prompt the user for confirmation.
|
|
100
105
|
*
|
|
101
|
-
* @deprecated v12
|
|
106
|
+
* @deprecated v12: use Blockly.Variables.deleteVariable.
|
|
102
107
|
* @param id ID of variable to delete.
|
|
103
108
|
*/
|
|
104
109
|
deleteVariableById(id: string): void;
|
|
@@ -143,14 +148,14 @@ export declare class VariableMap implements IVariableMap<IVariableModel<IVariabl
|
|
|
143
148
|
/**
|
|
144
149
|
* Returns all of the variable names of all types.
|
|
145
150
|
*
|
|
146
|
-
* @deprecated v12
|
|
151
|
+
* @deprecated v12: use Blockly.Variables.getAllVariables.
|
|
147
152
|
* @returns All of the variable names of all types.
|
|
148
153
|
*/
|
|
149
154
|
getAllVariableNames(): string[];
|
|
150
155
|
/**
|
|
151
156
|
* Find all the uses of a named variable.
|
|
152
157
|
*
|
|
153
|
-
* @deprecated v12
|
|
158
|
+
* @deprecated v12: use Blockly.Variables.getVariableUsesById.
|
|
154
159
|
* @param id ID of the variable to find.
|
|
155
160
|
* @returns Array of block usages.
|
|
156
161
|
*/
|
package/core/variables.d.ts
CHANGED
|
@@ -19,8 +19,9 @@ export declare const CATEGORY_NAME = "VARIABLE";
|
|
|
19
19
|
/**
|
|
20
20
|
* Find all user-created variables that are in use in the workspace.
|
|
21
21
|
* For use by generators.
|
|
22
|
+
*
|
|
22
23
|
* To get a list of all variables on a workspace, including unused variables,
|
|
23
|
-
* call
|
|
24
|
+
* call getAllVariables.
|
|
24
25
|
*
|
|
25
26
|
* @param ws The workspace to search for variables.
|
|
26
27
|
* @returns Array of variable models.
|
|
@@ -28,6 +29,7 @@ export declare const CATEGORY_NAME = "VARIABLE";
|
|
|
28
29
|
export declare function allUsedVarModels(ws: Workspace): IVariableModel<IVariableState>[];
|
|
29
30
|
/**
|
|
30
31
|
* Find all developer variables used by blocks in the workspace.
|
|
32
|
+
*
|
|
31
33
|
* Developer variables are never shown to the user, but are declared as global
|
|
32
34
|
* variables in the generated code.
|
|
33
35
|
* To declare developer variables, define the getDeveloperVariables function on
|
package/core/workspace.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import type { Block } from './block.js';
|
|
|
13
13
|
import { WorkspaceComment } from './comments/workspace_comment.js';
|
|
14
14
|
import type { ConnectionDB } from './connection_db.js';
|
|
15
15
|
import type { Abstract } from './events/events_abstract.js';
|
|
16
|
-
import type { IASTNodeLocation } from './interfaces/i_ast_node_location.js';
|
|
17
16
|
import type { IConnectionChecker } from './interfaces/i_connection_checker.js';
|
|
18
17
|
import { IProcedureMap } from './interfaces/i_procedure_map.js';
|
|
19
18
|
import type { IVariableMap } from './interfaces/i_variable_map.js';
|
|
@@ -24,7 +23,7 @@ import type * as toolbox from './utils/toolbox.js';
|
|
|
24
23
|
* Class for a workspace. This is a data structure that contains blocks.
|
|
25
24
|
* There is no UI, and can be created headlessly.
|
|
26
25
|
*/
|
|
27
|
-
export declare class Workspace
|
|
26
|
+
export declare class Workspace {
|
|
28
27
|
/**
|
|
29
28
|
* Angle away from the horizontal to sweep for blocks. Order of execution is
|
|
30
29
|
* generally top to bottom, but a small angle changes the scan to give a bit
|
|
@@ -184,9 +183,10 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
184
183
|
/** Dispose of all blocks and comments in workspace. */
|
|
185
184
|
clear(): void;
|
|
186
185
|
/**
|
|
187
|
-
*
|
|
186
|
+
* Rename a variable by updating its name in the variable
|
|
188
187
|
* map. Identify the variable to rename with the given ID.
|
|
189
188
|
*
|
|
189
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().renameVariable
|
|
190
190
|
* @param id ID of the variable to rename.
|
|
191
191
|
* @param newName New variable name.
|
|
192
192
|
*/
|
|
@@ -194,7 +194,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
194
194
|
/**
|
|
195
195
|
* Create a variable with a given name, optional type, and optional ID.
|
|
196
196
|
*
|
|
197
|
-
* @deprecated v12
|
|
197
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().createVariable.
|
|
198
198
|
* @param name The name of the variable. This must be unique across variables
|
|
199
199
|
* and procedures.
|
|
200
200
|
* @param opt_type The type of the variable like 'int' or 'string'.
|
|
@@ -207,7 +207,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
207
207
|
/**
|
|
208
208
|
* Find all the uses of the given variable, which is identified by ID.
|
|
209
209
|
*
|
|
210
|
-
* @deprecated v12
|
|
210
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariableUsesById
|
|
211
211
|
* @param id ID of the variable to find.
|
|
212
212
|
* @returns Array of block usages.
|
|
213
213
|
*/
|
|
@@ -216,7 +216,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
216
216
|
* Delete a variables by the passed in ID and all of its uses from this
|
|
217
217
|
* workspace. May prompt the user for confirmation.
|
|
218
218
|
*
|
|
219
|
-
* @deprecated v12
|
|
219
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().deleteVariable.
|
|
220
220
|
* @param id ID of variable to delete.
|
|
221
221
|
*/
|
|
222
222
|
deleteVariableById(id: string): void;
|
|
@@ -224,7 +224,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
224
224
|
* Find the variable by the given name and return it. Return null if not
|
|
225
225
|
* found.
|
|
226
226
|
*
|
|
227
|
-
* @deprecated v12
|
|
227
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariable.
|
|
228
228
|
* @param name The name to check for.
|
|
229
229
|
* @param opt_type The type of the variable. If not provided it defaults to
|
|
230
230
|
* the empty string, which is a specific type.
|
|
@@ -234,7 +234,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
234
234
|
/**
|
|
235
235
|
* Find the variable by the given ID and return it. Return null if not found.
|
|
236
236
|
*
|
|
237
|
-
* @deprecated v12
|
|
237
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariableById.
|
|
238
238
|
* @param id The ID to check for.
|
|
239
239
|
* @returns The variable with the given ID.
|
|
240
240
|
*/
|
|
@@ -243,7 +243,7 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
243
243
|
* Find the variable with the specified type. If type is null, return list of
|
|
244
244
|
* variables with empty string type.
|
|
245
245
|
*
|
|
246
|
-
* @deprecated v12
|
|
246
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getVariablesOfType.
|
|
247
247
|
* @param type Type of the variables to find.
|
|
248
248
|
* @returns The sought after variables of the passed in type. An empty array
|
|
249
249
|
* if none are found.
|
|
@@ -252,14 +252,14 @@ export declare class Workspace implements IASTNodeLocation {
|
|
|
252
252
|
/**
|
|
253
253
|
* Return all variables of all types.
|
|
254
254
|
*
|
|
255
|
-
* @deprecated v12
|
|
255
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getAllVariables.
|
|
256
256
|
* @returns List of variable models.
|
|
257
257
|
*/
|
|
258
258
|
getAllVariables(): IVariableModel<IVariableState>[];
|
|
259
259
|
/**
|
|
260
260
|
* Returns all variable names of all types.
|
|
261
261
|
*
|
|
262
|
-
* @deprecated v12
|
|
262
|
+
* @deprecated v12: use Blockly.Workspace.getVariableMap().getAllVariables.
|
|
263
263
|
* @returns List of all variable names of all types.
|
|
264
264
|
*/
|
|
265
265
|
getAllVariableNames(): string[];
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Methods for dragging a workspace visually.
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
6
11
|
import { Coordinate } from './utils/coordinate.js';
|
|
7
12
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
8
13
|
/**
|