/** * CSS-compatible cubic timing curves: y at a given x on the (0,0)–(1,1) cubic Bézier. * Control points use the same x1,y1,x2,y2 as `cubic-bezier()` in CSS. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function */ type EasingOption = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | { type: "cubic-bezier"; x1: number; y1: number; x2: number; y2: number; }; /** CSS keyword easings (dropdowns / palette options). */ declare const EASING_KEYWORDS: readonly ["linear", "ease", "ease-in", "ease-out", "ease-in-out"]; type EasingKeyword = (typeof EASING_KEYWORDS)[number]; /** * y(x) for a CSS cubic timing function (Bézier from (0,0) to (1,1)). * `linear` is handled by callers (identity); this throws or should not be called for pure linear * in the [0,0,1,1] case if we use fast path. For [0,0,1,1], y=x. */ declare function cubicBezierYAtX(x: number, x1: number, y1: number, x2: number, y2: number): number; declare function resolveEasingControlPoints(easing: EasingOption): readonly [number, number, number, number]; /** * f(t) = t for linear; else cubic-bezier y at x = t. */ declare function evaluateEasingY(t: number, easing: EasingOption): number; /** * Warps the effective progress: weight = f(t) / t (t > 0). For linear, 1. */ declare function easingWeightAtT(t: number, easing: EasingOption): number; declare function cubicBezier(x1: number, y1: number, x2: number, y2: number): EasingOption; type HexColor = `#${string}`; type Step = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950; type Ramp = Record; type BrandArray = [HexColor] | [HexColor, HexColor] | [HexColor, HexColor, HexColor] | [HexColor, HexColor, HexColor, HexColor]; /** Length of a BrandArray (1–4). */ type BrandCount = 1 | 2 | 3 | 4; type PerMode = { light?: T; dark?: T; }; type SchemeKind = "monochromatic" | "adjacent" | "adjacent+complementary" | "triad" | "tetrad"; interface SchemeInput { base: HexColor | PerMode; kind: SchemeKind; count?: 1 | 2 | 3 | 4; spreadDegrees?: number; secondaryChromaScale?: number; } type CvdType = "protanopia" | "deuteranopia" | "tritanopia"; type PaletteInput = { brand: BrandArray | PerMode; background?: HexColor | PerMode; foreground?: HexColor | PerMode; scheme?: never; } | { scheme: SchemeInput; background?: HexColor | PerMode; foreground?: HexColor | PerMode; brand?: never; }; interface PaletteOptions { brandTint?: boolean; neonChromaRolloff?: boolean; /** Scales L offsets from the 500 step (1 = current behavior with linear easing). */ stepDepth?: number; /** Easing on ramp legs (50–500 and 500–950); "linear" = no warp. */ easing?: EasingOption; cvdVariants?: CvdType[]; version?: string; } interface SemanticTokens { background: HexColor; foreground: HexColor; card: HexColor; "card-foreground": HexColor; muted: HexColor; "muted-foreground": HexColor; border: HexColor; input: HexColor; ring: HexColor; primary: HexColor; "primary-foreground": HexColor; secondary: HexColor; "secondary-foreground": HexColor; accent: HexColor; "accent-foreground": HexColor; } declare const SEMANTIC_KEYS: readonly ["background", "foreground", "card", "card-foreground", "muted", "muted-foreground", "border", "input", "ring", "primary", "primary-foreground", "secondary", "secondary-foreground", "accent", "accent-foreground"]; interface ModePalette { ramps: { brand1: Ramp; brand2?: Ramp; brand3?: Ramp; brand4?: Ramp; neutral: Ramp; gray: Ramp; }; semantic: SemanticTokens; meta: { warnings: string[]; gamutClampsApplied: number; }; } declare const RAMP_NAMES: readonly ["brand1", "brand2", "brand3", "brand4", "neutral"]; interface PaletteVariant { kind: "cvd"; type: CvdType; modes: { light: ModePalette; dark: ModePalette; }; meta: { notes: string[]; }; } interface PaletteConfig { version: string; inputs: { brand: { light: BrandArray; dark: BrandArray; }; background: { light?: HexColor; dark?: HexColor; }; foreground: { light?: HexColor; dark?: HexColor; }; optionsUsed: Required>; schemeUsed?: { light: { kind: SchemeKind; base: HexColor; count: 1 | 2 | 3 | 4; spreadDegrees?: number; secondaryChromaScale?: number; }; dark: { kind: SchemeKind; base: HexColor; count: 1 | 2 | 3 | 4; spreadDegrees?: number; secondaryChromaScale?: number; }; }; }; modes: { light: ModePalette; dark: ModePalette; }; variants?: Record; } export { type BrandArray as B, type CvdType as C, type EasingKeyword as E, type HexColor as H, type ModePalette as M, type PaletteConfig as P, type Ramp as R, type SchemeKind as S, type PaletteInput as a, type PaletteOptions as b, type SemanticTokens as c, type EasingOption as d, type Step as e, type BrandCount as f, EASING_KEYWORDS as g, type PaletteVariant as h, type PerMode as i, RAMP_NAMES as j, SEMANTIC_KEYS as k, type SchemeInput as l, cubicBezier as m, cubicBezierYAtX as n, easingWeightAtT as o, evaluateEasingY as p, resolveEasingControlPoints as r };