import { ReadonlySignal, Signal } from '@preact/signals-core'; import { Block, BlockInstance } from './block'; export type ThemeSurface = "page" | "overlay"; export type GlobalStyleColors = { accent: string; secondary: string; tint: string; callout: string; success: string; error: string; information: string; warning: string; background: string; }; export type ThemeType = "neutral" | "warm" | "cold"; export type GlobalStyles = { volume: "compact" | "comfort" | "spacious"; style: "bare" | "ghost" | "tinted" | "solid" | "layered"; corners: "sharp" | "soft" | "round" | "pill"; buttonCorners: "sharp" | "round" | "circle"; thumbnailCorners: "sharp" | "round" | "circle"; theme: "preset" | "custom"; themeType: ThemeType; colors: GlobalStyleColors; }; export declare const DEFAULT_GLOBAL_STYLES: GlobalStyles; export type ThemeSurfaceState = { blocks: Signal; }; export type TranslationMode = "override" | "default"; export type TranslationScope = { kind: "theme"; } | { kind: "block"; blockId: string; }; export type TranslationOverride = { locale: string; key: string; value: string; scope: TranslationScope; }; export type TranslationCatalogs = { theme: { defaults: Record; overrides: Record; }; blocks: { defaults: Record>; modes: Record>; overrides: Record>; }; }; export type ThemeLocaleState = { locale: ReadonlySignal; catalogs: ReadonlySignal; setLocale: (locale: string) => Promise; }; export type ThemeState = { page: ThemeSurfaceState; overlay: ThemeSurfaceState; locales: ThemeLocaleState; globalStyles: ReadonlySignal; setGlobalStyles: (styles: GlobalStyles) => void; resolve: (surface: ThemeSurface, id: string, defaultBlock: string) => Promise<{ blocks: Block[]; }>; }; export declare const ThemeStateContext: { __context__: ThemeState; }; export declare function indexOverrides(overrides: TranslationOverride[]): { theme: Record; blocks: Record>; }; export declare function createThemeState(deps: { resolve: (surface: ThemeSurface, id: string, defaultBlock: string) => Promise<{ blocks: Block[]; }>; translations?: { resolveTranslations: (locale: string) => Promise; }; initialGlobalStyles?: GlobalStyles; }): ThemeState;