import type { DomicileHost, DomicileTheme } from "../domicile-host"; import type { On } from "./subscribe"; export type ThemeListeners = { /** {@link Theme.current} changed. */ change: () => void; /** {@link Theme.windows} changed: the windows have turned. */ windowschange: () => void; }; export type Theme = { /** `undefined` until the compositor says. */ readonly current: DomicileTheme | undefined; /** The theme the windows have turned to; see {@link Theme.captured}. */ readonly windows: DomicileTheme | undefined; /** Turn the desk; answered with `change` to every page, this one included. */ set: (theme: DomicileTheme) => void; /** * The page's old frame is held for `theme`: turn the windows now. Called * from inside a shell's wipe; answered with `windowschange`. */ captured: (theme: DomicileTheme) => void; on: On; }; export type ThemeHost = Pick; export declare const theme: (host: ThemeHost) => Theme;