import type { MafsGraphProps } from "./mafs-graph";
import type { InteractiveGraphState, UnlimitedGraphState } from "./types";
import type { Coord } from "../../interactive2/types";
import type { PerseusInteractiveGraphWidgetOptions } from "@khanacademy/perseus-core";
import type { Interval, vec } from "mafs";
/**
* 44 is touch best practice and AAA compliant for WCAG
* https://www.w3.org/WAI/WCAG21/Understanding/target-size.html
*/
export declare const TARGET_SIZE = 44;
export declare const REMOVE_BUTTON_ID = "perseus_mafs_remove_button";
export declare const normalizePoints: (range: PerseusInteractiveGraphWidgetOptions["range"], step: PerseusInteractiveGraphWidgetOptions["step"], coordsList: A, noSnap?: boolean) => A;
export declare const normalizeCoords: (coordsList: A, ranges: PerseusInteractiveGraphWidgetOptions["range"]) => A;
export declare function bound({ snapStep, range, point, }: {
snapStep: vec.Vector2;
range: [Interval, Interval];
point: vec.Vector2;
}): vec.Vector2;
export declare function boundToEdge({ range, point, }: {
range: [Interval, Interval];
point: vec.Vector2;
}): vec.Vector2;
export declare function isUnlimitedGraphState(state: InteractiveGraphState): state is UnlimitedGraphState;
/**
* Parse a string of text and math into a list of objects with type and content
*
* Example: "Pi is about $\frac{22}{7}$" ==>
* [
* {type: "text", content: "Pi is about "},
* {type: "math", content: "\\frac{22}{7}"},
* ]
*/
export declare const mathOnlyParser: import("@khanacademy/simple-markdown").Parser;
/**
* Replace all text outside of the $ TeX blocks with `\\text{...}`
* This way, the entire resulting string can be rendered within
* and the text outside of the $ blocks will be non-TeX text.
*/
export declare function replaceOutsideTeX(mathString: string): string;
export declare function getBaseMafsGraphPropsForTests(): MafsGraphProps;
export declare const calculateNestedSVGCoords: (range: vec.Vector2[], width: number, height: number) => {
viewboxX: number;
viewboxY: number;
};
/**
* Gets the effective CSS zoom factor applied to an element or any of its ancestors.
* This is used to compensate for the mobile font scaling zoom applied to the body
* or exercise content via the fontScale query parameter.
*
* On mobile, the parent application may apply CSS zoom to accommodate device font
* size settings. This zoom affects coordinate calculations for click/touch events,
* as both clientX/clientY and getBoundingClientRect() return zoomed values, but
* the SVG coordinate system expects unzoomed pixel values.
*
* Note: We calculate the cumulative zoom by traversing the DOM tree rather than
* targeting specific elements to avoid coupling Perseus to parent application
* implementation details (e.g., specific class names or DOM hierarchy).
*
* @param element - The DOM element to check for CSS zoom
* @returns The cumulative zoom factor (e.g., 1.5 for 150% zoom, 1.0 for no zoom)
*/
export declare function getCSSZoomFactor(element: Element): number;