import type { AtRule, Declaration, Root, Rule } from "postcss"; /** Parsed comma-separated token with source index boundaries. */ export type CommaSegment = Readonly<{ end: number; start: number; text: string; }>; /** Parsed `@font-face` metadata used by multiple rules. */ export type FontFaceBlock = Readonly<{ atRule: AtRule; displayDecl: Declaration | undefined; familyDecl: Declaration | undefined; familyName: string | undefined; familyNameLower: string | undefined; srcDecl: Declaration | undefined; styleDecl: Declaration | undefined; unicodeRangeDecl: Declaration | undefined; weightDecl: Declaration | undefined; }>; /** Parsed src list item from one `@font-face` src declaration. */ export type FontSrcEntry = Readonly<{ hasFormatHint: boolean; isDataUri: boolean; isLocal: boolean; isUrl: boolean; normalizedFormat: string | undefined; normalizedUrl: string | undefined; raw: string; url: string | undefined; }>; /** Stable key used to identify one face variant for duplicate checks. */ export declare function buildFaceVariantKey(block: Readonly): string; /** Collect `@font-face` blocks with commonly queried declarations. */ export declare function collectFontFaceBlocks(root: Readonly): readonly FontFaceBlock[]; /** Get first declaration by property inside one at-rule. */ export declare function getDecl(atRule: Readonly, prop: string): Declaration | undefined; /** Return normalized format hint or infer it from a URL extension. */ export declare function inferFormatHint(entry: Readonly): string | undefined; /** Return true when a declaration belongs to an `@font-face` block. */ export declare function isInsideFontFace(decl: Readonly): boolean; /** Return true when token is explicitly quoted. */ export declare function isQuoted(value: string): boolean; /** Return true when a family token is generic/system fallback-like. */ export declare function isSystemFallbackFamily(token: string): boolean; /** Normalize one `font-family` token for matching/comparison. */ export declare function normalizeFamilyToken(token: string): string; /** Parse one font-family declaration value into comma-separated names. */ export declare function parseFamilyList(value: string): readonly string[]; /** Parse one `@font-face` src declaration value into structured entries. */ export declare function parseFontSrcEntries(value: string): readonly FontSrcEntry[]; /** Split one CSS comma-list while preserving nested parentheses and quotes. */ export declare function splitCommaList(value: string): readonly CommaSegment[]; /** Remove one layer of single/double quotes from a CSS string token. */ export declare function stripSurroundingQuotes(value: string): string; /** Iterate declaration nodes from regular style rules only. */ export declare function walkNormalRuleDecls(root: Readonly, prop: string, visitor: (decl: Readonly, rule: Readonly) => void): void; //# sourceMappingURL=font-analysis.d.ts.map