import type { FontCategory, FontFamily, FontId, FontStyle, FontSubset, FontType, FontVersion, FontWeight, } from '@/fontsource/directory' type LooseString = T | (string & {}) type LooseNumber = T | (number & {}) export type FontDelivery = 'cdn' | 'local' export type FontVariableAxes = { wght?: number | [number, number] wdth?: number | [number, number] slnt?: number | [number, number] ital?: 0 | 1 [axis: string]: number | [number, number] | undefined } type FontConfigBase = { name: LooseString subsets?: Array> version?: LooseString | 'latest' category?: LooseString type?: LooseString delivery?: FontDelivery token?: string } export type FontConfigStatic = FontConfigBase & { variable?: false weights?: Array> styles?: Array> variableAxes?: never } export type FontConfigVariable = FontConfigBase & { variable: true variableAxes?: FontVariableAxes weights?: never styles?: never } export type FontConfig = FontConfigStatic | FontConfigVariable