import { T as ToolHost } from '../tool-host-BBSaU7IJ.cjs'; import { B as Bridge } from '../types-D_H2f-wF.cjs'; import '../types-ITRQFAir.cjs'; /** * Transport-level JSON shapes. These intentionally mirror fancy-artboard's * public `ArtBoardValue` but are defined LOCALLY so this bridge builds * independently of the sibling package — they are plain JSON crossing the * MCP wire, not the live component types. Keep them in sync with * @particle-academy/fancy-artboard's public surface. */ type Viewport = { x: number; y: number; zoom: number; }; type ArtPieceContent = { kind: "image"; src: string; alt?: string; } | { kind: "html"; html: string; } | { kind: "node"; }; type ArtPieceData = { id: string; label?: string; width?: number; height?: number; content: ArtPieceContent; pending?: boolean; }; type ArtSectionData = { id: string; title: string; subtitle?: string; pieces: ArtPieceData[]; }; type ArtBoardValue = { sections: ArtSectionData[]; }; /** * State accessors / mutators the bridge needs from the host. The host owns * artboard state (controlled props on fancy-artboard components); the bridge * calls into these to read or change it. */ type ArtboardBridgeAdapter = { getValue: () => ArtBoardValue; setValue: (next: ArtBoardValue | ((prev: ArtBoardValue) => ArtBoardValue)) => void; getViewport: () => Viewport; setViewport: (next: Viewport) => void; getFocus: () => string | null; setFocus: (id: string | null) => void; /** Optional: agent presence cursor (for the visualizer). */ setAgentCursor?: (cursor: { x: number; y: number; } | null) => void; }; type ArtboardBridgeOptions = { adapter: ArtboardBridgeAdapter; /** Identity used when the agent stamps authorship / cursor. */ agent?: { id: string; name?: string; color?: string; }; }; /** * registerArtboardBridge — wires a full MCP tool set against a fancy-artboard * session controlled by the host. Returns a Bridge handle the host can dispose * to tear everything down. */ declare function registerArtboardBridge(host: ToolHost, options: ArtboardBridgeOptions): Bridge; export { type ArtboardBridgeAdapter, type ArtboardBridgeOptions, registerArtboardBridge };