@khanacademy/perseus 77.5.2 → 77.6.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 +5 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graphs/interactive-graph.d.ts +7 -1
- package/dist/widgets/interactive-graphs/mafs-graph.d.ts +1 -0
- package/dist/widgets/interactive-graphs/reducer/use-graph-config.d.ts +2 -1
- package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +1 -0
- package/package.json +7 -7
|
@@ -4,7 +4,7 @@ import type { StatefulMafsGraphType } from "./stateful-mafs-graph";
|
|
|
4
4
|
import type { WidgetProps } from "../../types";
|
|
5
5
|
import type { InteractiveGraphPromptJSON } from "../../widget-ai-utils/interactive-graph/interactive-graph-ai-utils";
|
|
6
6
|
import type { UnsupportedWidgetPromptJSON } from "../../widget-ai-utils/unsupported-widget";
|
|
7
|
-
import type { PerseusGraphType, PerseusInteractiveGraphWidgetOptions, GraphRange, InteractiveGraphPublicWidgetOptions, LockedFigure, PerseusImageBackground, MarkingsType, PerseusInteractiveGraphUserInput, AxisLabelLocation, ShowAxisArrows } from "@khanacademy/perseus-core";
|
|
7
|
+
import type { PerseusGraphType, PerseusInteractiveGraphWidgetOptions, GraphRange, InteractiveGraphPublicWidgetOptions, LockedFigure, PerseusImageBackground, MarkingsType, PerseusInteractiveGraphUserInput, AxisLabelLocation, ShowAxisArrows, ShowAxisTicks } from "@khanacademy/perseus-core";
|
|
8
8
|
type InteractiveGraphProps = {
|
|
9
9
|
/**
|
|
10
10
|
* Where the little black axis lines & labels (ticks) should render.
|
|
@@ -86,6 +86,10 @@ type InteractiveGraphProps = {
|
|
|
86
86
|
* Whether to show the arrows on the axis.
|
|
87
87
|
*/
|
|
88
88
|
showAxisArrows: ShowAxisArrows;
|
|
89
|
+
/**
|
|
90
|
+
* Whether to show tick marks and tick numbers per axis.
|
|
91
|
+
*/
|
|
92
|
+
showAxisTicks: ShowAxisTicks;
|
|
89
93
|
/**
|
|
90
94
|
* The type of graph
|
|
91
95
|
*/
|
|
@@ -114,6 +118,7 @@ type DefaultProps = {
|
|
|
114
118
|
labelLocation: Props["labelLocation"];
|
|
115
119
|
range: Props["range"];
|
|
116
120
|
showAxisArrows: Props["showAxisArrows"];
|
|
121
|
+
showAxisTicks: Props["showAxisTicks"];
|
|
117
122
|
step: Props["step"];
|
|
118
123
|
backgroundImage: Props["backgroundImage"];
|
|
119
124
|
markings: Props["markings"];
|
|
@@ -150,6 +155,7 @@ declare class InteractiveGraph extends React.Component<Props, State> {
|
|
|
150
155
|
rulerTicks?: number;
|
|
151
156
|
range: GraphRange;
|
|
152
157
|
showAxisArrows: ShowAxisArrows;
|
|
158
|
+
showAxisTicks: ShowAxisTicks;
|
|
153
159
|
correct?: PerseusGraphType;
|
|
154
160
|
lockedFigures: LockedFigure[];
|
|
155
161
|
fullGraphAriaLabel?: string;
|
|
@@ -16,6 +16,7 @@ export type MafsGraphProps = {
|
|
|
16
16
|
labels: ReadonlyArray<string>;
|
|
17
17
|
labelLocation?: InteractiveGraphProps["labelLocation"];
|
|
18
18
|
showAxisArrows: InteractiveGraphProps["showAxisArrows"];
|
|
19
|
+
showAxisTicks: InteractiveGraphProps["showAxisTicks"];
|
|
19
20
|
fullGraphAriaLabel?: InteractiveGraphProps["fullGraphAriaLabel"];
|
|
20
21
|
fullGraphAriaDescription?: InteractiveGraphProps["fullGraphAriaDescription"];
|
|
21
22
|
state: InteractiveGraphState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { AxisLabelLocation, ShowAxisArrows, MarkingsType } from "@khanacademy/perseus-core";
|
|
2
|
+
import type { AxisLabelLocation, ShowAxisArrows, ShowAxisTicks, MarkingsType } from "@khanacademy/perseus-core";
|
|
3
3
|
import type { Interval, vec } from "mafs";
|
|
4
4
|
export type GraphConfig = {
|
|
5
5
|
range: [Interval, Interval];
|
|
@@ -16,6 +16,7 @@ export type GraphConfig = {
|
|
|
16
16
|
disableKeyboardInteraction?: boolean;
|
|
17
17
|
interactiveColor?: string;
|
|
18
18
|
showAxisArrows: ShowAxisArrows;
|
|
19
|
+
showAxisTicks: ShowAxisTicks;
|
|
19
20
|
};
|
|
20
21
|
export declare const GraphConfigContext: React.Context<GraphConfig>;
|
|
21
22
|
export default function useGraphConfig(): GraphConfig;
|
|
@@ -26,6 +26,7 @@ export type StatefulMafsGraphProps = {
|
|
|
26
26
|
readOnly: boolean;
|
|
27
27
|
static: InteractiveGraphProps["static"];
|
|
28
28
|
showAxisArrows: InteractiveGraphProps["showAxisArrows"];
|
|
29
|
+
showAxisTicks: InteractiveGraphProps["showAxisTicks"];
|
|
29
30
|
widgetId: string;
|
|
30
31
|
graded?: boolean | null;
|
|
31
32
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core Perseus API (includes renderers and widgets)",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "77.
|
|
6
|
+
"version": "77.6.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"tiny-invariant": "1.3.1",
|
|
44
44
|
"uuid": "^10.0.0",
|
|
45
45
|
"@khanacademy/kas": "2.2.3",
|
|
46
|
-
"@khanacademy/keypad-context": "3.2.
|
|
47
|
-
"@khanacademy/kmath": "2.4.
|
|
48
|
-
"@khanacademy/math-input": "26.4.
|
|
49
|
-
"@khanacademy/perseus-core": "26.
|
|
50
|
-
"@khanacademy/perseus-linter": "5.0.
|
|
51
|
-
"@khanacademy/perseus-score": "8.9.
|
|
46
|
+
"@khanacademy/keypad-context": "3.2.51",
|
|
47
|
+
"@khanacademy/kmath": "2.4.9",
|
|
48
|
+
"@khanacademy/math-input": "26.4.23",
|
|
49
|
+
"@khanacademy/perseus-core": "26.2.0",
|
|
50
|
+
"@khanacademy/perseus-linter": "5.0.6",
|
|
51
|
+
"@khanacademy/perseus-score": "8.9.2",
|
|
52
52
|
"@khanacademy/perseus-utils": "2.1.5",
|
|
53
53
|
"@khanacademy/pure-markdown": "2.2.8",
|
|
54
54
|
"@khanacademy/simple-markdown": "2.2.3"
|