@sc4rfurryx/proteusjs
Version:
The Modern Web Development Framework for Accessible, Responsive, and High-Performance Applications. Intelligent container queries, fluid typography, WCAG compliance, and performance optimization.
31 lines (29 loc) • 833 B
TypeScript
/**
* @sc4rfurryx/proteusjs/anchor
* CSS Anchor Positioning utilities with robust JS fallback
*
* @version 2.0.0
* @author sc4rfurry
* @license MIT
*/
interface TetherOptions {
anchor: Element | string;
placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
align?: 'start' | 'center' | 'end';
offset?: number;
strategy?: 'absolute' | 'fixed';
}
interface TetherController {
update(): void;
destroy(): void;
}
/**
* Declarative tethers (tooltips, callouts) via CSS Anchor Positioning when available;
* robust JS fallback with flip/collision detection
*/
declare function tether(floating: Element | string, opts: TetherOptions): TetherController;
declare const _default: {
tether: typeof tether;
};
export { _default as default, tether };
export type { TetherController, TetherOptions };