@poolse/react-native 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/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ReactElement } from 'react';
3
- import { Conversation, Uuid, Message, LiveCall, AttachmentUploadInput, Membership, PresenceState, Attachment, LinkPreview } from '@poolse/sdk';
3
+ import { Conversation, Uuid, Message, LiveCall, RecordingMode, ConsentDecision, AttachmentUploadInput, Membership, PresenceState, Attachment, LinkPreview, Poolse } from '@poolse/sdk';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { GroupPosition } from '@poolse/react';
6
6
  import { StyleProp, ViewStyle } from 'react-native';
@@ -262,6 +262,11 @@ interface MessageRowProps {
262
262
  onAvatarPress?: (user: MessageUser) => void;
263
263
  /** Call-log rows: offer "Call back" (see `<CallLogRow onCallBack>`). */
264
264
  onCallBack?: (media: 'audio' | 'video') => void;
265
+ /**
266
+ * A poolse user id → display name, for system lines that name people
267
+ * by internal id (the recording notice). Unknown: the name is left out.
268
+ */
269
+ nameForUserId?: (userId: string) => string | null | undefined;
265
270
  /** `'bubbles'` (default), `'list'` or `'compact'` — see `ChatLayout`. */
266
271
  layout?: ChatLayout;
267
272
  /** `'comfortable'` (default) or `'compact'` spacing. */
@@ -288,6 +293,10 @@ interface MessageRowProps {
288
293
  onMarkUnread?: () => void;
289
294
  /** The "edited" label opens the edit history (`chat.messages.edits`). Defaults to true. */
290
295
  editHistory?: boolean;
296
+ /** Unsent message (queued or failed in the outbox): the Retry under it. */
297
+ onRetrySend?: () => void;
298
+ /** Unsent message: the Delete under it. */
299
+ onDiscardSend?: () => void;
291
300
  }
292
301
  declare function MessageRow(props: MessageRowProps): react_jsx_runtime.JSX.Element | null;
293
302
 
@@ -595,6 +604,127 @@ interface LiveCallBannerProps {
595
604
  */
596
605
  declare function LiveCallBanner({ call, inCall, onJoin }: LiveCallBannerProps): react_jsx_runtime.JSX.Element;
597
606
 
607
+ interface RecordingBannerProps {
608
+ /** A recording is running. */
609
+ recording: boolean;
610
+ /** A live transcript is running. */
611
+ transcribing?: boolean;
612
+ mode?: RecordingMode | null;
613
+ /** Capture needs consent here (`useRecording().consentRequired`). */
614
+ consentRequired?: boolean;
615
+ /** Your answer (`useRecording().myConsent`). `declined` shows "listen-only" and a way to change it. */
616
+ myConsent?: ConsentDecision | null;
617
+ /** Shows a Stop button (for whoever may stop it). */
618
+ onStop?: () => void;
619
+ /** After declining: reopen the prompt. */
620
+ onChangeConsent?: () => void;
621
+ /** Disable the buttons (a request is in flight). */
622
+ pending?: boolean;
623
+ style?: StyleProp<ViewStyle>;
624
+ }
625
+ /**
626
+ * "● Recording · Everyone in the call is told [Stop]" — a strip across
627
+ * a captured call, for everyone in it (late joiners too). Renders nothing
628
+ * while nothing is captured.
629
+ */
630
+ declare function RecordingBanner({ recording, transcribing, mode, consentRequired, myConsent, onStop, onChangeConsent, pending, style, }: RecordingBannerProps): react_jsx_runtime.JSX.Element | null;
631
+ interface RecordingIndicatorProps {
632
+ recording: boolean;
633
+ transcribing?: boolean;
634
+ mode?: RecordingMode | null;
635
+ /** Text colour, e.g. white over video. Defaults to the theme's danger colour. */
636
+ color?: string;
637
+ style?: StyleProp<ViewStyle>;
638
+ }
639
+ /** A small "● REC" pill for a call header or tile. Nothing while nothing is captured. */
640
+ declare function RecordingIndicator({ recording, transcribing, mode, color, style, }: RecordingIndicatorProps): react_jsx_runtime.JSX.Element | null;
641
+ interface ConsentPromptProps {
642
+ /** A recording is running. */
643
+ recording: boolean;
644
+ /** A live transcript is running. */
645
+ transcribing?: boolean;
646
+ mode?: RecordingMode | null;
647
+ /** Who started it, if known. Never pass a raw id. */
648
+ startedByName?: string | null;
649
+ /** Answer (e.g. `useRecording().consent`). A `false` result keeps the prompt open with an error. */
650
+ onAnswer: (decision: ConsentDecision) => Promise<boolean | void> | boolean | void;
651
+ /**
652
+ * Called once an accept went through: publishing is allowed again.
653
+ * With the native call core, re-enable the microphone and camera here;
654
+ * the SDK's `CallRoom` does it by itself.
655
+ */
656
+ onAccepted?: () => void;
657
+ /** Called after a decline went through (e.g. close the prompt). */
658
+ onDeclined?: () => void;
659
+ pending?: boolean;
660
+ error?: string | null;
661
+ /** Cover the parent with a scrim (absolute fill). Defaults to true; false renders the card only. */
662
+ overlay?: boolean;
663
+ style?: StyleProp<ViewStyle>;
664
+ }
665
+ /**
666
+ * Asks someone in a captured call for consent — shown to anyone who
667
+ * hasn't accepted, late joiners included, when the room requires it.
668
+ * Until they agree their microphone and camera stay off; they still hear
669
+ * and see everyone. Declining keeps them listen-only.
670
+ */
671
+ declare function ConsentPrompt({ recording, transcribing, mode, startedByName, onAnswer, onAccepted, onDeclined, pending, error, overlay, style, }: ConsentPromptProps): react_jsx_runtime.JSX.Element;
672
+ interface RecordingNoticeRowProps {
673
+ /** The recording notice message. Rows that aren't one render nothing. */
674
+ msg: Pick<Message, 'type' | 'body' | 'inserted_at'> & {
675
+ deleted_at?: string | null;
676
+ };
677
+ /** Current user's id — "by you". */
678
+ meId: string | null;
679
+ /** A poolse user id → display name. Unknown: the name is left out. */
680
+ nameFor?: (userId: Uuid) => string | null | undefined;
681
+ }
682
+ /**
683
+ * "● Recording started · by Elena · 10:04" — the chat line the server
684
+ * posts when a recording starts or stops. `<MessageRow>` renders it.
685
+ */
686
+ declare function RecordingNoticeRow({ msg, meId, nameFor }: RecordingNoticeRowProps): react_jsx_runtime.JSX.Element | null;
687
+
688
+ interface LiveTranscriptPanelProps {
689
+ /** The call. Null renders an empty panel. */
690
+ callId: string | null;
691
+ /** Keep the transcript topic open. Defaults to true; false while the panel is hidden. */
692
+ enabled?: boolean;
693
+ /** Start / Stop transcription buttons (someone in the call). Defaults to true. */
694
+ showControls?: boolean;
695
+ /** Shows a close button. */
696
+ onClose?: () => void;
697
+ title?: string;
698
+ style?: StyleProp<ViewStyle>;
699
+ }
700
+ /**
701
+ * The call's live transcript as it is spoken: speaker, time and text,
702
+ * the current speaker's words in grey until they are final. Opens the
703
+ * transcript topic while mounted (the last 200 lines arrive at once)
704
+ * and sticks to the bottom unless you scroll up.
705
+ */
706
+ declare function LiveTranscriptPanel({ callId, enabled, showControls, onClose, title, style, }: LiveTranscriptPanelProps): react_jsx_runtime.JSX.Element;
707
+ interface TranscriptViewerProps {
708
+ /** The call whose stored transcript to show. */
709
+ callId: string | null;
710
+ /**
711
+ * Offer speaker renames. Defaults to true; the server allows it for
712
+ * people who took part in the call and the conversation's owners and
713
+ * admins, and anyone else gets an explanation instead.
714
+ */
715
+ canRename?: boolean;
716
+ /** Makes timestamps pressable, e.g. to seek a recording (ms since the transcript started). */
717
+ onSeek?: (ms: number) => void;
718
+ title?: string;
719
+ style?: StyleProp<ViewStyle>;
720
+ }
721
+ /**
722
+ * A call's stored transcript: who spoke, when, and what they said;
723
+ * search within it; and correct a speaker's name (everyone viewing sees
724
+ * the change at once).
725
+ */
726
+ declare function TranscriptViewer({ callId, canRename, onSeek, title, style, }: TranscriptViewerProps): react_jsx_runtime.JSX.Element | null;
727
+
598
728
  interface MessageComposerProps {
599
729
  /**
600
730
  * Called when the user taps Send. Second arg carries
@@ -919,8 +1049,15 @@ interface ConversationListProps {
919
1049
  onSelect?: (conv: Conversation) => void;
920
1050
  /** Optional override for each row's rendering. */
921
1051
  renderItem?: (conv: Conversation, selected: boolean) => ReactNode;
922
- /** Custom empty state when there are no conversations. */
1052
+ /**
1053
+ * What an empty list shows. Defaults to "No conversations yet" with a
1054
+ * hint at the next step.
1055
+ */
923
1056
  emptyState?: ReactNode | string;
1057
+ /** Show only conversations matching this text (a search field in `header`). */
1058
+ query?: string;
1059
+ /** What shows when `query` matches nothing. Receives the query. */
1060
+ noResultsState?: ReactNode | ((query: string) => ReactNode);
924
1061
  /** Controlled-mode: skip `useConversations()` and render from these. */
925
1062
  conversations?: Conversation[];
926
1063
  loading?: boolean;
@@ -958,7 +1095,7 @@ interface ConversationListProps {
958
1095
  /** Presence badges on direct chats' avatars. Defaults to `true`. */
959
1096
  showPresence?: boolean;
960
1097
  }
961
- declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, conversations: controlled, loading: controlledLoading, error: controlledError, hasMore: controlledHasMore, loadingMore: controlledLoadingMore, onLoadMore, unreadCounts, labelFor, avatarFor, header, sections, groupBy, density, showPresence, }: ConversationListProps): react_jsx_runtime.JSX.Element;
1098
+ declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, query, noResultsState, conversations: controlled, loading: controlledLoading, error: controlledError, hasMore: controlledHasMore, loadingMore: controlledLoadingMore, onLoadMore, unreadCounts, labelFor, avatarFor, header, sections, groupBy, density, showPresence, }: ConversationListProps): react_jsx_runtime.JSX.Element;
962
1099
 
