import { type GeoJsonGeometry, type GeoJsonPosition } from "@trackunit/geo-json-utils"; /** * Computed properties injected into `sourceProperties` for all edge-* anchors. * Render functions read these from the `item` argument via portal descriptors. */ export type EdgeComputedProperties = Readonly<{ /** Screen-space angle of the edge in degrees, normalized to [-90, 90]. */ angleDeg: number; /** Which side of the edge faces away from the shape interior. "above" for LineStrings. */ outwardSide: "above" | "below"; /** Length of the edge in screen pixels at the current zoom level. */ edgePixelLength: number; }>; /** * Compute edge-specific properties from resolved edge endpoints. * * For Polygons, `outwardSide` uses the cross product with the geometry centroid * to determine which side faces away from the interior. For LineStrings (no * interior), `outwardSide` defaults to `"above"`. * * When `geodesic` is `true`, `angleDeg` is derived from the arc tangent at * the edge midpoint (t = 0.5) via finite difference, so decorations are * rotated correctly relative to the visible curved edge. */ export declare const computeEdgeProperties: (start: GeoJsonPosition, end: GeoJsonPosition, geometry: GeoJsonGeometry, zoom: number, tileSize: number, geodesic?: boolean) => EdgeComputedProperties;