/** A physical edge of the anchor. */ export type PhysicalSide = 'top' | 'right' | 'bottom' | 'left'; /** Side the floating content is placed against; `start`/`end` are logical and resolve under `dir`. */ export type Side = PhysicalSide | 'start' | 'end'; /** Alignment of the floating element along the chosen {@link Side}. */ export type Align = 'start' | 'center' | 'end'; /** Minimum distance from the collision boundary, for every side or per side. */ export type CollisionPadding = number | Partial>; /** The floating-ui placement string for a resolved side and alignment. */ export declare function toPlacement(side: PhysicalSide, align: Align): string; /** The side and alignment a floating-ui placement string resolved to. */ export declare function placementParts(placement: string): [PhysicalSide, Align]; /** * Writes the four `--skdx--*` measurement properties onto the floating element after a reposition, with the transform origin derived from the resolved side/alignment so a flipped panel grows from the edge it actually sits on. */ export declare function setMeasurementProperties(floating: HTMLElement, component: string, measurements: { availableWidth: number; availableHeight: number; triggerWidth: number; side: PhysicalSide; align: Align; }): void; /** The edge an arrow sits on: opposite the side the panel was placed against. */ export declare const OPPOSITE_SIDE: Record; /** Inline style for an arrow element given floating-ui's arrow offsets and the resolved side. */ export declare function arrowStyle(offsets: { x?: number | undefined; y?: number | undefined; } | undefined, side: PhysicalSide): { position: 'absolute'; left: string; top: string; right: string; bottom: string; transform: string; }; /** Applies {@link arrowStyle} to an arrow element in place. */ export declare function styleArrow(el: HTMLElement, offsets: { x?: number | undefined; y?: number | undefined; } | undefined, side: PhysicalSide): void; /** What the `size` middleware reports after flip/shift settled. */ export interface SizeState { availableWidth: number; availableHeight: number; elements: { floating: HTMLElement; }; rects: { reference: { width: number; }; }; placement: string; } /** The floating-ui middleware factories an adapter injects — `M` is its `Middleware`, `L` its shift limiter, `E` what its `arrow` accepts as the element. */ export interface FloatingMiddleware { offset(options: { mainAxis: number; alignmentAxis: number; }): M; flip(options: { padding: CollisionPadding; boundary?: Element | Element[]; }): M; shift(options: { padding: CollisionPadding; limiter: L; boundary?: Element | Element[]; }): M; limitShift(): L; size(options: { padding: CollisionPadding; boundary?: Element | Element[]; apply(state: SizeState): void; }): M; arrow(options: { element: E; padding: number; }): M; hide(options: { strategy: 'referenceHidden'; boundary?: Element | Element[]; }): M; } /** The options {@link positioningMiddleware} turns into a middleware list. */ export interface PositioningOptions { sideOffset?: number | undefined; alignOffset?: number | undefined; avoidCollisions?: boolean | undefined; collisionPadding?: CollisionPadding | undefined; collisionBoundary?: Element | Element[] | null | undefined; /** Kebab-case component name the measurement properties are written under; omitted, none are written. */ component?: string | undefined; arrow?: E | null | undefined; arrowPadding?: number | undefined; hideWhenDetached?: boolean | undefined; } /** * The one middleware order every panel uses: offset, then flip/shift when collisions are avoided, then `size` (so it measures the placement the content landed on), the arrow, and `hide` last so visibility is judged against the settled placement. */ export declare function positioningMiddleware(fu: FloatingMiddleware, options: PositioningOptions): M[];