UNPKG

@copilotkit/a2ui-renderer

Version:

A2UI Renderer for CopilotKit - render A2UI surfaces in React applications

35 lines 1.33 kB
//#region src/a2ui-types.d.ts /** * v0.9 A2UI type definitions for CopilotKit integration. */ /** Theme type - v0.9 themes are passed via createSurface message */ type Theme = Record<string, unknown>; /** * Client event message dispatched when a user interacts with an A2UI surface. * This is the format expected by A2UIMessageRenderer's handleAction. */ interface A2UIClientEventMessage { userAction?: { name: string; surfaceId: string; sourceComponentId?: string; context?: Record<string, unknown>; timestamp?: string; dataContextPath?: string; }; } /** Default surface ID when none is specified */ declare const DEFAULT_SURFACE_ID = "default"; /** * The component id every renderer starts from when it walks a surface. * * A2UI v0.9 gives a payload no way to name its own entry point — `createSurface` * carries only `surfaceId`, `catalogId` and `theme` — so the id is fixed here * instead. A surface whose components do not include this id has nothing to * begin from and paints only the not-yet-arrived placeholder, which is why * `A2UIMessageRenderer` reports that state once operations have stopped. */ declare const ROOT_COMPONENT_ID = "root"; //#endregion export { A2UIClientEventMessage, DEFAULT_SURFACE_ID, ROOT_COMPONENT_ID, Theme }; //# sourceMappingURL=a2ui-types.d.cts.map