import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type ChartSkin } from "../shared/types.js"; export interface GeoMapPoint { /** Stable identity, used as the React key when present. */ id?: string | number; /** Latitude in degrees, north-positive. Clamped to the poles. */ lat: number; /** Longitude in degrees, east-positive. Wrapped onto ±180. */ lng: number; /** The place name, shown in the value flag and folded into the accessible name. */ label: string; /** The magnitude at this place; encodes the bubble's AREA. */ count: number; } export interface GeoMapProps { /** The places to plot; every bubble takes the primary token. */ points: GeoMapPoint[]; /** Optional heading shown above the map. */ title?: string; compact?: boolean; /** Formats the flagged and accessible counts (data formatting, not styling). */ formatValue?: (v: number) => string; /** Press-to-inspect: the selected point index (controlled). Pass null for none. */ selected?: number | null; /** Press-to-inspect: the initially selected point (uncontrolled). */ defaultSelected?: number; /** Fired when a press selects a point (or clears it with null). */ onSelect?: (index: number | null) => void; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Width / height of the generated viewBox, and so of the rendered map. */ export declare const GEO_MAP_ASPECT: number; /** One bubble's center and radius, all in the generated viewBox's units. */ export interface GeoMapBubble { x: number; y: number; r: number; } /** * The bubble radius for `count` against the largest count on the map, in * viewBox units. AREA is the encoding, so the radius is proportional to the * square root of the share: doubling the count grows the disc's area by two, * not its width. The floor keeps a tiny (or zero, or malformed) count visible * as a place rather than vanishing, which is the one deliberate departure from * strict proportionality. */ export declare function bubbleRadius(count: number, max: number): number; /** * Project every point into the generated viewBox and size its bubble against * the largest count on the map. Pure, and exported for tests: geometry is * provable without a renderer (the chart-math.ts split), and the harness stubs * react-native-svg so nothing about the drawn circles is assertable from a DOM. */ export declare function geoMapBubbles(points: GeoMapPoint[]): GeoMapBubble[]; /** * The bubble under a press, or null for empty ocean. `x`/`y` are px within the * map and `scale` converts a viewBox unit to px, so the test is done in the * units the finger actually landed in. The nearest center wins, which is what * keeps a small bubble drawn over a large one reachable; a bubble smaller than * MIN_HIT still gets a finger-sized target. * * Pure, and exported for tests: the DOM harness cannot drive a real press with * coordinates through the hit layer (the `scrubEvent` precedent). */ export declare function bubbleAt(bubbles: GeoMapBubble[], x: number, y: number, scale: number): number | null; /** * The map's accessible name. A `role="img"` subtree is presentational, so a * screen reader user gets nothing from the bubbles themselves: the biggest * places have to be IN the name. It reads the title, then the top places by * count with their formatted values, then a "+N more" tail so the size of the * unread remainder is never hidden. */ export declare function geoMapAccessibleName(points: GeoMapPoint[], title: string | undefined, formatValue: (v: number) => string): string; /** Build a GeoMap from a platform skin. */ export declare function createGeoMap(skin: ChartSkin): (props: GeoMapProps) => import("react").JSX.Element; //# sourceMappingURL=geo-map.shared.d.ts.map