import type { Cleanup, SignalOptions } from './types.ts'; interface VisibilityOptions extends SignalOptions { threshold?: number | number[]; root?: Element | null; rootMargin?: string; once?: boolean; } interface ResizeOptions extends SignalOptions { box?: ResizeObserverBoxOptions; } /** * Observes an element's visibility via IntersectionObserver. * * Returns a cleanup function that disconnects the observer. * * @example * * const stop = watchVisibility(img, (entry) => { * * if (entry.isIntersecting) loadImage(img); * }, { threshold: 0.5, once: true }); */ export declare function watchVisibility(el: Element, cb: (entry: IntersectionObserverEntry) => void, opts?: VisibilityOptions): Cleanup; /** * Observes an element's size via ResizeObserver. * * Returns a cleanup function that disconnects the observer. * * @example * * const stop = watchResize(panel, (entry) => { * * const { width } = entry.contentRect; * if (width < 400) compact(panel); * }); */ export declare function watchResize(el: Element, cb: (entry: ResizeObserverEntry) => void, opts?: ResizeOptions): Cleanup; export {};