
import { UDSCSSOptions } from "./generate.js";

//#region ../css/dist/css/theme.d.mts
//#region src/css/theme.d.ts
type UDSCSSVarSafelistPattern = string | RegExp;
interface UDSCSSPruneVarsOptions {
  /** CSS variable prefixes or patterns to preserve when pruning is enabled */
  safelist?: UDSCSSVarSafelistPattern[];
}
/**
 * Context passed to theme config function
 */
interface UDSThemeContext {
  /** Current working directory */
  cwd: string;
  /** Whether the CLI is running in watch mode */
  watch?: boolean;
}
/**
 * CSS optimization options for uds.theme.ts
 */
interface UDSCSSOptimizationOptions {
  /** Enable all CSS optimizations (default: true) */
  enabled?: boolean;
  /** Remove @font-face declarations for fonts not used in the CSS (default: false) */
  removeUnusedFonts?: boolean;
  /** Remove empty CSS rules (default: true) */
  removeEmptyRules?: boolean;
  /** Aggregate duplicate selectors (default: true) */
  aggregateDuplicateSelectors?: boolean;
  /**
   * Remove duplicate content from scoped CSS that already exists in main CSS (default: true)
   * Currently deduplicates @font-face declarations. Reduces bundle size when scoped packages
   * share fonts with the main app.
   */
  deduplicateScopedCss?: boolean;
  /**
   * Prune unused CSS variables (default: true).
   * Provide an object to keep pruning enabled while safelisting variable prefixes or patterns.
   */
  pruneVars?: boolean | UDSCSSPruneVarsOptions;
}
/**
 * Theme configuration structure for uds.theme.ts
 */
interface UDSThemeConfig {
  /** Path to app's uds.config (relative to project root) */
  config?: string;
  /** Entry directory path or .tsx file path, or a list of those paths (default: './src') */
  entry?: string | string[];
  /** Suppress log output during generation (default: false) */
  silent?: boolean;
  /**
   * Packages that inherit the app's theme configuration.
   * These packages' styles are merged into the main uds.css file.
   */
  inherit?: string[];
  /** Color modes to include (default: ['dark']) - light mode is always in :root */
  colorModes?: ('dark' | 'light')[];
  /** CSS generation options */
  css?: UDSCSSOptions;
  /** Packages that generate their own scoped CSS output files */
  scoped?: Record<string, UDSScopedPackageValue>;
}
interface UDSScopedPackageConfig {
  /** Entry path, file path, or list of paths relative to the package root */
  entry?: string | string[];
  /** Output file path for the generated package CSS (default: dist/<package-name>.css) */
  outFile?: string;
  /** Path to the package-specific uds.config.ts file */
  config: string;
}
type UDSScopedPackageValue = string | UDSScopedPackageConfig;
/**
 * Theme config can be an object or a function that receives context
 */
type UDSThemeConfigInput = UDSThemeConfig | ((ctx: UDSThemeContext) => UDSThemeConfig | Promise<UDSThemeConfig>);
/**
 * Helper function to define theme configuration with full type support.
 * Supports both static config objects and dynamic functions.
 */
declare const defineTheme: (config: UDSThemeConfigInput) => UDSThemeConfigInput; //#endregion
//#endregion
export { type UDSCSSOptimizationOptions, type UDSThemeConfig, type UDSThemeConfigInput, type UDSThemeContext, defineTheme };