/** * Stage 4.4 port of Base UI React's `useHoverFloatingInteraction`. * * React source: * `base-ui/packages/react/src/floating-ui-react/hooks/useHoverFloatingInteraction.ts` * * Attaches the hover event handlers that belong on the floating element. * Handles: * * - Cancelling the reference-side close-timer when the cursor enters * the floating surface (so the popup stays open while the user is * inside it). * - Closing the popup when the cursor leaves — respecting * `safePolygon` handlers, tree-aware nesting (don't close while a * child menu is open), and enabled-sibling triggers. * - Pointer-events blocking for `blockPointerEvents: true` * safe-polygons (covers menu nesting), including scope detection * via `getScope` or a `[data-rootownerid]` ancestor. * - `pointerdown` interaction-inside tracking used by the shared * `isClickLikeOpenEvent` predicate. * * ### React → Solid deviations * * Same shape as the reference-side port above: * - `useRef` → plain variables / `MutableRef`. * - `useStableCallback` → `createStableCallback`. * - `useEffect` / `useIsoLayoutEffect` → `createEffect` / * `useIsoLayoutEffect` (split-compute form). * - `addEventListener` + `mergeCleanups` → direct * `addEventListener` + an array-based cleanup in `onCleanup`. */ import { type MaybeAccessor } from "../../maybe-accessor.js"; import type { FloatingContext, FloatingRootContext } from "../types.js"; export interface UseHoverFloatingInteractionProps { /** * Whether the Hook is enabled, including all internal Effects and event * handlers. * @default true */ enabled?: MaybeAccessor | undefined; /** * Waits for the specified time when the event listener runs before changing * the `open` state. * @default 0 */ closeDelay?: number | (() => number) | undefined; /** * Tree node id override for floating elements that participate in the tree * without a `FloatingContext`, such as inline nested navigation menus. */ nodeId?: string | undefined; } /** * Provides hover interactions that should be attached to the floating element. */ export declare function useHoverFloatingInteraction(context: FloatingRootContext | FloatingContext | (() => FloatingRootContext | FloatingContext), parameters?: UseHoverFloatingInteractionProps): void; //# sourceMappingURL=use-hover-floating-interaction.d.ts.map