blockly 12.5.1 → 13.0.0-beta.0
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 +645 -533
- package/blockly.mjs +13 -5
- package/blockly_compressed.js +610 -507
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +16 -16
- package/blocks_compressed.js.map +1 -1
- package/core/block.d.ts +1 -1
- package/core/block_svg.d.ts +39 -16
- package/core/blockly.d.ts +21 -16
- package/core/bubbles/bubble.d.ts +17 -2
- package/core/bubbles/mini_workspace_bubble.d.ts +5 -0
- package/core/bubbles/textinput_bubble.d.ts +5 -0
- package/core/comments/comment_editor.d.ts +2 -2
- package/core/comments/rendered_workspace_comment.d.ts +6 -1
- package/core/common.d.ts +1 -1
- package/core/css.d.ts +2 -1
- package/core/dragging/block_drag_strategy.d.ts +84 -14
- package/core/dragging/bubble_drag_strategy.d.ts +5 -4
- package/core/dragging/comment_drag_strategy.d.ts +4 -4
- package/core/dragging/dragger.d.ts +13 -14
- package/core/events/events_block_create.d.ts +0 -3
- package/core/events/events_block_delete.d.ts +0 -3
- package/core/events/events_comment_create.d.ts +0 -3
- package/core/events/events_comment_delete.d.ts +0 -3
- package/core/field.d.ts +69 -0
- package/core/flyout_base.d.ts +1 -125
- package/core/flyout_button.d.ts +9 -0
- package/core/flyout_horizontal.d.ts +0 -11
- package/core/flyout_vertical.d.ts +0 -11
- package/core/gesture.d.ts +0 -12
- package/core/hints.d.ts +44 -0
- package/core/icons/icon.d.ts +6 -0
- package/core/inputs/input.d.ts +7 -1
- package/core/interfaces/i_bounded_element.d.ts +7 -0
- package/core/interfaces/i_bubble.d.ts +3 -2
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +5 -1
- package/core/interfaces/i_draggable.d.ts +22 -17
- package/core/interfaces/i_dragger.d.ts +19 -10
- package/core/interfaces/i_flyout.d.ts +1 -31
- package/core/interfaces/i_focusable_node.d.ts +6 -0
- package/core/interfaces/i_focusable_tree.d.ts +8 -0
- package/core/interfaces/i_json_block_definition.d.ts +102 -0
- package/core/interfaces/i_navigation_policy.d.ts +12 -0
- package/core/interfaces/i_selectable.d.ts +2 -2
- package/core/interfaces/i_selectable_toolbox_item.d.ts +3 -3
- package/core/interfaces/i_toolbox.d.ts +4 -0
- package/core/interfaces/i_toolbox_item.d.ts +6 -0
- package/core/keyboard_nav/keyboard_mover.d.ts +138 -0
- package/core/keyboard_nav/move_indicator.d.ts +35 -0
- package/core/keyboard_nav/{block_comment_navigation_policy.d.ts → navigation_policies/block_comment_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{block_navigation_policy.d.ts → navigation_policies/block_navigation_policy.d.ts} +17 -25
- package/core/keyboard_nav/{comment_bar_button_navigation_policy.d.ts → navigation_policies/comment_bar_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{comment_editor_navigation_policy.d.ts → navigation_policies/comment_editor_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{connection_navigation_policy.d.ts → navigation_policies/connection_navigation_policy.d.ts} +11 -16
- package/core/keyboard_nav/{field_navigation_policy.d.ts → navigation_policies/field_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_button_navigation_policy.d.ts → navigation_policies/flyout_button_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/{flyout_separator_navigation_policy.d.ts → navigation_policies/flyout_separator_navigation_policy.d.ts} +9 -3
- package/core/keyboard_nav/{icon_navigation_policy.d.ts → navigation_policies/icon_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.d.ts +64 -0
- package/core/keyboard_nav/{workspace_comment_navigation_policy.d.ts → navigation_policies/workspace_comment_navigation_policy.d.ts} +14 -9
- package/core/keyboard_nav/{workspace_navigation_policy.d.ts → navigation_policies/workspace_navigation_policy.d.ts} +10 -3
- package/core/keyboard_nav/navigators/flyout_navigator.d.ts +63 -0
- package/core/keyboard_nav/navigators/navigator.d.ts +225 -0
- package/core/keyboard_nav/navigators/toolbox_navigator.d.ts +70 -0
- package/core/registry.d.ts +0 -2
- package/core/renderers/common/constants.d.ts +4 -7
- package/core/renderers/common/i_path_object.d.ts +8 -0
- package/core/renderers/common/path_object.d.ts +5 -14
- package/core/renderers/common/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +1 -14
- package/core/renderers/zelos/measurables/bottom_row.d.ts +1 -1
- package/core/renderers/zelos/measurables/top_row.d.ts +1 -1
- package/core/renderers/zelos/path_object.d.ts +0 -3
- package/core/renderers/zelos/renderer.d.ts +8 -0
- package/core/shortcut_items.d.ts +63 -1
- package/core/theme.d.ts +0 -2
- package/core/toast.d.ts +2 -11
- package/core/toolbox/category.d.ts +5 -0
- package/core/toolbox/separator.d.ts +4 -0
- package/core/toolbox/toolbox.d.ts +12 -22
- package/core/toolbox/toolbox_item.d.ts +4 -0
- package/core/utils/aria.d.ts +292 -23
- package/core/utils/shortcut_formatting.d.ts +24 -0
- package/core/utils/useragent.d.ts +1 -0
- package/core/workspace_audio.d.ts +23 -0
- package/core/workspace_svg.d.ts +8 -50
- package/dart_compressed.js +9 -9
- package/dart_compressed.js.map +1 -1
- package/index.mjs +13 -5
- package/javascript_compressed.js +11 -10
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +7 -7
- package/lua_compressed.js.map +1 -1
- package/msg/ab.js +8 -0
- package/msg/ab.mjs +8 -0
- package/msg/ace.js +8 -0
- package/msg/ace.mjs +8 -0
- package/msg/af.js +8 -0
- package/msg/af.mjs +8 -0
- package/msg/am.js +8 -0
- package/msg/am.mjs +8 -0
- package/msg/ar.js +8 -0
- package/msg/ar.mjs +8 -0
- package/msg/ast.js +8 -0
- package/msg/ast.mjs +8 -0
- package/msg/az.js +8 -0
- package/msg/az.mjs +8 -0
- package/msg/ba.js +8 -0
- package/msg/ba.mjs +8 -0
- package/msg/bcc.js +8 -0
- package/msg/bcc.mjs +8 -0
- package/msg/be-tarask.js +8 -0
- package/msg/be-tarask.mjs +8 -0
- package/msg/be.js +8 -0
- package/msg/be.mjs +8 -0
- package/msg/bg.js +8 -0
- package/msg/bg.mjs +8 -0
- package/msg/bn.js +8 -0
- package/msg/bn.mjs +8 -0
- package/msg/br.js +8 -0
- package/msg/br.mjs +8 -0
- package/msg/bs.js +8 -0
- package/msg/bs.mjs +8 -0
- package/msg/ca.js +8 -0
- package/msg/ca.mjs +8 -0
- package/msg/cdo.js +8 -0
- package/msg/cdo.mjs +8 -0
- package/msg/ce.js +8 -0
- package/msg/ce.mjs +8 -0
- package/msg/cs.js +8 -0
- package/msg/cs.mjs +8 -0
- package/msg/da.js +8 -0
- package/msg/da.mjs +8 -0
- package/msg/de.js +8 -0
- package/msg/de.mjs +8 -0
- package/msg/diq.js +8 -0
- package/msg/diq.mjs +8 -0
- package/msg/dtp.js +8 -0
- package/msg/dtp.mjs +8 -0
- package/msg/dty.js +8 -0
- package/msg/dty.mjs +8 -0
- package/msg/ee.js +8 -0
- package/msg/ee.mjs +8 -0
- package/msg/el.js +8 -0
- package/msg/el.mjs +8 -0
- package/msg/en-gb.js +8 -0
- package/msg/en-gb.mjs +8 -0
- package/msg/en.js +8 -0
- package/msg/en.mjs +8 -0
- package/msg/eo.js +8 -0
- package/msg/eo.mjs +8 -0
- package/msg/es.js +8 -0
- package/msg/es.mjs +8 -0
- package/msg/et.js +8 -0
- package/msg/et.mjs +8 -0
- package/msg/eu.js +8 -0
- package/msg/eu.mjs +8 -0
- package/msg/fa.js +8 -0
- package/msg/fa.mjs +8 -0
- package/msg/fi.js +8 -0
- package/msg/fi.mjs +8 -0
- package/msg/fo.js +8 -0
- package/msg/fo.mjs +8 -0
- package/msg/fr.js +8 -0
- package/msg/fr.mjs +8 -0
- package/msg/frr.js +8 -0
- package/msg/frr.mjs +8 -0
- package/msg/gl.js +8 -0
- package/msg/gl.mjs +8 -0
- package/msg/gn.js +8 -0
- package/msg/gn.mjs +8 -0
- package/msg/gor.js +8 -0
- package/msg/gor.mjs +8 -0
- package/msg/ha.js +8 -0
- package/msg/ha.mjs +8 -0
- package/msg/hak.js +8 -0
- package/msg/hak.mjs +8 -0
- package/msg/he.js +8 -0
- package/msg/he.mjs +8 -0
- package/msg/hi.js +8 -0
- package/msg/hi.mjs +8 -0
- package/msg/hr.js +8 -0
- package/msg/hr.mjs +8 -0
- package/msg/hrx.js +8 -0
- package/msg/hrx.mjs +8 -0
- package/msg/hsb.js +8 -0
- package/msg/hsb.mjs +8 -0
- package/msg/hu.js +8 -0
- package/msg/hu.mjs +8 -0
- package/msg/hy.js +8 -0
- package/msg/hy.mjs +8 -0
- package/msg/ia.js +8 -0
- package/msg/ia.mjs +8 -0
- package/msg/id.js +8 -0
- package/msg/id.mjs +8 -0
- package/msg/ig.js +8 -0
- package/msg/ig.mjs +8 -0
- package/msg/inh.js +8 -0
- package/msg/inh.mjs +8 -0
- package/msg/is.js +8 -0
- package/msg/is.mjs +8 -0
- package/msg/it.js +8 -0
- package/msg/it.mjs +8 -0
- package/msg/ja.js +8 -0
- package/msg/ja.mjs +8 -0
- package/msg/ka.js +8 -0
- package/msg/ka.mjs +8 -0
- package/msg/kab.js +8 -0
- package/msg/kab.mjs +8 -0
- package/msg/kbd-cyrl.js +8 -0
- package/msg/kbd-cyrl.mjs +8 -0
- package/msg/km.js +8 -0
- package/msg/km.mjs +8 -0
- package/msg/kn.js +8 -0
- package/msg/kn.mjs +8 -0
- package/msg/ko.js +8 -0
- package/msg/ko.mjs +8 -0
- package/msg/ksh.js +8 -0
- package/msg/ksh.mjs +8 -0
- package/msg/ku-latn.js +8 -0
- package/msg/ku-latn.mjs +8 -0
- package/msg/ky.js +8 -0
- package/msg/ky.mjs +8 -0
- package/msg/la.js +8 -0
- package/msg/la.mjs +8 -0
- package/msg/lb.js +8 -0
- package/msg/lb.mjs +8 -0
- package/msg/lki.js +8 -0
- package/msg/lki.mjs +8 -0
- package/msg/lo.js +8 -0
- package/msg/lo.mjs +8 -0
- package/msg/lrc.js +8 -0
- package/msg/lrc.mjs +8 -0
- package/msg/lt.js +8 -0
- package/msg/lt.mjs +8 -0
- package/msg/lv.js +8 -0
- package/msg/lv.mjs +8 -0
- package/msg/mg.js +8 -0
- package/msg/mg.mjs +8 -0
- package/msg/mk.js +8 -0
- package/msg/mk.mjs +8 -0
- package/msg/ml.js +8 -0
- package/msg/ml.mjs +8 -0
- package/msg/mnw.js +8 -0
- package/msg/mnw.mjs +8 -0
- package/msg/ms.js +8 -0
- package/msg/ms.mjs +8 -0
- package/msg/my.js +8 -0
- package/msg/my.mjs +8 -0
- package/msg/mzn.js +8 -0
- package/msg/mzn.mjs +8 -0
- package/msg/nb.js +8 -0
- package/msg/nb.mjs +8 -0
- package/msg/ne.js +8 -0
- package/msg/ne.mjs +8 -0
- package/msg/nl.js +8 -0
- package/msg/nl.mjs +8 -0
- package/msg/oc.js +8 -0
- package/msg/oc.mjs +8 -0
- package/msg/olo.js +8 -0
- package/msg/olo.mjs +8 -0
- package/msg/pa.js +8 -0
- package/msg/pa.mjs +8 -0
- package/msg/pl.js +8 -0
- package/msg/pl.mjs +8 -0
- package/msg/pms.js +8 -0
- package/msg/pms.mjs +8 -0
- package/msg/ps.js +8 -0
- package/msg/ps.mjs +8 -0
- package/msg/pt-br.js +8 -0
- package/msg/pt-br.mjs +8 -0
- package/msg/pt.js +8 -0
- package/msg/pt.mjs +8 -0
- package/msg/ro.js +8 -0
- package/msg/ro.mjs +8 -0
- package/msg/ru.js +8 -0
- package/msg/ru.mjs +8 -0
- package/msg/sc.js +8 -0
- package/msg/sc.mjs +8 -0
- package/msg/sco.js +8 -0
- package/msg/sco.mjs +8 -0
- package/msg/sd.js +8 -0
- package/msg/sd.mjs +8 -0
- package/msg/shn.js +8 -0
- package/msg/shn.mjs +8 -0
- package/msg/si.js +8 -0
- package/msg/si.mjs +8 -0
- package/msg/sk.js +8 -0
- package/msg/sk.mjs +8 -0
- package/msg/skr-arab.js +8 -0
- package/msg/skr-arab.mjs +8 -0
- package/msg/sl.js +8 -0
- package/msg/sl.mjs +8 -0
- package/msg/smn.js +8 -0
- package/msg/smn.mjs +8 -0
- package/msg/sq.js +8 -0
- package/msg/sq.mjs +8 -0
- package/msg/sr-latn.js +8 -0
- package/msg/sr-latn.mjs +8 -0
- package/msg/sr.js +8 -0
- package/msg/sr.mjs +8 -0
- package/msg/sv.js +8 -0
- package/msg/sv.mjs +8 -0
- package/msg/sw.js +8 -0
- package/msg/sw.mjs +8 -0
- package/msg/ta.js +8 -0
- package/msg/ta.mjs +8 -0
- package/msg/tcy.js +8 -0
- package/msg/tcy.mjs +8 -0
- package/msg/tdd.js +8 -0
- package/msg/tdd.mjs +8 -0
- package/msg/te.js +8 -0
- package/msg/te.mjs +8 -0
- package/msg/th.js +8 -0
- package/msg/th.mjs +8 -0
- package/msg/ti.js +8 -0
- package/msg/ti.mjs +8 -0
- package/msg/tl.js +8 -0
- package/msg/tl.mjs +8 -0
- package/msg/tlh.js +8 -0
- package/msg/tlh.mjs +8 -0
- package/msg/tr.js +8 -0
- package/msg/tr.mjs +8 -0
- package/msg/ug-arab.js +8 -0
- package/msg/ug-arab.mjs +8 -0
- package/msg/uk.js +8 -0
- package/msg/uk.mjs +8 -0
- package/msg/ur.js +8 -0
- package/msg/ur.mjs +8 -0
- package/msg/uz.js +8 -0
- package/msg/uz.mjs +8 -0
- package/msg/vi.js +8 -0
- package/msg/vi.mjs +8 -0
- package/msg/xmf.js +8 -0
- package/msg/xmf.mjs +8 -0
- package/msg/yo.js +8 -0
- package/msg/yo.mjs +8 -0
- package/msg/zgh.js +8 -0
- package/msg/zgh.mjs +8 -0
- package/msg/zh-hans.js +8 -0
- package/msg/zh-hans.mjs +8 -0
- package/msg/zh-hant.js +8 -0
- package/msg/zh-hant.mjs +8 -0
- package/package.json +11 -11
- package/php_compressed.js +2 -2
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +2 -2
- package/python_compressed.js.map +1 -1
- package/core/flyout_navigator.d.ts +0 -11
- package/core/keyboard_nav/flyout_navigation_policy.d.ts +0 -65
- package/core/keyboard_nav/line_cursor.d.ts +0 -187
- package/core/keyboard_nav/marker.d.ts +0 -53
- package/core/marker_manager.d.ts +0 -72
- package/core/navigator.d.ts +0 -65
- package/media/sprites.png +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IFlyout } from './interfaces/i_flyout.js';
|
|
7
|
-
import { Navigator } from './navigator.js';
|
|
8
|
-
export declare class FlyoutNavigator extends Navigator {
|
|
9
|
-
constructor(flyout: IFlyout);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=flyout_navigator.d.ts.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IFlyout } from '../interfaces/i_flyout.js';
|
|
7
|
-
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
8
|
-
import type { INavigationPolicy } from '../interfaces/i_navigation_policy.js';
|
|
9
|
-
/**
|
|
10
|
-
* Generic navigation policy that navigates between items in the flyout.
|
|
11
|
-
*/
|
|
12
|
-
export declare class FlyoutNavigationPolicy<T> implements INavigationPolicy<T> {
|
|
13
|
-
private policy;
|
|
14
|
-
private flyout;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new FlyoutNavigationPolicy instance.
|
|
17
|
-
*
|
|
18
|
-
* @param policy The policy to defer to for parents/children.
|
|
19
|
-
* @param flyout The flyout this policy will control navigation in.
|
|
20
|
-
*/
|
|
21
|
-
constructor(policy: INavigationPolicy<T>, flyout: IFlyout);
|
|
22
|
-
/**
|
|
23
|
-
* Returns null to prevent navigating into flyout items.
|
|
24
|
-
*
|
|
25
|
-
* @param _current The flyout item to navigate from.
|
|
26
|
-
* @returns Null to prevent navigating into flyout items.
|
|
27
|
-
*/
|
|
28
|
-
getFirstChild(_current: T): IFocusableNode | null;
|
|
29
|
-
/**
|
|
30
|
-
* Returns the parent of the given flyout item.
|
|
31
|
-
*
|
|
32
|
-
* @param current The flyout item to navigate from.
|
|
33
|
-
* @returns The parent of the given flyout item.
|
|
34
|
-
*/
|
|
35
|
-
getParent(current: T): IFocusableNode | null;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the next item in the flyout relative to the given item.
|
|
38
|
-
*
|
|
39
|
-
* @param current The flyout item to navigate from.
|
|
40
|
-
* @returns The flyout item following the given one.
|
|
41
|
-
*/
|
|
42
|
-
getNextSibling(current: T): IFocusableNode | null;
|
|
43
|
-
/**
|
|
44
|
-
* Returns the previous item in the flyout relative to the given item.
|
|
45
|
-
*
|
|
46
|
-
* @param current The flyout item to navigate from.
|
|
47
|
-
* @returns The flyout item preceding the given one.
|
|
48
|
-
*/
|
|
49
|
-
getPreviousSibling(current: T): IFocusableNode | null;
|
|
50
|
-
/**
|
|
51
|
-
* Returns whether or not the given flyout item can be navigated to.
|
|
52
|
-
*
|
|
53
|
-
* @param current The instance to check for navigability.
|
|
54
|
-
* @returns True if the given flyout item can be focused.
|
|
55
|
-
*/
|
|
56
|
-
isNavigable(current: T): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Returns whether the given object can be navigated from by this policy.
|
|
59
|
-
*
|
|
60
|
-
* @param current The object to check if this policy applies to.
|
|
61
|
-
* @returns True if the object is a BlockSvg.
|
|
62
|
-
*/
|
|
63
|
-
isApplicable(current: any): current is T;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=flyout_navigation_policy.d.ts.map
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @fileoverview The class representing a line cursor.
|
|
8
|
-
* A line cursor tries to traverse the blocks and connections on a block as if
|
|
9
|
-
* they were lines of code in a text editor. Previous and next traverse previous
|
|
10
|
-
* connections, next connections and blocks, while in and out traverse input
|
|
11
|
-
* connections and fields.
|
|
12
|
-
* @author aschmiedt@google.com (Abby Schmiedt)
|
|
13
|
-
*/
|
|
14
|
-
import { BlockSvg } from '../block_svg.js';
|
|
15
|
-
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
16
|
-
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
17
|
-
import { Marker } from './marker.js';
|
|
18
|
-
/**
|
|
19
|
-
* Class for a line cursor.
|
|
20
|
-
*/
|
|
21
|
-
export declare class LineCursor extends Marker {
|
|
22
|
-
protected readonly workspace: WorkspaceSvg;
|
|
23
|
-
type: string;
|
|
24
|
-
/** Locations to try moving the cursor to after a deletion. */
|
|
25
|
-
private potentialNodes;
|
|
26
|
-
/**
|
|
27
|
-
* @param workspace The workspace this cursor belongs to.
|
|
28
|
-
*/
|
|
29
|
-
constructor(workspace: WorkspaceSvg);
|
|
30
|
-
/**
|
|
31
|
-
* Moves the cursor to the next block or workspace comment in the pre-order
|
|
32
|
-
* traversal.
|
|
33
|
-
*
|
|
34
|
-
* @returns The next node, or null if the current node is not set or there is
|
|
35
|
-
* no next value.
|
|
36
|
-
*/
|
|
37
|
-
next(): IFocusableNode | null;
|
|
38
|
-
/**
|
|
39
|
-
* Moves the cursor to the next input connection or field
|
|
40
|
-
* in the pre order traversal.
|
|
41
|
-
*
|
|
42
|
-
* @returns The next node, or null if the current node is
|
|
43
|
-
* not set or there is no next value.
|
|
44
|
-
*/
|
|
45
|
-
in(): IFocusableNode | null;
|
|
46
|
-
/**
|
|
47
|
-
* Moves the cursor to the previous block or workspace comment in the
|
|
48
|
-
* pre-order traversal.
|
|
49
|
-
*
|
|
50
|
-
* @returns The previous node, or null if the current node is not set or there
|
|
51
|
-
* is no previous value.
|
|
52
|
-
*/
|
|
53
|
-
prev(): IFocusableNode | null;
|
|
54
|
-
/**
|
|
55
|
-
* Moves the cursor to the previous input connection or field in the pre order
|
|
56
|
-
* traversal.
|
|
57
|
-
*
|
|
58
|
-
* @returns The previous node, or null if the current node
|
|
59
|
-
* is not set or there is no previous value.
|
|
60
|
-
*/
|
|
61
|
-
out(): IFocusableNode | null;
|
|
62
|
-
/**
|
|
63
|
-
* Returns true iff the node to which we would navigate if in() were
|
|
64
|
-
* called is the same as the node to which we would navigate if next() were
|
|
65
|
-
* called - in effect, if the LineCursor is at the end of the 'current
|
|
66
|
-
* line' of the program.
|
|
67
|
-
*/
|
|
68
|
-
atEndOfLine(): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Uses pre order traversal to navigate the Blockly AST. This will allow
|
|
71
|
-
* a user to easily navigate the entire Blockly AST without having to go in
|
|
72
|
-
* and out levels on the tree.
|
|
73
|
-
*
|
|
74
|
-
* @param node The current position in the AST.
|
|
75
|
-
* @param isValid A function true/false depending on whether the given node
|
|
76
|
-
* should be traversed.
|
|
77
|
-
* @param visitedNodes A set of previously visited nodes used to avoid cycles.
|
|
78
|
-
* @returns The next node in the traversal.
|
|
79
|
-
*/
|
|
80
|
-
private getNextNodeImpl;
|
|
81
|
-
/**
|
|
82
|
-
* Get the next node in the AST, optionally allowing for loopback.
|
|
83
|
-
*
|
|
84
|
-
* @param node The current position in the AST.
|
|
85
|
-
* @param isValid A function true/false depending on whether the given node
|
|
86
|
-
* should be traversed.
|
|
87
|
-
* @param loop Whether to loop around to the beginning of the workspace if no
|
|
88
|
-
* valid node was found.
|
|
89
|
-
* @returns The next node in the traversal.
|
|
90
|
-
*/
|
|
91
|
-
getNextNode(node: IFocusableNode | null, isValid: (p1: IFocusableNode | null) => boolean, loop: boolean): IFocusableNode | null;
|
|
92
|
-
/**
|
|
93
|
-
* Reverses the pre order traversal in order to find the previous node. This
|
|
94
|
-
* will allow a user to easily navigate the entire Blockly AST without having
|
|
95
|
-
* to go in and out levels on the tree.
|
|
96
|
-
*
|
|
97
|
-
* @param node The current position in the AST.
|
|
98
|
-
* @param isValid A function true/false depending on whether the given node
|
|
99
|
-
* should be traversed.
|
|
100
|
-
* @param visitedNodes A set of previously visited nodes used to avoid cycles.
|
|
101
|
-
* @returns The previous node in the traversal or null if no previous node
|
|
102
|
-
* exists.
|
|
103
|
-
*/
|
|
104
|
-
private getPreviousNodeImpl;
|
|
105
|
-
/**
|
|
106
|
-
* Get the previous node in the AST, optionally allowing for loopback.
|
|
107
|
-
*
|
|
108
|
-
* @param node The current position in the AST.
|
|
109
|
-
* @param isValid A function true/false depending on whether the given node
|
|
110
|
-
* should be traversed.
|
|
111
|
-
* @param loop Whether to loop around to the end of the workspace if no valid
|
|
112
|
-
* node was found.
|
|
113
|
-
* @returns The previous node in the traversal or null if no previous node
|
|
114
|
-
* exists.
|
|
115
|
-
*/
|
|
116
|
-
getPreviousNode(node: IFocusableNode | null, isValid: (p1: IFocusableNode | null) => boolean, loop: boolean): IFocusableNode | null;
|
|
117
|
-
/**
|
|
118
|
-
* Get the right most child of a node.
|
|
119
|
-
*
|
|
120
|
-
* @param node The node to find the right most child of.
|
|
121
|
-
* @returns The right most child of the given node, or the node if no child
|
|
122
|
-
* exists.
|
|
123
|
-
*/
|
|
124
|
-
private getRightMostChild;
|
|
125
|
-
/**
|
|
126
|
-
* Prepare for the deletion of a block by making a list of nodes we
|
|
127
|
-
* could move the cursor to afterwards and save it to
|
|
128
|
-
* this.potentialNodes.
|
|
129
|
-
*
|
|
130
|
-
* After the deletion has occurred, call postDelete to move it to
|
|
131
|
-
* the first valid node on that list.
|
|
132
|
-
*
|
|
133
|
-
* The locations to try (in order of preference) are:
|
|
134
|
-
*
|
|
135
|
-
* - The current location.
|
|
136
|
-
* - The connection to which the deleted block is attached.
|
|
137
|
-
* - The block connected to the next connection of the deleted block.
|
|
138
|
-
* - The parent block of the deleted block.
|
|
139
|
-
* - A location on the workspace beneath the deleted block.
|
|
140
|
-
*
|
|
141
|
-
* N.B.: When block is deleted, all of the blocks conneccted to that
|
|
142
|
-
* block's inputs are also deleted, but not blocks connected to its
|
|
143
|
-
* next connection.
|
|
144
|
-
*
|
|
145
|
-
* @param deletedBlock The block that is being deleted.
|
|
146
|
-
*/
|
|
147
|
-
preDelete(deletedBlock: BlockSvg): void;
|
|
148
|
-
/**
|
|
149
|
-
* Move the cursor to the first valid location in
|
|
150
|
-
* this.potentialNodes, following a block deletion.
|
|
151
|
-
*/
|
|
152
|
-
postDelete(): void;
|
|
153
|
-
/**
|
|
154
|
-
* Get the current location of the cursor.
|
|
155
|
-
*
|
|
156
|
-
* Overrides normal Marker getCurNode to update the current node from the
|
|
157
|
-
* selected block. This typically happens via the selection listener but that
|
|
158
|
-
* is not called immediately when `Gesture` calls
|
|
159
|
-
* `Blockly.common.setSelected`. In particular the listener runs after showing
|
|
160
|
-
* the context menu.
|
|
161
|
-
*
|
|
162
|
-
* @returns The current field, connection, or block the cursor is on.
|
|
163
|
-
*/
|
|
164
|
-
getCurNode(): IFocusableNode | null;
|
|
165
|
-
/**
|
|
166
|
-
* Set the location of the cursor and draw it.
|
|
167
|
-
*
|
|
168
|
-
* Overrides normal Marker setCurNode logic to call
|
|
169
|
-
* this.drawMarker() instead of this.drawer.draw() directly.
|
|
170
|
-
*
|
|
171
|
-
* @param newNode The new location of the cursor.
|
|
172
|
-
*/
|
|
173
|
-
setCurNode(newNode: IFocusableNode): void;
|
|
174
|
-
/**
|
|
175
|
-
* Get the first navigable node on the workspace, or null if none exist.
|
|
176
|
-
*
|
|
177
|
-
* @returns The first navigable node on the workspace, or null.
|
|
178
|
-
*/
|
|
179
|
-
getFirstNode(): IFocusableNode | null;
|
|
180
|
-
/**
|
|
181
|
-
* Get the last navigable node on the workspace, or null if none exist.
|
|
182
|
-
*
|
|
183
|
-
* @returns The last navigable node on the workspace, or null.
|
|
184
|
-
*/
|
|
185
|
-
getLastNode(): IFocusableNode | null;
|
|
186
|
-
}
|
|
187
|
-
//# sourceMappingURL=line_cursor.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* The class representing a marker.
|
|
8
|
-
* Used primarily for keyboard navigation to show a marked location.
|
|
9
|
-
*
|
|
10
|
-
* @class
|
|
11
|
-
*/
|
|
12
|
-
import { BlockSvg } from '../block_svg.js';
|
|
13
|
-
import type { IFocusableNode } from '../interfaces/i_focusable_node.js';
|
|
14
|
-
/**
|
|
15
|
-
* Class for a marker.
|
|
16
|
-
* This is used in keyboard navigation to save a location in the Blockly AST.
|
|
17
|
-
*/
|
|
18
|
-
export declare class Marker {
|
|
19
|
-
/** The colour of the marker. */
|
|
20
|
-
colour: string | null;
|
|
21
|
-
/** The current location of the marker. */
|
|
22
|
-
protected curNode: IFocusableNode | null;
|
|
23
|
-
/** The type of the marker. */
|
|
24
|
-
type: string;
|
|
25
|
-
/**
|
|
26
|
-
* Gets the current location of the marker.
|
|
27
|
-
*
|
|
28
|
-
* @returns The current field, connection, or block the marker is on.
|
|
29
|
-
*/
|
|
30
|
-
getCurNode(): IFocusableNode | null;
|
|
31
|
-
/**
|
|
32
|
-
* Set the location of the marker and call the update method.
|
|
33
|
-
*
|
|
34
|
-
* @param newNode The new location of the marker, or null to remove it.
|
|
35
|
-
*/
|
|
36
|
-
setCurNode(newNode: IFocusableNode | null): void;
|
|
37
|
-
/** Dispose of this marker. */
|
|
38
|
-
dispose(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Returns the block that the given node is a child of.
|
|
41
|
-
*
|
|
42
|
-
* @returns The parent block of the node if any, otherwise null.
|
|
43
|
-
*/
|
|
44
|
-
getSourceBlockFromNode(node: IFocusableNode | null): BlockSvg | null;
|
|
45
|
-
/**
|
|
46
|
-
* Returns the block that this marker's current node is a child of.
|
|
47
|
-
*
|
|
48
|
-
* @returns The parent block of the marker's current node if any, otherwise
|
|
49
|
-
* null.
|
|
50
|
-
*/
|
|
51
|
-
getSourceBlock(): BlockSvg | null;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=marker.d.ts.map
|
package/core/marker_manager.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Object in charge of managing markers and the cursor.
|
|
8
|
-
*
|
|
9
|
-
* @class
|
|
10
|
-
*/
|
|
11
|
-
import { LineCursor } from './keyboard_nav/line_cursor.js';
|
|
12
|
-
import type { Marker } from './keyboard_nav/marker.js';
|
|
13
|
-
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
14
|
-
/**
|
|
15
|
-
* Class to manage the multiple markers and the cursor on a workspace.
|
|
16
|
-
*/
|
|
17
|
-
export declare class MarkerManager {
|
|
18
|
-
private readonly workspace;
|
|
19
|
-
/** The name of the local marker. */
|
|
20
|
-
static readonly LOCAL_MARKER = "local_marker_1";
|
|
21
|
-
/** The cursor. */
|
|
22
|
-
private cursor;
|
|
23
|
-
/** The map of markers for the workspace. */
|
|
24
|
-
private markers;
|
|
25
|
-
/**
|
|
26
|
-
* @param workspace The workspace for the marker manager.
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
constructor(workspace: WorkspaceSvg);
|
|
30
|
-
/**
|
|
31
|
-
* Register the marker by adding it to the map of markers.
|
|
32
|
-
*
|
|
33
|
-
* @param id A unique identifier for the marker.
|
|
34
|
-
* @param marker The marker to register.
|
|
35
|
-
*/
|
|
36
|
-
registerMarker(id: string, marker: Marker): void;
|
|
37
|
-
/**
|
|
38
|
-
* Unregister the marker by removing it from the map of markers.
|
|
39
|
-
*
|
|
40
|
-
* @param id The ID of the marker to unregister.
|
|
41
|
-
*/
|
|
42
|
-
unregisterMarker(id: string): void;
|
|
43
|
-
/**
|
|
44
|
-
* Get the cursor for the workspace.
|
|
45
|
-
*
|
|
46
|
-
* @returns The cursor for this workspace.
|
|
47
|
-
*/
|
|
48
|
-
getCursor(): LineCursor;
|
|
49
|
-
/**
|
|
50
|
-
* Get a single marker that corresponds to the given ID.
|
|
51
|
-
*
|
|
52
|
-
* @param id A unique identifier for the marker.
|
|
53
|
-
* @returns The marker that corresponds to the given ID, or null if none
|
|
54
|
-
* exists.
|
|
55
|
-
*/
|
|
56
|
-
getMarker(id: string): Marker | null;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the cursor and initializes the drawer for use with keyboard
|
|
59
|
-
* navigation.
|
|
60
|
-
*
|
|
61
|
-
* @param cursor The cursor used to move around this workspace.
|
|
62
|
-
*/
|
|
63
|
-
setCursor(cursor: LineCursor): void;
|
|
64
|
-
/**
|
|
65
|
-
* Dispose of the marker manager.
|
|
66
|
-
* Go through and delete all markers associated with this marker manager.
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
dispose(): void;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=marker_manager.d.ts.map
|
package/core/navigator.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IFocusableNode } from './interfaces/i_focusable_node.js';
|
|
7
|
-
import type { INavigationPolicy } from './interfaces/i_navigation_policy.js';
|
|
8
|
-
type RuleList<T> = INavigationPolicy<T>[];
|
|
9
|
-
/**
|
|
10
|
-
* Class responsible for determining where focus should move in response to
|
|
11
|
-
* keyboard navigation commands.
|
|
12
|
-
*/
|
|
13
|
-
export declare class Navigator {
|
|
14
|
-
/**
|
|
15
|
-
* Map from classes to a corresponding ruleset to handle navigation from
|
|
16
|
-
* instances of that class.
|
|
17
|
-
*/
|
|
18
|
-
protected rules: RuleList<any>;
|
|
19
|
-
/**
|
|
20
|
-
* Adds a navigation ruleset to this Navigator.
|
|
21
|
-
*
|
|
22
|
-
* @param policy A ruleset that determines where focus should move starting
|
|
23
|
-
* from an instance of its managed class.
|
|
24
|
-
*/
|
|
25
|
-
addNavigationPolicy(policy: INavigationPolicy<any>): void;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the navigation ruleset associated with the given object instance's
|
|
28
|
-
* class.
|
|
29
|
-
*
|
|
30
|
-
* @param current An object to retrieve a navigation ruleset for.
|
|
31
|
-
* @returns The navigation ruleset of objects of the given object's class, or
|
|
32
|
-
* undefined if no ruleset has been registered for the object's class.
|
|
33
|
-
*/
|
|
34
|
-
private get;
|
|
35
|
-
/**
|
|
36
|
-
* Returns the first child of the given object instance, if any.
|
|
37
|
-
*
|
|
38
|
-
* @param current The object to retrieve the first child of.
|
|
39
|
-
* @returns The first child node of the given object, if any.
|
|
40
|
-
*/
|
|
41
|
-
getFirstChild(current: IFocusableNode): IFocusableNode | null;
|
|
42
|
-
/**
|
|
43
|
-
* Returns the parent of the given object instance, if any.
|
|
44
|
-
*
|
|
45
|
-
* @param current The object to retrieve the parent of.
|
|
46
|
-
* @returns The parent node of the given object, if any.
|
|
47
|
-
*/
|
|
48
|
-
getParent(current: IFocusableNode): IFocusableNode | null;
|
|
49
|
-
/**
|
|
50
|
-
* Returns the next sibling of the given object instance, if any.
|
|
51
|
-
*
|
|
52
|
-
* @param current The object to retrieve the next sibling node of.
|
|
53
|
-
* @returns The next sibling node of the given object, if any.
|
|
54
|
-
*/
|
|
55
|
-
getNextSibling(current: IFocusableNode): IFocusableNode | null;
|
|
56
|
-
/**
|
|
57
|
-
* Returns the previous sibling of the given object instance, if any.
|
|
58
|
-
*
|
|
59
|
-
* @param current The object to retrieve the previous sibling node of.
|
|
60
|
-
* @returns The previous sibling node of the given object, if any.
|
|
61
|
-
*/
|
|
62
|
-
getPreviousSibling(current: IFocusableNode): IFocusableNode | null;
|
|
63
|
-
}
|
|
64
|
-
export {};
|
|
65
|
-
//# sourceMappingURL=navigator.d.ts.map
|
package/media/sprites.png
DELETED
|
Binary file
|