/** * Google Fonts download and caching utilities for the BeatUI Tailwind Vite plugin. * * Downloads Google Font CSS and font files at build time, rewrites URLs to * local placeholders, and caches everything under `node_modules/.beatui/` * so that fonts can be self-hosted in production builds. * * @module */ /** * Font style values supported by Google Fonts. */ export type GoogleFontStyle = 'normal' | 'italic'; /** * CSS `font-display` strategy values supported by Google Fonts. */ export type GoogleFontDisplay = 'auto' | 'block' | 'swap' | 'fallback' | 'optional'; export interface GoogleFontRequest { family: string; /** * List of numeric font weights to request from Google Fonts (e.g., [400, 500, 700]). * When omitted, Google Fonts will serve the default variation (usually 400). */ weights?: readonly number[]; /** * Font styles to request. Defaults to ['normal']. */ styles?: readonly GoogleFontStyle[]; /** * Optional font-display strategy to pass to Google Fonts. */ display?: GoogleFontDisplay; /** * Target subsets (e.g., ['latin', 'latin-ext']). */ subsets?: readonly string[]; /** * Optional `text=` filter passed to Google Fonts to trim the character set. */ text?: string; } export interface GoogleFontAsset { url: string; fileName: string; localPath: string; placeholder: string; } export interface GoogleFontPreparationResult { cssText: string; assets: GoogleFontAsset[]; } interface PrepareGoogleFontsOptions { projectRoot: string; requests: readonly GoogleFontRequest[]; cacheDir?: string; logger?: (message: string) => void; } export declare function prepareGoogleFonts(options: PrepareGoogleFontsOptions): Promise; export declare function buildGoogleFontCssUrl(request: GoogleFontRequest): string; export {};