export type SpecChild = ComponentSpec | string; export interface ComponentSpec { component: string; props?: Record; children?: SpecChild[]; slots?: Record; events?: Record; } export type EventBinding = | string | { handler: string; stopPropagation?: boolean; preventDefault?: boolean; }; export interface EmittedEvent { component: string; path: string; event: string; handler: string; detail: unknown; nativeEvent: Event; } export interface CatalogSchema { $id?: string; $defs?: { components?: Record; }; 'x-a2ui'?: { catalogId?: string; library?: string; libraryVersion?: string; tagPrefix?: string; framework?: string; }; [key: string]: unknown; } export interface CatalogComponentDef { title?: string; description?: string; 'x-category'?: string; 'x-slot-descriptions'?: Record; 'x-events'?: Record; properties?: { component?: { const?: string }; props?: { properties?: Record; }; children?: unknown; slots?: { properties?: Record; }; }; } export interface PropSchema { type?: string | string[]; enum?: string[]; const?: unknown; default?: unknown; description?: string; items?: PropSchema; properties?: Record; required?: string[]; additionalProperties?: boolean; oneOf?: PropSchema[]; 'x-tsType'?: string; 'x-kind'?: 'attribute' | 'property'; } export interface RegisteredCatalog { id: string; schema: CatalogSchema; components: Map; }