|
import { AlignedPlacement } from '@floating-ui/core';
|
|
import { Alignment } from '@floating-ui/core';
|
|
import type { ArrowOptions as ArrowOptions_2 } from '@floating-ui/core';
|
|
import type { AutoPlacementOptions as AutoPlacementOptions_2 } from '@floating-ui/core';
|
|
import { Axis } from '@floating-ui/core';
|
|
import { ClientRectObject } from '@floating-ui/core';
|
|
import type { ComputePositionConfig as ComputePositionConfig_2 } from '@floating-ui/core';
|
|
import { ComputePositionReturn } from '@floating-ui/core';
|
|
import { Coords } from '@floating-ui/core';
|
|
import type { Derivable as Derivable_2 } from '@floating-ui/core';
|
|
import { detectOverflow } from '@floating-ui/core';
|
|
import type { DetectOverflowOptions as DetectOverflowOptions_2 } from '@floating-ui/core';
|
|
import { Dimensions } from '@floating-ui/core';
|
|
import { ElementContext } from '@floating-ui/core';
|
|
import { ElementRects } from '@floating-ui/core';
|
|
import type { FlipOptions as FlipOptions_2 } from '@floating-ui/core';
|
|
import { getOverflowAncestors } from '@floating-ui/utils/dom';
|
|
import type { HideOptions as HideOptions_2 } from '@floating-ui/core';
|
|
import { InlineOptions } from '@floating-ui/core';
|
|
import { Length } from '@floating-ui/core';
|
|
import type { LimitShiftOptions } from '@floating-ui/core';
|
|
import type { Middleware as Middleware_2 } from '@floating-ui/core';
|
|
import { MiddlewareData } from '@floating-ui/core';
|
|
import { MiddlewareReturn } from '@floating-ui/core';
|
|
import type { MiddlewareState as MiddlewareState_2 } from '@floating-ui/core';
|
|
import { offset } from '@floating-ui/core';
|
|
import { OffsetOptions } from '@floating-ui/core';
|
|
import { Padding } from '@floating-ui/core';
|
|
import { Placement } from '@floating-ui/core';
|
|
import { Rect } from '@floating-ui/core';
|
|
import { RootBoundary } from '@floating-ui/core';
|
|
import type { ShiftOptions as ShiftOptions_2 } from '@floating-ui/core';
|
|
import { Side } from '@floating-ui/core';
|
|
import { SideObject } from '@floating-ui/core';
|
|
import type { SizeOptions as SizeOptions_2 } from '@floating-ui/core';
|
|
import { Strategy } from '@floating-ui/core';
|
|
|
|
export { AlignedPlacement }
|
|
|
|
export { Alignment }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const arrow: (options: ArrowOptions | Derivable_2<ArrowOptions>) => Middleware;
|
|
|
|
export declare type ArrowOptions = Prettify<Omit<ArrowOptions_2, 'element'> & {
|
|
element: Element;
|
|
}>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const autoPlacement: (options?: AutoPlacementOptions | Derivable_2<AutoPlacementOptions>) => Middleware;
|
|
|
|
export declare type AutoPlacementOptions = Prettify<Omit<AutoPlacementOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement, update: () => void, options?: AutoUpdateOptions): () => void;
|
|
|
|
export declare type AutoUpdateOptions = Partial<{
|
|
|
|
|
|
|
|
|
|
ancestorScroll: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
ancestorResize: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
elementResize: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
layoutShift: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
animationFrame: boolean;
|
|
}>;
|
|
|
|
export { Axis }
|
|
|
|
|
|
|
|
|
|
export declare type Boundary = 'clippingAncestors' | Element | Array<Element> | Rect;
|
|
|
|
export { ClientRectObject }
|
|
|
|
|
|
|
|
|
|
|
|
export declare const computePosition: (reference: ReferenceElement, floating: FloatingElement, options?: Partial<ComputePositionConfig>) => Promise<ComputePositionReturn>;
|
|
|
|
export declare type ComputePositionConfig = Prettify<Omit<ComputePositionConfig_2, 'middleware' | 'platform'> & {
|
|
|
|
|
|
|
|
|
|
middleware?: Array<Middleware | null | undefined | false>;
|
|
|
|
|
|
|
|
platform?: Platform;
|
|
}>;
|
|
|
|
export { ComputePositionReturn }
|
|
|
|
export { Coords }
|
|
|
|
export declare type Derivable<T> = (state: MiddlewareState) => T;
|
|
|
|
export { detectOverflow }
|
|
|
|
export declare type DetectOverflowOptions = Prettify<Omit<DetectOverflowOptions_2, 'boundary'> & {
|
|
boundary?: Boundary;
|
|
}>;
|
|
|
|
export { Dimensions }
|
|
|
|
export { ElementContext }
|
|
|
|
export { ElementRects }
|
|
|
|
export declare interface Elements {
|
|
reference: ReferenceElement;
|
|
floating: FloatingElement;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const flip: (options?: FlipOptions | Derivable_2<FlipOptions>) => Middleware;
|
|
|
|
export declare type FlipOptions = Prettify<Omit<FlipOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
|
|
export declare type FloatingElement = HTMLElement;
|
|
|
|
export { getOverflowAncestors }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const hide: (options?: HideOptions | Derivable_2<HideOptions>) => Middleware;
|
|
|
|
export declare type HideOptions = Prettify<Omit<HideOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const inline: (options?: InlineOptions | Derivable_2<InlineOptions>) => Middleware;
|
|
|
|
export { InlineOptions }
|
|
|
|
export { Length }
|
|
|
|
|
|
|
|
|
|
export declare const limitShift: (options?: LimitShiftOptions | Derivable_2<LimitShiftOptions>) => {
|
|
options: any;
|
|
fn: (state: MiddlewareState) => Coords;
|
|
};
|
|
|
|
export declare type Middleware = Prettify<Omit<Middleware_2, 'fn'> & {
|
|
fn(state: MiddlewareState): Promisable<MiddlewareReturn>;
|
|
}>;
|
|
|
|
|
|
|
|
|
|
export declare type MiddlewareArguments = MiddlewareState;
|
|
|
|
export { MiddlewareData }
|
|
|
|
export { MiddlewareReturn }
|
|
|
|
export declare type MiddlewareState = Prettify<Omit<MiddlewareState_2, 'elements'> & {
|
|
elements: Elements;
|
|
}>;
|
|
|
|
export declare interface NodeScroll {
|
|
scrollLeft: number;
|
|
scrollTop: number;
|
|
}
|
|
|
|
export { offset }
|
|
|
|
export { OffsetOptions }
|
|
|
|
export { Padding }
|
|
|
|
export { Placement }
|
|
|
|
export declare interface Platform {
|
|
getElementRects: (args: {
|
|
reference: ReferenceElement;
|
|
floating: FloatingElement;
|
|
strategy: Strategy;
|
|
}) => Promisable<ElementRects>;
|
|
getClippingRect: (args: {
|
|
element: Element;
|
|
boundary: Boundary;
|
|
rootBoundary: RootBoundary;
|
|
strategy: Strategy;
|
|
}) => Promisable<Rect>;
|
|
getDimensions: (element: Element) => Promisable<Dimensions>;
|
|
convertOffsetParentRelativeRectToViewportRelativeRect: (args: {
|
|
elements?: Elements;
|
|
rect: Rect;
|
|
offsetParent: Element;
|
|
strategy: Strategy;
|
|
}) => Promisable<Rect>;
|
|
getOffsetParent: (element: Element, polyfill?: (element: HTMLElement) => Element | null) => Promisable<Element | Window>;
|
|
isElement: (value: unknown) => Promisable<boolean>;
|
|
getDocumentElement: (element: Element) => Promisable<HTMLElement>;
|
|
getClientRects: (element: Element) => Promisable<Array<ClientRectObject>>;
|
|
isRTL: (element: Element) => Promisable<boolean>;
|
|
getScale: (element: HTMLElement) => Promisable<{
|
|
x: number;
|
|
y: number;
|
|
}>;
|
|
}
|
|
|
|
export declare const platform: Platform;
|
|
|
|
declare type Prettify<T> = {
|
|
[K in keyof T]: T[K];
|
|
} & {};
|
|
|
|
declare type Promisable<T> = T | Promise<T>;
|
|
|
|
export { Rect }
|
|
|
|
export declare type ReferenceElement = Element | VirtualElement;
|
|
|
|
export { RootBoundary }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const shift: (options?: ShiftOptions | Derivable_2<ShiftOptions>) => Middleware;
|
|
|
|
export declare type ShiftOptions = Prettify<Omit<ShiftOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
|
|
export { Side }
|
|
|
|
export { SideObject }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export declare const size: (options?: SizeOptions | Derivable_2<SizeOptions>) => Middleware;
|
|
|
|
export declare type SizeOptions = Prettify<Omit<SizeOptions_2, 'apply' | 'boundary'> & DetectOverflowOptions & {
|
|
|
|
|
|
|
|
|
|
|
|
apply?(args: MiddlewareState & {
|
|
availableWidth: number;
|
|
availableHeight: number;
|
|
}): Promisable<void>;
|
|
}>;
|
|
|
|
export { Strategy }
|
|
|
|
|
|
|
|
|
|
|
|
export declare interface VirtualElement {
|
|
getBoundingClientRect(): ClientRectObject;
|
|
contextElement?: Element;
|
|
}
|
|
|
|
export { }
|
|
|