import type { MapFocus } from "./mapFocus"; /** * Stateful wrapper around `buildExpandedIds` that feeds the previous result * back as `previousIds`, producing hysteresis: markers that were expanded * stay expanded across incremental data updates (e.g. pan/zoom refetches). * * Memory rules: * - A marker no longer in `items` is naturally forgotten (not a candidate). * - When `focus.id` changes the memory is reset entirely. * * Callers replace a bare `useMemo(() => buildExpandedIds(...))` with this * hook — the signature is identical except `previousIds` is managed * internally. * * State is kept via the render-phase setState pattern (React docs §derived * state): calling setState during render causes React to discard the current * render and immediately re-render with the updated state, so callers never * observe a stale value. This avoids reading/writing a ref during render. */ export declare const useExpandedIds: (items: ReadonlyArray, getId: (item: TAsset) => string, focus: MapFocus, limit: number, getPosition?: (item: TAsset) => readonly [number, number, ...Array]) => ReadonlySet;