{"version":3,"file":"overlayTriggerTunnel.mjs","names":[],"sources":["../../../../../../../src/lib/propsContext/overlayTriggerTunnel.ts"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport type { TunnelTarget } from \"@/lib/types/props\";\n\n/**\n * Props context entries that send every overlay trigger into `tunnel`.\n *\n * A props context that tunnels `Button` has to tunnel the overlay triggers as a\n * whole, not their buttons: `OverlayTrigger` pins its trigger button in place\n * (`tunnel: null`), because react-aria wires the press handling, the trigger\n * ref and `aria-haspopup`/`aria-expanded`/`aria-controls` through a\n * `PressResponder` that only reaches its own subtree. Tunnelling the button\n * alone lifts it out of that subtree and silently drops all of it.\n *\n * `DialogTrigger` is in the list because it is the host-side identity of the\n * triggers that are not `@flr-generate` — `ModalTrigger`, `PopoverTrigger` and\n * `LightBoxTrigger` all render through its view, so a remote tree only ever\n * reaches the host as a `DialogTrigger`. `OverlayTrigger` pins it with `tunnel:\n * null` in turn, so the local tree tunnels the trigger the author wrote and\n * never the `DialogTrigger` inside it.\n *\n * Spread the entries before the context's own, so a single trigger can still be\n * sent somewhere else (see `Label`).\n */\nexport const overlayTriggersTunneledTo = (\n  tunnel: TunnelTarget,\n): PropsContext => ({\n  ContextMenuTrigger: { tunnel },\n  ContextualHelpTrigger: { tunnel },\n  DialogTrigger: { tunnel },\n  ModalTrigger: { tunnel },\n  PopoverTrigger: { tunnel },\n});\n\nexport default overlayTriggersTunneledTo;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,6BACX,YACkB;CAClB,oBAAoB,EAAE,OAAO;CAC7B,uBAAuB,EAAE,OAAO;CAChC,eAAe,EAAE,OAAO;CACxB,cAAc,EAAE,OAAO;CACvB,gBAAgB,EAAE,OAAO;AAC3B"}