@khanacademy/perseus 22.5.0 → 22.5.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.
@@ -4,7 +4,7 @@ import type { InteractiveGraphState, InteractiveGraphProps } from "./types";
4
4
  import type { Widget } from "../../renderer";
5
5
  import "mafs/core.css";
6
6
  import "./mafs-styles.css";
7
- export type Props = {
7
+ export type StatefulMafsGraphProps = {
8
8
  box: [number, number];
9
9
  backgroundImage?: InteractiveGraphProps["backgroundImage"];
10
10
  graph: InteractiveGraphProps["graph"];
@@ -19,10 +19,18 @@ export type Props = {
19
19
  showTooltips: Required<InteractiveGraphProps["showTooltips"]>;
20
20
  labels: InteractiveGraphProps["labels"];
21
21
  };
22
- export declare const StatefulMafsGraph: React.ForwardRefExoticComponent<Props & React.RefAttributes<Partial<Widget>>>;
23
- type MafsGraphProps = Props & {
22
+ export declare const StatefulMafsGraph: React.ForwardRefExoticComponent<StatefulMafsGraphProps & React.RefAttributes<Partial<Widget>>>;
23
+ export type MafsGraphProps = {
24
+ box: [number, number];
25
+ backgroundImage?: InteractiveGraphProps["backgroundImage"];
26
+ lockedFigures?: InteractiveGraphProps["lockedFigures"];
27
+ step: InteractiveGraphProps["step"];
28
+ gridStep: InteractiveGraphProps["gridStep"];
29
+ containerSizeClass: InteractiveGraphProps["containerSizeClass"];
30
+ markings: InteractiveGraphProps["markings"];
31
+ showTooltips: Required<InteractiveGraphProps["showTooltips"]>;
32
+ labels: InteractiveGraphProps["labels"];
24
33
  state: InteractiveGraphState;
25
34
  dispatch: React.Dispatch<InteractiveGraphAction>;
26
35
  };
27
36
  export declare const MafsGraph: (props: MafsGraphProps) => JSX.Element;
28
- export {};
@@ -1,5 +1,4 @@
1
- import type { Props as MafsGraphProps } from "../mafs-graph";
2
- import type { vec } from "mafs";
1
+ import type { Interval, vec } from "mafs";
3
2
  export type InteractiveGraphAction = MoveControlPoint | MoveLine | MoveAll | MovePoint | MoveCenter | MoveRadiusPoint | ChangeSnapStep | ChangeRange;
4
3
  export declare const MOVE_CONTROL_POINT = "move-control-point";
5
4
  export interface MoveControlPoint {
@@ -47,13 +46,13 @@ export declare function moveRadiusPoint(destination: vec.Vector2): MoveRadiusPoi
47
46
  export declare const CHANGE_SNAP_STEP = "change-snap-step";
48
47
  export interface ChangeSnapStep {
49
48
  type: typeof CHANGE_SNAP_STEP;
50
- snapStep: MafsGraphProps["snapStep"];
49
+ snapStep: [x: number, y: number];
51
50
  }
52
- export declare function changeSnapStep(snapStep: MafsGraphProps["snapStep"]): ChangeSnapStep;
51
+ export declare function changeSnapStep(snapStep: [x: number, y: number]): ChangeSnapStep;
53
52
  export declare const CHANGE_RANGE = "change-range";
54
53
  export interface ChangeRange {
55
54
  type: typeof CHANGE_RANGE;
56
- range: MafsGraphProps["range"];
55
+ range: [x: Interval, y: Interval];
57
56
  }
58
- export declare function changeRange(range: MafsGraphProps["range"]): ChangeRange;
57
+ export declare function changeRange(range: [x: Interval, y: Interval]): ChangeRange;
59
58
  export {};
@@ -5,7 +5,6 @@ export type InitializeGraphStateParam = {
5
5
  step: InteractiveGraphProps["step"];
6
6
  snapStep: InteractiveGraphProps["snapStep"];
7
7
  graph: InteractiveGraphProps["graph"];
8
- markings: InteractiveGraphProps["markings"];
9
8
  };
10
9
  export declare function initializeGraphState(params: InitializeGraphStateParam): InteractiveGraphState;
11
10
  export declare function getGradableGraph(state: InteractiveGraphState, initialGraph: PerseusGraphType): PerseusGraphType;
@@ -18,7 +18,6 @@ export interface InteractiveGraphStateCommon {
18
18
  hasBeenInteractedWith: boolean;
19
19
  range: [xRange: Interval, yRange: Interval];
20
20
  snapStep: vec.Vector2;
21
- markings: InteractiveGraphProps["markings"];
22
21
  }
23
22
  export interface SegmentGraphState extends InteractiveGraphStateCommon {
24
23
  type: "segment";
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": "22.5.0",
6
+ "version": "22.5.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },