@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) • 806 B
TypeScript
import { ConversationSummary } from '../types';
export interface ConversationItemProps {
conversation: ConversationSummary;
isActive: boolean;
onSelect: (id: string) => void;
/** Dense single-line row: a leading dot + title, no message count. */
compact?: boolean;
class?: string;
}
/**
* Short relative time from an ISO date string: "just now", "5m ago", "3h ago",
* "2d ago", "24d ago". Pure — it snapshots `now` (defaults to `Date.now()`) at
* call time, so it re-derives whenever the list re-renders; there is no internal
* ticking clock. Returns '' for a missing or unparseable date.
*/
export declare function relativeTimeShort(iso?: string, now?: number): string;
export declare function ConversationItem(props: ConversationItemProps): import("solid-js").JSX.Element;