@khanacademy/perseus-score 7.4.0 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +29 -29
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +29 -29
- package/dist/index.js.map +1 -1
- package/dist/widgets/categorizer/score-categorizer.d.ts +1 -1
- package/dist/widgets/categorizer/validate-categorizer.d.ts +1 -1
- package/dist/widgets/cs-program/score-cs-program.d.ts +1 -1
- package/dist/widgets/dropdown/score-dropdown.d.ts +1 -1
- package/dist/widgets/dropdown/validate-dropdown.d.ts +1 -1
- package/dist/widgets/expression/score-expression.d.ts +1 -1
- package/dist/widgets/expression/validate-expression.d.ts +1 -1
- package/dist/widgets/free-response/score-free-response.d.ts +1 -1
- package/dist/widgets/free-response/validate-free-response.d.ts +1 -1
- package/dist/widgets/grapher/score-grapher.d.ts +1 -1
- package/dist/widgets/group/score-group.d.ts +1 -1
- package/dist/widgets/group/validate-group.d.ts +1 -1
- package/dist/widgets/iframe/score-iframe.d.ts +1 -1
- package/dist/widgets/input-number/score-input-number.d.ts +1 -1
- package/dist/widgets/interactive-graph/score-interactive-graph.d.ts +1 -1
- package/dist/widgets/label-image/score-label-image.d.ts +1 -1
- package/dist/widgets/label-image/validate-label-image.d.ts +1 -1
- package/dist/widgets/matcher/score-matcher.d.ts +1 -1
- package/dist/widgets/matrix/score-matrix.d.ts +1 -1
- package/dist/widgets/matrix/validate-matrix.d.ts +1 -1
- package/dist/widgets/mock-widget/score-mock-widget.d.ts +1 -1
- package/dist/widgets/mock-widget/validate-mock-widget.d.ts +1 -1
- package/dist/widgets/number-line/score-number-line.d.ts +1 -1
- package/dist/widgets/numeric-input/score-numeric-input.d.ts +1 -1
- package/dist/widgets/orderer/score-orderer.d.ts +1 -1
- package/dist/widgets/orderer/validate-orderer.d.ts +1 -1
- package/dist/widgets/plotter/score-plotter.d.ts +1 -1
- package/dist/widgets/plotter/validate-plotter.d.ts +1 -1
- package/dist/widgets/radio/score-radio.d.ts +1 -1
- package/dist/widgets/radio/validate-radio.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusCategorizerRubric, PerseusCategorizerUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreCategorizer(userInput: PerseusCategorizerUserInput, rubric: PerseusCategorizerRubric): PerseusScore;
|
|
2
|
+
declare function scoreCategorizer(userInput: PerseusCategorizerUserInput | undefined, rubric: PerseusCategorizerRubric): PerseusScore;
|
|
3
3
|
export default scoreCategorizer;
|
|
@@ -7,5 +7,5 @@ import type { PerseusCategorizerUserInput, PerseusCategorizerValidationData, Val
|
|
|
7
7
|
* @param validationData - An array of strings corresponding to each row/item
|
|
8
8
|
* @param strings - Used to provide a validation message
|
|
9
9
|
*/
|
|
10
|
-
declare function validateCategorizer(userInput: PerseusCategorizerUserInput, validationData: PerseusCategorizerValidationData): ValidationResult;
|
|
10
|
+
declare function validateCategorizer(userInput: PerseusCategorizerUserInput | undefined, validationData: PerseusCategorizerValidationData): ValidationResult;
|
|
11
11
|
export default validateCategorizer;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusCSProgramUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreCSProgram(userInput: PerseusCSProgramUserInput): PerseusScore;
|
|
2
|
+
declare function scoreCSProgram(userInput: PerseusCSProgramUserInput | undefined): PerseusScore;
|
|
3
3
|
export default scoreCSProgram;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusDropdownRubric, PerseusDropdownUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreDropdown(userInput: PerseusDropdownUserInput, rubric: PerseusDropdownRubric): PerseusScore;
|
|
2
|
+
declare function scoreDropdown(userInput: PerseusDropdownUserInput | undefined, rubric: PerseusDropdownRubric): PerseusScore;
|
|
3
3
|
export default scoreDropdown;
|
|
@@ -3,5 +3,5 @@ import type { PerseusDropdownUserInput, ValidationResult } from "@khanacademy/pe
|
|
|
3
3
|
* Checks if the user has selected an item from the dropdown before scoring.
|
|
4
4
|
* This is shown with a userInput value / index other than 0.
|
|
5
5
|
*/
|
|
6
|
-
declare function validateDropdown(userInput: PerseusDropdownUserInput): ValidationResult;
|
|
6
|
+
declare function validateDropdown(userInput: PerseusDropdownUserInput | undefined): ValidationResult;
|
|
7
7
|
export default validateDropdown;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusExpressionRubric, PerseusExpressionUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreExpression(userInput: PerseusExpressionUserInput, rubric: PerseusExpressionRubric, locale: string): PerseusScore;
|
|
2
|
+
declare function scoreExpression(userInput: PerseusExpressionUserInput | undefined, rubric: PerseusExpressionRubric, locale: string): PerseusScore;
|
|
3
3
|
export default scoreExpression;
|
|
@@ -7,5 +7,5 @@ import type { PerseusExpressionUserInput, ValidationResult } from "@khanacademy/
|
|
|
7
7
|
*
|
|
8
8
|
* @see `scoreExpression()` for more details.
|
|
9
9
|
*/
|
|
10
|
-
declare function validateExpression(userInput: PerseusExpressionUserInput): ValidationResult;
|
|
10
|
+
declare function validateExpression(userInput: PerseusExpressionUserInput | undefined): ValidationResult;
|
|
11
11
|
export default validateExpression;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusFreeResponseUserInput, PerseusFreeResponseRubric, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreFreeResponse(userInput: PerseusFreeResponseUserInput, rubric: PerseusFreeResponseRubric, locale: string): PerseusScore;
|
|
2
|
+
declare function scoreFreeResponse(userInput: PerseusFreeResponseUserInput | undefined, rubric: PerseusFreeResponseRubric, locale: string): PerseusScore;
|
|
3
3
|
export default scoreFreeResponse;
|
|
@@ -3,5 +3,5 @@ import type { PerseusFreeResponseUserInput, PerseusFreeResponseWidgetOptions, Va
|
|
|
3
3
|
* Checks user input from the free response widget to see if it is scorable.
|
|
4
4
|
* Since the input is free text, we only check that it is not empty.
|
|
5
5
|
*/
|
|
6
|
-
declare function validateFreeResponse(userInput: PerseusFreeResponseUserInput, widgetOptions: PerseusFreeResponseWidgetOptions): ValidationResult;
|
|
6
|
+
declare function validateFreeResponse(userInput: PerseusFreeResponseUserInput | undefined, widgetOptions: PerseusFreeResponseWidgetOptions): ValidationResult;
|
|
7
7
|
export default validateFreeResponse;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusGrapherRubric, PerseusGrapherUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreGrapher(userInput: PerseusGrapherUserInput, rubric: PerseusGrapherRubric): PerseusScore;
|
|
2
|
+
declare function scoreGrapher(userInput: PerseusGrapherUserInput | undefined, rubric: PerseusGrapherRubric): PerseusScore;
|
|
3
3
|
export default scoreGrapher;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusGroupRubric, PerseusGroupUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreGroup(userInput: PerseusGroupUserInput, rubric: PerseusGroupRubric, locale: string): PerseusScore;
|
|
2
|
+
declare function scoreGroup(userInput: PerseusGroupUserInput | undefined, rubric: PerseusGroupRubric, locale: string): PerseusScore;
|
|
3
3
|
export default scoreGroup;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusGroupUserInput, PerseusGroupValidationData, ValidationResult } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function validateGroup(userInput: PerseusGroupUserInput, validationData: PerseusGroupValidationData, locale: string): ValidationResult;
|
|
2
|
+
declare function validateGroup(userInput: PerseusGroupUserInput | undefined, validationData: PerseusGroupValidationData, locale: string): ValidationResult;
|
|
3
3
|
export default validateGroup;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusIFrameUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreIframe(userInput: PerseusIFrameUserInput): PerseusScore;
|
|
2
|
+
declare function scoreIframe(userInput: PerseusIFrameUserInput | undefined): PerseusScore;
|
|
3
3
|
export default scoreIframe;
|
|
@@ -33,5 +33,5 @@ export declare const inputNumberAnswerTypes: {
|
|
|
33
33
|
readonly forms: "pi";
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
declare function scoreInputNumber(userInput: PerseusInputNumberUserInput, rubric: PerseusInputNumberRubric, locale?: string): PerseusScore;
|
|
36
|
+
declare function scoreInputNumber(userInput: PerseusInputNumberUserInput | undefined, rubric: PerseusInputNumberRubric, locale?: string): PerseusScore;
|
|
37
37
|
export default scoreInputNumber;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusInteractiveGraphUserInput, PerseusInteractiveGraphRubric, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreInteractiveGraph(userInput: PerseusInteractiveGraphUserInput, rubric: PerseusInteractiveGraphRubric): PerseusScore;
|
|
2
|
+
declare function scoreInteractiveGraph(userInput: PerseusInteractiveGraphUserInput | undefined, rubric: PerseusInteractiveGraphRubric): PerseusScore;
|
|
3
3
|
export default scoreInteractiveGraph;
|
|
@@ -4,5 +4,5 @@ export type InteractiveMarkerScore = {
|
|
|
4
4
|
isCorrect: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare function scoreLabelImageMarker(userInput: PerseusLabelImageUserInput["markers"][number]["selected"], rubric: PerseusLabelImageRubric["markers"][number]["answers"]): InteractiveMarkerScore;
|
|
7
|
-
declare function scoreLabelImage(userInput: PerseusLabelImageUserInput, rubric: PerseusLabelImageRubric): PerseusScore;
|
|
7
|
+
declare function scoreLabelImage(userInput: PerseusLabelImageUserInput | undefined, rubric: PerseusLabelImageRubric): PerseusScore;
|
|
8
8
|
export default scoreLabelImage;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusLabelImageUserInput, ValidationResult } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function validateLabelImage(userInput: PerseusLabelImageUserInput): ValidationResult;
|
|
2
|
+
declare function validateLabelImage(userInput: PerseusLabelImageUserInput | undefined): ValidationResult;
|
|
3
3
|
export default validateLabelImage;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusMatcherRubric, PerseusMatcherUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreMatcher(userInput: PerseusMatcherUserInput, rubric: PerseusMatcherRubric): PerseusScore;
|
|
2
|
+
declare function scoreMatcher(userInput: PerseusMatcherUserInput | undefined, rubric: PerseusMatcherRubric): PerseusScore;
|
|
3
3
|
export default scoreMatcher;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusMatrixRubric, PerseusMatrixUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreMatrix(userInput: PerseusMatrixUserInput, rubric: PerseusMatrixRubric): PerseusScore;
|
|
2
|
+
declare function scoreMatrix(userInput: PerseusMatrixUserInput | undefined, rubric: PerseusMatrixRubric): PerseusScore;
|
|
3
3
|
export default scoreMatrix;
|
|
@@ -7,5 +7,5 @@ import type { PerseusMatrixUserInput, ValidationResult } from "@khanacademy/pers
|
|
|
7
7
|
*
|
|
8
8
|
* @see `scoreMatrix()` for more details.
|
|
9
9
|
*/
|
|
10
|
-
declare function validateMatrix(userInput: PerseusMatrixUserInput): ValidationResult;
|
|
10
|
+
declare function validateMatrix(userInput: PerseusMatrixUserInput | undefined): ValidationResult;
|
|
11
11
|
export default validateMatrix;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PerseusMockWidgetRubric, PerseusMockWidgetUserInput } from "./mock-widget-validation.types";
|
|
2
2
|
import type { PerseusScore } from "@khanacademy/perseus-core";
|
|
3
|
-
declare function scoreMockWidget(userInput: PerseusMockWidgetUserInput, rubric: PerseusMockWidgetRubric): PerseusScore;
|
|
3
|
+
declare function scoreMockWidget(userInput: PerseusMockWidgetUserInput | undefined, rubric: PerseusMockWidgetRubric): PerseusScore;
|
|
4
4
|
export default scoreMockWidget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PerseusMockWidgetUserInput } from "./mock-widget-validation.types";
|
|
2
2
|
import type { ValidationResult } from "@khanacademy/perseus-core";
|
|
3
|
-
declare function validateMockWidget(userInput: PerseusMockWidgetUserInput): ValidationResult;
|
|
3
|
+
declare function validateMockWidget(userInput: PerseusMockWidgetUserInput | undefined): ValidationResult;
|
|
4
4
|
export default validateMockWidget;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusNumberLineRubric, PerseusNumberLineUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreNumberLine(userInput: PerseusNumberLineUserInput, rubric: PerseusNumberLineRubric): PerseusScore;
|
|
2
|
+
declare function scoreNumberLine(userInput: PerseusNumberLineUserInput | undefined, rubric: PerseusNumberLineRubric): PerseusScore;
|
|
3
3
|
export default scoreNumberLine;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PerseusNumericInputRubric, PerseusNumericInputUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
2
|
export declare function maybeParsePercentInput(inputValue: string | number, normalizedAnswerExpected: boolean): string | number;
|
|
3
|
-
declare function scoreNumericInput(userInput: PerseusNumericInputUserInput, rubric: PerseusNumericInputRubric, locale?: string): PerseusScore;
|
|
3
|
+
declare function scoreNumericInput(userInput: PerseusNumericInputUserInput | undefined, rubric: PerseusNumericInputRubric, locale?: string): PerseusScore;
|
|
4
4
|
export default scoreNumericInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusOrdererRubric, PerseusOrdererUserInput, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreOrderer(userInput: PerseusOrdererUserInput, rubric: PerseusOrdererRubric): PerseusScore;
|
|
2
|
+
declare function scoreOrderer(userInput: PerseusOrdererUserInput | undefined, rubric: PerseusOrdererRubric): PerseusScore;
|
|
3
3
|
export default scoreOrderer;
|
|
@@ -5,5 +5,5 @@ import type { PerseusOrdererUserInput, ValidationResult } from "@khanacademy/per
|
|
|
5
5
|
* @param userInput
|
|
6
6
|
* @see `scoreOrderer` for more details.
|
|
7
7
|
*/
|
|
8
|
-
declare function validateOrderer(userInput: PerseusOrdererUserInput): ValidationResult;
|
|
8
|
+
declare function validateOrderer(userInput: PerseusOrdererUserInput | undefined): ValidationResult;
|
|
9
9
|
export default validateOrderer;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusPlotterUserInput, PerseusPlotterRubric, PerseusScore } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scorePlotter(userInput: PerseusPlotterUserInput, rubric: PerseusPlotterRubric): PerseusScore;
|
|
2
|
+
declare function scorePlotter(userInput: PerseusPlotterUserInput | undefined, rubric: PerseusPlotterRubric): PerseusScore;
|
|
3
3
|
export default scorePlotter;
|
|
@@ -5,5 +5,5 @@ import type { PerseusPlotterUserInput, PerseusPlotterValidationData, ValidationR
|
|
|
5
5
|
*
|
|
6
6
|
* @see 'scorePlotter' for more details on scoring.
|
|
7
7
|
*/
|
|
8
|
-
declare function validatePlotter(userInput: PerseusPlotterUserInput, validationData: PerseusPlotterValidationData): ValidationResult;
|
|
8
|
+
declare function validatePlotter(userInput: PerseusPlotterUserInput | undefined, validationData: PerseusPlotterValidationData): ValidationResult;
|
|
9
9
|
export default validatePlotter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PerseusRadioRubric, PerseusRadioUserInput, PerseusScore, RecursiveReadonly } from "@khanacademy/perseus-core";
|
|
2
|
-
declare function scoreRadio(userInput: RecursiveReadonly<PerseusRadioUserInput
|
|
2
|
+
declare function scoreRadio(userInput: RecursiveReadonly<PerseusRadioUserInput> | undefined, rubric: RecursiveReadonly<PerseusRadioRubric>): PerseusScore;
|
|
3
3
|
export default scoreRadio;
|
|
@@ -7,5 +7,5 @@ import type { PerseusRadioUserInput, ValidationResult } from "@khanacademy/perse
|
|
|
7
7
|
* @param userInput
|
|
8
8
|
* @see `scoreRadio` for the additional validation logic and the scoring logic.
|
|
9
9
|
*/
|
|
10
|
-
declare function validateRadio(userInput: PerseusRadioUserInput): ValidationResult;
|
|
10
|
+
declare function validateRadio(userInput: PerseusRadioUserInput | undefined): ValidationResult;
|
|
11
11
|
export default validateRadio;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus score",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "7.
|
|
6
|
+
"version": "7.5.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@khanacademy/kas": "2.1.0",
|
|
26
|
-
"@khanacademy/kmath": "2.1.
|
|
27
|
-
"@khanacademy/perseus-core": "18.
|
|
26
|
+
"@khanacademy/kmath": "2.1.2",
|
|
27
|
+
"@khanacademy/perseus-core": "18.5.0",
|
|
28
28
|
"@khanacademy/perseus-utils": "2.1.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|