import type { AttributifyConfig, BracketSyntaxConfig, ParsedClass } from './types'; /** * Drop the module-level parse caches. Exposed for long-lived hosts that want * to reclaim the memory between builds; correctness never depends on it. */ export declare function clearParseCaches(): void; /** * Split a class on its top-level colons, leaving colons inside `[...]` alone. * * A variant separator and the colon inside an arbitrary property or value look * identical, so a plain `split(':')` would tear `[color:red]` in half. Both the * arbitrary-property branch and the general variant/utility split need this. */ export declare function splitTopLevelColons(className: string): string[]; /** * Expand bracket/grouped syntax into individual class names * e.g., flex[col jc-center ai-center] -> ['flex-col', 'justify-center', 'items-center'] * e.g., text[white 2rem 700] -> ['text-white', 'text-[2rem]', 'font-bold'] * e.g., h[min 100vh] -> ['min-h-[100vh]'] * e.g., hover:flex[col] -> ['hover:flex-col'] * e.g., flex[md:col lg:row] -> ['md:flex-col', 'lg:flex-row'] * e.g., -m[4] or m[-4] -> ['-m-4'] */ export declare function expandBracketSyntax(className: string, config?: BracketSyntaxConfig): string[]; /** * Extract classes from attributify syntax * e.g.,
* Returns classes like: flex, items-center, bg-blue-500, p-4 * * Also supports variant attributes: * e.g.,
* Returns classes like: hover:bg-blue-600, dark:text-white */ export declare function extractAttributifyClasses(content: string, config?: AttributifyConfig): Set; /** * Parses a utility class string into its components * Examples: "p-4" -> {raw: "p-4", variants: [], utility: "p", value: "4", important: false, arbitrary: false} * "hover:bg-blue-500" -> {raw: "hover:bg-blue-500", variants: ["hover"], utility: "bg", value: "blue-500", important: false, arbitrary: false} * "!p-4" -> {raw: "!p-4", variants: [], utility: "p", value: "4", important: true, arbitrary: false} * "w-[100px]" -> {raw: "w-[100px]", variants: [], utility: "w", value: "100px", important: false, arbitrary: true} */ export declare function parseClass(className: string): ParsedClass; /** * Extracts all utility classes from content * Matches class patterns in HTML/JSX attributes and template strings * Supports bracket syntax (e.g., flex[col jc-center]) and attributify mode */ export declare function extractClasses(content: string, options?: ExtractClassesOptions): Set; /** * Options for class extraction */ export declare interface ExtractClassesOptions { attributify?: AttributifyConfig bracketSyntax?: BracketSyntaxConfig codeStrings?: CodeStringsConfig } /** * Extraction from string literals in code, not just from class attributes. * * Utility classes routinely live in code rather than in markup: a helper that * returns a class string, a lookup table of icons keyed by status, a signal * holding the current variant. Attribute-scoped extraction cannot see any of * it, so those classes silently never generate and the element renders * unstyled — with no error, because nothing went wrong as far as the build is * concerned. * * The failure is quiet enough that projects tend to work around it instead of * reporting it: pre-generating a whole icon stylesheet, restating class names * in a dummy attribute, or moving state into `data-` attributes and styling * those instead. All of that goes away if the scanner reads the strings. * * Only *compound* tokens are taken from code — see `isCodeStringCandidate`. */ export declare interface CodeStringsConfig { enabled?: boolean }