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/utils/keycodes.d.ts
CHANGED
package/core/utils/math.d.ts
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @param angleDegrees Angle in degrees.
|
|
11
11
|
* @returns Angle in radians.
|
|
12
|
-
* @alias Blockly.utils.math.toRadians
|
|
13
12
|
*/
|
|
14
13
|
export declare function toRadians(angleDegrees: number): number;
|
|
15
14
|
/**
|
|
@@ -18,7 +17,6 @@ export declare function toRadians(angleDegrees: number): number;
|
|
|
18
17
|
*
|
|
19
18
|
* @param angleRadians Angle in radians.
|
|
20
19
|
* @returns Angle in degrees.
|
|
21
|
-
* @alias Blockly.utils.math.toDegrees
|
|
22
20
|
*/
|
|
23
21
|
export declare function toDegrees(angleRadians: number): number;
|
|
24
22
|
/**
|
|
@@ -28,7 +26,6 @@ export declare function toDegrees(angleRadians: number): number;
|
|
|
28
26
|
* @param number The number to clamp.
|
|
29
27
|
* @param upperBound The desired upper bound.
|
|
30
28
|
* @returns The clamped number.
|
|
31
|
-
* @alias Blockly.utils.math.clamp
|
|
32
29
|
*/
|
|
33
30
|
export declare function clamp(lowerBound: number, number: number, upperBound: number): number;
|
|
34
31
|
//# sourceMappingURL=math.d.ts.map
|
package/core/utils/metrics.d.ts
CHANGED
package/core/utils/object.d.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* @param parentCtor Parent class.
|
|
11
11
|
* @suppress {strictMissingProperties} superClass_ is not defined on Function.
|
|
12
12
|
* @deprecated No longer provided by Blockly.
|
|
13
|
-
* @alias Blockly.utils.object.inherits
|
|
14
13
|
*/
|
|
15
14
|
export declare function inherits(childCtor: Function, parentCtor: Function): void;
|
|
16
15
|
/**
|
|
@@ -19,7 +18,6 @@ export declare function inherits(childCtor: Function, parentCtor: Function): voi
|
|
|
19
18
|
* @param target Target.
|
|
20
19
|
* @param source Source.
|
|
21
20
|
* @deprecated Use the built-in **Object.assign** instead.
|
|
22
|
-
* @alias Blockly.utils.object.mixin
|
|
23
21
|
*/
|
|
24
22
|
export declare function mixin(target: any, source: any): void;
|
|
25
23
|
/**
|
|
@@ -28,7 +26,6 @@ export declare function mixin(target: any, source: any): void;
|
|
|
28
26
|
* @param target Target.
|
|
29
27
|
* @param source Source.
|
|
30
28
|
* @returns The resulting object.
|
|
31
|
-
* @alias Blockly.utils.object.deepMerge
|
|
32
29
|
*/
|
|
33
30
|
export declare function deepMerge(target: any, source: any): any;
|
|
34
31
|
/**
|
|
@@ -37,7 +34,6 @@ export declare function deepMerge(target: any, source: any): any;
|
|
|
37
34
|
* @param obj Object containing values.
|
|
38
35
|
* @returns Array of values.
|
|
39
36
|
* @deprecated Use the built-in **Object.values** instead.
|
|
40
|
-
* @alias Blockly.utils.object.values
|
|
41
37
|
*/
|
|
42
38
|
export declare function values(obj: any): any[];
|
|
43
39
|
//# sourceMappingURL=object.d.ts.map
|
package/core/utils/parsing.d.ts
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* @param message Text which might contain string table references and
|
|
14
14
|
* interpolation tokens.
|
|
15
15
|
* @returns Array of strings and numbers.
|
|
16
|
-
* @alias Blockly.utils.parsing.tokenizeInterpolation
|
|
17
16
|
*/
|
|
18
17
|
export declare function tokenizeInterpolation(message: string): (string | number)[];
|
|
19
18
|
/**
|
|
@@ -24,7 +23,6 @@ export declare function tokenizeInterpolation(message: string): (string | number
|
|
|
24
23
|
* @param message Message, which may be a string that contains
|
|
25
24
|
* string table references.
|
|
26
25
|
* @returns String with message references replaced.
|
|
27
|
-
* @alias Blockly.utils.parsing.replaceMessageReferences
|
|
28
26
|
*/
|
|
29
27
|
export declare function replaceMessageReferences(message: string | any): string;
|
|
30
28
|
/**
|
|
@@ -34,7 +32,6 @@ export declare function replaceMessageReferences(message: string | any): string;
|
|
|
34
32
|
* @param message Text which might contain string table references.
|
|
35
33
|
* @returns True if all message references have matching values.
|
|
36
34
|
* Otherwise, false.
|
|
37
|
-
* @alias Blockly.utils.parsing.checkMessageReferences
|
|
38
35
|
*/
|
|
39
36
|
export declare function checkMessageReferences(message: string): boolean;
|
|
40
37
|
/**
|
|
@@ -46,7 +43,6 @@ export declare function checkMessageReferences(message: string): boolean;
|
|
|
46
43
|
* @returns An object containing the colour as
|
|
47
44
|
* a #RRGGBB string, and the hue if the input was an HSV hue value.
|
|
48
45
|
* @throws {Error} If the colour cannot be parsed.
|
|
49
|
-
* @alias Blockly.utils.parsing.parseBlockColour
|
|
50
46
|
*/
|
|
51
47
|
export declare function parseBlockColour(colour: number | string): {
|
|
52
48
|
hue: number | null;
|
package/core/utils/rect.d.ts
CHANGED
package/core/utils/size.d.ts
CHANGED
package/core/utils/string.d.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* @param str The string to check.
|
|
11
11
|
* @param prefix A string to look for at the start of `str`.
|
|
12
12
|
* @returns True if `str` begins with `prefix`.
|
|
13
|
-
* @alias Blockly.utils.string.startsWith
|
|
14
13
|
* @deprecated Use built-in **string.startsWith** instead.
|
|
15
14
|
*/
|
|
16
15
|
export declare function startsWith(str: string, prefix: string): boolean;
|
|
@@ -19,7 +18,6 @@ export declare function startsWith(str: string, prefix: string): boolean;
|
|
|
19
18
|
*
|
|
20
19
|
* @param array Array of strings.
|
|
21
20
|
* @returns Length of shortest string.
|
|
22
|
-
* @alias Blockly.utils.string.shortestStringLength
|
|
23
21
|
*/
|
|
24
22
|
export declare function shortestStringLength(array: string[]): number;
|
|
25
23
|
/**
|
|
@@ -29,7 +27,6 @@ export declare function shortestStringLength(array: string[]): number;
|
|
|
29
27
|
* @param array Array of strings.
|
|
30
28
|
* @param opt_shortest Length of shortest string.
|
|
31
29
|
* @returns Length of common prefix.
|
|
32
|
-
* @alias Blockly.utils.string.commonWordPrefix
|
|
33
30
|
*/
|
|
34
31
|
export declare function commonWordPrefix(array: string[], opt_shortest?: number): number;
|
|
35
32
|
/**
|
|
@@ -39,7 +36,6 @@ export declare function commonWordPrefix(array: string[], opt_shortest?: number)
|
|
|
39
36
|
* @param array Array of strings.
|
|
40
37
|
* @param opt_shortest Length of shortest string.
|
|
41
38
|
* @returns Length of common suffix.
|
|
42
|
-
* @alias Blockly.utils.string.commonWordSuffix
|
|
43
39
|
*/
|
|
44
40
|
export declare function commonWordSuffix(array: string[], opt_shortest?: number): number;
|
|
45
41
|
/**
|
|
@@ -48,7 +44,6 @@ export declare function commonWordSuffix(array: string[], opt_shortest?: number)
|
|
|
48
44
|
* @param text Text to wrap.
|
|
49
45
|
* @param limit Width to wrap each line.
|
|
50
46
|
* @returns Wrapped text.
|
|
51
|
-
* @alias Blockly.utils.string.wrap
|
|
52
47
|
*/
|
|
53
48
|
export declare function wrap(text: string, limit: number): string;
|
|
54
49
|
/**
|
|
@@ -56,7 +51,6 @@ export declare function wrap(text: string, limit: number): string;
|
|
|
56
51
|
*
|
|
57
52
|
* @param str Input string.
|
|
58
53
|
* @returns True if number, false otherwise.
|
|
59
|
-
* @alias Blockly.utils.string.isNumber
|
|
60
54
|
*/
|
|
61
55
|
export declare function isNumber(str: string): boolean;
|
|
62
56
|
//# sourceMappingURL=string.d.ts.map
|
package/core/utils/style.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { Size } from './size.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @param element Element to get size of.
|
|
14
14
|
* @returns Object with width/height properties.
|
|
15
|
-
* @alias Blockly.utils.style.getSize
|
|
16
15
|
*/
|
|
17
16
|
export declare function getSize(element: Element): Size;
|
|
18
17
|
/**
|
|
@@ -29,7 +28,6 @@ declare function getSizeInternal(element: Element): Size;
|
|
|
29
28
|
* @param element Element to get style of.
|
|
30
29
|
* @param property Property to get (camel-case).
|
|
31
30
|
* @returns Style value.
|
|
32
|
-
* @alias Blockly.utils.style.getComputedStyle
|
|
33
31
|
*/
|
|
34
32
|
export declare function getComputedStyle(element: Element, property: string): string;
|
|
35
33
|
/**
|
|
@@ -42,7 +40,6 @@ export declare function getComputedStyle(element: Element, property: string): st
|
|
|
42
40
|
* @param style Property to get (camel-case).
|
|
43
41
|
* @returns Style value.
|
|
44
42
|
* @deprecated No longer provided by Blockly.
|
|
45
|
-
* @alias Blockly.utils.style.getCascadedStyle
|
|
46
43
|
*/
|
|
47
44
|
export declare function getCascadedStyle(element: Element, style: string): string;
|
|
48
45
|
/**
|
|
@@ -51,7 +48,6 @@ export declare function getCascadedStyle(element: Element, style: string): strin
|
|
|
51
48
|
*
|
|
52
49
|
* @param el Element to get the page offset for.
|
|
53
50
|
* @returns The page offset.
|
|
54
|
-
* @alias Blockly.utils.style.getPageOffset
|
|
55
51
|
*/
|
|
56
52
|
export declare function getPageOffset(el: Element): Coordinate;
|
|
57
53
|
/**
|
|
@@ -59,7 +55,6 @@ export declare function getPageOffset(el: Element): Coordinate;
|
|
|
59
55
|
* Similar to Closure's goog.style.getViewportPageOffset
|
|
60
56
|
*
|
|
61
57
|
* @returns The page offset of the viewport.
|
|
62
|
-
* @alias Blockly.utils.style.getViewportPageOffset
|
|
63
58
|
*/
|
|
64
59
|
export declare function getViewportPageOffset(): Coordinate;
|
|
65
60
|
/**
|
|
@@ -68,7 +63,6 @@ export declare function getViewportPageOffset(): Coordinate;
|
|
|
68
63
|
*
|
|
69
64
|
* @param element The element to get the border widths for.
|
|
70
65
|
* @returns The computed border widths.
|
|
71
|
-
* @alias Blockly.utils.style.getBorderBox
|
|
72
66
|
*/
|
|
73
67
|
export declare function getBorderBox(element: Element): Rect;
|
|
74
68
|
/**
|
|
@@ -83,7 +77,6 @@ export declare function getBorderBox(element: Element): Rect;
|
|
|
83
77
|
* scroll element will be used.
|
|
84
78
|
* @param opt_center Whether to center the element in the container.
|
|
85
79
|
* Defaults to false.
|
|
86
|
-
* @alias Blockly.utils.style.scrollIntoContainerView
|
|
87
80
|
*/
|
|
88
81
|
export declare function scrollIntoContainerView(element: Element, container: Element, opt_center?: boolean): void;
|
|
89
82
|
/**
|
|
@@ -99,7 +92,6 @@ export declare function scrollIntoContainerView(element: Element, container: Ele
|
|
|
99
92
|
* @param opt_center Whether to center the element in the container.
|
|
100
93
|
* Defaults to false.
|
|
101
94
|
* @returns The new scroll position of the container.
|
|
102
|
-
* @alias Blockly.utils.style.getContainerOffsetToScrollInto
|
|
103
95
|
*/
|
|
104
96
|
export declare function getContainerOffsetToScrollInto(element: Element, container: Element, opt_center?: boolean): Coordinate;
|
|
105
97
|
export declare const TEST_ONLY: {
|
package/core/utils/svg.d.ts
CHANGED
package/core/utils/svg_math.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { Rect } from './rect.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @param element SVG element to find the coordinates of.
|
|
14
14
|
* @returns Object with .x and .y properties.
|
|
15
|
-
* @alias Blockly.utils.svgMath.getRelativeXY
|
|
16
15
|
*/
|
|
17
16
|
export declare function getRelativeXY(element: Element): Coordinate;
|
|
18
17
|
/**
|
|
@@ -22,7 +21,6 @@ export declare function getRelativeXY(element: Element): Coordinate;
|
|
|
22
21
|
* @param element SVG element to find the coordinates of. If this is not a child
|
|
23
22
|
* of the div Blockly was injected into, the behaviour is undefined.
|
|
24
23
|
* @returns Object with .x and .y properties.
|
|
25
|
-
* @alias Blockly.utils.svgMath.getInjectionDivXY
|
|
26
24
|
*/
|
|
27
25
|
export declare function getInjectionDivXY(element: Element): Coordinate;
|
|
28
26
|
/**
|
|
@@ -31,7 +29,6 @@ export declare function getInjectionDivXY(element: Element): Coordinate;
|
|
|
31
29
|
*
|
|
32
30
|
* @returns True if 3D transforms are supported.
|
|
33
31
|
* @deprecated No longer provided by Blockly.
|
|
34
|
-
* @alias Blockly.utils.svgMath.is3dSupported
|
|
35
32
|
*/
|
|
36
33
|
export declare function is3dSupported(): boolean;
|
|
37
34
|
/**
|
|
@@ -40,7 +37,6 @@ export declare function is3dSupported(): boolean;
|
|
|
40
37
|
*
|
|
41
38
|
* @returns An object containing window width, height, and scroll position in
|
|
42
39
|
* window coordinates.
|
|
43
|
-
* @alias Blockly.utils.svgMath.getViewportBBox
|
|
44
40
|
* @internal
|
|
45
41
|
*/
|
|
46
42
|
export declare function getViewportBBox(): Rect;
|
|
@@ -49,7 +45,6 @@ export declare function getViewportBBox(): Rect;
|
|
|
49
45
|
* Copied from Closure's goog.dom.getDocumentScroll.
|
|
50
46
|
*
|
|
51
47
|
* @returns Object with values 'x' and 'y'.
|
|
52
|
-
* @alias Blockly.utils.svgMath.getDocumentScroll
|
|
53
48
|
*/
|
|
54
49
|
export declare function getDocumentScroll(): Coordinate;
|
|
55
50
|
/**
|
|
@@ -59,7 +54,6 @@ export declare function getDocumentScroll(): Coordinate;
|
|
|
59
54
|
* @param screenCoordinates The screen coordinates to be converted to workspace
|
|
60
55
|
* coordinates
|
|
61
56
|
* @returns The workspace coordinates.
|
|
62
|
-
* @alias Blockly.utils.svgMath.screenToWsCoordinates
|
|
63
57
|
*/
|
|
64
58
|
export declare function screenToWsCoordinates(ws: WorkspaceSvg, screenCoordinates: Coordinate): Coordinate;
|
|
65
59
|
export declare const TEST_ONLY: {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
* @param x The x coordinate.
|
|
13
13
|
* @param y The y coordinate.
|
|
14
14
|
* @returns A string of the format ' x,y '
|
|
15
|
-
* @alias Blockly.utils.svgPaths.point
|
|
16
15
|
*/
|
|
17
16
|
export declare function point(x: number, y: number): string;
|
|
18
17
|
/**
|
|
@@ -27,7 +26,6 @@ export declare function point(x: number, y: number): string;
|
|
|
27
26
|
* x, y '.
|
|
28
27
|
* @returns A string defining one or more Bezier curves. See the MDN
|
|
29
28
|
* documentation for exact format.
|
|
30
|
-
* @alias Blockly.utils.svgPaths.curve
|
|
31
29
|
*/
|
|
32
30
|
export declare function curve(command: string, points: string[]): string;
|
|
33
31
|
/**
|
|
@@ -39,7 +37,6 @@ export declare function curve(command: string, points: string[]): string;
|
|
|
39
37
|
* @param x The absolute x coordinate.
|
|
40
38
|
* @param y The absolute y coordinate.
|
|
41
39
|
* @returns A string of the format ' M x,y '
|
|
42
|
-
* @alias Blockly.utils.svgPaths.moveTo
|
|
43
40
|
*/
|
|
44
41
|
export declare function moveTo(x: number, y: number): string;
|
|
45
42
|
/**
|
|
@@ -51,7 +48,6 @@ export declare function moveTo(x: number, y: number): string;
|
|
|
51
48
|
* @param dx The relative x coordinate.
|
|
52
49
|
* @param dy The relative y coordinate.
|
|
53
50
|
* @returns A string of the format ' m dx,dy '
|
|
54
|
-
* @alias Blockly.utils.svgPaths.moveBy
|
|
55
51
|
*/
|
|
56
52
|
export declare function moveBy(dx: number, dy: number): string;
|
|
57
53
|
/**
|
|
@@ -63,7 +59,6 @@ export declare function moveBy(dx: number, dy: number): string;
|
|
|
63
59
|
* @param dx The relative x coordinate.
|
|
64
60
|
* @param dy The relative y coordinate.
|
|
65
61
|
* @returns A string of the format ' l dx,dy '
|
|
66
|
-
* @alias Blockly.utils.svgPaths.lineTo
|
|
67
62
|
*/
|
|
68
63
|
export declare function lineTo(dx: number, dy: number): string;
|
|
69
64
|
/**
|
|
@@ -75,7 +70,6 @@ export declare function lineTo(dx: number, dy: number): string;
|
|
|
75
70
|
* @param points An array containing all of the points to draw lines to, in
|
|
76
71
|
* order. The points are represented as strings of the format ' dx,dy '.
|
|
77
72
|
* @returns A string of the format ' l (dx,dy)+ '
|
|
78
|
-
* @alias Blockly.utils.svgPaths.line
|
|
79
73
|
*/
|
|
80
74
|
export declare function line(points: string[]): string;
|
|
81
75
|
/**
|
|
@@ -90,7 +84,6 @@ export declare function line(points: string[]): string;
|
|
|
90
84
|
* @param val The coordinate to pass to the command. It may be absolute or
|
|
91
85
|
* relative.
|
|
92
86
|
* @returns A string of the format ' command val '
|
|
93
|
-
* @alias Blockly.utils.svgPaths.lineOnAxis
|
|
94
87
|
*/
|
|
95
88
|
export declare function lineOnAxis(command: string, val: number): string;
|
|
96
89
|
/**
|
|
@@ -105,7 +98,6 @@ export declare function lineOnAxis(command: string, val: number): string;
|
|
|
105
98
|
* @param point The point to move the cursor to after drawing the arc, specified
|
|
106
99
|
* either in absolute or relative coordinates depending on the command.
|
|
107
100
|
* @returns A string of the format 'command radius radius flags point'
|
|
108
|
-
* @alias Blockly.utils.svgPaths.arc
|
|
109
101
|
*/
|
|
110
102
|
export declare function arc(command: string, flags: string, radius: number, point: string): string;
|
|
111
103
|
//# sourceMappingURL=svg_paths.d.ts.map
|
package/core/utils/toolbox.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ import type { CssConfig as SeparatorCssConfig } from '../toolbox/separator.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* The information needed to create a block in the toolbox.
|
|
11
11
|
* Note that disabled has a different type for backwards compatibility.
|
|
12
|
-
*
|
|
13
|
-
* @alias Blockly.utils.toolbox.BlockInfo
|
|
14
12
|
*/
|
|
15
13
|
export interface BlockInfo {
|
|
16
14
|
kind: string;
|
|
@@ -39,8 +37,6 @@ export interface BlockInfo {
|
|
|
39
37
|
}
|
|
40
38
|
/**
|
|
41
39
|
* The information needed to create a separator in the toolbox.
|
|
42
|
-
*
|
|
43
|
-
* @alias Blockly.utils.toolbox.SeparatorInfo
|
|
44
40
|
*/
|
|
45
41
|
export interface SeparatorInfo {
|
|
46
42
|
kind: string;
|
|
@@ -50,8 +46,6 @@ export interface SeparatorInfo {
|
|
|
50
46
|
}
|
|
51
47
|
/**
|
|
52
48
|
* The information needed to create a button in the toolbox.
|
|
53
|
-
*
|
|
54
|
-
* @alias Blockly.utils.toolbox.ButtonInfo
|
|
55
49
|
*/
|
|
56
50
|
export interface ButtonInfo {
|
|
57
51
|
kind: string;
|
|
@@ -60,8 +54,6 @@ export interface ButtonInfo {
|
|
|
60
54
|
}
|
|
61
55
|
/**
|
|
62
56
|
* The information needed to create a label in the toolbox.
|
|
63
|
-
*
|
|
64
|
-
* @alias Blockly.utils.toolbox.LabelInfo
|
|
65
57
|
*/
|
|
66
58
|
export interface LabelInfo {
|
|
67
59
|
kind: string;
|
|
@@ -70,14 +62,10 @@ export interface LabelInfo {
|
|
|
70
62
|
}
|
|
71
63
|
/**
|
|
72
64
|
* The information needed to create either a button or a label in the flyout.
|
|
73
|
-
*
|
|
74
|
-
* @alias Blockly.utils.toolbox.ButtonOrLabelInfo
|
|
75
65
|
*/
|
|
76
66
|
export type ButtonOrLabelInfo = ButtonInfo | LabelInfo;
|
|
77
67
|
/**
|
|
78
68
|
* The information needed to create a category in the toolbox.
|
|
79
|
-
*
|
|
80
|
-
* @alias Blockly.utils.toolbox.StaticCategoryInfo
|
|
81
69
|
*/
|
|
82
70
|
export interface StaticCategoryInfo {
|
|
83
71
|
kind: string;
|
|
@@ -88,11 +76,10 @@ export interface StaticCategoryInfo {
|
|
|
88
76
|
colour: string | undefined;
|
|
89
77
|
cssconfig: CategoryCssConfig | undefined;
|
|
90
78
|
hidden: string | undefined;
|
|
79
|
+
expanded?: string | boolean;
|
|
91
80
|
}
|
|
92
81
|
/**
|
|
93
82
|
* The information needed to create a custom category.
|
|
94
|
-
*
|
|
95
|
-
* @alias Blockly.utils.toolbox.DynamicCategoryInfo
|
|
96
83
|
*/
|
|
97
84
|
export interface DynamicCategoryInfo {
|
|
98
85
|
kind: string;
|
|
@@ -102,29 +89,22 @@ export interface DynamicCategoryInfo {
|
|
|
102
89
|
colour: string | undefined;
|
|
103
90
|
cssconfig: CategoryCssConfig | undefined;
|
|
104
91
|
hidden: string | undefined;
|
|
92
|
+
expanded?: string | boolean;
|
|
105
93
|
}
|
|
106
94
|
/**
|
|
107
95
|
* The information needed to create either a dynamic or static category.
|
|
108
|
-
*
|
|
109
|
-
* @alias Blockly.utils.toolbox.CategoryInfo
|
|
110
96
|
*/
|
|
111
97
|
export type CategoryInfo = StaticCategoryInfo | DynamicCategoryInfo;
|
|
112
98
|
/**
|
|
113
99
|
* Any information that can be used to create an item in the toolbox.
|
|
114
|
-
*
|
|
115
|
-
* @alias Blockly.utils.toolbox.ToolboxItemInfo
|
|
116
100
|
*/
|
|
117
101
|
export type ToolboxItemInfo = FlyoutItemInfo | StaticCategoryInfo;
|
|
118
102
|
/**
|
|
119
103
|
* All the different types that can be displayed in a flyout.
|
|
120
|
-
*
|
|
121
|
-
* @alias Blockly.utils.toolbox.FlyoutItemInfo
|
|
122
104
|
*/
|
|
123
105
|
export type FlyoutItemInfo = BlockInfo | SeparatorInfo | ButtonInfo | LabelInfo | DynamicCategoryInfo;
|
|
124
106
|
/**
|
|
125
107
|
* The JSON definition of a toolbox.
|
|
126
|
-
*
|
|
127
|
-
* @alias Blockly.utils.toolbox.ToolboxInfo
|
|
128
108
|
*/
|
|
129
109
|
export interface ToolboxInfo {
|
|
130
110
|
kind?: string;
|
|
@@ -132,26 +112,18 @@ export interface ToolboxInfo {
|
|
|
132
112
|
}
|
|
133
113
|
/**
|
|
134
114
|
* An array holding flyout items.
|
|
135
|
-
*
|
|
136
|
-
* @alias Blockly.utils.toolbox.FlyoutItemInfoArray
|
|
137
115
|
*/
|
|
138
116
|
export type FlyoutItemInfoArray = FlyoutItemInfo[];
|
|
139
117
|
/**
|
|
140
118
|
* All of the different types that can create a toolbox.
|
|
141
|
-
*
|
|
142
|
-
* @alias Blockly.utils.toolbox.ToolboxDefinition
|
|
143
119
|
*/
|
|
144
120
|
export type ToolboxDefinition = Node | ToolboxInfo | string;
|
|
145
121
|
/**
|
|
146
122
|
* All of the different types that can be used to show items in a flyout.
|
|
147
|
-
*
|
|
148
|
-
* @alias Blockly.utils.toolbox.FlyoutDefinition
|
|
149
123
|
*/
|
|
150
124
|
export type FlyoutDefinition = FlyoutItemInfoArray | NodeList | ToolboxInfo | Node[];
|
|
151
125
|
/**
|
|
152
126
|
* Position of the toolbox and/or flyout relative to the workspace.
|
|
153
|
-
*
|
|
154
|
-
* @alias Blockly.utils.toolbox.Position
|
|
155
127
|
*/
|
|
156
128
|
export declare enum Position {
|
|
157
129
|
TOP = 0,
|
|
@@ -164,7 +136,6 @@ export declare enum Position {
|
|
|
164
136
|
*
|
|
165
137
|
* @param toolboxDef The definition of the toolbox in one of its many forms.
|
|
166
138
|
* @returns Object holding information for creating a toolbox.
|
|
167
|
-
* @alias Blockly.utils.toolbox.convertToolboxDefToJson
|
|
168
139
|
* @internal
|
|
169
140
|
*/
|
|
170
141
|
export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition | null): ToolboxInfo | null;
|
|
@@ -173,7 +144,6 @@ export declare function convertToolboxDefToJson(toolboxDef: ToolboxDefinition |
|
|
|
173
144
|
*
|
|
174
145
|
* @param flyoutDef The definition of the flyout in one of its many forms.
|
|
175
146
|
* @returns A list of flyout items.
|
|
176
|
-
* @alias Blockly.utils.toolbox.convertFlyoutDefToJsonArray
|
|
177
147
|
* @internal
|
|
178
148
|
*/
|
|
179
149
|
export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition | null): FlyoutItemInfoArray;
|
|
@@ -182,7 +152,6 @@ export declare function convertFlyoutDefToJsonArray(flyoutDef: FlyoutDefinition
|
|
|
182
152
|
*
|
|
183
153
|
* @param toolboxJson Object holding information for creating a toolbox.
|
|
184
154
|
* @returns True if the toolbox has categories.
|
|
185
|
-
* @alias Blockly.utils.toolbox.hasCategories
|
|
186
155
|
* @internal
|
|
187
156
|
*/
|
|
188
157
|
export declare function hasCategories(toolboxJson: ToolboxInfo | null): boolean;
|
|
@@ -195,7 +164,6 @@ declare function hasCategoriesInternal(toolboxJson: ToolboxInfo | null): boolean
|
|
|
195
164
|
*
|
|
196
165
|
* @param categoryInfo Object holing information for creating a category.
|
|
197
166
|
* @returns True if the category has subcategories.
|
|
198
|
-
* @alias Blockly.utils.toolbox.isCategoryCollapsible
|
|
199
167
|
* @internal
|
|
200
168
|
*/
|
|
201
169
|
export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boolean;
|
|
@@ -204,7 +172,6 @@ export declare function isCategoryCollapsible(categoryInfo: CategoryInfo): boole
|
|
|
204
172
|
*
|
|
205
173
|
* @param toolboxDef DOM tree of blocks, or text representation of same.
|
|
206
174
|
* @returns DOM tree of blocks, or null.
|
|
207
|
-
* @alias Blockly.utils.toolbox.parseToolboxTree
|
|
208
175
|
*/
|
|
209
176
|
export declare function parseToolboxTree(toolboxDef: Element | null | string): Element | null;
|
|
210
177
|
export declare const TEST_ONLY: {
|
|
@@ -3,20 +3,12 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/** @alias Blockly.utils.userAgent.raw */
|
|
7
6
|
export declare const raw: string;
|
|
8
|
-
/** @alias Blockly.utils.userAgent.JavaFx */
|
|
9
7
|
export declare const JavaFx: boolean;
|
|
10
|
-
/** @alias Blockly.utils.userAgent.GECKO */
|
|
11
8
|
export declare const GECKO: boolean;
|
|
12
|
-
/** @alias Blockly.utils.userAgent.ANDROID */
|
|
13
9
|
export declare const ANDROID: boolean;
|
|
14
|
-
/** @alias Blockly.utils.userAgent.IPAD */
|
|
15
10
|
export declare const IPAD: boolean;
|
|
16
|
-
/** @alias Blockly.utils.userAgent.IPHONE */
|
|
17
11
|
export declare const IPHONE: boolean;
|
|
18
|
-
/** @alias Blockly.utils.userAgent.MAC */
|
|
19
12
|
export declare const MAC: boolean;
|
|
20
|
-
/** @alias Blockly.utils.userAgent.MOBILE */
|
|
21
13
|
export declare const MOBILE: boolean;
|
|
22
14
|
//# sourceMappingURL=useragent.d.ts.map
|
package/core/utils/xml.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ export declare function injectDependencies(dependencies: {
|
|
|
44
44
|
}): void;
|
|
45
45
|
/**
|
|
46
46
|
* Namespace for Blockly's XML.
|
|
47
|
-
*
|
|
48
|
-
* @alias Blockly.utils.xml.NAME_SPACE
|
|
49
47
|
*/
|
|
50
48
|
export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
|
|
51
49
|
/**
|
|
@@ -53,7 +51,6 @@ export declare const NAME_SPACE = "https://developers.google.com/blockly/xml";
|
|
|
53
51
|
*
|
|
54
52
|
* @returns The document object.
|
|
55
53
|
* @deprecated No longer provided by Blockly.
|
|
56
|
-
* @alias Blockly.utils.xml.getDocument
|
|
57
54
|
*/
|
|
58
55
|
export declare function getDocument(): Document;
|
|
59
56
|
/**
|
|
@@ -61,7 +58,6 @@ export declare function getDocument(): Document;
|
|
|
61
58
|
*
|
|
62
59
|
* @param xmlDocument The document object to use.
|
|
63
60
|
* @deprecated No longer provided by Blockly.
|
|
64
|
-
* @alias Blockly.utils.xml.setDocument
|
|
65
61
|
*/
|
|
66
62
|
export declare function setDocument(xmlDocument: Document): void;
|
|
67
63
|
/**
|
|
@@ -69,7 +65,6 @@ export declare function setDocument(xmlDocument: Document): void;
|
|
|
69
65
|
*
|
|
70
66
|
* @param tagName Name of DOM element.
|
|
71
67
|
* @returns New DOM element.
|
|
72
|
-
* @alias Blockly.utils.xml.createElement
|
|
73
68
|
*/
|
|
74
69
|
export declare function createElement(tagName: string): Element;
|
|
75
70
|
/**
|
|
@@ -77,16 +72,23 @@ export declare function createElement(tagName: string): Element;
|
|
|
77
72
|
*
|
|
78
73
|
* @param text Text content.
|
|
79
74
|
* @returns New DOM text node.
|
|
80
|
-
* @alias Blockly.utils.xml.createTextNode
|
|
81
75
|
*/
|
|
82
76
|
export declare function createTextNode(text: string): Text;
|
|
77
|
+
/**
|
|
78
|
+
* Converts an XML string into a DOM structure.
|
|
79
|
+
*
|
|
80
|
+
* @param text An XML string.
|
|
81
|
+
* @returns A DOM object representing the singular child of the document
|
|
82
|
+
* element.
|
|
83
|
+
* @throws if the text doesn't parse.
|
|
84
|
+
*/
|
|
85
|
+
export declare function textToDom(text: string): Element;
|
|
83
86
|
/**
|
|
84
87
|
* Converts an XML string into a DOM tree.
|
|
85
88
|
*
|
|
86
89
|
* @param text XML string.
|
|
87
90
|
* @returns The DOM document.
|
|
88
91
|
* @throws if XML doesn't parse.
|
|
89
|
-
* @alias Blockly.utils.xml.textToDomDocument
|
|
90
92
|
*/
|
|
91
93
|
export declare function textToDomDocument(text: string): Document;
|
|
92
94
|
/**
|
|
@@ -95,7 +97,6 @@ export declare function textToDomDocument(text: string): Document;
|
|
|
95
97
|
*
|
|
96
98
|
* @param dom A tree of XML nodes.
|
|
97
99
|
* @returns Text representation.
|
|
98
|
-
* @alias Blockly.utils.xml.domToText
|
|
99
100
|
*/
|
|
100
101
|
export declare function domToText(dom: Node): string;
|
|
101
102
|
export {};
|