import { VerticalPosition, FixedPositionOptions } from "./types"; import { YCoordConfig } from "./getCoord"; /** * @private */ interface YPosition { top: number; bottom?: number; actualY: VerticalPosition; } /** * @private */ export interface FixConfig extends YCoordConfig { vhMargin: number; screenBottom: number; preventOverlap: boolean; disableSwapping: boolean; disableVHBounds: boolean; } /** * @private */ interface Options extends Required> { y: VerticalPosition; vh: number; initialY?: number; elHeight: number; containerRect: DOMRect | ClientRect; } /** * Attempts to position the fixed element so that it will appear completely * above the container element but also within the viewport boundaries. When * swapping is enabled, it will attempt to swap to the below position if it * can't fit within the viewport above the container element. If it can't fit in * the viewport even after being swapped below or swapping is disabled, it will * be positioned to the top viewport boundary. * * @private */ export declare function createAnchoredAbove(config: FixConfig): YPosition; /** * Attempts to position the fixed element so that it will appear fixed to the * top of the container element but also within the viewport boundaries. When * swapping is enabled, it will attempt to swap to the bottom position if it * can't fit within the viewport. If it can't fit in the viewport even after * being swapped to the bottom position or swapping is disabled, it will be * positioned to the top viewport boundary. * * @private */ export declare function createAnchoredTop(config: FixConfig): YPosition; /** * Attempts to position the fixed element so that it will appear at the center * of the container element but also within the viewport boundaries. If the * entered element can't fit within the viewport, it'll update the top value * to either be the vhMargin or position to the screen bottom boundary * * @private */ export declare function createAnchoredCenter(config: FixConfig): YPosition; /** * Attempts to position the fixed element so that it will appear fixed to the * bottom of the container element but also within the viewport boundaries. When * swapping is enabled, it will attempt to swap to the top position if it can't * fit within the viewport. If it can't fit in the viewport even after being * swapped to the top position or swapping is disabled, it will be positioned to * the bottom viewport boundary. * * @private */ export declare function createAnchoredBottom(config: FixConfig): YPosition; /** * Attempts to position the fixed element so that it will appear completely * below the container element but also within the viewport boundaries. When * swapping is enabled, it will attempt to swap to the above position if it * can't fit within the viewport below the container element. If it can't fit in * the viewport even after being swapped above or swapping is disabled, it will * be positioned to the bottom viewport boundary. * * @private */ export declare function createAnchoredBelow(config: FixConfig): YPosition; /** * Creates the vertical position for a fixed element with the provided options. * * @private */ export default function createVerticalPosition({ y, vh, vhMargin, yMargin, elHeight, initialY, containerRect, disableSwapping, preventOverlap, disableVHBounds, }: Options): YPosition; export {};