import { Theme } from './types';
export declare const THEME_LS_KEY = "cm-theme-v1";
export declare function loadTheme(): Theme;
export declare function saveTheme(theme: Theme): void;
/**
 * Resolve a `Theme` into CSS variables + `data-*` attributes on `:root`.
 *
 * Returns silently in non-DOM environments (SSR-safe). Always emits a
 * `cm:theme-change` CustomEvent on `document` after applying.
 */
export declare function applyTheme(theme: Theme): void;
export declare function getTheme(): Theme;
export declare function setThemePartial(patch: Partial<Theme>): Theme;
export declare function setThemeFull(theme: Theme): Theme;
export declare function findActivePresetId(theme: Theme): string;
export declare function resetTheme(): Theme;
/**
 * Apply the persisted theme to `:root` and install a MutationObserver that
 * keeps the in-memory cache in sync if some other code path flips
 * `data-theme` directly (e.g. legacy `ThemeSwitcher` / URL handlers).
 *
 * Must be called explicitly by the host app — the engine no longer
 * auto-applies on import so it does not clobber a host's existing theme.
 *
 * Idempotent — calling it twice is a no-op.
 */
export declare function bootstrapTheme(): void;
/**
 * Tear down the bootstrap-installed observer. Mostly useful for tests.
 */
export declare function teardownTheme(): void;
/** @internal Reset the in-memory cache. Mostly useful for tests. */
export declare function _resetCache(): void;
//# sourceMappingURL=engine.d.ts.map