@khanacademy/perseus 25.1.1 → 26.0.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.
Files changed (54) hide show
  1. package/dist/components/fixed-to-responsive.d.ts +1 -1
  2. package/dist/components/hud.d.ts +2 -2
  3. package/dist/components/i18n-context.d.ts +1 -1
  4. package/dist/components/info-tip/info-tip.d.ts +1 -1
  5. package/dist/components/math-input.d.ts +1 -1
  6. package/dist/components/tooltip.d.ts +2 -2
  7. package/dist/es/index.css +2 -2
  8. package/dist/es/index.js +48 -12
  9. package/dist/es/index.js.map +1 -1
  10. package/dist/index.css +2 -2
  11. package/dist/index.js +48 -12
  12. package/dist/index.js.map +1 -1
  13. package/dist/util/react-render.d.ts +9 -1
  14. package/dist/widgets/deprecated-standin/index.d.ts +1 -1
  15. package/dist/widgets/expression.d.ts +4 -4
  16. package/dist/widgets/interactive-graph.d.ts +1 -1
  17. package/dist/widgets/interactive-graphs/backgrounds/axis-arrows.d.ts +2 -2
  18. package/dist/widgets/interactive-graphs/backgrounds/axis-labels.d.ts +2 -2
  19. package/dist/widgets/interactive-graphs/backgrounds/axis-tick-labels.d.ts +2 -2
  20. package/dist/widgets/interactive-graphs/backgrounds/axis-ticks.d.ts +2 -2
  21. package/dist/widgets/interactive-graphs/backgrounds/grid.d.ts +2 -2
  22. package/dist/widgets/interactive-graphs/backgrounds/legacy-grid.d.ts +2 -2
  23. package/dist/widgets/interactive-graphs/graph-locked-layer.d.ts +2 -2
  24. package/dist/widgets/interactive-graphs/graphs/angle.d.ts +2 -2
  25. package/dist/widgets/interactive-graphs/graphs/circle.d.ts +2 -2
  26. package/dist/widgets/interactive-graphs/graphs/components/angle-indicators.d.ts +3 -3
  27. package/dist/widgets/interactive-graphs/graphs/components/arrowhead.d.ts +2 -2
  28. package/dist/widgets/interactive-graphs/graphs/components/css-transform-wrapper.d.ts +1 -1
  29. package/dist/widgets/interactive-graphs/graphs/components/movable-line.d.ts +3 -3
  30. package/dist/widgets/interactive-graphs/graphs/components/movable-point.d.ts +2 -2
  31. package/dist/widgets/interactive-graphs/graphs/components/svg-line.d.ts +2 -1
  32. package/dist/widgets/interactive-graphs/graphs/components/text-label.d.ts +3 -2
  33. package/dist/widgets/interactive-graphs/graphs/components/vector.d.ts +1 -1
  34. package/dist/widgets/interactive-graphs/graphs/linear-system.d.ts +2 -2
  35. package/dist/widgets/interactive-graphs/graphs/linear.d.ts +2 -2
  36. package/dist/widgets/interactive-graphs/graphs/point.d.ts +2 -2
  37. package/dist/widgets/interactive-graphs/graphs/polygon.d.ts +2 -2
  38. package/dist/widgets/interactive-graphs/graphs/quadratic.d.ts +2 -2
  39. package/dist/widgets/interactive-graphs/graphs/ray.d.ts +2 -2
  40. package/dist/widgets/interactive-graphs/graphs/segment.d.ts +2 -2
  41. package/dist/widgets/interactive-graphs/graphs/sinusoid.d.ts +2 -2
  42. package/dist/widgets/interactive-graphs/locked-figures/locked-ellipse.d.ts +2 -2
  43. package/dist/widgets/interactive-graphs/locked-figures/locked-function.d.ts +2 -2
  44. package/dist/widgets/interactive-graphs/locked-figures/locked-line.d.ts +2 -2
  45. package/dist/widgets/interactive-graphs/locked-figures/locked-point.d.ts +2 -2
  46. package/dist/widgets/interactive-graphs/locked-figures/locked-polygon.d.ts +2 -2
  47. package/dist/widgets/interactive-graphs/locked-figures/locked-vector.d.ts +2 -2
  48. package/dist/widgets/interactive-graphs/mafs-graph.d.ts +1 -1
  49. package/dist/widgets/interactive-graphs/protractor.d.ts +2 -2
  50. package/dist/widgets/label-image/answer-choices.d.ts +2 -2
  51. package/dist/widgets/label-image/answer-pill.d.ts +2 -2
  52. package/dist/widgets/label-image/hide-answers-toggle.d.ts +1 -1
  53. package/dist/widgets/label-image/marker.d.ts +1 -1
  54. package/package.json +8 -8
