import type { MeissaInput, MeissaTheme } from "../renderer"; export type PatchOp = "replace" | "add" | "remove"; export interface PatchOperation { op: PatchOp; path: string; value?: unknown; } export interface MeissaContentBlock { type: "meissa"; schema: MeissaInput; data?: Record; theme?: MeissaTheme; fallback?: string; } export interface MeissaPatchBlock { type: "meissa/patch"; target: string; patches: PatchOperation[]; } export interface TextContentBlock { type: "text"; text: string; } export type McpContentBlock = MeissaContentBlock | MeissaPatchBlock | TextContentBlock; export type HandleContentResult = { type: "meissa"; schema: MeissaInput; data?: Record; theme?: MeissaTheme; fallback?: string; } | { type: "meissa/patch"; target: string; patches: PatchOperation[]; } | { type: "text"; text: string; }; export interface McpContentHandlers { applyPatch: (patches: PatchOperation[]) => void; applyFullSchema?: (schema: MeissaInput, data?: Record) => void; onText?: (text: string) => void; } export interface MeissaClientRendererOptions { container: HTMLElement; theme?: MeissaTheme; onAction?: (action: string, args: Record) => Promise; onNavigate?: (uri: string) => void; } export interface MeissaContentProps { schema: MeissaInput; data?: Record; theme?: MeissaTheme; onAction?: (action: string, args: Record) => Promise; onNavigate?: (uri: string) => void; className?: string; }