@cossistant/next
Version:
Next.js-ready SDK for building AI-powered support/chat widgets. Hooks + primitives, WS-driven, TypeScript-first. Next.js-ready, Tailwind optional.
59 lines (57 loc) • 2.46 kB
TypeScript
import * as React$1 from "react";
//#region ../react/src/primitives/conversation-timeline.d.ts
/**
* High-level state of the timeline handed to render-prop children so they can show
* skeletons, empty states or pagination affordances.
*/
type ConversationTimelineRenderProps = {
itemCount: number;
isLoading?: boolean;
hasMore?: boolean;
isEmpty: boolean;
};
/**
* Scrollable conversation timeline that wires auto-scroll behaviour, live-region semantics and
* pagination callbacks for displaying timeline items (messages, events, etc.).
*/
declare const ConversationTimeline: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & {
children?: React$1.ReactNode | ((props: ConversationTimelineRenderProps) => React$1.ReactNode);
asChild?: boolean;
className?: string;
items?: TimelineItemType[];
isLoading?: boolean;
hasMore?: boolean;
autoScroll?: boolean;
onScrollEnd?: () => void;
onScrollStart?: () => void;
} & React$1.RefAttributes<HTMLDivElement>>;
/**
* Wrapper around the scrollable timeline giving consumers an easy hook to add
* padding, backgrounds or transitions without touching the core timeline logic.
*/
declare const ConversationTimelineContainer: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & {
children?: React$1.ReactNode;
asChild?: boolean;
className?: string;
} & React$1.RefAttributes<HTMLDivElement>>;
/**
* Accessible status region for loading more timeline items. Lets host apps render
* skeletons or shimmer states without reimplementing ARIA wiring.
*/
declare const ConversationTimelineLoading: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & {
children?: React$1.ReactNode;
asChild?: boolean;
className?: string;
} & React$1.RefAttributes<HTMLDivElement>>;
/**
* Placeholder state rendered when no timeline items are present. Uses a polite status
* region so screen readers announce the empty state.
*/
declare const ConversationTimelineEmpty: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "children"> & {
children?: React$1.ReactNode;
asChild?: boolean;
className?: string;
} & React$1.RefAttributes<HTMLDivElement>>;
//#endregion
export { ConversationTimeline, ConversationTimelineContainer, ConversationTimelineEmpty, ConversationTimelineLoading };
//# sourceMappingURL=conversation-timeline.d.ts.map