@@ -1,2 +1,10 @@
1
1
  import * as React from "react";
2
- export default function render<ElementType extends React.ElementType>(element: React.ReactNode, container: HTMLElement, callback?: () => void): React.ElementRef<ElementType>;
2
+ /**
3
+ * Renders the given ReactNode inside the given container.
4
+ * @param element The JSX to render
5
+ * @param container The HTML elemetn to render into
6
+ *
7
+ * @deprecated this function is legacy and exists to support ancient code
8
+ * paths. Do not use in new code.
9
+ */
10
+ export default function render(element: React.ReactNode, container: HTMLElement): void;
@@ -13,7 +13,7 @@ declare class DeprecatedStandin extends React.Component<Props> {
13
13
  static validate(userInput: UserInput, rubric: Rubric): PerseusScore;
14
14
  getUserInput: () => UserInput;
15
15
  simpleValidate: (arg1: Rubric) => PerseusScore;
16
- render(): JSX.Element;
16
+ render(): React.JSX.Element;
17
17
  }
18
18
  declare const _default: Readonly<{
19
19
  name: string;
@@ -257,11 +257,11 @@ declare const _default: Readonly<{
257
257
  onFocus: (blurPath: import("../types").FocusPath) => void;
258
258
  times: boolean;
259
259
  value: string;
260
- }, "onChange" | "analytics" | "buttonsVisible" | "static" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "keypadElement" | "keypadConfiguration" | "alignment" | "reviewModeRubric" | "isLastUsedWidget"> & {
260
+ }, "analytics" | "onChange" | "buttonsVisible" | "static" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "keypadElement" | "keypadConfiguration" | "alignment" | "reviewModeRubric" | "isLastUsedWidget"> & {
261
261
  value?: string | undefined;
262
+ buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
262
263
  onFocus?: ((blurPath: import("../types").FocusPath) => void) | undefined;
263
264
  onBlur?: ((blurPath: import("../types").FocusPath) => void) | undefined;
264
- buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
265
265
  apiOptions?: Readonly<Readonly<{
266
266
  isArticle?: boolean | undefined;
267
267
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
@@ -497,11 +497,11 @@ declare const _default: Readonly<{
497
497
  onFocus: (blurPath: import("../types").FocusPath) => void;
498
498
  times: boolean;
499
499
  value: string;
500
- }, "onChange" | "analytics" | "buttonsVisible" | "static" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "keypadElement" | "keypadConfiguration" | "alignment" | "reviewModeRubric" | "isLastUsedWidget"> & {
500
+ }, "analytics" | "onChange" | "buttonsVisible" | "static" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "keypadElement" | "keypadConfiguration" | "alignment" | "reviewModeRubric" | "isLastUsedWidget"> & {
501
501
  value?: string | undefined;
502
+ buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
502
503
  onFocus?: ((blurPath: import("../types").FocusPath) => void) | undefined;
503
504
  onBlur?: ((blurPath: import("../types").FocusPath) => void) | undefined;
504
- buttonSets?: import("../perseus-types").LegacyButtonSets | undefined;
505
505
  apiOptions?: Readonly<Readonly<{
506
506
  isArticle?: boolean | undefined;
507
507
  onInputError?: ((widgetId: any, value: string, message?: string | null | undefined) => unknown) | undefined;
@@ -115,7 +115,7 @@ declare class InteractiveGraph extends React.Component<Props, State> {
115
115
  static defaultProps: DefaultProps;
116
116
  getUserInput: Widget["getUserInput"];
117
117
  simpleValidate(rubric: Rubric): PerseusScore;
118
- render(): JSX.Element;
118
+ render(): React.JSX.Element;
119
119
  static getQuadraticCoefficients(coords: ReadonlyArray<Coord>): QuadraticCoefficient;
120
120
  static getSinusoidCoefficients(coords: ReadonlyArray<Coord>): SineCoefficient;
121
121
  /**
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export default function AxisArrows(): JSX.Element;
1
+ import React from "react";
2
+ export default function AxisArrows(): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export default function AxisLabels(): JSX.Element;
1
+ import React from "react";
2
+ export default function AxisLabels(): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  type ShowTickLabelProps = {
3
3
  gridStep: number;
4
4
  tickStep: number;
@@ -7,7 +7,7 @@ type ShowTickLabelProps = {
7
7
  position: number;
8
8
  axisOutOfBounds: boolean;
9
9
  };
10
- export declare const AxisTickLabels: () => JSX.Element;
10
+ export declare const AxisTickLabels: () => React.JSX.Element;
11
11
  export declare const showTickLabel: ({ gridStep, tickStep, label, graphEdge, position, axisOutOfBounds, }: ShowTickLabelProps) => boolean;
12
12
  export declare function generateTickLocations(tickStep: number, min: number, max: number): number[];
13
13
  export {};
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  export declare function generateTickLocations(tickStep: number, min: number, max: number): number[];
3
- export declare const AxisTicks: () => JSX.Element;
3
+ export declare const AxisTicks: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { GraphRange } from "../../../perseus-types";
3
3
  import type { SizeClass } from "../../../util/sizing-utils";
4
4
  import type { vec } from "mafs";
@@ -18,5 +18,5 @@ interface GridProps {
18
18
  * @param {vec.Vector2} range the min/max range on the axis
19
19
  */
20
20
  export declare const lineLabelText: (n: number, tickStep: number, range: vec.Vector2) => string;
21
- export declare const Grid: (props: GridProps) => JSX.Element | null;
21
+ export declare const Grid: (props: GridProps) => React.JSX.Element | null;
22
22
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { PerseusImageBackground } from "../../../perseus-types";
3
3
  interface Props {
4
4
  box: [number, number];
@@ -8,5 +8,5 @@ interface Props {
8
8
  * If a graphie URL is provided in `backgroundImage`, will return the rendered graphie background.
9
9
  * Otherwise, returns `null`.
10
10
  */
11
- export declare const LegacyGrid: ({ box, backgroundImage }: Props) => JSX.Element | null;
11
+ export declare const LegacyGrid: ({ box, backgroundImage }: Props) => React.JSX.Element | null;
12
12
  export {};
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { LockedFigure } from "../../perseus-types";
3
3
  import type { Interval } from "mafs";
4
4
  type Props = {
5
5
  lockedFigures: ReadonlyArray<LockedFigure>;
6
6
  range: [x: Interval, y: Interval];
7
7
  };
8
- declare const GraphLockedLayer: (props: Props) => JSX.Element;
8
+ declare const GraphLockedLayer: (props: Props) => React.JSX.Element;
9
9
  export default GraphLockedLayer;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { AngleGraphState, MafsGraphProps } from "../types";
3
3
  type AngleGraphProps = MafsGraphProps<AngleGraphState>;
4
- export declare function AngleGraph(props: AngleGraphProps): JSX.Element;
4
+ export declare function AngleGraph(props: AngleGraphProps): React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { CircleGraphState, MafsGraphProps } from "../types";
3
3
  type CircleGraphProps = MafsGraphProps<CircleGraphState>;
4
- export declare function CircleGraph(props: CircleGraphProps): JSX.Element;
4
+ export declare function CircleGraph(props: CircleGraphProps): React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { vec } from "mafs";
2
+ import * as React from "react";
3
3
  import type { CollinearTuple } from "../../../../perseus-types";
4
4
  import type { Interval } from "mafs";
5
5
  interface PolygonAngleProps {
@@ -11,7 +11,7 @@ interface PolygonAngleProps {
11
11
  showAngles: boolean;
12
12
  snapTo: "grid" | "angles" | "sides";
13
13
  }
14
- export declare const PolygonAngle: ({ centerPoint, endPoints, range, polygonLines, showAngles, snapTo, }: PolygonAngleProps) => JSX.Element | null;
14
+ export declare const PolygonAngle: ({ centerPoint, endPoints, range, polygonLines, showAngles, snapTo, }: PolygonAngleProps) => React.JSX.Element | null;
15
15
  interface AngleProps {
16
16
  vertex: vec.Vector2;
17
17
  coords: [vec.Vector2, vec.Vector2];
@@ -21,7 +21,7 @@ interface AngleProps {
21
21
  snapDegrees: number;
22
22
  range: [Interval, Interval];
23
23
  }
24
- export declare const Angle: ({ vertex, coords, showAngles, allowReflexAngles, range, }: AngleProps) => JSX.Element;
24
+ export declare const Angle: ({ vertex, coords, showAngles, allowReflexAngles, range, }: AngleProps) => React.JSX.Element;
25
25
  /**
26
26
  * Determines if an angle is an inside (false) or outside (true) angle.
27
27
  * They way, we know to flip the `largeArc` and `sweepArc` flags.
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { type vec } from "mafs";
2
+ import * as React from "react";
3
3
  type Props = {
4
4
  tip: vec.Vector2;
5
5
  angle: number;
6
6
  color?: string;
7
7
  };
8
- export declare function Arrowhead(props: Props): JSX.Element;
8
+ export declare function Arrowhead(props: Props): React.JSX.Element;
9
9
  export {};
@@ -4,4 +4,4 @@ import * as React from "react";
4
4
  * Scales and translates the SVG element to match the Mafs view.
5
5
  * Use if you do not need/want to use the hook in `use-transform.ts`.
6
6
  */
7
- export declare const MafsCssTransformWrapper: ({ children, }: React.PropsWithChildren<unknown>) => JSX.Element;
7
+ export declare const MafsCssTransformWrapper: ({ children, }: React.PropsWithChildren<unknown>) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { vec } from "mafs";
2
+ import * as React from "react";
3
3
  import type { Interval } from "mafs";
4
4
  type Props = {
5
5
  points: Readonly<[vec.Vector2, vec.Vector2]>;
@@ -11,7 +11,7 @@ type Props = {
11
11
  end: boolean;
12
12
  };
13
13
  };
14
- export declare const MovableLine: (props: Props) => JSX.Element;
14
+ export declare const MovableLine: (props: Props) => React.JSX.Element;
15
15
  type LineProps = {
16
16
  start: vec.Vector2;
17
17
  end: vec.Vector2;
@@ -22,6 +22,6 @@ type LineProps = {
22
22
  end: boolean;
23
23
  };
24
24
  };
25
- export declare const Line: (props: LineProps) => JSX.Element;
25
+ export declare const Line: (props: LineProps) => React.JSX.Element;
26
26
  export declare function trimRange(range: [Interval, Interval], graphDimensionsInPixels: vec.Vector2): [Interval, Interval];
27
27
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { CSSCursor } from "./css-cursor";
3
3
  import type { vec } from "mafs";
4
4
  type Props = {
@@ -8,5 +8,5 @@ type Props = {
8
8
  cursor?: CSSCursor | undefined;
9
9
  snapTo?: "grid" | "angles" | "sides";
10
10
  };
11
- export declare const StyledMovablePoint: (props: Props) => JSX.Element;
11
+ export declare const StyledMovablePoint: (props: Props) => React.JSX.Element;
12
12
  export {};
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import type { vec } from "mafs";
2
3
  import type { SVGProps } from "react";
3
4
  export type Props = {
@@ -7,4 +8,4 @@ export type Props = {
7
8
  className?: string;
8
9
  testId?: string;
9
10
  };
10
- export declare function SVGLine(props: Props): JSX.Element;
11
+ export declare function SVGLine(props: Props): React.JSX.Element;
@@ -1,6 +1,7 @@
1
+ import React from "react";
1
2
  import type { TextProps } from "mafs";
2
3
  import type { PropsWithChildren } from "react";
3
4
  type Props = PropsWithChildren<Pick<TextProps, "x" | "y" | "attach" | "attachDistance" | "color">>;
4
- export declare const TextLabel: ({ children, ...rest }: Props) => JSX.Element;
5
- export declare const SvgDefs: () => JSX.Element;
5
+ export declare const TextLabel: ({ children, ...rest }: Props) => React.JSX.Element;
6
+ export declare const SvgDefs: () => React.JSX.Element;
6
7
  export {};
@@ -6,5 +6,5 @@ type Props = {
6
6
  color: string;
7
7
  style?: React.SVGProps<SVGLineElement>["style"];
8
8
  };
9
- export declare function Vector(props: Props): JSX.Element;
9
+ export declare function Vector(props: Props): React.JSX.Element;
10
10
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { MafsGraphProps, LinearSystemGraphState } from "../types";
3
3
  type LinearSystemGraphProps = MafsGraphProps<LinearSystemGraphState>;
4
- export declare const LinearSystemGraph: (props: LinearSystemGraphProps) => JSX.Element;
4
+ export declare const LinearSystemGraph: (props: LinearSystemGraphProps) => React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { MafsGraphProps, LinearGraphState } from "../types";
3
3
  type LinearGraphProps = MafsGraphProps<LinearGraphState>;
4
- export declare const LinearGraph: (props: LinearGraphProps, key: number) => JSX.Element;
4
+ export declare const LinearGraph: (props: LinearGraphProps, key: number) => React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { PointGraphState, MafsGraphProps } from "../types";
3
3
  type PointGraphProps = MafsGraphProps<PointGraphState>;
4
- export declare function PointGraph(props: PointGraphProps): JSX.Element;
4
+ export declare function PointGraph(props: PointGraphProps): React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { MafsGraphProps, PolygonGraphState } from "../types";
3
3
  type Props = MafsGraphProps<PolygonGraphState>;
4
- export declare const PolygonGraph: (props: Props) => JSX.Element;
4
+ export declare const PolygonGraph: (props: Props) => React.JSX.Element;
5
5
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { QuadraticGraphState, MafsGraphProps } from "../types";
3
3
  type QuadraticGraphProps = MafsGraphProps<QuadraticGraphState>;
4
4
  type QuadraticCoefficient = [number, number, number];
5
5
  export type QuadraticCoords = QuadraticGraphState["coords"];
6
- export declare function QuadraticGraph(props: QuadraticGraphProps): JSX.Element;
6
+ export declare function QuadraticGraph(props: QuadraticGraphProps): React.JSX.Element;
7
7
  export declare const getQuadraticCoefficients: (coords: [import("../../..").Coord, import("../../..").Coord, import("../../..").Coord]) => QuadraticCoefficient | undefined;
8
8
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { MafsGraphProps, RayGraphState } from "../types";
3
3
  type Props = MafsGraphProps<RayGraphState>;
4
- export declare const RayGraph: (props: Props) => JSX.Element;
4
+ export declare const RayGraph: (props: Props) => React.JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { MafsGraphProps, SegmentGraphState } from "../types";
3
3
  type SegmentProps = MafsGraphProps<SegmentGraphState>;
4
- export declare const SegmentGraph: (props: SegmentProps) => JSX.Element;
4
+ export declare const SegmentGraph: (props: SegmentProps) => React.JSX.Element;
5
5
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { Coord } from "../../../interactive2/types";
3
3
  import type { SinusoidGraphState, MafsGraphProps } from "../types";
4
4
  type SinusoidGraphProps = MafsGraphProps<SinusoidGraphState>;
@@ -8,7 +8,7 @@ export type SineCoefficient = {
8
8
  phase: number;
9
9
  verticalOffset: number;
10
10
  };
11
- export declare function SinusoidGraph(props: SinusoidGraphProps): JSX.Element;
11
+ export declare function SinusoidGraph(props: SinusoidGraphProps): React.JSX.Element;
12
12
  export declare const computeSine: (x: number, sinusoidCoefficients: SineCoefficient) => number;
13
13
  export declare const getSinusoidCoefficients: (coords: ReadonlyArray<Coord>) => SineCoefficient | undefined;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import { type LockedEllipseType } from "../../../perseus-types";
3
- declare const LockedEllipse: (props: LockedEllipseType) => JSX.Element;
3
+ declare const LockedEllipse: (props: LockedEllipseType) => React.JSX.Element;
4
4
  export default LockedEllipse;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { LockedFunctionType } from "../../../perseus-types";
3
- declare const LockedFunction: (props: LockedFunctionType) => JSX.Element;
3
+ declare const LockedFunction: (props: LockedFunctionType) => React.JSX.Element;
4
4
  export default LockedFunction;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { LockedLineType } from "../../../perseus-types";
3
3
  import type { Interval } from "mafs";
4
4
  type Props = LockedLineType & {
5
5
  range: [Interval, Interval];
6
6
  };
7
- declare const LockedLine: (props: Props) => JSX.Element;
7
+ declare const LockedLine: (props: Props) => React.JSX.Element;
8
8
  export default LockedLine;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import { type LockedPointType } from "../../../perseus-types";
3
- declare const LockedPoint: (props: LockedPointType) => JSX.Element;
3
+ declare const LockedPoint: (props: LockedPointType) => React.JSX.Element;
4
4
  export default LockedPoint;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { LockedPolygonType } from "../../../perseus-types";
3
- declare const LockedPolygon: (props: LockedPolygonType) => JSX.Element;
3
+ declare const LockedPolygon: (props: LockedPolygonType) => React.JSX.Element;
4
4
  export default LockedPolygon;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import type { LockedVectorType } from "../../../perseus-types";
3
- declare const LockedVector: (props: LockedVectorType) => JSX.Element;
3
+ declare const LockedVector: (props: LockedVectorType) => React.JSX.Element;
4
4
  export default LockedVector;
@@ -17,4 +17,4 @@ export type MafsGraphProps = {
17
17
  state: InteractiveGraphState;
18
18
  dispatch: React.Dispatch<InteractiveGraphAction>;
19
19
  };
20
- export declare const MafsGraph: (props: MafsGraphProps) => JSX.Element;
20
+ export declare const MafsGraph: (props: MafsGraphProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { vec } from "mafs";
2
+ import * as React from "react";
3
3
  import "./protractor.css";
4
4
  export declare const centerToRotationHandle: vec.Vector2;
5
- export declare function Protractor(): JSX.Element;
5
+ export declare function Protractor(): React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Enables single or multiple answers selection using WonderBlocks dropdowns.
3
3
  */
4
- /// <reference types="react" />
5
4
  import { SingleSelect } from "@khanacademy/wonder-blocks-dropdown";
5
+ import * as React from "react";
6
6
  export type AnswerType = {
7
7
  content: string;
8
8
  checked: boolean;
@@ -15,5 +15,5 @@ type AnswerChoicesProps = {
15
15
  onToggle: (opened: boolean) => unknown;
16
16
  disabled: boolean;
17
17
  };
18
- declare const AnswerChoices: (props: AnswerChoicesProps) => JSX.Element;
18
+ declare const AnswerChoices: (props: AnswerChoicesProps) => React.JSX.Element;
19
19
  export default AnswerChoices;
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../../../types/aphrodite.d.ts" />
2
- /// <reference types="react" />
3
2
  import { type CSSProperties } from "aphrodite";
3
+ import * as React from "react";
4
4
  export declare const AnswerPill: (props: {
5
5
  selectedAnswers: readonly string[];
6
6
  showCorrectness?: "correct" | "incorrect";
@@ -10,4 +10,4 @@ export declare const AnswerPill: (props: {
10
10
  hovered?: boolean;
11
11
  focused?: boolean;
12
12
  onClick?: () => void;
13
- }) => JSX.Element;
13
+ }) => React.JSX.Element;
@@ -3,4 +3,4 @@ import * as React from "react";
3
3
  export declare const HideAnswersToggle: (props: {
4
4
  areAnswersHidden: boolean;
5
5
  onChange: React.ComponentPropsWithoutRef<typeof Switch>["onChange"];
6
- }) => JSX.Element;
6
+ }) => React.JSX.Element;
@@ -31,7 +31,7 @@ export default class Marker extends React.Component<Props> {
31
31
  static defaultProps: {
32
32
  selected: ReadonlyArray<any>;
33
33
  };
34
- renderIcon(): JSX.Element;
34
+ renderIcon(): React.JSX.Element;
35
35
  render(): React.ReactNode;
36
36
  }
37
37
  export {};
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": "25.1.1",
6
+ "version": "26.0.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -41,11 +41,11 @@
41
41
  "dependencies": {
42
42
  "@khanacademy/kas": "^0.3.10",
43
43
  "@khanacademy/kmath": "^0.1.13",
44
- "@khanacademy/math-input": "^19.2.1",
44
+ "@khanacademy/math-input": "^20.0.0",
45
45
  "@khanacademy/perseus-core": "1.5.0",
46
46
  "@khanacademy/perseus-linter": "^1.0.0",
47
- "@khanacademy/pure-markdown": "^0.3.6",
48
- "@khanacademy/simple-markdown": "^0.12.1",
47
+ "@khanacademy/pure-markdown": "^0.3.7",
48
+ "@khanacademy/simple-markdown": "^0.13.0",
49
49
  "@use-gesture/react": "^10.2.27",
50
50
  "mafs": "0.18.7"
51
51
  },
@@ -79,8 +79,8 @@
79
79
  "lodash.debounce": "^4.0.8",
80
80
  "perseus-build-settings": "^0.4.1",
81
81
  "prop-types": "15.6.1",
82
- "react": "16.14.0",
83
- "react-dom": "16.14.0",
82
+ "react": ">= 18",
83
+ "react-dom": ">= 18",
84
84
  "react-popper": "^2.2.5",
85
85
  "underscore": "^1.4.4"
86
86
  },
@@ -112,8 +112,8 @@
112
112
  "jquery": "^2.1.1",
113
113
  "lodash.debounce": "^4.0.8",
114
114
  "prop-types": "15.6.1",
115
- "react": "16.14.0",
116
- "react-dom": "16.14.0",
115
+ "react": ">= 18",
116
+ "react-dom": ">= 18",
117
117
  "react-popper": "^2.2.5",
118
118
  "underscore": "^1.4.4"
119
119
  },