@poolse/react-ui 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { CallParticipant, CallDevice, CallDeviceKind, Message, Uuid, LiveCall, Conversation, Membership, Attachment, MessageCreateRequest } from '@poolse/sdk';
2
+ import { CallParticipant, CallDevice, CallDeviceKind, Message, Uuid, LiveCall, Conversation, PresenceState, Presence, Membership, Attachment, LinkPreview, MessageCreateRequest } from '@poolse/sdk';
3
3
  import * as react from 'react';
4
4
  import { SVGProps, ReactElement, ReactNode, CSSProperties } from 'react';
5
5
  import { GroupPosition, UseRoom, UploadItem, ReactionMap } from '@poolse/react';
@@ -339,6 +339,24 @@ interface CallDeviceMenuProps {
339
339
  */
340
340
  declare function CallDeviceMenu({ title, devices, activeId, onSelect, onClose, }: CallDeviceMenuProps): react_jsx_runtime.JSX.Element | null;
341
341
 
342
+ /**
343
+ * Where drafts persist. Sync or async (`AsyncStorage`-style) both work.
344
+ * Values are opaque strings.
345
+ */
346
+ interface DraftStorage {
347
+ get: (key: string) => string | null | undefined | Promise<string | null | undefined>;
348
+ set: (key: string, value: string) => void | Promise<void>;
349
+ remove: (key: string) => void | Promise<void>;
350
+ }
351
+ /** One conversation's unsent draft. */
352
+ interface ConversationDraft {
353
+ text: string;
354
+ /** The message being quoted, if any. */
355
+ replyTo: Message | null;
356
+ }
357
+ /** `window.localStorage`, every call guarded (private mode, blocked storage, SSR). */
358
+ declare const localDraftStorage: DraftStorage;
359
+
342
360
  /**
343
361
  * Position of this bubble within a same-sender, same-day, ≤5-min
344
362
  * cluster. Drives the tail-corner rendering: only `last` and
@@ -417,6 +435,11 @@ interface MessageBubbleProps {
417
435
  showAttachments?: boolean;
418
436
  /** `'12h'`, `'24h'` or a formatter for the timestamp. Defaults to the locale's. */
419
437
  timeFormat?: TimeFormat;
438
+ /**
439
+ * Cards for the links in the text (`message.link_previews`) under the
440
+ * body; the sender gets a × to remove one. Defaults to `true`.
441
+ */
442
+ linkPreviews?: boolean;
420
443
  /**
421
444
  * Replace or wrap the `header` (sender label), `attachments` and
422
445
  * `body` parts. Needs `slotContext` (MessageRow passes both).
@@ -433,7 +456,7 @@ interface MessageBubbleProps {
433
456
  * (coral for self, surface-with-border for others), matching the
434
457
  * brand-kit chat showcase.
435
458
  */
436
- declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, markdown, showSenderName, onSenderPress, actionsTrigger, showAttachments, timeFormat, slots, slotContext, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
459
+ declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, markdown, showSenderName, onSenderPress, actionsTrigger, showAttachments, timeFormat, linkPreviews, slots, slotContext, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
437
460
 
438
461
  /** Who sent a message — what `onSenderPress` / `onAvatarPress` receive. */
439
462
  interface MessageUser {
@@ -478,7 +501,7 @@ type MessageSlot = (props: MessageSlotProps) => ReactNode;
478
501
  * Replace or wrap one part of every message, in any layout:
479
502
  *
480
503
  * - `header` — sender name and time (the name label in `bubbles`)
481
- * - `body` — the text (or "Message deleted")
504
+ * - `body` — the text (or "This message was deleted")
482
505
  * - `attachments` — images and files
483
506
  * - `reactions` — the reaction pills
484
507
  * - `thread` — the "N replies" link
@@ -535,6 +558,11 @@ interface ConversationViewProps {
535
558
  * `avatars` (others' messages in group chats). Overrides `avatars`.
536
559
  */
537
560
  showAvatars?: boolean;
561
+ /**
562
+ * Presence badges (online, away, in a call, do not disturb) on the
563
+ * avatars next to messages, where avatars show. Defaults to `false`.
564
+ */
565
+ showPresence?: boolean;
538
566
  /** `'12h'`, `'24h'` or a formatter. Defaults to the locale's. */
539
567
  timeFormat?: TimeFormat;
540
568
  /**
@@ -566,8 +594,21 @@ interface ConversationViewProps {
566
594
  reactions?: boolean;
567
595
  /** Swap the plain composer for one with `@`-autocomplete drawn from members. */
568
596
  mentions?: boolean;
569
- /** Paperclip → file picker → presigned upload → send-with-attachment. */
597
+ /**
598
+ * Paperclip → file picker → presigned upload → send-with-attachment.
599
+ * Files can also be pasted into the composer or dropped on the view;
600
+ * they show as chips (images with a thumbnail) until sent.
601
+ */
570
602
  attachments?: boolean;
603
+ /** Largest attachment accepted, in bytes; bigger files show an error chip instead. */
604
+ maxFileSize?: number;
605
+ /**
606
+ * Accepted attachment types — MIME types, wildcards (`'image/*'`) or
607
+ * extensions (`'.pdf'`). Other files show an error chip instead.
608
+ */
609
+ acceptFileTypes?: string[];
610
+ /** An emoji button in the composer (`<EmojiPicker>`). Defaults to `true`. */
611
+ emojiPicker?: boolean;
571
612
  /** Hover-revealed react / reply / edit / delete popover next to each message. */
572
613
  actions?: boolean;
573
614
  /** "Reply in thread" opens a right-side ThreadView. */
@@ -579,6 +620,12 @@ interface ConversationViewProps {
579
620
  * side-pane). Defaults ON.
580
621
  */
581
622
  quotations?: boolean;
623
+ /**
624
+ * Cards for links in message text (site, title, description, image;
625
+ * an image link inline), arriving a moment after the message. The
626
+ * sender can remove one with its ×. Defaults to `true`.
627
+ */
628
+ linkPreviews?: boolean;
582
629
  /** Check-double glyph on own messages once another member's read cursor advances past them. */
583
630
  readReceipts?: boolean;
584
631
  /**
@@ -666,8 +713,21 @@ interface ConversationViewProps {
666
713
  onJoinCall?: (call: LiveCall) => void;
667
714
  /** The call this client is already on, if any — its banner is hidden. */
668
715
  currentCallId?: string | null;
716
+ /**
717
+ * Keep an unsent draft per conversation — the composer's text and the
718
+ * message being quoted (not files) — across conversation switches
719
+ * and reloads, per user. Cleared when the message is sent. Defaults
720
+ * to `true`.
721
+ */
722
+ persistDrafts?: boolean;
723
+ /**
724
+ * Where drafts persist between page loads. Defaults to
725
+ * `localStorage` (guarded; memory only when it's unavailable). Sync or
726
+ * async `get` / `set` / `remove` with string values.
727
+ */
728
+ draftStorage?: DraftStorage;
669
729
  }
670
- declare function ConversationView({ conversationId, emptyState, renderMessage, labelFor, loadFonts, reactions, mentions, attachments, actions, threads, quotations, readReceipts, markdown, maxBodyLength, grouping, groupingWindowMs, groupWindowMinutes, layout, density, showAvatars, timeFormat, slots, daySeparators, senderLabels, avatars, onMarkedRead, focusMessageId, onFocusMessageNotFound, onSenderPress, onAvatarPress, composer, readOnly, onCallBack, onJoinCall, currentCallId, }: ConversationViewProps): react_jsx_runtime.JSX.Element;
730
+ declare function ConversationView({ conversationId, emptyState, renderMessage, labelFor, loadFonts, reactions, mentions, attachments, maxFileSize, acceptFileTypes, emojiPicker, actions, threads, quotations, readReceipts, linkPreviews, markdown, maxBodyLength, grouping, groupingWindowMs, groupWindowMinutes, layout, density, showAvatars, showPresence, timeFormat, slots, daySeparators, senderLabels, avatars, onMarkedRead, focusMessageId, onFocusMessageNotFound, onSenderPress, onAvatarPress, composer, readOnly, onCallBack, onJoinCall, currentCallId, persistDrafts, draftStorage, }: ConversationViewProps): react_jsx_runtime.JSX.Element;
671
731
 
672
732
  interface ChatHeaderProps {
673
733
  /** Conversation id — used to fetch the row + members for the title / presence dot. */
@@ -687,8 +747,14 @@ interface ChatHeaderProps {
687
747
  onMembersPress?: () => void;
688
748
  /** Custom right-side slot rendered after the members button. */
689
749
  rightSlot?: ReactNode;
750
+ /**
751
+ * Direct chats: the other person's presence badge on the avatar and
752
+ * their state as the subtitle ("Online", "Away", "In a call", "Last
753
+ * seen 5m ago"). Defaults to `true`.
754
+ */
755
+ showPresence?: boolean;
690
756
  }
691
- declare function ChatHeader({ conversationId, labelFor, avatarFor, onBack, onPress, onMembersPress, rightSlot, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
757
+ declare function ChatHeader({ conversationId, labelFor, avatarFor, onBack, onPress, onMembersPress, rightSlot, showPresence, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
692
758
 
693
759
  /** Minimal user shape the picker renders. Matches the RN InboxUser. */
694
760
  interface InboxUser {
@@ -822,6 +888,26 @@ interface RoomStageProps {
822
888
  */
823
889
  declare function RoomStage({ room, title, labelFor, className }: RoomStageProps): react_jsx_runtime.JSX.Element;
824
890
 
891
+ interface EditedLabelProps {
892
+ messageId: Uuid;
893
+ /** The label. Defaults to `"edited"`. */
894
+ label?: string;
895
+ className?: string;
896
+ }
897
+ declare function EditedLabel({ messageId, label, className }: EditedLabelProps): react_jsx_runtime.JSX.Element;
898
+ /**
899
+ * The edit-history label and its popover as two pieces, so a layout can
900
+ * put the label inside a styled meta line and the popover outside it.
901
+ * The popover is `position: fixed` in the viewport, so scrollers don't
902
+ * clip it.
903
+ */
904
+ declare function useEditHistory(messageId: Uuid): {
905
+ /** The "edited" button (plain text once the server refused with 403). */
906
+ label: (text?: string, className?: string) => ReactNode;
907
+ /** The open popover, or null. */
908
+ popover: ReactNode;
909
+ };
910
+
825
911
  interface EditableMessageBubbleProps {
826
912
  message: Message;
827
913
  currentUserId: string | null;
@@ -869,6 +955,20 @@ interface MessageComposerProps {
869
955
  * disable attachments entirely (text-only composer).
870
956
  */
871
957
  attachments?: boolean;
958
+ /** An emoji button that opens `<EmojiPicker>` and inserts at the caret. Default `true`. */
959
+ emojiPicker?: boolean;
960
+ /**
961
+ * The text changed (typing, an emoji, a restored draft, the reset after
962
+ * a send). Not called for the initial empty value.
963
+ */
964
+ onValueChange?: (value: string) => void;
965
+ /** Largest attachment accepted, in bytes; bigger files show an error chip instead. */
966
+ maxFileSize?: number;
967
+ /**
968
+ * Accepted attachment types — MIME types, wildcards (`'image/*'`) or
969
+ * extensions (`'.pdf'`). Other files show an error chip instead.
970
+ */
971
+ acceptFileTypes?: string[];
872
972
  }
873
973
  /**
874
974
  * Imperative handle exposed via `ref` for parents that want to forward
@@ -878,6 +978,12 @@ interface MessageComposerProps {
878
978
  interface MessageComposerHandle {
879
979
  /** Enqueue files to upload + attach to the next send. No-op when `attachments={false}`. */
880
980
  addFiles: (files: File[]) => void;
981
+ /** The text in the input right now. */
982
+ getText: () => string;
983
+ /** Replace the text in the input (e.g. to restore a draft or a failed send). */
984
+ setText: (text: string) => void;
985
+ /** Focus the input. */
986
+ focus: () => void;
881
987
  }
882
988
  /**
883
989
  * Composer with Enter-to-send (Shift+Enter = newline), smart list
@@ -904,6 +1010,8 @@ interface MessageActionsProps {
904
1010
  onQuote?: () => void;
905
1011
  /** Triggered when the user wants to copy the message body to the clipboard. */
906
1012
  onCopy?: () => void;
1013
+ /** "Mark unread" — others' messages: the read position moves back to this one. */
1014
+ onMarkUnread?: () => void;
907
1015
  /** Triggered when the user wants to edit. Only show on own messages. */
908
1016
  onEdit?: () => void;
909
1017
  /** Triggered when the user wants to delete. Only show on own messages. */
@@ -917,7 +1025,7 @@ interface MessageActionsProps {
917
1025
  /** Render any extra trailing action buttons (e.g. "Pin"). */
918
1026
  children?: ReactNode;
919
1027
  }
920
- declare function MessageActions({ onReact, onReply, onQuote, onCopy, onEdit, onDelete, moreMenu, children, }: MessageActionsProps): react_jsx_runtime.JSX.Element;
1028
+ declare function MessageActions({ onReact, onReply, onQuote, onCopy, onMarkUnread, onEdit, onDelete, moreMenu, children, }: MessageActionsProps): react_jsx_runtime.JSX.Element;
921
1029
 
922
1030
  interface TypingIndicatorProps {
923
1031
  /** Set of `external_id`s currently typing — what `useTyping` returns. */
@@ -953,21 +1061,80 @@ interface ThreadViewProps {
953
1061
  /** Row layout for the replies — see `ChatLayout`. Defaults to `'bubbles'`. */
954
1062
  layout?: ChatLayout;
955
1063
  timeFormat?: TimeFormat;
1064
+ /** Largest attachment accepted, in bytes (see `MessageComposer`). */
1065
+ maxFileSize?: number;
1066
+ /** Accepted attachment types (see `MessageComposer`). */
1067
+ acceptFileTypes?: string[];
1068
+ }
1069
+ declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, maxFileSize, acceptFileTypes, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
1070
+
1071
+ interface ThreadSummaryProps {
1072
+ /** The thread's root message. Renders nothing without replies. */
1073
+ message: Message;
1074
+ /** Open the thread (e.g. `<ThreadView>`). */
1075
+ onOpen?: () => void;
1076
+ /** How many participant avatars to stack. Defaults to 3. */
1077
+ maxAvatars?: number;
1078
+ className?: string;
956
1079
  }
957
- declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
1080
+ declare function ThreadSummary({ message, onOpen, maxAvatars, className }: ThreadSummaryProps): react_jsx_runtime.JSX.Element | null;
958
1081
 
959
1082
  interface AvatarProps {
960
1083
  /** URL to a profile image. Renders initials fallback when omitted or load fails. */
961
1084
  src?: string | null;
962
1085
  /** Used for initials and as the image alt text. */
963
1086
  name?: string | null;
964
- /** Show a green presence dot in the bottom-right corner. */
1087
+ /**
1088
+ * Show a green presence dot in the bottom-right corner.
1089
+ * @deprecated Use `presence` (`presence="online"`).
1090
+ */
965
1091
  online?: boolean;
966
- /** Size variant; defaults to `md` (40px). */
967
- size?: 'sm' | 'md' | 'lg';
1092
+ /**
1093
+ * A presence badge in the bottom-right corner (see `<PresenceBadge>`):
1094
+ * a state (`'online' | 'away' | 'in_call' | 'offline'`), a `Presence`
1095
+ * (also shows do-not-disturb), or `true` to look it up live with
1096
+ * `useUserPresence(userId)`. Offline draws nothing.
1097
+ */
1098
+ presence?: PresenceState | Presence | true | null;
1099
+ /**
1100
+ * Whose avatar this is — a poolse user id or an `external_id`. Needed
1101
+ * by `presence={true}`.
1102
+ */
1103
+ userId?: string | null;
1104
+ /** Size variant; defaults to `md` (40px). `xs` is 20px. */
1105
+ size?: 'xs' | 'sm' | 'md' | 'lg';
1106
+ className?: string;
1107
+ }
1108
+ declare function Avatar({ src, name, online, presence, userId, size, className, }: AvatarProps): react_jsx_runtime.JSX.Element;
1109
+
1110
+ interface PresenceBadgeProps {
1111
+ /** `online`, `away`, `in_call` or `offline` (offline renders nothing). */
1112
+ state: PresenceState | null | undefined;
1113
+ /**
1114
+ * The person paused notifications or is in their quiet hours
1115
+ * (`Presence.do_not_disturb`): a moon replaces the dot while they are
1116
+ * not offline.
1117
+ */
1118
+ doNotDisturb?: boolean;
1119
+ /** Matches the avatar it sits on. Defaults to `md`. */
1120
+ size?: 'xs' | 'sm' | 'md' | 'lg';
968
1121
  className?: string;
969
1122
  }
970
- declare function Avatar({ src, name, online, size, className }: AvatarProps): react_jsx_runtime.JSX.Element;
1123
+ declare function PresenceBadge({ state, doNotDisturb, size, className, }: PresenceBadgeProps): react_jsx_runtime.JSX.Element | null;
1124
+ /** "Online", "Away", "In a call", "Offline". */
1125
+ declare function presenceStateLabel(state: PresenceState): string;
1126
+ /**
1127
+ * The line a header or roster shows under a name: "Online", "Away",
1128
+ * "In a call", "Last seen 5m ago" (offline with a known time), else
1129
+ * "Offline". Null when presence isn't known yet.
1130
+ */
1131
+ declare function presenceText(presence: Presence | null | undefined, now?: number): string | null;
1132
+
1133
+ /**
1134
+ * `just now`, `5m ago`, `3h ago`, `yesterday`, `4d ago`, then the date
1135
+ * (`Mar 4`, or `Mar 4, 2025` in another year). Empty for a bad date.
1136
+ */
1137
+ declare function formatRelativeTime(iso: string | null | undefined, now?: number): string;
971
1138
 
972
1139
  interface UserNameProps {
973
1140
  /** The tenant's user identifier — what your `userResolver` consumes. */
@@ -1023,8 +1190,41 @@ interface ConversationListProps {
1023
1190
  labelFor?: (externalId: string) => string;
1024
1191
  /** Avatar URL resolver — same role as `labelFor`, for the direct-chat avatar. */
1025
1192
  avatarFor?: (externalId: string) => string | null;
1193
+ /**
1194
+ * Direct chats: the other person's presence badge (online, away, in a
1195
+ * call, do not disturb) on the row's avatar. Defaults to `true`.
1196
+ */
1197
+ showPresence?: boolean;
1198
+ /**
1199
+ * `'comfortable'` (default): avatar, name, preview and time.
1200
+ * `'compact'`: one line per conversation, small avatar, no preview.
1201
+ */
1202
+ density?: 'comfortable' | 'compact';
1203
+ /**
1204
+ * Split the list under headings: each conversation goes under the
1205
+ * first section whose `filter` takes it (ones no section takes aren't
1206
+ * shown); empty sections are hidden. Overrides `groupBy`.
1207
+ */
1208
+ sections?: ConversationListSection[];
1209
+ /** `'type'`: "Channels" (groups), then "Direct messages". */
1210
+ groupBy?: 'type';
1211
+ /** Rendered above the list (a title, a search field, a "New chat" button). */
1212
+ header?: ReactNode;
1213
+ /**
1214
+ * Controlled mode's paging (with `conversations`): there's another
1215
+ * page, one is loading, and load it. Uncontrolled, the list pages
1216
+ * `useConversations()` itself as it's scrolled to the end.
1217
+ */
1218
+ hasMore?: boolean;
1219
+ loadingMore?: boolean;
1220
+ onLoadMore?: () => void | Promise<void>;
1026
1221
  }
1027
- declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, conversations: controlledConversations, loading: controlledLoading, error: controlledError, unreadCounts, labelFor, avatarFor, }: ConversationListProps): react_jsx_runtime.JSX.Element;
1222
+ /** A heading in `<ConversationList sections>`. */
1223
+ interface ConversationListSection {
1224
+ title: string;
1225
+ filter: (conversation: Conversation) => boolean;
1226
+ }
1227
+ declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, conversations: controlledConversations, loading: controlledLoading, error: controlledError, unreadCounts, labelFor, avatarFor, showPresence, density, sections, groupBy, header, hasMore: controlledHasMore, loadingMore: controlledLoadingMore, onLoadMore, }: ConversationListProps): react_jsx_runtime.JSX.Element;
1028
1228
 
1029
1229
  interface MemberListProps {
1030
1230
  conversationId: Uuid;
@@ -1040,14 +1240,17 @@ interface MemberListProps {
1040
1240
  */
1041
1241
  avatarFor?: (externalId: string) => string | null;
1042
1242
  /**
1043
- * Override the online set with a caller-supplied source of
1044
- * `external_id`s. By default MemberList wires
1045
- * `usePresence(conversationId).online` itself, so the presence dots
1046
- * light up out-of-the-box. Pass an explicit `Set` when you want to
1047
- * merge presence with other signals (typing, focus, etc), or an
1048
- * empty `new Set()` to disable the dots entirely.
1243
+ * Override presence with a caller-supplied set of online
1244
+ * `external_id`s (a plain green dot, "online" / "offline"). By
1245
+ * default each member's presence (online / away / in a call /
1246
+ * offline, do not disturb) comes from `usePresenceMany`.
1049
1247
  */
1050
1248
  onlineExternalIds?: Set<string>;
1249
+ /**
1250
+ * Presence badges on the avatars and the state ("Online", "Away",
1251
+ * "In a call", "Last seen 5m ago") under each name. Defaults to `true`.
1252
+ */
1253
+ showPresence?: boolean;
1051
1254
  /**
1052
1255
  * If provided, surfaces a "remove" icon next to each member that
1053
1256
  * the caller is allowed to remove. The caller is responsible for
@@ -1059,7 +1262,7 @@ interface MemberListProps {
1059
1262
  /** Custom empty state when the conversation has zero members. */
1060
1263
  emptyState?: ReactNode;
1061
1264
  }
1062
- declare function MemberList({ conversationId, labelFor, avatarFor, onlineExternalIds, canRemove, renderItem, emptyState, }: MemberListProps): react_jsx_runtime.JSX.Element;
1265
+ declare function MemberList({ conversationId, labelFor, avatarFor, onlineExternalIds, showPresence, canRemove, renderItem, emptyState, }: MemberListProps): react_jsx_runtime.JSX.Element;
1063
1266
 
1064
1267
  interface AttachmentPreviewProps {
1065
1268
  /**
@@ -1079,10 +1282,20 @@ interface AttachmentPreviewProps {
1079
1282
  }
1080
1283
  declare function AttachmentPreview({ attachment, onClick }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
1081
1284
 
1285
+ interface LinkPreviewCardProps {
1286
+ preview: LinkPreview;
1287
+ /** Shows a × that calls this (the sender removing the preview). */
1288
+ onRemove?: () => void;
1289
+ className?: string;
1290
+ }
1291
+ declare function LinkPreviewCard({ preview, onRemove, className }: LinkPreviewCardProps): react_jsx_runtime.JSX.Element | null;
1292
+
1082
1293
  interface UploadQueueStripProps {
1083
1294
  items: UploadItem[];
1084
1295
  onCancel: (localId: string) => void;
1085
1296
  onDismiss: (localId: string) => void;
1297
+ /** A thumbnail URL for an item (e.g. an object URL of a picked image), or null. */
1298
+ previewFor?: (item: UploadItem) => string | null;
1086
1299
  }
1087
1300
  /**
1088
1301
  * Strip of staged attachments shown above the composer — pending,
@@ -1091,7 +1304,7 @@ interface UploadQueueStripProps {
1091
1304
  * press send" — the composer parent sweeps them out only after the
1092
1305
  * send completes successfully.
1093
1306
  */
1094
- declare function UploadQueueStrip({ items, onCancel, onDismiss }: UploadQueueStripProps): react_jsx_runtime.JSX.Element | null;
1307
+ declare function UploadQueueStrip({ items, onCancel, onDismiss, previewFor, }: UploadQueueStripProps): react_jsx_runtime.JSX.Element | null;
1095
1308
 
1096
1309
  interface ReactionStripProps {
1097
1310
  messageId: Uuid;
@@ -1113,14 +1326,34 @@ interface ReactionStripProps {
1113
1326
  */
1114
1327
  declare function ReactionStrip({ messageId, conversationId, initialReactions, currentUserId, picker, }: ReactionStripProps): react_jsx_runtime.JSX.Element | null;
1115
1328
  /**
1116
- * Emoji picker popover. Renders the common set; customers needing
1117
- * the full emoji set should provide their own picker via children.
1329
+ * Reaction picker popover: the six common reactions and a "+" that
1330
+ * opens the full `<EmojiPicker>` (search, recently used, categories).
1118
1331
  */
1119
1332
  declare function ReactionPicker({ onPick, onClose, }: {
1120
1333
  onPick: (emoji: string) => void;
1121
1334
  onClose?: () => void;
1122
1335
  }): react_jsx_runtime.JSX.Element;
1123
1336
 
1337
+ interface EmojiCategoryData {
1338
+ id: string;
1339
+ label: string;
1340
+ /** `[emoji, search keywords]` */
1341
+ emojis: ReadonlyArray<readonly [string, string]>;
1342
+ }
1343
+
1344
+ interface EmojiPickerProps {
1345
+ /** An emoji was chosen. */
1346
+ onPick: (emoji: string) => void;
1347
+ /** Escape or a click outside. */
1348
+ onClose?: () => void;
1349
+ /** Focus the search field on open. Defaults to `true`. */
1350
+ autoFocus?: boolean;
1351
+ className?: string;
1352
+ }
1353
+ /** Load the emoji list (once). Call it early to warm the picker. */
1354
+ declare function loadEmojiData(): Promise<ReadonlyArray<EmojiCategoryData>>;
1355
+ declare function EmojiPicker({ onPick, onClose, autoFocus, className }: EmojiPickerProps): react_jsx_runtime.JSX.Element;
1356
+
1124
1357
  interface MentionInputProps {
1125
1358
  conversationId: Uuid;
1126
1359
  /**
@@ -1153,6 +1386,20 @@ interface MentionInputProps {
1153
1386
  * Defaults to `true`.
1154
1387
  */
1155
1388
  attachments?: boolean;
1389
+ /** An emoji button that opens `<EmojiPicker>` and inserts at the caret. Default `true`. */
1390
+ emojiPicker?: boolean;
1391
+ /**
1392
+ * The text changed (typing, an emoji, a restored draft, the reset after
1393
+ * a send). Not called for the initial empty value.
1394
+ */
1395
+ onValueChange?: (value: string) => void;
1396
+ /** Largest attachment accepted, in bytes; bigger files show an error chip instead. */
1397
+ maxFileSize?: number;
1398
+ /**
1399
+ * Accepted attachment types — MIME types, wildcards (`'image/*'`) or
1400
+ * extensions (`'.pdf'`). Other files show an error chip instead.
1401
+ */
1402
+ acceptFileTypes?: string[];
1156
1403
  }
1157
1404
  declare const MentionInput: react.ForwardRefExoticComponent<MentionInputProps & react.RefAttributes<MessageComposerHandle>>;
1158
1405
 
@@ -1206,4 +1453,4 @@ declare function usePoolseFonts(enabled?: boolean): void;
1206
1453
  */
1207
1454
  declare function PoolseFonts(): null;
1208
1455
 
1209
- export { AttachmentPreview, type AttachmentPreviewProps, Avatar, type AvatarProps, CallControlButton, type CallControlButtonProps, CallDeviceMenu, type CallDeviceMenuProps, CallLogRow, type CallLogRowProps, CallVideoGrid, type CallVideoGridProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, ConversationList, type ConversationListProps, ConversationView, type ConversationViewProps, EditableMessageBubble, type EditableMessageBubbleProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, type InboxUser, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, PoolseFonts, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, PoolseTheme, type PoolseThemeProps, type PoolseThemeValue, ReactionPicker, ReactionStrip, type ReactionStripProps, type RenderMessageContext, RoomJoinBar, type RoomJoinBarProps, RoomStage, type RoomStageProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, UserPickerSheet, type UserPickerSheetProps, useDisplayName, usePoolseFonts, useSystemColorScheme, useTheme };
1456
+ export { AttachmentPreview, type AttachmentPreviewProps, Avatar, type AvatarProps, CallControlButton, type CallControlButtonProps, CallDeviceMenu, type CallDeviceMenuProps, CallLogRow, type CallLogRowProps, CallVideoGrid, type CallVideoGridProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, ConversationList, type ConversationListProps, type ConversationListSection, ConversationView, type ConversationViewProps, type DraftStorage, EditableMessageBubble, type EditableMessageBubbleProps, EditedLabel, type EditedLabelProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, PoolseFonts, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, PoolseTheme, type PoolseThemeProps, type PoolseThemeValue, PresenceBadge, type PresenceBadgeProps, ReactionPicker, ReactionStrip, type ReactionStripProps, type RenderMessageContext, RoomJoinBar, type RoomJoinBarProps, RoomStage, type RoomStageProps, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, type UploadQueueStripProps, UserName, type UserNameProps, UserPickerSheet, type UserPickerSheetProps, formatRelativeTime, loadEmojiData, localDraftStorage, presenceStateLabel, presenceText, useDisplayName, useEditHistory, usePoolseFonts, useSystemColorScheme, useTheme };