export type TileMapCalloutPlacement = 'above' | 'below'; export type TileMapCalloutCoordinates = [number, number] | { lng: number; lat: number; } | { lon: number; lat: number; } | { longitude: number; latitude: number; }; export declare const normalizeTileMapCalloutPlacement: (value: unknown, fallback?: TileMapCalloutPlacement) => TileMapCalloutPlacement; export declare const normalizeTileMapCalloutFlip: (value: unknown, fallback?: boolean) => boolean; export type TileMapCalloutSurface = 'filled' | 'bare'; export declare const normalizeTileMapCalloutSurface: (value: unknown, fallback?: TileMapCalloutSurface) => TileMapCalloutSurface; export declare const normalizeTileMapCalloutCoordinates: (value: unknown) => [number, number] | null; /** Default leader-line width in px: horizontal distance from the marker dot to the callout surface. */ export declare const DEFAULT_TILE_MAP_CALLOUT_LEADER_WIDTH = 14; /** Default leader-line height in px: vertical distance the diagonal rises or drops. */ export declare const DEFAULT_TILE_MAP_CALLOUT_LEADER_HEIGHT = 14; /** Default marker dot radius in px. */ export declare const DEFAULT_TILE_MAP_CALLOUT_DOT_RADIUS = 3; /** * Coerce a geometry prop (leader width/height, dot radius) to a non-negative, * finite number, falling back to the supplied default when the value is * missing, non-numeric, negative or non-finite. */ export declare const normalizeTileMapCalloutDimension: (value: unknown, fallback: number) => number; export interface TileMapCalloutGeometry { /** SVG canvas width and the surface's inline offset from the dot (px). */ leaderWidth: number; /** SVG canvas height (px). */ svgHeight: number; /** Dot centre x for the default (non-flipped) side. */ dotCx: number; /** Dot centre x when flipped to the right of the surface. */ dotCxFlipped: number; /** Dot centre y for `placement="above"`. */ dotCyAbove: number; /** Dot centre y for `placement="below"`. */ dotCyBelow: number; } /** * Resolve the leader-line SVG geometry from normalized dimensions. The canvas * span is clamped to a positive size (at least the dot diameter, and at least * `1`) so a zero-ish `leaderWidth`/`leaderHeight` can't collapse the SVG * `width`/`viewBox` to an invalid `0`. The clamped `leaderWidth` is the single * value used for the SVG width, the line endpoint AND the surface offset, so * the line and label stay aligned — including when flipped. */ export declare const resolveTileMapCalloutGeometry: (leaderWidth: number, leaderHeight: number, dotRadius: number) => TileMapCalloutGeometry; import { type Snippet } from 'svelte'; interface Props { /** Longitude/latitude to attach the callout to. Accepts [lng, lat] or an object with lng/lat, lon/lat or longitude/latitude. */ lngLat: TileMapCalloutCoordinates; /** Generic callout content. Keep it short so it fits on small map viewports. */ children?: Snippet; /** Place the callout surface above or below the map coordinate. */ placement?: TileMapCalloutPlacement; /** Flip the callout surface to the left of the map coordinate. */ flip?: boolean; /** Add custom classes to the callout surface. */ class?: string; /** Add an id to the MapLibre marker wrapper. */ id?: string; /** * Leader-line width in px — the horizontal distance from the marker dot to * the callout surface. Also sets the surface's offset from the dot so the * line and surface always line up. Clamped to at least the dot diameter * (and at least `1px`) so a `0`-ish value can't collapse the SVG. Defaults * to `14`. */ leaderWidth?: number; /** * Leader-line height in px — the vertical distance the diagonal rises * (`placement="above"`) or drops (`placement="below"`). Defaults to `14`. */ leaderHeight?: number; /** Marker dot radius in px. Defaults to `3`. */ dotRadius?: number; /** * Surface chrome. `"filled"` (default) draws the themed box (background, * border and shadow). `"bare"` removes that chrome so you can render your * own container inside the callout — the marker, leader line and * positioning still apply. Useful when wrapping a pre-styled card. */ surface?: TileMapCalloutSurface; } /** * `TileMapCallout` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-graphics-tilemapcallout--docs) * * A MapLibre-aware callout for `TileMap`. Render it as a child of any * `TileMap`, pass a longitude/latitude pair, and the component manages marker * placement and lifecycle through the map context. */ declare const TileMapCallout: import("svelte").Component; type TileMapCallout = ReturnType; export default TileMapCallout;