@khanacademy/perseus-editor 14.6.4 → 14.7.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 +70 -31
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +58 -12
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor/interactive-graph-editor.d.ts +6 -7
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-angle.d.ts +1 -0
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-settings.d.ts +1 -0
- package/dist/widgets/interactive-graph-editor/start-coords/util.d.ts +1 -1
- package/package.json +7 -7
|
@@ -498,7 +498,9 @@ declare const InteractiveGraph: {
|
|
|
498
498
|
removeLinearControls: () => void;
|
|
499
499
|
addQuadraticControls: () => void;
|
|
500
500
|
updateQuadratic: () => void;
|
|
501
|
-
removeQuadraticControls: () => void;
|
|
501
|
+
removeQuadraticControls: () => void; /**
|
|
502
|
+
* Whether to show the protractor on the graph.
|
|
503
|
+
*/
|
|
502
504
|
addSinusoidControls: () => void;
|
|
503
505
|
updateSinusoid: () => void;
|
|
504
506
|
removeSinusoidControls: () => void;
|
|
@@ -526,7 +528,6 @@ declare const InteractiveGraph: {
|
|
|
526
528
|
removeAngleControls: () => void;
|
|
527
529
|
toggleShowSides: () => void;
|
|
528
530
|
getUserInput(): PerseusGraphType;
|
|
529
|
-
simpleValidate(rubric: import("../../../../perseus/src/validation.types").PerseusInteractiveGraphRubric): import("@khanacademy/perseus").PerseusScore;
|
|
530
531
|
focus: () => void;
|
|
531
532
|
render(): React.ReactNode;
|
|
532
533
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -1081,7 +1082,6 @@ declare const InteractiveGraph: {
|
|
|
1081
1082
|
}>;
|
|
1082
1083
|
mafsRef: React.RefObject<import("../../../../perseus/src/widgets/interactive-graphs/stateful-mafs-graph").StatefulMafsGraphType>;
|
|
1083
1084
|
getUserInput(): PerseusGraphType;
|
|
1084
|
-
simpleValidate(rubric: import("../../../../perseus/src/validation.types").PerseusInteractiveGraphRubric): import("@khanacademy/perseus").PerseusScore;
|
|
1085
1085
|
render(): React.JSX.Element;
|
|
1086
1086
|
context: unknown;
|
|
1087
1087
|
setState<K_1 extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -2311,7 +2311,9 @@ declare const InteractiveGraph: {
|
|
|
2311
2311
|
removeLinearControls: () => void;
|
|
2312
2312
|
addQuadraticControls: () => void;
|
|
2313
2313
|
updateQuadratic: () => void;
|
|
2314
|
-
removeQuadraticControls: () => void;
|
|
2314
|
+
removeQuadraticControls: () => void; /**
|
|
2315
|
+
* Whether to show the protractor on the graph.
|
|
2316
|
+
*/
|
|
2315
2317
|
addSinusoidControls: () => void;
|
|
2316
2318
|
updateSinusoid: () => void;
|
|
2317
2319
|
removeSinusoidControls: () => void;
|
|
@@ -2339,7 +2341,6 @@ declare const InteractiveGraph: {
|
|
|
2339
2341
|
removeAngleControls: () => void;
|
|
2340
2342
|
toggleShowSides: () => void;
|
|
2341
2343
|
getUserInput(): PerseusGraphType;
|
|
2342
|
-
simpleValidate(rubric: import("../../../../perseus/src/validation.types").PerseusInteractiveGraphRubric): import("@khanacademy/perseus").PerseusScore;
|
|
2343
2344
|
focus: () => void;
|
|
2344
2345
|
render(): React.ReactNode;
|
|
2345
2346
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -2894,7 +2895,6 @@ declare const InteractiveGraph: {
|
|
|
2894
2895
|
}>;
|
|
2895
2896
|
mafsRef: React.RefObject<import("../../../../perseus/src/widgets/interactive-graphs/stateful-mafs-graph").StatefulMafsGraphType>;
|
|
2896
2897
|
getUserInput(): PerseusGraphType;
|
|
2897
|
-
simpleValidate(rubric: import("../../../../perseus/src/validation.types").PerseusInteractiveGraphRubric): import("@khanacademy/perseus").PerseusScore;
|
|
2898
2898
|
render(): React.JSX.Element;
|
|
2899
2899
|
context: unknown;
|
|
2900
2900
|
setState<K_1 extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
@@ -5621,7 +5621,6 @@ declare const InteractiveGraph: {
|
|
|
5621
5621
|
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
5622
5622
|
containerSizeClass: SizingUtils.SizeClass;
|
|
5623
5623
|
}): string;
|
|
5624
|
-
validate(userInput: PerseusGraphType, rubric: import("../../../../perseus/src/validation.types").PerseusInteractiveGraphRubric): import("@khanacademy/perseus").PerseusScore;
|
|
5625
5624
|
getUserInputFromProps(props: PerseusInteractiveGraphWidgetOptions & {
|
|
5626
5625
|
widgetId: string;
|
|
5627
5626
|
alignment: string | null | undefined;
|
|
@@ -3,6 +3,7 @@ import type { Coord } from "@khanacademy/perseus";
|
|
|
3
3
|
type AngleCoords = [Coord, Coord, Coord];
|
|
4
4
|
type Props = {
|
|
5
5
|
startCoords: AngleCoords;
|
|
6
|
+
allowReflexAngles?: boolean;
|
|
6
7
|
onChange: (startCoords: AngleCoords) => void;
|
|
7
8
|
};
|
|
8
9
|
declare const StartCoordsAngle: (props: Props) => React.JSX.Element;
|
|
@@ -4,6 +4,7 @@ import type { PerseusGraphType, Range } from "@khanacademy/perseus";
|
|
|
4
4
|
type Props = PerseusGraphType & {
|
|
5
5
|
range: [x: Range, y: Range];
|
|
6
6
|
step: [x: number, y: number];
|
|
7
|
+
allowReflexAngles?: boolean;
|
|
7
8
|
onChange: (startCoords: StartCoords) => void;
|
|
8
9
|
};
|
|
9
10
|
declare const StartCoordsSettings: (props: Props) => React.JSX.Element;
|
|
@@ -4,5 +4,5 @@ export declare function getStartCoords(graph: PerseusGraphType): StartCoords;
|
|
|
4
4
|
export declare function getDefaultGraphStartCoords(graph: PerseusGraphType, range: [x: Range, y: Range], step: [x: number, y: number]): StartCoords;
|
|
5
5
|
export declare const getSinusoidEquation: (startCoords: [Coord, Coord]) => string;
|
|
6
6
|
export declare const getQuadraticEquation: (startCoords: [Coord, Coord, Coord]) => string;
|
|
7
|
-
export declare const getAngleEquation: (startCoords: [Coord, Coord, Coord]) => string;
|
|
7
|
+
export declare const getAngleEquation: (startCoords: [Coord, Coord, Coord], allowReflexAngles?: boolean) => string;
|
|
8
8
|
export declare const shouldShowStartCoordsUI: (graph: PerseusGraphType, isStatic?: boolean) => boolean;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "14.
|
|
6
|
+
"version": "14.7.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@khanacademy/kas": "^0.3.
|
|
38
|
-
"@khanacademy/keypad-context": "^1.0.
|
|
39
|
-
"@khanacademy/kmath": "^0.1.
|
|
40
|
-
"@khanacademy/math-input": "^21.0
|
|
41
|
-
"@khanacademy/perseus": "^
|
|
42
|
-
"@khanacademy/perseus-core": "1.5.
|
|
37
|
+
"@khanacademy/kas": "^0.3.14",
|
|
38
|
+
"@khanacademy/keypad-context": "^1.0.3",
|
|
39
|
+
"@khanacademy/kmath": "^0.1.15",
|
|
40
|
+
"@khanacademy/math-input": "^21.1.0",
|
|
41
|
+
"@khanacademy/perseus": "^37.0.0",
|
|
42
|
+
"@khanacademy/perseus-core": "1.5.2",
|
|
43
43
|
"mafs": "^0.19.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|