@webority/mobile-chat 0.128.0 → 0.134.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/lib/commonjs/AgentByline.js +1 -0
- package/lib/commonjs/ChatComposer.js +1 -0
- package/lib/commonjs/ChatConversationActions.js +1 -0
- package/lib/commonjs/ChatDictationButton.js +1 -0
- package/lib/commonjs/ChatEmbed.js +1 -0
- package/lib/commonjs/ChatEntrance.js +1 -0
- package/lib/commonjs/ChatFooter.js +1 -0
- package/lib/commonjs/ChatFrame.js +1 -0
- package/lib/commonjs/ChatHistory.js +1 -0
- package/lib/commonjs/ChatLiveBar.js +1 -0
- package/lib/commonjs/ChatMessageActions.js +1 -0
- package/lib/commonjs/ChatNudge.js +1 -0
- package/lib/commonjs/ChatOpenTickets.js +1 -0
- package/lib/commonjs/ChatPastChats.js +1 -0
- package/lib/commonjs/ChatScreen.js +1 -0
- package/lib/commonjs/ChatSheet.js +1 -0
- package/lib/commonjs/ChatStarters.js +1 -0
- package/lib/commonjs/ChatThread.js +1 -0
- package/lib/commonjs/ReadAloudButton.js +1 -0
- package/lib/commonjs/chatShared.js +1 -0
- package/lib/commonjs/features.map.json +40 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/loaders/ChatLoader.js +1 -0
- package/lib/commonjs/loaders/OrbLoader.js +1 -0
- package/lib/commonjs/loaders/PhrasesLoader.js +1 -0
- package/lib/commonjs/loaders/SkeletonLoader.js +1 -0
- package/lib/commonjs/loaders/StepsLoader.js +1 -0
- package/lib/commonjs/loaders/TypingPill.js +1 -0
- package/lib/commonjs/pushOpen.js +1 -0
- package/lib/commonjs/renderers/ActionPart.js +1 -0
- package/lib/commonjs/renderers/ChartPart.js +1 -0
- package/lib/commonjs/renderers/FigureText.js +1 -0
- package/lib/commonjs/renderers/FiguresPart.js +1 -0
- package/lib/commonjs/renderers/FilePart.js +1 -0
- package/lib/commonjs/renderers/HandoffPart.js +1 -0
- package/lib/commonjs/renderers/ImagePart.js +1 -0
- package/lib/commonjs/renderers/InputRequestPart.js +1 -0
- package/lib/commonjs/renderers/NoticePart.js +1 -0
- package/lib/commonjs/renderers/QuickRepliesPart.js +1 -0
- package/lib/commonjs/renderers/RecordCardPart.js +1 -0
- package/lib/commonjs/renderers/SourcesPart.js +1 -0
- package/lib/commonjs/renderers/TablePart.js +1 -0
- package/lib/commonjs/renderers/TextPart.js +1 -0
- package/lib/commonjs/renderers/TicketPart.js +1 -0
- package/lib/commonjs/renderers/VoiceClipPart.js +1 -0
- package/lib/commonjs/renderers/index.js +1 -0
- package/lib/commonjs/speech/azureSpeech.js +1 -0
- package/lib/commonjs/speech/expoAudio.js +1 -0
- package/lib/commonjs/speech/phoneSpeech.js +1 -0
- package/lib/commonjs/speech/speechText.js +1 -0
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/useChat.js +1 -1
- package/lib/commonjs/useChatHaptics.js +1 -0
- package/lib/commonjs/useChatSound.js +1 -0
- package/lib/commonjs/useChatSpeech.js +1 -0
- package/lib/commonjs/useTranscriptActions.js +1 -0
- package/lib/module/AgentByline.js +1 -0
- package/lib/module/ChatComposer.js +1 -0
- package/lib/module/ChatConversationActions.js +1 -0
- package/lib/module/ChatDictationButton.js +1 -0
- package/lib/module/ChatEmbed.js +1 -0
- package/lib/module/ChatEntrance.js +1 -0
- package/lib/module/ChatFooter.js +1 -0
- package/lib/module/ChatFrame.js +1 -0
- package/lib/module/ChatHistory.js +1 -0
- package/lib/module/ChatLiveBar.js +1 -0
- package/lib/module/ChatMessageActions.js +1 -0
- package/lib/module/ChatNudge.js +1 -0
- package/lib/module/ChatOpenTickets.js +1 -0
- package/lib/module/ChatPastChats.js +1 -0
- package/lib/module/ChatScreen.js +1 -0
- package/lib/module/ChatSheet.js +1 -0
- package/lib/module/ChatStarters.js +1 -0
- package/lib/module/ChatThread.js +1 -0
- package/lib/module/ReadAloudButton.js +1 -0
- package/lib/module/chatShared.js +1 -0
- package/lib/module/features.map.json +40 -0
- package/lib/module/index.js +1 -1
- package/lib/module/loaders/ChatLoader.js +1 -0
- package/lib/module/loaders/OrbLoader.js +1 -0
- package/lib/module/loaders/PhrasesLoader.js +1 -0
- package/lib/module/loaders/SkeletonLoader.js +1 -0
- package/lib/module/loaders/StepsLoader.js +1 -0
- package/lib/module/loaders/TypingPill.js +1 -0
- package/lib/module/pushOpen.js +1 -0
- package/lib/module/renderers/ActionPart.js +1 -0
- package/lib/module/renderers/ChartPart.js +1 -0
- package/lib/module/renderers/FigureText.js +1 -0
- package/lib/module/renderers/FiguresPart.js +1 -0
- package/lib/module/renderers/FilePart.js +1 -0
- package/lib/module/renderers/HandoffPart.js +1 -0
- package/lib/module/renderers/ImagePart.js +1 -0
- package/lib/module/renderers/InputRequestPart.js +1 -0
- package/lib/module/renderers/NoticePart.js +1 -0
- package/lib/module/renderers/QuickRepliesPart.js +1 -0
- package/lib/module/renderers/RecordCardPart.js +1 -0
- package/lib/module/renderers/SourcesPart.js +1 -0
- package/lib/module/renderers/TablePart.js +1 -0
- package/lib/module/renderers/TextPart.js +1 -0
- package/lib/module/renderers/TicketPart.js +1 -0
- package/lib/module/renderers/VoiceClipPart.js +1 -0
- package/lib/module/renderers/index.js +1 -0
- package/lib/module/speech/azureSpeech.js +1 -0
- package/lib/module/speech/expoAudio.js +1 -0
- package/lib/module/speech/phoneSpeech.js +1 -0
- package/lib/module/speech/speechText.js +1 -0
- package/lib/module/types.js +1 -0
- package/lib/module/useChat.js +1 -1
- package/lib/module/useChatHaptics.js +1 -0
- package/lib/module/useChatSound.js +1 -0
- package/lib/module/useChatSpeech.js +1 -0
- package/lib/module/useTranscriptActions.js +1 -0
- package/lib/typescript/commonjs/AgentByline.d.ts +9 -0
- package/lib/typescript/commonjs/ChatComposer.d.ts +15 -0
- package/lib/typescript/commonjs/ChatConversationActions.d.ts +10 -0
- package/lib/typescript/commonjs/ChatDictationButton.d.ts +19 -0
- package/lib/typescript/commonjs/ChatEmbed.d.ts +11 -0
- package/lib/typescript/commonjs/ChatEntrance.d.ts +8 -0
- package/lib/typescript/commonjs/ChatFooter.d.ts +9 -0
- package/lib/typescript/commonjs/ChatFrame.d.ts +45 -0
- package/lib/typescript/commonjs/ChatHistory.d.ts +11 -0
- package/lib/typescript/commonjs/ChatLiveBar.d.ts +11 -0
- package/lib/typescript/commonjs/ChatMessageActions.d.ts +15 -0
- package/lib/typescript/commonjs/ChatNudge.d.ts +14 -0
- package/lib/typescript/commonjs/ChatOpenTickets.d.ts +12 -0
- package/lib/typescript/commonjs/ChatPastChats.d.ts +21 -0
- package/lib/typescript/commonjs/ChatScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ChatSheet.d.ts +21 -0
- package/lib/typescript/commonjs/ChatStarters.d.ts +12 -0
- package/lib/typescript/commonjs/ChatThread.d.ts +36 -0
- package/lib/typescript/commonjs/ReadAloudButton.d.ts +11 -0
- package/lib/typescript/commonjs/chatShared.d.ts +4 -0
- package/lib/typescript/commonjs/index.d.ts +27 -21
- package/lib/typescript/commonjs/loaders/ChatLoader.d.ts +13 -0
- package/lib/typescript/commonjs/loaders/OrbLoader.d.ts +8 -0
- package/lib/typescript/commonjs/loaders/PhrasesLoader.d.ts +8 -0
- package/lib/typescript/commonjs/loaders/SkeletonLoader.d.ts +8 -0
- package/lib/typescript/commonjs/loaders/StepsLoader.d.ts +8 -0
- package/lib/typescript/commonjs/loaders/TypingPill.d.ts +7 -0
- package/lib/typescript/commonjs/pushOpen.d.ts +3 -0
- package/lib/typescript/commonjs/renderers/ActionPart.d.ts +3 -0
- package/lib/typescript/commonjs/renderers/ChartPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/FigureText.d.ts +23 -0
- package/lib/typescript/commonjs/renderers/FiguresPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/FilePart.d.ts +3 -0
- package/lib/typescript/commonjs/renderers/HandoffPart.d.ts +9 -0
- package/lib/typescript/commonjs/renderers/ImagePart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/InputRequestPart.d.ts +3 -0
- package/lib/typescript/commonjs/renderers/NoticePart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/QuickRepliesPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/RecordCardPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/SourcesPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/TablePart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/TextPart.d.ts +8 -0
- package/lib/typescript/commonjs/renderers/TicketPart.d.ts +9 -0
- package/lib/typescript/commonjs/renderers/VoiceClipPart.d.ts +9 -0
- package/lib/typescript/commonjs/renderers/index.d.ts +3 -0
- package/lib/typescript/commonjs/speech/azureSpeech.d.ts +25 -0
- package/lib/typescript/commonjs/speech/expoAudio.d.ts +23 -0
- package/lib/typescript/commonjs/speech/phoneSpeech.d.ts +16 -0
- package/lib/typescript/commonjs/speech/speechText.d.ts +16 -0
- package/lib/typescript/commonjs/types.d.ts +29 -0
- package/lib/typescript/commonjs/useChat.d.ts +40 -10
- package/lib/typescript/commonjs/useChatHaptics.d.ts +3 -0
- package/lib/typescript/commonjs/useChatSound.d.ts +35 -0
- package/lib/typescript/commonjs/useChatSpeech.d.ts +4 -0
- package/lib/typescript/commonjs/useTranscriptActions.d.ts +10 -0
- package/lib/typescript/module/AgentByline.d.ts +9 -0
- package/lib/typescript/module/ChatComposer.d.ts +15 -0
- package/lib/typescript/module/ChatConversationActions.d.ts +10 -0
- package/lib/typescript/module/ChatDictationButton.d.ts +19 -0
- package/lib/typescript/module/ChatEmbed.d.ts +11 -0
- package/lib/typescript/module/ChatEntrance.d.ts +8 -0
- package/lib/typescript/module/ChatFooter.d.ts +9 -0
- package/lib/typescript/module/ChatFrame.d.ts +45 -0
- package/lib/typescript/module/ChatHistory.d.ts +11 -0
- package/lib/typescript/module/ChatLiveBar.d.ts +11 -0
- package/lib/typescript/module/ChatMessageActions.d.ts +15 -0
- package/lib/typescript/module/ChatNudge.d.ts +14 -0
- package/lib/typescript/module/ChatOpenTickets.d.ts +12 -0
- package/lib/typescript/module/ChatPastChats.d.ts +21 -0
- package/lib/typescript/module/ChatScreen.d.ts +5 -0
- package/lib/typescript/module/ChatSheet.d.ts +21 -0
- package/lib/typescript/module/ChatStarters.d.ts +12 -0
- package/lib/typescript/module/ChatThread.d.ts +36 -0
- package/lib/typescript/module/ReadAloudButton.d.ts +11 -0
- package/lib/typescript/module/chatShared.d.ts +4 -0
- package/lib/typescript/module/index.d.ts +27 -21
- package/lib/typescript/module/loaders/ChatLoader.d.ts +13 -0
- package/lib/typescript/module/loaders/OrbLoader.d.ts +8 -0
- package/lib/typescript/module/loaders/PhrasesLoader.d.ts +8 -0
- package/lib/typescript/module/loaders/SkeletonLoader.d.ts +8 -0
- package/lib/typescript/module/loaders/StepsLoader.d.ts +8 -0
- package/lib/typescript/module/loaders/TypingPill.d.ts +7 -0
- package/lib/typescript/module/pushOpen.d.ts +3 -0
- package/lib/typescript/module/renderers/ActionPart.d.ts +3 -0
- package/lib/typescript/module/renderers/ChartPart.d.ts +8 -0
- package/lib/typescript/module/renderers/FigureText.d.ts +23 -0
- package/lib/typescript/module/renderers/FiguresPart.d.ts +8 -0
- package/lib/typescript/module/renderers/FilePart.d.ts +3 -0
- package/lib/typescript/module/renderers/HandoffPart.d.ts +9 -0
- package/lib/typescript/module/renderers/ImagePart.d.ts +8 -0
- package/lib/typescript/module/renderers/InputRequestPart.d.ts +3 -0
- package/lib/typescript/module/renderers/NoticePart.d.ts +8 -0
- package/lib/typescript/module/renderers/QuickRepliesPart.d.ts +8 -0
- package/lib/typescript/module/renderers/RecordCardPart.d.ts +8 -0
- package/lib/typescript/module/renderers/SourcesPart.d.ts +8 -0
- package/lib/typescript/module/renderers/TablePart.d.ts +8 -0
- package/lib/typescript/module/renderers/TextPart.d.ts +8 -0
- package/lib/typescript/module/renderers/TicketPart.d.ts +9 -0
- package/lib/typescript/module/renderers/VoiceClipPart.d.ts +9 -0
- package/lib/typescript/module/renderers/index.d.ts +3 -0
- package/lib/typescript/module/speech/azureSpeech.d.ts +25 -0
- package/lib/typescript/module/speech/expoAudio.d.ts +23 -0
- package/lib/typescript/module/speech/phoneSpeech.d.ts +16 -0
- package/lib/typescript/module/speech/speechText.d.ts +16 -0
- package/lib/typescript/module/types.d.ts +29 -0
- package/lib/typescript/module/useChat.d.ts +40 -10
- package/lib/typescript/module/useChatHaptics.d.ts +3 -0
- package/lib/typescript/module/useChatSound.d.ts +35 -0
- package/lib/typescript/module/useChatSpeech.d.ts +4 -0
- package/lib/typescript/module/useTranscriptActions.d.ts +10 -0
- package/package.json +43 -15
- package/README.md +0 -185
- package/lib/commonjs/components/ActionCard.js +0 -1
- package/lib/commonjs/components/ChatComposer.js +0 -1
- package/lib/commonjs/components/ChatConversationList.js +0 -1
- package/lib/commonjs/components/ChatLauncher.js +0 -1
- package/lib/commonjs/components/ChatMarkdown.js +0 -1
- package/lib/commonjs/components/ChatMessage.js +0 -1
- package/lib/commonjs/components/ChatScreen.js +0 -1
- package/lib/commonjs/components/ChatThread.js +0 -1
- package/lib/commonjs/components/ComposerAttachments.js +0 -1
- package/lib/commonjs/components/ReplyRating.js +0 -1
- package/lib/module/components/ActionCard.js +0 -1
- package/lib/module/components/ChatComposer.js +0 -1
- package/lib/module/components/ChatConversationList.js +0 -1
- package/lib/module/components/ChatLauncher.js +0 -1
- package/lib/module/components/ChatMarkdown.js +0 -1
- package/lib/module/components/ChatMessage.js +0 -1
- package/lib/module/components/ChatScreen.js +0 -1
- package/lib/module/components/ChatThread.js +0 -1
- package/lib/module/components/ComposerAttachments.js +0 -1
- package/lib/module/components/ReplyRating.js +0 -1
- package/lib/typescript/commonjs/components/ActionCard.d.ts +0 -23
- package/lib/typescript/commonjs/components/ChatComposer.d.ts +0 -42
- package/lib/typescript/commonjs/components/ChatConversationList.d.ts +0 -22
- package/lib/typescript/commonjs/components/ChatLauncher.d.ts +0 -22
- package/lib/typescript/commonjs/components/ChatMarkdown.d.ts +0 -24
- package/lib/typescript/commonjs/components/ChatMessage.d.ts +0 -55
- package/lib/typescript/commonjs/components/ChatScreen.d.ts +0 -40
- package/lib/typescript/commonjs/components/ChatThread.d.ts +0 -30
- package/lib/typescript/commonjs/components/ComposerAttachments.d.ts +0 -12
- package/lib/typescript/commonjs/components/ReplyRating.d.ts +0 -19
- package/lib/typescript/module/components/ActionCard.d.ts +0 -23
- package/lib/typescript/module/components/ChatComposer.d.ts +0 -42
- package/lib/typescript/module/components/ChatConversationList.d.ts +0 -22
- package/lib/typescript/module/components/ChatLauncher.d.ts +0 -22
- package/lib/typescript/module/components/ChatMarkdown.d.ts +0 -24
- package/lib/typescript/module/components/ChatMessage.d.ts +0 -55
- package/lib/typescript/module/components/ChatScreen.d.ts +0 -40
- package/lib/typescript/module/components/ChatThread.d.ts +0 -30
- package/lib/typescript/module/components/ComposerAttachments.d.ts +0 -12
- package/lib/typescript/module/components/ReplyRating.d.ts +0 -19
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const DEFAULT_SPEECH_LANGUAGE = "en-IN";
|
|
2
|
+
export declare const DEFAULT_SPEECH_VOICE = "en-IN-NeerjaNeural";
|
|
3
|
+
export declare const MAX_SPEAK_CHARS = 6000;
|
|
4
|
+
export declare const MAX_DICTATION_MS = 300000;
|
|
5
|
+
export declare const MIN_DICTATION_MS = 600;
|
|
6
|
+
/** The file extension a recording's bytes stand for. m4a is the fallback, the format the phone records. */
|
|
7
|
+
export declare function audioExtension(bytes: Uint8Array): string;
|
|
8
|
+
export declare function escapeSsml(text: string): string;
|
|
9
|
+
export declare function buildSsml(text: string, language: string, voice: string): string;
|
|
10
|
+
/** Cuts at the last sentence end within the limit, so a long reply is read whole sentences at a time. */
|
|
11
|
+
export declare function clampSpeakText(text: string): string;
|
|
12
|
+
/** Whole seconds as m:ss. A negative or non-finite value reads as 0:00. */
|
|
13
|
+
export declare function formatClipTime(ms: number): string;
|
|
14
|
+
/** Appends what was heard to the draft, with one space between, and keeps the result within maxLength. */
|
|
15
|
+
export declare function joinDictation(draft: string, heard: string, maxLength: number): string;
|
|
16
|
+
//# sourceMappingURL=speechText.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ChatLiveMessage, ChatPart, ChatPartKind, ChatTurnApi, ChatUploadFile } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { View } from "react-native";
|
|
4
|
+
export type { ChatMotion } from "@webority/chat-core";
|
|
5
|
+
/** Host values the thread adds to each part's turn: the host's link resolver and the source rows a citation focuses. */
|
|
6
|
+
export interface ChatTurnHostApi {
|
|
7
|
+
resolveLink?: (href: string) => string | null;
|
|
8
|
+
registerSourceRow?: (marker: string, row: View | null) => void;
|
|
9
|
+
/** Moves focus to the composer input after a quick reply is chosen. */
|
|
10
|
+
focusComposer?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export type ChatPartRendererProps<P extends ChatPart = ChatPart> = {
|
|
13
|
+
part: P;
|
|
14
|
+
message: ChatLiveMessage;
|
|
15
|
+
turn: ChatTurnApi & ChatTurnHostApi;
|
|
16
|
+
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
17
|
+
};
|
|
18
|
+
export type ChatRenderers = Partial<{
|
|
19
|
+
[K in ChatPartKind]: React.ComponentType<ChatPartRendererProps<Extract<ChatPart, {
|
|
20
|
+
kind: K;
|
|
21
|
+
}>>>;
|
|
22
|
+
}>;
|
|
23
|
+
export type ChatLayoutParts = (message: ChatLiveMessage) => Array<ChatPart | ChatPart[]>;
|
|
24
|
+
export interface ChatTicketRef {
|
|
25
|
+
ticketId: string;
|
|
26
|
+
number: string;
|
|
27
|
+
}
|
|
28
|
+
export type ChatOpenTicketHandler = (ticket: ChatTicketRef) => void;
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,19 +1,49 @@
|
|
|
1
|
-
import type { ChatClient, ChatSession, ChatSessionState } from "@webority/
|
|
2
|
-
|
|
1
|
+
import type { ChatBehaviour, ChatClient, ChatFeature, ChatSession, ChatSessionState } from "@webority/chat-core";
|
|
2
|
+
import type { ChatLayout } from "./ChatFrame";
|
|
3
|
+
export interface ChatPrefs {
|
|
4
|
+
get(key: string): string | null;
|
|
5
|
+
set(key: string, value: string): void;
|
|
6
|
+
}
|
|
3
7
|
export interface UseChatOptions {
|
|
4
|
-
/** From `createChatClient`. */
|
|
5
8
|
client: ChatClient;
|
|
6
|
-
/**
|
|
9
|
+
/** The screen key the profile resolves for; the phone has no URL. */
|
|
10
|
+
screen?: string;
|
|
11
|
+
/** The shell that hosts the session, named in its open and close events. */
|
|
12
|
+
layout?: ChatLayout;
|
|
13
|
+
/** Features switched off on this surface, on top of the server profile. */
|
|
14
|
+
narrow?: Partial<Record<ChatFeature, false>>;
|
|
15
|
+
/** Opens this conversation once after the profile loads. */
|
|
16
|
+
conversationId?: string | null;
|
|
17
|
+
/** Sent with each message; read at the moment of sending. */
|
|
7
18
|
pageContext?: unknown;
|
|
19
|
+
/** The behaviour the host app measured; read at the moment of sending. */
|
|
20
|
+
behaviour?: () => ChatBehaviour | null;
|
|
21
|
+
/** Where the session keeps the mute choice (key wchat:muted). */
|
|
22
|
+
prefs: ChatPrefs;
|
|
23
|
+
getCaptchaToken?: (action: string) => Promise<string | null>;
|
|
24
|
+
onEvent?: (name: string, data: Record<string, unknown>) => void;
|
|
25
|
+
onError?: (error: unknown) => void;
|
|
26
|
+
/** Receives the path of a relative link in a reply; the host decides how to navigate to it. */
|
|
27
|
+
onNavigate?: (path: string) => void;
|
|
8
28
|
}
|
|
9
|
-
type ChatActions = Pick<ChatSession, "submit" | "stop" | "retry" | "regenerate" | "startEdit" | "cancelEdit" | "attach" | "removeAttachment" | "openConversation" | "newConversation" | "rate" | "
|
|
10
|
-
export
|
|
29
|
+
type ChatActions = Pick<ChatSession, "load" | "submit" | "chooseQuickReply" | "answerInput" | "confirmAction" | "rejectAction" | "stop" | "retry" | "regenerate" | "startEdit" | "cancelEdit" | "attach" | "removeAttachment" | "openConversation" | "resumeLast" | "newConversation" | "rate" | "reset" | "requestHandoff" | "notifyTyping" | "resumeLive">;
|
|
30
|
+
export interface UseChatResult extends ChatSessionState, ChatActions {
|
|
31
|
+
session: ChatSession;
|
|
11
32
|
client: ChatClient;
|
|
12
|
-
|
|
33
|
+
emit: (name: string, data: Record<string, unknown>) => void;
|
|
34
|
+
/** The host reports whether the chat is on screen; the live stream runs only while it is and the app is active. */
|
|
35
|
+
setChatVisible: (visible: boolean) => void;
|
|
36
|
+
/** The message of the last hand-off request that failed, cleared by the next request. */
|
|
37
|
+
handoffError: string | null;
|
|
38
|
+
/** Present only when the host passed `onNavigate`; the turn API of each message hands relative links to it. */
|
|
39
|
+
onNavigate?: (path: string) => void;
|
|
40
|
+
}
|
|
13
41
|
/**
|
|
14
42
|
* The chat's state and actions. The session lives in the component that calls it: one per client,
|
|
15
|
-
*
|
|
16
|
-
*
|
|
43
|
+
* screen and narrowing, created in a mount effect (StrictMode runs effects twice and a disposed session never
|
|
44
|
+
* loads again) and disposed when those change or the component unmounts. Until it exists the state is idle and
|
|
45
|
+
* the actions do nothing. Call `reset()` when the signed-in person changes so nothing of one person's chat shows to the next.
|
|
17
46
|
*/
|
|
18
|
-
export declare
|
|
47
|
+
export declare function useChat(options: UseChatOptions): UseChatResult;
|
|
48
|
+
export {};
|
|
19
49
|
//# sourceMappingURL=useChat.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { UseChatResult } from "./useChat";
|
|
2
|
+
/**
|
|
3
|
+
* Plays the open cue when the panel opens, and the sent and reply cues for each new message, as the web chat does
|
|
4
|
+
* (chat-elements/src/WuiChat.js _playSounds). A send, an edit and a retry each add a new visitor message; an assistant,
|
|
5
|
+
* script or agent message plays the reply cue. Restored messages, notices and a history load stay silent, and the
|
|
6
|
+
* visitor message the server's copy replaces after a turn is stored, so it does not play the sent cue again.
|
|
7
|
+
* The phone has no WebAudio, so each cue is a short 16-bit WAV written once to the cache and played from there.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CUES: {
|
|
10
|
+
readonly open: {
|
|
11
|
+
readonly from: 420;
|
|
12
|
+
readonly to: 920;
|
|
13
|
+
readonly seconds: 0.16;
|
|
14
|
+
readonly peak: 0.16;
|
|
15
|
+
};
|
|
16
|
+
readonly reply: {
|
|
17
|
+
readonly from: 680;
|
|
18
|
+
readonly to: 540;
|
|
19
|
+
readonly seconds: 0.11;
|
|
20
|
+
readonly peak: 0.06;
|
|
21
|
+
};
|
|
22
|
+
readonly sent: {
|
|
23
|
+
readonly from: 540;
|
|
24
|
+
readonly to: 760;
|
|
25
|
+
readonly seconds: 0.09;
|
|
26
|
+
readonly peak: 0.05;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Plays one cue at the given volume (0 to 1). The file is written on the first play and reused after that.
|
|
31
|
+
* A failure is logged, never thrown, so a missing sound never breaks the chat.
|
|
32
|
+
*/
|
|
33
|
+
export declare function playCue(name: keyof typeof CUES, volume?: number): void;
|
|
34
|
+
export declare function useChatSound(chat: UseChatResult): void;
|
|
35
|
+
//# sourceMappingURL=useChatSound.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ChatLabels, type ChatLiveMessage } from "@webority/chat-core";
|
|
2
|
+
import type { UseChatResult } from "./useChat";
|
|
3
|
+
export interface TranscriptActions {
|
|
4
|
+
canShare: boolean;
|
|
5
|
+
notice: string | null;
|
|
6
|
+
shareReply(message: ChatLiveMessage): Promise<void>;
|
|
7
|
+
shareConversation(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export default function useTranscriptActions(chat: UseChatResult, labels: ChatLabels): TranscriptActions;
|
|
10
|
+
//# sourceMappingURL=useTranscriptActions.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChatAuthor, ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface AgentBylineProps {
|
|
4
|
+
author: ChatAuthor;
|
|
5
|
+
labels: ChatLabels;
|
|
6
|
+
}
|
|
7
|
+
/** The name and picture of the person who wrote an agent message. The spoken text carries the name instead. */
|
|
8
|
+
export declare function AgentByline({ author, labels }: AgentBylineProps): React.ReactElement;
|
|
9
|
+
//# sourceMappingURL=AgentByline.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChatLabels, ChatUploadFile } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatComposerProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
8
|
+
keyboardOffset?: number;
|
|
9
|
+
keyboardAware?: boolean;
|
|
10
|
+
safeArea?: boolean;
|
|
11
|
+
testID?: string;
|
|
12
|
+
focusRef?: React.MutableRefObject<(() => void) | null>;
|
|
13
|
+
}
|
|
14
|
+
export declare function ChatComposer({ chat, labels, pickAttachments, keyboardOffset, keyboardAware, safeArea, testID, focusRef, }: ChatComposerProps): React.ReactElement;
|
|
15
|
+
//# sourceMappingURL=ChatComposer.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatConversationActionsProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
testID?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChatConversationActions({ chat, labels, testID }: ChatConversationActionsProps): React.ReactElement | null;
|
|
10
|
+
//# sourceMappingURL=ChatConversationActions.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface DictationNotice {
|
|
5
|
+
message: string;
|
|
6
|
+
openSettings: boolean;
|
|
7
|
+
tone: "danger" | "info";
|
|
8
|
+
}
|
|
9
|
+
export interface ChatDictationButtonProps {
|
|
10
|
+
chat: UseChatResult;
|
|
11
|
+
labels: ChatLabels;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onText: (text: string) => void;
|
|
14
|
+
onNotice: (notice: DictationNotice | null) => void;
|
|
15
|
+
testID?: string;
|
|
16
|
+
stopRef?: React.MutableRefObject<(() => void) | null>;
|
|
17
|
+
}
|
|
18
|
+
export declare function ChatDictationButton({ chat, labels, disabled, onText, onNotice, testID, stopRef, }: ChatDictationButtonProps): React.ReactElement | null;
|
|
19
|
+
//# sourceMappingURL=ChatDictationButton.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { type ChatShellProps } from "./ChatFrame.js";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatEmbedProps extends ChatShellProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
/** The height of the embedded chat. Default 520. */
|
|
7
|
+
height?: number;
|
|
8
|
+
}
|
|
9
|
+
/** The chat drawn inside a bounded area of a screen, with a border and rounded corners. */
|
|
10
|
+
export declare function ChatEmbed({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, title, headerActions, onClose, height, testID, }: ChatEmbedProps): React.ReactElement | null;
|
|
11
|
+
//# sourceMappingURL=ChatEmbed.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export interface ChatEntranceProps {
|
|
3
|
+
index?: number;
|
|
4
|
+
animate?: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function ChatEntrance({ index, animate, children }: ChatEntranceProps): React.ReactElement;
|
|
8
|
+
//# sourceMappingURL=ChatEntrance.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatFooterProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
}
|
|
8
|
+
export declare function ChatFooter({ chat, labels }: ChatFooterProps): React.ReactElement | null;
|
|
9
|
+
//# sourceMappingURL=ChatFooter.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ChatLabels, ChatLoaderStyle, ChatMotion, ChatPart, ChatUploadFile } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ChatLayoutParts, ChatOpenTicketHandler, ChatRenderers } from "./types.js";
|
|
4
|
+
import type { UseChatResult } from "./useChat.js";
|
|
5
|
+
export type ChatLayout = "screen" | "sheet" | "embedded";
|
|
6
|
+
/** The props every shell passes down to its frame. */
|
|
7
|
+
export interface ChatCommonProps {
|
|
8
|
+
chat: UseChatResult;
|
|
9
|
+
labels: ChatLabels;
|
|
10
|
+
renderers?: ChatRenderers;
|
|
11
|
+
layoutParts?: ChatLayoutParts;
|
|
12
|
+
loader?: ChatLoaderStyle;
|
|
13
|
+
motion?: ChatMotion;
|
|
14
|
+
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
15
|
+
onOpenAttachment?: (part: Extract<ChatPart, {
|
|
16
|
+
kind: "File";
|
|
17
|
+
}>) => void;
|
|
18
|
+
onOpenTarget?: (target: string) => void;
|
|
19
|
+
onNavigate?: (path: string) => void;
|
|
20
|
+
/** Opens a ticket from a Ticket part or the open tickets list; the host shows the ticket. */
|
|
21
|
+
openTicket?: ChatOpenTicketHandler;
|
|
22
|
+
/** Hosts an absolute https link or Navigate chip may open; any other absolute target is not linked. */
|
|
23
|
+
handoffHosts?: readonly string[];
|
|
24
|
+
/** Resolves a link in a reply to a host route or address; null leaves the link as text. */
|
|
25
|
+
resolveLink?: (href: string) => string | null;
|
|
26
|
+
keyboardOffset?: number;
|
|
27
|
+
testID?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ChatFrameProps extends ChatCommonProps {
|
|
30
|
+
layout: ChatLayout;
|
|
31
|
+
title?: string;
|
|
32
|
+
headerActions?: React.ReactNode;
|
|
33
|
+
/** The host sheet closes through this callback. */
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
}
|
|
36
|
+
/** The props of the three shells: the frame's, with labels as a partial merged over the defaults. */
|
|
37
|
+
export interface ChatShellProps extends Omit<ChatCommonProps, "labels"> {
|
|
38
|
+
labels?: Partial<ChatLabels>;
|
|
39
|
+
title?: string;
|
|
40
|
+
headerActions?: React.ReactNode;
|
|
41
|
+
/** The host sheet closes through this callback. */
|
|
42
|
+
onClose?: () => void;
|
|
43
|
+
}
|
|
44
|
+
export declare function ChatFrame({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, layout, title, headerActions, onClose, testID, }: ChatFrameProps): React.ReactElement | null;
|
|
45
|
+
//# sourceMappingURL=ChatFrame.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatHistoryProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatHistory({ chat, labels, onOpen, testID }: ChatHistoryProps): React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=ChatHistory.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatLiveBarProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
testID?: string;
|
|
8
|
+
}
|
|
9
|
+
/** The hand-off line under the header. The server decides who may hand off; this bar only draws the state. */
|
|
10
|
+
export declare function ChatLiveBar({ chat, labels, testID }: ChatLiveBarProps): React.ReactElement | null;
|
|
11
|
+
//# sourceMappingURL=ChatLiveBar.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChatLabels, type ChatLiveMessage } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatMessageActionsProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
message: ChatLiveMessage;
|
|
7
|
+
labels: ChatLabels;
|
|
8
|
+
/** The newest message in the thread. */
|
|
9
|
+
isLast: boolean;
|
|
10
|
+
/** The last stored visitor message: the one Edit applies to. */
|
|
11
|
+
isLastVisitor: boolean;
|
|
12
|
+
testID?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ChatMessageActions({ chat, message, labels, isLast, isLastVisitor, testID, }: ChatMessageActionsProps): React.ReactElement | null;
|
|
15
|
+
//# sourceMappingURL=ChatMessageActions.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ChatNudgeProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
labels: ChatLabels;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
onActivate: () => void;
|
|
9
|
+
bottomOffset: number;
|
|
10
|
+
position: "end" | "start";
|
|
11
|
+
testID?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function ChatNudge({ chat, labels, enabled, onActivate, bottomOffset, position, testID, }: ChatNudgeProps): React.ReactElement | null;
|
|
14
|
+
//# sourceMappingURL=ChatNudge.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ChatTicketRef } from "./types.js";
|
|
4
|
+
import type { UseChatResult } from "./useChat.js";
|
|
5
|
+
export interface ChatOpenTicketsProps {
|
|
6
|
+
chat: UseChatResult;
|
|
7
|
+
labels: ChatLabels;
|
|
8
|
+
onOpenTicket?: (ticket: ChatTicketRef) => void;
|
|
9
|
+
testID?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatOpenTickets({ chat, labels, onOpenTicket, testID, }: ChatOpenTicketsProps): React.ReactElement | null;
|
|
12
|
+
//# sourceMappingURL=ChatOpenTickets.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ChatConversationSummary, ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import { type ConversationList } from "@webority/chat-core";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { UseChatResult } from "./useChat.js";
|
|
5
|
+
export interface ChatPastChatsProps {
|
|
6
|
+
chat: UseChatResult;
|
|
7
|
+
labels: ChatLabels;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ConversationRowProps {
|
|
11
|
+
conversation: ChatConversationSummary;
|
|
12
|
+
list: ConversationList | null;
|
|
13
|
+
chat: UseChatResult;
|
|
14
|
+
labels: ChatLabels;
|
|
15
|
+
testID: string;
|
|
16
|
+
onOpen: (conversation: ChatConversationSummary) => void;
|
|
17
|
+
untitledTitle?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function ChatPastChats({ chat, labels, testID }: ChatPastChatsProps): React.ReactElement | null;
|
|
20
|
+
export declare function ConversationRow({ conversation, list, chat, labels, testID, onOpen, untitledTitle, }: ConversationRowProps): React.ReactElement;
|
|
21
|
+
//# sourceMappingURL=ChatPastChats.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import { type ChatShellProps } from "./ChatFrame.js";
|
|
3
|
+
/** The whole chat for one screen of the app's navigator. Keep `useChat` above the navigator so the conversation survives leaving the screen. */
|
|
4
|
+
export declare function ChatScreen({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, title, headerActions, onClose, testID, }: ChatShellProps): React.ReactElement | null;
|
|
5
|
+
//# sourceMappingURL=ChatScreen.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BottomSheetProps } from "@webority/mobile-ui";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type ChatShellProps } from "./ChatFrame.js";
|
|
4
|
+
export interface ChatSheetProps extends ChatShellProps {
|
|
5
|
+
/** Controls the sheet. When given, the sheet follows it. */
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/** The starting state when `open` is not given. Default false. */
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
position?: "end" | "start";
|
|
11
|
+
/** Space between the launcher and the bottom edge. Default 16. */
|
|
12
|
+
bottomOffset?: number;
|
|
13
|
+
snapPoints?: BottomSheetProps["snapPoints"];
|
|
14
|
+
/** The launcher shows only its icon. */
|
|
15
|
+
compact?: boolean;
|
|
16
|
+
/** Opens the sheet on this conversation when it changes to a new id (a push tap); uncontrolled sheets only. */
|
|
17
|
+
conversationId?: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** The chat in a bottom sheet over the screen, opened from a floating launcher. */
|
|
20
|
+
export declare function ChatSheet({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, keyboardOffset, open, defaultOpen, onOpenChange, position, bottomOffset, snapPoints, compact, openTicket, handoffHosts, resolveLink, conversationId, onClose, testID, }: ChatSheetProps): React.ReactElement | null;
|
|
21
|
+
//# sourceMappingURL=ChatSheet.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChatLabels } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ChatOpenTicketHandler } from "./types.js";
|
|
4
|
+
import type { UseChatResult } from "./useChat.js";
|
|
5
|
+
export interface ChatStartersProps {
|
|
6
|
+
chat: UseChatResult;
|
|
7
|
+
labels: ChatLabels;
|
|
8
|
+
openTicket?: ChatOpenTicketHandler;
|
|
9
|
+
testID?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChatStarters({ chat, labels, openTicket, testID }: ChatStartersProps): React.ReactElement | null;
|
|
12
|
+
//# sourceMappingURL=ChatStarters.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ChatLabels, ChatLoaderStyle, ChatMotion, ChatPart, ChatUploadFile } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
import type { ChatLayoutParts, ChatOpenTicketHandler, ChatRenderers } from "./types.js";
|
|
5
|
+
import type { UseChatResult } from "./useChat.js";
|
|
6
|
+
export interface ChatThreadProps {
|
|
7
|
+
chat: UseChatResult;
|
|
8
|
+
labels: ChatLabels;
|
|
9
|
+
renderers?: ChatRenderers;
|
|
10
|
+
layoutParts?: ChatLayoutParts;
|
|
11
|
+
loader?: ChatLoaderStyle;
|
|
12
|
+
motion?: ChatMotion;
|
|
13
|
+
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
14
|
+
onOpenAttachment?: (part: Extract<ChatPart, {
|
|
15
|
+
kind: "File";
|
|
16
|
+
}>) => void;
|
|
17
|
+
onOpenTarget?: (target: string) => void;
|
|
18
|
+
onNavigate?: (path: string) => void;
|
|
19
|
+
openTicket?: ChatOpenTicketHandler;
|
|
20
|
+
handoffHosts?: readonly string[];
|
|
21
|
+
resolveLink?: (href: string) => string | null;
|
|
22
|
+
focusComposer?: () => void;
|
|
23
|
+
keyboardAware?: boolean;
|
|
24
|
+
keyboardOffset?: number;
|
|
25
|
+
/** Drawn before the first message. */
|
|
26
|
+
empty?: React.ReactNode;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
testID?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The conversation on mobile-ui's `MessageList`, newest at the bottom. The typing slot holds the
|
|
32
|
+
* pill while a paced reply is held, the loader while a reply is awaited and the error row after a
|
|
33
|
+
* failed or stopped turn.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ChatThread({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, focusComposer, keyboardAware, keyboardOffset, empty, style, testID, }: ChatThreadProps): React.ReactElement;
|
|
36
|
+
//# sourceMappingURL=ChatThread.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ChatLabels, type ChatLiveMessage } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { UseChatResult } from "./useChat.js";
|
|
4
|
+
export interface ReadAloudButtonProps {
|
|
5
|
+
chat: UseChatResult;
|
|
6
|
+
message: ChatLiveMessage;
|
|
7
|
+
labels: ChatLabels;
|
|
8
|
+
testID?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ReadAloudButton({ chat, message, labels, testID }: ReadAloudButtonProps): React.ReactElement | null;
|
|
11
|
+
//# sourceMappingURL=ReadAloudButton.d.ts.map
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
14
|
-
export {
|
|
15
|
-
export type {
|
|
16
|
-
export {
|
|
17
|
-
export
|
|
18
|
-
export { ChatThread } from "./
|
|
19
|
-
export
|
|
20
|
-
export {
|
|
21
|
-
export
|
|
1
|
+
export { AgentByline } from "./AgentByline.js";
|
|
2
|
+
export { ChatComposer } from "./ChatComposer.js";
|
|
3
|
+
export { ChatConversationActions } from "./ChatConversationActions.js";
|
|
4
|
+
export { ChatDictationButton } from "./ChatDictationButton.js";
|
|
5
|
+
export { ChatEmbed } from "./ChatEmbed.js";
|
|
6
|
+
export { ChatFooter } from "./ChatFooter.js";
|
|
7
|
+
export type { ChatShellProps } from "./ChatFrame.js";
|
|
8
|
+
export { ChatHistory } from "./ChatHistory.js";
|
|
9
|
+
export { ChatLiveBar } from "./ChatLiveBar.js";
|
|
10
|
+
export { ChatMessageActions } from "./ChatMessageActions.js";
|
|
11
|
+
export { ChatNudge } from "./ChatNudge.js";
|
|
12
|
+
export { ChatOpenTickets } from "./ChatOpenTickets.js";
|
|
13
|
+
export { ChatPastChats } from "./ChatPastChats.js";
|
|
14
|
+
export { ChatScreen } from "./ChatScreen.js";
|
|
15
|
+
export type { ChatSheetProps } from "./ChatSheet.js";
|
|
16
|
+
export { ChatSheet } from "./ChatSheet.js";
|
|
17
|
+
export { ChatStarters } from "./ChatStarters.js";
|
|
18
|
+
export { ChatThread } from "./ChatThread.js";
|
|
19
|
+
export { defaultOpenTarget, messageSignature } from "./chatShared.js";
|
|
20
|
+
export { ChatLoader } from "./loaders/ChatLoader.js";
|
|
21
|
+
export { TypingPill } from "./loaders/TypingPill.js";
|
|
22
|
+
export { CHAT_PUSH_TYPE, chatConversationIdFromPush } from "./pushOpen.js";
|
|
23
|
+
export { ReadAloudButton } from "./ReadAloudButton.js";
|
|
24
|
+
export { defaultRenderers } from "./renderers/index.js";
|
|
25
|
+
export type { ChatLayoutParts, ChatPartRendererProps, ChatRenderers } from "./types.js";
|
|
26
|
+
export type { UseChatOptions, UseChatResult } from "./useChat.js";
|
|
22
27
|
export { useChat } from "./useChat.js";
|
|
28
|
+
export { useChatSpeech } from "./useChatSpeech.js";
|
|
23
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ChatLoaderStyle } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface ChatLoaderProps {
|
|
4
|
+
style?: ChatLoaderStyle;
|
|
5
|
+
steps?: readonly string[];
|
|
6
|
+
phrases: readonly string[];
|
|
7
|
+
intervalMs: number;
|
|
8
|
+
motion?: "On" | "Reduced";
|
|
9
|
+
announce: string;
|
|
10
|
+
testID?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function ChatLoader({ style, steps, phrases, intervalMs, motion, announce, testID, }: ChatLoaderProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=ChatLoader.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatLoaderView } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface OrbLoaderProps {
|
|
4
|
+
view: ChatLoaderView;
|
|
5
|
+
reduced: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function OrbLoader({ view, reduced }: OrbLoaderProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=OrbLoader.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatLoaderView } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface PhrasesLoaderProps {
|
|
4
|
+
view: ChatLoaderView;
|
|
5
|
+
reduced: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function PhrasesLoader({ view, reduced }: PhrasesLoaderProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=PhrasesLoader.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatLoaderView } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface SkeletonLoaderProps {
|
|
4
|
+
view: ChatLoaderView;
|
|
5
|
+
reduced: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function SkeletonLoader({ view, reduced }: SkeletonLoaderProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=SkeletonLoader.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatLoaderView } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export interface StepsLoaderProps {
|
|
4
|
+
view: ChatLoaderView;
|
|
5
|
+
reduced: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function StepsLoader({ view, reduced }: StepsLoaderProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=StepsLoader.d.ts.map
|