Files
chatkit/dist/react/MessageThread.d.ts
T
CatoandClaude Opus 5.5 20f5b5849b feat(messenger): delivered, read and when; delete for me or for everyone; edit history (0.39.0) (#104)
* feat(messenger): delivered, read and when; delete for me or for everyone; edit history (0.39.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

* fix(sheet): a close the app caused never shuts the next sheet; tests wait for it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

* test(messenger): say what the page looked like when the actions sheet did not open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

* fix(sheet): a late close event never shuts a sheet that is open again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsmMXvM981mcszxEA6

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 11:35:04 +01:00

69 lines
3.6 KiB
TypeScript

import { type ReactNode } from "react";
import { type MessengerAgent, type MessengerConversation, type MessengerCard, type MessengerMessage } from "../messenger.js";
import type { MessengerAwaited } from "../messenger-state.js";
import { type RenderLink } from "./Markdown.js";
import { type MessengerLabels } from "./messenger-labels.js";
export type MessageThreadProps = {
conversation: MessengerConversation;
/** The id the viewer's own messages carry. */
viewerId: string;
/** Oldest first. */
messages: readonly MessengerMessage[];
agents?: readonly MessengerAgent[];
status?: "loading" | "ready" | "failed";
onReload?: () => void;
/** There are earlier messages to load. */
hasOlder?: boolean;
loadingOlder?: boolean;
olderFailed?: boolean;
onLoadOlder?: () => void;
/** The viewer's read mark when the thread was opened: where "New" is drawn. */
unreadFrom?: Date | null;
/** Actor ids of the people typing now. */
typing?: readonly string[];
/** Agents somebody just called on. */
awaited?: readonly MessengerAwaited[];
onDismissAgent?: (agentId: string) => void;
onRetry?: (message: MessengerMessage) => void;
onDiscard?: (message: MessengerMessage) => void;
/** Open what can be done to a message (copy, edit, delete). Given, a
* message answers a long press, a right click and its "…" button. */
onAction?: (message: MessengerMessage) => void;
/** Open a message's Info (receipts, what it said before an edit). */
onInfo?: (message: MessengerMessage) => void;
/** Tap a reaction chip: put the same emoji on, or take the viewer's off. */
onReact?: (message: MessengerMessage, emoji: string) => void;
/** At the end of a card: what the app adds to it for this reader. */
renderCardAction?: (card: MessengerCard, message: MessengerMessage) => ReactNode;
/** The viewer is at the newest message and it is on screen. */
onSeen?: () => void;
onFollowingChange?: (following: boolean) => void;
/** Lead to this message and mark it (a search result). A new object each
* time, so the same message can be asked for twice. */
reveal?: {
id: string;
} | null;
renderLink?: RenderLink;
/** A product's own mark for an agent with no picture. */
agentMark?: ReactNode;
locale?: string;
timeZone?: string;
labels?: MessengerLabels;
};
/**
* A conversation between people, and the agents among them.
*
* What it settles so no product has to again: whose message is whose (the
* viewer's on the right; everyone else's on the left, named whenever more
* than one other voice is present); that an agent never passes for a person
* (its own shape of face, an "Agent" mark, whom it answered for, its words in
* an outlined bubble); runs of messages that share one name and one time; a
* line where each day begins and one where the unread begin; ticks drawn from
* threadkit's `readState`; a message that failed, kept with Try again.
*
* It scrolls itself: give it a box with a height. It follows new messages
* only while the reader is at the end, and keeps its place when earlier
* messages are loaded above.
*/
export declare function MessageThread({ conversation, viewerId, messages, agents, status, onReload, hasOlder, loadingOlder, olderFailed, onLoadOlder, unreadFrom, typing, awaited, onDismissAgent, onRetry, onDiscard, onAction, onInfo, onReact, renderCardAction, onSeen, onFollowingChange, reveal, renderLink, agentMark, locale, timeZone, labels, }: MessageThreadProps): import("react").JSX.Element;
//# sourceMappingURL=MessageThread.d.ts.map