import type { RenderMedium } from "@trackunit/react-map-adapter-shared"; export type UseMarkerMountBridgeReturn = Readonly<{ mountingIds: ReadonlySet; }>; /** * Pure transition detector — returns the subset of `currentMediums` whose * medium is `"dom"` and whose previous medium was `"symbol"`. Exported for * unit tests; the React hook below is the consumer. */ export declare const computeMountingFeatureIds: (currentMediums: ReadonlyMap, previousMediums: ReadonlyMap, existingIds: ReadonlySet) => Set; /** * State-machine hook tracking `symbol → dom` transitions for adaptive markers * (ADR-0009 §"Mounting bridge"). * * On the commit where a feature's medium first appears as `"dom"` (after * having been `"symbol"`), its id is included in `mountingIds`. On the next * commit, `mountingIds` is empty again. `` uses this signal to * synthesize a first-commit render state with `isMounting: true` and * `selected`/`hovered: false` so consumer-side CSS animations can morph from * a small "default" footprint into the resting hover/select form. * * The hook is purely a state machine — it does not touch the DOM or the map * adapter. The caller decides what `currentMediums` reflects; in ``'s * case it is derived from the published DOM portal descriptors so that the * transition is detected at the moment the portal first renders, with * non-portal adaptive features defaulting to `"symbol"`. * * Per-feature `previousMedium` is intentionally not exposed in the public * render state — only `isMounting` (Q5 of the SAGA-414 design grilling). * * The two-pass mechanism is owned here: an internal mount store holds the * `previousMediums` map and the active `mountingIds` set, and notifies * subscribers via `useSyncExternalStore` rather than a React `setState` (so * the cascading-render guard rail does not block the legitimate two-pass * pattern). The detection layout effect calls `advance`; the passive clear * effect calls `clear` after the browser has had a chance to paint the * populated set once. */ export declare const useMarkerMountBridge: (features: ReadonlyArray<{ id: string; }>, currentMediums: ReadonlyMap) => UseMarkerMountBridgeReturn;