/**
 * Lazily load the Crosswind module
 * Returns null if Crosswind is not installed
 */
export declare function loadCrosswind(): Promise<CrosswindModule | null>;
/**
 * Reset the Crosswind module cache (useful for testing)
 */
export declare function resetCssCache(): void;
export declare function resetCrosswindCache(): void;
/**
 * Load crosswind config from the working directory.
 *
 * Uses `bunfig` for resolution so crosswind configs compose the same way as
 * `stx.config.ts` and other stacks configs — a single source of truth for
 * config loading across the stack.
 *
 * Pre-check: we only hand off to bunfig once we've confirmed a
 * `crosswind.config.*` file actually exists in the target directory. When
 * stx is run from a parent repo root (e.g. running an example from the
 * monorepo root, or a page rendered before the app dir is known) bunfig's
 * built-in search would span 250+ paths up the tree and, on miss, log a
 * large stack-style error dump. The file-existence pre-check keeps the
 * common "no config file" case silent and fast.
 */
/**
 * Load the user's crosswind config via bunfig — our shared config loader.
 * bunfig's name-based search already covers `config/crosswind.ts`,
 * `.config/crosswind.ts`, and root-level `crosswind.config.{ts,js,mjs,cjs}`,
 * so we don't need to maintain a parallel list of paths here. Returns `null`
 * when no config file is present, so callers can fall through to defaults
 * without surfacing a "not found" warning to the user.
 */
export declare function loadCrosswindConfig(cwd: string): Promise<CrosswindConfig | null>;
/**
 * Build Crosswind CSS using the build() API
 * This scans content files and generates CSS for all used classes
 */
export declare function buildCrosswindCSS(cwd: string): Promise<string>;
/**
 * Rebuild Crosswind CSS (called on file changes)
 */
export declare function rebuildCrosswindCSS(cwd: string): Promise<void>;
/**
 * Get the cached CSS (for serving)
 */
export declare function getCachedCSS(): string;
/**
 * Extract all CSS class names from HTML content
 */
export declare function extractClassNames(htmlContent: string): Set<string>;
/**
 * Extract utility classes from HTML content and generate CSS using Crosswind
 */
export declare function generateCrosswindCSS(htmlContent: string, appDir?: string): Promise<string>;
/**
 * Inject generated CSS into HTML content
 * Tries to inject before </head>, falls back to <body> or prepends
 */
export declare function injectCrosswindCSS(htmlContent: string, appDir?: string): Promise<string>;
// Type for Crosswind module
declare interface CrosswindModule {
  CSSGenerator: new (config: CrosswindConfig) => CSSGenerator
  config: CrosswindConfig
  build?: (config: CrosswindConfig) => Promise<CrosswindBuildResult>
  defaultConfig?: CrosswindConfig
}
declare interface CrosswindConfig {
  content?: string[]
  output?: string
  preflight?: boolean
  minify?: boolean
  preflights?: unknown[]
  safelist?: string[]
  [key: string]: unknown
}
declare interface CrosswindBuildResult {
  css: string
  classes: Set<string>
  duration: number
}
declare interface CSSGenerator {
  generate(className: string): void
  toCSS(preflight: boolean, minify: boolean): string
}
