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.

9 lines (8 loc) 674 B
import { CardEnvelope, CardEvent, CardResolution } from './card-contract'; /** Map a terminal CardEvent (`action` | `submit`) to a CardResolution. * Returns undefined for every non-terminal verb (ready/error/resize/state/…). */ export declare function resolutionFromEvent(event: CardEvent): CardResolution | undefined; /** Return a new cards array with the envelope matching `event.cardId` stamped with its * resolution. Non-terminal events or an unknown cardId return the SAME array reference * (cheap no-op; safe to call on every event). Never mutates the input. */ export declare function applyResolution(cards: CardEnvelope[], event: CardEvent): CardEnvelope[];