@marktiderman/genesis-chat 0.7.0 → 0.8.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.
Files changed (51) hide show
  1. package/README.md +132 -3
  2. package/dist/{chunk-GBJ3YI4E.js → chunk-5XYDVUPS.js} +6 -3
  3. package/dist/chunk-5XYDVUPS.js.map +1 -0
  4. package/dist/{chunk-XQ2ULNHV.js → chunk-D4RPOYB7.js} +4 -4
  5. package/dist/chunk-D4RPOYB7.js.map +1 -0
  6. package/dist/{chunk-RYD6WJE5.js → chunk-O2QSBRSH.js} +3 -3
  7. package/dist/{chunk-RYD6WJE5.js.map → chunk-O2QSBRSH.js.map} +1 -1
  8. package/dist/{chunk-A4YJX7KT.js → chunk-ZQFREERR.js} +3 -3
  9. package/dist/{chunk-A4YJX7KT.js.map → chunk-ZQFREERR.js.map} +1 -1
  10. package/dist/{client-DUIG1hum.d.ts → client-DP7rhJ1U.d.ts} +17 -6
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +2 -2
  13. package/dist/native.d.ts +31 -15
  14. package/dist/native.js +74 -328
  15. package/dist/native.js.map +1 -1
  16. package/dist/{outbox-B9NAWQ58.d.ts → outbox-C4LnqpKT.d.ts} +1 -1
  17. package/dist/push.d.ts +2 -2
  18. package/dist/react.d.ts +4 -8
  19. package/dist/react.js +3 -3
  20. package/dist/server.d.ts +1 -1
  21. package/dist/server.js +1 -1
  22. package/dist/{thread-oPra7pkW.d.ts → thread-CSzdqNR_.d.ts} +1 -1
  23. package/dist/web.d.ts +201 -7
  24. package/dist/web.js +580 -56
  25. package/dist/web.js.map +1 -1
  26. package/migrations/0004_genesis_chat_tenants.sql +716 -0
  27. package/migrations/tests/0001_genesis_chat.test.sql +10 -2
  28. package/migrations/tests/0002_genesis_chat_coaching.test.sql +8 -0
  29. package/migrations/tests/0003_genesis_chat_search_threads.test.sql +8 -0
  30. package/migrations/tests/0004_genesis_chat_tenants.test.sql +259 -0
  31. package/package.json +18 -7
  32. package/src/__tests__/core.test.ts +12 -0
  33. package/src/__tests__/web-dock.test.tsx +465 -0
  34. package/src/__tests__/web-photo-viewer.test.tsx +43 -0
  35. package/src/__tests__/web.test.tsx +26 -0
  36. package/src/core/client.ts +5 -1
  37. package/src/core/types.ts +16 -0
  38. package/src/native/__tests__/photo-viewer.test.tsx +24 -5
  39. package/src/native/photo-viewer.tsx +109 -422
  40. package/src/native/thread-screen.tsx +14 -5
  41. package/src/native/use-jump.ts +3 -0
  42. package/src/react/index.tsx +2 -1
  43. package/src/web/attachments.tsx +39 -55
  44. package/src/web/composer.tsx +5 -0
  45. package/src/web/dock.tsx +889 -0
  46. package/src/web/inbox.tsx +5 -0
  47. package/src/web/index.ts +23 -0
  48. package/src/web/memory-client.ts +1 -1
  49. package/src/web/thread.tsx +42 -3
  50. package/dist/chunk-GBJ3YI4E.js.map +0 -1
  51. package/dist/chunk-XQ2ULNHV.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { b as AttachmentKind, A as AttachmentInput, U as UploadProgress, H as HostedAttachment, i as ChatClient, B as PendingMessage, P as PendingFile, q as ChatMessage, F as SendInput } from './client-DUIG1hum.js';
1
+ import { b as AttachmentKind, A as AttachmentInput, U as UploadProgress, H as HostedAttachment, i as ChatClient, B as PendingMessage, P as PendingFile, q as ChatMessage, F as SendInput } from './client-DP7rhJ1U.js';
2
2
 
