import type { DSHookFloatingContextT } from '../react-desc-prop-types.js'; type RectLike = { top: number; left: number; right: number; bottom: number; }; type OverflowOffsets = { top: number; bottom: number; left: number; right: number; }; declare const adjustForFixedParent: (child: Element) => { top: number; left: number; }; /** * Finds nearest ancestor that can CLIP the floating element. * This is typically the correct boundary when rendering without portal. */ declare const getClippingParent: (el: Element | null) => Element | null; declare const getViewportRect: () => RectLike; /** * Shift behavior: if any overflow side is positive, push the popper back inside. * Similar to Floating UI "shift" middleware. */ declare const applyShift: (x: number, y: number, overflow: OverflowOffsets) => { x: number; y: number; }; declare const fits: (o: OverflowOffsets) => boolean; declare const getOverflowScore: (o: OverflowOffsets) => { total: number; maxSide: number; }; /** * Ensure we actually TRY variations (start/end) for each base placement. * Fixes cases where only e.g. "bottom-end" fits but would never be tried. */ declare const expandWithVariations: (pls: DSHookFloatingContextT.PopperPlacementsT[]) => DSHookFloatingContextT.PopperPlacementsT[]; /** * When rendering WITHOUT portal, the floating element is positioned relative to its offsetParent. * But referenceRect/floatingRect are in viewport coordinates, so we must convert x/y from viewport * space into the offsetParent's coordinate space (including its scroll offsets). */ declare const getOffsetParentData: (floating: HTMLElement) => { left: number; top: number; scrollLeft: number; scrollTop: number; }; export { applyShift, adjustForFixedParent, expandWithVariations, fits, getClippingParent, getOverflowScore, getOffsetParentData, getViewportRect, type RectLike, type OverflowOffsets, };