scratch-blocks 2.1.4 → 2.1.6
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 +76 -24
- package/README.md +40 -0
- package/dist/main.mjs +1 -1
- package/dist/types/src/block_reporting.d.ts.map +1 -1
- package/dist/types/src/blocks/procedures.d.ts +2 -2
- package/dist/types/src/blocks/procedures.d.ts.map +1 -1
- package/dist/types/src/checkable_continuous_flyout.d.ts +6 -3
- package/dist/types/src/checkable_continuous_flyout.d.ts.map +1 -1
- package/dist/types/src/checkbox_bubble.d.ts +7 -7
- 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/context_menu_items.d.ts.map +1 -1
- package/dist/types/src/events/events_block_comment_base.d.ts +1 -1
- package/dist/types/src/events/events_block_comment_base.d.ts.map +1 -1
- package/dist/types/src/events/events_block_drag_end.d.ts +1 -1
- 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 -1
- package/dist/types/src/events/events_block_drag_outside.d.ts.map +1 -1
- package/dist/types/src/fields/field_colour_slider.d.ts.map +1 -1
- package/dist/types/src/fields/field_matrix.d.ts.map +1 -1
- package/dist/types/src/fields/field_note.d.ts +6 -4
- package/dist/types/src/fields/field_note.d.ts.map +1 -1
- package/dist/types/src/fields/field_textinput_removable.d.ts.map +1 -1
- package/dist/types/src/fields/field_variable_getter.d.ts.map +1 -1
- package/dist/types/src/fields/field_vertical_separator.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_angle.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_dropdown.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_number.d.ts.map +1 -1
- package/dist/types/src/fields/scratch_field_variable.d.ts +1 -0
- package/dist/types/src/fields/scratch_field_variable.d.ts.map +1 -1
- package/dist/types/src/flyout_checkbox_icon.d.ts +5 -5
- package/dist/types/src/flyout_checkbox_icon.d.ts.map +1 -1
- package/dist/types/src/glows.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/procedures.d.ts +4 -4
- package/dist/types/src/procedures.d.ts.map +1 -1
- package/dist/types/src/recyclable_block_flyout_inflater.d.ts +2 -2
- package/dist/types/src/recyclable_block_flyout_inflater.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/cat_face.d.ts +1 -1
- package/dist/types/src/renderer/cat/cat_face.d.ts.map +1 -1
- package/dist/types/src/renderer/cat/drawer.d.ts.map +1 -1
- package/dist/types/src/renderer/constants.d.ts.map +1 -1
- package/dist/types/src/renderer/drawer.d.ts.map +1 -1
- package/dist/types/src/renderer/render_info.d.ts.map +1 -1
- package/dist/types/src/scratch_blocks_utils.d.ts +22 -0
- package/dist/types/src/scratch_blocks_utils.d.ts.map +1 -1
- package/dist/types/src/scratch_c_block_wrap.d.ts +2 -0
- package/dist/types/src/scratch_c_block_wrap.d.ts.map +1 -0
- package/dist/types/src/scratch_comment_bubble.d.ts +4 -4
- package/dist/types/src/scratch_comment_bubble.d.ts.map +1 -1
- package/dist/types/src/scratch_comment_icon.d.ts +1 -1
- package/dist/types/src/scratch_comment_icon.d.ts.map +1 -1
- package/dist/types/src/scratch_continuous_category.d.ts +3 -1
- package/dist/types/src/scratch_continuous_category.d.ts.map +1 -1
- package/dist/types/src/scratch_continuous_toolbox.d.ts +2 -1
- package/dist/types/src/scratch_continuous_toolbox.d.ts.map +1 -1
- package/dist/types/src/status_indicator_label.d.ts +3 -3
- package/dist/types/src/status_indicator_label.d.ts.map +1 -1
- package/dist/types/src/status_indicator_label_flyout_inflater.d.ts.map +1 -1
- package/dist/types/src/variables.d.ts +1 -1
- package/dist/types/src/variables.d.ts.map +1 -1
- package/dist/types/src/workspace_block_lookup.d.ts +4 -0
- package/dist/types/src/workspace_block_lookup.d.ts.map +1 -0
- package/eslint.config.mjs +23 -26
- package/package.json +10 -3
- package/src/block_reporting.ts +5 -5
- package/src/blocks/control.ts +5 -5
- package/src/blocks/event.ts +1 -1
- package/src/blocks/motion.ts +2 -2
- package/src/blocks/procedures.ts +162 -69
- package/src/blocks/sensing.ts +0 -1
- package/src/blocks/vertical_extensions.ts +11 -8
- package/src/checkable_continuous_flyout.ts +45 -12
- package/src/checkbox_bubble.ts +7 -7
- package/src/colours.ts +4 -2
- package/src/context_menu_items.ts +41 -16
- package/src/data_category.ts +11 -3
- package/src/events/events_block_comment_base.ts +5 -1
- package/src/events/events_block_comment_change.ts +5 -1
- package/src/events/events_block_comment_collapse.ts +6 -2
- package/src/events/events_block_comment_create.ts +5 -1
- package/src/events/events_block_comment_move.ts +6 -2
- package/src/events/events_block_comment_resize.ts +6 -2
- package/src/events/events_block_drag_end.ts +5 -1
- package/src/events/events_block_drag_outside.ts +5 -1
- package/src/events/events_scratch_variable_create.ts +5 -1
- package/src/fields/field_colour_slider.ts +3 -5
- package/src/fields/field_matrix.ts +33 -17
- package/src/fields/field_note.ts +56 -20
- package/src/fields/field_textinput_removable.ts +13 -4
- package/src/fields/field_variable_getter.ts +20 -6
- package/src/fields/field_vertical_separator.ts +5 -1
- package/src/fields/scratch_field_angle.ts +32 -21
- package/src/fields/scratch_field_dropdown.ts +6 -2
- package/src/fields/scratch_field_number.ts +22 -13
- package/src/fields/scratch_field_variable.ts +26 -12
- package/src/flyout_checkbox_icon.ts +9 -5
- package/src/glows.ts +5 -5
- package/src/index.ts +21 -11
- package/src/procedures.ts +92 -42
- package/src/recyclable_block_flyout_inflater.ts +5 -4
- package/src/renderer/cat/cat_face.ts +1 -1
- package/src/renderer/cat/drawer.ts +4 -1
- package/src/renderer/constants.ts +19 -14
- package/src/renderer/drawer.ts +2 -1
- package/src/renderer/render_info.ts +12 -9
- package/src/renderer/renderer.ts +1 -1
- package/src/scratch_blocks_utils.ts +0 -2
- package/src/scratch_c_block_wrap.ts +108 -0
- package/src/scratch_comment_bubble.ts +30 -19
- package/src/scratch_comment_icon.ts +9 -12
- package/src/scratch_connection_checker.ts +1 -2
- package/src/scratch_continuous_category.ts +20 -11
- package/src/scratch_continuous_toolbox.ts +12 -3
- package/src/scratch_dragger.ts +2 -2
- package/src/scratch_variable_map.ts +1 -1
- package/src/status_indicator_label.ts +13 -9
- package/src/status_indicator_label_flyout_inflater.ts +2 -1
- package/src/variables.ts +21 -14
- package/src/workspace_block_lookup.ts +14 -0
- package/src/xml.ts +1 -1
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +1 -1
- package/vitest.config.ts +35 -0
- package/dist/types/tests/blocks/logic_ternary_test.d.ts +0 -13
- package/dist/types/tests/blocks/logic_ternary_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/block_test.d.ts +0 -4
- package/dist/types/tests/jsunit/block_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/connection_db_test.d.ts +0 -25
- package/dist/types/tests/jsunit/connection_db_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/connection_test.d.ts +0 -39
- package/dist/types/tests/jsunit/connection_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/db_test.d.ts +0 -7
- package/dist/types/tests/jsunit/db_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/event_test.d.ts +0 -76
- package/dist/types/tests/jsunit/event_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/extensions_test.d.ts +0 -18
- package/dist/types/tests/jsunit/extensions_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/field_angle_test.d.ts +0 -3
- package/dist/types/tests/jsunit/field_angle_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/field_number_test.d.ts +0 -3
- package/dist/types/tests/jsunit/field_number_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/field_test.d.ts +0 -8
- package/dist/types/tests/jsunit/field_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/field_variable_getter_test.d.ts +0 -5
- package/dist/types/tests/jsunit/field_variable_getter_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/field_variable_test.d.ts +0 -19
- package/dist/types/tests/jsunit/field_variable_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/generator_test.d.ts +0 -2
- package/dist/types/tests/jsunit/generator_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/gesture_test.d.ts +0 -10
- package/dist/types/tests/jsunit/gesture_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/input_test.d.ts +0 -9
- package/dist/types/tests/jsunit/input_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/json_test.d.ts +0 -11
- package/dist/types/tests/jsunit/json_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/names_test.d.ts +0 -5
- package/dist/types/tests/jsunit/names_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/procedure_test.d.ts +0 -15
- package/dist/types/tests/jsunit/procedure_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/scratch_block_comment_test.d.ts +0 -14
- package/dist/types/tests/jsunit/scratch_block_comment_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/svg_test.d.ts +0 -14
- package/dist/types/tests/jsunit/svg_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/test_runner.d.ts +0 -2
- package/dist/types/tests/jsunit/test_runner.d.ts.map +0 -1
- package/dist/types/tests/jsunit/test_utilities.d.ts +0 -50
- package/dist/types/tests/jsunit/test_utilities.d.ts.map +0 -1
- package/dist/types/tests/jsunit/utils_test.d.ts +0 -10
- package/dist/types/tests/jsunit/utils_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/variable_map_test.d.ts +0 -28
- package/dist/types/tests/jsunit/variable_map_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/variable_model_test.d.ts +0 -14
- package/dist/types/tests/jsunit/variable_model_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/widget_div_test.d.ts +0 -37
- package/dist/types/tests/jsunit/widget_div_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/workspace_comment_test.d.ts +0 -13
- package/dist/types/tests/jsunit/workspace_comment_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/workspace_test.d.ts +0 -22
- package/dist/types/tests/jsunit/workspace_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/workspace_undo_redo_test.d.ts +0 -33
- package/dist/types/tests/jsunit/workspace_undo_redo_test.d.ts.map +0 -1
- package/dist/types/tests/jsunit/xml_test.d.ts +0 -55
- package/dist/types/tests/jsunit/xml_test.d.ts.map +0 -1
- package/dist/types/tests/workspace_svg/workspace_svg_test.d.ts +0 -12
- package/dist/types/tests/workspace_svg/workspace_svg_test.d.ts.map +0 -1
- package/types/continuous-toolbox.d.ts +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
declare function xmlTest_setUp(): void;
|
|
2
|
-
declare function xmlTest_setUpWithMockBlocks(): void;
|
|
3
|
-
declare function xmlTest_tearDown(): void;
|
|
4
|
-
declare function xmlTest_tearDownWithMockBlocks(): void;
|
|
5
|
-
/**
|
|
6
|
-
* Check the values of the non variable field dom.
|
|
7
|
-
* @param {!Element} fieldDom The xml dom of the non variable field.
|
|
8
|
-
* @param {!string} name The expected name of the variable.
|
|
9
|
-
* @param {!string} text The expected text of the variable.
|
|
10
|
-
*/
|
|
11
|
-
declare function xmlTest_checkNonVariableField(fieldDom: Element, name: string, text: string): void;
|
|
12
|
-
/**
|
|
13
|
-
* Check the values of the variable field DOM.
|
|
14
|
-
* @param {!Element} fieldDom The xml dom of the variable field.
|
|
15
|
-
* @param {!string} name The expected name of the variable.
|
|
16
|
-
* @param {!string} type The expected type of the variable.
|
|
17
|
-
* @param {!string} id The expected id of the variable.
|
|
18
|
-
* @param {!string} text The expected text of the variable.
|
|
19
|
-
*/
|
|
20
|
-
declare function xmlTest_checkVariableFieldDomValues(fieldDom: Element, name: string, type: string, id: string, text: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Check the values of the variable DOM.
|
|
23
|
-
* @param {!Element} variableDom The xml dom of the variable.
|
|
24
|
-
* @param {!string} type The expected type of the variable.
|
|
25
|
-
* @param {!string} id The expected id of the variable.
|
|
26
|
-
* @param {!string} text The expected text of the variable.
|
|
27
|
-
*/
|
|
28
|
-
declare function xmlTest_checkVariableDomValues(variableDom: Element, type: string, id: string, text: string): void;
|
|
29
|
-
declare function test_textToDom(): void;
|
|
30
|
-
declare function test_domToText(): void;
|
|
31
|
-
declare function test_domToWorkspace_BackwardCompatibility(): void;
|
|
32
|
-
declare function test_domToWorkspace_VariablesAtTop(): void;
|
|
33
|
-
declare function test_domToWorkspace_VariablesAtTop_DuplicateVariablesTag(): void;
|
|
34
|
-
declare function test_domToWorkspace_VariablesAtTop_MissingType(): void;
|
|
35
|
-
declare function test_domToWorkspace_VariablesAtTop_MismatchBlockType(): void;
|
|
36
|
-
declare function test_domToPrettyText(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Tests the that appendDomToWorkspace works in a headless mode.
|
|
39
|
-
* Also see test_appendDomToWorkspace() in workspace_svg_test.js.
|
|
40
|
-
*/
|
|
41
|
-
declare function test_appendDomToWorkspace(): void;
|
|
42
|
-
declare function test_appendDomToWorkspace(): void;
|
|
43
|
-
declare function test_blockToDom_fieldToDom_trivial(): void;
|
|
44
|
-
declare function test_blockToDom_fieldToDom_defaultCase(): void;
|
|
45
|
-
declare function test_blockToDom_fieldToDom_notAFieldVariable(): void;
|
|
46
|
-
declare function test_variablesToDom_oneVariable(): void;
|
|
47
|
-
declare function test_variablesToDom_twoVariables_oneBlock(): void;
|
|
48
|
-
declare function test_variablesToDom_noVariables(): void;
|
|
49
|
-
declare function test_fieldIsSerialized(): void;
|
|
50
|
-
declare function test_fieldIsNotSerialized(): void;
|
|
51
|
-
declare function test_variableFieldXml_caseSensitive(): void;
|
|
52
|
-
declare var mockControl_: any;
|
|
53
|
-
declare var workspace: any;
|
|
54
|
-
declare var XML_TEXT: string;
|
|
55
|
-
//# sourceMappingURL=xml_test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xml_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/xml_test.js"],"names":[],"mappings":"AAuDA,uCAGC;AAED,qDA8BC;AAED,0CAGC;AAED,wDAGC;AAED;;;;;GAKG;AACH,yDAJY,OAAO,QACR,MAAO,QACP,MAAO,QAOjB;AAED;;;;;;;GAOG;AACH,+DANY,OAAO,QACR,MAAO,QACP,MAAO,MACP,MAAO,QACP,MAAO,QAOjB;AAED;;;;;;GAMG;AACH,6DALY,OAAO,QACR,MAAO,MACP,MAAO,QACP,MAAO,QAMjB;AAED,wCAIC;AAED,wCAIC;AAED,mEAkBC;AAED,4DAwBC;AAED,kFAcC;AAED,wEAqBC;AAED,8EAsBC;AAED,8CAIC;AAED;;;GAGG;AACH,mDA2BC;;AAED,4DAUC;AAED,gEAiBC;AAED,sEAoBC;AAED,yDAYC;AAED,mEAiBC;AAED,yDAMC;AAED,gDAUC;AAED,mDAWC;AAED,6DAiBC;AA/ZD,8BAAgB;AAChB,2BAAa;AACb,6BA2BY"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare function helper_createWorkspaceWithToolbox(): any;
|
|
2
|
-
declare function test_createWorkspace(): void;
|
|
3
|
-
declare function test_emptyWorkspace(): void;
|
|
4
|
-
declare function test_emptyWorkspace(): void;
|
|
5
|
-
declare function test_flatWorkspace(): void;
|
|
6
|
-
declare function test_flatWorkspace(): void;
|
|
7
|
-
declare function test_appendDomToWorkspace(): void;
|
|
8
|
-
/** Tests the alignment of appendDomToWorkspace with WorkspaceSvg. */
|
|
9
|
-
declare function test_appendDomToWorkspace(): void;
|
|
10
|
-
declare function test_addNewVariableRefreshToolbox(): void;
|
|
11
|
-
declare function test_addDuplicateVariableDoNotRefreshToolbox(): void;
|
|
12
|
-
//# sourceMappingURL=workspace_svg_test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace_svg_test.d.ts","sourceRoot":"","sources":["../../../../tests/workspace_svg/workspace_svg_test.js"],"names":[],"mappings":"AAwBA,0DAGC;AAED,8CAGC;;AAED,6CAaC;;AAED,4CAyBC;;AAED,qEAAqE;AACrE,mDAyBC;AAED,2DAcC;AAED,sEAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '@blockly/continuous-toolbox'
|