blockly 13.0.0-beta.0 → 13.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blockly.min.js +2092 -1318
- package/blockly.mjs +1 -1
- package/blockly_compressed.js +1887 -1190
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +71 -71
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +18 -0
- package/core/block_aria_composer.d.ts +119 -0
- package/core/block_svg.d.ts +21 -1
- package/core/blockly.d.ts +1 -1
- package/core/bubbles/bubble.d.ts +39 -0
- package/core/bubbles/mini_workspace_bubble.d.ts +4 -1
- package/core/bubbles/text_bubble.d.ts +4 -1
- package/core/dragging/block_drag_strategy.d.ts +45 -3
- package/core/field.d.ts +15 -17
- package/core/field_checkbox.d.ts +27 -0
- package/core/field_dropdown.d.ts +51 -1
- package/core/field_image.d.ts +24 -0
- package/core/field_input.d.ts +23 -0
- package/core/field_number.d.ts +10 -0
- package/core/field_textinput.d.ts +10 -0
- package/core/field_variable.d.ts +9 -0
- package/core/flyout_base.d.ts +10 -0
- package/core/focus_manager.d.ts +47 -2
- package/core/inputs/input.d.ts +15 -0
- package/core/interfaces/i_flyout_inflater.d.ts +9 -0
- package/core/interfaces/i_focusable_node.d.ts +3 -1
- package/core/interfaces/i_json_block_definition.d.ts +1 -0
- package/core/keyboard_nav/keyboard_mover.d.ts +16 -5
- package/core/keyboard_nav/navigation_policies/bubble_navigation_policy.d.ts +63 -0
- package/core/keyboard_nav/navigation_policies/icon_navigation_policy.d.ts +2 -2
- package/core/keyboard_nav/navigators/flyout_navigator.d.ts +1 -1
- package/core/menu.d.ts +3 -0
- package/core/menuitem.d.ts +8 -1
- package/core/shortcut_items.d.ts +16 -1
- package/core/shortcut_registry.d.ts +6 -0
- package/core/toolbox/toolbox.d.ts +5 -11
- package/core/tooltip.d.ts +10 -0
- package/core/trashcan.d.ts +23 -38
- package/core/utils/aria.d.ts +16 -62
- package/core/utils/dom.d.ts +1 -1
- package/core/utils/shortcut_formatting.d.ts +5 -7
- package/core/variables.d.ts +1 -1
- package/core/workspace.d.ts +5 -1
- package/core/workspace_svg.d.ts +8 -0
- package/core/zoom_controls.d.ts +43 -50
- package/dart_compressed.js +62 -62
- package/dart_compressed.js.map +1 -1
- package/index.mjs +1 -1
- package/javascript_compressed.js +55 -55
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +50 -50
- package/lua_compressed.js.map +1 -1
- package/media/drop.mp3 +0 -0
- package/msg/ab.js +78 -1
- package/msg/ab.mjs +78 -1
- package/msg/ace.js +79 -2
- package/msg/ace.mjs +78 -1
- package/msg/af.js +78 -1
- package/msg/af.mjs +78 -1
- package/msg/am.js +79 -2
- package/msg/am.mjs +78 -1
- package/msg/ar.js +101 -24
- package/msg/ar.mjs +78 -1
- package/msg/ast.js +79 -2
- package/msg/ast.mjs +78 -1
- package/msg/az.js +79 -2
- package/msg/az.mjs +78 -1
- package/msg/ba.js +78 -1
- package/msg/ba.mjs +78 -1
- package/msg/bcc.js +78 -1
- package/msg/bcc.mjs +78 -1
- package/msg/be-tarask.js +112 -35
- package/msg/be-tarask.mjs +78 -1
- package/msg/be.js +79 -2
- package/msg/be.mjs +78 -1
- package/msg/bg.js +78 -1
- package/msg/bg.mjs +78 -1
- package/msg/bn.js +79 -2
- package/msg/bn.mjs +78 -1
- package/msg/br.js +79 -2
- package/msg/br.mjs +78 -1
- package/msg/bs.js +78 -1
- package/msg/bs.mjs +78 -1
- package/msg/ca.js +78 -1
- package/msg/ca.mjs +78 -1
- package/msg/ce.js +78 -1
- package/msg/ce.mjs +78 -1
- package/msg/cs.js +86 -9
- package/msg/cs.mjs +78 -1
- package/msg/da.js +102 -25
- package/msg/da.mjs +78 -1
- package/msg/de.js +78 -1
- package/msg/de.mjs +78 -1
- package/msg/diq.js +80 -3
- package/msg/diq.mjs +78 -1
- package/msg/dtp.js +78 -1
- package/msg/dtp.mjs +78 -1
- package/msg/dty.js +78 -1
- package/msg/dty.mjs +78 -1
- package/msg/ee.js +78 -1
- package/msg/ee.mjs +78 -1
- package/msg/el.js +109 -32
- package/msg/el.mjs +78 -1
- package/msg/en-gb.js +78 -1
- package/msg/en-gb.mjs +78 -1
- package/msg/en.js +79 -2
- package/msg/en.mjs +78 -1
- package/msg/eo.js +78 -1
- package/msg/eo.mjs +78 -1
- package/msg/es.js +88 -11
- package/msg/es.mjs +78 -1
- package/msg/et.js +78 -1
- package/msg/et.mjs +78 -1
- package/msg/eu.js +78 -1
- package/msg/eu.mjs +78 -1
- package/msg/fa.js +79 -2
- package/msg/fa.mjs +78 -1
- package/msg/fi.js +97 -20
- package/msg/fi.mjs +78 -1
- package/msg/fo.js +78 -1
- package/msg/fo.mjs +78 -1
- package/msg/fr.js +101 -24
- package/msg/fr.mjs +78 -1
- package/msg/frr.js +79 -2
- package/msg/frr.mjs +78 -1
- package/msg/ga.js +550 -0
- package/msg/{cdo.mjs → ga.mjs} +80 -3
- package/msg/gl.js +101 -24
- package/msg/gl.mjs +78 -1
- package/msg/gn.js +79 -2
- package/msg/gn.mjs +78 -1
- package/msg/gor.js +78 -1
- package/msg/gor.mjs +78 -1
- package/msg/ha.js +78 -1
- package/msg/ha.mjs +78 -1
- package/msg/hak.js +79 -2
- package/msg/hak.mjs +78 -1
- package/msg/he.js +128 -51
- package/msg/he.mjs +78 -1
- package/msg/hi.js +78 -1
- package/msg/hi.mjs +78 -1
- package/msg/hr.js +78 -1
- package/msg/hr.mjs +78 -1
- package/msg/hrx.js +78 -1
- package/msg/hrx.mjs +78 -1
- package/msg/hsb.js +78 -1
- package/msg/hsb.mjs +78 -1
- package/msg/hu.js +80 -3
- package/msg/hu.mjs +78 -1
- package/msg/hy.js +78 -1
- package/msg/hy.mjs +78 -1
- package/msg/ia.js +101 -24
- package/msg/ia.mjs +78 -1
- package/msg/id.js +308 -231
- package/msg/id.mjs +78 -1
- package/msg/ig.js +86 -9
- package/msg/ig.mjs +78 -1
- package/msg/inh.js +78 -1
- package/msg/inh.mjs +78 -1
- package/msg/is.js +78 -1
- package/msg/is.mjs +78 -1
- package/msg/it.js +104 -27
- package/msg/it.mjs +78 -1
- package/msg/ja.js +101 -24
- package/msg/ja.mjs +78 -1
- package/msg/ka.js +80 -3
- package/msg/ka.mjs +78 -1
- package/msg/kab.js +87 -10
- package/msg/kab.mjs +78 -1
- package/msg/kbd-cyrl.js +79 -2
- package/msg/kbd-cyrl.mjs +78 -1
- package/msg/km.js +78 -1
- package/msg/km.mjs +78 -1
- package/msg/kn.js +78 -1
- package/msg/kn.mjs +78 -1
- package/msg/ko.js +103 -26
- package/msg/ko.mjs +78 -1
- package/msg/krc.js +550 -0
- package/msg/krc.mjs +531 -0
- package/msg/ksh.js +79 -2
- package/msg/ksh.mjs +78 -1
- package/msg/ku-latn.js +79 -2
- package/msg/ku-latn.mjs +78 -1
- package/msg/ky.js +80 -3
- package/msg/ky.mjs +78 -1
- package/msg/la.js +79 -2
- package/msg/la.mjs +78 -1
- package/msg/lb.js +89 -12
- package/msg/lb.mjs +78 -1
- package/msg/lki.js +78 -1
- package/msg/lki.mjs +78 -1
- package/msg/lo.js +78 -1
- package/msg/lo.mjs +78 -1
- package/msg/lrc.js +78 -1
- package/msg/lrc.mjs +78 -1
- package/msg/lt.js +79 -2
- package/msg/lt.mjs +78 -1
- package/msg/lv.js +89 -12
- package/msg/lv.mjs +78 -1
- package/msg/mg.js +78 -1
- package/msg/mg.mjs +78 -1
- package/msg/mk.js +78 -1
- package/msg/mk.mjs +78 -1
- package/msg/ml.js +78 -1
- package/msg/ml.mjs +78 -1
- package/msg/mnw.js +78 -1
- package/msg/mnw.mjs +78 -1
- package/msg/ms.js +87 -10
- package/msg/ms.mjs +78 -1
- package/msg/my.js +78 -1
- package/msg/my.mjs +78 -1
- package/msg/mzn.js +79 -2
- package/msg/mzn.mjs +78 -1
- package/msg/nb.js +78 -1
- package/msg/nb.mjs +78 -1
- package/msg/ne.js +87 -10
- package/msg/ne.mjs +78 -1
- package/msg/nl.js +101 -24
- package/msg/nl.mjs +78 -1
- package/msg/oc.js +78 -1
- package/msg/oc.mjs +78 -1
- package/msg/olo.js +79 -2
- package/msg/olo.mjs +78 -1
- package/msg/pa.js +87 -10
- package/msg/pa.mjs +78 -1
- package/msg/pl.js +101 -24
- package/msg/pl.mjs +78 -1
- package/msg/pms.js +101 -24
- package/msg/pms.mjs +78 -1
- package/msg/ps.js +96 -19
- package/msg/ps.mjs +78 -1
- package/msg/pt-br.js +101 -24
- package/msg/pt-br.mjs +78 -1
- package/msg/pt.js +101 -24
- package/msg/pt.mjs +78 -1
- package/msg/ro.js +110 -33
- package/msg/ro.mjs +78 -1
- package/msg/ru.js +101 -24
- package/msg/ru.mjs +78 -1
- package/msg/sc.js +78 -1
- package/msg/sc.mjs +78 -1
- package/msg/sco.js +79 -2
- package/msg/sco.mjs +78 -1
- package/msg/sd.js +78 -1
- package/msg/sd.mjs +78 -1
- package/msg/shn.js +78 -1
- package/msg/shn.mjs +78 -1
- package/msg/si.js +79 -2
- package/msg/si.mjs +78 -1
- package/msg/sk.js +79 -2
- package/msg/sk.mjs +78 -1
- package/msg/skr-arab.js +81 -4
- package/msg/skr-arab.mjs +78 -1
- package/msg/sl.js +102 -25
- package/msg/sl.mjs +78 -1
- package/msg/smn.js +80 -3
- package/msg/smn.mjs +78 -1
- package/msg/sq.js +87 -10
- package/msg/sq.mjs +78 -1
- package/msg/sr-latn.js +78 -1
- package/msg/sr-latn.mjs +78 -1
- package/msg/sr.js +78 -1
- package/msg/sr.mjs +78 -1
- package/msg/sv.js +101 -24
- package/msg/sv.mjs +78 -1
- package/msg/sw.js +79 -2
- package/msg/sw.mjs +78 -1
- package/msg/ta.js +97 -20
- package/msg/ta.mjs +78 -1
- package/msg/tcy.js +148 -71
- package/msg/tcy.mjs +78 -1
- package/msg/tdd.js +78 -1
- package/msg/tdd.mjs +78 -1
- package/msg/te.js +78 -1
- package/msg/te.mjs +78 -1
- package/msg/th.js +79 -2
- package/msg/th.mjs +78 -1
- package/msg/ti.js +78 -1
- package/msg/ti.mjs +78 -1
- package/msg/tl.js +78 -1
- package/msg/tl.mjs +78 -1
- package/msg/tlh.js +78 -1
- package/msg/tlh.mjs +78 -1
- package/msg/tr.js +101 -24
- package/msg/tr.mjs +78 -1
- package/msg/ug-arab.js +78 -1
- package/msg/ug-arab.mjs +78 -1
- package/msg/uk.js +78 -1
- package/msg/uk.mjs +78 -1
- package/msg/ur.js +78 -1
- package/msg/ur.mjs +78 -1
- package/msg/uz.js +93 -16
- package/msg/uz.mjs +78 -1
- package/msg/vi.js +102 -25
- package/msg/vi.mjs +78 -1
- package/msg/xmf.js +78 -1
- package/msg/xmf.mjs +78 -1
- package/msg/yo.js +78 -1
- package/msg/yo.mjs +78 -1
- package/msg/zgh.js +78 -1
- package/msg/zgh.mjs +78 -1
- package/msg/zh-hans.js +101 -24
- package/msg/zh-hans.mjs +78 -1
- package/msg/zh-hant.js +101 -24
- package/msg/zh-hant.mjs +78 -1
- package/package.json +4 -4
- package/php_compressed.js +54 -55
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +57 -57
- package/python_compressed.js.map +1 -1
- package/core/keyboard_nav/navigation_policies/block_comment_navigation_policy.d.ts +0 -63
- package/msg/cdo.js +0 -473
package/core/utils/aria.d.ts
CHANGED
|
@@ -97,19 +97,13 @@ export declare enum State {
|
|
|
97
97
|
*
|
|
98
98
|
* Value: one of {true, false}.
|
|
99
99
|
*/
|
|
100
|
-
ATOMIC = "
|
|
100
|
+
ATOMIC = "atomic",
|
|
101
101
|
/**
|
|
102
102
|
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-checked.
|
|
103
103
|
*
|
|
104
104
|
* Value: one of {true, false, mixed, undefined}.
|
|
105
105
|
*/
|
|
106
106
|
CHECKED = "checked",
|
|
107
|
-
/**
|
|
108
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-colcount.
|
|
109
|
-
*
|
|
110
|
-
* Value: an integer representing the number of columns in a grid.
|
|
111
|
-
*/
|
|
112
|
-
COLCOUNT = "colcount",
|
|
113
107
|
/**
|
|
114
108
|
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-controls.
|
|
115
109
|
*
|
|
@@ -170,72 +164,18 @@ export declare enum State {
|
|
|
170
164
|
* Value: one of {polite, assertive, off}.
|
|
171
165
|
*/
|
|
172
166
|
LIVE = "live",
|
|
173
|
-
/**
|
|
174
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-orientation.
|
|
175
|
-
*
|
|
176
|
-
* Value: one of {horizontal, vertical, undefined}.
|
|
177
|
-
*/
|
|
178
|
-
ORIENTATION = "orientation",
|
|
179
|
-
/**
|
|
180
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-posinset.
|
|
181
|
-
*
|
|
182
|
-
* Value: an integer representing the position of the element within a set of related elements.
|
|
183
|
-
*/
|
|
184
|
-
POSINSET = "posinset",
|
|
185
|
-
/**
|
|
186
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-pressed.
|
|
187
|
-
*
|
|
188
|
-
* Value: one of {true, false, mixed, undefined}.
|
|
189
|
-
*/
|
|
190
|
-
PRESSED = "pressed",
|
|
191
|
-
/**
|
|
192
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-readonly.
|
|
193
|
-
*
|
|
194
|
-
* Value: one of {true, false}.
|
|
195
|
-
*/
|
|
196
|
-
READONLY = "readonly",
|
|
197
|
-
/**
|
|
198
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-required.
|
|
199
|
-
*
|
|
200
|
-
* Value: one of {true, false}.
|
|
201
|
-
*/
|
|
202
|
-
REQUIRED = "required",
|
|
203
167
|
/**
|
|
204
168
|
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-roledescription.
|
|
205
169
|
*
|
|
206
170
|
* Value: a string.
|
|
207
171
|
*/
|
|
208
172
|
ROLEDESCRIPTION = "roledescription",
|
|
209
|
-
/**
|
|
210
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-rowcount.
|
|
211
|
-
*
|
|
212
|
-
* Value: an integer representing the number of rows in a grid or table.
|
|
213
|
-
*/
|
|
214
|
-
ROWCOUNT = "rowcount",
|
|
215
|
-
/**
|
|
216
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-rowindex.
|
|
217
|
-
*
|
|
218
|
-
* Value: an integer representing the index of the element within a set of related elements.
|
|
219
|
-
*/
|
|
220
|
-
ROWINDEX = "rowindex",
|
|
221
|
-
/**
|
|
222
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-rowspan.
|
|
223
|
-
*
|
|
224
|
-
* Value: an integer representing the number of rows a cell spans in a grid or table.
|
|
225
|
-
*/
|
|
226
|
-
ROWSPAN = "rowspan",
|
|
227
173
|
/**
|
|
228
174
|
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-selected.
|
|
229
175
|
*
|
|
230
176
|
* Value:one of {true, false, undefined}.
|
|
231
177
|
*/
|
|
232
178
|
SELECTED = "selected",
|
|
233
|
-
/**
|
|
234
|
-
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-setsize.
|
|
235
|
-
*
|
|
236
|
-
* Value: an integer representing the total number of elements in a set of related elements.
|
|
237
|
-
*/
|
|
238
|
-
SETSIZE = "setsize",
|
|
239
179
|
/**
|
|
240
180
|
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-valuemax.
|
|
241
181
|
*
|
|
@@ -247,7 +187,21 @@ export declare enum State {
|
|
|
247
187
|
*
|
|
248
188
|
* Value: a number representing the minimum allowed value for a range widget.
|
|
249
189
|
*/
|
|
250
|
-
VALUEMIN = "valuemin"
|
|
190
|
+
VALUEMIN = "valuemin",
|
|
191
|
+
/**
|
|
192
|
+
* See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-owns
|
|
193
|
+
*
|
|
194
|
+
* Value: a space-separated list of element IDs that are owned by the current element.
|
|
195
|
+
*/
|
|
196
|
+
OWNS = "owns"
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Used to control how verbose generated a11y labels are.
|
|
200
|
+
*/
|
|
201
|
+
export declare enum Verbosity {
|
|
202
|
+
TERSE = 0,
|
|
203
|
+
STANDARD = 1,
|
|
204
|
+
LOQUACIOUS = 2
|
|
251
205
|
}
|
|
252
206
|
/**
|
|
253
207
|
* Removes the ARIA role from an element.
|
package/core/utils/dom.d.ts
CHANGED
|
@@ -7,18 +7,16 @@
|
|
|
7
7
|
* Find the primary shortcut for this platform and return it as single string
|
|
8
8
|
* in a short user facing format.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @param action The action name, e.g. "cut".
|
|
10
|
+
* @param shortcutName The keyboard shortcut name, e.g. "cut".
|
|
12
11
|
* @returns The formatted shortcut.
|
|
13
12
|
*/
|
|
14
|
-
export declare function
|
|
13
|
+
export declare function getShortcutKeysShort(shortcutName: string): string;
|
|
15
14
|
/**
|
|
16
|
-
* Find the relevant shortcuts for the given
|
|
15
|
+
* Find the relevant shortcuts for the given shortcut for the current platform.
|
|
17
16
|
* Keys are returned in a long user facing format, e.g. "Command ⌘ Option ⌥ C"
|
|
18
17
|
*
|
|
19
|
-
* @
|
|
20
|
-
* @param action The action name, e.g. "cut".
|
|
18
|
+
* @param shortcutName The keyboard shortcut name, e.g. "cut".
|
|
21
19
|
* @returns The formatted shortcuts as individual keys.
|
|
22
20
|
*/
|
|
23
|
-
export declare function
|
|
21
|
+
export declare function getShortcutKeysLong(shortcutName: string): string[][];
|
|
24
22
|
//# sourceMappingURL=shortcut_formatting.d.ts.map
|
package/core/variables.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export declare function generateUniqueNameFromOptions(startChar: string, usedNam
|
|
|
109
109
|
* @param opt_type The type of the variable like 'int', 'string', or ''. This
|
|
110
110
|
* will default to '', which is a specific type.
|
|
111
111
|
*/
|
|
112
|
-
export declare function createVariableButtonHandler(workspace:
|
|
112
|
+
export declare function createVariableButtonHandler(workspace: WorkspaceSvg, opt_callback?: (p1?: string | null) => void, opt_type?: string): void;
|
|
113
113
|
/**
|
|
114
114
|
* Opens a prompt that allows the user to enter a new name for a variable.
|
|
115
115
|
* Triggers a rename if the new name is valid. Or re-prompts if there is a
|
package/core/workspace.d.ts
CHANGED
|
@@ -353,7 +353,11 @@ export declare class Workspace {
|
|
|
353
353
|
*
|
|
354
354
|
* @param redo False if undo, true if redo.
|
|
355
355
|
*/
|
|
356
|
-
undo(redo
|
|
356
|
+
undo(redo?: boolean): void;
|
|
357
|
+
/**
|
|
358
|
+
* Redoes the previous action.
|
|
359
|
+
*/
|
|
360
|
+
redo(): void;
|
|
357
361
|
/** Clear the undo/redo stacks. */
|
|
358
362
|
clearUndo(): void;
|
|
359
363
|
/**
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -377,6 +377,14 @@ export declare class WorkspaceSvg extends Workspace implements IContextMenu, IFo
|
|
|
377
377
|
* @param handler Data that can be passed to eventHandling.unbind.
|
|
378
378
|
*/
|
|
379
379
|
setResizeHandlerWrapper(handler: browserEvents.Data): void;
|
|
380
|
+
/**
|
|
381
|
+
* Sets Aria labels, roles, etc. for the workspace depending on the type of workspace it is.
|
|
382
|
+
*/
|
|
383
|
+
setInitialAriaContext(): void;
|
|
384
|
+
/**
|
|
385
|
+
* Updates the label on the workspace to reflect the number of top-level stacks in the workspace.
|
|
386
|
+
*/
|
|
387
|
+
private updateAriaLabel;
|
|
380
388
|
/**
|
|
381
389
|
* Create the workspace DOM elements.
|
|
382
390
|
*
|
package/core/zoom_controls.d.ts
CHANGED
|
@@ -9,10 +9,42 @@
|
|
|
9
9
|
* @class
|
|
10
10
|
*/
|
|
11
11
|
import './events/events_click.js';
|
|
12
|
+
import { IFocusableNode } from './blockly.js';
|
|
12
13
|
import type { IPositionable } from './interfaces/i_positionable.js';
|
|
13
14
|
import type { UiMetrics } from './metrics_manager.js';
|
|
14
15
|
import { Rect } from './utils/rect.js';
|
|
15
16
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
17
|
+
/**
|
|
18
|
+
* Base class for an individual zoom control (in, out, reset).
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
declare abstract class ZoomControl implements IFocusableNode {
|
|
23
|
+
protected workspace: WorkspaceSvg;
|
|
24
|
+
protected group: SVGGElement;
|
|
25
|
+
private pointerDownHandler;
|
|
26
|
+
private id;
|
|
27
|
+
constructor(workspace: WorkspaceSvg, group: SVGGElement);
|
|
28
|
+
getId(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Handles a mouse down event on the zoom in or zoom out buttons on the
|
|
31
|
+
* workspace.
|
|
32
|
+
*
|
|
33
|
+
* @param amount Amount of zooming. Negative amount values zoom out, and
|
|
34
|
+
* positive amount values zoom in.
|
|
35
|
+
* @param e A mouse down or keydown event.
|
|
36
|
+
*/
|
|
37
|
+
protected zoom(amount: number, e: Event): void;
|
|
38
|
+
/** Fires a zoom control UI event. */
|
|
39
|
+
protected fireZoomEvent(): void;
|
|
40
|
+
getFocusableElement(): SVGGElement;
|
|
41
|
+
getFocusableTree(): WorkspaceSvg;
|
|
42
|
+
onNodeFocus(): void;
|
|
43
|
+
onNodeBlur(): void;
|
|
44
|
+
canBeFocused(): boolean;
|
|
45
|
+
abstract performAction(_e: Event): void;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
}
|
|
16
48
|
/**
|
|
17
49
|
* Class for a zoom controls.
|
|
18
50
|
*/
|
|
@@ -23,18 +55,12 @@ export declare class ZoomControls implements IPositionable {
|
|
|
23
55
|
* ComponentManager.
|
|
24
56
|
*/
|
|
25
57
|
id: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
private
|
|
32
|
-
/** The zoom in svg <g> element. */
|
|
33
|
-
private zoomInGroup;
|
|
34
|
-
/** The zoom out svg <g> element. */
|
|
35
|
-
private zoomOutGroup;
|
|
36
|
-
/** The zoom reset svg <g> element. */
|
|
37
|
-
private zoomResetGroup;
|
|
58
|
+
/** The zoom in control. */
|
|
59
|
+
private zoomInControl;
|
|
60
|
+
/** The zoom out control. */
|
|
61
|
+
private zoomOutControl;
|
|
62
|
+
/** The zoom reset control. */
|
|
63
|
+
private zoomResetControl;
|
|
38
64
|
/** Width of the zoom controls. */
|
|
39
65
|
private readonly WIDTH;
|
|
40
66
|
/** Height of each zoom control. */
|
|
@@ -90,45 +116,12 @@ export declare class ZoomControls implements IPositionable {
|
|
|
90
116
|
*/
|
|
91
117
|
position(metrics: UiMetrics, savedPositions: Rect[]): void;
|
|
92
118
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* @param rnd The random string to use as a suffix in the clip path's ID.
|
|
96
|
-
* These IDs must be unique in case there are multiple Blockly instances
|
|
97
|
-
* on the same page.
|
|
98
|
-
*/
|
|
99
|
-
private createZoomOutSvg;
|
|
100
|
-
/**
|
|
101
|
-
* Create the zoom out icon and its event handler.
|
|
102
|
-
*
|
|
103
|
-
* @param rnd The random string to use as a suffix in the clip path's ID.
|
|
104
|
-
* These IDs must be unique in case there are multiple Blockly instances
|
|
105
|
-
* on the same page.
|
|
106
|
-
*/
|
|
107
|
-
private createZoomInSvg;
|
|
108
|
-
/**
|
|
109
|
-
* Handles a mouse down event on the zoom in or zoom out buttons on the
|
|
110
|
-
* workspace.
|
|
111
|
-
*
|
|
112
|
-
* @param amount Amount of zooming. Negative amount values zoom out, and
|
|
113
|
-
* positive amount values zoom in.
|
|
114
|
-
* @param e A mouse down event.
|
|
115
|
-
*/
|
|
116
|
-
private zoom;
|
|
117
|
-
/**
|
|
118
|
-
* Create the zoom reset icon and its event handler.
|
|
119
|
+
* Returns the individual zoom control, if any, with the given ID. Used for
|
|
120
|
+
* focus management.
|
|
119
121
|
*
|
|
120
|
-
* @
|
|
121
|
-
* These IDs must be unique in case there are multiple Blockly instances
|
|
122
|
-
* on the same page.
|
|
122
|
+
* @internal
|
|
123
123
|
*/
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Handles a mouse down event on the reset zoom button on the workspace.
|
|
127
|
-
*
|
|
128
|
-
* @param e A mouse down event.
|
|
129
|
-
*/
|
|
130
|
-
private resetZoom;
|
|
131
|
-
/** Fires a zoom control UI event. */
|
|
132
|
-
private fireZoomEvent;
|
|
124
|
+
getControlWithId(id: string): ZoomControl | undefined;
|
|
133
125
|
}
|
|
126
|
+
export {};
|
|
134
127
|
//# sourceMappingURL=zoom_controls.d.ts.map
|