scratch-blocks 2.1.3 → 2.1.5

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.
Files changed (79) hide show
  1. package/AGENTS.md +18 -10
  2. package/README.md +40 -0
  3. package/dist/main.mjs +1 -1
  4. package/dist/types/src/blocks/procedures.d.ts.map +1 -1
  5. package/dist/types/src/index.d.ts +1 -0
  6. package/dist/types/src/index.d.ts.map +1 -1
  7. package/dist/types/src/scratch_c_block_wrap.d.ts +2 -0
  8. package/dist/types/src/scratch_c_block_wrap.d.ts.map +1 -0
  9. package/eslint.config.mjs +5 -1
  10. package/package.json +10 -3
  11. package/src/blocks/procedures.ts +81 -17
  12. package/src/index.ts +13 -5
  13. package/src/scratch_c_block_wrap.ts +92 -0
  14. package/src/scratch_connection_checker.ts +8 -2
  15. package/tsconfig.build.json +4 -0
  16. package/tsconfig.json +1 -1
  17. package/vitest.config.ts +35 -0
  18. package/dist/types/tests/blocks/logic_ternary_test.d.ts +0 -13
  19. package/dist/types/tests/blocks/logic_ternary_test.d.ts.map +0 -1
  20. package/dist/types/tests/jsunit/block_test.d.ts +0 -4
  21. package/dist/types/tests/jsunit/block_test.d.ts.map +0 -1
  22. package/dist/types/tests/jsunit/connection_db_test.d.ts +0 -25
  23. package/dist/types/tests/jsunit/connection_db_test.d.ts.map +0 -1
  24. package/dist/types/tests/jsunit/connection_test.d.ts +0 -39
  25. package/dist/types/tests/jsunit/connection_test.d.ts.map +0 -1
  26. package/dist/types/tests/jsunit/db_test.d.ts +0 -7
  27. package/dist/types/tests/jsunit/db_test.d.ts.map +0 -1
  28. package/dist/types/tests/jsunit/event_test.d.ts +0 -76
  29. package/dist/types/tests/jsunit/event_test.d.ts.map +0 -1
  30. package/dist/types/tests/jsunit/extensions_test.d.ts +0 -18
  31. package/dist/types/tests/jsunit/extensions_test.d.ts.map +0 -1
  32. package/dist/types/tests/jsunit/field_angle_test.d.ts +0 -3
  33. package/dist/types/tests/jsunit/field_angle_test.d.ts.map +0 -1
  34. package/dist/types/tests/jsunit/field_number_test.d.ts +0 -3
  35. package/dist/types/tests/jsunit/field_number_test.d.ts.map +0 -1
  36. package/dist/types/tests/jsunit/field_test.d.ts +0 -8
  37. package/dist/types/tests/jsunit/field_test.d.ts.map +0 -1
  38. package/dist/types/tests/jsunit/field_variable_getter_test.d.ts +0 -5
  39. package/dist/types/tests/jsunit/field_variable_getter_test.d.ts.map +0 -1
  40. package/dist/types/tests/jsunit/field_variable_test.d.ts +0 -19
  41. package/dist/types/tests/jsunit/field_variable_test.d.ts.map +0 -1
  42. package/dist/types/tests/jsunit/generator_test.d.ts +0 -2
  43. package/dist/types/tests/jsunit/generator_test.d.ts.map +0 -1
  44. package/dist/types/tests/jsunit/gesture_test.d.ts +0 -10
  45. package/dist/types/tests/jsunit/gesture_test.d.ts.map +0 -1
  46. package/dist/types/tests/jsunit/input_test.d.ts +0 -9
  47. package/dist/types/tests/jsunit/input_test.d.ts.map +0 -1
  48. package/dist/types/tests/jsunit/json_test.d.ts +0 -11
  49. package/dist/types/tests/jsunit/json_test.d.ts.map +0 -1
  50. package/dist/types/tests/jsunit/names_test.d.ts +0 -5
  51. package/dist/types/tests/jsunit/names_test.d.ts.map +0 -1
  52. package/dist/types/tests/jsunit/procedure_test.d.ts +0 -15
  53. package/dist/types/tests/jsunit/procedure_test.d.ts.map +0 -1
  54. package/dist/types/tests/jsunit/scratch_block_comment_test.d.ts +0 -14
  55. package/dist/types/tests/jsunit/scratch_block_comment_test.d.ts.map +0 -1
  56. package/dist/types/tests/jsunit/svg_test.d.ts +0 -14
  57. package/dist/types/tests/jsunit/svg_test.d.ts.map +0 -1
  58. package/dist/types/tests/jsunit/test_runner.d.ts +0 -2
  59. package/dist/types/tests/jsunit/test_runner.d.ts.map +0 -1
  60. package/dist/types/tests/jsunit/test_utilities.d.ts +0 -50
  61. package/dist/types/tests/jsunit/test_utilities.d.ts.map +0 -1
  62. package/dist/types/tests/jsunit/utils_test.d.ts +0 -10
  63. package/dist/types/tests/jsunit/utils_test.d.ts.map +0 -1
  64. package/dist/types/tests/jsunit/variable_map_test.d.ts +0 -28
  65. package/dist/types/tests/jsunit/variable_map_test.d.ts.map +0 -1
  66. package/dist/types/tests/jsunit/variable_model_test.d.ts +0 -14
  67. package/dist/types/tests/jsunit/variable_model_test.d.ts.map +0 -1
  68. package/dist/types/tests/jsunit/widget_div_test.d.ts +0 -37
  69. package/dist/types/tests/jsunit/widget_div_test.d.ts.map +0 -1
  70. package/dist/types/tests/jsunit/workspace_comment_test.d.ts +0 -13
  71. package/dist/types/tests/jsunit/workspace_comment_test.d.ts.map +0 -1
  72. package/dist/types/tests/jsunit/workspace_test.d.ts +0 -22
  73. package/dist/types/tests/jsunit/workspace_test.d.ts.map +0 -1
  74. package/dist/types/tests/jsunit/workspace_undo_redo_test.d.ts +0 -33
  75. package/dist/types/tests/jsunit/workspace_undo_redo_test.d.ts.map +0 -1
  76. package/dist/types/tests/jsunit/xml_test.d.ts +0 -55
  77. package/dist/types/tests/jsunit/xml_test.d.ts.map +0 -1
  78. package/dist/types/tests/workspace_svg/workspace_svg_test.d.ts +0 -12
  79. package/dist/types/tests/workspace_svg/workspace_svg_test.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"event_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/event_test.js"],"names":[],"mappings":"AAgCA,yCAGC;AAED,uDAoBC;AAED,4CAKC;AAED,0DAGC;AAED,qDAaC;AAED,mDAYC;AAED,mDAWC;AAGD,2FAMC;AAGD,2FAMC;AAGD,sEAKC;AAGD,4DAOC;AAED,iDAWC;AAED,sDAYC;AAED,iDAUC;AAED,sDAUC;AAED,iDAaC;AAED,sDAaC;AAED,yDAkBC;AAED,0DAgBC;AAED,8DAkBC;AAED,+DAgBC;AAED,uDAiBC;AAED,wDAqBC;AAED,oDASC;AAED,+CA+CC;AAED,iDAaC;AAED,mDAQC;AAED,qDAQC;AAED,oDAMC;AAED,+CA4CC;AAED,iDAUC;AAED,oDAQC;AAED,qDAQC;AAED,oDAMC;AAED,+CASC;AAED,iDAUC;AAED,mDAQC;AAED,oDAQC;AAED,4CAoBC;AAED,mDAkBC;AAED,oDAkBC;AAED,2DAaC;AAED,+CAWC;AAED,iDAYC;AAED,6CAmBC;AAED;;;GAGG;AACH,gDAaC;AAED;;;;;;;;GAQG;AACH,sDAYC;AAED;;;;;;;GAOG;AACH,6CALY,KAAK,CAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAC/B,OAAO,CAAC,KAAK,QACd,MAAM,QACN,MAAM,QAMhB;AAED,uFAIC;AAED,qDAiCC;AAID,yDAmCC;AAED,yDA4BC;AAx0BD,8BAAgB;AAChB,2BAAa"}
