import { Atom } from "./atom"; import { Node } from "../common/node"; import { IAtoms, IColorThemes, IColorTheme, EventValueChange, ShadeFilter } from "../interfaces"; import { Shade } from "../common/shade"; import { ShadeGroup } from "../common/shade"; import { PropertyBoolean, PropertySelectableOpts, PropertyStringSelectable, PropertyColorShade, PropertyColorPair } from "../common/props"; export interface BackgroundVariables { primary: Shade; secondary: Shade; colorDrop: Shade; borderColor: Shade; chip: Shade; onChip: Shade; groupButton: Shade; lineColor: Shade; surface: Shade; } export interface ModeShadeGroups { default: ShadeGroup; white: ShadeGroup; black: ShadeGroup; tertiary: ShadeGroup; gradient1: ShadeGroup; gradient2: ShadeGroup; gradient3: ShadeGroup; } export interface ShadeGroups { lm: ModeShadeGroups; dm: ModeShadeGroups; } export interface DarkBGShades { primary: Shade; secondary: Shade; } /** * The color themes atom. * @category Atoms */ export declare class ColorThemes extends Atom implements IColorThemes { readonly atoms: IAtoms; private readonly themes; /** The default theme name property */ readonly defaultTheme: PropertyStringSelectable; constructor(atoms: IAtoms); /** * Create a new color theme. * @param name The name of the theme to create. * @param skipInitDefault If true, do not attempt to set this as the default theme if there is not yet a default theme. * @returns The newly created theme. */ createTheme(name: string, skipInitDefault?: boolean): ColorTheme; private newTheme; /** * Get the names of all themes. * @returns The names of all existing themes. */ getThemeNames(): string[]; /** * Get a theme by name. * @param name The name of the theme to retrieve. * @returns The theme. */ getTheme(name: string): ColorTheme; /** * Get all themes. * @returns All theme objects. */ getThemes(): ColorTheme[]; /** * Get the default theme (if any). * @returns The default theme (if any). */ getDefaultTheme(): ColorTheme | undefined; /** * Get the default theme name (if any). * @returns The default theme name (if any). */ getDefaultThemeName(): string | undefined; /** * Set the default theme. * @param theme The new default theme. */ setDefaultTheme(theme: ColorTheme | undefined): void; serialize(): any; deserialize(obj: any): void; } /** * The color theme. * @category Atoms */ export declare class ColorTheme extends Node implements IColorTheme { static CP_WHITE_OFFWHITE: string; static CP_BLACK_OFFBLACK: string; static CP_HALF_QUARTER: string; static CP_800_900: string; readonly themes: ColorThemes; /** The primary color shade property */ readonly primary: PropertyColorShade; /** The secondary color shade property */ readonly secondary: PropertyColorShade; /** The tertiary color shade property */ readonly tertiary: PropertyColorShade; /** The lightmode background properties */ lightModeBackground: PropertyColorPair; /** The darkmode background properties */ darkModeBackground: PropertyColorPair; /** The gradient1 shade properties */ gradient1: GradientColors; /** The gradient2 shade properties */ gradient2: GradientColors; /** The button shade property */ button: PropertyColorShade; /** The icon shade property */ icon: PropertyColorShade; /** The gradient header text shade property */ gradientHeaderText: GradientColors2; /** The accent shade property */ accent: PropertyColorShade; addTheme: PropertyBoolean; private primary100?; private readonly lname; constructor(name: string, themes: ColorThemes); start(): void; stop(): void; getColorShadeSelectables(filter?: ShadeFilter): Shade[][]; getColorShadeSelectablesByOnHex(onHex: string): Shade[][]; primaryListener(vc: EventValueChange): void; buttonListener(): void; private setPrimary; getDarkBGShades(): DarkBGShades | undefined; findLightModeShade(shade: Shade): Shade; getLightModeShade(shade: Shade): Shade | undefined; findDarkModeShade(shade: Shade): Shade; getDarkModeShade(shade: Shade): Shade | undefined; private secondaryAndTertiaryListener; private backgroundListener; private clearColorDependentProps; getBackgroundVariables(pcp: PropertyColorPair): BackgroundVariables | undefined; getShadeGroups(shade: Shade): ShadeGroups; private getModeShadeGroups; getShadeGroup(shade: Shade, compShade: Shade, lm: boolean, multiplier: number): ShadeGroup; private findDMShade; private getShadeSelections; getElevationShades(lm: boolean): Shade[]; deserialize(obj: any): void; serialize(): any; private getColorPalette; } /** * Gradient colors. * @category Atoms */ export declare class GradientColors { theme: ColorTheme; /** The from color shade for this gradient */ readonly from: PropertyColorShade; /** The to color shade for this gradient */ readonly to: PropertyColorShade; constructor(theme: ColorTheme, prefix: string); notify(event: EventValueChange): void; private fromShadeChange; deserialize(obj: any): void; serialize(): any; } export declare class GradientColors2 { theme: ColorTheme; readonly from: PropertyColorShade; readonly to: PropertyColorShade; constructor(theme: ColorTheme, prefix: string, selOpts: PropertySelectableOpts); deserialize(obj: any): void; serialize(): any; }