import { Base } from "./Base.js"; import type { ControlVar } from "./ControlVar.js"; import { InterpolatedVars } from "./InterpolatedVars.js"; /** * Creates a theme class for grouping variables and applying them to elements. */ export declare class Theme | ControlVar> = Record | ControlVar>> extends Base { protected ready: boolean; els: HTMLElement[]; css: Record; value: TValues; options: { escapeChar: string; }; protected _listeners: Record void)[]>; constructor(value: TValues, opts?: Partial["options"]>); setOpts(value?: Partial["options"]>): void; add(value: Record | InterpolatedVars>): void; protected _add(key: string, value: InterpolatedVars | ControlVar): void; remove(key: string): void; set(key: string, value: InterpolatedVars | ControlVar): void; protected notify({ recompute }?: { recompute?: boolean; }): void; on(type: "change", cb: () => void): void; off(type: "change", cb: () => void): void; protected _generateCss(res: Record, key: string, sep: string, value: InterpolatedVars | ControlVar, { remove }?: { remove?: boolean; }): void; /** * The theme can force dependencies to recompute. * * This should not be needed unless you want to recompute based of some external state. * * Please file a bug report otherwise. */ recompute(force?: boolean): void; protected _lastPropertiesSet: string[]; /** * Set css variables on an element. * * Careful that the css properties are prefixed with `--`, otherwise they might conflict with other style properties. * * Can be passed a list of already set properties to remove. Returns a list of properties that were set. */ static setElVariables(el: HTMLElement, css: Record, lastPropertiesSet?: string[]): string[]; /** * Attach to an element and automatically set and update the theme's properties on it. * * If no element is passed, attaches to `document.documentElement`. */ attach(el?: HTMLElement): void; detach(el?: HTMLElement): void; } //# sourceMappingURL=Theme.d.ts.map