import { T as ThemeVars, a as ThemeConfig } from './registry-GVSJPmus.js'; export { A as AlphaColors, B as BuiltInThemeName, f as ColorPalette, C as ColorScale, G as GrayScale, j as RadiiConfig, R as RegisterThemeOptions, S as SpacingConfig, c as ThemeInput, k as TypographyConfig, W as WebKitThemeName, b as WebKitThemeRef, l as defaultColors, m as defaultRadii, n as defaultSpacing, o as defaultTypography, g as getTheme, e as getThemeNames, h as hasTheme, d as isThemeConfig, i as isThemeRef, r as registerTheme, t as themeRef } from './registry-GVSJPmus.js'; /** * Default ease UI kit CSS variables (--ease-*). * These are component-level design tokens that components consume. */ declare const defaultEaseVars: ThemeVars; /** * The complete default (dark) theme configuration. * Includes colors, radii, spacing, typography, and component-level --ease-* vars. */ declare const defaultThemeConfig: ThemeConfig; /** * Default built-in theme name. */ declare const DEFAULT_THEME_NAME: "default"; /** * Legacy alias for the built-in dark theme. */ declare const DARK_THEME_ALIAS: "dark"; /** * Create a CSS string from theme configuration * * @param config - Theme configuration object * @param selector - CSS selector to apply variables to (default: ':root') * @returns CSS string with variables * * @example * ```typescript * const css = createTheme({ * colors: { * blue: { 500: '#3b82f6' } * } * }); * // Returns: ':root { --color-blue-500: #3b82f6; }' * ``` */ declare const createTheme: (config: ThemeConfig, selector?: string) => string; /** * Apply theme configuration to an element (default: document root) * * @param config - Theme configuration object * @param element - Target element (default: document.documentElement) * * @example * ```typescript * // Apply to document root * defineTheme({ * colors: { * blue: { 500: '#3b82f6' } * } * }); * * // Apply to specific element * defineTheme({ colors: { gray: { 900: '#111' } } }, myElement); * ``` */ declare const defineTheme: (config: ThemeConfig, element?: HTMLElement | null) => void; /** * Remove theme configuration from an element * * @param config - Theme configuration object (to know which variables to remove) * @param element - Target element (default: document.documentElement) */ declare const removeTheme: (config: ThemeConfig, element?: HTMLElement | null) => void; /** * Get the current value of a CSS theme variable * * @param token - Variable name (with or without '--' prefix) * @param element - Element to read from (default: document.documentElement) * @returns The computed value or empty string if not found * * @example * ```typescript * const blue500 = getThemeValue('color-blue-500'); * const radius = getThemeValue('--radii-md'); * ``` */ declare const getThemeValue: (token: string, element?: HTMLElement | null) => string; /** * Set a single theme variable * * @param token - Variable name (with or without '--' prefix) * @param value - Value to set * @param element - Target element (default: document.documentElement) * * @example * ```typescript * setThemeValue('color-blue-500', '#3b82f6'); * ``` */ declare const setThemeValue: (token: string, value: string, element?: HTMLElement | null) => void; type SystemThemeMode = 'dark' | 'light'; /** Attribute used for CSS-based theme switching */ declare const EASE_THEME_ATTRIBUTE = "data-ease-theme"; /** * Merge a theme with the library defaults (dark baseline). * Use this when you want to start from the built-in design tokens and override a few values. */ declare const mergeTheme: (overrides?: ThemeConfig) => ThemeConfig; /** * Alias for `mergeTheme()`. * This package ships a dark baseline theme; light/custom themes should be provided by the consumer. */ declare const createDarkTheme: (overrides?: ThemeConfig) => ThemeConfig; interface SetThemeNameOptions { /** Target element (defaults to `document.documentElement` in the browser). */ element?: HTMLElement | null; /** Attribute name to set (defaults to `data-ease-theme`). */ attribute?: string; /** Optional `color-scheme` value to set on the target element. */ colorScheme?: SystemThemeMode; /** Set `element.style.colorScheme` (default: true when `colorScheme` is provided). */ setColorScheme?: boolean; } /** * Set the active theme name on an element via `[data-ease-theme=""]`. * Useful for CSS-scoped themes. */ declare const setThemeName: (name: string, options?: SetThemeNameOptions) => void; declare const getThemeName: (element?: HTMLElement | null, attribute?: string) => string | null; interface ApplyThemeOptions { /** Target element (defaults to `document.documentElement` in the browser). */ element?: HTMLElement | null; /** Optional theme name to set as `[data-ease-theme=""]`. */ name?: string; /** Attribute name to use when `name` is provided. Defaults to `data-ease-theme`. */ attribute?: string; /** Optional `color-scheme` value to set on the target element. */ colorScheme?: SystemThemeMode; /** Set `[data-ease-theme]` when `name` is provided (default: true). */ setAttribute?: boolean; /** Set `element.style.colorScheme` when `colorScheme` is provided (default: true). */ setColorScheme?: boolean; /** * If true, the provided theme is first merged with the library defaults via `mergeTheme()`. * Use this when you only pass partial overrides. */ mergeWithDefaults?: boolean; } /** * Apply a theme config (and optional theme name + color-scheme) to an element. * This is SSR-safe: it becomes a no-op when `document` is not available. */ declare const applyTheme: (theme: ThemeConfig, options?: ApplyThemeOptions) => ThemeConfig; declare const getSystemThemeMode: () => SystemThemeMode; interface FollowSystemThemeOptions extends Omit { /** Theme name for dark mode (default: 'dark'). */ darkName?: string; /** Theme name for light mode (default: 'light'). */ lightName?: string; } /** * Follow `prefers-color-scheme` and apply the provided themes. * * This package does NOT ship a light theme preset; you supply both themes. * Returns a cleanup function to remove the media query listener. */ declare const followSystemTheme: (themes: { dark: ThemeConfig; light: ThemeConfig; }, options?: FollowSystemThemeOptions) => (() => void); export { type ApplyThemeOptions, DARK_THEME_ALIAS, DEFAULT_THEME_NAME, EASE_THEME_ATTRIBUTE, type FollowSystemThemeOptions, type SetThemeNameOptions, type SystemThemeMode, ThemeConfig, ThemeVars, applyTheme, createDarkTheme, createTheme, defaultEaseVars, defaultThemeConfig, defineTheme, followSystemTheme, getSystemThemeMode, getThemeName, getThemeValue, mergeTheme, removeTheme, setThemeName, setThemeValue };