import type { CSSVarFunction } from '@vanilla-extract/private'; /** * Utility type that extracts the raw token type from a vanilla-extract theme contract. * This allows you to use the same type structure as the theme contract but with raw values * instead of CSS var functions. * * @example * ```ts * import { overdriveTokens } from './theme.css'; * * type Tokens = TokensFromContract; * * // Now you can use this type for your token objects * const myTokens: Tokens = { * mode: 'light', * body: { * backgroundColour: '#ffffff', * colour: '#000000' * } * // ... rest of the tokens * }; * ``` */ export type TokensFromContract = { [P in keyof T]: T[P] extends CSSVarFunction ? string : T[P] extends Record ? TokensFromContract : T[P]; }; interface ShadedColourProps { colour: string; intensity: number | string | null; direction: 'forward' | 'backward'; isDarkTheme: boolean; transparency?: number | string | null; } export declare const shadedColour: ({ colour, intensity, direction, isDarkTheme, transparency, }: ShadedColourProps) => string; type RGBNumbers = { r: number; g: number; b: number; } | null; export declare const hexToRGB: (hex: string) => RGBNumbers; export declare const rgbStrToRGB: (rgb: string) => RGBNumbers; export declare const getRGBValues: (hexOrRGB: string) => RGBNumbers; export declare const getColourLuminance: (rgb: RGBNumbers) => number; export declare const getContrastRatio: (colour1: string, colour2: string) => number; type AccessibilityLevel = 'AA' | 'AAA'; type AccessibilityTextSize = 'SMALL' | 'LARGE'; export declare const passesAccessibilityContrast: ({ colour1, colour2, level, textSize, }: { colour1: string; colour2: string; level: AccessibilityLevel; textSize: AccessibilityTextSize; }) => boolean; export {}; //# sourceMappingURL=helpers.d.ts.map