/** * PrefabApp — Root application wrapper. * * Wraps a component tree with state, theme, defs, and key bindings. * Serializes to the $prefab wire format compatible with the Python version. */ import { type Component } from './core/component.js'; import type { ComponentJSON } from './core/component.js'; import type { Action, ActionJSON } from './actions/types.js'; import type { PipeFn } from './rx/pipes.js'; /** Package version — injected by build script, updated at release time. */ export declare const VERSION = "0.3.0"; /** * Wire protocol version emitted in `$prefab.version`. * * `0.3` matches upstream PrefectHQ/prefab: the theme is folded into the * `css` array, `stylesheets` carries external URLs, and `mode` forces a * color scheme (PR #431, "Wire Transfer"). The renderer still accepts `0.2` * payloads for backward compatibility. */ export declare const PROTOCOL_VERSION = "0.3"; export interface Theme { light?: Record; dark?: Record; } /** Forced color scheme for the renderer, independent of OS preference. */ export type ColorMode = 'light' | 'dark'; /** Declarative size hints for the host container (iframe, panel, etc.). */ export interface LayoutHints { /** Preferred height in pixels — host should allocate this before first paint. */ preferredHeight?: number; /** Minimum usable height in pixels. */ minHeight?: number; /** Maximum height in pixels — content scrolls beyond this. */ maxHeight?: number; } export interface PrefabWireFormat { $prefab: { version: string; }; view: ComponentJSON; state?: Record; defs?: Record; keyBindings?: Record; onMount?: ActionJSON | ActionJSON[]; /** Inline CSS blocks injected as `