3
3
  /**
4
4
  * @feat:chat
package/dist/push.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as ChatClient } from './client-DUIG1hum.js';
2
- import { O as Outbox, e as OutboxStore, Q as QueuedMessage } from './outbox-B9NAWQ58.js';
1
+ import { i as ChatClient } from './client-DP7rhJ1U.js';
2
+ import { O as Outbox, e as OutboxStore, Q as QueuedMessage } from './outbox-C4LnqpKT.js';
3
3
  import '@supabase/supabase-js';
4
4
 
5
5
  /**
package/dist/react.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as _tanstack_query_core from '@tanstack/query-core';
2
- import { h as ChatAttachment, i as ChatClient, k as ChatConversation, p as ChatMember, t as ChatRole, n as ChatKindRules, q as ChatMessage, g as ChatActivity, F as SendInput, M as MessagePage, C as ChatAvailability, d as AvailabilityInput, v as ChatSignal, m as ChatInboxItem, o as ChatLinkPreview, D as ScheduledMessage, S as ScheduleInput, u as ChatSearchHit, x as ChatTopic, T as TopicInput } from './client-DUIG1hum.js';
2
+ import { h as ChatAttachment, i as ChatClient, k as ChatConversation, p as ChatMember, t as ChatRole, n as ChatKindRules, q as ChatMessage, g as ChatActivity, F as SendInput, M as MessagePage, C as ChatAvailability, d as AvailabilityInput, v as ChatSignal, m as ChatInboxItem, o as ChatLinkPreview, D as ScheduledMessage, S as ScheduleInput, u as ChatSearchHit, G as StartConversationOptions, x as ChatTopic, T as TopicInput } from './client-DP7rhJ1U.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode } from 'react';
5
- import { e as OutboxStore, S as StorageUpload, H as HostedUpload, L as LocalFile, O as Outbox, Q as QueuedMessage } from './outbox-B9NAWQ58.js';
6
- import { T as ThreadItem } from './thread-oPra7pkW.js';
5
+ import { e as OutboxStore, S as StorageUpload, H as HostedUpload, L as LocalFile, O as Outbox, Q as QueuedMessage } from './outbox-C4LnqpKT.js';
6
+ import { T as ThreadItem } from './thread-CSzdqNR_.js';
7
7
  import '@supabase/supabase-js';
8
8
 
9
9
  declare const chatKeys: {
@@ -225,11 +225,7 @@ declare function usePins(conversationId: string | null | undefined): string[];
225
225
  /** Signed links for files (cached by the client until shortly before they expire). */
226
226
  declare function useFileUrls(paths: (string | null | undefined)[]): Record<string, string>;
227
227
  /** Starts (or finds again) a conversation, then refreshes the inbox. */
