import type { BrandKitToken, BrandKitTokenType } from "./types.js"; export declare const MAX_BRAND_KIT_TOKENS = 500; export declare function isSafeCssVarName(value: string): boolean; export declare function isSafeCssTokenValue(value: string): boolean; export declare function isColorTokenValue(value: string): boolean; /** * Bucket a token, trusting the value's shape over the name's keywords. * * Name-first classification called Primer's `--text-body-size-medium: 1rem` a * color because the name contains "text", which then rendered a swatch with * `background: 1rem`. A dimension is never a color however the token is named. */ export declare function classifyBrandKitToken(name: string, value: string): BrandKitTokenType; export declare function friendlyTokenName(cssVar: string): string; export type BrandKitTokenRejectionReason = "malformed" | "unsafe-css-var" | "unsafe-value" | "over-limit"; export interface BrandKitTokenRejection { reason: BrandKitTokenRejectionReason; label: string; } export interface NormalizedBrandKitTokens { tokens: BrandKitToken[]; /** * Entries that could not be stored. Callers must surface these - a kit that * silently kept 4 of 40 tokens reads downstream as a 4-token design system. */ rejected: BrandKitTokenRejection[]; } export declare function normalizeBrandKitTokens(input: unknown): NormalizedBrandKitTokens; export declare function describeBrandKitTokenRejections(rejected: readonly BrandKitTokenRejection[]): string; export declare function brandKitRoleTokens(data: { colors?: object | null; borders?: { radius?: string; } | null; spacing?: object | null; } | null | undefined, source?: string): BrandKitToken[]; export declare function parseBrandKitTokensFromCss(css: string, source?: string): BrandKitToken[]; export declare function resolveBrandKitTokens(data: { tokens?: unknown; customCSS?: unknown; } | null | undefined, cssSource?: string): BrandKitToken[]; export interface BrandKitTokenGroup { label: string; type: BrandKitTokenType; tokens: BrandKitToken[]; } export declare function groupBrandKitTokens(tokens: readonly BrandKitToken[]): BrandKitTokenGroup[];