@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.
60 lines (59 loc) • 2.68 kB
TypeScript
import { JSX } from 'solid-js';
import { AttachmentData, AttachmentMediaCategory, AttachmentVariant } from './attachment-types';
export type { AttachmentData, AttachmentMediaCategory, AttachmentVariant } from './attachment-types';
export declare const getMediaCategory: (data: AttachmentData) => AttachmentMediaCategory;
export declare const getAttachmentLabel: (data: AttachmentData) => string;
interface AttachmentsContextValue {
variant: AttachmentVariant;
}
interface AttachmentContextValue {
data: AttachmentData;
mediaCategory: AttachmentMediaCategory;
onRemove?: () => void;
variant: AttachmentVariant;
}
export declare const useAttachmentsContext: () => AttachmentsContextValue;
export declare const useAttachmentContext: () => AttachmentContextValue;
export interface AttachmentsProps extends JSX.HTMLAttributes<HTMLDivElement> {
variant?: AttachmentVariant;
}
declare function Attachments(props: AttachmentsProps): JSX.Element;
export interface AttachmentProps extends JSX.HTMLAttributes<HTMLDivElement> {
data: AttachmentData;
onRemove?: () => void;
}
declare function Attachment(props: AttachmentProps): JSX.Element;
export interface AttachmentPreviewProps extends JSX.HTMLAttributes<HTMLDivElement> {
fallbackIcon?: JSX.Element;
}
declare function AttachmentPreview(props: AttachmentPreviewProps): JSX.Element;
export interface AttachmentInfoProps extends JSX.HTMLAttributes<HTMLDivElement> {
showMediaType?: boolean;
}
declare function AttachmentInfo(props: AttachmentInfoProps): JSX.Element;
export interface AttachmentRemoveProps {
label?: string;
class?: string;
children?: JSX.Element;
}
declare function AttachmentRemove(props: AttachmentRemoveProps): JSX.Element;
export interface AttachmentHoverCardProps {
children: JSX.Element;
openDelay?: number;
closeDelay?: number;
}
declare function AttachmentHoverCard(props: AttachmentHoverCardProps): JSX.Element;
export interface AttachmentHoverCardTriggerProps {
children: JSX.Element;
class?: string;
}
declare function AttachmentHoverCardTrigger(props: AttachmentHoverCardTriggerProps): JSX.Element;
export interface AttachmentHoverCardContentProps {
children: JSX.Element;
class?: string;
}
declare function AttachmentHoverCardContent(props: AttachmentHoverCardContentProps): JSX.Element;
export interface AttachmentEmptyProps extends JSX.HTMLAttributes<HTMLDivElement> {
}
declare function AttachmentEmpty(props: AttachmentEmptyProps): JSX.Element;
export { Attachments, Attachment, AttachmentPreview, AttachmentInfo, AttachmentRemove, AttachmentHoverCard, AttachmentHoverCardTrigger, AttachmentHoverCardContent, AttachmentEmpty, };