{"version":3,"names":["isElement","createEffect","onCleanup","untrack","createChangeEventDetails","REASONS","ownerDocument","readOption","createStableCallback","useIsoLayoutEffect","useTimeout","useFloatingParentNodeId","useFloatingTree","contains","getTarget","isTargetInsideEnabledTrigger","getNodeChildren","applySafePolygonPointerEventsMutation","clearSafePolygonPointerEventsMutation","isInteractiveElement","useHoverInteractionSharedState","getDelay","isClickLikeOpenEvent","isClickLikeOpenEventShared","useHoverFloatingInteraction","context","parameters","resolveStore","ctx","rootStore","getEnabled","enabled","undefined","closeDelay","closeDelayProp","nodeId","nodeIdProp","initialStore","instance","tree","parentId","store","dataRef","current","openEvent","type","interactedInside","isHoverOpen","Boolean","includes","isRelatedTargetInsideEnabledTrigger","target","triggerElements","closeWithDelay","event","pointerType","close","setOpen","triggerHover","events","emit","openChangeTimeout","start","clear","clearPointerEvents","handleInteractInside","closest","open","state","restTimeoutPending","domReferenceElement","floatingElement","snapshot","handleCloseOptions","blockPointerEvents","ref","floatingEl","doc","parentFloating","nodesRef","find","node","id","elements","floating","style","pointerEvents","scopeElement","getScope","pointerEventsScopeElement","body","referenceElement","childClosedTimeout","onFloatingMouseEnter","off","onNodeClosed","onFloatingMouseLeave","length","on","relatedTarget","currentNodeId","floatingContext","isMovingIntoDescendantFloating","some","handler","addEventListener","removeEventListener"],"sources":["use-hover-floating-interaction.ts"],"sourcesContent":["/**\n * Stage 4.4 port of Base UI React's `useHoverFloatingInteraction`.\n *\n * React source:\n *   `base-ui/packages/react/src/floating-ui-react/hooks/useHoverFloatingInteraction.ts`\n *\n * Attaches the hover event handlers that belong on the floating element.\n * Handles:\n *\n *   - Cancelling the reference-side close-timer when the cursor enters\n *     the floating surface (so the popup stays open while the user is\n *     inside it).\n *   - Closing the popup when the cursor leaves — respecting\n *     `safePolygon` handlers, tree-aware nesting (don't close while a\n *     child menu is open), and enabled-sibling triggers.\n *   - Pointer-events blocking for `blockPointerEvents: true`\n *     safe-polygons (covers menu nesting), including scope detection\n *     via `getScope` or a `[data-rootownerid]` ancestor.\n *   - `pointerdown` interaction-inside tracking used by the shared\n *     `isClickLikeOpenEvent` predicate.\n *\n * ### React → Solid deviations\n *\n * Same shape as the reference-side port above:\n *  - `useRef` → plain variables / `MutableRef<T>`.\n *  - `useStableCallback` → `createStableCallback`.\n *  - `useEffect` / `useIsoLayoutEffect` → `createEffect` /\n *    `useIsoLayoutEffect` (split-compute form).\n *  - `addEventListener` + `mergeCleanups` → direct\n *    `addEventListener` + an array-based cleanup in `onCleanup`.\n */\n\nimport { isElement } from \"@floating-ui/utils/dom\";\nimport { createEffect, onCleanup, untrack } from \"solid-js\";\nimport {\n\ttype BaseUIChangeEventDetails,\n\tcreateChangeEventDetails,\n\tREASONS,\n} from \"../../change-event-details\";\nimport { ownerDocument } from \"../../dom/owner-document\";\nimport { type MaybeAccessor, readOption } from \"../../maybe-accessor\";\nimport { createStableCallback } from \"../../stable-callback\";\nimport { useIsoLayoutEffect } from \"../../use-iso-layout-effect\";\nimport { useTimeout } from \"../../use-timeout\";\nimport type { FloatingRootStore } from \"../components/floating-root-store\";\nimport {\n\tuseFloatingParentNodeId,\n\tuseFloatingTree,\n} from \"../components/floating-tree\";\nimport type { FloatingContext, FloatingRootContext } from \"../types\";\nimport {\n\tcontains,\n\tgetTarget,\n\tisTargetInsideEnabledTrigger,\n} from \"../utils/element\";\nimport { getNodeChildren } from \"../utils/nodes\";\nimport {\n\tapplySafePolygonPointerEventsMutation,\n\tclearSafePolygonPointerEventsMutation,\n\tisInteractiveElement,\n\tuseHoverInteractionSharedState,\n} from \"./use-hover-interaction-shared-state\";\nimport {\n\tgetDelay,\n\tisClickLikeOpenEvent as isClickLikeOpenEventShared,\n} from \"./use-hover-shared\";\n\nexport interface UseHoverFloatingInteractionProps {\n\t/**\n\t * Whether the Hook is enabled, including all internal Effects and event\n\t * handlers.\n\t * @default true\n\t */\n\tenabled?: MaybeAccessor<boolean> | undefined;\n\t/**\n\t * Waits for the specified time when the event listener runs before changing\n\t * the `open` state.\n\t * @default 0\n\t */\n\tcloseDelay?: number | (() => number) | undefined;\n\t/**\n\t * Tree node id override for floating elements that participate in the tree\n\t * without a `FloatingContext`, such as inline nested navigation menus.\n\t */\n\tnodeId?: string | undefined;\n}\n\n/**\n * Provides hover interactions that should be attached to the floating element.\n */\nexport function useHoverFloatingInteraction(\n\tcontext:\n\t\t| FloatingRootContext\n\t\t| FloatingContext\n\t\t| (() => FloatingRootContext | FloatingContext),\n\tparameters: UseHoverFloatingInteractionProps = {},\n): void {\n\t/**\n\t * Resolve the active floating root store. Accepts either a bare context or\n\t * an accessor so navigation-menu List can swap the active trigger context\n\t * without re-installing the hook.\n\t */\n\tconst resolveStore = (): FloatingRootStore => {\n\t\tconst ctx =\n\t\t\ttypeof context === \"function\"\n\t\t\t\t? (context as () => FloatingRootContext | FloatingContext)()\n\t\t\t\t: context;\n\t\treturn \"rootStore\" in ctx ? ctx.rootStore : ctx;\n\t};\n\n\tconst getEnabled = (): boolean =>\n\t\tparameters.enabled === undefined ? true : readOption(parameters.enabled);\n\n\tconst { closeDelay: closeDelayProp = 0, nodeId: nodeIdProp } = parameters;\n\n\t// One-shot snapshot used to seed shared state. `resolveStore` reads the\n\t// reactive `floatingRootContext` accessor (navigation-menu List passes an\n\t// accessor), so untrack the body-time read to avoid `[STRICT_READ_UNTRACKED]`.\n\tconst initialStore = untrack(resolveStore);\n\tconst instance = useHoverInteractionSharedState(initialStore);\n\n\tconst tree = useFloatingTree();\n\tconst parentId = useFloatingParentNodeId();\n\n\tconst isClickLikeOpenEvent = createStableCallback<() => boolean>(() => () => {\n\t\tconst store = resolveStore();\n\t\tconst { dataRef } = store.context;\n\t\treturn isClickLikeOpenEventShared(\n\t\t\tdataRef.current.openEvent?.type,\n\t\t\tinstance.interactedInside,\n\t\t);\n\t});\n\n\tconst isHoverOpen = createStableCallback<() => boolean>(() => () => {\n\t\tconst store = resolveStore();\n\t\tconst type = store.context.dataRef.current.openEvent?.type;\n\t\treturn Boolean(type?.includes(\"mouse\")) && type !== \"mousedown\";\n\t});\n\n\tconst isRelatedTargetInsideEnabledTrigger = createStableCallback<\n\t\t(target: EventTarget | null) => boolean\n\t>(() => (target: EventTarget | null) => {\n\t\tconst store = resolveStore();\n\t\treturn isTargetInsideEnabledTrigger(target, store.context.triggerElements);\n\t});\n\n\tconst closeWithDelay = createStableCallback<(event: MouseEvent) => void>(\n\t\t() => (event: MouseEvent) => {\n\t\t\tconst store = resolveStore();\n\t\t\tconst closeDelay = getDelay(\n\t\t\t\tcloseDelayProp,\n\t\t\t\t\"close\",\n\t\t\t\tinstance.pointerType,\n\t\t\t);\n\t\t\tconst close = () => {\n\t\t\t\tstore.setOpen(\n\t\t\t\t\tfalse,\n\t\t\t\t\tcreateChangeEventDetails(\n\t\t\t\t\t\tREASONS.triggerHover,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t) as BaseUIChangeEventDetails<string>,\n\t\t\t\t);\n\t\t\t\ttree?.events.emit(\"floating.closed\", event);\n\t\t\t};\n\t\t\tif (closeDelay) {\n\t\t\t\tinstance.openChangeTimeout.start(closeDelay, close);\n\t\t\t} else {\n\t\t\t\tinstance.openChangeTimeout.clear();\n\t\t\t\tclose();\n\t\t\t}\n\t\t},\n\t);\n\n\tconst clearPointerEvents = createStableCallback<() => void>(() => () => {\n\t\tclearSafePolygonPointerEventsMutation(instance);\n\t});\n\n\tconst handleInteractInside = createStableCallback<\n\t\t(event: PointerEvent) => void\n\t>(() => (event: PointerEvent) => {\n\t\tconst target = getTarget(event) as Element | null;\n\t\tif (!isInteractiveElement(target)) {\n\t\t\tinstance.interactedInside = false;\n\t\t\treturn;\n\t\t}\n\n\t\tinstance.interactedInside = target?.closest(\"[aria-haspopup]\") != null;\n\t});\n\n\t// When the popup closes, reset shared state + clear any pointer-events\n\t// mutation set by the safe-polygon path.\n\tuseIsoLayoutEffect(\n\t\t() => ({\n\t\t\tenabled: getEnabled(),\n\t\t\topen: resolveStore().state.open,\n\t\t}),\n\t\t({ enabled, open }) => {\n\t\t\tif (!enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!open) {\n\t\t\t\tinstance.pointerType = undefined;\n\t\t\t\tinstance.restTimeoutPending = false;\n\t\t\t\tinstance.interactedInside = false;\n\t\t\t\tclearPointerEvents();\n\t\t\t}\n\t\t},\n\t);\n\n\tonCleanup(() => {\n\t\tclearPointerEvents();\n\t});\n\n\t// Pointer-events mutation for `blockPointerEvents: true` safe-polygon.\n\tuseIsoLayoutEffect(\n\t\t() => ({\n\t\t\tenabled: getEnabled(),\n\t\t\topen: resolveStore().state.open,\n\t\t\tdomReferenceElement: resolveStore().state.domReferenceElement,\n\t\t\tfloatingElement: resolveStore().state.floatingElement,\n\t\t}),\n\t\t(snapshot) => {\n\t\t\tif (!snapshot.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { open, domReferenceElement, floatingElement } = snapshot;\n\n\t\t\tif (\n\t\t\t\topen &&\n\t\t\t\tinstance.handleCloseOptions?.blockPointerEvents &&\n\t\t\t\tisHoverOpen() &&\n\t\t\t\tisElement(domReferenceElement) &&\n\t\t\t\tfloatingElement\n\t\t\t) {\n\t\t\t\tconst ref = domReferenceElement as HTMLElement | SVGSVGElement;\n\t\t\t\tconst floatingEl = floatingElement;\n\t\t\t\tconst doc = ownerDocument(floatingElement);\n\n\t\t\t\tconst parentFloating = tree?.nodesRef.current.find(\n\t\t\t\t\t(node) => node.id === parentId,\n\t\t\t\t)?.context?.elements.floating as HTMLElement | null;\n\n\t\t\t\tif (parentFloating) {\n\t\t\t\t\tparentFloating.style.pointerEvents = \"\";\n\t\t\t\t}\n\n\t\t\t\tconst scopeElement =\n\t\t\t\t\tinstance.handleCloseOptions?.getScope?.() ??\n\t\t\t\t\tinstance.pointerEventsScopeElement ??\n\t\t\t\t\tparentFloating ??\n\t\t\t\t\t(ref.closest(\"[data-rootownerid]\") as\n\t\t\t\t\t\t| HTMLElement\n\t\t\t\t\t\t| SVGSVGElement\n\t\t\t\t\t\t| null) ??\n\t\t\t\t\tdoc.body;\n\n\t\t\t\tapplySafePolygonPointerEventsMutation(instance, {\n\t\t\t\t\tscopeElement,\n\t\t\t\t\treferenceElement: ref,\n\t\t\t\t\tfloatingElement: floatingEl,\n\t\t\t\t});\n\n\t\t\t\treturn () => {\n\t\t\t\t\tclearPointerEvents();\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t);\n\n\tconst childClosedTimeout = useTimeout();\n\n\tcreateEffect(\n\t\t() => ({\n\t\t\tenabled: getEnabled(),\n\t\t\tfloating: resolveStore().state.floatingElement,\n\t\t}),\n\t\t({ enabled, floating }) => {\n\t\t\tif (!enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Effect-apply scope: the compute above already tracks\n\t\t\t// `resolveStore().state.floatingElement` (and therefore the\n\t\t\t// `floatingRootContext` accessor), so this re-read is a snapshot —\n\t\t\t// untrack to avoid `[STRICT_READ_UNTRACKED]`.\n\t\t\tconst store = untrack(resolveStore);\n\t\t\tconst { dataRef } = store.context;\n\n\t\t\tfunction onFloatingMouseEnter() {\n\t\t\t\tinstance.openChangeTimeout.clear();\n\t\t\t\tchildClosedTimeout.clear();\n\t\t\t\ttree?.events.off(\"floating.closed\", onNodeClosed);\n\t\t\t\tclearPointerEvents();\n\t\t\t}\n\n\t\t\tfunction onFloatingMouseLeave(event: MouseEvent) {\n\t\t\t\tif (\n\t\t\t\t\ttree &&\n\t\t\t\t\tparentId &&\n\t\t\t\t\tgetNodeChildren(tree.nodesRef.current, parentId).length > 0\n\t\t\t\t) {\n\t\t\t\t\ttree.events.on(\"floating.closed\", onNodeClosed);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isRelatedTargetInsideEnabledTrigger(event.relatedTarget)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst currentNodeId =\n\t\t\t\t\tdataRef.current.floatingContext?.nodeId ?? nodeIdProp;\n\t\t\t\tconst relatedTarget = event.relatedTarget;\n\t\t\t\tconst isMovingIntoDescendantFloating =\n\t\t\t\t\ttree &&\n\t\t\t\t\tcurrentNodeId &&\n\t\t\t\t\tisElement(relatedTarget) &&\n\t\t\t\t\tgetNodeChildren(tree.nodesRef.current, currentNodeId, false).some(\n\t\t\t\t\t\t(node) =>\n\t\t\t\t\t\t\tcontains(\n\t\t\t\t\t\t\t\tnode.context?.elements.floating ?? null,\n\t\t\t\t\t\t\t\trelatedTarget as Element,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\n\t\t\t\tif (isMovingIntoDescendantFloating) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (instance.handler) {\n\t\t\t\t\tinstance.handler(event);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearPointerEvents();\n\t\t\t\tif (!isClickLikeOpenEvent()) {\n\t\t\t\t\tcloseWithDelay(event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction onNodeClosed(event: MouseEvent) {\n\t\t\t\tif (\n\t\t\t\t\t!tree ||\n\t\t\t\t\t!parentId ||\n\t\t\t\t\tgetNodeChildren(tree.nodesRef.current, parentId).length > 0\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tchildClosedTimeout.start(0, () => {\n\t\t\t\t\ttree.events.off(\"floating.closed\", onNodeClosed);\n\t\t\t\t\tresolveStore().setOpen(\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\tcreateChangeEventDetails(\n\t\t\t\t\t\t\tREASONS.triggerHover,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t) as BaseUIChangeEventDetails<string>,\n\t\t\t\t\t);\n\t\t\t\t\ttree.events.emit(\"floating.closed\", event);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!floating) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfloating.addEventListener(\"mouseenter\", onFloatingMouseEnter);\n\t\t\tfloating.addEventListener(\"mouseleave\", onFloatingMouseLeave);\n\t\t\tfloating.addEventListener(\n\t\t\t\t\"pointerdown\",\n\t\t\t\thandleInteractInside as EventListener,\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\tfloating.removeEventListener(\"mouseenter\", onFloatingMouseEnter);\n\t\t\t\tfloating.removeEventListener(\"mouseleave\", onFloatingMouseLeave);\n\t\t\t\tfloating.removeEventListener(\n\t\t\t\t\t\"pointerdown\",\n\t\t\t\t\thandleInteractInside as EventListener,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t\ttree?.events.off(\"floating.closed\", onNodeClosed);\n\t\t\t};\n\t\t},\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,wBAAwB;AAClD,SAASC,YAAY,EAAEC,SAAS,EAAEC,OAAO,QAAQ,UAAU;AAC3D,SAECC,wBAAwB,EACxBC,OAAO,QACD,4BAA4B;AACnC,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAA6BC,UAAU,QAAQ,sBAAsB;AACrE,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,UAAU,QAAQ,mBAAmB;AAE9C,SACCC,uBAAuB,EACvBC,eAAe,QACT,6BAA6B;AAEpC,SACCC,QAAQ,EACRC,SAAS,EACTC,4BAA4B,QACtB,kBAAkB;AACzB,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SACCC,qCAAqC,EACrCC,qCAAqC,EACrCC,oBAAoB,EACpBC,8BAA8B,QACxB,sCAAsC;AAC7C,SACCC,QAAQ,EACRC,oBAAoB,IAAIC,0BAA0B,QAC5C,oBAAoB;AAsB3B;AACA;AACA;AACA,OAAO,SAASC,2BAA2BA,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