import type { Recursive } from './shared' export interface Token { value: Value description?: string type?: string deprecated?: boolean | string extensions?: { [key: string]: any } } type RecursiveToken = | V | { [K in C]: RecursiveToken } export interface SemanticToken extends Token> {} /* ----------------------------------------------------------------------------- * Token data types * -----------------------------------------------------------------------------*/ type BorderStyle = | 'dashed' | 'dotted' | 'double' | 'groove' | 'hidden' | 'inset' | 'none' | 'outset' | 'ridge' | 'solid' export interface Border { color: string width: string | number style: BorderStyle } export interface Shadow { offsetX: number | string offsetY: number | string blur: number | string spread: number | string color: string inset?: boolean } export interface Gradient { type: 'linear' | 'radial' /** A keyword (`to right`, `circle at center`) or an angle in degrees. */ placement: string | number stops: | Array<{ color: string /** Distance along the gradient, as a percentage (`0` to `100`). */ position: number }> | Array } export interface Asset { type: 'url' | 'svg' value: string } export interface TokenDataTypes { cursor: string zIndex: string | number opacity: string | number colors: string fonts: string | string[] fontSizes: string fontWeights: string | number lineHeights: string | number letterSpacings: string sizes: string shadows: Shadow | Shadow[] | string | string[] spacing: string | number radii: string borders: string | Border durations: string easings: string | number[] animations: string blurs: string gradients: string | Gradient assets: string | Asset borderWidths: string aspectRatios: string containerNames: string } export type Tokens = { [key in keyof TokenDataTypes]?: Recursive> } export type SemanticTokens = { [key in keyof TokenDataTypes]?: Recursive> } export type TokenCategory = keyof TokenDataTypes