@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
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ChatLabels, type ComposerAttachment } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
export interface ComposerAttachmentsProps {
|
|
4
|
-
attachments: ComposerAttachment[];
|
|
5
|
-
/** Omit to show the files without remove buttons. */
|
|
6
|
-
onRemove?: (key: string) => void;
|
|
7
|
-
labels?: Partial<ChatLabels>;
|
|
8
|
-
testID?: string;
|
|
9
|
-
}
|
|
10
|
-
/** The files on the question being written: a chip per file, a progress bar while it uploads. */
|
|
11
|
-
export declare const ComposerAttachments: React.FC<ComposerAttachmentsProps>;
|
|
12
|
-
//# sourceMappingURL=ComposerAttachments.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ChatRating } from "@webority/markdown-core/chat";
|
|
2
|
-
import { type ChatLabels } from "@webority/markdown-core/chat";
|
|
3
|
-
import type React from "react";
|
|
4
|
-
export interface ReplyRatingProps {
|
|
5
|
-
/** The rating already saved. */
|
|
6
|
-
rating?: ChatRating | null;
|
|
7
|
-
/** Saves a rating; rejects on failure. */
|
|
8
|
-
onRate: (rating: ChatRating, note?: string) => Promise<unknown>;
|
|
9
|
-
/** The server's note limit. Default 1000. */
|
|
10
|
-
noteMaxLength?: number;
|
|
11
|
-
labels?: Partial<ChatLabels>;
|
|
12
|
-
testID?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Helpful and Not helpful under one reply. Either saves at once; Not helpful then offers an
|
|
16
|
-
* optional note, saved with the same rating. Either choice can be changed.
|
|
17
|
-
*/
|
|
18
|
-
export declare const ReplyRating: React.FC<ReplyRatingProps>;
|
|
19
|
-
//# sourceMappingURL=ReplyRating.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { SupportAction, SupportActionTicket } from "@webority/markdown-core/chat";
|
|
2
|
-
import { type ChatLabels } from "@webority/markdown-core/chat";
|
|
3
|
-
import type React from "react";
|
|
4
|
-
export interface ActionCardProps {
|
|
5
|
-
action: SupportAction;
|
|
6
|
-
/**
|
|
7
|
-
* Sends the person's yes, e.g. mobile-support's `supportClient.confirmAction`; resolves to the
|
|
8
|
-
* ticket raised, replied on or reopened. A rejection's `message` is shown when present.
|
|
9
|
-
*/
|
|
10
|
-
confirmAction: (token: string) => Promise<SupportActionTicket>;
|
|
11
|
-
/** Shows a View ticket button once confirmed. */
|
|
12
|
-
onViewTicket?: (ticket: SupportActionTicket) => void;
|
|
13
|
-
labels?: Partial<ChatLabels>;
|
|
14
|
-
testID?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* One support action the assistant prepared, shown under its reply. Nothing reaches support until
|
|
18
|
-
* the person confirms. The card moves from ready to sending to done (with View ticket), or to
|
|
19
|
-
* dismissed on Not now. An expired action (a reopened conversation) still shows what was offered,
|
|
20
|
-
* without a button that could only fail.
|
|
21
|
-
*/
|
|
22
|
-
export declare const ActionCard: React.FC<ActionCardProps>;
|
|
23
|
-
//# sourceMappingURL=ActionCard.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type ChatEditing, type ChatLabels, type ComposerAttachment } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
export interface ChatComposerProps {
|
|
4
|
-
/** Called with the trimmed question; the box clears once it is handed over. */
|
|
5
|
-
onSubmit: (message: string) => unknown;
|
|
6
|
-
/** An answer is arriving: the question can be typed but not sent. */
|
|
7
|
-
busy?: boolean;
|
|
8
|
-
/** While busy, the send button becomes a stop button that calls this. */
|
|
9
|
-
onStop?: () => void;
|
|
10
|
-
/** No question can be asked, e.g. none left today. */
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/** The server's message limit. Default 4000. */
|
|
13
|
-
maxLength?: number;
|
|
14
|
-
/** Inside the bar, above the question box: a banner, the questions left. */
|
|
15
|
-
above?: React.ReactNode;
|
|
16
|
-
/** Inside the bar, below the question box: the disclaimer. */
|
|
17
|
-
below?: React.ReactNode;
|
|
18
|
-
/** Rides the keyboard; see mobile-ui `Composer`. Default true. */
|
|
19
|
-
keyboardAware?: boolean;
|
|
20
|
-
/** See mobile-ui `Composer`. Default: the bottom safe-area inset. */
|
|
21
|
-
keyboardOffset?: number;
|
|
22
|
-
/** Pads for the bottom safe area. Default true. */
|
|
23
|
-
safeArea?: boolean;
|
|
24
|
-
/** The files on the question being written. */
|
|
25
|
-
attachments?: ComposerAttachment[];
|
|
26
|
-
/** Opens the app's file picker. The attach button shows only when this is given. */
|
|
27
|
-
onAttach?: () => void;
|
|
28
|
-
/** Removes one file by its key. */
|
|
29
|
-
onRemoveAttachment?: (key: string) => void;
|
|
30
|
-
/** The question being edited; its banner's Cancel calls `onCancelEdit`. */
|
|
31
|
-
editing?: ChatEditing | null;
|
|
32
|
-
onCancelEdit?: () => void;
|
|
33
|
-
labels?: Partial<ChatLabels>;
|
|
34
|
-
testID?: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The question box and its send button, on mobile-ui's `Composer`. The return
|
|
38
|
-
* key adds a new line, as phone keyboards expect; only the button sends. The
|
|
39
|
-
* bar rides the keyboard and pads for the bottom safe area by default.
|
|
40
|
-
*/
|
|
41
|
-
export declare const ChatComposer: React.FC<ChatComposerProps>;
|
|
42
|
-
//# sourceMappingURL=ChatComposer.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ConversationSummary } from "@webority/markdown-core/chat";
|
|
2
|
-
import { type ChatClient, type ChatLabels } from "@webority/markdown-core/chat";
|
|
3
|
-
import type React from "react";
|
|
4
|
-
import { type StyleProp, type ViewStyle } from "react-native";
|
|
5
|
-
export interface ChatConversationListProps {
|
|
6
|
-
client: ChatClient;
|
|
7
|
-
/** E.g. go to the chat and call `chat.openConversation(conversation.publicId)`. */
|
|
8
|
-
onOpen: (conversation: ConversationSummary) => void;
|
|
9
|
-
/** Called after a chat is deleted, e.g. to start a new chat when the open one was deleted. */
|
|
10
|
-
onDeleted?: (id: string) => void;
|
|
11
|
-
/** Default 20. */
|
|
12
|
-
pageSize?: number;
|
|
13
|
-
labels?: Partial<ChatLabels>;
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
testID?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The person's past chats, newest first. It pages with Show more, refreshes on pull, opens one
|
|
19
|
-
* through `onOpen`, renames and deletes one after a confirm.
|
|
20
|
-
*/
|
|
21
|
-
export declare const ChatConversationList: React.FC<ChatConversationListProps>;
|
|
22
|
-
//# sourceMappingURL=ChatConversationList.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ChatLabels } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
export interface ChatLauncherProps {
|
|
4
|
-
onPress: () => void;
|
|
5
|
-
/** `end` (the default) or `start`: the bottom corner it sits in. */
|
|
6
|
-
position?: "end" | "start";
|
|
7
|
-
/**
|
|
8
|
-
* Distance above the bottom safe area, so it clears a tab bar or another floating control.
|
|
9
|
-
* Defaults to the theme's floating action button offset.
|
|
10
|
-
*/
|
|
11
|
-
bottomOffset?: number;
|
|
12
|
-
/** Show only the icon, with the label as its accessible name. */
|
|
13
|
-
compact?: boolean;
|
|
14
|
-
labels?: Partial<ChatLabels>;
|
|
15
|
-
testID?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* An optional floating button that opens the chat. A phone app usually opens the chat from a
|
|
19
|
-
* header action or a Help row instead; use this where a floating entry point fits the screen.
|
|
20
|
-
*/
|
|
21
|
-
export declare const ChatLauncher: React.FC<ChatLauncherProps>;
|
|
22
|
-
//# sourceMappingURL=ChatLauncher.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
export interface ChatMarkdownProps<T = string> {
|
|
3
|
-
/** The reply text, possibly still arriving. */
|
|
4
|
-
text: string;
|
|
5
|
-
/**
|
|
6
|
-
* Maps a reply link (`scheme:kind/id`, e.g. `app:requirement/R-12`) to what it opens in the
|
|
7
|
-
* app: a route, a screen and its params, anything `onLinkPress` understands. Return null for a
|
|
8
|
-
* link the app does not know; it then shows as plain text. A web address never reaches it.
|
|
9
|
-
*/
|
|
10
|
-
resolveLink?: (href: string) => T | null | undefined;
|
|
11
|
-
/** Opens what `resolveLink` returned. Without it, links show as plain text. */
|
|
12
|
-
onLinkPress?: (target: T) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Tells a citation marker (the bracketed inner text, e.g. `1` for `[1]`) from an ordinary link.
|
|
15
|
-
* A citation draws as a pressable marker and never as a link.
|
|
16
|
-
*/
|
|
17
|
-
isCitation?: (inner: string) => boolean;
|
|
18
|
-
/** Opens the citation a reply marker names. Without it, citation markers show as plain text. */
|
|
19
|
-
onOpenCitation?: (citation: string) => void;
|
|
20
|
-
testID?: string;
|
|
21
|
-
}
|
|
22
|
-
/** A reply never opens a web address, and its headings draw as bold lines, not large type. */
|
|
23
|
-
export declare function ChatMarkdown<T = string>({ text, resolveLink, onLinkPress, isCitation, onOpenCitation, testID, }: ChatMarkdownProps<T>): React.ReactElement;
|
|
24
|
-
//# sourceMappingURL=ChatMarkdown.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { ChatAttachment, ChatRating, SupportActionTicket } from "@webority/markdown-core/chat";
|
|
2
|
-
import { type ChatLabels } from "@webority/markdown-core/chat";
|
|
3
|
-
import type React from "react";
|
|
4
|
-
import type { ChatTurn } from "../useChat.js";
|
|
5
|
-
/** The props a thread passes to each of its turns. */
|
|
6
|
-
export interface ChatReplyProps<T = string> {
|
|
7
|
-
/** Shows the rating under a stored reply. */
|
|
8
|
-
onRate?: (turnId: string, rating: ChatRating, note?: string) => Promise<unknown>;
|
|
9
|
-
/** Maps a reply link to what it opens; see `ChatMarkdown`. */
|
|
10
|
-
resolveLink?: (href: string) => T | null | undefined;
|
|
11
|
-
/** Opens what `resolveLink` returned. */
|
|
12
|
-
onLinkPress?: (target: T) => void;
|
|
13
|
-
/** Tells a citation marker in a reply from an ordinary link; see `ChatMarkdown`. */
|
|
14
|
-
isCitation?: (inner: string) => boolean;
|
|
15
|
-
/** Opens the citation a reply marker names; see `ChatMarkdown`. */
|
|
16
|
-
onOpenCitation?: (citation: string) => void;
|
|
17
|
-
/** Sends a suggested follow-up question; shows the suggestions under the last answer. */
|
|
18
|
-
onAskSuggestion?: (text: string) => void;
|
|
19
|
-
/** Shows support action cards; see `ActionCard`. */
|
|
20
|
-
confirmAction?: (token: string) => Promise<SupportActionTicket>;
|
|
21
|
-
onViewTicket?: (ticket: SupportActionTicket) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Draws the assistant's answer in place of `ChatMarkdown` (charts, maths). The question, action
|
|
24
|
-
* cards, rating and layout stay the library's.
|
|
25
|
-
*/
|
|
26
|
-
renderReply?: (turn: ChatTurn, state: {
|
|
27
|
-
streaming: boolean;
|
|
28
|
-
}) => React.ReactNode;
|
|
29
|
-
/** Sends a failed or stopped question again; shows Try again under it. */
|
|
30
|
-
onRetry?: (turnId: string) => void;
|
|
31
|
-
/** Asks for a new answer to this turn; shows New answer under the answer when `canRegenerate` is set. */
|
|
32
|
-
onRegenerate?: (turnId: string) => void;
|
|
33
|
-
/** Puts this question back in the box to edit; shows Edit under the question. */
|
|
34
|
-
onEdit?: (turnId: string) => void;
|
|
35
|
-
/** Opens an attached file from its chip under the question. */
|
|
36
|
-
onOpenAttachment?: (attachment: ChatAttachment) => void;
|
|
37
|
-
labels?: Partial<ChatLabels>;
|
|
38
|
-
}
|
|
39
|
-
export interface ChatMessageProps<T = string> extends ChatReplyProps<T> {
|
|
40
|
-
turn: ChatTurn;
|
|
41
|
-
/** Set on the one turn a New answer is offered for, normally the last answered turn. */
|
|
42
|
-
canRegenerate?: boolean;
|
|
43
|
-
testID?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* One turn on mobile-ui's chat parts: the person's question in a `MessageBubble` on the trailing
|
|
47
|
-
* side, with its files, a stopped note and Try again or Edit under it; the typing dots and the
|
|
48
|
-
* tool step while the answer has not started, then the answer in a bubble on the leading side.
|
|
49
|
-
* The answer is announced once, when it finishes arriving. Support actions show under the answer,
|
|
50
|
-
* and the rating once the reply is stored.
|
|
51
|
-
*/
|
|
52
|
-
declare function ChatMessageView<T = string>({ turn, canRegenerate, onRetry, onRegenerate, onEdit, onOpenAttachment, onRate, resolveLink, onLinkPress, isCitation, onOpenCitation, onAskSuggestion, confirmAction, onViewTicket, renderReply, labels: labelOverrides, testID, }: ChatMessageProps<T>): React.ReactElement;
|
|
53
|
-
export declare const ChatMessage: typeof ChatMessageView;
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=ChatMessage.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type ChatAttachment, type ChatUploadFile } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
import type { UseChatResult } from "../useChat.js";
|
|
4
|
-
import type { ChatReplyProps } from "./ChatMessage.js";
|
|
5
|
-
export interface ChatScreenProps<T = string> extends Omit<ChatReplyProps<T>, "onRate" | "onAskSuggestion"> {
|
|
6
|
-
/** The `useChat` result. */
|
|
7
|
-
chat: UseChatResult;
|
|
8
|
-
/** Opens the file picker. The attach button shows only with this and the chat's attachment settings. */
|
|
9
|
-
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
10
|
-
/** Opens an attachment shown in a message. */
|
|
11
|
-
onOpenAttachment?: (attachment: ChatAttachment) => void;
|
|
12
|
-
/** Header title. Defaults to the `panelTitle` label. */
|
|
13
|
-
title?: string;
|
|
14
|
-
/** Extra header controls before New chat, e.g. an "All chats" button. */
|
|
15
|
-
headerActions?: React.ReactNode;
|
|
16
|
-
/** Shown before the first question, in place of the default title and text. */
|
|
17
|
-
empty?: React.ReactNode;
|
|
18
|
-
/** The footnote under the question box. Defaults to the `disclaimer` label; null hides it. */
|
|
19
|
-
disclaimer?: string | null;
|
|
20
|
-
/** The server's message limit. Default 4000. */
|
|
21
|
-
maxLength?: number;
|
|
22
|
-
/** Show the questions left once this many or fewer remain. Default 10. */
|
|
23
|
-
allowanceThreshold?: number;
|
|
24
|
-
/** Offer ratings under stored replies. Default true. */
|
|
25
|
-
rating?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* How far below the question box the keyboard's top edge starts. Default: the bottom safe-area
|
|
28
|
-
* inset; set it to the tab bar's height when the screen sits above one.
|
|
29
|
-
*/
|
|
30
|
-
keyboardOffset?: number;
|
|
31
|
-
testID?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The whole chat for one screen of the app's navigator: a header with New chat, the
|
|
35
|
-
* conversation, the questions left today, the question box and the AI disclaimer. The question
|
|
36
|
-
* box rides the keyboard and the newest turn stays above it. Place it in a stack screen and keep
|
|
37
|
-
* the `useChat` call above the navigator, so the conversation survives leaving the screen.
|
|
38
|
-
*/
|
|
39
|
-
export declare function ChatScreen<T = string>({ chat, pickAttachments, onOpenAttachment, title, headerActions, empty, disclaimer, maxLength, allowanceThreshold, rating, keyboardOffset, testID, ...reply }: ChatScreenProps<T>): React.ReactElement;
|
|
40
|
-
//# sourceMappingURL=ChatScreen.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type ChatAttachment } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
-
import type { ChatTurn } from "../useChat.js";
|
|
5
|
-
import { type ChatReplyProps } from "./ChatMessage.js";
|
|
6
|
-
export interface ChatThreadProps<T = string> extends ChatReplyProps<T> {
|
|
7
|
-
turns: ChatTurn[];
|
|
8
|
-
/** Shown before the first question. */
|
|
9
|
-
empty?: React.ReactNode;
|
|
10
|
-
/** Lifts the newest turn above the keyboard; see mobile-ui `MessageList`. Default true. */
|
|
11
|
-
keyboardAware?: boolean;
|
|
12
|
-
/** The composer's `keyboardOffset`. Default: the bottom safe-area inset. */
|
|
13
|
-
keyboardOffset?: number;
|
|
14
|
-
/** Asks a failed or stopped turn's question again. */
|
|
15
|
-
onRetry?: (turnId: string) => void;
|
|
16
|
-
/** Asks for a new answer; offered on the last answered turn only. */
|
|
17
|
-
onRegenerate?: (turnId: string) => void;
|
|
18
|
-
/** Puts a question back in the box to be edited. */
|
|
19
|
-
onEdit?: (turnId: string) => void;
|
|
20
|
-
onOpenAttachment?: (attachment: ChatAttachment) => void;
|
|
21
|
-
style?: StyleProp<ViewStyle>;
|
|
22
|
-
testID?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The conversation on mobile-ui's `MessageList`: newest at the bottom, the
|
|
26
|
-
* streaming answer growing in place, a jump to the latest once scrolled up,
|
|
27
|
-
* and the newest turn kept above the keyboard.
|
|
28
|
-
*/
|
|
29
|
-
export declare function ChatThread<T = string>({ turns, empty, keyboardAware, keyboardOffset, onRetry, onRegenerate, onEdit, onOpenAttachment, onAskSuggestion, style, testID, ...reply }: ChatThreadProps<T>): React.ReactElement;
|
|
30
|
-
//# sourceMappingURL=ChatThread.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ChatLabels, type ComposerAttachment } from "@webority/markdown-core/chat";
|
|
2
|
-
import type React from "react";
|
|
3
|
-
export interface ComposerAttachmentsProps {
|
|
4
|
-
attachments: ComposerAttachment[];
|
|
5
|
-
/** Omit to show the files without remove buttons. */
|
|
6
|
-
onRemove?: (key: string) => void;
|
|
7
|
-
labels?: Partial<ChatLabels>;
|
|
8
|
-
testID?: string;
|
|
9
|
-
}
|
|
10
|
-
/** The files on the question being written: a chip per file, a progress bar while it uploads. */
|
|
11
|
-
export declare const ComposerAttachments: React.FC<ComposerAttachmentsProps>;
|
|
12
|
-
//# sourceMappingURL=ComposerAttachments.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ChatRating } from "@webority/markdown-core/chat";
|
|
2
|
-
import { type ChatLabels } from "@webority/markdown-core/chat";
|
|
3
|
-
import type React from "react";
|
|
4
|
-
export interface ReplyRatingProps {
|
|
5
|
-
/** The rating already saved. */
|
|
6
|
-
rating?: ChatRating | null;
|
|
7
|
-
/** Saves a rating; rejects on failure. */
|
|
8
|
-
onRate: (rating: ChatRating, note?: string) => Promise<unknown>;
|
|
9
|
-
/** The server's note limit. Default 1000. */
|
|
10
|
-
noteMaxLength?: number;
|
|
11
|
-
labels?: Partial<ChatLabels>;
|
|
12
|
-
testID?: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Helpful and Not helpful under one reply. Either saves at once; Not helpful then offers an
|
|
16
|
-
* optional note, saved with the same rating. Either choice can be changed.
|
|
17
|
-
*/
|
|
18
|
-
export declare const ReplyRating: React.FC<ReplyRatingProps>;
|
|
19
|
-
//# sourceMappingURL=ReplyRating.d.ts.map
|