import * as React_2 from 'react'; /** * Clear the font cache from localStorage * Useful for forcing a fresh fetch of fonts */ export declare const clearFontCache: () => void; export declare interface FontOption { value: string; label: string; category?: string; variants?: string[]; } /** * FontPicker - A searchable dropdown for selecting Google Fonts * * @example * ```tsx * const [font, setFont] = useState('Inter'); * * * ``` */ export declare function FontPicker({ value, onChange, apiKey, placeholder, searchPlaceholder, noResultsText, loadingText, disabled, className, dropdownWidth, maxFonts, onError, }: FontPickerProps): React_2.JSX.Element; /** * Individual font item in the dropdown list * Loads font on mount for preview using Intersection Observer * Memoized to prevent unnecessary re-renders */ export declare const FontPickerItem: React_2.NamedExoticComponent; export declare interface FontPickerItemProps { font: FontOption; isSelected: boolean; onSelect: () => void; } export declare interface FontPickerProps { /** Currently selected font family */ value?: string; /** Callback when font selection changes */ onChange?: (fontFamily: string) => void; /** Google Fonts API key (required) */ apiKey: string; /** Placeholder text when no font is selected */ placeholder?: string; /** Text shown in search input */ searchPlaceholder?: string; /** Text shown when no fonts match the search */ noResultsText?: string; /** Text shown while fonts are loading */ loadingText?: string; /** Whether the picker is disabled */ disabled?: boolean; /** Additional CSS classes for the trigger button */ className?: string; /** Width of the dropdown (defaults to trigger width) */ dropdownWidth?: number; /** Maximum number of fonts to display (for performance) */ maxFonts?: number; /** Callback when an error occurs fetching fonts */ onError?: (error: Error) => void; } /** * Get cached fonts from localStorage */ export declare const getCachedFonts: () => FontOption[] | null; /** * Load a Google Font stylesheet dynamically */ export declare const loadFont: (fontFamily: string) => void; /** * Save fonts to localStorage cache */ export declare const setCachedFonts: (fonts: FontOption[]) => void; /** * Hook to fetch and manage Google Fonts options * Handles caching, loading state, and font stylesheet loading */ export declare function useFontOptions({ apiKey, maxFonts, onError }: UseFontOptionsProps): UseFontOptionsReturn; export declare interface UseFontOptionsProps { apiKey: string; maxFonts?: number; onError?: (error: Error) => void; } export declare interface UseFontOptionsReturn { fonts: FontOption[]; isLoading: boolean; loadFont: typeof loadFont; } export { }