import type { GeoJsonFeatureCollection } from "@trackunit/geo-json-utils"; import { type AdaptiveMarkerResolution, type AdaptiveRenderConfig, type MapInteractionState, type RenderMedium } from "@trackunit/react-map-adapter-shared"; import type { MapApi } from "../../core/types"; import type { LayerHandle } from "../types"; type AdaptiveResolutionInputs = Readonly<{ zoom: number; markersInViewport: number; selectedMarkerId: string | null; hoveredMarkerId: string | null; debouncedHoveredMarkerId: string | null; }>; /** * Pure resolution for one adaptive marker layer (used by the hook and tests). */ export declare const computeAdaptiveMarkerResolutionForLayer: (collection: GeoJsonFeatureCollection, markerRender: AdaptiveRenderConfig, inputs: AdaptiveResolutionInputs, previousModes: ReadonlyMap | undefined) => AdaptiveMarkerResolution; /** * Computes per-feature adaptive modes for all `mode: "adaptive"` marker layers. * Intended for use inside `` only. * * Resolution is computed **during render** (via `useMemo`) so it stays aligned with * `interaction` in the same commit — avoids one frame of stale `adaptiveResolution` * on hover/select before effects ran (which caused visible DOM/symbol flicker). * * Viewport state (`zoom`, `bounds`) is read from the camera store with * `useSyncExternalStore`, keeping idle/moving transitions aligned with the same * snapshot that drives viewport consumers. * * Previous-frame mode tracking (for animation continuity) is intentionally left to * each adapter — they own the mutable DOM marker state and can diff their own * previous modes on each `setSnapshot` call without coupling to React render cycles. */ export declare const useAdaptiveMarkerResolution: (handles: ReadonlyArray, interaction: MapInteractionState, api: MapApi | undefined) => ReadonlyMap; export {};