/** * Runs a function only if there are no new calls during the delay */ export declare function debounce unknown>(func: T, delay: number, { leading, trailing }?: { leading?: boolean; trailing?: boolean; }): ((...args: Parameters) => void) & { cancel: () => void; }; /** * Throttles a function to ensure it only runs once per threshold */ export declare function throttle void>(fn: T, threshold: number): ((...args: Parameters) => void) & { cancel: () => void; }; /** * Smoothly scrolls to the element with the specified ID without scuffing up your URLs. */ export declare function scrollToAnchor(id: string): Promise; /** * Toggles the body scroll with specified class names and returns a promise * @info Use your own class names, or ensure fixed is within your Tailwindcss JIT */ export declare function toggleBodyScroll(className?: string, action?: 'add' | 'remove' | 'toggle'): Promise; /** * Toggles the element scroll with specified class names and returns a promise */ export declare function toggleElementScroll(element: HTMLElement): Promise; /** * Copies a convereted string to the clipboard */ export declare function copyToClipboard(value: string | number): Promise; /** * Toggles the fullscreen mode */ export declare function toggleFullScreen(): Promise; /** * Resets a form to its initial state */ export declare function resetForm(form: HTMLFormElement): Promise; /** * Focuses on and scrolls to the first invalid input, select, or textarea element within a form. */ export declare function focusOnInvalid(container: HTMLElement): Promise; /** * Focuses on the nth element within the specified form, where 0 is the first element and -1 is the last element. */ export declare function focusOnNth(container: HTMLElement, index?: number): Promise; /** * Sets up a keyboard trap within an HTML element, allowing the focus to cycle between the first and last focusable elements when the Tab key is pressed. */ export declare function focusTrap(container: HTMLElement): void;