/** * The single source of truth for the CSS custom property name a design token is output as by `tokens build`. * * Both the Style Dictionary build and the Figma plugin (which sets the WEB code syntax on variables) derive * names from this module, so the two can not drift apart. `css-variables.test.ts` asserts that the names this * module produces for the generated tokens are exactly the `--ds-*` properties present in the built CSS. */ export declare const CSS_VARIABLE_PREFIX = "ds"; export type CssVariableNameOptions = { /** * Name the token as it is output inside a `[data-color=""]` scope, where the color name is left out: * `color.accent.background-default` becomes `--ds-color-background-default` instead of * `--ds-color-accent-background-default`. Only meaningful for `semantic/style` color tokens. */ colorScoped?: boolean; }; /** * Joins name segments the way Style Dictionary's `name/kebab` transform does, so `_size`, `2xl` and `fontSize` * come out as `size`, `2xl` and `font-size`. See `kebab-case.test.ts` for the parity cases. */ export declare const toCssVariableSegments: (segments: readonly string[]) => string; /** * The CSS custom property `tokens build` outputs for a token, e.g. `--ds-border-radius-sm`, or `null` when the * token is never output as its own property (referenced primitives, theme color scales, inlined sizes, ...). * * @param path The token path within its set, e.g. `['color', 'accent', 'background-default']`. * @param tokenSet The set the token belongs to, e.g. `semantic/style`, or the Style Dictionary `filePath`. */ export declare function cssVariableName(path: readonly string[], tokenSet: string, { colorScoped }?: CssVariableNameOptions): string | null;