UNPKG

preact-spatial-navigation

Version:

A powerful Preact library for TV-style spatial navigation with LRUD algorithm, virtualized lists/grids, and smart TV support

29 lines 906 B
/** * Generate a unique section ID */ export declare function generateSectionId(prefix?: string): string; /** * Check if an element is currently focused */ export declare function isElementFocused(element: HTMLElement | null): boolean; /** * Safely focus an element */ export declare function focusElement(element: HTMLElement | null): void; /** * Safely blur an element */ export declare function blurElement(element: HTMLElement | null): void; /** * Add a class to an element */ export declare function addClass(element: HTMLElement | null, className: string): void; /** * Remove a class from an element */ export declare function removeClass(element: HTMLElement | null, className: string): void; /** * Debounce a function */ export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void; //# sourceMappingURL=helpers.d.ts.map