import { SurfaceGrayAnalysis } from '../utils/color.js'; import { ValidationResult, ValidationWarning } from '../utils/result.js'; import { ThemeVariant } from '../utils/types.js'; export type WarningSeverity = "warning" | "info"; /** * A palette validation warning. * Extends ValidationWarning with palette-specific fields. */ export interface PaletteWarning extends ValidationWarning { /** Which parameter the warning is about (mapped to field for compatibility) */ field: "surface" | "gray" | "contrast"; } /** * Metadata for palette validation results. */ export interface PaletteValidationMetadata { /** Raw analysis data from Sass */ analysis: SurfaceGrayAnalysis; } /** * Result of palette color validation. * Uses ValidationResult with palette-specific metadata. */ export interface PaletteValidationResult extends ValidationResult { /** Override warnings to use PaletteWarning type */ warnings: PaletteWarning[]; /** Raw analysis data (alias for metadata.analysis for backward compatibility) */ analysis: SurfaceGrayAnalysis; } /** * Input parameters for palette validation. */ export interface ValidatePaletteColorsInput { /** Theme variant (light or dark) */ variant: ThemeVariant; /** Surface/background color */ surface?: string; /** Gray base color */ gray?: string; /** Minimum contrast ratio (default: 3) */ minimumContrastRatio?: number; } /** * Validate surface and gray colors against the theme variant. * * Rules: * - Light variant: surface should be light (luminance > 0.5), gray should be dark (luminance <= 0.5) * - Dark variant: surface should be dark (luminance <= 0.5), gray should be light (luminance > 0.5) * * The gray logic is inverted because the Sass palette() function generates gray shades * that contrast against the surface. * * @param input - Validation input parameters * @returns Validation result with warnings and tips */ export declare function validatePaletteColors(input: ValidatePaletteColorsInput): Promise; /** * Validate that every provided color input is a color Sass can parse. * * The input schemas only check the general shape of a color (so a word like * `notacolor` passes as a "named color"); this catches values that would make * the generated code fail to compile. Undefined entries are skipped. */ export declare function validateColorInputs(colors: Record): Promise; /** * Build an `isError` tool response for invalid color inputs. */ export declare function invalidColorsResponse(result: ValidationResult): { content: { type: "text"; text: string; }[]; isError: boolean; }; /** * Format validation result as markdown for display. * * @param result - Validation result to format * @returns Markdown string with warnings and tips */ export declare function formatValidationResult(result: PaletteValidationResult): string; /** * Generate Sass comment warnings for code generation. * * @param result - Validation result * @returns Array of Sass comment lines */ export declare function generateWarningComments(result: PaletteValidationResult): string[];