scratch-blocks 2.0.1 → 2.0.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.
- package/AGENTS.md +140 -0
- package/commitlint.config.js +2 -2
- package/dist/main.mjs +1 -2
- package/dist/types/msg/scratch_msgs.d.ts.map +1 -1
- package/dist/types/src/block_reporting.d.ts.map +1 -1
- package/dist/types/src/blocks/colour.d.ts +0 -19
- package/dist/types/src/blocks/colour.d.ts.map +1 -1
- package/dist/types/src/blocks/control.d.ts +0 -19
- package/dist/types/src/blocks/control.d.ts.map +1 -1
- package/dist/types/src/blocks/data.d.ts +0 -19
- package/dist/types/src/blocks/data.d.ts.map +1 -1
- package/dist/types/src/blocks/event.d.ts +0 -19
- package/dist/types/src/blocks/event.d.ts.map +1 -1
- package/dist/types/src/blocks/looks.d.ts +0 -19
- package/dist/types/src/blocks/looks.d.ts.map +1 -1
- package/dist/types/src/blocks/math.d.ts +0 -19
- package/dist/types/src/blocks/math.d.ts.map +1 -1
- package/dist/types/src/blocks/matrix.d.ts +0 -19
- package/dist/types/src/blocks/matrix.d.ts.map +1 -1
- package/dist/types/src/blocks/motion.d.ts +0 -19
- package/dist/types/src/blocks/motion.d.ts.map +1 -1
- package/dist/types/src/blocks/note.d.ts +0 -19
- package/dist/types/src/blocks/note.d.ts.map +1 -1
- package/dist/types/src/blocks/operators.d.ts +0 -19
- package/dist/types/src/blocks/operators.d.ts.map +1 -1
- package/dist/types/src/blocks/procedures.d.ts +6 -9
- package/dist/types/src/blocks/procedures.d.ts.map +1 -1
- package/dist/types/src/blocks/sensing.d.ts +0 -19
- package/dist/types/src/blocks/sensing.d.ts.map +1 -1
- package/dist/types/src/blocks/sound.d.ts +0 -19
- package/dist/types/src/blocks/sound.d.ts.map +1 -1
- package/dist/types/src/blocks/text.d.ts +0 -19
- package/dist/types/src/blocks/text.d.ts.map +1 -1
- package/dist/types/src/blocks/vertical_extensions.d.ts +0 -19
- package/dist/types/src/blocks/vertical_extensions.d.ts.map +1 -1
- package/dist/types/src/checkable_continuous_flyout.d.ts +2 -7
- package/dist/types/src/checkable_continuous_flyout.d.ts.map +1 -1
- package/dist/types/src/checkbox_bubble.d.ts +13 -12
- package/dist/types/src/checkbox_bubble.d.ts.map +1 -1
- package/dist/types/src/colours.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +0 -7
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/context_menu_items.d.ts +0 -5
- package/dist/types/src/context_menu_items.d.ts.map +1 -1
- package/dist/types/src/data_category.d.ts +2 -4
- package/dist/types/src/data_category.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_base.d.ts +2 -3
- package/dist/types/src/events/events_block_comment_base.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_change.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_change.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_collapse.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_collapse.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_create.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_create.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_delete.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_delete.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_move.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_move.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_resize.d.ts +0 -5
- package/dist/types/src/events/events_block_comment_resize.d.ts.map +1 -1
- package/dist/types/src/events/events_block_drag_end.d.ts +1 -2
- package/dist/types/src/events/events_block_drag_end.d.ts.map +1 -1
- package/dist/types/src/events/events_block_drag_outside.d.ts +1 -2
- package/dist/types/src/events/events_block_drag_outside.d.ts.map +1 -1
- package/dist/types/src/events/events_scratch_variable_create.d.ts +0 -5
- package/dist/types/src/events/events_scratch_variable_create.d.ts.map +1 -1
- package/dist/types/src/fields/field_colour_slider.d.ts +7 -31
- package/dist/types/src/fields/field_colour_slider.d.ts.map +1 -1
- package/dist/types/src/fields/field_matrix.d.ts +0 -19
- package/dist/types/src/fields/field_matrix.d.ts.map +1 -1
- package/dist/types/src/fields/field_note.d.ts +8 -23
- package/dist/types/src/fields/field_note.d.ts.map +1 -1
- package/dist/types/src/fields/field_textinput_removable.d.ts +2 -4
- package/dist/types/src/fields/field_textinput_removable.d.ts.map +1 -1
- package/dist/types/src/fields/field_variable_getter.d.ts +0 -19
- package/dist/types/src/fields/field_variable_getter.d.ts.map +1 -1
- package/dist/types/src/fields/field_vertical_separator.d.ts +0 -19
- package/dist/types/src/fields/field_vertical_separator.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_angle.d.ts +0 -19
- package/dist/types/src/fields/scratch_field_angle.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_dropdown.d.ts +0 -5
- package/dist/types/src/fields/scratch_field_dropdown.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_number.d.ts +0 -19
- package/dist/types/src/fields/scratch_field_number.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_variable.d.ts +5 -8
- package/dist/types/src/fields/scratch_field_variable.d.ts.map +1 -1
- package/dist/types/src/flyout_checkbox_icon.d.ts +2 -3
- package/dist/types/src/flyout_checkbox_icon.d.ts.map +1 -1
- package/dist/types/src/glows.d.ts +1 -3
- package/dist/types/src/glows.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +50 -51
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/procedures.d.ts +6 -8
- package/dist/types/src/procedures.d.ts.map +1 -1
- package/dist/types/src/recyclable_block_flyout_inflater.d.ts +3 -5
- package/dist/types/src/recyclable_block_flyout_inflater.d.ts.map +1 -1
- package/dist/types/src/renderer/bowler_hat.d.ts +2 -3
- package/dist/types/src/renderer/bowler_hat.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/cat_face.d.ts +6 -5
- package/dist/types/src/renderer/cat/cat_face.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/constants.d.ts +2 -2
- package/dist/types/src/renderer/cat/constants.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/drawer.d.ts +4 -5
- package/dist/types/src/renderer/cat/drawer.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/path_object.d.ts +2 -3
- package/dist/types/src/renderer/cat/path_object.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/render_info.d.ts +3 -4
- package/dist/types/src/renderer/cat/render_info.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/renderer.d.ts +7 -8
- package/dist/types/src/renderer/cat/renderer.d.ts.map +1 -1
- package/dist/types/src/renderer/constants.d.ts +41 -0
- package/dist/types/src/renderer/constants.d.ts.map +1 -0
- package/dist/types/src/renderer/drawer.d.ts +7 -6
- package/dist/types/src/renderer/drawer.d.ts.map +1 -1
- package/dist/types/src/renderer/path_object.d.ts +1 -3
- package/dist/types/src/renderer/path_object.d.ts.map +1 -1
- package/dist/types/src/renderer/render_info.d.ts +3 -4
- package/dist/types/src/renderer/render_info.d.ts.map +1 -1
- package/dist/types/src/renderer/renderer.d.ts +9 -16
- package/dist/types/src/renderer/renderer.d.ts.map +1 -1
- package/dist/types/src/scratch_block_paster.d.ts +0 -5
- package/dist/types/src/scratch_block_paster.d.ts.map +1 -1
- package/dist/types/src/scratch_blocks_utils.d.ts +0 -20
- package/dist/types/src/scratch_blocks_utils.d.ts.map +1 -1
- package/dist/types/src/scratch_comment_bubble.d.ts +3 -6
- package/dist/types/src/scratch_comment_bubble.d.ts.map +1 -1
- package/dist/types/src/scratch_comment_icon.d.ts +3 -4
- package/dist/types/src/scratch_comment_icon.d.ts.map +1 -1
- package/dist/types/src/scratch_connection_checker.d.ts +0 -5
- package/dist/types/src/scratch_connection_checker.d.ts.map +1 -1
- package/dist/types/src/scratch_continuous_category.d.ts +5 -5
- package/dist/types/src/scratch_continuous_category.d.ts.map +1 -1
- package/dist/types/src/scratch_continuous_toolbox.d.ts +3 -6
- package/dist/types/src/scratch_continuous_toolbox.d.ts.map +1 -1
- package/dist/types/src/scratch_dragger.d.ts +2 -11
- package/dist/types/src/scratch_dragger.d.ts.map +1 -1
- package/dist/types/src/scratch_insertion_marker_previewer.d.ts +0 -5
- package/dist/types/src/scratch_insertion_marker_previewer.d.ts.map +1 -1
- package/dist/types/src/scratch_variable_map.d.ts +0 -5
- package/dist/types/src/scratch_variable_map.d.ts.map +1 -1
- package/dist/types/src/scratch_variable_model.d.ts +2 -3
- package/dist/types/src/scratch_variable_model.d.ts.map +1 -1
- package/dist/types/src/scratch_zoom_controls.d.ts +4 -6
- package/dist/types/src/scratch_zoom_controls.d.ts.map +1 -1
- package/dist/types/src/shadows.d.ts +2 -2
- package/dist/types/src/shadows.d.ts.map +1 -1
- package/dist/types/src/status_indicator_label.d.ts +4 -6
- package/dist/types/src/status_indicator_label.d.ts.map +1 -1
- package/dist/types/src/status_indicator_label_flyout_inflater.d.ts +1 -6
- package/dist/types/src/status_indicator_label_flyout_inflater.d.ts.map +1 -1
- package/dist/types/src/variables.d.ts +4 -8
- package/dist/types/src/variables.d.ts.map +1 -1
- package/dist/types/src/xml.d.ts +2 -3
- package/dist/types/src/xml.d.ts.map +1 -1
- package/dist/types/tests/jsunit/block_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/connection_db_test.d.ts +3 -3
- package/dist/types/tests/jsunit/connection_db_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/connection_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/event_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/extensions_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/field_number_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/field_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/field_variable_getter_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/field_variable_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/gesture_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/input_test.d.ts +1 -0
- package/dist/types/tests/jsunit/input_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/json_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/names_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/procedure_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/scratch_block_comment_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/svg_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/test_utilities.d.ts.map +1 -1
- package/dist/types/tests/jsunit/utils_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/variable_map_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/variable_model_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/widget_div_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/workspace_comment_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/workspace_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/workspace_undo_redo_test.d.ts.map +1 -1
- package/dist/types/tests/jsunit/xml_test.d.ts.map +1 -1
- package/dist/types/tests/workspace_svg/workspace_svg_test.d.ts.map +1 -1
- package/eslint.config.mjs +69 -0
- package/i18n/create_scratch_msgs.js +44 -45
- package/i18n/js_to_json.js +40 -32
- package/i18n/json_to_js.js +37 -37
- package/i18n/sync_tx_translations.js +64 -65
- package/i18n/test_scratch_msgs.js +66 -63
- package/msg/js/en.js +289 -287
- package/msg/json/en.json +284 -284
- package/msg/messages.js +289 -287
- package/msg/scratch_msgs.js +22959 -22970
- package/package.json +13 -10
- package/prettier.config.mjs +3 -0
- package/release.config.js +7 -7
- package/renovate.json5 +7 -9
- package/src/block_reporting.ts +16 -19
- package/src/blocks/colour.ts +12 -15
- package/src/blocks/control.ts +171 -174
- package/src/blocks/data.ts +233 -272
- package/src/blocks/event.ts +121 -123
- package/src/blocks/looks.ts +165 -167
- package/src/blocks/math.ts +44 -46
- package/src/blocks/matrix.ts +11 -13
- package/src/blocks/motion.ts +151 -153
- package/src/blocks/note.ts +11 -13
- package/src/blocks/operators.ts +158 -160
- package/src/blocks/procedures.ts +421 -511
- package/src/blocks/sensing.ts +163 -165
- package/src/blocks/sound.ts +58 -60
- package/src/blocks/text.ts +10 -12
- package/src/blocks/vertical_extensions.ts +86 -102
- package/src/checkable_continuous_flyout.ts +25 -42
- package/src/checkbox_bubble.ts +83 -100
- package/src/colours.ts +35 -37
- package/src/constants.ts +22 -29
- package/src/context_menu_items.ts +59 -84
- package/src/css.ts +3 -4
- package/src/data_category.ts +137 -251
- package/src/events/events_block_comment_base.ts +23 -30
- package/src/events/events_block_comment_change.ts +21 -42
- package/src/events/events_block_comment_collapse.ts +27 -36
- package/src/events/events_block_comment_create.ts +32 -46
- package/src/events/events_block_comment_delete.ts +12 -19
- package/src/events/events_block_comment_move.ts +27 -52
- package/src/events/events_block_comment_resize.ts +28 -55
- package/src/events/events_block_drag_end.ts +16 -26
- package/src/events/events_block_drag_outside.ts +12 -22
- package/src/events/events_scratch_variable_create.ts +37 -42
- package/src/fields/field_colour_slider.ts +186 -216
- package/src/fields/field_matrix.ts +202 -270
- package/src/fields/field_note.ts +277 -375
- package/src/fields/field_textinput_removable.ts +25 -40
- package/src/fields/field_variable_getter.ts +26 -31
- package/src/fields/field_vertical_separator.ts +19 -24
- package/src/fields/scratch_field_angle.ts +151 -187
- package/src/fields/scratch_field_dropdown.ts +15 -19
- package/src/fields/scratch_field_number.ts +125 -181
- package/src/fields/scratch_field_variable.ts +57 -75
- package/src/flyout_checkbox_icon.ts +18 -28
- package/src/glows.ts +52 -59
- package/src/index.ts +119 -133
- package/src/procedures.ts +150 -209
- package/src/recyclable_block_flyout_inflater.ts +14 -25
- package/src/renderer/bowler_hat.ts +6 -8
- package/src/renderer/cat/cat_face.ts +98 -99
- package/src/renderer/cat/constants.ts +67 -87
- package/src/renderer/cat/drawer.ts +21 -27
- package/src/renderer/cat/path_object.ts +3 -5
- package/src/renderer/cat/render_info.ts +5 -8
- package/src/renderer/cat/renderer.ts +12 -16
- package/src/renderer/constants.ts +34 -49
- package/src/renderer/drawer.ts +35 -51
- package/src/renderer/path_object.ts +4 -10
- package/src/renderer/render_info.ts +39 -56
- package/src/renderer/renderer.ts +17 -30
- package/src/scratch_block_paster.ts +12 -20
- package/src/scratch_blocks_utils.ts +4 -7
- package/src/scratch_comment_bubble.ts +76 -105
- package/src/scratch_comment_icon.ts +75 -124
- package/src/scratch_connection_checker.ts +7 -17
- package/src/scratch_continuous_category.ts +24 -28
- package/src/scratch_continuous_toolbox.ts +20 -27
- package/src/scratch_dragger.ts +42 -81
- package/src/scratch_insertion_marker_previewer.ts +6 -11
- package/src/scratch_variable_map.ts +5 -12
- package/src/scratch_variable_model.ts +6 -13
- package/src/scratch_zoom_controls.ts +101 -156
- package/src/shadows.ts +32 -37
- package/src/status_indicator_label.ts +54 -67
- package/src/status_indicator_label_flyout_inflater.ts +11 -21
- package/src/variables.ts +92 -141
- package/src/xml.ts +21 -35
- package/tsconfig.json +3 -7
- package/types/continuous-toolbox.d.ts +1 -1
- package/dist/main.mjs.LICENSE.txt +0 -163
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ConstantProvider } from './constants';
|
|
7
|
+
import type { RenderInfo } from './render_info';
|
|
9
8
|
export declare class Drawer extends Blockly.zelos.Drawer {
|
|
10
9
|
constants_: ConstantProvider;
|
|
11
10
|
info_: RenderInfo;
|
|
12
11
|
drawStatementInput_(row: Blockly.blockRendering.Row): void;
|
|
13
12
|
drawRightSideRow_(row: Blockly.blockRendering.Row): void;
|
|
14
13
|
drawTop_(): void;
|
|
15
|
-
makeReplacementTop_(): string;
|
|
14
|
+
makeReplacementTop_(): string | undefined;
|
|
16
15
|
/**
|
|
17
16
|
* Draw the connection highlight path for the given connection measurable.
|
|
18
17
|
*
|
|
19
18
|
* For rounded (non-hexagonal) input slots we expand the outline by 1px in
|
|
20
19
|
* every direction so the white highlight stroke sits just outside the input
|
|
21
20
|
* slot's background and remains visible rather than merging with it.
|
|
21
|
+
* @param measurable The connection measurable to highlight.
|
|
22
|
+
* @returns The highlight path element, if one was created.
|
|
22
23
|
*/
|
|
23
|
-
drawConnectionHighlightPath(measurable: Blockly.blockRendering.Connection): SVGElement;
|
|
24
|
+
drawConnectionHighlightPath(measurable: Blockly.blockRendering.Connection): SVGElement | undefined;
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/renderer/drawer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/renderer/drawer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,qBAAa,MAAO,SAAQ,OAAO,CAAC,KAAK,CAAC,MAAM;IACtC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,KAAK,EAAE,UAAU,CAAA;IAEhB,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;IAWnD,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;IAUjD,QAAQ;IAgBjB,mBAAmB;IAMnB;;;;;;;;OAQG;IACM,2BAA2B,CAAC,UAAU,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU;CAuBnF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* An object that handles creating and setting each of the SVG elements
|
|
9
8
|
* used by the renderer.
|
|
@@ -12,7 +11,6 @@ export declare class PathObject extends Blockly.zelos.PathObject {
|
|
|
12
11
|
/**
|
|
13
12
|
* Apply the stored colours to the block's path, taking into account whether
|
|
14
13
|
* the paths belong to a shadow block.
|
|
15
|
-
*
|
|
16
14
|
* @param block The source block.
|
|
17
15
|
*/
|
|
18
16
|
applyColour(block: Blockly.BlockSvg): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path_object.d.ts","sourceRoot":"","sources":["../../../../src/renderer/path_object.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"path_object.d.ts","sourceRoot":"","sources":["../../../../src/renderer/path_object.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;GAGG;AACH,qBAAa,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC,UAAU;IACtD;;;;OAIG;IACM,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ;CAY7C"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import { BowlerHat } from
|
|
8
|
-
import { ConstantProvider } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { BowlerHat } from './bowler_hat';
|
|
7
|
+
import { ConstantProvider } from './constants';
|
|
9
8
|
export declare class RenderInfo extends Blockly.zelos.RenderInfo {
|
|
10
9
|
constants_: ConstantProvider;
|
|
11
10
|
populateTopRow_(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render_info.d.ts","sourceRoot":"","sources":["../../../../src/renderer/render_info.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render_info.d.ts","sourceRoot":"","sources":["../../../../src/renderer/render_info.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C,qBAAa,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC,UAAU;IAC9C,UAAU,EAAE,gBAAgB,CAAA;IAE3B,eAAe;IAaf,kBAAkB;IAOlB,cAAc;IAsBd,gBAAgB,CACvB,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU,EACvC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU,GACtC,MAAM;IAYA,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,GAAG,MAAM;IAQ/F,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU,GAAG,MAAM;IAiB7G,gBAAgB;IAIhB,aAAa;CAGd"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ConstantProvider } from './constants';
|
|
7
|
+
import { Drawer } from './drawer';
|
|
8
|
+
import { PathObject } from './path_object';
|
|
9
|
+
import { RenderInfo } from './render_info';
|
|
11
10
|
/**
|
|
12
11
|
* Custom renderer for Scratch-style blocks.
|
|
13
12
|
*/
|
|
@@ -15,43 +14,37 @@ export declare class ScratchRenderer extends Blockly.zelos.Renderer {
|
|
|
15
14
|
/**
|
|
16
15
|
* Get the CSS class name associated with this renderer.
|
|
17
16
|
* Note that all Scratch renderers share the same CSS class name.
|
|
18
|
-
*
|
|
19
|
-
* @returns The class name.
|
|
17
|
+
* @returns The CSS class name shared by all Scratch-style renderers.
|
|
20
18
|
*/
|
|
21
19
|
getClassName(): string;
|
|
22
20
|
/**
|
|
23
21
|
* Create a new instance of the renderer's drawer.
|
|
24
|
-
*
|
|
25
22
|
* @param block The block to render.
|
|
26
|
-
* @param
|
|
23
|
+
* @param info An object containing all the information needed to render this
|
|
27
24
|
* block.
|
|
28
25
|
* @returns The drawer.
|
|
29
26
|
*/
|
|
30
|
-
makeDrawer_(block: Blockly.BlockSvg, info: RenderInfo): Drawer;
|
|
27
|
+
makeDrawer_(block: Blockly.BlockSvg, info: Blockly.blockRendering.RenderInfo): Drawer;
|
|
31
28
|
/**
|
|
32
29
|
* Create a new instance of the renderer's render info object.
|
|
33
|
-
*
|
|
34
30
|
* @param block The block to measure.
|
|
35
31
|
* @returns The render info object.
|
|
36
32
|
*/
|
|
37
33
|
makeRenderInfo_(block: Blockly.BlockSvg): RenderInfo;
|
|
38
34
|
/**
|
|
39
35
|
* Create a new instance of the renderer's constant provider.
|
|
40
|
-
*
|
|
41
36
|
* @returns The constant provider.
|
|
42
37
|
*/
|
|
43
38
|
makeConstants_(): ConstantProvider;
|
|
44
39
|
/**
|
|
45
40
|
* Create a new instance of a renderer path object.
|
|
46
|
-
*
|
|
47
41
|
* @param root The root SVG element.
|
|
48
42
|
* @param style The style object to use for colouring.
|
|
49
|
-
* @returns
|
|
43
|
+
* @returns A new path object configured for the given SVG root and block style.
|
|
50
44
|
*/
|
|
51
45
|
makePathObject(root: SVGElement, style: Blockly.Theme.BlockStyle): PathObject;
|
|
52
46
|
/**
|
|
53
47
|
* Determine whether or not to highlight a connection.
|
|
54
|
-
*
|
|
55
48
|
* @param connection The connection to determine whether or not to highlight.
|
|
56
49
|
* @returns True if we should highlight the connection.
|
|
57
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../src/renderer/renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../src/renderer/renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,OAAO,CAAC,KAAK,CAAC,QAAQ;IACzD;;;;OAIG;IACM,YAAY,IAAI,MAAM;IAI/B;;;;;;OAMG;IACM,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU,GAAG,MAAM;IAI9F;;;;OAIG;IACM,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,GAAG,UAAU;IAI7D;;;OAGG;IACM,cAAc,IAAI,gBAAgB;IAI3C;;;;;OAKG;IACM,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,UAAU;IAItF;;;;OAIG;IACM,yBAAyB,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,GAAG,OAAO;CAGpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_block_paster.d.ts","sourceRoot":"","sources":["../../../src/scratch_block_paster.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_block_paster.d.ts","sourceRoot":"","sources":["../../../src/scratch_block_paster.ts"],"names":[],"mappings":"AA0CA;;;GAGG;AACH,wBAAgB,0BAA0B,SAGzC"}
|
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Visual Blocks Editor
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2018 Google Inc.
|
|
6
|
-
* https://developers.google.com/blockly/
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
1
|
/**
|
|
21
2
|
* Compare strings with natural number sorting.
|
|
22
|
-
*
|
|
23
3
|
* @param str1 First input.
|
|
24
4
|
* @param str2 Second input.
|
|
25
5
|
* @returns -1, 0, or 1 to signify greater than, equality, or less than.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_blocks_utils.d.ts","sourceRoot":"","sources":["../../../src/scratch_blocks_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_blocks_utils.d.ts","sourceRoot":"","sources":["../../../src/scratch_blocks_utils.ts"],"names":[],"mappings":"AAwBA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKjE"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* A Scratch-style comment bubble for block comments.
|
|
9
|
-
* @implements {IBubble}
|
|
10
|
-
* @implements {ISelectable}
|
|
11
8
|
*/
|
|
12
9
|
export declare class ScratchCommentBubble extends Blockly.comments.CommentView implements Blockly.IBubble, Blockly.ISelectable {
|
|
13
10
|
id: string;
|
|
@@ -27,14 +24,14 @@ export declare class ScratchCommentBubble extends Blockly.comments.CommentView i
|
|
|
27
24
|
moveTo(xOrCoordinate: Blockly.utils.Coordinate): void;
|
|
28
25
|
startGesture(e: PointerEvent): void;
|
|
29
26
|
startDrag(event: PointerEvent): void;
|
|
30
|
-
drag(newLocation: Blockly.utils.Coordinate, event
|
|
27
|
+
drag(newLocation: Blockly.utils.Coordinate, event?: PointerEvent): void;
|
|
31
28
|
endDrag(): void;
|
|
32
29
|
revertDrag(): void;
|
|
33
30
|
setAnchorLocation(newAnchor: Blockly.utils.Coordinate): void;
|
|
34
31
|
dropAnchor(): void;
|
|
35
32
|
redrawAnchorChain(): void;
|
|
36
33
|
getId(): string;
|
|
37
|
-
getSourceBlock(): Blockly.BlockSvg;
|
|
34
|
+
getSourceBlock(): Blockly.BlockSvg | null;
|
|
38
35
|
dispose(): void;
|
|
39
36
|
getFocusableElement(): SVGGElement;
|
|
40
37
|
getFocusableTree(): Blockly.WorkspaceSvg;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_comment_bubble.d.ts","sourceRoot":"","sources":["../../../src/scratch_comment_bubble.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_comment_bubble.d.ts","sourceRoot":"","sources":["../../../src/scratch_comment_bubble.ts"],"names":[],"mappings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apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import { ScratchCommentBubble } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ScratchCommentBubble } from './scratch_comment_bubble';
|
|
8
7
|
interface CommentState {
|
|
9
8
|
text: string;
|
|
10
9
|
height: number;
|
|
@@ -41,7 +40,7 @@ export declare class ScratchCommentIcon extends Blockly.icons.Icon implements Bl
|
|
|
41
40
|
loadState(state: CommentState): void;
|
|
42
41
|
bubbleIsVisible(): boolean;
|
|
43
42
|
setBubbleVisible(visible: boolean): Promise<void>;
|
|
44
|
-
getBubble(): ScratchCommentBubble;
|
|
43
|
+
getBubble(): ScratchCommentBubble | null;
|
|
45
44
|
dispose(): void;
|
|
46
45
|
canBeFocused(): boolean;
|
|
47
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_comment_icon.d.ts","sourceRoot":"","sources":["../../../src/scratch_comment_icon.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_comment_icon.d.ts","sourceRoot":"","sources":["../../../src/scratch_comment_icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAE/D,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,KAAK,CAAC,IAAK,YAAW,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,UAAU;IAMjG,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ;IALnD,OAAO,CAAC,aAAa,C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scratch_connection_checker.d.ts","sourceRoot":"","sources":["../../../src/scratch_connection_checker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_connection_checker.d.ts","sourceRoot":"","sources":["../../../src/scratch_connection_checker.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import { ContinuousCategory } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ContinuousCategory } from '@blockly/continuous-toolbox';
|
|
8
7
|
type StatusIndicatorCategoryInfo = Blockly.utils.toolbox.CategoryInfo & {
|
|
9
8
|
showStatusButton?: string;
|
|
10
9
|
};
|
|
@@ -18,8 +17,8 @@ export declare class ScratchContinuousCategory extends ContinuousCategory {
|
|
|
18
17
|
* devices.
|
|
19
18
|
*/
|
|
20
19
|
private showStatusButton;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new ScratchContinuousCategory.
|
|
23
22
|
* @param toolboxItemDef A toolbox item definition.
|
|
24
23
|
* @param parentToolbox The toolbox this category is being added to.
|
|
25
24
|
* @param opt_parent The parent toolbox category, if any.
|
|
@@ -38,6 +37,7 @@ export declare class ScratchContinuousCategory extends ContinuousCategory {
|
|
|
38
37
|
/**
|
|
39
38
|
* Returns whether or not this category's label in the flyout should display
|
|
40
39
|
* status indicators.
|
|
40
|
+
* @returns True if the status indicator button should be shown.
|
|
41
41
|
*/
|
|
42
42
|
shouldShowStatusButton(): boolean;
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_continuous_category.d.ts","sourceRoot":"","sources":["../../../src/scratch_continuous_category.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_continuous_category.d.ts","sourceRoot":"","sources":["../../../src/scratch_continuous_category.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAEhE,KAAK,2BAA2B,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,GAAG;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,kBAAkB;IAC/D;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAAQ;IAEhC;;;;;OAKG;gBAED,cAAc,EAAE,2BAA2B,EAC3C,aAAa,EAAE,OAAO,CAAC,OAAO,EAC9B,UAAU,CAAC,EAAE,OAAO,CAAC,uBAAuB;IAM9C;;;OAGG;IACH,cAAc,IAAI,WAAW;IAa7B;;;OAGG;IACH,WAAW,CAAC,UAAU,EAAE,OAAO;IAM/B;;;;OAIG;IACH,sBAAsB;CAGvB;AAED,uEAAuE;AACvE,wBAAgB,iCAAiC,SAOhD"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
7
|
-
import { ContinuousToolbox } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ContinuousToolbox } from '@blockly/continuous-toolbox';
|
|
8
7
|
/**
|
|
9
8
|
* A toolbox that displays items from all categories in one scrolling list.
|
|
10
9
|
*/
|
|
@@ -17,8 +16,7 @@ export declare class ScratchContinuousToolbox extends ContinuousToolbox {
|
|
|
17
16
|
/**
|
|
18
17
|
* Converts the given toolbox item to a corresponding array of items that
|
|
19
18
|
* should appear in the flyout.
|
|
20
|
-
*
|
|
21
|
-
* @param toolboxItem The toolbox item to convert.
|
|
19
|
+
* @param toolboxItem The toolbox item to translate into flyout content.
|
|
22
20
|
* @returns An array of flyout item definitions.
|
|
23
21
|
*/
|
|
24
22
|
protected convertToolboxItemToFlyoutItems(toolboxItem: Blockly.IToolboxItem): Blockly.utils.toolbox.FlyoutItemInfoArray;
|
|
@@ -34,7 +32,6 @@ export declare class ScratchContinuousToolbox extends ContinuousToolbox {
|
|
|
34
32
|
/**
|
|
35
33
|
* Returns whether or not the given item should be deselected.
|
|
36
34
|
* Prevents items from being deselected without a replacement.
|
|
37
|
-
*
|
|
38
35
|
* @param oldItem The item that was previously selected.
|
|
39
36
|
* @param newItem The item that is proposed to be selected instead.
|
|
40
37
|
* @returns True if the old item should be allowed to be deselected.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_continuous_toolbox.d.ts","sourceRoot":"","sources":["../../../src/scratch_continuous_toolbox.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_continuous_toolbox.d.ts","sourceRoot":"","sources":["../../../src/scratch_continuous_toolbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAI/D;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,iBAAiB;IAC7D;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAqB;IAEhD,gBAAgB;IAKhB;;;;;OAKG;IACH,SAAS,CAAC,+BAA+B,CACvC,WAAW,EAAE,OAAO,CAAC,YAAY,GAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB;IAY5C;;OAEG;IACH,aAAa;IAUb;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIrC;;;;;;OAMG;IACH,mBAAmB,CACjB,OAAO,EAAE,OAAO,CAAC,sBAAsB,GAAG,IAAI,EAC9C,OAAO,EAAE,OAAO,CAAC,sBAAsB,GAAG,IAAI;CAKjD"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* Class responsible for managing dragging items on the workspace.
|
|
9
8
|
*/
|
|
@@ -18,39 +17,33 @@ export declare class ScratchDragger extends Blockly.dragging.Dragger {
|
|
|
18
17
|
originatedFromFlyout: boolean;
|
|
19
18
|
/**
|
|
20
19
|
* Sets the current item being dragged.
|
|
21
|
-
*
|
|
22
20
|
* @param draggable The item being dragged.
|
|
23
21
|
*/
|
|
24
22
|
setDraggable(draggable: Blockly.IDraggable): void;
|
|
25
23
|
/**
|
|
26
24
|
* Handles the start of a drag operation.
|
|
27
|
-
*
|
|
28
25
|
* @param event The event that triggered the drag.
|
|
29
26
|
*/
|
|
30
27
|
onDragStart(event: PointerEvent): void;
|
|
31
28
|
/**
|
|
32
29
|
* Handles motion during an ongoing drag operation.
|
|
33
|
-
*
|
|
34
30
|
* @param event The event that triggered this call.
|
|
35
31
|
* @param totalDelta The change in pointer position since the last invocation.
|
|
36
32
|
*/
|
|
37
33
|
onDrag(event: PointerEvent, totalDelta: Blockly.utils.Coordinate): void;
|
|
38
34
|
/**
|
|
39
35
|
* Records whether or not the current drag is out of the workspace's bounds.
|
|
40
|
-
*
|
|
41
36
|
* @param event The event that triggered this call.
|
|
42
37
|
*/
|
|
43
38
|
updateOutOfBoundsState(event: PointerEvent): void;
|
|
44
39
|
/**
|
|
45
40
|
* Handles the end of a drag.
|
|
46
|
-
*
|
|
47
41
|
* @param event The event that ended the drag.
|
|
48
42
|
*/
|
|
49
43
|
onDragEnd(event: PointerEvent): void;
|
|
50
44
|
/**
|
|
51
45
|
* Returns whether or not the dragged item should return to its starting
|
|
52
46
|
* position.
|
|
53
|
-
*
|
|
54
47
|
* @param event The drag event that triggered this check.
|
|
55
48
|
* @param rootDraggable The topmost item being dragged.
|
|
56
49
|
* @returns True if the draggable should return to its starting position.
|
|
@@ -59,15 +52,13 @@ export declare class ScratchDragger extends Blockly.dragging.Dragger {
|
|
|
59
52
|
/**
|
|
60
53
|
* Returns the root element being dragged. For shadow blocks, this is the
|
|
61
54
|
* parent block.
|
|
62
|
-
*
|
|
63
55
|
* @param draggable The element being dragged directly.
|
|
64
56
|
* @returns The element being dragged, or its parent.
|
|
65
57
|
*/
|
|
66
|
-
getDragRoot(draggable: Blockly.IDraggable): Blockly.IDraggable;
|
|
58
|
+
getDragRoot(draggable: Blockly.IDraggable): Blockly.IDraggable | null;
|
|
67
59
|
/**
|
|
68
60
|
* Returns whether or not the given event occurred within the bounds of the
|
|
69
61
|
* workspace.
|
|
70
|
-
*
|
|
71
62
|
* @param event The event to check.
|
|
72
63
|
* @returns True if the event occurred inside the workspace.
|
|
73
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_dragger.d.ts","sourceRoot":"","sources":["../../../src/scratch_dragger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_dragger.d.ts","sourceRoot":"","sources":["../../../src/scratch_dragger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAUvC;;GAEG;AACH,qBAAa,cAAe,SAAQ,OAAO,CAAC,QAAQ,CAAC,OAAO;IAC1D;;OAEG;IACH,kBAAkB,UAAQ;IAE1B;;OAEG;IACH,oBAAoB,UAAQ;IAE5B;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU;IAI1C;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,YAAY;IAgB/B;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU;IAKhE;;;OAGG;IACH,sBAAsB,CAAC,KAAK,EAAE,YAAY;IAW1C;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,YAAY;IA0C7B;;;;;;OAMG;IACH,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,CAAC,UAAU;IAO1E;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU;IAWzC;;;;;OAKG;IACH,iBAAiB,CAAC,KAAK,EAAE,YAAY;CAKtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_insertion_marker_previewer.d.ts","sourceRoot":"","sources":["../../../src/scratch_insertion_marker_previewer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_insertion_marker_previewer.d.ts","sourceRoot":"","sources":["../../../src/scratch_insertion_marker_previewer.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_variable_map.d.ts","sourceRoot":"","sources":["../../../src/scratch_variable_map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_variable_map.d.ts","sourceRoot":"","sources":["../../../src/scratch_variable_map.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* Class that represents a variable with extra fields for Scratch.
|
|
9
8
|
*/
|
|
10
9
|
export declare class ScratchVariableModel extends Blockly.VariableModel {
|
|
11
10
|
isLocal: boolean;
|
|
12
11
|
isCloud: boolean;
|
|
13
|
-
constructor(workspace: Blockly.Workspace, name: string, type
|
|
12
|
+
constructor(workspace: Blockly.Workspace, name: string, type?: string, id?: string, isLocal?: boolean, isCloud?: boolean);
|
|
14
13
|
}
|
|
15
14
|
//# sourceMappingURL=scratch_variable_model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_variable_model.d.ts","sourceRoot":"","sources":["../../../src/scratch_variable_model.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_variable_model.d.ts","sourceRoot":"","sources":["../../../src/scratch_variable_model.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,aAAa;IAMpD,OAAO;IACP,OAAO;gBALd,SAAS,EAAE,OAAO,CAAC,SAAS,EAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,EACJ,OAAO,UAAQ,EACf,OAAO,UAAQ;CAIzB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2026 Scratch Foundation
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* Scratch-specific zoom controls that use separate SVG files for each button
|
|
9
8
|
* instead of Blockly's default sprite sheet approach. SVG files are loaded
|
|
@@ -34,13 +33,11 @@ export declare class ScratchZoomControls implements Blockly.IPositionable {
|
|
|
34
33
|
constructor(workspace: Blockly.WorkspaceSvg);
|
|
35
34
|
/**
|
|
36
35
|
* Creates the zoom controls DOM.
|
|
37
|
-
*
|
|
38
36
|
* @returns The root SVG group element.
|
|
39
37
|
*/
|
|
40
38
|
createDom(): SVGGElement;
|
|
41
39
|
/**
|
|
42
40
|
* Creates an SVG group containing one zoom button image.
|
|
43
|
-
*
|
|
44
41
|
* @param extraClass Additional CSS class to add alongside `blocklyZoom`.
|
|
45
42
|
* @param imageHref URL of the SVG icon to display.
|
|
46
43
|
* @returns The button group element.
|
|
@@ -53,16 +50,18 @@ export declare class ScratchZoomControls implements Blockly.IPositionable {
|
|
|
53
50
|
/**
|
|
54
51
|
* Returns the bounding rectangle of the zoom controls in pixels relative to
|
|
55
52
|
* the Blockly injection div.
|
|
53
|
+
* @returns The bounding rectangle, or null if not yet positioned.
|
|
56
54
|
*/
|
|
57
55
|
getBoundingRectangle(): Blockly.utils.Rect | null;
|
|
58
56
|
/**
|
|
59
57
|
* Positions the zoom controls in the corner opposite the toolbox, bumping
|
|
60
58
|
* down (or up) to avoid overlapping other positioned UI elements.
|
|
59
|
+
* @param metrics The current workspace UI metrics.
|
|
60
|
+
* @param savedPositions Bounding rectangles of already-placed UI elements to avoid overlapping.
|
|
61
61
|
*/
|
|
62
62
|
position(metrics: Blockly.MetricsManager.UiMetrics, savedPositions: Blockly.utils.Rect[]): void;
|
|
63
63
|
/**
|
|
64
64
|
* Handles zoom in / zoom out button clicks.
|
|
65
|
-
*
|
|
66
65
|
* @param amount Positive to zoom in, negative to zoom out.
|
|
67
66
|
* @param e The pointer event.
|
|
68
67
|
*/
|
|
@@ -70,7 +69,6 @@ export declare class ScratchZoomControls implements Blockly.IPositionable {
|
|
|
70
69
|
/**
|
|
71
70
|
* Handles zoom reset button clicks. Animates back to the starting scale and
|
|
72
71
|
* re-centers the workspace.
|
|
73
|
-
*
|
|
74
72
|
* @param e The pointer event.
|
|
75
73
|
*/
|
|
76
74
|
private resetZoom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_zoom_controls.d.ts","sourceRoot":"","sources":["../../../src/scratch_zoom_controls.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_zoom_controls.d.ts","sourceRoot":"","sources":["../../../src/scratch_zoom_controls.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;GA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
|
|
3
2
|
* Copyright 2024 Google LLC
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import * as Blockly from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
7
6
|
/**
|
|
8
7
|
* Creates an SVG filter to apply drop shadows to blocks being dragged and
|
|
9
8
|
* inserts it into the DOM.
|
|
9
|
+
* @param workspace The workspace whose SVG will receive the filter definition.
|
|
10
10
|
*/
|
|
11
11
|
export declare function buildShadowFilter(workspace: Blockly.WorkspaceSvg): void;
|
|
12
12
|
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/shadows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/shadows.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAGvC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,QA+ChE"}
|