import { WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme'; /** The catalogue categories, each with its own fallback stack. */ export type FontCategory = "Display" | "Handwriting" | "Monospace" | "Sans Serif" | "Serif"; export interface FontCatalogueEntry { category: FontCategory; /** The weights the family publishes; requesting one it lacks fails the whole font request. */ weights: number[]; } /** * Generic stacks a browser can render without a network request, so a family that fails to load * degrades to a face of the same flavour rather than to the default serif. */ export declare const CATEGORY_FALLBACKS: Record; /** * CSS generic families and CSS-wide keywords. A font value that is one of these names no family at * all, so it is neither fetchable nor quotable: quoting it would make the browser look for a family * literally called `serif`. Kept lowercase because family names are case-insensitive in CSS. */ export declare const GENERIC_FONT_KEYWORDS: ReadonlySet; /** The families the admin font picker offers, in the picker's own order. */ export declare const FONT_CATALOGUE: Record; /** Whether a family resolves without a network request. Family names are case-insensitive in CSS. */ export declare const isSystemFont: (family: string) => boolean; /** * The catalogue's own spelling of a family. CSS matches family names case-insensitively, but the * Google Fonts css2 endpoint does not — it rejects `figtree` outright — so a host's casing is * resolved to the catalogue's before anything is requested. */ export declare const catalogueFamilyName: (family: string) => string | undefined; /** * The Google Fonts stylesheet for a family, asking for exactly the weights it publishes — the * css2 endpoint rejects the whole request when it names a weight the family lacks, and several * curated families publish fewer than the usual 400/500/600/700. A family outside the catalogue * has no known weight list, so it is requested without a weight axis at all. */ export declare const googleFontStylesheetHref: (family: string) => string; /** The faces a variant's own token block names: its text face, and its mono face where it has one. */ export interface VariantFamilies { body: string; mono?: string; } /** The families each variant's own token block names, used when a theme names none of its own. */ export declare const VARIANT_DEFAULT_FAMILIES: Record; /** * The faces to fetch for a variant. A variant name the build does not know still reaches here — a * theme served by a newer admin, or a hand-written element attribute — and takes the default * variant's faces, which are the ones its token block falls back to as well. */ export declare const variantFamilies: (variant: string | undefined) => VariantFamilies; /** * Requests a family's stylesheet at most once per page. The link is inserted for print only and * promoted to every medium once it has loaded, so a slow or unreachable font origin never holds * first paint. A request that fails leaves nothing behind and is never retried — the theme's * fallback stack carries the text, and a second attempt would spend the same latency again. */ export declare function ensureFontStylesheet(family: string): void; /** Test-only seam: forgets which families were requested. Never exported from the package entry. */ export declare function resetFontLoaderCache(): void;