@poolse/react-ui 3.7.1 → 3.9.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/CHANGELOG.md +43 -0
- package/README.md +72 -1
- package/dist/index.cjs +1085 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +325 -8
- package/dist/index.d.ts +325 -8
- package/dist/index.js +1072 -85
- package/dist/index.js.map +1 -1
- package/dist/styles.css +595 -0
- package/package.json +5 -4
package/dist/index.d.ts
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, PresenceState, Presence, Membership, Attachment, LinkPreview, MessageCreateRequest } from '@poolse/sdk';
|
|
2
|
+
import { CallParticipant, CallDevice, CallDeviceKind, Message, Poolse, Uuid, LiveCall, Conversation, RecordingMode, ConsentDecision, 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';
|
|
@@ -356,6 +356,95 @@ interface ConversationDraft {
|
|
|
356
356
|
}
|
|
357
357
|
/** `window.localStorage`, every call guarded (private mode, blocked storage, SSR). */
|
|
358
358
|
declare const localDraftStorage: DraftStorage;
|
|
359
|
+
/**
|
|
360
|
+
* One client's drafts: held in memory for the page (so switching
|
|
361
|
+
* conversations, or workspaces, and back finds them) and written to a
|
|
362
|
+
* storage under the client's namespace (server + user), so two
|
|
363
|
+
* workspaces never see each other's drafts. Cleared from storage by
|
|
364
|
+
* `chat.destroy({ clearStorage: true })`.
|
|
365
|
+
*/
|
|
366
|
+
declare class DraftScope {
|
|
367
|
+
private readonly namespace;
|
|
368
|
+
private readonly memory;
|
|
369
|
+
/** Storages written to, and the keys written to each. */
|
|
370
|
+
private readonly written;
|
|
371
|
+
constructor(namespace: () => string | null);
|
|
372
|
+
/** The storage key for a conversation's draft; null until the namespace is known. */
|
|
373
|
+
key(conversationId: string): string | null;
|
|
374
|
+
/** The draft for `key`: from memory, else from `storage` (else from `legacyKey`, moved over). */
|
|
375
|
+
read(storage: DraftStorage, key: string, legacyKey?: string): ConversationDraft | null | Promise<ConversationDraft | null>;
|
|
376
|
+
/** Save (or, when empty, drop) the draft for `key`. */
|
|
377
|
+
write(storage: DraftStorage, key: string, draft: ConversationDraft): void;
|
|
378
|
+
clear(storage: DraftStorage, key: string): void;
|
|
379
|
+
/** Called by `chat.destroy()`. @internal */
|
|
380
|
+
destroy(opts: {
|
|
381
|
+
clearStorage: boolean;
|
|
382
|
+
}): Promise<void>;
|
|
383
|
+
private track;
|
|
384
|
+
}
|
|
385
|
+
/** The drafts of one client (made on first use, dropped with it). */
|
|
386
|
+
declare function draftsOf(chat: Poolse): DraftScope;
|
|
387
|
+
|
|
388
|
+
/** One shortcut, e.g. `'Mod+Enter'`, `'Escape'`, `'j'`. */
|
|
389
|
+
type KeyBinding = string;
|
|
390
|
+
interface ComposerKeymap {
|
|
391
|
+
/** Send the message. Default `Enter` and `Mod+Enter`. */
|
|
392
|
+
send: KeyBinding[];
|
|
393
|
+
/** Insert a new line. Default `Shift+Enter`. */
|
|
394
|
+
newline: KeyBinding[];
|
|
395
|
+
/** In an empty composer: edit your last message. Default `ArrowUp`. */
|
|
396
|
+
editLast: KeyBinding[];
|
|
397
|
+
/** Cancel the reply being composed (or an edit). Default `Escape`. */
|
|
398
|
+
cancel: KeyBinding[];
|
|
399
|
+
}
|
|
400
|
+
interface MessageListKeymap {
|
|
401
|
+
/** Focus the next (newer) message. Default `j`, `ArrowDown`. */
|
|
402
|
+
next: KeyBinding[];
|
|
403
|
+
/** Focus the previous (older) message. Default `k`, `ArrowUp`. */
|
|
404
|
+
prev: KeyBinding[];
|
|
405
|
+
/** Focus the newest message. Default `End`. */
|
|
406
|
+
last: KeyBinding[];
|
|
407
|
+
/** Focus the oldest loaded message. Default `Home`. */
|
|
408
|
+
first: KeyBinding[];
|
|
409
|
+
/** Quote-reply to the focused message. Default `r`. */
|
|
410
|
+
reply: KeyBinding[];
|
|
411
|
+
/** Open the focused message's thread. Default `t`. */
|
|
412
|
+
thread: KeyBinding[];
|
|
413
|
+
/** Edit the focused message (yours). Default `e`. */
|
|
414
|
+
edit: KeyBinding[];
|
|
415
|
+
/** Delete the focused message (yours), after a confirmation. Default `Delete`, `Backspace`. */
|
|
416
|
+
delete: KeyBinding[];
|
|
417
|
+
/** Back to the composer. Default `Escape`. */
|
|
418
|
+
composer: KeyBinding[];
|
|
419
|
+
}
|
|
420
|
+
interface PoolseKeymap {
|
|
421
|
+
composer: ComposerKeymap;
|
|
422
|
+
messageList: MessageListKeymap;
|
|
423
|
+
}
|
|
424
|
+
/** Overrides: any binding list replaces the default one; `[]` turns a shortcut off. */
|
|
425
|
+
interface PoolseKeymapOverrides {
|
|
426
|
+
composer?: Partial<ComposerKeymap>;
|
|
427
|
+
messageList?: Partial<MessageListKeymap>;
|
|
428
|
+
}
|
|
429
|
+
declare const DEFAULT_KEYMAP: PoolseKeymap;
|
|
430
|
+
/**
|
|
431
|
+
* The keymap with `sendOn: 'mod+enter'`: Enter makes a new line and
|
|
432
|
+
* Cmd/Ctrl+Enter sends — for teams that write long messages.
|
|
433
|
+
*/
|
|
434
|
+
declare const MOD_ENTER_COMPOSER: Pick<ComposerKeymap, 'send' | 'newline'>;
|
|
435
|
+
/** The default keymap with `overrides` (and the send mode) applied. */
|
|
436
|
+
declare function resolveKeymap(overrides?: PoolseKeymapOverrides, sendOn?: 'enter' | 'mod+enter'): PoolseKeymap;
|
|
437
|
+
interface KeyLike {
|
|
438
|
+
key: string;
|
|
439
|
+
metaKey: boolean;
|
|
440
|
+
ctrlKey: boolean;
|
|
441
|
+
altKey: boolean;
|
|
442
|
+
shiftKey: boolean;
|
|
443
|
+
}
|
|
444
|
+
/** Whether a keyboard event is `binding`. */
|
|
445
|
+
declare function matchesKey(e: KeyLike, binding: KeyBinding): boolean;
|
|
446
|
+
/** Whether a keyboard event is any of `bindings`. */
|
|
447
|
+
declare function matchesAny(e: KeyLike, bindings: ReadonlyArray<KeyBinding>): boolean;
|
|
359
448
|
|
|
360
449
|
/**
|
|
361
450
|
* Position of this bubble within a same-sender, same-day, ≤5-min
|
|
@@ -527,8 +616,37 @@ interface RenderMessageContext {
|
|
|
527
616
|
|
|
528
617
|
interface ConversationViewProps {
|
|
529
618
|
conversationId: Uuid;
|
|
530
|
-
/**
|
|
531
|
-
|
|
619
|
+
/**
|
|
620
|
+
* What an empty conversation shows. Defaults to "No messages yet"
|
|
621
|
+
* with a hint to write the first one (or none, read-only). A
|
|
622
|
+
* function receives `{ readOnly }`.
|
|
623
|
+
*/
|
|
624
|
+
emptyState?: ReactNode | ((ctx: {
|
|
625
|
+
readOnly: boolean;
|
|
626
|
+
}) => ReactNode);
|
|
627
|
+
/**
|
|
628
|
+
* Keyboard shortcuts, scoped to this view (an app's own shortcuts
|
|
629
|
+
* never collide). Composer: Enter sends (see `sendOn`), Shift+Enter
|
|
630
|
+
* makes a new line, ↑ in an empty composer edits your last message,
|
|
631
|
+
* Esc cancels a reply. Message list (focus it with Tab or a click):
|
|
632
|
+
* j / k or ↓ / ↑ move between messages, Home / End jump, r replies,
|
|
633
|
+
* t opens the thread, e edits, Delete deletes (yours, after a
|
|
634
|
+
* confirm), Esc goes back to the composer. Override any binding;
|
|
635
|
+
* `[]` turns one off. See `DEFAULT_KEYMAP`.
|
|
636
|
+
*/
|
|
637
|
+
keymap?: PoolseKeymapOverrides;
|
|
638
|
+
/**
|
|
639
|
+
* `'enter'` (default): Enter sends, Shift+Enter is a new line.
|
|
640
|
+
* `'mod+enter'`: Enter is a new line, Cmd/Ctrl+Enter sends.
|
|
641
|
+
*/
|
|
642
|
+
sendOn?: 'enter' | 'mod+enter';
|
|
643
|
+
/** The message-list shortcuts (j / k / r / t / e / Delete). Defaults to `true`. */
|
|
644
|
+
keyboardShortcuts?: boolean;
|
|
645
|
+
/**
|
|
646
|
+
* Asked before the Delete shortcut deletes a message. Defaults to
|
|
647
|
+
* `window.confirm`. Return false to keep it.
|
|
648
|
+
*/
|
|
649
|
+
confirmDelete?: (message: Message) => boolean | Promise<boolean>;
|
|
532
650
|
/**
|
|
533
651
|
* Render-prop escape hatch for individual messages. When set,
|
|
534
652
|
* COMPLETELY overrides the default per-message rendering — you
|
|
@@ -727,7 +845,7 @@ interface ConversationViewProps {
|
|
|
727
845
|
*/
|
|
728
846
|
draftStorage?: DraftStorage;
|
|
729
847
|
}
|
|
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;
|
|
848
|
+
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, keymap: keymapOverrides, sendOn, keyboardShortcuts, confirmDelete, }: ConversationViewProps): react_jsx_runtime.JSX.Element;
|
|
731
849
|
|
|
732
850
|
interface ChatHeaderProps {
|
|
733
851
|
/** Conversation id — used to fetch the row + members for the title / presence dot. */
|
|
@@ -756,6 +874,40 @@ interface ChatHeaderProps {
|
|
|
756
874
|
}
|
|
757
875
|
declare function ChatHeader({ conversationId, labelFor, avatarFor, onBack, onPress, onMembersPress, rightSlot, showPresence, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
|
|
758
876
|
|
|
877
|
+
interface EmptyStateProps {
|
|
878
|
+
/** What's empty, in a few words: "No messages yet". */
|
|
879
|
+
title: ReactNode;
|
|
880
|
+
/** What to do next: "Say hello — your message starts the conversation." */
|
|
881
|
+
hint?: ReactNode;
|
|
882
|
+
/** A button or link for the next step. */
|
|
883
|
+
action?: ReactNode;
|
|
884
|
+
className?: string;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* An empty screen that says what to do next. The components use it for
|
|
888
|
+
* their defaults (an empty conversation list, an empty channel, a search
|
|
889
|
+
* with no results); pass your own `emptyState` to any of them to
|
|
890
|
+
* replace it, or use this to keep the look.
|
|
891
|
+
*/
|
|
892
|
+
declare function EmptyState({ title, hint, action, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
894
|
+
interface SendStatusProps {
|
|
895
|
+
message: Message;
|
|
896
|
+
/** Send it again (failed or queued). */
|
|
897
|
+
onRetry?: () => void;
|
|
898
|
+
/** Drop the unsent message. */
|
|
899
|
+
onDiscard?: () => void;
|
|
900
|
+
/** Align with the bubble: right for your own messages. */
|
|
901
|
+
align?: 'left' | 'right';
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Under an unsent message: "Waiting for network…" while it's queued
|
|
905
|
+
* offline (it goes out by itself on reconnect), or "Not sent" with
|
|
906
|
+
* Retry and Delete when the server refused it. Nothing for a message
|
|
907
|
+
* that's on its way or sent.
|
|
908
|
+
*/
|
|
909
|
+
declare function SendStatus({ message, onRetry, onDiscard, align }: SendStatusProps): react_jsx_runtime.JSX.Element | null;
|
|
910
|
+
|
|
759
911
|
/** Minimal user shape the picker renders. Matches the RN InboxUser. */
|
|
760
912
|
interface InboxUser {
|
|
761
913
|
externalId: string;
|
|
@@ -878,6 +1030,14 @@ interface RoomStageProps {
|
|
|
878
1030
|
title?: string;
|
|
879
1031
|
labelFor?: (userId: string) => string;
|
|
880
1032
|
className?: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* Show recording and transcript state: the banner, and the consent
|
|
1035
|
+
* prompt for anyone who hasn't accepted (late joiners too). Defaults
|
|
1036
|
+
* to true.
|
|
1037
|
+
*/
|
|
1038
|
+
capture?: boolean;
|
|
1039
|
+
/** A Record / Stop recording control in the bar, where the server can record. Defaults to false. */
|
|
1040
|
+
allowRecord?: boolean;
|
|
881
1041
|
}
|
|
882
1042
|
/**
|
|
883
1043
|
* The room you are in: everyone's video (or their initial while their
|
|
@@ -886,7 +1046,129 @@ interface RoomStageProps {
|
|
|
886
1046
|
* screen sharing where the browser and the workspace allow it, and Leave. Fills its container: give it the
|
|
887
1047
|
* space your layout has for the stage.
|
|
888
1048
|
*/
|
|
889
|
-
declare function RoomStage({ room, title, labelFor, className }: RoomStageProps): react_jsx_runtime.JSX.Element;
|
|
1049
|
+
declare function RoomStage({ room, title, labelFor, className, capture, allowRecord, }: RoomStageProps): react_jsx_runtime.JSX.Element;
|
|
1050
|
+
|
|
1051
|
+
interface RecordingBannerProps {
|
|
1052
|
+
/** A recording is running. */
|
|
1053
|
+
recording: boolean;
|
|
1054
|
+
/** A live transcript is running. */
|
|
1055
|
+
transcribing?: boolean;
|
|
1056
|
+
mode?: RecordingMode | null;
|
|
1057
|
+
/** Capture needs consent here (`useRecording().consentRequired`). */
|
|
1058
|
+
consentRequired?: boolean;
|
|
1059
|
+
/** Your answer (`useRecording().myConsent`). `declined` shows "listen-only" and a way to change it. */
|
|
1060
|
+
myConsent?: ConsentDecision | null;
|
|
1061
|
+
/** Shows a Stop button (for whoever may stop it). */
|
|
1062
|
+
onStop?: () => void;
|
|
1063
|
+
/** After declining: reopen the prompt. */
|
|
1064
|
+
onChangeConsent?: () => void;
|
|
1065
|
+
/** Disable the buttons (a request is in flight). */
|
|
1066
|
+
pending?: boolean;
|
|
1067
|
+
className?: string;
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* "● Recording · Everyone in the call is told [Stop]" — a strip across
|
|
1071
|
+
* a captured call, for everyone in it (late joiners too: it reads the
|
|
1072
|
+
* call snapshot). Renders nothing while nothing is captured.
|
|
1073
|
+
*/
|
|
1074
|
+
declare function RecordingBanner({ recording, transcribing, mode, consentRequired, myConsent, onStop, onChangeConsent, pending, className, }: RecordingBannerProps): react_jsx_runtime.JSX.Element | null;
|
|
1075
|
+
interface RecordingIndicatorProps {
|
|
1076
|
+
recording: boolean;
|
|
1077
|
+
transcribing?: boolean;
|
|
1078
|
+
mode?: RecordingMode | null;
|
|
1079
|
+
className?: string;
|
|
1080
|
+
}
|
|
1081
|
+
/** A small "● REC" pill for a call header or tile. Nothing while nothing is captured. */
|
|
1082
|
+
declare function RecordingIndicator({ recording, transcribing, mode, className, }: RecordingIndicatorProps): react_jsx_runtime.JSX.Element | null;
|
|
1083
|
+
interface ConsentPromptProps {
|
|
1084
|
+
/** A recording is running. */
|
|
1085
|
+
recording: boolean;
|
|
1086
|
+
/** A live transcript is running. */
|
|
1087
|
+
transcribing?: boolean;
|
|
1088
|
+
mode?: RecordingMode | null;
|
|
1089
|
+
/** Who started it, if known ("Elena started recording"). Never pass a raw id. */
|
|
1090
|
+
startedByName?: string | null;
|
|
1091
|
+
/** Answer (e.g. `useRecording().consent`). A `false` result keeps the prompt open with an error. */
|
|
1092
|
+
onAnswer: (decision: ConsentDecision) => Promise<boolean | void> | boolean | void;
|
|
1093
|
+
/**
|
|
1094
|
+
* Called once an accept went through: publishing is allowed again, so
|
|
1095
|
+
* bring your microphone and camera back (`useCallRoom().republish`;
|
|
1096
|
+
* `CallRoom` does it by itself unless `republishOnPermission: false`).
|
|
1097
|
+
*/
|
|
1098
|
+
onAccepted?: () => void;
|
|
1099
|
+
/** Called after a decline went through (e.g. close the prompt). */
|
|
1100
|
+
onDeclined?: () => void;
|
|
1101
|
+
/** Disable the buttons (a request is in flight). */
|
|
1102
|
+
pending?: boolean;
|
|
1103
|
+
/** An error to show under the buttons. */
|
|
1104
|
+
error?: string | null;
|
|
1105
|
+
/** Fill the nearest positioned ancestor with a scrim. Defaults to true; false renders the card only. */
|
|
1106
|
+
overlay?: boolean;
|
|
1107
|
+
className?: string;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Asks someone in a captured call for consent — shown to anyone who
|
|
1111
|
+
* hasn't accepted, late joiners included, when the room requires it.
|
|
1112
|
+
* Until they agree their microphone and camera stay off; they still
|
|
1113
|
+
* hear and see everyone. Declining keeps them listen-only.
|
|
1114
|
+
*/
|
|
1115
|
+
declare function ConsentPrompt({ recording, transcribing, mode, startedByName, onAnswer, onAccepted, onDeclined, pending, error, overlay, className, }: ConsentPromptProps): react_jsx_runtime.JSX.Element;
|
|
1116
|
+
interface RecordingNoticeRowProps {
|
|
1117
|
+
/** The recording notice message. Rows that aren't one render nothing. */
|
|
1118
|
+
msg: Pick<Message, 'type' | 'body' | 'inserted_at'> & {
|
|
1119
|
+
deleted_at?: string | null;
|
|
1120
|
+
};
|
|
1121
|
+
/** Current user's id — "by you". */
|
|
1122
|
+
meId: string | null;
|
|
1123
|
+
/** A poolse user id → display name. Unknown: the name is left out. */
|
|
1124
|
+
nameFor?: (userId: Uuid) => string | null | undefined;
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* "● Recording started · by Elena · 10:04" — the chat line the server
|
|
1128
|
+
* posts when a recording starts or stops, the notice for anyone who
|
|
1129
|
+
* comes later. `<MessageRow>` renders it for you.
|
|
1130
|
+
*/
|
|
1131
|
+
declare function RecordingNoticeRow({ msg, meId, nameFor }: RecordingNoticeRowProps): react_jsx_runtime.JSX.Element | null;
|
|
1132
|
+
|
|
1133
|
+
interface LiveTranscriptPanelProps {
|
|
1134
|
+
/** The call. Null renders an empty panel. */
|
|
1135
|
+
callId: string | null;
|
|
1136
|
+
/** Keep the transcript topic open. Defaults to true; false while the panel is hidden. */
|
|
1137
|
+
enabled?: boolean;
|
|
1138
|
+
/** Start / Stop transcription buttons (someone in the call). Defaults to true. */
|
|
1139
|
+
showControls?: boolean;
|
|
1140
|
+
/** Shows a close button. */
|
|
1141
|
+
onClose?: () => void;
|
|
1142
|
+
title?: string;
|
|
1143
|
+
className?: string;
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* The call's live transcript as it is spoken: speaker, time and text,
|
|
1147
|
+
* the current speaker's words in grey until they are final. Opens the
|
|
1148
|
+
* transcript topic while mounted (the last 200 lines arrive at once)
|
|
1149
|
+
* and sticks to the bottom unless you scroll up.
|
|
1150
|
+
*/
|
|
1151
|
+
declare function LiveTranscriptPanel({ callId, enabled, showControls, onClose, title, className, }: LiveTranscriptPanelProps): react_jsx_runtime.JSX.Element;
|
|
1152
|
+
interface TranscriptViewerProps {
|
|
1153
|
+
/** The call whose stored transcript to show. */
|
|
1154
|
+
callId: string | null;
|
|
1155
|
+
/**
|
|
1156
|
+
* Offer speaker renames. Defaults to true; the server allows it for
|
|
1157
|
+
* people who took part in the call and the conversation's owners and
|
|
1158
|
+
* admins, and anyone else gets an explanation instead.
|
|
1159
|
+
*/
|
|
1160
|
+
canRename?: boolean;
|
|
1161
|
+
/** Makes timestamps buttons, e.g. to seek a recording (ms since the transcript started). */
|
|
1162
|
+
onSeek?: (ms: number) => void;
|
|
1163
|
+
title?: string;
|
|
1164
|
+
className?: string;
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* A call's stored transcript: who spoke, when, and what they said;
|
|
1168
|
+
* search within it; and correct a speaker's name (everyone viewing sees
|
|
1169
|
+
* the change at once).
|
|
1170
|
+
*/
|
|
1171
|
+
declare function TranscriptViewer({ callId, canRename, onSeek, title, className, }: TranscriptViewerProps): react_jsx_runtime.JSX.Element | null;
|
|
890
1172
|
|
|
891
1173
|
interface EditedLabelProps {
|
|
892
1174
|
messageId: Uuid;
|
|
@@ -969,6 +1251,18 @@ interface MessageComposerProps {
|
|
|
969
1251
|
* extensions (`'.pdf'`). Other files show an error chip instead.
|
|
970
1252
|
*/
|
|
971
1253
|
acceptFileTypes?: string[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Composer shortcuts (send, new line, edit last, cancel) — see
|
|
1256
|
+
* `ComposerKeymap`. Defaults: Enter / Cmd+Enter send, Shift+Enter new
|
|
1257
|
+
* line, ↑ in an empty composer edits your last message, Esc cancels
|
|
1258
|
+
* the reply.
|
|
1259
|
+
*/
|
|
1260
|
+
keymap?: ComposerKeymap;
|
|
1261
|
+
/**
|
|
1262
|
+
* ↑ in an empty composer: edit your last message. Return `false`
|
|
1263
|
+
* when there's none to edit (the caret then moves as usual).
|
|
1264
|
+
*/
|
|
1265
|
+
onEditLast?: () => boolean | void;
|
|
972
1266
|
}
|
|
973
1267
|
/**
|
|
974
1268
|
* Imperative handle exposed via `ref` for parents that want to forward
|
|
@@ -1171,8 +1465,19 @@ interface ConversationListProps {
|
|
|
1171
1465
|
onSelect?: (conv: Conversation) => void;
|
|
1172
1466
|
/** Optional override for each row's rendering. */
|
|
1173
1467
|
renderItem?: (conv: Conversation, selected: boolean) => ReactNode;
|
|
1174
|
-
/**
|
|
1468
|
+
/**
|
|
1469
|
+
* What an empty list shows. Defaults to "No conversations yet" with a
|
|
1470
|
+
* hint at the next step.
|
|
1471
|
+
*/
|
|
1175
1472
|
emptyState?: ReactNode;
|
|
1473
|
+
/**
|
|
1474
|
+
* Show only conversations matching this text (name, the other
|
|
1475
|
+
* person in a direct chat via `labelFor`, the last message). For a
|
|
1476
|
+
* search field in `header`. Empty = everything.
|
|
1477
|
+
*/
|
|
1478
|
+
query?: string;
|
|
1479
|
+
/** What shows when `query` matches nothing. Receives the query. */
|
|
1480
|
+
noResultsState?: ReactNode | ((query: string) => ReactNode);
|
|
1176
1481
|
/**
|
|
1177
1482
|
* Controlled mode — when provided, render from these props instead
|
|
1178
1483
|
* of calling `useConversations()` internally. Lets parent components
|
|
@@ -1235,7 +1540,7 @@ interface ConversationListSection {
|
|
|
1235
1540
|
title: string;
|
|
1236
1541
|
filter: (conversation: Conversation) => boolean;
|
|
1237
1542
|
}
|
|
1238
|
-
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;
|
|
1543
|
+
declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, query, noResultsState, 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;
|
|
1239
1544
|
|
|
1240
1545
|
interface MemberListProps {
|
|
1241
1546
|
conversationId: Uuid;
|
|
@@ -1411,6 +1716,18 @@ interface MentionInputProps {
|
|
|
1411
1716
|
* extensions (`'.pdf'`). Other files show an error chip instead.
|
|
1412
1717
|
*/
|
|
1413
1718
|
acceptFileTypes?: string[];
|
|
1719
|
+
/**
|
|
1720
|
+
* Composer shortcuts (send, new line, edit last, cancel) — see
|
|
1721
|
+
* `ComposerKeymap`. Defaults: Enter / Cmd+Enter send, Shift+Enter new
|
|
1722
|
+
* line, ↑ in an empty composer edits your last message, Esc cancels
|
|
1723
|
+
* the reply.
|
|
1724
|
+
*/
|
|
1725
|
+
keymap?: ComposerKeymap;
|
|
1726
|
+
/**
|
|
1727
|
+
* ↑ in an empty composer: edit your last message. Return `false`
|
|
1728
|
+
* when there's none to edit (the caret then moves as usual).
|
|
1729
|
+
*/
|
|
1730
|
+
onEditLast?: () => boolean | void;
|
|
1414
1731
|
}
|
|
1415
1732
|
declare const MentionInput: react.ForwardRefExoticComponent<MentionInputProps & react.RefAttributes<MessageComposerHandle>>;
|
|
1416
1733
|
|
|
@@ -1464,4 +1781,4 @@ declare function usePoolseFonts(enabled?: boolean): void;
|
|
|
1464
1781
|
*/
|
|
1465
1782
|
declare function PoolseFonts(): null;
|
|
1466
1783
|
|
|
1467
|
-
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 };
|
|
1784
|
+
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 ComposerKeymap, ConsentPrompt, type ConsentPromptProps, type ConversationDraft, ConversationList, type ConversationListProps, type ConversationListSection, ConversationView, type ConversationViewProps, DEFAULT_KEYMAP, DraftScope, type DraftStorage, EditableMessageBubble, type EditableMessageBubbleProps, EditedLabel, type EditedLabelProps, EmojiPicker, type EmojiPickerProps, EmptyState, type EmptyStateProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, type InboxUser, type KeyBinding, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, LiveTranscriptPanel, type LiveTranscriptPanelProps, MOD_ENTER_COMPOSER, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerProps, type MessageListKeymap, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, PoolseFonts, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, type PoolseKeymap, type PoolseKeymapOverrides, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, PoolseTheme, type PoolseThemeProps, type PoolseThemeValue, PresenceBadge, type PresenceBadgeProps, ReactionPicker, ReactionStrip, type ReactionStripProps, RecordingBanner, type RecordingBannerProps, RecordingIndicator, type RecordingIndicatorProps, RecordingNoticeRow, type RecordingNoticeRowProps, type RenderMessageContext, RoomJoinBar, type RoomJoinBarProps, RoomStage, type RoomStageProps, SendStatus, type SendStatusProps, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TranscriptViewer, type TranscriptViewerProps, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, type UploadQueueStripProps, UserName, type UserNameProps, UserPickerSheet, type UserPickerSheetProps, draftsOf, formatRelativeTime, loadEmojiData, localDraftStorage, matchesAny, matchesKey, presenceStateLabel, presenceText, resolveKeymap, useDisplayName, useEditHistory, usePoolseFonts, useSystemColorScheme, useTheme };
|