blockly 9.2.1 → 9.3.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 +1615 -1509
- package/blockly_compressed.js +1249 -1136
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +166 -173
- package/blocks_compressed.js.map +1 -1
- package/core/any_aliases.d.ts +5 -0
- package/core/block.d.ts +49 -17
- package/core/block_animations.d.ts +0 -4
- package/core/block_dragger.d.ts +1 -6
- package/core/block_svg.d.ts +58 -8
- package/core/blockly.d.ts +27 -58
- package/core/blockly_options.d.ts +0 -2
- package/core/blocks.d.ts +0 -2
- package/core/browser_events.d.ts +0 -9
- package/core/bubble.d.ts +0 -2
- package/core/bubble_dragger.d.ts +0 -2
- package/core/bump_objects.d.ts +0 -3
- package/core/clipboard.d.ts +0 -3
- package/core/comment.d.ts +6 -10
- package/core/common.d.ts +0 -12
- package/core/component_manager.d.ts +0 -2
- package/core/connection.d.ts +19 -6
- package/core/connection_checker.d.ts +1 -3
- package/core/connection_db.d.ts +0 -2
- package/core/connection_type.d.ts +0 -2
- package/core/constants.d.ts +0 -4
- package/core/contextmenu.d.ts +0 -11
- package/core/contextmenu_items.d.ts +0 -27
- package/core/contextmenu_registry.d.ts +0 -2
- package/core/css.d.ts +0 -2
- package/core/delete_area.d.ts +0 -2
- package/core/dialog.d.ts +0 -6
- package/core/drag_target.d.ts +0 -2
- package/core/events/events.d.ts +2 -22
- package/core/events/events_abstract.d.ts +7 -3
- package/core/events/events_block_base.d.ts +2 -3
- package/core/events/events_block_change.d.ts +9 -3
- package/core/events/events_block_create.d.ts +6 -4
- package/core/events/events_block_delete.d.ts +7 -4
- package/core/events/events_block_drag.d.ts +7 -3
- package/core/events/events_block_move.d.ts +20 -3
- package/core/events/events_bubble_open.d.ts +3 -2
- package/core/events/events_click.d.ts +6 -3
- package/core/events/events_comment_base.d.ts +1 -2
- package/core/events/events_comment_change.d.ts +3 -3
- package/core/events/events_comment_create.d.ts +2 -3
- package/core/events/events_comment_delete.d.ts +2 -3
- package/core/events/events_comment_move.d.ts +4 -4
- package/core/events/events_marker_move.d.ts +10 -3
- package/core/events/events_selected.d.ts +6 -2
- package/core/events/events_theme_change.d.ts +2 -3
- package/core/events/events_toolbox_item_select.d.ts +3 -3
- package/core/events/events_trashcan_open.d.ts +5 -3
- package/core/events/events_ui.d.ts +0 -1
- package/core/events/events_ui_base.d.ts +0 -2
- package/core/events/events_var_base.d.ts +1 -2
- package/core/events/events_var_create.d.ts +3 -3
- package/core/events/events_var_delete.d.ts +4 -2
- package/core/events/events_var_rename.d.ts +4 -2
- package/core/events/events_viewport.d.ts +13 -2
- package/core/events/utils.d.ts +0 -89
- package/core/events/workspace_events.d.ts +2 -6
- package/core/extensions.d.ts +0 -8
- package/core/field.d.ts +55 -21
- package/core/field_angle.d.ts +61 -51
- package/core/field_checkbox.d.ts +34 -15
- package/core/field_colour.d.ts +56 -46
- package/core/field_dropdown.d.ts +35 -19
- package/core/field_image.d.ts +10 -14
- package/core/field_input.d.ts +39 -25
- package/core/field_label.d.ts +7 -10
- package/core/field_label_serializable.d.ts +4 -6
- package/core/field_multilineinput.d.ts +36 -14
- package/core/field_number.d.ts +27 -19
- package/core/field_registry.d.ts +0 -3
- package/core/field_textinput.d.ts +36 -8
- package/core/field_variable.d.ts +30 -18
- package/core/flyout_base.d.ts +5 -6
- package/core/flyout_button.d.ts +2 -2
- package/core/flyout_horizontal.d.ts +0 -2
- package/core/flyout_metrics_manager.d.ts +0 -2
- package/core/flyout_vertical.d.ts +0 -2
- package/core/generator.d.ts +0 -1
- package/core/gesture.d.ts +5 -18
- package/core/grid.d.ts +0 -2
- package/core/icon.d.ts +0 -2
- package/core/inject.d.ts +0 -1
- package/core/input.d.ts +0 -3
- package/core/input_types.d.ts +0 -2
- package/core/insertion_marker_manager.d.ts +6 -6
- package/core/interfaces/i_ast_node_location.d.ts +0 -2
- package/core/interfaces/i_ast_node_location_svg.d.ts +0 -2
- package/core/interfaces/i_ast_node_location_with_block.d.ts +0 -2
- package/core/interfaces/i_autohideable.d.ts +0 -2
- package/core/interfaces/i_block_dragger.d.ts +0 -2
- package/core/interfaces/i_bounded_element.d.ts +0 -2
- package/core/interfaces/i_bubble.d.ts +0 -2
- package/core/interfaces/i_collapsible_toolbox_item.d.ts +0 -2
- package/core/interfaces/i_component.d.ts +0 -2
- package/core/interfaces/i_connection_checker.d.ts +0 -2
- package/core/interfaces/i_contextmenu.d.ts +0 -1
- package/core/interfaces/i_copyable.d.ts +3 -2
- package/core/interfaces/i_deletable.d.ts +0 -2
- package/core/interfaces/i_delete_area.d.ts +0 -2
- package/core/interfaces/i_drag_target.d.ts +0 -2
- package/core/interfaces/i_draggable.d.ts +0 -2
- package/core/interfaces/i_flyout.d.ts +0 -2
- package/core/interfaces/i_keyboard_accessible.d.ts +0 -2
- package/core/interfaces/i_legacy_procedure_blocks.d.ts +34 -0
- package/core/interfaces/i_metrics_manager.d.ts +8 -8
- package/core/interfaces/i_movable.d.ts +0 -2
- package/core/interfaces/i_positionable.d.ts +0 -2
- package/core/interfaces/i_procedure_block.d.ts +3 -0
- package/core/interfaces/i_procedure_model.d.ts +0 -5
- package/core/interfaces/i_registrable.d.ts +0 -2
- package/core/interfaces/i_selectable.d.ts +0 -2
- package/core/interfaces/i_selectable_toolbox_item.d.ts +4 -2
- package/core/interfaces/i_serializer.d.ts +0 -2
- package/core/interfaces/i_styleable.d.ts +0 -2
- package/core/interfaces/i_toolbox.d.ts +0 -2
- package/core/interfaces/i_toolbox_item.d.ts +0 -2
- package/core/interfaces/i_variable_backed_parameter_model.d.ts +17 -0
- package/core/internal_constants.d.ts +0 -5
- package/core/keyboard_nav/ast_node.d.ts +0 -3
- package/core/keyboard_nav/basic_cursor.d.ts +0 -3
- package/core/keyboard_nav/cursor.d.ts +0 -3
- package/core/keyboard_nav/marker.d.ts +0 -2
- package/core/keyboard_nav/tab_navigate_cursor.d.ts +0 -2
- package/core/marker_manager.d.ts +0 -2
- package/core/menu.d.ts +0 -2
- package/core/menuitem.d.ts +0 -2
- package/core/metrics_manager.d.ts +8 -8
- package/core/mutator.d.ts +0 -2
- package/core/names.d.ts +0 -3
- package/core/{procedures/observable_procedure_map.d.ts → observable_procedure_map.d.ts} +4 -5
- package/core/options.d.ts +0 -2
- package/core/positionable_helpers.d.ts +0 -7
- package/core/procedures.d.ts +7 -28
- package/core/registry.d.ts +0 -11
- package/core/render_management.d.ts +15 -0
- package/core/rendered_connection.d.ts +22 -9
- package/core/renderers/common/block_rendering.d.ts +0 -3
- package/core/renderers/common/constants.d.ts +6 -51
- package/core/renderers/common/debug.d.ts +0 -3
- package/core/renderers/common/debugger.d.ts +9 -23
- package/core/renderers/common/drawer.d.ts +0 -5
- package/core/renderers/common/i_path_object.d.ts +0 -17
- package/core/renderers/common/info.d.ts +2 -12
- package/core/renderers/common/marker_svg.d.ts +2 -4
- package/core/renderers/common/path_object.d.ts +0 -24
- package/core/renderers/common/renderer.d.ts +5 -20
- package/core/renderers/geras/constants.d.ts +0 -5
- package/core/renderers/geras/drawer.d.ts +2 -4
- package/core/renderers/geras/highlight_constants.d.ts +6 -17
- package/core/renderers/geras/highlighter.d.ts +0 -13
- package/core/renderers/geras/info.d.ts +2 -5
- package/core/renderers/geras/measurables/inline_input.d.ts +0 -3
- package/core/renderers/geras/measurables/statement_input.d.ts +0 -3
- package/core/renderers/geras/path_object.d.ts +0 -8
- package/core/renderers/geras/renderer.d.ts +5 -7
- package/core/renderers/measurables/base.d.ts +0 -3
- package/core/renderers/measurables/bottom_row.d.ts +0 -9
- package/core/renderers/measurables/connection.d.ts +0 -3
- package/core/renderers/measurables/external_value_input.d.ts +0 -3
- package/core/renderers/measurables/field.d.ts +0 -3
- package/core/renderers/measurables/hat.d.ts +0 -3
- package/core/renderers/measurables/icon.d.ts +2 -5
- package/core/renderers/measurables/in_row_spacer.d.ts +0 -3
- package/core/renderers/measurables/inline_input.d.ts +1 -4
- package/core/renderers/measurables/input_connection.d.ts +1 -4
- package/core/renderers/measurables/input_row.d.ts +0 -7
- package/core/renderers/measurables/jagged_edge.d.ts +2 -5
- package/core/renderers/measurables/next_connection.d.ts +0 -3
- package/core/renderers/measurables/output_connection.d.ts +0 -3
- package/core/renderers/measurables/previous_connection.d.ts +0 -3
- package/core/renderers/measurables/round_corner.d.ts +0 -3
- package/core/renderers/measurables/row.d.ts +0 -39
- package/core/renderers/measurables/spacer_row.d.ts +0 -3
- package/core/renderers/measurables/square_corner.d.ts +0 -3
- package/core/renderers/measurables/statement_input.d.ts +0 -3
- package/core/renderers/measurables/top_row.d.ts +0 -6
- package/core/renderers/measurables/types.d.ts +0 -31
- package/core/renderers/minimalist/constants.d.ts +2 -4
- package/core/renderers/minimalist/drawer.d.ts +0 -3
- package/core/renderers/minimalist/info.d.ts +0 -4
- package/core/renderers/minimalist/renderer.d.ts +0 -3
- package/core/renderers/thrasos/info.d.ts +0 -4
- package/core/renderers/thrasos/renderer.d.ts +3 -3
- package/core/renderers/zelos/constants.d.ts +3 -17
- package/core/renderers/zelos/drawer.d.ts +0 -3
- package/core/renderers/zelos/info.d.ts +0 -4
- package/core/renderers/zelos/marker_svg.d.ts +0 -2
- package/core/renderers/zelos/measurables/bottom_row.d.ts +0 -3
- package/core/renderers/zelos/measurables/inputs.d.ts +0 -3
- package/core/renderers/zelos/measurables/row_elements.d.ts +0 -3
- package/core/renderers/zelos/measurables/top_row.d.ts +0 -3
- package/core/renderers/zelos/path_object.d.ts +0 -9
- package/core/renderers/zelos/renderer.d.ts +3 -5
- package/core/scrollbar.d.ts +0 -2
- package/core/scrollbar_pair.d.ts +0 -2
- package/core/serialization/blocks.d.ts +3 -9
- package/core/serialization/exceptions.d.ts +0 -8
- package/core/serialization/priorities.d.ts +0 -4
- package/core/serialization/procedures.d.ts +0 -7
- package/core/serialization/registry.d.ts +0 -2
- package/core/serialization/variables.d.ts +0 -4
- package/core/serialization/workspaces.d.ts +0 -2
- package/core/shortcut_items.d.ts +0 -17
- package/core/shortcut_registry.d.ts +0 -2
- package/core/sprites.d.ts +0 -2
- package/core/theme/classic.d.ts +0 -2
- package/core/theme/zelos.d.ts +0 -2
- package/core/theme.d.ts +0 -2
- package/core/theme_manager.d.ts +3 -6
- package/core/toolbox/category.d.ts +5 -7
- package/core/toolbox/collapsible_category.d.ts +0 -4
- package/core/toolbox/separator.d.ts +0 -2
- package/core/toolbox/toolbox.d.ts +2 -5
- package/core/toolbox/toolbox_item.d.ts +0 -2
- package/core/tooltip.d.ts +0 -29
- package/core/touch.d.ts +0 -13
- package/core/trashcan.d.ts +0 -2
- package/core/utils/aria.d.ts +0 -6
- package/core/utils/array.d.ts +0 -1
- package/core/utils/colour.d.ts +0 -12
- package/core/utils/coordinate.d.ts +0 -2
- package/core/utils/deprecation.d.ts +0 -1
- package/core/utils/dom.d.ts +0 -25
- package/core/utils/idgenerator.d.ts +0 -2
- package/core/utils/keycodes.d.ts +0 -2
- package/core/utils/math.d.ts +0 -3
- package/core/utils/metrics.d.ts +0 -1
- package/core/utils/object.d.ts +0 -4
- package/core/utils/parsing.d.ts +0 -4
- package/core/utils/rect.d.ts +0 -2
- package/core/utils/size.d.ts +0 -2
- package/core/utils/string.d.ts +0 -6
- package/core/utils/style.d.ts +0 -8
- package/core/utils/svg.d.ts +0 -2
- package/core/utils/svg_math.d.ts +0 -6
- package/core/utils/svg_paths.d.ts +0 -8
- package/core/utils/toolbox.d.ts +2 -35
- package/core/utils/useragent.d.ts +0 -8
- package/core/utils/xml.d.ts +9 -8
- package/core/utils.d.ts +0 -12
- package/core/variable_map.d.ts +1 -3
- package/core/variable_model.d.ts +0 -1
- package/core/variables.d.ts +13 -17
- package/core/variables_dynamic.d.ts +0 -4
- package/core/warning.d.ts +0 -2
- package/core/widgetdiv.d.ts +0 -10
- package/core/workspace.d.ts +3 -3
- package/core/workspace_audio.d.ts +0 -2
- package/core/workspace_comment.d.ts +1 -3
- package/core/workspace_comment_svg.d.ts +1 -3
- package/core/workspace_dragger.d.ts +0 -2
- package/core/workspace_svg.d.ts +4 -7
- package/core/xml.d.ts +1 -13
- package/core/zoom_controls.d.ts +4 -15
- package/dart_compressed.js +199 -199
- package/dart_compressed.js.map +1 -1
- package/javascript_compressed.js +168 -168
- package/javascript_compressed.js.map +1 -1
- package/lua_compressed.js +211 -211
- package/lua_compressed.js.map +1 -1
- package/msg/bn.js +2 -2
- package/msg/bs.js +7 -7
- package/msg/de.js +1 -1
- package/msg/fi.js +1 -1
- package/msg/fr.js +3 -3
- package/msg/ia.js +5 -5
- package/msg/kn.js +5 -5
- package/msg/ko.js +1 -1
- package/msg/lb.js +22 -22
- package/msg/sd.js +9 -9
- package/msg/skr-arab.js +2 -2
- package/msg/sl.js +18 -18
- package/msg/sw.js +1 -1
- package/msg/zh-hans.js +6 -6
- package/msg/zh-hant.js +2 -2
- package/package.json +9 -9
- package/php_compressed.js +185 -185
- package/php_compressed.js.map +1 -1
- package/python_compressed.js +138 -138
- package/python_compressed.js.map +1 -1
- package/core/events/events_procedure_base.d.ts +0 -26
- package/core/events/events_procedure_change_return.d.ts +0 -40
- package/core/events/events_procedure_create.d.ts +0 -34
- package/core/events/events_procedure_delete.d.ts +0 -32
- package/core/events/events_procedure_enable.d.ts +0 -34
- package/core/events/events_procedure_parameter_base.d.ts +0 -26
- package/core/events/events_procedure_parameter_create.d.ts +0 -42
- package/core/events/events_procedure_parameter_delete.d.ts +0 -41
- package/core/events/events_procedure_parameter_rename.d.ts +0 -36
- package/core/events/events_procedure_rename.d.ts +0 -35
- package/core/procedures/observable_parameter_model.d.ts +0 -62
- package/core/procedures/observable_procedure_model.d.ts +0 -75
- package/core/procedures/update_procedures.d.ts +0 -13
- package/core/utils/sentinel.d.ts +0 -13
package/core/theme.d.ts
CHANGED
package/core/theme_manager.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ import type { Workspace } from './workspace.js';
|
|
|
8
8
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
9
9
|
/**
|
|
10
10
|
* Class for storing and updating a workspace's theme and UI components.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.ThemeManager
|
|
13
11
|
*/
|
|
14
12
|
export declare class ThemeManager {
|
|
15
13
|
private readonly workspace;
|
|
@@ -17,7 +15,6 @@ export declare class ThemeManager {
|
|
|
17
15
|
/** A list of workspaces that are subscribed to this theme. */
|
|
18
16
|
private subscribedWorkspaces_;
|
|
19
17
|
private componentDB;
|
|
20
|
-
owner_: any;
|
|
21
18
|
/**
|
|
22
19
|
* @param workspace The main workspace.
|
|
23
20
|
* @param theme The workspace theme.
|
|
@@ -63,14 +60,14 @@ export declare class ThemeManager {
|
|
|
63
60
|
* @param propertyName The inline style property name to update.
|
|
64
61
|
* @internal
|
|
65
62
|
*/
|
|
66
|
-
subscribe(element:
|
|
63
|
+
subscribe(element: HTMLElement | SVGElement, componentName: string, propertyName: string): void;
|
|
67
64
|
/**
|
|
68
65
|
* Unsubscribe an element to changes to the selected theme.
|
|
69
66
|
*
|
|
70
67
|
* @param element The element to unsubscribe.
|
|
71
68
|
* @internal
|
|
72
69
|
*/
|
|
73
|
-
unsubscribe(element:
|
|
70
|
+
unsubscribe(element: HTMLElement | SVGElement): void;
|
|
74
71
|
/**
|
|
75
72
|
* Dispose of this theme manager.
|
|
76
73
|
*
|
|
@@ -82,7 +79,7 @@ export declare class ThemeManager {
|
|
|
82
79
|
export declare namespace ThemeManager {
|
|
83
80
|
/** The type for a Blockly UI Component. */
|
|
84
81
|
interface Component {
|
|
85
|
-
element:
|
|
82
|
+
element: HTMLElement | SVGElement;
|
|
86
83
|
propertyName: string;
|
|
87
84
|
}
|
|
88
85
|
}
|
|
@@ -10,8 +10,6 @@ import type { CategoryInfo, FlyoutDefinition, FlyoutItemInfoArray } from '../uti
|
|
|
10
10
|
import { ToolboxItem } from './toolbox_item.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for a category in a toolbox.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.ToolboxCategory
|
|
15
13
|
*/
|
|
16
14
|
export declare class ToolboxCategory extends ToolboxItem implements ISelectableToolboxItem {
|
|
17
15
|
/** Name used for registering a toolbox category. */
|
|
@@ -30,15 +28,15 @@ export declare class ToolboxCategory extends ToolboxItem implements ISelectableT
|
|
|
30
28
|
protected name_: string;
|
|
31
29
|
/** The colour of the category. */
|
|
32
30
|
protected colour_: string;
|
|
33
|
-
/** The
|
|
31
|
+
/** The HTML container for the category. */
|
|
34
32
|
protected htmlDiv_: HTMLDivElement | null;
|
|
35
|
-
/** The
|
|
33
|
+
/** The HTML element for the category row. */
|
|
36
34
|
protected rowDiv_: HTMLDivElement | null;
|
|
37
|
-
/** The
|
|
35
|
+
/** The HTML element that holds children elements of the category row. */
|
|
38
36
|
protected rowContents_: HTMLDivElement | null;
|
|
39
|
-
/** The
|
|
37
|
+
/** The HTML element for the toolbox icon. */
|
|
40
38
|
protected iconDom_: Element | null;
|
|
41
|
-
/** The
|
|
39
|
+
/** The HTML element for the toolbox label. */
|
|
42
40
|
protected labelDom_: Element | null;
|
|
43
41
|
protected cssConfig_: CssConfig;
|
|
44
42
|
/** True if the category is meant to be hidden, false otherwise. */
|
|
@@ -10,8 +10,6 @@ import * as toolbox from '../utils/toolbox.js';
|
|
|
10
10
|
import { ToolboxCategory } from './category.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for a category in a toolbox that can be collapsed.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.CollapsibleToolboxCategory
|
|
15
13
|
*/
|
|
16
14
|
export declare class CollapsibleToolboxCategory extends ToolboxCategory implements ICollapsibleToolboxItem {
|
|
17
15
|
/** Name used for registering a collapsible toolbox category. */
|
|
@@ -22,8 +20,6 @@ export declare class CollapsibleToolboxCategory extends ToolboxCategory implemen
|
|
|
22
20
|
protected expanded_: boolean;
|
|
23
21
|
/** The child toolbox items for this category. */
|
|
24
22
|
protected toolboxItems_: IToolboxItem[];
|
|
25
|
-
flyoutItems_: any;
|
|
26
|
-
isHidden_: any;
|
|
27
23
|
/**
|
|
28
24
|
* @param categoryDef The information needed to create a category in the
|
|
29
25
|
* toolbox.
|
|
@@ -9,8 +9,6 @@ import { ToolboxItem } from './toolbox_item.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* Class for a toolbox separator. This is the thin visual line that appears on
|
|
11
11
|
* the toolbox. This item is not interactable.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.ToolboxSeparator
|
|
14
12
|
*/
|
|
15
13
|
export declare class ToolboxSeparator extends ToolboxItem {
|
|
16
14
|
/** Name used for registering a toolbox separator. */
|
|
@@ -21,8 +21,6 @@ import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
|
21
21
|
/**
|
|
22
22
|
* Class for a Toolbox.
|
|
23
23
|
* Creates the toolbox's DOM.
|
|
24
|
-
*
|
|
25
|
-
* @alias Blockly.Toolbox
|
|
26
24
|
*/
|
|
27
25
|
export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeyboardAccessible, IStyleable, IToolbox {
|
|
28
26
|
/**
|
|
@@ -32,9 +30,9 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
32
30
|
id: string;
|
|
33
31
|
protected toolboxDef_: toolbox.ToolboxInfo;
|
|
34
32
|
private readonly horizontalLayout_;
|
|
35
|
-
/** The
|
|
33
|
+
/** The HTML container for the toolbox. */
|
|
36
34
|
HtmlDiv: HTMLDivElement | null;
|
|
37
|
-
/** The
|
|
35
|
+
/** The HTML container for the contents of a toolbox. */
|
|
38
36
|
protected contentsDiv_: HTMLDivElement | null;
|
|
39
37
|
/** Whether the Toolbox is visible. */
|
|
40
38
|
protected isVisible_: boolean;
|
|
@@ -61,7 +59,6 @@ export declare class Toolbox extends DeleteArea implements IAutoHideable, IKeybo
|
|
|
61
59
|
* Ex: [[node, name, func], [node, name, func]].
|
|
62
60
|
*/
|
|
63
61
|
protected boundEvents_: browserEvents.Data[];
|
|
64
|
-
wouldDelete_: any;
|
|
65
62
|
/** The workspace this toolbox is on. */
|
|
66
63
|
protected readonly workspace_: WorkspaceSvg;
|
|
67
64
|
/** @param workspace The workspace in which to create new blocks. */
|
|
@@ -10,8 +10,6 @@ import type * as toolbox from '../utils/toolbox.js';
|
|
|
10
10
|
import type { WorkspaceSvg } from '../workspace_svg.js';
|
|
11
11
|
/**
|
|
12
12
|
* Class for an item in the toolbox.
|
|
13
|
-
*
|
|
14
|
-
* @alias Blockly.ToolboxItem
|
|
15
13
|
*/
|
|
16
14
|
export declare class ToolboxItem implements IToolboxItem {
|
|
17
15
|
protected id_: string;
|
package/core/tooltip.d.ts
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
* Either a string, an object containing a tooltip property, or a function which
|
|
9
9
|
* returns either a string, or another arbitrarily nested function which
|
|
10
10
|
* eventually unwinds to a string.
|
|
11
|
-
*
|
|
12
|
-
* @alias Blockly.Tooltip.TipInfo
|
|
13
11
|
*/
|
|
14
12
|
export type TipInfo = string | {
|
|
15
13
|
tooltip: any;
|
|
@@ -19,8 +17,6 @@ export type TipInfo = string | {
|
|
|
19
17
|
* 1st parameter: the div element to render content into.
|
|
20
18
|
* 2nd parameter: the element being moused over (i.e., the element for which the
|
|
21
19
|
* tooltip should be shown).
|
|
22
|
-
*
|
|
23
|
-
* @alias Blockly.Tooltip.CustomTooltip
|
|
24
20
|
*/
|
|
25
21
|
export type CustomTooltip = (p1: Element, p2: Element) => any;
|
|
26
22
|
/**
|
|
@@ -28,7 +24,6 @@ export type CustomTooltip = (p1: Element, p2: Element) => any;
|
|
|
28
24
|
* tooltip UI.
|
|
29
25
|
*
|
|
30
26
|
* @param customFn A custom tooltip used to render an alternate tooltip UI.
|
|
31
|
-
* @alias Blockly.Tooltip.setCustomTooltip
|
|
32
27
|
*/
|
|
33
28
|
export declare function setCustomTooltip(customFn: CustomTooltip): void;
|
|
34
29
|
/**
|
|
@@ -41,50 +36,36 @@ export declare function getCustomTooltip(): CustomTooltip | undefined;
|
|
|
41
36
|
* Returns whether or not a tooltip is showing
|
|
42
37
|
*
|
|
43
38
|
* @returns True if a tooltip is showing
|
|
44
|
-
* @alias Blockly.Tooltip.isVisible
|
|
45
39
|
*/
|
|
46
40
|
export declare function isVisible(): boolean;
|
|
47
41
|
/**
|
|
48
42
|
* Maximum width (in characters) of a tooltip.
|
|
49
|
-
*
|
|
50
|
-
* @alias Blockly.Tooltip.LIMIT
|
|
51
43
|
*/
|
|
52
44
|
export declare const LIMIT = 50;
|
|
53
45
|
/**
|
|
54
46
|
* Horizontal offset between mouse cursor and tooltip.
|
|
55
|
-
*
|
|
56
|
-
* @alias Blockly.Tooltip.OFFSET_X
|
|
57
47
|
*/
|
|
58
48
|
export declare const OFFSET_X = 0;
|
|
59
49
|
/**
|
|
60
50
|
* Vertical offset between mouse cursor and tooltip.
|
|
61
|
-
*
|
|
62
|
-
* @alias Blockly.Tooltip.OFFSET_Y
|
|
63
51
|
*/
|
|
64
52
|
export declare const OFFSET_Y = 10;
|
|
65
53
|
/**
|
|
66
54
|
* Radius mouse can move before killing tooltip.
|
|
67
|
-
*
|
|
68
|
-
* @alias Blockly.Tooltip.RADIUS_OK
|
|
69
55
|
*/
|
|
70
56
|
export declare const RADIUS_OK = 10;
|
|
71
57
|
/**
|
|
72
58
|
* Delay before tooltip appears.
|
|
73
|
-
*
|
|
74
|
-
* @alias Blockly.Tooltip.HOVER_MS
|
|
75
59
|
*/
|
|
76
60
|
export declare const HOVER_MS = 750;
|
|
77
61
|
/**
|
|
78
62
|
* Horizontal padding between tooltip and screen edge.
|
|
79
|
-
*
|
|
80
|
-
* @alias Blockly.Tooltip.MARGINS
|
|
81
63
|
*/
|
|
82
64
|
export declare const MARGINS = 5;
|
|
83
65
|
/**
|
|
84
66
|
* Returns the HTML tooltip container.
|
|
85
67
|
*
|
|
86
68
|
* @returns The HTML tooltip container.
|
|
87
|
-
* @alias Blockly.Tooltip.getDiv
|
|
88
69
|
*/
|
|
89
70
|
export declare function getDiv(): HTMLDivElement | null;
|
|
90
71
|
/**
|
|
@@ -92,47 +73,38 @@ export declare function getDiv(): HTMLDivElement | null;
|
|
|
92
73
|
*
|
|
93
74
|
* @param object The object to get the tooltip text of.
|
|
94
75
|
* @returns The tooltip text of the element.
|
|
95
|
-
* @alias Blockly.Tooltip.getTooltipOfObject
|
|
96
76
|
*/
|
|
97
77
|
export declare function getTooltipOfObject(object: any | null): string;
|
|
98
78
|
/**
|
|
99
79
|
* Create the tooltip div and inject it onto the page.
|
|
100
|
-
*
|
|
101
|
-
* @alias Blockly.Tooltip.createDom
|
|
102
80
|
*/
|
|
103
81
|
export declare function createDom(): void;
|
|
104
82
|
/**
|
|
105
83
|
* Binds the required mouse events onto an SVG element.
|
|
106
84
|
*
|
|
107
85
|
* @param element SVG element onto which tooltip is to be bound.
|
|
108
|
-
* @alias Blockly.Tooltip.bindMouseEvents
|
|
109
86
|
*/
|
|
110
87
|
export declare function bindMouseEvents(element: Element): void;
|
|
111
88
|
/**
|
|
112
89
|
* Unbinds tooltip mouse events from the SVG element.
|
|
113
90
|
*
|
|
114
91
|
* @param element SVG element onto which tooltip is bound.
|
|
115
|
-
* @alias Blockly.Tooltip.unbindMouseEvents
|
|
116
92
|
*/
|
|
117
93
|
export declare function unbindMouseEvents(element: Element | null): void;
|
|
118
94
|
/**
|
|
119
95
|
* Dispose of the tooltip.
|
|
120
96
|
*
|
|
121
|
-
* @alias Blockly.Tooltip.dispose
|
|
122
97
|
* @internal
|
|
123
98
|
*/
|
|
124
99
|
export declare function dispose(): void;
|
|
125
100
|
/**
|
|
126
101
|
* Hide the tooltip.
|
|
127
|
-
*
|
|
128
|
-
* @alias Blockly.Tooltip.hide
|
|
129
102
|
*/
|
|
130
103
|
export declare function hide(): void;
|
|
131
104
|
/**
|
|
132
105
|
* Hide any in-progress tooltips and block showing new tooltips until the next
|
|
133
106
|
* call to unblock().
|
|
134
107
|
*
|
|
135
|
-
* @alias Blockly.Tooltip.block
|
|
136
108
|
* @internal
|
|
137
109
|
*/
|
|
138
110
|
export declare function block(): void;
|
|
@@ -140,7 +112,6 @@ export declare function block(): void;
|
|
|
140
112
|
* Unblock tooltips: allow them to be scheduled and shown according to their own
|
|
141
113
|
* logic.
|
|
142
114
|
*
|
|
143
|
-
* @alias Blockly.Tooltip.unblock
|
|
144
115
|
* @internal
|
|
145
116
|
*/
|
|
146
117
|
export declare function unblock(): void;
|
package/core/touch.d.ts
CHANGED
|
@@ -23,8 +23,6 @@ export declare const TOUCH_ENABLED: boolean;
|
|
|
23
23
|
/**
|
|
24
24
|
* The TOUCH_MAP lookup dictionary specifies additional touch events to fire,
|
|
25
25
|
* in conjunction with mouse events.
|
|
26
|
-
*
|
|
27
|
-
* @alias Blockly.Touch.TOUCH_MAP
|
|
28
26
|
*/
|
|
29
27
|
export declare const TOUCH_MAP: {
|
|
30
28
|
[key: string]: string[];
|
|
@@ -38,7 +36,6 @@ export declare const TOUCH_MAP: {
|
|
|
38
36
|
*
|
|
39
37
|
* @param e Touch start event.
|
|
40
38
|
* @param gesture The gesture that triggered this longStart.
|
|
41
|
-
* @alias Blockly.Touch.longStart
|
|
42
39
|
* @internal
|
|
43
40
|
*/
|
|
44
41
|
export declare function longStart(e: PointerEvent, gesture: Gesture): void;
|
|
@@ -46,7 +43,6 @@ export declare function longStart(e: PointerEvent, gesture: Gesture): void;
|
|
|
46
43
|
* Nope, that's not a long-press. Either touchend or touchcancel was fired,
|
|
47
44
|
* or a drag hath begun. Kill the queued long-press task.
|
|
48
45
|
*
|
|
49
|
-
* @alias Blockly.Touch.longStop
|
|
50
46
|
* @internal
|
|
51
47
|
*/
|
|
52
48
|
export declare function longStop(): void;
|
|
@@ -54,8 +50,6 @@ export declare function longStop(): void;
|
|
|
54
50
|
* Clear the touch identifier that tracks which touch stream to pay attention
|
|
55
51
|
* to. This ends the current drag/gesture and allows other pointers to be
|
|
56
52
|
* captured.
|
|
57
|
-
*
|
|
58
|
-
* @alias Blockly.Touch.clearTouchIdentifier
|
|
59
53
|
*/
|
|
60
54
|
export declare function clearTouchIdentifier(): void;
|
|
61
55
|
/**
|
|
@@ -66,7 +60,6 @@ export declare function clearTouchIdentifier(): void;
|
|
|
66
60
|
* @param e The event to check.
|
|
67
61
|
* @returns True if this event should be passed through to the registered
|
|
68
62
|
* handler; false if it should be blocked.
|
|
69
|
-
* @alias Blockly.Touch.shouldHandleEvent
|
|
70
63
|
*/
|
|
71
64
|
export declare function shouldHandleEvent(e: Event): boolean;
|
|
72
65
|
/**
|
|
@@ -74,7 +67,6 @@ export declare function shouldHandleEvent(e: Event): boolean;
|
|
|
74
67
|
*
|
|
75
68
|
* @param e Pointer event.
|
|
76
69
|
* @returns The pointerId of the event.
|
|
77
|
-
* @alias Blockly.Touch.getTouchIdentifierFromEvent
|
|
78
70
|
*/
|
|
79
71
|
export declare function getTouchIdentifierFromEvent(e: PointerEvent): string;
|
|
80
72
|
/**
|
|
@@ -86,7 +78,6 @@ export declare function getTouchIdentifierFromEvent(e: PointerEvent): string;
|
|
|
86
78
|
* @param e Pointer event.
|
|
87
79
|
* @returns Whether the identifier on the event matches the current saved
|
|
88
80
|
* identifier.
|
|
89
|
-
* @alias Blockly.Touch.checkTouchIdentifier
|
|
90
81
|
*/
|
|
91
82
|
export declare function checkTouchIdentifier(e: PointerEvent): boolean;
|
|
92
83
|
/**
|
|
@@ -94,7 +85,6 @@ export declare function checkTouchIdentifier(e: PointerEvent): boolean;
|
|
|
94
85
|
* make a touch event work in a mouse event handler.
|
|
95
86
|
*
|
|
96
87
|
* @param e A touch event.
|
|
97
|
-
* @alias Blockly.Touch.setClientFromTouch
|
|
98
88
|
*/
|
|
99
89
|
export declare function setClientFromTouch(e: Event | PseudoEvent): void;
|
|
100
90
|
/**
|
|
@@ -102,7 +92,6 @@ export declare function setClientFromTouch(e: Event | PseudoEvent): void;
|
|
|
102
92
|
*
|
|
103
93
|
* @param e An event.
|
|
104
94
|
* @returns True if it is a mouse, touch, or pointer event; false otherwise.
|
|
105
|
-
* @alias Blockly.Touch.isMouseOrTouchEvent
|
|
106
95
|
*/
|
|
107
96
|
export declare function isMouseOrTouchEvent(e: Event | PseudoEvent): boolean;
|
|
108
97
|
/**
|
|
@@ -110,7 +99,6 @@ export declare function isMouseOrTouchEvent(e: Event | PseudoEvent): boolean;
|
|
|
110
99
|
*
|
|
111
100
|
* @param e An event.
|
|
112
101
|
* @returns True if it is a touch or pointer event; false otherwise.
|
|
113
|
-
* @alias Blockly.Touch.isTouchEvent
|
|
114
102
|
*/
|
|
115
103
|
export declare function isTouchEvent(e: Event | PseudoEvent): boolean;
|
|
116
104
|
/**
|
|
@@ -121,7 +109,6 @@ export declare function isTouchEvent(e: Event | PseudoEvent): boolean;
|
|
|
121
109
|
* @returns An array of events or pseudo events.
|
|
122
110
|
* Each pseudo-touch event will have exactly one changed touch and there
|
|
123
111
|
* will be no real touch events.
|
|
124
|
-
* @alias Blockly.Touch.splitEventByTouches
|
|
125
112
|
*/
|
|
126
113
|
export declare function splitEventByTouches(e: Event): Array<Event | PseudoEvent>;
|
|
127
114
|
export {};
|
package/core/trashcan.d.ts
CHANGED
|
@@ -14,8 +14,6 @@ import { Rect } from './utils/rect.js';
|
|
|
14
14
|
import type { WorkspaceSvg } from './workspace_svg.js';
|
|
15
15
|
/**
|
|
16
16
|
* Class for a trash can.
|
|
17
|
-
*
|
|
18
|
-
* @alias Blockly.Trashcan
|
|
19
17
|
*/
|
|
20
18
|
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable {
|
|
21
19
|
private workspace;
|
package/core/utils/aria.d.ts
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* ARIA role values.
|
|
8
8
|
* Copied from Closure's goog.a11y.aria.Role
|
|
9
|
-
*
|
|
10
|
-
* @alias Blockly.utils.aria.Role
|
|
11
9
|
*/
|
|
12
10
|
export declare enum Role {
|
|
13
11
|
GRID = "grid",
|
|
@@ -26,8 +24,6 @@ export declare enum Role {
|
|
|
26
24
|
/**
|
|
27
25
|
* ARIA states and properties.
|
|
28
26
|
* Copied from Closure's goog.a11y.aria.State
|
|
29
|
-
*
|
|
30
|
-
* @alias Blockly.utils.aria.State
|
|
31
27
|
*/
|
|
32
28
|
export declare enum State {
|
|
33
29
|
ACTIVEDESCENDANT = "activedescendant",
|
|
@@ -53,7 +49,6 @@ export declare enum State {
|
|
|
53
49
|
*
|
|
54
50
|
* @param element DOM node to set role of.
|
|
55
51
|
* @param roleName Role name.
|
|
56
|
-
* @alias Blockly.utils.aria.setRole
|
|
57
52
|
*/
|
|
58
53
|
export declare function setRole(element: Element, roleName: Role): void;
|
|
59
54
|
/**
|
|
@@ -65,7 +60,6 @@ export declare function setRole(element: Element, roleName: Role): void;
|
|
|
65
60
|
* Automatically adds prefix 'aria-' to the state name if the attribute is
|
|
66
61
|
* not an extra attribute.
|
|
67
62
|
* @param value Value for the state attribute.
|
|
68
|
-
* @alias Blockly.utils.aria.setState
|
|
69
63
|
*/
|
|
70
64
|
export declare function setState(element: Element, stateName: State, value: string | boolean | number | string[]): void;
|
|
71
65
|
//# sourceMappingURL=aria.d.ts.map
|
package/core/utils/array.d.ts
CHANGED
package/core/utils/colour.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Get the richness of block colours, regardless of the hue.
|
|
8
8
|
*
|
|
9
|
-
* @alias Blockly.utils.colour.getHsvSaturation
|
|
10
9
|
* @returns The current richness.
|
|
11
10
|
* @internal
|
|
12
11
|
*/
|
|
@@ -16,14 +15,12 @@ export declare function getHsvSaturation(): number;
|
|
|
16
15
|
*
|
|
17
16
|
* @param newSaturation The new richness, in the range of 0 (inclusive) to 1
|
|
18
17
|
* (exclusive)
|
|
19
|
-
* @alias Blockly.utils.colour.setHsvSaturation
|
|
20
18
|
* @internal
|
|
21
19
|
*/
|
|
22
20
|
export declare function setHsvSaturation(newSaturation: number): void;
|
|
23
21
|
/**
|
|
24
22
|
* Get the intensity of block colours, regardless of the hue.
|
|
25
23
|
*
|
|
26
|
-
* @alias Blockly.utils.colour.getHsvValue
|
|
27
24
|
* @returns The current intensity.
|
|
28
25
|
* @internal
|
|
29
26
|
*/
|
|
@@ -33,7 +30,6 @@ export declare function getHsvValue(): number;
|
|
|
33
30
|
*
|
|
34
31
|
* @param newValue The new intensity, in the range of 0 (inclusive) to 1
|
|
35
32
|
* (exclusive)
|
|
36
|
-
* @alias Blockly.utils.colour.setHsvValue
|
|
37
33
|
* @internal
|
|
38
34
|
*/
|
|
39
35
|
export declare function setHsvValue(newValue: number): void;
|
|
@@ -48,7 +44,6 @@ export declare function setHsvValue(newValue: number): void;
|
|
|
48
44
|
* @param str Colour in some CSS format.
|
|
49
45
|
* @returns A string containing a hex representation of the colour, or null if
|
|
50
46
|
* can't be parsed.
|
|
51
|
-
* @alias Blockly.utils.colour.parse
|
|
52
47
|
*/
|
|
53
48
|
export declare function parse(str: string | number): string | null;
|
|
54
49
|
/**
|
|
@@ -58,7 +53,6 @@ export declare function parse(str: string | number): string | null;
|
|
|
58
53
|
* @param g Amount of green, int between 0 and 255.
|
|
59
54
|
* @param b Amount of blue, int between 0 and 255.
|
|
60
55
|
* @returns Hex representation of the colour.
|
|
61
|
-
* @alias Blockly.utils.colour.rgbToHex
|
|
62
56
|
*/
|
|
63
57
|
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
64
58
|
/**
|
|
@@ -67,7 +61,6 @@ export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
|
67
61
|
* @param colour String representing colour in any colour format ('#ff0000',
|
|
68
62
|
* 'red', '0xff000', etc).
|
|
69
63
|
* @returns RGB representation of the colour.
|
|
70
|
-
* @alias Blockly.utils.colour.hexToRgb
|
|
71
64
|
*/
|
|
72
65
|
export declare function hexToRgb(colour: string): number[];
|
|
73
66
|
/**
|
|
@@ -77,7 +70,6 @@ export declare function hexToRgb(colour: string): number[];
|
|
|
77
70
|
* @param s Saturation value in [0, 1].
|
|
78
71
|
* @param v Brightness in [0, 255].
|
|
79
72
|
* @returns Hex representation of the colour.
|
|
80
|
-
* @alias Blockly.utils.colour.hsvToHex
|
|
81
73
|
*/
|
|
82
74
|
export declare function hsvToHex(h: number, s: number, v: number): string;
|
|
83
75
|
/**
|
|
@@ -89,7 +81,6 @@ export declare function hsvToHex(h: number, s: number, v: number): string;
|
|
|
89
81
|
* @param factor The weight to be given to colour1 over colour2.
|
|
90
82
|
* Values should be in the range [0, 1].
|
|
91
83
|
* @returns Combined colour represented in hex.
|
|
92
|
-
* @alias Blockly.utils.colour.blend
|
|
93
84
|
*/
|
|
94
85
|
export declare function blend(colour1: string, colour2: string, factor: number): string | null;
|
|
95
86
|
/**
|
|
@@ -97,8 +88,6 @@ export declare function blend(colour1: string, colour2: string, factor: number):
|
|
|
97
88
|
* https://www.w3.org/TR/2018/REC-css-color-3-20180619/#html4
|
|
98
89
|
* The keys of this map are the lowercase "readable" names of the colours,
|
|
99
90
|
* while the values are the "hex" values.
|
|
100
|
-
*
|
|
101
|
-
* @alias Blockly.utils.colour.names
|
|
102
91
|
*/
|
|
103
92
|
export declare const names: {
|
|
104
93
|
[key: string]: string;
|
|
@@ -108,7 +97,6 @@ export declare const names: {
|
|
|
108
97
|
*
|
|
109
98
|
* @param hue Hue on a colour wheel (0-360).
|
|
110
99
|
* @returns RGB code, e.g. '#5ba65b'.
|
|
111
|
-
* @alias Blockly.utils.colour.hueToHex
|
|
112
100
|
*/
|
|
113
101
|
export declare function hueToHex(hue: number): string;
|
|
114
102
|
//# sourceMappingURL=colour.d.ts.map
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* @param deletionDate The date of deletion. Prefer 'version n.0.0'
|
|
13
13
|
* format, and fall back to 'month yyyy' or 'quarter yyyy' format.
|
|
14
14
|
* @param opt_use The name of a function or property to use instead, if any.
|
|
15
|
-
* @alias Blockly.utils.deprecation.warn
|
|
16
15
|
* @internal
|
|
17
16
|
*/
|
|
18
17
|
export declare function warn(name: string, deprecationDate: string, deletionDate: string, opt_use?: string): void;
|
package/core/utils/dom.d.ts
CHANGED
|
@@ -6,27 +6,19 @@
|
|
|
6
6
|
import type { Svg } from './svg.js';
|
|
7
7
|
/**
|
|
8
8
|
* Required name space for SVG elements.
|
|
9
|
-
*
|
|
10
|
-
* @alias Blockly.utils.dom.SVG_NS
|
|
11
9
|
*/
|
|
12
10
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
13
11
|
/**
|
|
14
12
|
* Required name space for HTML elements.
|
|
15
|
-
*
|
|
16
|
-
* @alias Blockly.utils.dom.HTML_NS
|
|
17
13
|
*/
|
|
18
14
|
export declare const HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
19
15
|
/**
|
|
20
16
|
* Required name space for XLINK elements.
|
|
21
|
-
*
|
|
22
|
-
* @alias Blockly.utils.dom.XLINK_NS
|
|
23
17
|
*/
|
|
24
18
|
export declare const XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
25
19
|
/**
|
|
26
20
|
* Node type constants.
|
|
27
21
|
* https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
28
|
-
*
|
|
29
|
-
* @alias Blockly.utils.dom.NodeType
|
|
30
22
|
*/
|
|
31
23
|
export declare enum NodeType {
|
|
32
24
|
ELEMENT_NODE = 1,
|
|
@@ -41,7 +33,6 @@ export declare enum NodeType {
|
|
|
41
33
|
* @param attrs Dictionary of attribute names and values.
|
|
42
34
|
* @param opt_parent Optional parent on which to append the element.
|
|
43
35
|
* @returns if name is a string or a more specific type if it a member of Svg.
|
|
44
|
-
* @alias Blockly.utils.dom.createSvgElement
|
|
45
36
|
*/
|
|
46
37
|
export declare function createSvgElement<T extends SVGElement>(name: string | Svg<T>, attrs: {
|
|
47
38
|
[key: string]: string | number;
|
|
@@ -54,7 +45,6 @@ export declare function createSvgElement<T extends SVGElement>(name: string | Sv
|
|
|
54
45
|
* @param element DOM element to add class to.
|
|
55
46
|
* @param className Name of class to add.
|
|
56
47
|
* @returns True if class was added, false if already present.
|
|
57
|
-
* @alias Blockly.utils.dom.addClass
|
|
58
48
|
*/
|
|
59
49
|
export declare function addClass(element: Element, className: string): boolean;
|
|
60
50
|
/**
|
|
@@ -62,7 +52,6 @@ export declare function addClass(element: Element, className: string): boolean;
|
|
|
62
52
|
*
|
|
63
53
|
* @param element DOM element to remove classes from.
|
|
64
54
|
* @param classNames A string of one or multiple class names for an element.
|
|
65
|
-
* @alias Blockly.utils.dom.removeClasses
|
|
66
55
|
*/
|
|
67
56
|
export declare function removeClasses(element: Element, classNames: string): void;
|
|
68
57
|
/**
|
|
@@ -73,7 +62,6 @@ export declare function removeClasses(element: Element, classNames: string): voi
|
|
|
73
62
|
* @param element DOM element to remove class from.
|
|
74
63
|
* @param className Name of class to remove.
|
|
75
64
|
* @returns True if class was removed, false if never present.
|
|
76
|
-
* @alias Blockly.utils.dom.removeClass
|
|
77
65
|
*/
|
|
78
66
|
export declare function removeClass(element: Element, className: string): boolean;
|
|
79
67
|
/**
|
|
@@ -82,7 +70,6 @@ export declare function removeClass(element: Element, className: string): boolea
|
|
|
82
70
|
* @param element DOM element to check.
|
|
83
71
|
* @param className Name of class to check.
|
|
84
72
|
* @returns True if class exists, false otherwise.
|
|
85
|
-
* @alias Blockly.utils.dom.hasClass
|
|
86
73
|
*/
|
|
87
74
|
export declare function hasClass(element: Element, className: string): boolean;
|
|
88
75
|
/**
|
|
@@ -90,7 +77,6 @@ export declare function hasClass(element: Element, className: string): boolean;
|
|
|
90
77
|
*
|
|
91
78
|
* @param node The node to remove.
|
|
92
79
|
* @returns The node removed if removed; else, null.
|
|
93
|
-
* @alias Blockly.utils.dom.removeNode
|
|
94
80
|
*/
|
|
95
81
|
export declare function removeNode(node: Node | null): Node | null;
|
|
96
82
|
/**
|
|
@@ -99,7 +85,6 @@ export declare function removeNode(node: Node | null): Node | null;
|
|
|
99
85
|
*
|
|
100
86
|
* @param newNode New element to insert.
|
|
101
87
|
* @param refNode Existing element to precede new node.
|
|
102
|
-
* @alias Blockly.utils.dom.insertAfter
|
|
103
88
|
*/
|
|
104
89
|
export declare function insertAfter(newNode: Element, refNode: Element): void;
|
|
105
90
|
/**
|
|
@@ -108,7 +93,6 @@ export declare function insertAfter(newNode: Element, refNode: Element): void;
|
|
|
108
93
|
* @param parent The node that should contain the other node.
|
|
109
94
|
* @param descendant The node to test presence of.
|
|
110
95
|
* @returns Whether the parent node contains the descendant node.
|
|
111
|
-
* @alias Blockly.utils.dom.containsNode
|
|
112
96
|
*/
|
|
113
97
|
export declare function containsNode(parent: Node, descendant: Node): boolean;
|
|
114
98
|
/**
|
|
@@ -118,21 +102,16 @@ export declare function containsNode(parent: Node, descendant: Node): boolean;
|
|
|
118
102
|
*
|
|
119
103
|
* @param element Element to which the CSS transform will be applied.
|
|
120
104
|
* @param transform The value of the CSS `transform` property.
|
|
121
|
-
* @alias Blockly.utils.dom.setCssTransform
|
|
122
105
|
*/
|
|
123
106
|
export declare function setCssTransform(element: HTMLElement | SVGElement, transform: string): void;
|
|
124
107
|
/**
|
|
125
108
|
* Start caching text widths. Every call to this function MUST also call
|
|
126
109
|
* stopTextWidthCache. Caches must not survive between execution threads.
|
|
127
|
-
*
|
|
128
|
-
* @alias Blockly.utils.dom.startTextWidthCache
|
|
129
110
|
*/
|
|
130
111
|
export declare function startTextWidthCache(): void;
|
|
131
112
|
/**
|
|
132
113
|
* Stop caching field widths. Unless caching was already on when the
|
|
133
114
|
* corresponding call to startTextWidthCache was made.
|
|
134
|
-
*
|
|
135
|
-
* @alias Blockly.utils.dom.stopTextWidthCache
|
|
136
115
|
*/
|
|
137
116
|
export declare function stopTextWidthCache(): void;
|
|
138
117
|
/**
|
|
@@ -140,7 +119,6 @@ export declare function stopTextWidthCache(): void;
|
|
|
140
119
|
*
|
|
141
120
|
* @param textElement An SVG 'text' element.
|
|
142
121
|
* @returns Width of element.
|
|
143
|
-
* @alias Blockly.utils.dom.getTextWidth
|
|
144
122
|
*/
|
|
145
123
|
export declare function getTextWidth(textElement: SVGTextElement): number;
|
|
146
124
|
/**
|
|
@@ -153,7 +131,6 @@ export declare function getTextWidth(textElement: SVGTextElement): number;
|
|
|
153
131
|
* @param fontWeight The font weight to use.
|
|
154
132
|
* @param fontFamily The font family to use.
|
|
155
133
|
* @returns Width of element.
|
|
156
|
-
* @alias Blockly.utils.dom.getFastTextWidth
|
|
157
134
|
*/
|
|
158
135
|
export declare function getFastTextWidth(textElement: SVGTextElement, fontSize: number, fontWeight: string, fontFamily: string): number;
|
|
159
136
|
/**
|
|
@@ -168,7 +145,6 @@ export declare function getFastTextWidth(textElement: SVGTextElement, fontSize:
|
|
|
168
145
|
* @param fontWeight The font weight to use.
|
|
169
146
|
* @param fontFamily The font family to use.
|
|
170
147
|
* @returns Width of element.
|
|
171
|
-
* @alias Blockly.utils.dom.getFastTextWidthWithSizeString
|
|
172
148
|
*/
|
|
173
149
|
export declare function getFastTextWidthWithSizeString(textElement: SVGTextElement, fontSize: string, fontWeight: string, fontFamily: string): number;
|
|
174
150
|
/**
|
|
@@ -179,7 +155,6 @@ export declare function getFastTextWidthWithSizeString(textElement: SVGTextEleme
|
|
|
179
155
|
* @param fontWeight The font weight to use.
|
|
180
156
|
* @param fontFamily The font family to use.
|
|
181
157
|
* @returns Font measurements.
|
|
182
|
-
* @alias Blockly.utils.dom.measureFontMetrics
|
|
183
158
|
*/
|
|
184
159
|
export declare function measureFontMetrics(text: string, fontSize: string, fontWeight: string, fontFamily: string): {
|
|
185
160
|
height: number;
|
|
@@ -21,7 +21,6 @@ export declare const TEST_ONLY: {
|
|
|
21
21
|
* primarily be used for IDs that end up in the DOM.
|
|
22
22
|
*
|
|
23
23
|
* @returns The next unique identifier.
|
|
24
|
-
* @alias Blockly.utils.idGenerator.getNextUniqueId
|
|
25
24
|
*/
|
|
26
25
|
export declare function getNextUniqueId(): string;
|
|
27
26
|
/**
|
|
@@ -29,7 +28,6 @@ export declare function getNextUniqueId(): string;
|
|
|
29
28
|
*
|
|
30
29
|
* @see internal.genUid
|
|
31
30
|
* @returns A globally unique ID string.
|
|
32
|
-
* @alias Blockly.utils.idGenerator.genUid
|
|
33
31
|
*/
|
|
34
32
|
export declare function genUid(): string;
|
|
35
33
|
//# sourceMappingURL=idgenerator.d.ts.map
|