type ShapeId = "bloom" | "silk" | "flare" | "nova" | "void" | "jade"; type AvatarAppearance = "light" | "dark"; type PaletteToken = "base" | "lobe" | "accent" | "pale" | "light" | "warm" | "cool" | "dark" | "beam"; type PaletteColors = Record; interface ShapePreset { id: ShapeId; name: string; description: string; } interface PalettePreset { id: string; name: string; colors: PaletteColors; } interface ToneOptions { /** * Absolute main hue in OKLCH degrees. When omitted, the palette accent hue is used. */ hue?: number; /** * Relative chroma scale from 0 to 1. 1 keeps the preset Cr, 0 removes chroma. */ chroma?: number; /** * OKLCH lightness delta. 0 keeps the preset, 0.08 brightens, -0.08 darkens. */ lightness?: number; } interface AvatarOptions { shape?: ShapeId; palette?: string | PalettePreset | PaletteColors; tone?: ToneOptions; /** * Palette appearance. Dark mode starts from the Figma dark anchors for * each shape, then applies the selected palette's OKLCH token deltas. */ appearance?: AvatarAppearance; variantId?: string; drift?: number; size?: number; background?: string | null; title?: string; } interface AvatarResult { shape: ShapePreset; palette: PalettePreset; colors: PaletteColors; /** Nine fixed paint/effect slots used by this shape in both appearances. */ usedColors: readonly string[]; appearance: AvatarAppearance; size: number; svg: string; toSvg(): string; toDataUri(): string; } export type { AvatarOptions as A, PalettePreset as P, ShapeId as S, ToneOptions as T, AvatarResult as a, PaletteColors as b, ShapePreset as c, PaletteToken as d, AvatarAppearance as e };