blockly 12.0.0-beta.4 → 12.0.0-beta.5
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 +552 -494
- package/blockly.mjs +10 -0
- package/blockly_compressed.js +517 -492
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +2 -2
- package/blocks_compressed.js.map +1 -1
- package/core/block_svg.d.ts +36 -20
- package/core/blockly.d.ts +13 -1
- package/core/connection.d.ts +2 -0
- package/core/contextmenu_registry.d.ts +11 -9
- package/core/dialog.d.ts +36 -16
- package/core/field.d.ts +29 -31
- package/core/field_checkbox.d.ts +9 -0
- package/core/field_dropdown.d.ts +19 -2
- package/core/field_image.d.ts +9 -0
- package/core/field_label.d.ts +9 -0
- package/core/field_number.d.ts +9 -0
- package/core/field_textinput.d.ts +9 -0
- package/core/flyout_base.d.ts +23 -1
- package/core/flyout_button.d.ts +30 -7
- package/core/flyout_item.d.ts +3 -9
- package/core/flyout_separator.d.ts +18 -1
- package/core/focus_manager.d.ts +82 -14
- package/core/interfaces/i_ast_node_location_svg.d.ts +0 -12
- package/core/interfaces/i_autohideable.d.ts +2 -0
- package/core/interfaces/i_flyout.d.ts +2 -1
- package/core/interfaces/i_focusable_node.d.ts +31 -2
- package/core/interfaces/i_focusable_tree.d.ts +67 -0
- package/core/interfaces/i_navigable.d.ts +30 -0
- package/core/interfaces/i_navigation_policy.d.ts +42 -0
- package/core/interfaces/i_toolbox.d.ts +2 -1
- package/core/interfaces/i_toolbox_item.d.ts +2 -1
- package/core/keyboard_nav/ast_node.d.ts +1 -113
- package/core/keyboard_nav/block_navigation_policy.d.ts +56 -0
- package/core/keyboard_nav/connection_navigation_policy.d.ts +53 -0
- package/core/keyboard_nav/field_navigation_policy.d.ts +42 -0
- package/core/keyboard_nav/flyout_button_navigation_policy.d.ts +42 -0
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +51 -0
- package/core/keyboard_nav/flyout_separator_navigation_policy.d.ts +19 -0
- package/core/keyboard_nav/line_cursor.d.ts +32 -103
- package/core/keyboard_nav/marker.d.ts +20 -29
- package/core/keyboard_nav/workspace_navigation_policy.d.ts +42 -0
- package/core/marker_manager.d.ts +0 -26
- package/core/navigator.d.ts +65 -0
- package/core/rendered_connection.d.ts +35 -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 +23 -1
- package/core/toolbox/toolbox_item.d.ts +9 -0
- package/core/utils/aria.d.ts +5 -2
- package/core/variable_map.d.ts +4 -4
- package/core/variables.d.ts +3 -1
- package/core/workspace.d.ts +10 -9
- package/core/workspace_svg.d.ts +103 -47
- package/index.mjs +10 -0
- 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/renderers/common/marker_svg.d.ts +0 -256
- package/core/renderers/zelos/marker_svg.d.ts +0 -49
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import '../../events/events_marker_move.js';
|
|
7
|
-
import type { IASTNodeLocationSvg } from '../../interfaces/i_ast_node_location_svg.js';
|
|
8
|
-
import { ASTNode } from '../../keyboard_nav/ast_node.js';
|
|
9
|
-
import type { Marker } from '../../keyboard_nav/marker.js';
|
|
10
|
-
import type { RenderedConnection } from '../../rendered_connection.js';
|
|
11
|
-
import type { WorkspaceSvg } from '../../workspace_svg.js';
|
|
12
|
-
import type { ConstantProvider, Notch, PuzzleTab } from './constants.js';
|
|
13
|
-
/**
|
|
14
|
-
* Class for a marker, containing methods for graphically rendering a marker as
|
|
15
|
-
* SVG.
|
|
16
|
-
*/
|
|
17
|
-
export declare class MarkerSvg {
|
|
18
|
-
protected readonly workspace: WorkspaceSvg;
|
|
19
|
-
protected readonly marker: Marker;
|
|
20
|
-
/**
|
|
21
|
-
* The workspace, field, or block that the marker SVG element should be
|
|
22
|
-
* attached to.
|
|
23
|
-
*/
|
|
24
|
-
protected parent: IASTNodeLocationSvg | null;
|
|
25
|
-
/** The current SVG element for the marker. */
|
|
26
|
-
currentMarkerSvg: SVGElement | null;
|
|
27
|
-
colour_: string;
|
|
28
|
-
/** The root SVG group containing the marker. */
|
|
29
|
-
protected markerSvg_: SVGGElement | null;
|
|
30
|
-
protected svgGroup_: SVGGElement | null;
|
|
31
|
-
protected markerBlock_: SVGPathElement | null;
|
|
32
|
-
protected markerInput_: SVGPathElement | null;
|
|
33
|
-
protected markerSvgLine_: SVGRectElement | null;
|
|
34
|
-
protected markerSvgRect_: SVGRectElement | null;
|
|
35
|
-
/** The constants necessary to draw the marker. */
|
|
36
|
-
protected constants_: ConstantProvider;
|
|
37
|
-
/**
|
|
38
|
-
* @param workspace The workspace the marker belongs to.
|
|
39
|
-
* @param constants The constants for the renderer.
|
|
40
|
-
* @param marker The marker to draw.
|
|
41
|
-
*/
|
|
42
|
-
constructor(workspace: WorkspaceSvg, constants: ConstantProvider, marker: Marker);
|
|
43
|
-
/**
|
|
44
|
-
* Return the root node of the SVG or null if none exists.
|
|
45
|
-
*
|
|
46
|
-
* @returns The root SVG node.
|
|
47
|
-
*/
|
|
48
|
-
getSvgRoot(): SVGElement | null;
|
|
49
|
-
/**
|
|
50
|
-
* Get the marker.
|
|
51
|
-
*
|
|
52
|
-
* @returns The marker to draw for.
|
|
53
|
-
*/
|
|
54
|
-
getMarker(): Marker;
|
|
55
|
-
/**
|
|
56
|
-
* True if the marker should be drawn as a cursor, false otherwise.
|
|
57
|
-
* A cursor is drawn as a flashing line. A marker is drawn as a solid line.
|
|
58
|
-
*
|
|
59
|
-
* @returns True if the marker is a cursor, false otherwise.
|
|
60
|
-
*/
|
|
61
|
-
isCursor(): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Create the DOM element for the marker.
|
|
64
|
-
*
|
|
65
|
-
* @returns The marker controls SVG group.
|
|
66
|
-
*/
|
|
67
|
-
createDom(): SVGElement;
|
|
68
|
-
/**
|
|
69
|
-
* Attaches the SVG root of the marker to the SVG group of the parent.
|
|
70
|
-
*
|
|
71
|
-
* @param newParent The workspace, field, or block that the marker SVG element
|
|
72
|
-
* should be attached to.
|
|
73
|
-
*/
|
|
74
|
-
protected setParent_(newParent: IASTNodeLocationSvg): void;
|
|
75
|
-
/**
|
|
76
|
-
* Update the marker.
|
|
77
|
-
*
|
|
78
|
-
* @param oldNode The previous node the marker was on or null.
|
|
79
|
-
* @param curNode The node that we want to draw the marker for.
|
|
80
|
-
*/
|
|
81
|
-
draw(oldNode: ASTNode | null, curNode: ASTNode | null): void;
|
|
82
|
-
/**
|
|
83
|
-
* Update the marker's visible state based on the type of curNode..
|
|
84
|
-
*
|
|
85
|
-
* @param curNode The node that we want to draw the marker for.
|
|
86
|
-
*/
|
|
87
|
-
protected showAtLocation_(curNode: ASTNode): void;
|
|
88
|
-
/**************************
|
|
89
|
-
* Display
|
|
90
|
-
**************************/
|
|
91
|
-
/**
|
|
92
|
-
* Show the marker as a combination of the previous connection and block,
|
|
93
|
-
* the output connection and block, or just the block.
|
|
94
|
-
*
|
|
95
|
-
* @param curNode The node to draw the marker for.
|
|
96
|
-
*/
|
|
97
|
-
protected showWithBlockPrevOutput(curNode: ASTNode): void;
|
|
98
|
-
/**
|
|
99
|
-
* Position and display the marker for a block.
|
|
100
|
-
*
|
|
101
|
-
* @param curNode The node to draw the marker for.
|
|
102
|
-
*/
|
|
103
|
-
protected showWithBlock_(curNode: ASTNode): void;
|
|
104
|
-
/**
|
|
105
|
-
* Position and display the marker for a previous connection.
|
|
106
|
-
*
|
|
107
|
-
* @param curNode The node to draw the marker for.
|
|
108
|
-
*/
|
|
109
|
-
protected showWithPrevious_(curNode: ASTNode): void;
|
|
110
|
-
/**
|
|
111
|
-
* Position and display the marker for an output connection.
|
|
112
|
-
*
|
|
113
|
-
* @param curNode The node to draw the marker for.
|
|
114
|
-
*/
|
|
115
|
-
protected showWithOutput_(curNode: ASTNode): void;
|
|
116
|
-
/**
|
|
117
|
-
* Position and display the marker for a workspace coordinate.
|
|
118
|
-
* This is a horizontal line.
|
|
119
|
-
*
|
|
120
|
-
* @param curNode The node to draw the marker for.
|
|
121
|
-
*/
|
|
122
|
-
protected showWithCoordinates_(curNode: ASTNode): void;
|
|
123
|
-
/**
|
|
124
|
-
* Position and display the marker for a field.
|
|
125
|
-
* This is a box around the field.
|
|
126
|
-
*
|
|
127
|
-
* @param curNode The node to draw the marker for.
|
|
128
|
-
*/
|
|
129
|
-
protected showWithField_(curNode: ASTNode): void;
|
|
130
|
-
/**
|
|
131
|
-
* Position and display the marker for an input.
|
|
132
|
-
* This is a puzzle piece.
|
|
133
|
-
*
|
|
134
|
-
* @param curNode The node to draw the marker for.
|
|
135
|
-
*/
|
|
136
|
-
protected showWithInput_(curNode: ASTNode): void;
|
|
137
|
-
/**
|
|
138
|
-
* Position and display the marker for a next connection.
|
|
139
|
-
* This is a horizontal line.
|
|
140
|
-
*
|
|
141
|
-
* @param curNode The node to draw the marker for.
|
|
142
|
-
*/
|
|
143
|
-
protected showWithNext_(curNode: ASTNode): void;
|
|
144
|
-
/**
|
|
145
|
-
* Position and display the marker for a stack.
|
|
146
|
-
* This is a box with extra padding around the entire stack of blocks.
|
|
147
|
-
*
|
|
148
|
-
* @param curNode The node to draw the marker for.
|
|
149
|
-
*/
|
|
150
|
-
protected showWithStack_(curNode: ASTNode): void;
|
|
151
|
-
/**
|
|
152
|
-
* Position and display the marker for a flyout button.
|
|
153
|
-
* This is a box with extra padding around the button.
|
|
154
|
-
*
|
|
155
|
-
* @param curNode The node to draw the marker for.
|
|
156
|
-
*/
|
|
157
|
-
protected showWithButton_(curNode: ASTNode): void;
|
|
158
|
-
/** Show the current marker. */
|
|
159
|
-
protected showCurrent_(): void;
|
|
160
|
-
/**************************
|
|
161
|
-
* Position
|
|
162
|
-
**************************/
|
|
163
|
-
/**
|
|
164
|
-
* Position the marker for a block.
|
|
165
|
-
* Displays an outline of the top half of a rectangle around a block.
|
|
166
|
-
*
|
|
167
|
-
* @param width The width of the block.
|
|
168
|
-
* @param markerOffset The extra padding for around the block.
|
|
169
|
-
* @param markerHeight The height of the marker.
|
|
170
|
-
*/
|
|
171
|
-
protected positionBlock_(width: number, markerOffset: number, markerHeight: number): void;
|
|
172
|
-
/**
|
|
173
|
-
* Position the marker for an input connection.
|
|
174
|
-
* Displays a filled in puzzle piece.
|
|
175
|
-
*
|
|
176
|
-
* @param connection The connection to position marker around.
|
|
177
|
-
*/
|
|
178
|
-
protected positionInput_(connection: RenderedConnection): void;
|
|
179
|
-
/**
|
|
180
|
-
* Move and show the marker at the specified coordinate in workspace units.
|
|
181
|
-
* Displays a horizontal line.
|
|
182
|
-
*
|
|
183
|
-
* @param x The new x, in workspace units.
|
|
184
|
-
* @param y The new y, in workspace units.
|
|
185
|
-
* @param width The new width, in workspace units.
|
|
186
|
-
*/
|
|
187
|
-
protected positionLine_(x: number, y: number, width: number): void;
|
|
188
|
-
/**
|
|
189
|
-
* Position the marker for an output connection.
|
|
190
|
-
* Displays a puzzle outline and the top and bottom path.
|
|
191
|
-
*
|
|
192
|
-
* @param width The width of the block.
|
|
193
|
-
* @param height The height of the block.
|
|
194
|
-
* @param connectionShape The shape object for the connection.
|
|
195
|
-
*/
|
|
196
|
-
protected positionOutput_(width: number, height: number, connectionShape: PuzzleTab): void;
|
|
197
|
-
/**
|
|
198
|
-
* Position the marker for a previous connection.
|
|
199
|
-
* Displays a half rectangle with a notch in the top to represent the previous
|
|
200
|
-
* connection.
|
|
201
|
-
*
|
|
202
|
-
* @param width The width of the block.
|
|
203
|
-
* @param markerOffset The offset of the marker from around the block.
|
|
204
|
-
* @param markerHeight The height of the marker.
|
|
205
|
-
* @param connectionShape The shape object for the connection.
|
|
206
|
-
*/
|
|
207
|
-
protected positionPrevious_(width: number, markerOffset: number, markerHeight: number, connectionShape: Notch): void;
|
|
208
|
-
/**
|
|
209
|
-
* Move and show the marker at the specified coordinate in workspace units.
|
|
210
|
-
* Displays a filled in rectangle.
|
|
211
|
-
*
|
|
212
|
-
* @param x The new x, in workspace units.
|
|
213
|
-
* @param y The new y, in workspace units.
|
|
214
|
-
* @param width The new width, in workspace units.
|
|
215
|
-
* @param height The new height, in workspace units.
|
|
216
|
-
*/
|
|
217
|
-
protected positionRect_(x: number, y: number, width: number, height: number): void;
|
|
218
|
-
/**
|
|
219
|
-
* Flip the SVG paths in RTL.
|
|
220
|
-
*
|
|
221
|
-
* @param markerSvg The marker that we want to flip.
|
|
222
|
-
*/
|
|
223
|
-
private flipRtl;
|
|
224
|
-
/** Hide the marker. */
|
|
225
|
-
hide(): void;
|
|
226
|
-
/**
|
|
227
|
-
* Fire event for the marker or marker.
|
|
228
|
-
*
|
|
229
|
-
* @param oldNode The old node the marker used to be on.
|
|
230
|
-
* @param curNode The new node the marker is currently on.
|
|
231
|
-
*/
|
|
232
|
-
protected fireMarkerEvent(oldNode: ASTNode | null, curNode: ASTNode): void;
|
|
233
|
-
/**
|
|
234
|
-
* Get the properties to make a marker blink.
|
|
235
|
-
*
|
|
236
|
-
* @returns The object holding attributes to make the marker blink.
|
|
237
|
-
*/
|
|
238
|
-
protected getBlinkProperties_(): {
|
|
239
|
-
[key: string]: string;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Create the marker SVG.
|
|
243
|
-
*
|
|
244
|
-
* @returns The SVG node created.
|
|
245
|
-
*/
|
|
246
|
-
protected createDomInternal_(): Element;
|
|
247
|
-
/**
|
|
248
|
-
* Apply the marker's colour.
|
|
249
|
-
*
|
|
250
|
-
* @param _curNode The node that we want to draw the marker for.
|
|
251
|
-
*/
|
|
252
|
-
protected applyColour_(_curNode: ASTNode): void;
|
|
253
|
-
/** Dispose of this marker. */
|
|
254
|
-
dispose(): void;
|
|
255
|
-
}
|
|
256
|
-
//# sourceMappingURL=marker_svg.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { ASTNode } from '../../keyboard_nav/ast_node.js';
|
|
7
|
-
import type { Marker } from '../../keyboard_nav/marker.js';
|
|
8
|
-
import type { WorkspaceSvg } from '../../workspace_svg.js';
|
|
9
|
-
import type { ConstantProvider as BaseConstantProvider } from '../common/constants.js';
|
|
10
|
-
import { MarkerSvg as BaseMarkerSvg } from '../common/marker_svg.js';
|
|
11
|
-
import type { ConstantProvider as ZelosConstantProvider } from './constants.js';
|
|
12
|
-
/**
|
|
13
|
-
* Class to draw a marker.
|
|
14
|
-
*/
|
|
15
|
-
export declare class MarkerSvg extends BaseMarkerSvg {
|
|
16
|
-
constants_: ZelosConstantProvider;
|
|
17
|
-
private markerCircle;
|
|
18
|
-
/**
|
|
19
|
-
* @param workspace The workspace the marker belongs to.
|
|
20
|
-
* @param constants The constants for the renderer.
|
|
21
|
-
* @param marker The marker to draw.
|
|
22
|
-
*/
|
|
23
|
-
constructor(workspace: WorkspaceSvg, constants: BaseConstantProvider, marker: Marker);
|
|
24
|
-
/**
|
|
25
|
-
* Position and display the marker for an input or an output connection.
|
|
26
|
-
*
|
|
27
|
-
* @param curNode The node to draw the marker for.
|
|
28
|
-
*/
|
|
29
|
-
private showWithInputOutput;
|
|
30
|
-
showWithOutput_(curNode: ASTNode): void;
|
|
31
|
-
showWithInput_(curNode: ASTNode): void;
|
|
32
|
-
/**
|
|
33
|
-
* Draw a rectangle around the block.
|
|
34
|
-
*
|
|
35
|
-
* @param curNode The current node of the marker.
|
|
36
|
-
*/
|
|
37
|
-
showWithBlock_(curNode: ASTNode): void;
|
|
38
|
-
/**
|
|
39
|
-
* Position the circle we use for input and output connections.
|
|
40
|
-
*
|
|
41
|
-
* @param x The x position of the circle.
|
|
42
|
-
* @param y The y position of the circle.
|
|
43
|
-
*/
|
|
44
|
-
private positionCircle;
|
|
45
|
-
hide(): void;
|
|
46
|
-
createDomInternal_(): SVGGElement;
|
|
47
|
-
applyColour_(curNode: ASTNode): void;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=marker_svg.d.ts.map
|