963
1100
  interface MemberListProps {
964
1101
  conversationId: Uuid;
@@ -1645,6 +1782,10 @@ declare const defaultDarkTheme: PoolseRNTheme;
1645
1782
  * `useConversations` reload from REST to catch up on what was sent
1646
1783
  * while the app was away.
1647
1784
  *
1785
+ * One workspace. With several signed in, use `useBackgroundClients`
1786
+ * instead (once, outside the providers) — it also keeps the workspaces
1787
+ * that aren't on screen disconnected.
1788
+ *
1648
1789
  * Mount once, inside the provider:
1649
1790
  *
1650
1791
  * <PoolseProvider config={config}>
@@ -1675,6 +1816,64 @@ declare function useAppStateLifecycle(options?: {
1675
1816
  */
1676
1817
  declare function useAppStatePresence(enabled?: boolean): void;
1677
1818
 
1819
+ /**
1820
+ * Which clients should be in the background: all of them while the app
1821
+ * isn't active; otherwise every one except `active` (and `keepConnected`).
1822
+ */
1823
+ declare function applyBackground(clients: ReadonlyArray<Poolse>, active: Poolse | null, appActive: boolean, keepConnected?: ReadonlyArray<Poolse>): void;
1824
+
1825
+ interface BackgroundClientsOptions {
1826
+ /**
1827
+ * Also report presence from the app state on the client on screen
1828
+ * (`active` in the foreground, `idle` otherwise). Default `true`.
1829
+ */
1830
+ presence?: boolean;
1831
+ /**
1832
+ * Keep these clients connected even when not on screen (a workspace
1833
+ * with a call running, say). Default none.
1834
+ */
1835
+ keepConnected?: ReadonlyArray<Poolse>;
1836
+ }
1837
+ /**
1838
+ * Drive `setBackground` for every signed-in workspace from `AppState`
1839
+ * and which one is on screen.
1840
+ *
1841
+ * ```tsx
1842
+ * useBackgroundClients(clients, current);
1843
+ * // In the push handler, for the workspace the push names:
1844
+ * clientFor(push.tenant_id)?.wake();
1845
+ * ```
1846
+ */
1847
+ declare function useBackgroundClients(clients: ReadonlyArray<Poolse>, active: Poolse | null, opts?: BackgroundClientsOptions): void;
1848
+
1849
+ interface EmptyStateProps {
1850
+ /** What's empty, in a few words: "No messages yet". */
1851
+ title: string;
1852
+ /** What to do next. */
1853
+ hint?: string;
1854
+ /** A button for the next step. */
1855
+ action?: ReactNode;
1856
+ }
1857
+ /**
1858
+ * An empty screen that says what to do next — the default for an empty
1859
+ * conversation list, an empty conversation and an empty thread. Pass
1860
+ * your own `emptyState` to any of them to replace it.
1861
+ */
1862
+ declare function EmptyState({ title, hint, action }: EmptyStateProps): react_jsx_runtime.JSX.Element;
1863
+
1864
+ interface SendStatusProps {
1865
+ message: Message;
1866
+ onRetry?: () => void;
1867
+ onDiscard?: () => void;
1868
+ alignEnd?: boolean;
1869
+ }
1870
+ /**
1871
+ * Under an unsent message: "Waiting for network…" while it's queued
1872
+ * offline (it goes out by itself), or "Not sent" with Retry and Delete
1873
+ * when the server refused it.
1874
+ */
1875
+ declare function SendStatus({ message, onRetry, onDiscard, alignEnd }: SendStatusProps): react_jsx_runtime.JSX.Element | null;
1876
+
1678
1877
  interface CallControlButtonProps {
1679
1878
  icon: IconName;
1680
1879
  /** Shown under the button. Omit for the hang-up / answer buttons. */
@@ -1815,4 +2014,4 @@ declare const callColors: {
1815
2014
  */
1816
2015
  declare function useCallDuration(connected: boolean): string | null;
1817
2016
 
1818
- export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
2017
+ export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, type BackgroundClientsOptions, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, ConsentPrompt, type ConsentPromptProps, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, EmptyState, type EmptyStateProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, LiveTranscriptPanel, type LiveTranscriptPanelProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, RecordingBanner, type RecordingBannerProps, RecordingIndicator, type RecordingIndicatorProps, RecordingNoticeRow, type RecordingNoticeRowProps, type RenderMessageContext, SendStatus, type SendStatusProps, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TranscriptViewer, type TranscriptViewerProps, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, applyBackground, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useBackgroundClients, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ReactElement } from 'react';
3
- import { Conversation, Uuid, Message, LiveCall, AttachmentUploadInput, Membership, PresenceState, Attachment, LinkPreview } from '@poolse/sdk';
3
+ import { Conversation, Uuid, Message, LiveCall, RecordingMode, ConsentDecision, AttachmentUploadInput, Membership, PresenceState, Attachment, LinkPreview, Poolse } from '@poolse/sdk';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { GroupPosition } from '@poolse/react';
6
6
  import { StyleProp, ViewStyle } from 'react-native';
@@ -262,6 +262,11 @@ interface MessageRowProps {
262
262
  onAvatarPress?: (user: MessageUser) => void;
263
263
  /** Call-log rows: offer "Call back" (see `<CallLogRow onCallBack>`). */
264
264
  onCallBack?: (media: 'audio' | 'video') => void;
265
+ /**
266
+ * A poolse user id → display name, for system lines that name people
267
+ * by internal id (the recording notice). Unknown: the name is left out.
268
+ */
269
+ nameForUserId?: (userId: string) => string | null | undefined;
265
270
  /** `'bubbles'` (default), `'list'` or `'compact'` — see `ChatLayout`. */
266
271
  layout?: ChatLayout;
267
272
  /** `'comfortable'` (default) or `'compact'` spacing. */
@@ -288,6 +293,10 @@ interface MessageRowProps {
288
293
  onMarkUnread?: () => void;
289
294
  /** The "edited" label opens the edit history (`chat.messages.edits`). Defaults to true. */
290
295
  editHistory?: boolean;
296
+ /** Unsent message (queued or failed in the outbox): the Retry under it. */
297
+ onRetrySend?: () => void;
298
+ /** Unsent message: the Delete under it. */
299
+ onDiscardSend?: () => void;
291
300
  }
292
301
  declare function MessageRow(props: MessageRowProps): react_jsx_runtime.JSX.Element | null;
293
302
 
@@ -595,6 +604,127 @@ interface LiveCallBannerProps {
595
604
  */
596
605
  declare function LiveCallBanner({ call, inCall, onJoin }: LiveCallBannerProps): react_jsx_runtime.JSX.Element;
597
606
 
607
+ interface RecordingBannerProps {
608
+ /** A recording is running. */
609
+ recording: boolean;
610
+ /** A live transcript is running. */
611
+ transcribing?: boolean;
612
+ mode?: RecordingMode | null;
613
+ /** Capture needs consent here (`useRecording().consentRequired`). */
614
+ consentRequired?: boolean;
615
+ /** Your answer (`useRecording().myConsent`). `declined` shows "listen-only" and a way to change it. */
616
+ myConsent?: ConsentDecision | null;
617
+ /** Shows a Stop button (for whoever may stop it). */
618
+ onStop?: () => void;
619
+ /** After declining: reopen the prompt. */
620
+ onChangeConsent?: () => void;
621
+ /** Disable the buttons (a request is in flight). */
622
+ pending?: boolean;
623
+ style?: StyleProp<ViewStyle>;
624
+ }
625
+ /**
626
+ * "● Recording · Everyone in the call is told [Stop]" — a strip across
627
+ * a captured call, for everyone in it (late joiners too). Renders nothing
628
+ * while nothing is captured.
629
+ */
630
+ declare function RecordingBanner({ recording, transcribing, mode, consentRequired, myConsent, onStop, onChangeConsent, pending, style, }: RecordingBannerProps): react_jsx_runtime.JSX.Element | null;
631
+ interface RecordingIndicatorProps {
632
+ recording: boolean;
633
+ transcribing?: boolean;
634
+ mode?: RecordingMode | null;
635
+ /** Text colour, e.g. white over video. Defaults to the theme's danger colour. */
636
+ color?: string;
637
+ style?: StyleProp<ViewStyle>;
638
+ }
639
+ /** A small "● REC" pill for a call header or tile. Nothing while nothing is captured. */
640
+ declare function RecordingIndicator({ recording, transcribing, mode, color, style, }: RecordingIndicatorProps): react_jsx_runtime.JSX.Element | null;
641
+ interface ConsentPromptProps {
642
+ /** A recording is running. */
643
+ recording: boolean;
644
+ /** A live transcript is running. */
645
+ transcribing?: boolean;
646
+ mode?: RecordingMode | null;
647
+ /** Who started it, if known. Never pass a raw id. */
648
+ startedByName?: string | null;
649
+ /** Answer (e.g. `useRecording().consent`). A `false` result keeps the prompt open with an error. */
650
+ onAnswer: (decision: ConsentDecision) => Promise<boolean | void> | boolean | void;
651
+ /**
652
+ * Called once an accept went through: publishing is allowed again.
653
+ * With the native call core, re-enable the microphone and camera here;
654
+ * the SDK's `CallRoom` does it by itself.
655
+ */
656
+ onAccepted?: () => void;
657
+ /** Called after a decline went through (e.g. close the prompt). */
658
+ onDeclined?: () => void;
659
+ pending?: boolean;
660
+ error?: string | null;
661
+ /** Cover the parent with a scrim (absolute fill). Defaults to true; false renders the card only. */
662
+ overlay?: boolean;
663
+ style?: StyleProp<ViewStyle>;
664
+ }
665
+ /**
666
+ * Asks someone in a captured call for consent — shown to anyone who
667
+ * hasn't accepted, late joiners included, when the room requires it.
668
+ * Until they agree their microphone and camera stay off; they still hear
669
+ * and see everyone. Declining keeps them listen-only.
670
+ */
671
+ declare function ConsentPrompt({ recording, transcribing, mode, startedByName, onAnswer, onAccepted, onDeclined, pending, error, overlay, style, }: ConsentPromptProps): react_jsx_runtime.JSX.Element;
672
+ interface RecordingNoticeRowProps {
673
+ /** The recording notice message. Rows that aren't one render nothing. */
674
+ msg: Pick<Message, 'type' | 'body' | 'inserted_at'> & {
675
+ deleted_at?: string | null;
676
+ };
677
+ /** Current user's id — "by you". */
678
+ meId: string | null;
679
+ /** A poolse user id → display name. Unknown: the name is left out. */
680
+ nameFor?: (userId: Uuid) => string | null | undefined;
681
+ }
682
+ /**
683
+ * "● Recording started · by Elena · 10:04" — the chat line the server
684
+ * posts when a recording starts or stops. `<MessageRow>` renders it.
685
+ */
686
+ declare function RecordingNoticeRow({ msg, meId, nameFor }: RecordingNoticeRowProps): react_jsx_runtime.JSX.Element | null;
687
+
688
+ interface LiveTranscriptPanelProps {
689
+ /** The call. Null renders an empty panel. */
690
+ callId: string | null;
691
+ /** Keep the transcript topic open. Defaults to true; false while the panel is hidden. */
692
+ enabled?: boolean;
693
+ /** Start / Stop transcription buttons (someone in the call). Defaults to true. */
694
+ showControls?: boolean;
695
+ /** Shows a close button. */
696
+ onClose?: () => void;
697
+ title?: string;
698
+ style?: StyleProp<ViewStyle>;
699
+ }
700
+ /**
701
+ * The call's live transcript as it is spoken: speaker, time and text,
702
+ * the current speaker's words in grey until they are final. Opens the
703
+ * transcript topic while mounted (the last 200 lines arrive at once)
704
+ * and sticks to the bottom unless you scroll up.
705
+ */
706
+ declare function LiveTranscriptPanel({ callId, enabled, showControls, onClose, title, style, }: LiveTranscriptPanelProps): react_jsx_runtime.JSX.Element;
707
+ interface TranscriptViewerProps {
708
+ /** The call whose stored transcript to show. */
709
+ callId: string | null;
710
+ /**
711
+ * Offer speaker renames. Defaults to true; the server allows it for
712
+ * people who took part in the call and the conversation's owners and
713
+ * admins, and anyone else gets an explanation instead.
714
+ */
715
+ canRename?: boolean;
716
+ /** Makes timestamps pressable, e.g. to seek a recording (ms since the transcript started). */
717
+ onSeek?: (ms: number) => void;
718
+ title?: string;
719
+ style?: StyleProp<ViewStyle>;
720
+ }
721
+ /**
722
+ * A call's stored transcript: who spoke, when, and what they said;
723
+ * search within it; and correct a speaker's name (everyone viewing sees
724
+ * the change at once).
725
+ */
726
+ declare function TranscriptViewer({ callId, canRename, onSeek, title, style, }: TranscriptViewerProps): react_jsx_runtime.JSX.Element | null;
727
+
598
728
  interface MessageComposerProps {
599
729
  /**
600
730
  * Called when the user taps Send. Second arg carries
@@ -919,8 +1049,15 @@ interface ConversationListProps {
919
1049
  onSelect?: (conv: Conversation) => void;
920
1050
  /** Optional override for each row's rendering. */
921
1051
  renderItem?: (conv: Conversation, selected: boolean) => ReactNode;
922
- /** Custom empty state when there are no conversations. */
1052
+ /**
1053
+ * What an empty list shows. Defaults to "No conversations yet" with a
1054
+ * hint at the next step.
1055
+ */
923
1056
  emptyState?: ReactNode | string;
1057
+ /** Show only conversations matching this text (a search field in `header`). */
1058
+ query?: string;
1059
+ /** What shows when `query` matches nothing. Receives the query. */
1060
+ noResultsState?: ReactNode | ((query: string) => ReactNode);
924
1061
  /** Controlled-mode: skip `useConversations()` and render from these. */
925
1062
  conversations?: Conversation[];
926
1063
  loading?: boolean;
@@ -958,7 +1095,7 @@ interface ConversationListProps {
958
1095
  /** Presence badges on direct chats' avatars. Defaults to `true`. */
959
1096
  showPresence?: boolean;
960
1097
  }
961
- declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, conversations: controlled, loading: controlledLoading, error: controlledError, hasMore: controlledHasMore, loadingMore: controlledLoadingMore, onLoadMore, unreadCounts, labelFor, avatarFor, header, sections, groupBy, density, showPresence, }: ConversationListProps): react_jsx_runtime.JSX.Element;
1098
+ declare function ConversationList({ selectedId, onSelect, renderItem, emptyState, query, noResultsState, conversations: controlled, loading: controlledLoading, error: controlledError, hasMore: controlledHasMore, loadingMore: controlledLoadingMore, onLoadMore, unreadCounts, labelFor, avatarFor, header, sections, groupBy, density, showPresence, }: ConversationListProps): react_jsx_runtime.JSX.Element;
962
1099
 
963
1100
  interface MemberListProps {
964
1101
  conversationId: Uuid;
@@ -1645,6 +1782,10 @@ declare const defaultDarkTheme: PoolseRNTheme;
1645
1782
  * `useConversations` reload from REST to catch up on what was sent
1646
1783
  * while the app was away.
1647
1784
  *
1785
+ * One workspace. With several signed in, use `useBackgroundClients`
1786
+ * instead (once, outside the providers) — it also keeps the workspaces
1787
+ * that aren't on screen disconnected.
1788
+ *
1648
1789
  * Mount once, inside the provider:
1649
1790
  *
1650
1791
  * <PoolseProvider config={config}>
@@ -1675,6 +1816,64 @@ declare function useAppStateLifecycle(options?: {
1675
1816
  */
1676
1817
  declare function useAppStatePresence(enabled?: boolean): void;
1677
1818
 
1819
+ /**
1820
+ * Which clients should be in the background: all of them while the app
1821
+ * isn't active; otherwise every one except `active` (and `keepConnected`).
1822
+ */
1823
+ declare function applyBackground(clients: ReadonlyArray<Poolse>, active: Poolse | null, appActive: boolean, keepConnected?: ReadonlyArray<Poolse>): void;
1824
+
1825
+ interface BackgroundClientsOptions {
1826
+ /**
1827
+ * Also report presence from the app state on the client on screen
1828
+ * (`active` in the foreground, `idle` otherwise). Default `true`.
1829
+ */
1830
+ presence?: boolean;
1831
+ /**
1832
+ * Keep these clients connected even when not on screen (a workspace
1833
+ * with a call running, say). Default none.
1834
+ */
1835
+ keepConnected?: ReadonlyArray<Poolse>;
1836
+ }
1837
+ /**
1838
+ * Drive `setBackground` for every signed-in workspace from `AppState`
1839
+ * and which one is on screen.
1840
+ *
1841
+ * ```tsx
1842
+ * useBackgroundClients(clients, current);
1843
+ * // In the push handler, for the workspace the push names:
1844
+ * clientFor(push.tenant_id)?.wake();
1845
+ * ```
1846
+ */
1847
+ declare function useBackgroundClients(clients: ReadonlyArray<Poolse>, active: Poolse | null, opts?: BackgroundClientsOptions): void;
1848
+
1849
+ interface EmptyStateProps {
1850
+ /** What's empty, in a few words: "No messages yet". */
1851
+ title: string;
1852
+ /** What to do next. */
1853
+ hint?: string;
1854
+ /** A button for the next step. */
1855
+ action?: ReactNode;
1856
+ }
1857
+ /**
1858
+ * An empty screen that says what to do next — the default for an empty
1859
+ * conversation list, an empty conversation and an empty thread. Pass
1860
+ * your own `emptyState` to any of them to replace it.
1861
+ */
1862
+ declare function EmptyState({ title, hint, action }: EmptyStateProps): react_jsx_runtime.JSX.Element;
1863
+
1864
+ interface SendStatusProps {
1865
+ message: Message;
1866
+ onRetry?: () => void;
1867
+ onDiscard?: () => void;
1868
+ alignEnd?: boolean;
1869
+ }
1870
+ /**
1871
+ * Under an unsent message: "Waiting for network…" while it's queued
1872
+ * offline (it goes out by itself), or "Not sent" with Retry and Delete
1873
+ * when the server refused it.
1874
+ */
1875
+ declare function SendStatus({ message, onRetry, onDiscard, alignEnd }: SendStatusProps): react_jsx_runtime.JSX.Element | null;
1876
+
1678
1877
  interface CallControlButtonProps {
1679
1878
  icon: IconName;
1680
1879
  /** Shown under the button. Omit for the hang-up / answer buttons. */
@@ -1815,4 +2014,4 @@ declare const callColors: {
1815
2014
  */
1816
2015
  declare function useCallDuration(connected: boolean): string | null;
1817
2016
 
1818
- export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, type RenderMessageContext, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useCallDuration, useDisplayName, usePoolseTheme, useTheme };
2017
+ export { AttachmentPicker, type AttachmentPickerProps, AttachmentPreview, type AttachmentPreviewProps, type AudioRoute, type AudioRouteKind, AudioRouteSheet, type AudioRouteSheetProps, Avatar, type AvatarProps, type BackgroundClientsOptions, CallAvatar, type CallAvatarProps, CallControlButton, type CallControlButtonProps, CallLogRow, type CallLogRowProps, type ChatDensity, ChatHeader, type ChatHeaderProps, type ChatLayout, ConsentPrompt, type ConsentPromptProps, type ConversationDraft, type ConversationGroupBy, ConversationList, type ConversationListProps, type ConversationSection, ConversationView, type ConversationViewProps, DaySeparator, type DaySeparatorProps, type DraftStorage, EditHistorySheet, type EditHistorySheetProps, EmojiPicker, type EmojiPickerProps, EmptyState, type EmptyStateProps, GroupDetailsSheet, type GroupDetailsSheetProps, type IconName, ImageMosaic, type ImageMosaicProps, type InboxUser, LinkPreviewCard, type LinkPreviewCardProps, LiveCallBanner, type LiveCallBannerProps, LiveTranscriptPanel, type LiveTranscriptPanelProps, MemberList, type MemberListProps, MentionInput, type MentionInputProps, MessageActions, type MessageActionsProps, MessageBubble, type MessageBubbleProps, MessageComposer, type MessageComposerHandle, type MessageComposerProps, MessageList, type MessageListItem, type MessageListProps, MessageRow, type MessageRowProps, type MessageSlot, type MessageSlotProps, type MessageSlots, type MessageUser, NewMessagesDivider, type NewMessagesDividerProps, PoolseIcon, type PoolseIconProps, PoolseInbox, type PoolseInboxHandle, type PoolseInboxProps, PoolseLogo, type PoolseLogoProps, type PoolseLogoVariant, type PoolseRNTheme, type PoolseRNThemeOverrides, PoolseTheme, type PoolseThemeProps, PresenceBadge, type PresenceBadgeProps, primitives as Primitives, ReactionPicker, type ReactionPickerProps, ReactionStrip, type ReactionStripProps, RecordingBanner, type RecordingBannerProps, RecordingIndicator, type RecordingIndicatorProps, RecordingNoticeRow, type RecordingNoticeRowProps, type RenderMessageContext, SendStatus, type SendStatusProps, type ThemeColors, type ThemeRadii, type ThemeShadows, type ThemeSpacing, type ThemeType, ThreadSummary, type ThreadSummaryProps, ThreadView, type ThreadViewProps, type TimeFormat, TranscriptViewer, type TranscriptViewerProps, TypingIndicator, type TypingIndicatorProps, UploadQueueStrip, UserName, type UserNameProps, applyBackground, callColors, defaultDarkTheme, defaultLightTheme, useAppStateLifecycle, useAppStatePresence, useBackgroundClients, useCallDuration, useDisplayName, usePoolseTheme, useTheme };