import { type RequiredAndNotNull, type Values } from '@augment-vir/common'; import { CSSResult } from 'element-vir'; import { type CssVarName, type SingleCssVarDefinition } from 'lit-css-vars'; import { type RequireAtLeastOne } from 'type-fest'; import { type ColorInit, type ColorInitReference, type ColorInitValue, type ColorThemeInit } from './color-theme-init.js'; /** * Same as {@link ColorInit} but without references. * * @category Internal */ export type NoRefColorInit = RequireAtLeastOne<{ foreground: Exclude; background: Exclude; }>; /** * A defined individual color from a color theme. * * @category Internal */ export type ColorThemeColor = { foreground: SingleCssVarDefinition; background: SingleCssVarDefinition; /** * The name of this theme color within the theme itself. (This is not any of the CSS variable * names.) */ name: Name; init: Init; }; /** * A finalized color theme, output from {@link defineColorTheme}. * * @category Internal */ export type ColorTheme = { colors: AllColorThemeColors; inverse: AllColorThemeColors; /** The original init object for this theme. */ init: { colors: Init; default: Readonly; }; prefix: string; }; /** * All colors within a {@link ColorTheme}. * * @category Internal */ export type AllColorThemeColors = { [ColorName in keyof Init as ColorName extends CssVarName ? ColorName : never]: ColorName extends CssVarName ? Init[ColorName] extends ColorInit ? ColorThemeColor : never : never; } & { [themeDefaultKey]: ColorThemeColor; }; /** @category Internal */ export declare function noRefColorInitToString(init: Values): string; /** * Handles a color init value. * * @category Internal */ export declare function createColorCssVarDefault(fromName: string, init: ColorInitValue, defaultInit: Readonly, colorsInit: ColorThemeInit): string | number | CSSResult; /** * Default theme init for {@link defineColorTheme}. * * @category Internal */ export type DefaultColorThemeInit = RequiredAndNotNull & { prefix: string; }; /** * Default foreground/background color theme used in {@link ColorTheme}. Do not define a theme color * with this name! * * @category Internal */ export declare const themeDefaultKey = "theme-default"; /** * Define a color theme. * * @category Color Theme */ export declare function defineColorTheme(defaultInit: Readonly, allColorsInit: Init): ColorTheme;