import type interactiveGraph from "../../widgets/interactive-graphs/interactive-graph"; import type { UnsupportedWidgetPromptJSON } from "../unsupported-widget"; import type { PerseusGraphType } from "@khanacademy/perseus-core"; import type React from "react"; type Coord = [x: number, y: number]; type CollinearTuple = readonly [Coord, Coord]; type AngleGraphOptions = { type: "angle"; angleOffsetDegrees: number | undefined; startCoords?: readonly [Coord, Coord, Coord]; }; type CircleGraphOptions = { type: "circle"; startParams: { center?: Coord; radius?: number; }; }; type LinearGraphOptions = { type: "linear"; startCoords?: CollinearTuple; }; type LinearSystemGraphOptions = { type: "linear-system"; startCoords?: readonly CollinearTuple[]; }; type PointGraphOptions = { type: "point"; numPoints?: number | "unlimited"; startCoords?: readonly Coord[]; }; type PolygonGraphOptions = { type: "polygon"; match?: string; numSides?: number | "unlimited"; startCoords?: readonly Coord[]; }; type QuadraticGraphOptions = { type: "quadratic"; startCoords?: readonly [Coord, Coord, Coord]; }; type RayGraphOptions = { type: "ray"; startCoords?: CollinearTuple; }; type SegmentGraphOptions = { type: "segment"; numSegments?: number; startCoords?: CollinearTuple[]; }; type SinusoidGraphOptions = { type: "sinusoid"; startCoords?: readonly Coord[]; }; type AbsoluteValueGraphOptions = { type: "absolute-value"; startCoords?: readonly [Coord, Coord]; }; type TangentGraphOptions = { type: "tangent"; startCoords?: readonly Coord[]; }; type ExponentialGraphOptions = { type: "exponential"; startCoords?: { coords: readonly [Coord, Coord]; asymptote: number; }; }; type LogarithmGraphOptions = { type: "logarithm"; startCoords?: { coords: readonly [Coord, Coord]; asymptote: number; }; }; type NoneGraphOptions = Record; type GraphOptions = AbsoluteValueGraphOptions | AngleGraphOptions | CircleGraphOptions | ExponentialGraphOptions | LinearGraphOptions | LinearSystemGraphOptions | NoneGraphOptions | PointGraphOptions | PolygonGraphOptions | QuadraticGraphOptions | RayGraphOptions | SegmentGraphOptions | SinusoidGraphOptions | TangentGraphOptions | LogarithmGraphOptions; type AngleUserInput = { coords?: readonly [Coord, Coord, Coord]; angleOffsetDegrees?: number; }; type CircleUserInput = { center?: Coord; radius?: number; }; type LinearUserInput = { coords?: CollinearTuple; }; type LinearSystemInput = { coords?: readonly CollinearTuple[] | null; }; type PointUserInput = { coords?: readonly Coord[] | null; }; type PolygonUserInput = { coords?: readonly Coord[] | null; }; type QuadraticUserInput = { coords?: readonly [Coord, Coord, Coord] | null; }; type RayUserInput = { coords?: CollinearTuple | null; }; type SegmentUserInput = { coords?: readonly CollinearTuple[] | null; }; type SinusoidUserInput = { coords?: readonly Coord[] | null; }; type AbsoluteValueUserInput = { coords?: readonly [Coord, Coord] | null; }; type ExponentialUserInput = { coords?: readonly Coord[] | null; asymptote?: number | null; }; type LogarithmUserInput = { coords?: readonly Coord[] | null; asymptote?: number | null; }; type TangentUserInput = { coords?: readonly Coord[] | null; }; type UserInput = AbsoluteValueUserInput | AngleUserInput | CircleUserInput | ExponentialUserInput | LinearUserInput | LinearSystemInput | PointUserInput | PolygonUserInput | QuadraticUserInput | RayUserInput | SegmentUserInput | SinusoidUserInput | TangentUserInput | LogarithmUserInput; /** * JSON describing an interactive graph widget. Intended for consumption by AI tools. * An interactive graph plots equations and draws geometric figures on a * Cartesian plane. The user can move and reshape these elements by dragging * control points. */ export type InteractiveGraphPromptJSON = { type: "interactive-graph"; /** * The configuration of the widget, set by the content creator. */ options: { /** * Configuration of the plotted equation or geometric figure. */ graph: GraphOptions; /** * The bounds of the graph. Format: `[[xMin, xMax], [yMin, yMax]]` */ range: [x: [min: number, max: number], y: [min: number, max: number]]; /** * Labels on the graph axes. Format: `[xLabel, yLabel]`. */ labels: string[]; backgroundImageUrl: string | null | undefined; }; userInput: UserInput; }; export declare const getPromptJSON: (props: React.ComponentProps, userInput: PerseusGraphType) => InteractiveGraphPromptJSON | UnsupportedWidgetPromptJSON; export {};