228
- declare function useStartConversation(): (kind: string, memberIds: string[], opts?: {
229
- title?: string;
230
- subjectType?: string;
231
- subjectId?: string;
232
- }) => Promise<string>;
228
+ declare function useStartConversation(): (kind: string, memberIds: string[], opts?: StartConversationOptions) => Promise<string>;
233
229
  /**
234
230
  * A conversation's topics, live (set_topic's hint refreshes them), and `setTopic` for owners
235
231
  * and admins: add one (`setTopic("week-1", { title: "Week 1" })`), close or reopen it.
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- export { CATCH_UP_MAX_PAGES, CATCH_UP_PAGE, ChatProvider, LINK_PREVIEW_CONCURRENCY, belongsTo, chatKeys, hostedUploadFrom, useAvailability, useBroadcast, useChat, useConversation, useDebouncedValue, useFileUrls, useInbox, useLinkPreviews, useMessageActions, usePeople, usePerson, usePins, useScheduled, useSearch, useStartConversation, useTopics, useUnreadTotal } from './chunk-XQ2ULNHV.js';
2
- import './chunk-A4YJX7KT.js';
3
- import './chunk-GBJ3YI4E.js';
1
+ export { CATCH_UP_MAX_PAGES, CATCH_UP_PAGE, ChatProvider, LINK_PREVIEW_CONCURRENCY, belongsTo, chatKeys, hostedUploadFrom, useAvailability, useBroadcast, useChat, useConversation, useDebouncedValue, useFileUrls, useInbox, useLinkPreviews, useMessageActions, usePeople, usePerson, usePins, useScheduled, useSearch, useStartConversation, useTopics, useUnreadTotal } from './chunk-D4RPOYB7.js';
2
+ import './chunk-ZQFREERR.js';
3
+ import './chunk-5XYDVUPS.js';
4
4
  //# sourceMappingURL=react.js.map
5
5
  //# sourceMappingURL=react.js.map
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { w as ChatSupabase } from './client-DUIG1hum.js';
1
+ import { w as ChatSupabase } from './client-DP7rhJ1U.js';
2
2
  export { a as ANTHROPIC_MESSAGES_URL, b as ANTHROPIC_VERSION, c as AnthropicLike, A as AssistantMessage, d as AssistantResult, C as CHAT_ASSISTANT_MODEL, e as ChatAssistant, f as ChatAssistantOptions, D as DraftReplyInput, R as RecapInput, g as createChatAssistant, h as draftPrompt, i as draftSystem, r as recapPrompt, j as recapSystem, t as transcriptLines } from './assistant-DLRCksST.js';
3
3
  import '@supabase/supabase-js';
4
4
 
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CHAT_BUCKET, CHAT_SCHEMA } from './chunk-GBJ3YI4E.js';
1
+ import { CHAT_BUCKET, CHAT_SCHEMA } from './chunk-5XYDVUPS.js';
2
2
  import { chatPushPayload } from './chunk-BTG4JWLF.js';
3
3
  export { ANTHROPIC_MESSAGES_URL, ANTHROPIC_VERSION, CHAT_ASSISTANT_MODEL, createChatAssistant, draftPrompt, draftSystem, recapPrompt, recapSystem, transcriptLines } from './chunk-ZHZVQ535.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { q as ChatMessage, B as PendingMessage, g as ChatActivity } from './client-DUIG1hum.js';
1
+ import { q as ChatMessage, B as PendingMessage, g as ChatActivity } from './client-DP7rhJ1U.js';
2
2
 
3
3
  /**
4
4
  * @feat:chat
package/dist/web.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode, Ref, Component, ErrorInfo } from 'react';
3
3
  import { SlotOverride } from '@marktiderman/genesis-core/slots';
4
- import { q as ChatMessage, m as ChatInboxItem, o as ChatLinkPreview$1, h as ChatAttachment, k as ChatConversation, p as ChatMember, t as ChatRole, i as ChatClient, g as ChatActivity, C as ChatAvailability, x as ChatTopic, T as TopicInput, u as ChatSearchHit, F as SendInput, A as AttachmentInput } from './client-DUIG1hum.js';
4
+ import { q as ChatMessage, m as ChatInboxItem, o as ChatLinkPreview$1, h as ChatAttachment, k as ChatConversation, p as ChatMember, t as ChatRole, i as ChatClient, g as ChatActivity, C as ChatAvailability, x as ChatTopic, T as TopicInput, u as ChatSearchHit, F as SendInput, A as AttachmentInput } from './client-DP7rhJ1U.js';
5
5
  import { ChatAttachmentKind, ConversationState, ChatVideoUpload } from './react.js';
6
- import { T as ThreadItem } from './thread-oPra7pkW.js';
7
- import { L as LocalFile } from './outbox-B9NAWQ58.js';
6
+ import { T as ThreadItem } from './thread-CSzdqNR_.js';
7
+ import { L as LocalFile } from './outbox-C4LnqpKT.js';
8
8
  import '@supabase/supabase-js';
9
9
  import '@tanstack/query-core';
10
10
 
@@ -137,8 +137,14 @@ interface LightboxProps {
137
137
  index: number | null;
138
138
  onIndexChange: (index: number | null) => void;
139
139
  }
140
- /** A photo full size, with the previous and next ones on the arrow keys. */
141
- declare function Lightbox({ images, index, onIndexChange }: LightboxProps): react.JSX.Element;
140
+ /** A message's photos full size: genesis-ui's `Lightbox` (arrow keys, a counter, focus kept on the arrows), fed chat's attachments. */
141
+ declare function ChatLightbox({ images, index, onIndexChange }: LightboxProps): react.JSX.Element;
142
+ /**
143
+ * @deprecated Chat's photo grid opens its photos itself. To show photos full size elsewhere, render
144
+ * `Lightbox` from `@marktiderman/genesis-ui` with `GalleryItem`s. This adapter is removed in a
145
+ * later minor.
146
+ */
147
+ declare const Lightbox: typeof ChatLightbox;
142
148
  /** A video: a hosted one (Mux) streams once ready and says "Processing…" until then; a file plays from storage. */
