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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_field_dropdown.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_dropdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_field_dropdown.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_dropdown.ts"],"names":[],"mappings":"AAiCA;;GAEG;AACH,wBAAgB,4BAA4B,SAG3C"}
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Visual Blocks Editor
|
|
4
|
-
*
|
|
5
|
-
* Copyright 2016 Massachusetts Institute of Technology
|
|
6
|
-
* All rights reserved.
|
|
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
|
* Register the field and any dependencies.
|
|
22
3
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_field_number.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_number.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scratch_field_number.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_number.ts"],"names":[],"mappings":"AAkUA;;GAEG;AACH,wBAAgB,0BAA0B,SAGzC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Visual Blocks Editor
|
|
4
3
|
*
|
|
5
4
|
* Copyright 2012 Google Inc.
|
|
@@ -18,10 +17,10 @@
|
|
|
18
17
|
* limitations under the License.
|
|
19
18
|
*/
|
|
20
19
|
/**
|
|
21
|
-
* @
|
|
20
|
+
* @file Variable input field.
|
|
22
21
|
* @author fraser@google.com (Neil Fraser)
|
|
23
22
|
*/
|
|
24
|
-
import * as Blockly from
|
|
23
|
+
import * as Blockly from 'blockly/core';
|
|
25
24
|
export declare class ScratchFieldVariable extends Blockly.FieldVariable {
|
|
26
25
|
private originalStyle;
|
|
27
26
|
constructor(varName: string | null | typeof Blockly.Field.SKIP_SETUP, validator?: Blockly.FieldVariableValidator, variableTypes?: string[], defaultType?: string, config?: Blockly.FieldVariableConfig);
|
|
@@ -33,24 +32,22 @@ export declare class ScratchFieldVariable extends Blockly.FieldVariable {
|
|
|
33
32
|
* selected option when the workspace is refreshed.
|
|
34
33
|
* Re-sort the broadcast messages by name, and set the field value to the id
|
|
35
34
|
* of the variable that comes first in sorted order.
|
|
36
|
-
*
|
|
37
35
|
* @param workspace The flyout workspace containing the broadcast block.
|
|
38
36
|
* @returns The variable of type 'broadcast_msg' that comes first in sorted
|
|
39
37
|
* order.
|
|
40
38
|
*/
|
|
41
|
-
initFlyoutBroadcast(workspace: Blockly.WorkspaceSvg): Blockly.IVariableModel<Blockly.IVariableState
|
|
39
|
+
initFlyoutBroadcast(workspace: Blockly.WorkspaceSvg): Blockly.IVariableModel<Blockly.IVariableState> | undefined;
|
|
42
40
|
/**
|
|
43
41
|
* Return a sorted list of variable names for variable dropdown menus.
|
|
44
42
|
* Include a special option at the end for creating a new variable name.
|
|
45
|
-
*
|
|
46
43
|
* @returns Array of variable names.
|
|
47
44
|
*/
|
|
48
45
|
static dropdownCreate(this: ScratchFieldVariable): Blockly.MenuOption[];
|
|
49
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Handle the selection of an item in the variable dropdown menu.
|
|
50
48
|
* Special case the 'Rename variable...', 'Delete variable...',
|
|
51
49
|
* and 'New message...' options.
|
|
52
50
|
* In the rename case, prompt the user for a new name.
|
|
53
|
-
*
|
|
54
51
|
* @param menu The Menu component clicked.
|
|
55
52
|
* @param menuItem The MenuItem selected within menu.
|
|
56
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scratch_field_variable.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_variable.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scratch_field_variable.d.ts","sourceRoot":"","sources":["../../../../src/fields/scratch_field_variable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAMvC,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,aAAa;IAC7D,OAAO,CAAC,aAAa,CAAS;gBAG5B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,OAAO,CAAC,KAAK,CAAC,UAAU,EACxD,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,EAC1C,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB;IAStC,SAAS;IAeT;;;;;;;;;;OAUG;IACH,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS;IAYhH;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,EAAE;IAmBvE;;;;;;;OAOG;IACH,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ;IAuB9D,WAAW,CAAC,KAAK,EAAE,YAAY;IAmB/B,gBAAgB;CAOjB;AAED;;GAEG;AACH,wBAAgB,4BAA4B,SAG3C"}
|
|
@@ -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 { CheckboxBubble } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { CheckboxBubble } from './checkbox_bubble';
|
|
8
7
|
/**
|
|
9
8
|
* Invisible icon that exists solely to host the corresponding checkbox bubble.
|
|
10
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flyout_checkbox_icon.d.ts","sourceRoot":"","sources":["../../../src/flyout_checkbox_icon.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"flyout_checkbox_icon.d.ts","sourceRoot":"","sources":["../../../src/flyout_checkbox_icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,KAAK,CAAC,IAAK,YAAW,OAAO,CAAC,UAAU;cAIvD,WAAW,EAAE,OAAO,CAAC,QAAQ;IAH5D,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,IAAI,CAAyC;gBAEtB,WAAW,EAAE,OAAO,CAAC,QAAQ;IAO5D,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAIrD,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI;IAK7B,mBAAmB,IAAI,OAAO;IAI9B,eAAe,IAAI,OAAO;IAI1B,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU;IAItD,UAAU,CAAC,OAAO,EAAE,OAAO;IAI3B,OAAO;IAQD,gBAAgB,CAAC,OAAO,EAAE,OAAO;IAEvC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI;IAEvD,YAAY;IAIZ,SAAS;CAGV"}
|
|
@@ -1,12 +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
|
* Glow/unglow a stack in the workspace.
|
|
9
|
-
*
|
|
10
8
|
* @param id ID of block which starts the stack.
|
|
11
9
|
* @param isGlowingStack Whether to glow the stack.
|
|
12
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glows.d.ts","sourceRoot":"","sources":["../../../src/glows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"glows.d.ts","sourceRoot":"","sources":["../../../src/glows.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAGvC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,QAgB5D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,QAmE9D"}
|
|
@@ -1,64 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2023 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
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
export * from
|
|
48
|
-
export * from
|
|
49
|
-
export * from
|
|
50
|
-
export * from
|
|
51
|
-
export * from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import './blocks/colour';
|
|
7
|
+
import './blocks/control';
|
|
8
|
+
import './blocks/data';
|
|
9
|
+
import './blocks/event';
|
|
10
|
+
import './blocks/looks';
|
|
11
|
+
import './blocks/math';
|
|
12
|
+
import './blocks/matrix';
|
|
13
|
+
import './blocks/motion';
|
|
14
|
+
import './blocks/note';
|
|
15
|
+
import './blocks/operators';
|
|
16
|
+
import './blocks/procedures';
|
|
17
|
+
import './blocks/sensing';
|
|
18
|
+
import './blocks/sound';
|
|
19
|
+
import './blocks/text';
|
|
20
|
+
import './blocks/vertical_extensions';
|
|
21
|
+
import { CheckableContinuousFlyout } from './checkable_continuous_flyout';
|
|
22
|
+
import { ScratchBlocksTheme } from './constants';
|
|
23
|
+
import * as contextMenuItems from './context_menu_items';
|
|
24
|
+
import './css';
|
|
25
|
+
import './events/events_block_comment_change';
|
|
26
|
+
import './events/events_block_comment_collapse';
|
|
27
|
+
import './events/events_block_comment_create';
|
|
28
|
+
import './events/events_block_comment_delete';
|
|
29
|
+
import './events/events_block_comment_move';
|
|
30
|
+
import './events/events_block_comment_resize';
|
|
31
|
+
import './events/events_scratch_variable_create';
|
|
32
|
+
import { FieldColourSlider } from './fields/field_colour_slider';
|
|
33
|
+
import { FieldNote } from './fields/field_note';
|
|
34
|
+
import './flyout_checkbox_icon';
|
|
35
|
+
import { glowStack } from './glows';
|
|
36
|
+
import './renderer/cat/renderer';
|
|
37
|
+
import './renderer/renderer';
|
|
38
|
+
import * as scratchBlocksUtils from './scratch_blocks_utils';
|
|
39
|
+
import './scratch_comment_icon';
|
|
40
|
+
import './scratch_connection_checker';
|
|
41
|
+
import './scratch_dragger';
|
|
42
|
+
import './scratch_insertion_marker_previewer';
|
|
43
|
+
import './scratch_variable_map';
|
|
44
|
+
import './scratch_variable_model';
|
|
45
|
+
import * as ScratchVariables from './variables';
|
|
46
|
+
export * from 'blockly/core';
|
|
47
|
+
export * from './block_reporting';
|
|
48
|
+
export * from './procedures';
|
|
49
|
+
export * from '../msg/scratch_msgs.js';
|
|
50
|
+
export * from './constants';
|
|
52
51
|
export { glowStack };
|
|
53
52
|
export { scratchBlocksUtils };
|
|
54
53
|
export { CheckableContinuousFlyout };
|
|
55
54
|
export { ScratchVariables };
|
|
56
55
|
export { contextMenuItems };
|
|
57
56
|
export { FieldColourSlider, FieldNote };
|
|
58
|
-
export { CheckboxBubble } from
|
|
59
|
-
export { ScratchZoomControls } from
|
|
60
|
-
export { StatusIndicatorLabel, StatusButtonState
|
|
61
|
-
export * from
|
|
57
|
+
export { CheckboxBubble } from './checkbox_bubble';
|
|
58
|
+
export { ScratchZoomControls } from './scratch_zoom_controls';
|
|
59
|
+
export { StatusIndicatorLabel, StatusButtonState } from './status_indicator_label';
|
|
60
|
+
export * from './xml';
|
|
62
61
|
interface ScratchBlocksOptions extends Blockly.BlocklyOptions {
|
|
63
62
|
/**
|
|
64
63
|
* Scratch uses "theme" to talk about the shape of blocks. The Blockly concept of a theme affects CSS properties and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,iBAAiB,CAAA;AACxB,OAAO,kBAAkB,CAAA;AACzB,OAAO,eAAe,CAAA;AACtB,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,eAAe,CAAA;AACtB,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AACxB,OAAO,eAAe,CAAA;AACtB,OAAO,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;AAC5B,OAAO,kBAAkB,CAAA;AACzB,OAAO,gBAAgB,CAAA;AACvB,OAAO,eAAe,CAAA;AACtB,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAA;AACxD,OAAO,OAAO,CAAA;AACd,OAAO,sCAAsC,CAAA;AAC7C,OAAO,wCAAwC,CAAA;AAC/C,OAAO,sCAAsC,CAAA;AAC7C,OAAO,sCAAsC,CAAA;AAC7C,OAAO,oCAAoC,CAAA;AAC3C,OAAO,sCAAsC,CAAA;AAC7C,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA6B,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAE3F,OAAO,EAAqB,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAQlE,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAAmB,SAAS,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,yBAAyB,CAAA;AAChC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAA;AAC5D,OAAO,wBAAwB,CAAA;AAC/B,OAAO,8BAA8B,CAAA;AAGrC,OAAO,mBAAmB,CAAA;AAC1B,OAAO,sCAAsC,CAAA;AAC7C,OAAO,wBAAwB,CAAA;AAC/B,OAAO,0BAA0B,CAAA;AAIjC,OAAO,KAAK,gBAAgB,MAAM,aAAa,CAAA;AAE/C,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,OAAO,EAAE,kBAAkB,EAAE,CAAA;AAC7B,OAAO,EAAE,yBAAyB,EAAE,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAClF,cAAc,OAAO,CAAA;AAErB,UAAU,oBAAqB,SAAQ,OAAO,CAAC,cAAc;IAC3D;;;OAGG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAClC;AASD,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,wBAmDvE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Visual Blocks Editor
|
|
4
3
|
*
|
|
5
4
|
* Copyright 2012 Google Inc.
|
|
@@ -18,14 +17,14 @@
|
|
|
18
17
|
* limitations under the License.
|
|
19
18
|
*/
|
|
20
19
|
/**
|
|
21
|
-
* @
|
|
20
|
+
* @file Utility functions for handling procedures.
|
|
22
21
|
* @author fraser@google.com (Neil Fraser)
|
|
23
22
|
*/
|
|
24
|
-
import * as Blockly from
|
|
23
|
+
import * as Blockly from 'blockly/core';
|
|
25
24
|
/**
|
|
26
25
|
* Construct the blocks required by the flyout for the procedure category.
|
|
27
26
|
* @param workspace The workspace containing procedures.
|
|
28
|
-
* @
|
|
27
|
+
* @returns Array of XML block elements.
|
|
29
28
|
*/
|
|
30
29
|
declare function getProceduresCategory(workspace: Blockly.WorkspaceSvg): Element[];
|
|
31
30
|
/**
|
|
@@ -37,7 +36,7 @@ declare function getProceduresCategory(workspace: Blockly.WorkspaceSvg): Element
|
|
|
37
36
|
* @param allowRecursive True if the search should include recursive
|
|
38
37
|
* procedure calls. False if the search should ignore the stack starting
|
|
39
38
|
* with definitionRoot.
|
|
40
|
-
* @
|
|
39
|
+
* @returns Array of caller blocks.
|
|
41
40
|
*/
|
|
42
41
|
export declare function getCallers(name: string, workspace: Blockly.WorkspaceSvg, definitionRoot: Blockly.BlockSvg, allowRecursive: boolean): Blockly.BlockSvg[];
|
|
43
42
|
/**
|
|
@@ -50,7 +49,7 @@ declare function createProcedureDefCallback(workspace: Blockly.WorkspaceSvg): vo
|
|
|
50
49
|
* This appears in the context menu for procedure definitions and procedure
|
|
51
50
|
* calls.
|
|
52
51
|
* @param block The block where the right-click originated.
|
|
53
|
-
* @
|
|
52
|
+
* @returns A menu option, containing text, enabled, and a callback.
|
|
54
53
|
*/
|
|
55
54
|
declare function makeEditOption(block: Blockly.BlockSvg): Blockly.ContextMenuRegistry.ContextMenuOption;
|
|
56
55
|
/**
|
|
@@ -58,12 +57,11 @@ declare function makeEditOption(block: Blockly.BlockSvg): Blockly.ContextMenuReg
|
|
|
58
57
|
* @param procCode The identifier of the procedure to delete.
|
|
59
58
|
* @param definitionRoot The root block of the stack that defines the custom
|
|
60
59
|
* procedure.
|
|
61
|
-
* @
|
|
60
|
+
* @returns True if the custom procedure was deleted, false otherwise.
|
|
62
61
|
*/
|
|
63
62
|
declare function deleteProcedureDefCallback(procCode: string, definitionRoot: Blockly.BlockSvg): boolean;
|
|
64
63
|
/**
|
|
65
64
|
* Returns whether the given block is a procedure block and narrows its type.
|
|
66
|
-
*
|
|
67
65
|
* @param block The block to check.
|
|
68
66
|
* @returns True if the block is a procedure block, otherwise false.
|
|
69
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../../../src/procedures.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../../../src/procedures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AA+BvC;;;;GAIG;AACH,iBAAS,qBAAqB,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,EAAE,CAkBzE;AA2BD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,OAAO,CAAC,YAAY,EAC/B,cAAc,EAAE,OAAO,CAAC,QAAQ,EAChC,cAAc,EAAE,OAAO,GACtB,OAAO,CAAC,QAAQ,EAAE,CAepB;AAoFD;;;GAGG;AACH,iBAAS,0BAA0B,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,QAElE;AAqGD;;;;;;GAMG;AACH,iBAAS,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,iBAAiB,CAU9F;AAED;;;;;;GAMG;AACH,iBAAS,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAU/F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,GAAG,KAAK,IAAI,cAAc,CAMjF;AAED;;;GAGG;AACH,UAAU,cAAe,SAAQ,OAAO,CAAC,QAAQ;IAC/C,WAAW,IAAI,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,KAAK,oBAAoB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAA;AAEvG,QAAA,MAAM,iBAAiB,EAAE;IACvB,4BAA4B,EAAE,oBAAoB,GAAG,SAAS,CAAA;IAC9D,0BAA0B,EAAE,OAAO,0BAA0B,CAAA;IAC7D,0BAA0B,EAAE,OAAO,0BAA0B,CAAA;IAC7D,qBAAqB,EAAE,OAAO,qBAAqB,CAAA;IACnD,cAAc,EAAE,OAAO,cAAc,CAAA;CAOtC,CAAA;AACD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,19 +1,17 @@
|
|
|
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 { RecyclableBlockFlyoutInflater as BlocklyRecyclableBlockFlyoutInflater } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { RecyclableBlockFlyoutInflater as BlocklyRecyclableBlockFlyoutInflater } from '@blockly/continuous-toolbox';
|
|
8
7
|
/**
|
|
9
8
|
* A block inflater that caches and reuses blocks to improve performance.
|
|
10
9
|
*/
|
|
11
10
|
export declare class RecyclableBlockFlyoutInflater extends BlocklyRecyclableBlockFlyoutInflater {
|
|
12
11
|
/**
|
|
13
12
|
* Creates a block on the flyout workspace from the given block definition.
|
|
14
|
-
*
|
|
15
13
|
* @param state A JSON representation of a block to load.
|
|
16
|
-
* @param flyoutWorkspace The
|
|
14
|
+
* @param flyoutWorkspace The workspace on which the block will be inflated.
|
|
17
15
|
* @returns The newly created block.
|
|
18
16
|
*/
|
|
19
17
|
load(state: Blockly.utils.toolbox.BlockInfo, flyoutWorkspace: Blockly.WorkspaceSvg): Blockly.FlyoutItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recyclable_block_flyout_inflater.d.ts","sourceRoot":"","sources":["../../../src/recyclable_block_flyout_inflater.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"recyclable_block_flyout_inflater.d.ts","sourceRoot":"","sources":["../../../src/recyclable_block_flyout_inflater.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,6BAA6B,IAAI,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAGnH;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,oCAAoC;IACrF;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU;CAYxG;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,SAGpD"}
|
|
@@ -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 { ConstantProvider } from
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ConstantProvider } from './constants';
|
|
8
7
|
export declare class BowlerHat extends Blockly.blockRendering.Hat {
|
|
9
8
|
constructor(constants: ConstantProvider);
|
|
10
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bowler_hat.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bowler_hat.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bowler_hat.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bowler_hat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9C,qBAAa,SAAU,SAAQ,OAAO,CAAC,cAAc,CAAC,GAAG;gBAC3C,SAAS,EAAE,gBAAgB;CAOxC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
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
|
|
7
|
-
import { type ConstantProvider, type CatPathState } from
|
|
8
|
-
import { type
|
|
9
|
-
import { type
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { type ConstantProvider, type CatPathState } from './constants';
|
|
7
|
+
import { type RenderInfo } from './render_info';
|
|
8
|
+
import { type CatScratchRenderer } from './renderer';
|
|
10
9
|
declare enum FacePart {
|
|
11
10
|
MOUTH = 0,
|
|
12
11
|
EYE_1_OPEN = 1,
|
|
@@ -31,10 +30,12 @@ export declare class CatFace {
|
|
|
31
30
|
constructor(info: RenderInfo);
|
|
32
31
|
/**
|
|
33
32
|
* Initializes the face SVG elements if they haven't been created yet.
|
|
33
|
+
* @param parent The SVG element to attach the face geometry to.
|
|
34
34
|
*/
|
|
35
35
|
init(parent: SVGElement): void;
|
|
36
36
|
/**
|
|
37
37
|
* Updates the transform of the entire face group.
|
|
38
|
+
* @param transform The SVG transform attribute value to apply.
|
|
38
39
|
*/
|
|
39
40
|
setTransform(transform: string): void;
|
|
40
41
|
private setupBlinking_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat_face.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/cat_face.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cat_face.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/cat_face.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAA6B,MAAM,aAAa,CAAA;AACjG,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAIpD,aAAK,QAAQ;IACX,KAAK,IAAA;IACL,UAAU,IAAA;IACV,UAAU,IAAA;IACV,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,YAAY,IAAA;IACZ,YAAY,IAAA;CACb;AAUD;;;;GAIG;AACH,qBAAa,OAAO;IAClB,UAAU,EAAG,UAAU,CAAA;IACvB,MAAM,EAAS,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;IAC3C,YAAY,EAAE,YAAY,CAAA;IAC1B,UAAU,EAAE,gBAAgB,CAAA;IAC5B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAA;gBAEZ,IAAI,EAAE,UAAU;IAW5B;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,UAAU;IAOvB;;;OAGG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM;IAM9B,OAAO,CAAC,cAAc;IAwBtB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,kBAAkB;CAgF3B"}
|
|
@@ -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 { ConstantProvider as ClassicConstantProvider } from
|
|
5
|
+
import { ConstantProvider as ClassicConstantProvider } from '../constants';
|
|
7
6
|
export declare enum PathCapType {
|
|
8
7
|
CAP = "CAP",
|
|
9
8
|
BOWLER = "BOWLER"
|
|
@@ -52,6 +51,7 @@ export declare class ConstantProvider extends ClassicConstantProvider {
|
|
|
52
51
|
* Make the starting portion of a block's hat.
|
|
53
52
|
* The return value will be stored as START_HAT.
|
|
54
53
|
* In the case of cat blocks, this is just a placeholder for sizing.
|
|
54
|
+
* @returns An object containing the hat's height and width dimensions.
|
|
55
55
|
*/
|
|
56
56
|
makeStartHat(): {
|
|
57
57
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/constants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAE1E,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,EAAE,OAAO;CACV;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAA;IACpB,SAAS,EAAE,YAAY,CAAA;IACvB,SAAS,EAAE,YAAY,CAAA;CACxB;AAED,qBAAa,gBAAiB,SAAQ,uBAAuB;IAC3D,gBAAgB,SAAO;IACvB,eAAe,SAAK;IAEpB,iBAAiB,SAAK;IAEtB,YAAY,SAAM;IAElB,OAAO,SAAO;IACd,OAAO,SAAO;IACd,OAAO,SAAO;IACd,OAAO,SAAO;IACd,eAAe,SAAM;IACrB,iBAAiB,SAGwC;IACzD,iBAAiB,SAGuC;IAExD,UAAU,SAQ4C;IAEtD,gBAAgB,SAAY;IAC5B,iBAAiB,SAGkB;IACnC,iBAAiB,SAGkB;IAEnC,cAAc,SAAgC;IAC9C,eAAe,SAA6B;IAC5C,YAAY,SAA2B;IAEvC,iBAAiB,SAAoE;IACrF,iBAAiB,SAAmE;IACpF,mBAAmB,SAAmE;IACtF,mBAAmB,SAA+D;IAElF,iBAAiB,SAAK;IACtB,kBAAkB,SAAQ;IAC1B,eAAe,SAAwB;IACvC,oBAAoB,SAA+F;IACnH,oBAAoB,SAA2E;IAC/F,sBAAsB,SACkF;IACxG,sBAAsB,SAAuE;IAK7F,kBAAkB,SAAO;IAEzB;;;;;OAKG;IACM,YAAY;;;;;IAYrB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;CAU/C"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2026 Scratch Foundation
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import { Drawer as ClassicDrawer } from
|
|
7
|
-
import { type ConstantProvider } from
|
|
8
|
-
import { type RenderInfo } from
|
|
5
|
+
import { Drawer as ClassicDrawer } from '../drawer';
|
|
6
|
+
import { type ConstantProvider } from './constants';
|
|
7
|
+
import { type RenderInfo } from './render_info';
|
|
9
8
|
export declare class Drawer extends ClassicDrawer {
|
|
10
9
|
constants_: ConstantProvider;
|
|
11
10
|
info_: RenderInfo;
|
|
12
11
|
draw(): void;
|
|
13
12
|
drawInternals_(): void;
|
|
14
|
-
makeReplacementTop_(): string;
|
|
13
|
+
makeReplacementTop_(): string | undefined;
|
|
15
14
|
}
|
|
16
15
|
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/drawer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/drawer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA;AAEnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,qBAAa,MAAO,SAAQ,aAAa;IAC/B,UAAU,EAAE,gBAAgB,CAAA;IAC5B,KAAK,EAAE,UAAU,CAAA;IAEhB,IAAI;IAmBJ,cAAc;IAgBd,mBAAmB;CAO7B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2026 Scratch Foundation
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import { PathObject as ClassicPathObject } from
|
|
7
|
-
import { type CatFace } from
|
|
5
|
+
import { PathObject as ClassicPathObject } from '../path_object';
|
|
6
|
+
import { type CatFace } from './cat_face';
|
|
8
7
|
export declare class PathObject extends ClassicPathObject {
|
|
9
8
|
/**
|
|
10
9
|
* The face view for this block.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path_object.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/path_object.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"path_object.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/path_object.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,qBAAa,UAAW,SAAQ,iBAAiB;IAC/C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license
|
|
3
2
|
* Copyright 2026 Scratch Foundation
|
|
4
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
4
|
*/
|
|
6
|
-
import { RenderInfo as ClassicRenderInfo } from
|
|
7
|
-
import { ConstantProvider } from
|
|
8
|
-
import { CatScratchRenderer } from
|
|
5
|
+
import { RenderInfo as ClassicRenderInfo } from '../render_info';
|
|
6
|
+
import { ConstantProvider } from './constants';
|
|
7
|
+
import { CatScratchRenderer } from './renderer';
|
|
9
8
|
export declare class RenderInfo extends ClassicRenderInfo {
|
|
10
9
|
constants_: ConstantProvider;
|
|
11
10
|
renderer_: CatScratchRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render_info.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/render_info.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render_info.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/render_info.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,qBAAa,UAAW,SAAQ,iBAAiB;IACvC,UAAU,EAAE,gBAAgB,CAAA;IAC5B,SAAS,EAAE,kBAAkB,CAAA;CACtC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
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
|
|
7
|
-
import { ScratchRenderer } from
|
|
8
|
-
import { ConstantProvider } from
|
|
9
|
-
import { Drawer } from
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
import { ScratchRenderer } from '../renderer';
|
|
7
|
+
import { ConstantProvider } from './constants';
|
|
8
|
+
import { Drawer } from './drawer';
|
|
9
|
+
import { PathObject } from './path_object';
|
|
10
|
+
import { RenderInfo } from './render_info';
|
|
12
11
|
export declare class CatScratchRenderer extends ScratchRenderer {
|
|
13
12
|
makeConstants_(): ConstantProvider;
|
|
14
|
-
makeDrawer_(block: Blockly.BlockSvg, info: RenderInfo): Drawer;
|
|
13
|
+
makeDrawer_(block: Blockly.BlockSvg, info: Blockly.blockRendering.RenderInfo): Drawer;
|
|
15
14
|
makeRenderInfo_(block: Blockly.BlockSvg): RenderInfo;
|
|
16
15
|
makePathObject(root: SVGElement, style: Blockly.Theme.BlockStyle): PathObject;
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/cat/renderer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,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,qBAAa,kBAAmB,SAAQ,eAAe;IAC5C,cAAc;IAId,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,UAAU;IAI5E,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,GAAG,UAAU;IAIpD,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,UAAU;CAGvF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 Google LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import * as Blockly from 'blockly/core';
|
|
6
|
+
export declare class ConstantProvider extends Blockly.zelos.ConstantProvider {
|
|
7
|
+
REPLACEMENT_GLOW_COLOUR: string;
|
|
8
|
+
SELECTED_GLOW_COLOUR: string;
|
|
9
|
+
BOWLER_HAT_HEIGHT: number;
|
|
10
|
+
/**
|
|
11
|
+
* Sets the visual theme used to render the workspace.
|
|
12
|
+
* This method also synthesizes a "selected" theme, used to color blocks with
|
|
13
|
+
* dropdown menus when the menu is active. Additionally, if the theme's block
|
|
14
|
+
* styles contain any raw color values, corresponding CSS variables will be
|
|
15
|
+
* created/overridden so that those colors can be dynamically referenced in
|
|
16
|
+
* stylesheets.
|
|
17
|
+
* @param theme The new theme to apply.
|
|
18
|
+
*/
|
|
19
|
+
setTheme(theme: Blockly.Theme): void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the shape for the given connection.
|
|
22
|
+
*
|
|
23
|
+
* For OUTPUT_VALUE connections, the block's explicit output shape takes
|
|
24
|
+
* priority (e.g. a Boolean reporter gets a hexagonal output connector).
|
|
25
|
+
* For INPUT_VALUE connections, we use only the connection's type checks so
|
|
26
|
+
* that input slots inside a Boolean reporter (like `<a = b>`) are still
|
|
27
|
+
* drawn with the rounded shape that matches what they accept, not the
|
|
28
|
+
* hexagonal shape of their parent block's output.
|
|
29
|
+
* @param connection The connection whose shape to determine.
|
|
30
|
+
* @returns The shape object for the given connection.
|
|
31
|
+
*/
|
|
32
|
+
shapeFor(connection: Blockly.RenderedConnection): ReturnType<Blockly.zelos.ConstantProvider['shapeFor']>;
|
|
33
|
+
createDom(svg: SVGElement, tagName: string, selector: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Generate a bowler hat path string for a specific block.
|
|
36
|
+
* @param width the `info_.width` of the block.
|
|
37
|
+
* @returns The SVG path string for the bowler hat.
|
|
38
|
+
*/
|
|
39
|
+
makeBowlerHatPath(width: number): string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/renderer/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,qBAAa,gBAAiB,SAAQ,OAAO,CAAC,KAAK,CAAC,gBAAgB;IAClE,uBAAuB,SAAY;IACnC,oBAAoB,SAAY;IAEhC,iBAAiB,SAAK;IAEtB;;;;;;;;OAQG;IACM,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK;IAoBtC;;;;;;;;;;;OAWG;IACM,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAqCxG,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAKrE;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAIzC"}
|