/** * The **Theme History Service** — a bounded undo/redo stack of applied themes. * A linear history with a cursor: pushing after an undo truncates the redo tail * (standard editor semantics). Undoing past the first entry returns `null`, * meaning "revert to the base mode/variant". * * @packageDocumentation */ import type { GeneratedTheme, ThemeHistoryEntry } from '../../types/theme-ai.types'; /** Default maximum number of retained history entries. */ export declare const DEFAULT_THEME_HISTORY_LIMIT = 50; /** Undo/redo/restore stack for applied themes. */ export declare class ThemeHistoryService { private readonly limit; private entries; /** Index of the current entry, or -1 when at the base (no theme). */ private cursor; private seq; constructor(limit?: number); /** Record a newly applied theme as the current state (truncates any redo tail). */ push(theme: GeneratedTheme): void; /** The current theme, or `null` at the base. */ current(): GeneratedTheme | null; /** Step back one entry. Returns the now-current theme, or `null` if it reached the base. */ undo(): GeneratedTheme | null; /** Step forward one entry. Returns the now-current theme, or `null` if already at the newest. */ redo(): GeneratedTheme | null; /** Restore a specific entry by its monotonic index. */ restore(index: number): GeneratedTheme | null; /** Clear the entire history (back to base). */ reset(): void; /** The full history stack, oldest first. */ getAll(): readonly ThemeHistoryEntry[]; } //# sourceMappingURL=theme-history-service.d.ts.map