blockly 12.0.0-beta.1 → 12.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/blockly.min.js +297 -276
  2. package/blockly.mjs +3 -3
  3. package/blockly_compressed.js +282 -261
  4. package/blockly_compressed.js.map +1 -1
  5. package/core/block_flyout_inflater.d.ts +5 -6
  6. package/core/block_svg.d.ts +0 -8
  7. package/core/blockly.d.ts +6 -5
  8. package/core/bubbles/text_bubble.d.ts +5 -5
  9. package/core/button_flyout_inflater.d.ts +3 -3
  10. package/core/comments/comment_view.d.ts +3 -3
  11. package/core/contextmenu_registry.d.ts +51 -11
  12. package/core/dragging/block_drag_strategy.d.ts +14 -2
  13. package/core/dragging/bubble_drag_strategy.d.ts +0 -2
  14. package/core/dragging/comment_drag_strategy.d.ts +0 -2
  15. package/core/field.d.ts +3 -9
  16. package/core/field_dropdown.d.ts +7 -9
  17. package/core/field_input.d.ts +1 -7
  18. package/core/field_variable.d.ts +3 -3
  19. package/core/focus_manager.d.ts +163 -0
  20. package/core/interfaces/i_flyout_inflater.d.ts +3 -3
  21. package/core/interfaces/i_focusable_node.d.ts +37 -0
  22. package/core/interfaces/i_focusable_tree.d.ts +58 -0
  23. package/core/keyboard_nav/ast_node.d.ts +6 -6
  24. package/core/keyboard_nav/line_cursor.d.ts +313 -0
  25. package/core/keyboard_nav/marker.d.ts +4 -8
  26. package/core/label_flyout_inflater.d.ts +3 -3
  27. package/core/marker_manager.d.ts +3 -3
  28. package/core/menu.d.ts +29 -23
  29. package/core/menu_separator.d.ts +25 -0
  30. package/core/menuitem.d.ts +7 -0
  31. package/core/registry.d.ts +2 -2
  32. package/core/renderers/common/marker_svg.d.ts +2 -2
  33. package/core/renderers/zelos/path_object.d.ts +2 -1
  34. package/core/separator_flyout_inflater.d.ts +3 -3
  35. package/core/utils/aria.d.ts +2 -1
  36. package/core/utils/focusable_tree_traverser.d.ts +53 -0
  37. package/core/utils/toolbox.d.ts +0 -2
  38. package/core/workspace.d.ts +13 -1
  39. package/core/workspace_svg.d.ts +16 -2
  40. package/dart_compressed.js +1 -1
  41. package/dart_compressed.js.map +1 -1
  42. package/index.mjs +3 -3
  43. package/javascript_compressed.js +15 -15
  44. package/javascript_compressed.js.map +1 -1
  45. package/lua_compressed.js +1 -1
  46. package/lua_compressed.js.map +1 -1
  47. package/package.json +2 -2
  48. package/php_compressed.js +1 -1
  49. package/php_compressed.js.map +1 -1
  50. package/python_compressed.js +3 -3
  51. package/python_compressed.js.map +1 -1
  52. package/core/keyboard_nav/basic_cursor.d.ts +0 -96
  53. package/core/keyboard_nav/cursor.d.ts +0 -44
  54. package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -20
