/** * PrefabRenderer — Main entry point for the browser renderer. * * Usage (CDN — new API): * ```html * * * ``` * * Usage (CDN — legacy): * ```html * * * ``` * * Or as ESM: * ```ts * import { PrefabRenderer, app } from '@maxhealth.tech/prefab/renderer' * const ui = await app() * ``` */ import { Store } from './state.js'; import type { ComponentNode } from './engine.js'; import type { ThemeToggleOptions } from './theme.js'; import type { McpTransport, ToastEvent, ActionJSON } from './actions.js'; import type { McpTransportOptions } from './transport.js'; export { app } from './app.js'; export type { AppOptions, PrefabApp, MountHandle } from './app.js'; export { Bridge, isIframe, applyHostTheme } from './bridge.js'; export { registerPipe, unregisterPipe, listPipes } from '../rx/pipes.js'; export type { PipeFn } from '../rx/pipes.js'; export { registerComponent } from './engine.js'; export type { RenderFn, RenderResult, RenderFnReturn, ComponentNode, RenderContext } from './engine.js'; export { DestroyRegistry } from './engine.js'; export type { AppCapabilities, HostCapabilities, HostContext, HostTheme, DisplayMode, BridgeMessage, } from './bridge.js'; export { createThemeToggle } from './theme.js'; export type { ThemeToggleOptions } from './theme.js'; export interface PrefabWireData { $prefab: { version: string; }; view: ComponentNode; state?: Record; /** Legacy structured theme (protocol 0.2). Protocol 0.3 ships the theme in `css`. */ theme?: { light?: Record; dark?: Record; }; defs?: Record; keyBindings?: Record; /** Inline CSS blocks injected as `