import type { GeoPermissibleObjects, GeoIdentityTransform, GeoProjection, GeoStreamWrapper } from 'd3-geo'; import type { Channel, ChannelAccessor, ChartBounds, ChartKey, ChartMark, ChartMarkMotionOptions, ChartNumericScale, VisualChannel } from './types.js'; export interface GeoProjectionContext { chart: ChartBounds; data: readonly TDatum[]; } export interface GeoProjectionDescriptor { type: () => GeoProjection | GeoIdentityTransform; /** * Geometry fitted into the final plot bounds. * Use "sphere" to retain a complete world frame. */ fit: 'data' | 'sphere' | GeoPermissibleObjects; inset?: number; } export type GeoProjectionInput = ((context: GeoProjectionContext) => GeoProjection | GeoStreamWrapper | null) | GeoProjectionDescriptor; export interface GeoShapeOptions extends ChartMarkMotionOptions { id?: string; className?: string; projection: GeoProjectionInput; key?: Channel; color?: Channel; /** Pixel radius for Point and MultiPoint geometry. Defaults to 4.5. */ r?: number | Channel; /** Maps a quantitative radius value to a nonnegative pixel radius. */ rScale?: ChartNumericScale; fill?: VisualChannel; fillOpacity?: number; stroke?: VisualChannel; strokeOpacity?: number; strokeWidth?: number; strokeDasharray?: string; opacity?: number; anchor?: ChannelAccessor; } /** * Projects GeoJSON through a caller-supplied D3 projection factory. * * The projection factory receives the final responsive plot bounds. Each * datum is rendered with `d3-geo`'s path generator and contributes an * interaction point at its projected centroid when both centroids are finite. */ export declare function geoShape(source: Iterable, options: GeoShapeOptions>): ChartMark;