import type { Coord } from "../interactive2/types"; import type { CSSProperties } from "aphrodite"; /** * A Graphie axis range. */ export type GraphieRange = [number, number]; /** * A Graphie label. */ export type GraphieLabel = { content: string; alignment: number | "center" | "above" | "above right" | "right" | "below right" | "below" | "below left" | "left" | "above left"; coordinates: GraphieRange; style: CSSProperties; typesetAsMath: boolean; }; /** * The Graphie data (labels, etc.) */ export type GraphieData = { range: [GraphieRange, GraphieRange]; labels: Array; }; export declare function getLocalizedDataUrl(url: string): string; /** * Parse JSONP for a web+graphie://... hash to extract Graphie data, or throw * an error if invalid JSONP. */ export declare function parseDataFromJSONP(graphieHash: string, graphieJSONP: string, errorCallback: (error?: any) => void): GraphieData | null; type CacheEntry = { labels: ReadonlyArray; range: [Coord, Coord]; }; /** * Reset the label data cache. This is primarily used for testing * to ensure a clean state between test cases. */ export declare function resetLabelDataCache(): void; export declare function loadGraphie(url: string, onDataLoaded: (data: CacheEntry, localized: boolean) => void): void; export {};