@@ -1,96 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ASTNode } from './ast_node.js';
7
- import { Cursor } from './cursor.js';
8
- /**
9
- * Class for a basic cursor.
10
- * This will allow the user to get to all nodes in the AST by hitting next or
11
- * previous.
12
- */
13
- export declare class BasicCursor extends Cursor {
14
- /** Name used for registering a basic cursor. */
15
- static readonly registrationName = "basicCursor";
16
- constructor();
17
- /**
18
- * Find the next node in the pre order traversal.
19
- *
20
- * @returns The next node, or null if the current node is not set or there is
21
- * no next value.
22
- */
23
- next(): ASTNode | null;
24
- /**
25
- * For a basic cursor we only have the ability to go next and previous, so
26
- * in will also allow the user to get to the next node in the pre order
27
- * traversal.
28
- *
29
- * @returns The next node, or null if the current node is not set or there is
30
- * no next value.
31
- */
32
- in(): ASTNode | null;
33
- /**
34
- * Find the previous node in the pre order traversal.
35
- *
36
- * @returns The previous node, or null if the current node is not set or there
37
- * is no previous value.
38
- */
39
- prev(): ASTNode | null;
40
- /**
41
- * For a basic cursor we only have the ability to go next and previous, so
42
- * out will allow the user to get to the previous node in the pre order
43
- * traversal.
44
- *
45
- * @returns The previous node, or null if the current node is not set or there
46
- * is no previous value.
47
- */
48
- out(): ASTNode | null;
49
- /**
50
- * Uses pre order traversal to navigate the Blockly AST. This will allow
51
- * a user to easily navigate the entire Blockly AST without having to go in
52
- * and out levels on the tree.
53
- *
54
- * @param node The current position in the AST.
55
- * @param isValid A function true/false depending on whether the given node
56
- * should be traversed.
57
- * @returns The next node in the traversal.
58
- */
59
- protected getNextNode_(node: ASTNode | null, isValid: (p1: ASTNode | null) => boolean): ASTNode | null;
60
- /**
61
- * Reverses the pre order traversal in order to find the previous node. This
62
- * will allow a user to easily navigate the entire Blockly AST without having
63
- * to go in and out levels on the tree.
64
- *
65
- * @param node The current position in the AST.
66
- * @param isValid A function true/false depending on whether the given node
67
- * should be traversed.
68
- * @returns The previous node in the traversal or null if no previous node
69
- * exists.
70
- */
71
- protected getPreviousNode_(node: ASTNode | null, isValid: (p1: ASTNode | null) => boolean): ASTNode | null;
72
- /**
73
- * Decides what nodes to traverse and which ones to skip. Currently, it
74
- * skips output, stack and workspace nodes.
75
- *
76
- * @param node The AST node to check whether it is valid.
77
- * @returns True if the node should be visited, false otherwise.
78
- */
79
- protected validNode_(node: ASTNode | null): boolean;
80
- /**
81
- * From the given node find either the next valid sibling or parent.
82
- *
83
- * @param node The current position in the AST.
84
- * @returns The parent AST node or null if there are no valid parents.
85
- */
86
- private findSiblingOrParent;
87
- /**
88
- * Get the right most child of a node.
89
- *
90
- * @param node The node to find the right most child of.
91
- * @returns The right most child of the given node, or the node if no child
92
- * exists.
93
- */
94
- private getRightMostChild;
95
- }
96
- //# sourceMappingURL=basic_cursor.d.ts.map
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ASTNode } from './ast_node.js';
7
- import { Marker } from './marker.js';
8
- /**
9
- * Class for a cursor.
10
- * A cursor controls how a user navigates the Blockly AST.
11
- */
12
- export declare class Cursor extends Marker {
13
- type: string;
14
- constructor();
15
- /**
16
- * Find the next connection, field, or block.
17
- *
18
- * @returns The next element, or null if the current node is not set or there
19
- * is no next value.
20
- */
21
- next(): ASTNode | null;
22
- /**
23
- * Find the in connection or field.
24
- *
25
- * @returns The in element, or null if the current node is not set or there is
26
- * no in value.
27
- */
28
- in(): ASTNode | null;
29
- /**
30
- * Find the previous connection, field, or block.
31
- *
32
- * @returns The previous element, or null if the current node is not set or
33
- * there is no previous value.
34
- */
35
- prev(): ASTNode | null;
36
- /**
37
- * Find the out connection, field, or block.
38
- *
39
- * @returns The out element, or null if the current node is not set or there
40
- * is no out value.
41
- */
42
- out(): ASTNode | null;
43
- }
44
- //# sourceMappingURL=cursor.d.ts.map
@@ -1,20 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ASTNode } from './ast_node.js';
7
- import { BasicCursor } from './basic_cursor.js';
8
- /**
9
- * A cursor for navigating between tab navigable fields.
10
- */
11
- export declare class TabNavigateCursor extends BasicCursor {
12
- /**
13
- * Skip all nodes except for tab navigable fields.
14
- *
15
- * @param node The AST node to check whether it is valid.
16
- * @returns True if the node should be visited, false otherwise.
17
- */
18
- validNode_(node: ASTNode | null): boolean;
19
- }
20
- //# sourceMappingURL=tab_navigate_cursor.d.ts.map