import { GroupBase, StylesConfig } from "react-select"; type MenuPortalStyleFn = NonNullable>["menuPortal"]>; type PortalStyleArgs = Parameters[1]; export interface MenuGeometry { alignRight: boolean; minWidth: number; maxWidth: number; } /** * Derives the dropdown's alignment/sizing from the control's rect and the viewport: * - flips to right-aligned ("poking out" left of the control) only when the control no * longer fits to the right AND flipping actually buys more room * - the width ceiling on the anchored side (bounded by the viewport edge, minus padding) * * It's a bare function rather than a hook because it's a pure, synchronous transform with no * React state of its own, called from inside `useSelect.ts`'s `styles.menuPortal` (react-select's * own extension point, not ours) -- there's nowhere in that call chain to invoke a hook. * * Its result is applied as an inline style on the actual menu box by useCustomComponents.tsx's * custom `Menu` component (via a `getMenuGeometry` getter), not on the portal itself: `MenuPortal` * is a zero-size, out-of-flow wrapper, and an absolutely-positioned child (the menu) doesn't * contribute to its shrink-to-fit sizing, so styling the portal can't drive the visible menu's * width or position. */ export declare const computeMenuGeometry: (rect: PortalStyleArgs["rect"]) => MenuGeometry; export {};