143
149
  declare function VideoAttachment({ view }: {
144
150
  view: AttachmentView;
@@ -246,9 +252,18 @@ interface ChatThreadProps {
246
252
  /** Your image proxy for `linkPreviewImages: "proxy"`: the URL to load for an og:image. */
247
253
  linkPreviewProxyUrl?: (url: string) => string | null | undefined;
248
254
  slots?: ChatThreadSlots;
255
+ /**
256
+ * Mark messages read as they arrive. Default true; false while the thread is mounted but out of
257
+ * sight (a minimized dock window), so it keeps its draft without reading behind anyone's back.
258
+ */
259
+ markRead?: boolean;
260
+ /**
261
+ * Focus the composer whenever this turns true (a dock window opened or restored). Default false.
262
+ */
263
+ autoFocus?: boolean;
249
264
  className?: string;
250
265
  }
251
- declare function ChatThread({ conversationId, resolveUser, title: titleProp, onBack, backClassName, threadRootId, topic: topicProp, onOpenThread, quickReactions, placeholder, showTopics, jumpTo: jumpToProp, search, scheduling, availability, emojibaseUrl, linkPreviewImages, linkPreviewProxyUrl, slots, className, }: ChatThreadProps): react.JSX.Element;
266
+ declare function ChatThread({ conversationId, resolveUser, title: titleProp, onBack, backClassName, threadRootId, topic: topicProp, onOpenThread, quickReactions, placeholder, showTopics, jumpTo: jumpToProp, search, scheduling, availability, emojibaseUrl, linkPreviewImages, linkPreviewProxyUrl, slots, markRead, autoFocus, className, }: ChatThreadProps): react.JSX.Element;
252
267
 
253
268
  interface ChatPanelNoSelectionProps {
254
269
  /** Words under the title; "Pick one on the left to read and reply." by default. */
@@ -715,4 +730,183 @@ interface ChatVideoPlayerProps {
715
730
  /** Plays a chat video: Mux HLS (native, else hls.js loaded on demand), or a file. */
716
731
  declare function ChatVideoPlayer({ src, playbackId, poster, processing, failed, uploading, label, className }: ChatVideoPlayerProps): react.JSX.Element;
717
732
 
718
- export { type AttachmentView, ChatAttachmentCard, type ChatAttachmentCardProps, type ChatAttachmentSlotProps, ChatAvailabilitySettings, type ChatAvailabilitySettingsProps, ChatAwayBanner, type ChatAwayBannerProps, ChatBroadcast, type ChatBroadcastProps, ChatComposer, type ChatComposerAccessoryProps, type ChatComposerHandle, type ChatComposerProps, ChatEmojiPicker, type ChatEmojiPickerProps, ChatErrorBoundary, type ChatErrorBoundaryProps, ChatInbox, type ChatInboxEmptyProps, type ChatInboxProps, ChatLinkPreview, type ChatLinkPreviewProps, ChatMarkdown, type ChatMarkdownProps, ChatPanel, type ChatPanelNoSelectionProps, type ChatPanelProps, ChatScheduleMenu, type ChatScheduleMenuProps, ChatScheduledList, type ChatScheduledListProps, ChatSearch, type ChatSearchProps, ChatThread, type ChatThreadEmptyProps, type ChatThreadHeaderProps, type ChatThreadProps, type ChatThreadSlots, ChatTopicBar, type ChatTopicBarProps, type ChatUser, ChatVideoPlayer, type ChatVideoPlayerProps, ChatVideoRecorder, type ChatVideoRecorderProps, FileChip, GenericAttachment, ImageGrid, type ImageGridProps, Lightbox, type LightboxProps, type LinkPreviewImages, type MarkdownNode, type MemoryChatClient, type MemoryChatOptions, type MemoryConversationSeed, MessageAttachments, type MessageAttachmentsProps, MessageRow, type MessageRowProps, QUICK_REACTIONS, type ResolveUser, SearchSnippet, type UseVideoRecorderOptions, type UseVoiceRecorderOptions, VideoAttachment, type VideoRecorder, type VideoRecorderState, type VideoRecording, VoiceNote, type VoiceNoteProps, type VoiceRecorder, type VoiceRecorderState, type VoiceRecording, canPickEmoji, clockTime, createMemoryChatClient, formatBytes, inboxTitle, isSafeHref, linkPreviewImageSrc, messageLabel, muxPosterUrl, muxStreamUrl, parseMarkdown, pickVideoMimeType, pickVoiceMimeType, plainText, relativeTime, toAttachmentView, toLocalInput, uploadVideo, useVideoRecorder, useVoiceRecorder, videoFile, voiceFile };
733
+ /** A conversation in the dock. */
734
+ interface ChatDockConversation {
735
+ type: "conversation";
736
+ /** The dock's id for it: the conversation's id. */
737
+ id: string;
738
+ conversationId: string;
739
+ /** The window's title; worked out from the conversation by default. */
740
+ title?: string;
741
+ minimized: boolean;
742
+ /** Brought back from storage (checked against the server once, then dropped if it's gone). */
743
+ restored?: boolean;
744
+ }
745
+ /** Anything else that lives in the dock (a help desk messenger): the dock draws the window, `render` its body. */
746
+ interface ChatDockPanel {
747
+ type: "panel";
748
+ /** Opening the same id again brings that window back rather than adding a second. */
749
+ id: string;
750
+ title: string;
751
+ /** Its body, filling the window under the dock's title bar. */
752
+ render: () => ReactNode;
753
+ /** In place of the avatar in the title bar. */
754
+ icon?: ReactNode;
755
+ /** Unread count on the bar and the bubble. */
756
+ unread?: number;
757
+ /** Its own expand (its full page); wins over the dock's `onExpand`. */
758
+ onExpand?: () => void;
759
+ minimized: boolean;
760
+ }
761
+ type ChatDockItem = ChatDockConversation | ChatDockPanel;
762
+ interface ChatDockState {
763
+ /** In the order they show: the newest first (rightmost on a wide screen). */
764
+ items: ChatDockItem[];
765
+ /** The one the narrow screen's sheet shows. */
766
+ activeId: string | null;
767
+ /** Whether the narrow screen's sheet is open. */
768
+ sheetOpen: boolean;
769
+ /** When each was last used (opened, restored, switched to), for replacing the one used longest ago. */
770
+ used: Record<string, number>;
771
+ /** The one just opened or restored, whose composer takes focus. */
772
+ focusId: string | null;
773
+ /** Bumps on every use. */
774
+ clock: number;
775
+ }
776
+ /** What a panel can change while it's docked, without moving or opening it. */
777
+ type ChatDockPanelPatch = Partial<Pick<ChatDockPanel, "title" | "unread" | "icon" | "render" | "onExpand">>;
778
+ type ChatDockAction = {
779
+ type: "open";
780
+ item: ChatDockItem;
781
+ } | {
782
+ type: "close";
783
+ id: string;
784
+ } | {
785
+ type: "minimize";
786
+ id: string;
787
+ minimized: boolean;
788
+ } | {
789
+ type: "activate";
790
+ id: string;
791
+ } | {
792
+ type: "front";
793
+ id: string;
794
+ } | {
795
+ type: "sheet";
796
+ open: boolean;
797
+ } | {
798
+ type: "update";
799
+ id: string;
800
+ patch: ChatDockPanelPatch;
801
+ } | {
802
+ type: "hydrate";
803
+ items: ChatDockItem[];
804
+ } | {
805
+ type: "closeAll";
806
+ };
807
+ declare const emptyChatDock: ChatDockState;
808
+ /**
809
+ * The dock's state machine, pure. Opening puts the item first, open, active and focused; past
810
+ * `max`, the one used longest ago goes (restoring or switching to one counts as using it). Actions
811
+ * that change nothing return the same state, so an effect that calls them every render settles.
812
+ */
813
+ declare function chatDockReducer(state: ChatDockState, action: ChatDockAction, max?: number): ChatDockState;
814
+ /** Forgets what the dock kept for this person under `storageKey` (call it on sign-out on a shared browser). */
815
+ declare function forgetChatDock(storageKey: string, userId: string): void;
816
+ interface OpenConversationOptions {
817
+ /** The window's title; worked out from the conversation by default. */
818
+ title?: string;
819
+ /** Open it as a bar. */
820
+ minimized?: boolean;
821
+ }
822
+ type OpenPanelInput = Omit<ChatDockPanel, "type" | "minimized"> & {
823
+ minimized?: boolean;
824
+ };
825
+ interface ChatDockApi {
826
+ items: ChatDockItem[];
827
+ activeId: string | null;
828
+ /** The one whose composer takes focus (just opened or restored). */
829
+ focusId: string | null;
830
+ /** Opens a conversation in the dock, or brings it back if it's there. */
831
+ open: (conversationId: string, opts?: OpenConversationOptions) => void;
832
+ /** Opens a panel of your own in the dock (the help desk messenger), or brings it back. */
833
+ openPanel: (panel: OpenPanelInput) => void;
834
+ /**
835
+ * Changes a docked panel in place (its unread count as it changes, its title) without moving,
836
+ * opening or restoring it. Nothing happens if that panel isn't docked, or nothing changed.
837
+ */
838
+ updatePanel: (id: string, patch: ChatDockPanelPatch) => void;
839
+ close: (id: string) => void;
840
+ closeAll: () => void;
841
+ minimize: (id: string) => void;
842
+ restore: (id: string) => void;
843
+ /** Shows this one in the narrow screen's sheet, without reordering. */
844
+ activate: (id: string) => void;
845
+ /** Moves one waiting behind "+N" into view, first. */
846
+ bringToFront: (id: string) => void;
847
+ /** Expands an item to its page (its own `onExpand`, else the dock's), and takes it out of the dock. */
848
+ expand: (id: string) => void;
849
+ /** Whether expanding means anything (a panel's own `onExpand` or the dock's). */
850
+ canExpand: (item: ChatDockItem) => boolean;
851
+ /** The narrow screen's sheet. */
852
+ sheetOpen: boolean;
853
+ setSheetOpen: (open: boolean) => void;
854
+ }
855
+ interface ChatDockProviderProps {
856
+ /** How many windows at once. Default 3. */
857
+ max?: number;
858
+ /** "Expand": open the item on the zone's Messages page (route to it). Without it there's no expand button for conversations. */
859
+ onExpand?: (item: ChatDockItem) => void;
860
+ /**
861
+ * Keep the open conversations (not panels: they hold functions) across reloads, in this
862
+ * browser's localStorage under this key and the signed-in person's id, so the next person on a
863
+ * shared browser never sees them (`forgetChatDock` clears it on sign-out). They come back as
864
+ * bars, after hydration, and any that no longer exist are dropped. Off by default.
865
+ */
866
+ storageKey?: string;
867
+ children: ReactNode;
868
+ }
869
+ declare function ChatDockProvider({ max, onExpand, storageKey, children }: ChatDockProviderProps): react.JSX.Element;
870
+ /** The dock: open a conversation or a panel in it from anywhere under `ChatDockProvider`. */
871
+ declare function useChatDock(): ChatDockApi;
872
+ /** The dock when there is one, else null: for a button that opens in the dock when the app has one, and navigates when it doesn't. */
873
+ declare function useOptionalChatDock(): ChatDockApi | null;
874
+ interface ChatDockLabels {
875
+ minimize: string;
876
+ restore: string;
877
+ expand: string;
878
+ close: string;
879
+ /** The narrow screen's bubble. */
880
+ openDock: string;
881
+ /** The sheet's name for screen readers. */
882
+ sheetTitle: string;
883
+ sheetDescription: string;
884
+ /** "3 unread". */
885
+ unread: (n: number) => string;
886
+ /** The live announcement of everything unread in the dock. */
887
+ unreadTotal: (n: number) => string;
888
+ /** "+2": the windows that don't fit, and its menu's name. */
889
+ more: (n: number) => string;
890
+ moreLabel: (n: number) => string;
891
+ /** A conversation whose title isn't known yet. */
892
+ conversation: string;
893
+ }
894
+ declare const defaultChatDockLabels: ChatDockLabels;
895
+ interface ChatDockProps {
896
+ resolveUser: ResolveUser;
897
+ /** Passed to every docked conversation's ChatThread. */
898
+ threadProps?: Partial<Omit<ChatThreadProps, "conversationId" | "resolveUser" | "onBack" | "title" | "markRead" | "autoFocus">>;
899
+ labels?: Partial<ChatDockLabels>;
900
+ /** The narrow screen's bubble when the sheet is closed. Default true. */
901
+ bubble?: boolean;
902
+ className?: string;
903
+ }
904
+ /** How many of `count` windows fit side by side at `width`, leaving room for "+N" when some don't. */
905
+ declare function chatDockWindowsThatFit(width: number, count: number): number;
906
+ /**
907
+ * The dock's windows (wide screens) or its sheet and bubble (narrow). Render it once, under
908
+ * `ChatDockProvider`: in AppShell's `dock` slot, or anywhere fixed positioning is free.
909
+ */
910
+ declare function ChatDock({ resolveUser, threadProps, labels: labelOverrides, bubble, className }: ChatDockProps): react.JSX.Element | null;
911
+
912
+ export { type AttachmentView, ChatAttachmentCard, type ChatAttachmentCardProps, type ChatAttachmentSlotProps, ChatAvailabilitySettings, type ChatAvailabilitySettingsProps, ChatAwayBanner, type ChatAwayBannerProps, ChatBroadcast, type ChatBroadcastProps, ChatComposer, type ChatComposerAccessoryProps, type ChatComposerHandle, type ChatComposerProps, ChatDock, type ChatDockAction, type ChatDockApi, type ChatDockConversation, type ChatDockItem, type ChatDockLabels, type ChatDockPanel, type ChatDockPanelPatch, type ChatDockProps, ChatDockProvider, type ChatDockProviderProps, type ChatDockState, ChatEmojiPicker, type ChatEmojiPickerProps, ChatErrorBoundary, type ChatErrorBoundaryProps, ChatInbox, type ChatInboxEmptyProps, type ChatInboxProps, ChatLinkPreview, type ChatLinkPreviewProps, ChatMarkdown, type ChatMarkdownProps, ChatPanel, type ChatPanelNoSelectionProps, type ChatPanelProps, ChatScheduleMenu, type ChatScheduleMenuProps, ChatScheduledList, type ChatScheduledListProps, ChatSearch, type ChatSearchProps, ChatThread, type ChatThreadEmptyProps, type ChatThreadHeaderProps, type ChatThreadProps, type ChatThreadSlots, ChatTopicBar, type ChatTopicBarProps, type ChatUser, ChatVideoPlayer, type ChatVideoPlayerProps, ChatVideoRecorder, type ChatVideoRecorderProps, FileChip, GenericAttachment, ImageGrid, type ImageGridProps, Lightbox, type LightboxProps, type LinkPreviewImages, type MarkdownNode, type MemoryChatClient, type MemoryChatOptions, type MemoryConversationSeed, MessageAttachments, type MessageAttachmentsProps, MessageRow, type MessageRowProps, type OpenConversationOptions, type OpenPanelInput, QUICK_REACTIONS, type ResolveUser, SearchSnippet, type UseVideoRecorderOptions, type UseVoiceRecorderOptions, VideoAttachment, type VideoRecorder, type VideoRecorderState, type VideoRecording, VoiceNote, type VoiceNoteProps, type VoiceRecorder, type VoiceRecorderState, type VoiceRecording, canPickEmoji, chatDockReducer, chatDockWindowsThatFit, clockTime, createMemoryChatClient, defaultChatDockLabels, emptyChatDock, forgetChatDock, formatBytes, inboxTitle, isSafeHref, linkPreviewImageSrc, messageLabel, muxPosterUrl, muxStreamUrl, parseMarkdown, pickVideoMimeType, pickVoiceMimeType, plainText, relativeTime, toAttachmentView, toLocalInput, uploadVideo, useChatDock, useOptionalChatDock, useVideoRecorder, useVoiceRecorder, videoFile, voiceFile };