UNPKG

@kitn.ai/ui

Version:

Framework-agnostic, Shadow-DOM web components for building AI chat interfaces — works in React, Vue, Angular, Svelte, or plain HTML. Authored in SolidJS.

18 lines (17 loc) 910 B
import { Component } from 'solid-js'; import { CardEnvelope, CardHost } from './card-contract'; /** Solid renderer for one envelope. `host` is the resolved CardHost so each wrapper * can bridge its card's emit convention (form/confirm/tasks take `host`; * link/embed take `onEmit`). */ export type CardComponent = Component<{ envelope: CardEnvelope; host?: CardHost; }>; export type CardComponentMap = Record<string, CardComponent>; /** Web-component layer: envelope type → kai-* tag name. */ export type CardTagMap = Record<string, string>; export declare const BUILTIN_CARD_TAGS: CardTagMap; export declare const BUILTIN_CARD_COMPONENTS: CardComponentMap; /** Built-ins with the consumer's overrides merged on top (consumer wins). */ export declare function mergeCardComponents(types?: CardComponentMap): CardComponentMap; export declare function mergeCardTags(types?: CardTagMap): CardTagMap;