@@ -1,18 +0,0 @@
1
- declare function test_extension(): void;
2
- declare function test_extension_missing(): void;
3
- declare function test_extension_not_a_function(): void;
4
- declare function test_parent_tooltip_when_inline(): void;
5
- declare function test_mixin_extension(): void;
6
- declare function test_bad_mixin_overwrites_local_value(): void;
7
- declare function test_bad_mixin_overwrites_prototype(): void;
8
- declare function test_mutator_mixin(): void;
9
- declare function test_mutator_mixin_no_dialog(): void;
10
- declare function test_mutator_mixin_no_decompose_fails(): void;
11
- declare function test_mutator_mixin_no_compose_fails(): void;
12
- declare function test_mutator_mixin_no_domToMutation_fails(): void;
13
- declare function test_mutator_mixin_no_mutationToDom_fails(): void;
14
- declare function test_use_mutator_as_extension_fails(): void;
15
- declare function test_use_mutator_mixin_as_extension_fails(): void;
16
- declare function test_use_extension_as_mutator_fails(): void;
17
- declare function test_mutator_mixin_plus_function(): void;
18
- //# sourceMappingURL=extensions_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extensions_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/extensions_test.js"],"names":[],"mappings":"AA0BA,wCAgDC;AAED,gDAwBC;AAED,uDAoCC;AAED,yDA6DC;AAED,8CAoCC;AAED,+DAqCC;AAED,6DAqCC;AAED,4CA8CC;AAED,sDAyCC;AAGD,+DAqBC;AAED,6DAqBC;AAED,mEAqBC;AAED,mEAqBC;AAED,6DA0CC;AAED,mEA0CC;AAED,6DAqCC;AAED,0DA2CC"}
@@ -1,3 +0,0 @@
1
- declare function test_fieldangle_constructor(): void;
2
- declare function test_fieldangle_fromJson(): void;
3
- //# sourceMappingURL=field_angle_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field_angle_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/field_angle_test.js"],"names":[],"mappings":"AA0BA,qDAYC;AAED,kDAGC"}
@@ -1,3 +0,0 @@
1
- declare function test_fieldnumber_constructor(): void;
2
- declare function test_fieldnumber_fromJson(): void;
3
- //# sourceMappingURL=field_number_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field_number_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/field_number_test.js"],"names":[],"mappings":"AA0BA,sDAoCC;AAED,mDAaC"}
@@ -1,8 +0,0 @@
1
- declare function test_field_isEditable_simple(): void;
2
- declare function test_field_isEditable_false(): void;
3
- declare function test_field_isEditable_editableBlock(): void;
4
- declare function test_field_isEditable_editableBlock_false(): void;
5
- declare function test_field_isEditable_nonEditableBlock(): void;
6
- declare function test_field_isEditable_nonEditableBlock_false(): void;
7
- declare function test_field_register_with_custom_field(): void;
8
- //# sourceMappingURL=field_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/field_test.js"],"names":[],"mappings":"AA0BA,sDAKC;AAED,qDAKC;AAED,6DAWC;AAED,mEAYC;AAED,gEAWC;AAED,sEAYC;AAED,+DAyBC"}
@@ -1,5 +0,0 @@
1
- declare function test_fieldvariablegetter_constructor(): void;
2
- declare function test_fieldvariablegetter_isEditable(): void;
3
- declare function test_fieldvariablegetter_isEditableBlock(): void;
4
- declare function test_fieldvariablegetter_isSerializable(): void;
5
- //# sourceMappingURL=field_variable_getter_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field_variable_getter_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/field_variable_getter_test.js"],"names":[],"mappings":"AA0BA,8DAKC;AAED,6DAKC;AAED,kEAaC;AAED,iEAIC"}
@@ -1,19 +0,0 @@
1
- declare function fieldVariableTestWithMocks_setUp(): void;
2
- declare function fieldVariableTestWithMocks_tearDown(): void;
3
- declare function fieldVariable_mockBlock(workspace: any): {
4
- workspace: any;
5
- isShadow: () => boolean;
6
- };
7
- declare function fieldVariable_createAndInitField(workspace: any): any;
8
- declare function test_fieldVariable_Constructor(): void;
9
- declare function test_fieldVariable_setValueMatchId(): void;
10
- declare function test_fieldVariable_setValueNoVariable(): void;
11
- declare function test_fieldVariable_dropdownCreateVariablesExist(): void;
12
- declare function test_fieldVariable_setValueNull(): void;
13
- declare function test_fieldVariable_getVariableTypes_undefinedVariableTypes(): void;
14
- declare function test_fieldVariable_getVariableTypes_givenVariableTypes(): void;
15
- declare function test_fieldVariable_getVariableTypes_nullVariableTypes(): void;
16
- declare function test_fieldVariable_getVariableTypes_emptyListVariableTypes(): void;
17
- declare var workspace: any;
18
- declare var mockControl_: any;
19
- //# sourceMappingURL=field_variable_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field_variable_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/field_variable_test.js"],"names":[],"mappings":"AAgCA,0DAGC;AAED,6DAGC;AAED;;;EAOC;AAED,uEAOC;AAED,wDAMC;AAED,4DAeC;AAED,+DAkBC;AAED,yEAeC;AAED,yDAcC;AAED,oFAWC;AAED,gFAWC;AAED,+EAiBC;AAED,oFAmBC;AA7KD,2BAAa;AACb,8BAAgB"}
@@ -1,2 +0,0 @@
1
- declare function test_prefix(): void;
2
- //# sourceMappingURL=generator_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/generator_test.js"],"names":[],"mappings":"AAqBA,qCAMC"}
@@ -1,10 +0,0 @@
1
- declare function gestureTest_setUp(): void;
2
- declare function gestureTest_tearDown(): void;
3
- declare function test_gestureConstructor(): void;
4
- declare function test_gestureIsField_ClickInWorkspace(): void;
5
- declare function gestureIsFieldClick_InFlyoutHelper(flyout: any, expectedResult: any): void;
6
- declare function test_gestureIsFieldClick_AutoCloseFlyout(): void;
7
- declare function test_gestureIsFieldClick_AlwaysOpenFlyout(): void;
8
- declare var e: any;
9
- declare var workspace: any;
10
- //# sourceMappingURL=gesture_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gesture_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/gesture_test.js"],"names":[],"mappings":"AA6BA,2CAGC;AAED,8CAGC;AAED,iDAIC;AAED,8DAWC;AAED,4FAeC;AAED,kEAKC;AAED,mEAMC;AA9DD,mBAAK;AACL,2BAAa"}
@@ -1,9 +0,0 @@
1
- declare function test_appendField_simple(): void;
2
- declare function test_appendField_string(): void;
3
- declare function test_appendField_prefix(): void;
4
- declare function test_appendField_suffix(): void;
5
- declare function test_insertFieldAt_simple(): void;
6
- declare function test_insertFieldAt_string(): void;
7
- declare function test_insertFieldAt_prefix(): void;
8
- declare function test_insertFieldAt_suffix(): void;
9
- //# sourceMappingURL=input_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/input_test.js"],"names":[],"mappings":"AAyBA,iDAsBC;AAED,iDAeC;AAED,iDAgBC;AAED,iDAgBC;AAED,mDAsBC;AAED,mDAuBC;AAED,mDAwBC;AAED,mDAwBC"}
@@ -1,11 +0,0 @@
1
- /** Ensure a block can be instantiated from a JSON definition. */
2
- declare function test_json_minimal(): void;
3
- /** Ensure message0 creates an input. */
4
- declare function test_json_message0(): void;
5
- /** Ensure message1 creates a new input. */
6
- declare function test_json_message1(): void;
7
- /** Ensure message string is dereferenced. */
8
- declare function test_json_message0_i18n(): void;
9
- declare function test_json_dropdown(): void;
10
- declare function test_json_dropdown_image(): void;
11
- //# sourceMappingURL=json_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/json_test.js"],"names":[],"mappings":"AAqBA,mEAAmE;AACnE,2CAoBC;AAED,0CAA0C;AAC1C,4CAyBC;AAED,6CAA6C;AAC7C,4CAiCC;AAED,+CAA+C;AAC/C,iDA6BC;AAED,4CA8CC;AAED,kDAkFC"}
@@ -1,5 +0,0 @@
1
- declare function test_safeName(): void;
2
- declare function test_getName(): void;
3
- declare function test_getDistinctName(): void;
4
- declare function test_nameEquals(): void;
5
- //# sourceMappingURL=names_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"names_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/names_test.js"],"names":[],"mappings":"AAqBA,uCAQC;AAED,sCAUC;AAED,8CAOC;AAED,yCAIC"}
@@ -1,15 +0,0 @@
1
- declare function procedureTest_setUp(): void;
2
- declare function procedureTest_tearDown(): void;
3
- declare function test_findCallers_simple_oneCaller(): void;
4
- declare function test_findCallers_noRecursion(): void;
5
- declare function test_findCallers_allowRecursion(): void;
6
- declare function test_findCallers_simple_noCallers(): void;
7
- declare function test_findCallers_wrongProcCode(): void;
8
- declare function test_findCallers_onStatementInput(): void;
9
- declare function test_findCallers_multipleStacks(): void;
10
- declare function test_findCallers_multipleCallers(): void;
11
- declare function test_deleteProcedure_noCallers(): void;
12
- declare function test_deleteProcedure_recursiveCaller(): void;
13
- declare function test_deleteProcedure_nonRecursiveCaller(): void;
14
- declare var workspace: any;
15
- //# sourceMappingURL=procedure_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"procedure_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/procedure_test.js"],"names":[],"mappings":"AA2BA,6CAqCC;AAED,gDAMC;AAED,2DAmBC;AAED,sDAsBC;AAED,yDAuBC;AAED,2DAiBC;AAED,wDAoBC;AAED,2DA0BC;AAED,yDAqBC;AAED,0DAyBC;AAED,wDAsBC;AAED,8DA6BC;AAED,iEAuBC;AA7TD,2BAAa"}
@@ -1,14 +0,0 @@
1
- declare function scratchBlockCommentTest_setUp(): void;
2
- declare function scratchBlockCommentTest_tearDown(): void;
3
- declare function test_blockWithNoBlockComments(): void;
4
- declare function test_createBlockCommentMinimalArguments(): void;
5
- declare function test_createBlockCommentAllArguments(): void;
6
- declare function test_addCommentToBlock(): void;
7
- declare function test_blockCommentXYWhenPositionProvided(): void;
8
- declare function test_blockCommentXYWhenPositionNotProvided(): void;
9
- declare function test_blockCommentXYNaNPositionProvided(): void;
10
- declare function test_blockCommentXYNullPositionProvided(): void;
11
- declare var block: any;
12
- declare var workspace: any;
13
- declare var originalCreateIcon: any;
14
- //# sourceMappingURL=scratch_block_comment_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scratch_block_comment_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/scratch_block_comment_test.js"],"names":[],"mappings":"AA2BA,uDAiBC;AAED,0DAMC;AAED,uDAUC;AAED,iEAUC;AAED,6DAUC;AAED,gDAWC;AAED,iEAeC;AAED,oEAmBC;AAED,gEAgBC;AAED,iEAgBC;AAxJD,uBAAS;AACT,2BAAa;AACb,oCAA+D"}
@@ -1,14 +0,0 @@
1
- declare function svgTest_setUp(): void;
2
- declare function svgTest_tearDown(): void;
3
- /**
4
- * Create a block with one field. Must be called after svgTest_setUp().
5
- * @return {!Blockly.Block} The new block with one field.
6
- */
7
- declare function svgTest_newOneFieldBlock(): Blockly.Block;
8
- /**
9
- * Create a block with two fields. Must be called after svgTest_setUp().
10
- * @return {!Blockly.Block} The new block with two fields.
11
- */
12
- declare function svgTest_newTwoFieldBlock(): Blockly.Block;
13
- declare var svgTest_workspace: any;
14
- //# sourceMappingURL=svg_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svg_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/svg_test.js"],"names":[],"mappings":"AAuBA,uCAEC;AAED,0CAGC;AAED;;;GAGG;AACH,6CAFa,OAAO,CAAC,KAAK,CAqBzB;AAED;;;GAGG;AACH,6CAFa,OAAO,CAAC,KAAK,CAqBzB;AA3DD,mCAAqB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=test_runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_runner.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/test_runner.js"],"names":[],"mappings":""}
@@ -1,50 +0,0 @@
1
- /**
2
- * A helper function to replace Blockly.Events.fire in tests.
3
- */
4
- declare function temporary_fireEvent(event: any): void;
5
- declare function temporary_fireEvent(event: any): void;
6
- /**
7
- * Check that two arrays have the same content.
8
- * @param {!Array.<string>} array1 The first array.
9
- * @param {!Array.<string>} array2 The second array.
10
- */
11
- declare function isEqualArrays(array1: Array<string>, array2: Array<string>): void;
12
- /**
13
- * Creates a controlled MethodMock. Sets the expected return values and
14
- * the parameters if any exist. Sets the method to replay.
15
- * @param {!goog.testing.MockControl} mockControl Object that holds a set
16
- * of mocks for this test.
17
- * @param {!Object} scope The scope of the method to be mocked out.
18
- * @param {!string} funcName The name of the function we're going to mock.
19
- * @param {Array<Object>} parameters The parameters to call the mock with.
20
- * @param {Array<!Object>} return_values The values to return when called.
21
- * @return {!goog.testing.MockInterface} The mocked method.
22
- */
23
- declare function setUpMockMethod(mockControl: goog.testing.MockControl, scope: Object, funcName: string, parameters: Array<Object>, return_values: Array<Object>): goog.testing.MockInterface;
24
- /**
25
- * Check if a variable with the given values exists.
26
- * @param {Blockly.Workspace|Blockly.VariableMap} container The workspace or
27
- * variableMap the checked variable belongs to.
28
- * @param {!string} name The expected name of the variable.
29
- * @param {!string} type The expected type of the variable.
30
- * @param {!string} id The expected id of the variable.
31
- */
32
- declare function checkVariableValues(container: Blockly.Workspace | Blockly.VariableMap, name: string, type: string, id: string): void;
33
- /**
34
- * Create a test get_var_block.
35
- * Will fail if get_var_block isn't defined.
36
- * TODO (fenichel): Rename to createMockVarBlock.
37
- * @param {!string} variable_id The id of the variable to reference.
38
- * @return {!Blockly.Block} The created block.
39
- */
40
- declare function createMockBlock(variable_id: string): Blockly.Block;
41
- declare function createTwoVariablesAndBlocks(workspace: any): void;
42
- declare function createVariableAndBlock(workspace: any): void;
43
- declare function defineGetVarBlock(): void;
44
- declare function undefineGetVarBlock(): void;
45
- /**
46
- * The normal blockly event fire function. We sometimes override this. This
47
- * handle lets us reset after an override.
48
- */
49
- declare var savedFireFunc: any;
50
- //# sourceMappingURL=test_utilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_utilities.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/test_utilities.js"],"names":[],"mappings":"AAkCA;;GAEG;AACH,uDAMC;;AAED;;;;GAIG;AACH,uCAHY,KAAK,CAAE,MAAM,CAAC,UACd,KAAK,CAAE,MAAM,CAAC,QAOzB;AAED;;;;;;;;;;GAUG;AACH,8CARY,IAAI,CAAC,OAAO,CAAC,WAAW,SAExB,MAAM,YACP,MAAO,cACP,KAAK,CAAC,MAAM,CAAC,iBACb,KAAK,CAAE,MAAM,CAAC,GACZ,IAAI,CAAC,OAAO,CAAC,aAAa,CAsBtC;AAED;;;;;;;GAOG;AACH,gDANW,OAAO,CAAC,SAAS,GAAC,OAAO,CAAC,WAAW,QAErC,MAAO,QACP,MAAO,MACP,MAAO,QAQjB;AAED;;;;;;GAMG;AACH,8CAHW,MAAO,GACL,OAAO,CAAC,KAAK,CAYzB;AAED,mEAOC;AAED,8DAGC;AAED,2CAcC;AAED,6CAEC;AAjID;;;GAGG;AACH,+BAAuC"}
@@ -1,10 +0,0 @@
1
- declare function test_genUid(): void;
2
- declare function test_addClass(): void;
3
- declare function test_hasClass(): void;
4
- declare function test_removeClass(): void;
5
- declare function test_shortestStringLength(): void;
6
- declare function test_commonWordPrefix(): void;
7
- declare function test_commonWordSuffix(): void;
8
- declare function test_tokenizeInterpolation(): void;
9
- declare function test_replaceMessageReferences(): void;
10
- //# sourceMappingURL=utils_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/utils_test.js"],"names":[],"mappings":"AAqBA,qCAOC;AAED,uCAYC;AAED,uCAQC;AAED,0CAeC;AAED,mDASC;AAED,+CAqBC;AAED,+CAiBC;AAED,oDAiEC;AAED,uDA0BC"}
@@ -1,28 +0,0 @@
1
- declare function variableMapTest_setUp(): void;
2
- declare function variableMapTest_tearDown(): void;
3
- declare function test_getVariable_ByNameAndType(): void;
4
- declare function test_getVariable_NotFound(): void;
5
- declare function test_getVariableById_Trivial(): void;
6
- declare function test_getVariableById_NotFound(): void;
7
- declare function test_createVariableTrivial(): void;
8
- declare function test_createVariableAlreadyExists(): void;
9
- declare function test_createVariableNameAlreadyExists(): void;
10
- declare function test_createVariableNullAndUndefinedType(): void;
11
- declare function test_createVariableNullId(): void;
12
- declare function test_createVariableUndefinedId(): void;
13
- declare function test_createVariableIdAlreadyExists(): void;
14
- declare function test_createVariableMismatchedIdAndType(): void;
15
- declare function test_createVariableTwoSameTypes(): void;
16
- declare function test_getVariablesOfType_Trivial(): void;
17
- declare function test_getVariablesOfType_Null(): void;
18
- declare function test_getVariablesOfType_EmptyString(): void;
19
- declare function test_getVariablesOfType_Deleted(): void;
20
- declare function test_getVariablesOfType_DoesNotExist(): void;
21
- declare function test_getVariableTypes_Trivial(): void;
22
- declare function test_getVariableTypes_None(): void;
23
- declare function test_getAllVariables_Trivial(): void;
24
- declare function test_getAllVariables_None(): void;
25
- declare var variable_map: any;
26
- declare var mockControl_: any;
27
- declare var workspace: any;
28
- //# sourceMappingURL=variable_map_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"variable_map_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/variable_map_test.js"],"names":[],"mappings":"AAiCA,+CAIC;AAED,kDAIC;AAED,wDAmBC;AAED,mDAKC;AAED,sDAaC;AAED,uDAKC;AAED,oDAKC;AAED,0DAmBC;AAED,8DAmBC;AACD,iEAQC;AAED,mDASC;AAED,wDASC;AAED,4DAUC;AAED,gEAgBC;AAED,yDAQC;AAED,yDAWC;AAED,sDASC;AAED,6DAOC;AAED,yDAOC;AAED,8DAKC;AAED,uDAUC;AAED,oDAMC;AAED,sDAQC;AAED,mDAKC;AA9QD,8BAAgB;AAChB,8BAAgB;AAChB,2BAAa"}
@@ -1,14 +0,0 @@
1
- declare function variableModelTest_setUp(): void;
2
- declare function variableModelTest_tearDown(): void;
3
- /**
4
- * These tests check the constructor of the variable model.
5
- */
6
- declare function testInit_Trivial(): void;
7
- declare function testInit_NullType(): void;
8
- declare function testInit_UndefinedType(): void;
9
- declare function testInit_NullId(): void;
10
- declare function testInit_UndefinedId(): void;
11
- declare function testInit_OnlyNameProvided(): void;
12
- declare var variable: any;
13
- declare var workspace: any;
14
- //# sourceMappingURL=variable_model_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"variable_model_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/variable_model_test.js"],"names":[],"mappings":"AA6BA,iDAEC;AAED,oDAGC;AAED;;GAEG;AACH,0CAOC;AAED,2CAKC;AAED,gDAKC;AAED,yCAOC;AAED,8CAOC;AAED,mDAOC;AA/DD,0BAAY;AACZ,2BAAa"}
@@ -1,37 +0,0 @@
1
- declare function widgetdiv_testHelper_makeBBox(left: any, top: any, width: any, height: any): {
2
- left: any;
3
- right: any;
4
- top: any;
5
- bottom: any;
6
- };
7
- declare function widgetdiv_testHelper_makeSize(width: any, height: any): {
8
- width: any;
9
- height: any;
10
- };
11
- declare function widgetdiv_testHelper_makeAnchor(left: any, top: any): {
12
- left: any;
13
- right: any;
14
- top: any;
15
- bottom: any;
16
- };
17
- declare function test_widgetDiv_topConflict(): void;
18
- declare function test_widgetDiv_bottomConflict(): void;
19
- declare function test_widgetDiv_noYConflict(): void;
20
- declare function test_widgetDiv_leftConflict_LTR(): void;
21
- declare function test_widgetDiv_rightConflict_LTR(): void;
22
- declare function test_widgetDiv_noXConflict_LTR(): void;
23
- declare function test_widgetDiv_leftConflict_RTL(): void;
24
- declare function test_widgetDiv_rightConflict_RTL(): void;
25
- declare function test_widgetDiv_noXConflict_RTL(): void;
26
- declare namespace widgetDiv_test_viewport {
27
- export { left };
28
- export let right: any;
29
- export { top };
30
- export let bottom: any;
31
- }
32
- declare namespace widgetDiv_test_widgetSize {
33
- export { width };
34
- export { height };
35
- }
36
- declare var widgetDiv_test_anchorSize: number;
37
- //# sourceMappingURL=widget_div_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget_div_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/widget_div_test.js"],"names":[],"mappings":"AAuBA;;;;;EAOC;AAED;;;EAKC;AAQD;;;;;EAOC;AAED,oDAQC;AAED,uDAQC;AAED,oDAQC;AAED,yDAaC;AAED,0DAcC;AAED,wDAYC;AAED,yDAaC;AAED,0DAcC;AAED,wDAYC;;;;;;;;;;;AAjID,8CAAkC"}
@@ -1,13 +0,0 @@
1
- declare function workspaceCommentTest_setUp(): void;
2
- declare function workspaceCommentTest_tearDown(): void;
3
- declare function test_noWorkspaceComments(): void;
4
- declare function test_oneWorkspaceComment(): void;
5
- declare function test_getWorkspaceCommentById(): void;
6
- declare function test_disposeWsCommentTwice(): void;
7
- declare function test_wsCommentHeightWidth(): void;
8
- declare function test_wsCommentXY(): void;
9
- declare function test_wsCommentText(): void;
10
- declare function test_workspaceCommentMinimized(): void;
11
- declare function test_workspaceCommentMinimizedFromXml(): void;
12
- declare var workspace: any;
13
- //# sourceMappingURL=workspace_comment_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace_comment_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/workspace_comment_test.js"],"names":[],"mappings":"AAyBA,oDAEC;AAED,uDAEC;AAED,kDAWC;AAED,kDAcC;AAED,sDAWC;AAED,oDAUC;AAED,mDAkBC;AAED,0CAgBC;AAED,4CAuBC;AAED,wDAQC;AAED,+DAgBC;AAzJD,2BAAa"}
@@ -1,22 +0,0 @@
1
- declare function workspaceTest_setUp(): void;
2
- declare function workspaceTest_tearDown(): 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_getWorkspaceById(): void;
8
- declare function test_getBlockById(): void;
9
- declare function test_deleteVariable_InternalTrivial(): void;
10
- declare function test_addTopBlock_TrivialFlyoutIsTrue(): void;
11
- declare function test_clear_Trivial(): void;
12
- declare function test_clear_NoVariables(): void;
13
- declare function test_renameVariable_NoReference(): void;
14
- declare function test_renameVariable_ReferenceExists(): void;
15
- declare function test_renameVariable_TwoVariablesSameType(): void;
16
- declare function test_renameVariable_TwoVariablesDifferentType(): void;
17
- declare function test_renameVariable_OldCase(): void;
18
- declare function test_renameVariable_TwoVariablesAndOldCase(): void;
19
- declare function test_deleteVariableById_Trivial(): void;
20
- declare var workspace: any;
21
- declare var mockControl_: any;
22
- //# sourceMappingURL=workspace_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/workspace_test.js"],"names":[],"mappings":"AA2BA,6CAIC;AAED,gDAIC;AAED,6CAaC;;AAED,4CAsBC;;AAED,+CAcC;AAED,2CAgBC;AAED,6DAiBC;AAID,8DAsBC;AAED,4CAeC;AAED,gDAaC;AAED,yDAiBC;AAED,6DAeC;AAED,kEAoCC;AAED,uEAmBC;AAED,qDAYC;AAED,oEAgDC;AAED,yDAWC;AA/UD,2BAAa;AACb,8BAAgB"}
@@ -1,33 +0,0 @@
1
- declare function temporary_fireEvent(event: any): void;
2
- declare function temporary_fireEvent(event: any): void;
3
- declare function undoRedoTest_setUp(): void;
4
- declare function undoRedoTest_tearDown(): void;
5
- /**
6
- * Check that the top block with the given index contains a variable with
7
- * the given name.
8
- * @param {number} blockIndex The index of the top block.
9
- * @param {string} name The expected name of the variable in the block.
10
- */
11
- declare function undoRedoTest_checkBlockVariableName(blockIndex: number, name: string): void;
12
- declare function createTwoVarsEmptyType(): void;
13
- declare function createTwoVarsDifferentTypes(): void;
14
- declare function test_undoCreateVariable_Trivial(): void;
15
- declare function test_redoAndUndoCreateVariable_Trivial(): void;
16
- declare function test_undoDeleteVariable_NoBlocks(): void;
17
- declare function test_undoDeleteVariable_WithBlocks(): void;
18
- declare function test_redoAndUndoDeleteVariable_NoBlocks(): void;
19
- declare function test_redoAndUndoDeleteVariable_WithBlocks(): void;
20
- declare function test_redoAndUndoDeleteVariableTwice_NoBlocks(): void;
21
- declare function test_redoAndUndoDeleteVariableTwice_WithBlocks(): void;
22
- declare function test_undoRedoRenameVariable_OneExists_NoBlocks(): void;
23
- declare function test_undoRedoRenameVariable_OneExists_WithBlocks(): void;
24
- declare function test_undoRedoRenameVariable_BothExist_NoBlocks(): void;
25
- declare function test_undoRedoRenameVariable_BothExist_WithBlocks(): void;
26
- declare function test_undoRedoRenameVariable_BothExistCaseChange_NoBlocks(): void;
27
- declare function test_undoRedoRenameVariable_BothExistCaseChange_WithBlocks(): void;
28
- declare function test_undoRedoRenameVariable_OnlyCaseChange_NoBlocks(): void;
29
- declare function test_undoRedoRenameVariable_OnlyCaseChange_WithBlocks(): void;
30
- declare var workspace: any;
31
- declare var mockControl_: any;
32
- declare var savedFireFunc: any;
33
- //# sourceMappingURL=workspace_undo_redo_test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace_undo_redo_test.d.ts","sourceRoot":"","sources":["../../../../tests/jsunit/workspace_undo_redo_test.js"],"names":[],"mappings":";AAmCA,uDAMC;AAED,4CAKC;AAED,+CAKC;AAED;;;;;GAKG;AACH,iEAHW,MAAM,QACN,MAAM,QAKhB;AAED,gDAGC;AAED,qDAGC;AAED,yDAWC;AAED,gEAmBC;AAED,0DAcC;AAED,4DAmBC;AAED,iEAqBC;AAED,mEAuBC;AAED,sEAuBC;AAED,wEA6BC;AAED,wEAWC;AAED,0EAcC;AAED,wEAaC;AAED,0EAiBC;AAED,kFAaC;AAED,oFAmBC;AAED,6EAWC;AAED,+EAcC;AA5VD,2BAAa;AACb,8BAAgB;AAChB,+BAAuC"}
@@ -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"}