import type { TokenTransformed } from '@terrazzo/token-tools'; export declare const FORMAT_ID = "tailwind"; export declare const PLUGIN_NAME = "@terrazzo/plugin-tailwind"; export type ResolverInput = Record; export interface VariableNameContext { token: TokenTransformed; path: string[]; relName: string; } export interface TailwindPluginOptions { /** * Path to a template file. * * @example "tailwind.template.css"; * * @example * ```css * @import "tailwindcss"; * /* Default theme *\/ * @theme { * @tz (theme: "light"); * } * /* Uncomment to change conditions for dark mode *\/ * /* @custom-variant dark ([data-theme="dark"]); *\/ * * /* Dark mode (@see https://tailwindcss.com/docs/dark-mode) *\/ * @variant dark { * @tz (theme: "dark"); * } * * /* Custom variant: light-high-contrast (shortened to "light-hc" in Tailwind) *\/ * @custom-variant light-hc ([data-theme="light-hc"]); * * @variant light-hc { * @tz (theme: "light-high-contrast"); * } * * /* Custom variant: dark-high-contrast (shortened to "dark-hc" in Tailwind) *\/ * @custom-variant dark-hc ([data-theme="dark-hc"]); * * @variant dark-hc { * @tz (theme: "dark-high-contrast"); * } * * /* Custom variant for reduced motion *\/ * @custom-variant reduced-motion (@media (prefers-reduced-motion: reduce)); * * @variant reduced-motion { * @tz (motion: "reduced"); * } * * /* Custom CSS is allowed *\/ * .my-custom-util { * color: red; * } * ``` */ template: string; /** * Filename to output. * @default "tailwind-theme.css" */ filename?: string; /** @see https://tailwindcss.com/docs/theme */ theme: Record; /** Default permutation */ defaultTheme?: ResolverInput; /** * Associate Tailwind custom variants with Resolver permutations * @see https://tailwindcss.com/docs/dark-mode#toggling-dark-mode-manually */ customVariants?: Record; /** Control the final CSS variable name */ variableName?: (defaultName: string, context: VariableNameContext) => string; } /** Flatten an arbitrarily-nested object */ export declare function flattenThemeObj(themeObj: Record): { path: string[]; value: string | string[]; }[]; export declare const FILE_HEADER = "/* -------------------------------------------\n * Autogenerated by \u26CB Terrazzo. DO NOT EDIT!\n * ------------------------------------------- */"; export declare function buildFileHeader(templatePath?: string): string; export interface TzAtRule { start: number; end: number; input: Record; } /** * Parse @tz at-rules in CSS. */ export declare function parseTzAtRules(css: string): TzAtRule[]; /** * Parse an individual @tz at-rule in CSS. * * This algorithm requires 2 passes: * 1. Determine the beginning and end of the expression, accounting for arbitrary whitespace, comments, and even CSS-omittable semicolons * 2. Take the inner body of the at-rule and parse the parameters. */ export declare function parseTzAtRule(css: string): TzAtRule | undefined; //# sourceMappingURL=lib.d.ts.map