import { type GeoJsonPosition } from "@trackunit/geo-json-utils"; import type { ResolvedDecoration } from "../shapeDecorations"; /** * Reserved pixel space at each end of an edge, computed from decorations * that sit on the edge's start or end vertex. */ export type EdgeReservation = Readonly<{ /** Total pixel length of the edge. */ totalPx: number; /** Available length after subtracting vertex decoration reservations from both ends. */ safePx: number; /** Pixel inset from the start vertex (left end when the edge reads left-to-right). */ startInsetPx: number; /** Pixel inset from the end vertex (right end when the edge reads left-to-right). */ endInsetPx: number; }>; /** * Compute edge reservations for a list of edges given the resolved * decorations for the same feature. * * For each edge `[startVertex, endVertex]`, the start inset is the maximum * `radiusPx` of any decoration at the start vertex, and the end inset is the * maximum `radiusPx` of any decoration at the end vertex. The safe length * is `totalPx - startInset - endInset`, clamped to zero. * * @param edges - Consecutive vertex pairs forming edges (as returned by `extractEdges`). * @param decorations - Resolved decorations for the same feature. * @param zoom - Current map zoom level. * @param tileSize - Tile size (256 for Google, 512 for Mapbox). */ export declare const computeEdgeReservations: (edges: ReadonlyArray, decorations: ReadonlyArray, zoom: number, tileSize: number) => ReadonlyArray; /** * Look up the reservation for a specific edge. Returns a default reservation * with zero insets if the edge index is out of range. */ export declare const getEdgeReservation: (reservations: ReadonlyArray, edgeIndex: number) => EdgeReservation;