/** * @fileoverview StyleManager — style preset and display settings management. * Encapsulates active preset tracking, display toggles, and the * module-level LEVEL_STYLES variable. * * Wired into Logger.ts in F4. Logger delegates style queries and theme * changes through this bridge so that the module-level LEVEL_STYLES stay * in sync across the module. */ import { THEME_PRESETS } from '../styling/index.js'; import type { ThemeVariant } from '../types/index.js'; export { StyleBuilder } from '../styling/index.js'; /** * Display visibility settings. */ export interface DisplaySettings { showTimestamp: boolean; showLocation: boolean; showBadges: boolean; } /** * Active preset state tracked by StyleManager. */ export interface PresetState { /** The resolved style config (LEVEL_STYLES). */ styles: typeof THEME_PRESETS.default; /** The active smart-preset config (if any). */ activePreset: unknown; /** Name of the active smart-preset (if any). */ activePresetName: string | undefined; /** Last-applied customize() overrides. */ customization: unknown; /** Display visibility settings. */ displaySettings: DisplaySettings; } /** * Options for creating StyleManager. */ export interface IStyleManagerOptions { /** Initial display settings. */ initialDisplaySettings?: Partial; } /** * StyleManager - manages style presets and display settings. */ export interface StyleManager { /** Returns current display settings. */ getDisplaySettings(): DisplaySettings; /** Applies a smart preset by name. Returns true if applied. */ applyPreset(name: string): boolean; /** Lists all available presets. */ getAvailablePresets(): string[]; /** Gets the current LEVEL_STYLES. */ getStyles(): typeof THEME_PRESETS.default; /** Gets the active smart-preset config. */ getActivePreset(): unknown; /** Gets the active smart-preset name. */ getActivePresetName(): string | undefined; /** Gets the active customization overrides. */ getCustomization(): unknown; /** Stores customization overrides. */ setCustomization(overrides: unknown): void; /** Resolves the effective styles for a theme variant. */ resolveThemeStyle(theme: ThemeVariant): typeof THEME_PRESETS.default; /** Sets the active theme by name, updating the module-level LEVEL_STYLES. */ setTheme(theme: ThemeVariant): boolean; /** Resets LEVEL_STYLES to the default preset. */ resetStyles(): void; } /** * Creates a StyleManager instance. */ export declare function createStyleManager(options?: IStyleManagerOptions): StyleManager; /** * Module-level active styles — shared across all Logger instances. * Exported so Logger can reference it directly. */ export declare let LEVEL_STYLES: typeof THEME_PRESETS.default; /** * Resets LEVEL_STYLES to default. */ export declare function resetStyles(): void; //# sourceMappingURL=StyleManager.d.ts.map