@khanacademy/perseus 41.0.0 → 41.1.1
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 +30 -43
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -41
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +48 -0
- package/dist/util/is-real-json-parse.d.ts +1 -0
- package/dist/validation.types.d.ts +2 -2
- package/package.json +1 -1
package/dist/perseus-types.d.ts
CHANGED
|
@@ -511,6 +511,54 @@ export type PerseusGraphTypeRay = {
|
|
|
511
511
|
coords?: CollinearTuple | null;
|
|
512
512
|
startCoords?: CollinearTuple;
|
|
513
513
|
} & PerseusGraphTypeCommon;
|
|
514
|
+
type AngleGraphCorrect = {
|
|
515
|
+
type: "angle";
|
|
516
|
+
allowReflexAngles: boolean;
|
|
517
|
+
match: "congruent";
|
|
518
|
+
coords: [Coord, Coord, Coord];
|
|
519
|
+
};
|
|
520
|
+
type CircleGraphCorrect = {
|
|
521
|
+
type: "circle";
|
|
522
|
+
center: Coord;
|
|
523
|
+
radius: number;
|
|
524
|
+
};
|
|
525
|
+
type LinearGraphCorrect = {
|
|
526
|
+
type: "linear";
|
|
527
|
+
coords: CollinearTuple;
|
|
528
|
+
};
|
|
529
|
+
type LinearSystemGraphCorrect = {
|
|
530
|
+
type: "linear-system";
|
|
531
|
+
coords: [CollinearTuple, CollinearTuple];
|
|
532
|
+
};
|
|
533
|
+
type NoneGraphCorrect = {
|
|
534
|
+
type: "none";
|
|
535
|
+
};
|
|
536
|
+
type PointGraphCorrect = {
|
|
537
|
+
type: "point";
|
|
538
|
+
coords: ReadonlyArray<Coord>;
|
|
539
|
+
};
|
|
540
|
+
type PolygonGraphCorrect = {
|
|
541
|
+
type: "polygon";
|
|
542
|
+
match: "similar" | "congruent" | "approx";
|
|
543
|
+
coords: ReadonlyArray<Coord>;
|
|
544
|
+
};
|
|
545
|
+
type QuadraticGraphCorrect = {
|
|
546
|
+
type: "quadratic";
|
|
547
|
+
coords: [Coord, Coord, Coord];
|
|
548
|
+
};
|
|
549
|
+
type SegmentGraphCorrect = {
|
|
550
|
+
type: "segment";
|
|
551
|
+
coords: CollinearTuple[];
|
|
552
|
+
};
|
|
553
|
+
type SinusoidGraphCorrect = {
|
|
554
|
+
type: "sinusoid";
|
|
555
|
+
coords: CollinearTuple;
|
|
556
|
+
};
|
|
557
|
+
type RayGraphCorrect = {
|
|
558
|
+
type: "ray";
|
|
559
|
+
coords: CollinearTuple;
|
|
560
|
+
};
|
|
561
|
+
export type PerseusGraphCorrectType = AngleGraphCorrect | CircleGraphCorrect | LinearGraphCorrect | LinearSystemGraphCorrect | NoneGraphCorrect | PointGraphCorrect | PolygonGraphCorrect | QuadraticGraphCorrect | RayGraphCorrect | SegmentGraphCorrect | SinusoidGraphCorrect;
|
|
514
562
|
export type PerseusLabelImageWidgetOptions = {
|
|
515
563
|
choices: ReadonlyArray<string>;
|
|
516
564
|
imageUrl: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isRealJSONParse(jsonParse: typeof JSON.parse): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GrapherAnswerTypes, PerseusDropdownChoice, PerseusExpressionAnswerForm, PerseusGradedGroupSetWidgetOptions, PerseusGradedGroupWidgetOptions, PerseusGraphType, PerseusGroupWidgetOptions, PerseusMatcherWidgetOptions, PerseusMatrixWidgetAnswers, PerseusNumberLineWidgetOptions, PerseusNumericInputAnswer, PerseusOrdererWidgetOptions, PerseusPlotterWidgetOptions, PerseusRadioChoice, PerseusTableWidgetOptions } from "./perseus-types";
|
|
1
|
+
import type { GrapherAnswerTypes, PerseusDropdownChoice, PerseusExpressionAnswerForm, PerseusGradedGroupSetWidgetOptions, PerseusGradedGroupWidgetOptions, PerseusGraphType, PerseusGroupWidgetOptions, PerseusMatcherWidgetOptions, PerseusMatrixWidgetAnswers, PerseusNumberLineWidgetOptions, PerseusNumericInputAnswer, PerseusOrdererWidgetOptions, PerseusPlotterWidgetOptions, PerseusRadioChoice, PerseusTableWidgetOptions, PerseusGraphCorrectType } from "./perseus-types";
|
|
2
2
|
import type { InteractiveMarkerType } from "./widgets/label-image/types";
|
|
3
3
|
import type { Relationship } from "./widgets/number-line/number-line";
|
|
4
4
|
export type UserInputStatus = "correct" | "incorrect" | "incomplete";
|
|
@@ -47,7 +47,7 @@ export type PerseusInputNumberUserInput = {
|
|
|
47
47
|
currentValue: string;
|
|
48
48
|
};
|
|
49
49
|
export type PerseusInteractiveGraphRubric = {
|
|
50
|
-
correct:
|
|
50
|
+
correct: PerseusGraphCorrectType;
|
|
51
51
|
graph: PerseusGraphType;
|
|
52
52
|
};
|
|
53
53
|
export type PerseusInteractiveGraphUserInput = PerseusGraphType;
|