@webority/mobile-chat 0.133.0 → 0.135.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 -1
- package/lib/commonjs/ChatAppearanceScope.js +1 -0
- package/lib/commonjs/ChatComposer.js +1 -1
- package/lib/commonjs/ChatConversationActions.js +1 -1
- package/lib/commonjs/ChatDictationButton.js +1 -1
- package/lib/commonjs/ChatEmbed.js +1 -1
- package/lib/commonjs/ChatFooter.js +1 -1
- package/lib/commonjs/ChatFrame.js +1 -1
- package/lib/commonjs/ChatHistory.js +1 -1
- package/lib/commonjs/ChatLauncher.js +1 -0
- package/lib/commonjs/ChatLiveBar.js +1 -1
- package/lib/commonjs/ChatMessageActions.js +1 -1
- package/lib/commonjs/ChatNudge.js +1 -1
- package/lib/commonjs/ChatOpenTickets.js +1 -1
- package/lib/commonjs/ChatPanel.js +1 -0
- package/lib/commonjs/ChatPastChats.js +1 -0
- package/lib/commonjs/ChatScreen.js +1 -1
- package/lib/commonjs/ChatSheet.js +1 -1
- package/lib/commonjs/ChatStarters.js +1 -1
- package/lib/commonjs/ChatThread.js +1 -1
- package/lib/commonjs/ReadAloudButton.js +1 -1
- package/lib/commonjs/chatShared.js +1 -1
- package/lib/commonjs/features.map.json +3 -3
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/loaders/ChatLoader.js +1 -1
- package/lib/commonjs/renderers/ActionPart.js +1 -1
- package/lib/commonjs/renderers/ChartPart.js +1 -1
- package/lib/commonjs/renderers/FigureText.js +1 -1
- package/lib/commonjs/renderers/FiguresPart.js +1 -1
- package/lib/commonjs/renderers/FilePart.js +1 -1
- package/lib/commonjs/renderers/HandoffPart.js +1 -1
- package/lib/commonjs/renderers/ImagePart.js +1 -1
- package/lib/commonjs/renderers/InputRequestPart.js +1 -1
- package/lib/commonjs/renderers/NoticePart.js +1 -1
- package/lib/commonjs/renderers/QuickRepliesPart.js +1 -1
- package/lib/commonjs/renderers/RecordCardPart.js +1 -1
- package/lib/commonjs/renderers/SourcesPart.js +1 -1
- package/lib/commonjs/renderers/TablePart.js +1 -1
- package/lib/commonjs/renderers/TicketPart.js +1 -1
- package/lib/commonjs/renderers/VoiceClipPart.js +1 -1
- package/lib/commonjs/speech/phoneSpeech.js +1 -1
- package/lib/commonjs/speech/speechText.js +1 -1
- package/lib/commonjs/useChat.js +1 -1
- package/lib/commonjs/useChatHaptics.js +1 -1
- package/lib/commonjs/useChatSound.js +1 -0
- package/lib/module/AgentByline.js +1 -1
- package/lib/module/ChatAppearanceScope.js +1 -0
- package/lib/module/ChatComposer.js +1 -1
- package/lib/module/ChatConversationActions.js +1 -1
- package/lib/module/ChatDictationButton.js +1 -1
- package/lib/module/ChatEmbed.js +1 -1
- package/lib/module/ChatFooter.js +1 -1
- package/lib/module/ChatFrame.js +1 -1
- package/lib/module/ChatHistory.js +1 -1
- package/lib/module/ChatLauncher.js +1 -0
- package/lib/module/ChatLiveBar.js +1 -1
- package/lib/module/ChatMessageActions.js +1 -1
- package/lib/module/ChatNudge.js +1 -1
- package/lib/module/ChatOpenTickets.js +1 -1
- package/lib/module/ChatPanel.js +1 -0
- package/lib/module/ChatPastChats.js +1 -0
- package/lib/module/ChatScreen.js +1 -1
- package/lib/module/ChatSheet.js +1 -1
- package/lib/module/ChatStarters.js +1 -1
- package/lib/module/ChatThread.js +1 -1
- package/lib/module/ReadAloudButton.js +1 -1
- package/lib/module/chatShared.js +1 -1
- package/lib/module/features.map.json +3 -3
- package/lib/module/index.js +1 -1
- package/lib/module/loaders/ChatLoader.js +1 -1
- package/lib/module/renderers/ActionPart.js +1 -1
- package/lib/module/renderers/ChartPart.js +1 -1
- package/lib/module/renderers/FigureText.js +1 -1
- package/lib/module/renderers/FiguresPart.js +1 -1
- package/lib/module/renderers/FilePart.js +1 -1
- package/lib/module/renderers/HandoffPart.js +1 -1
- package/lib/module/renderers/ImagePart.js +1 -1
- package/lib/module/renderers/InputRequestPart.js +1 -1
- package/lib/module/renderers/NoticePart.js +1 -1
- package/lib/module/renderers/QuickRepliesPart.js +1 -1
- package/lib/module/renderers/RecordCardPart.js +1 -1
- package/lib/module/renderers/SourcesPart.js +1 -1
- package/lib/module/renderers/TablePart.js +1 -1
- package/lib/module/renderers/TicketPart.js +1 -1
- package/lib/module/renderers/VoiceClipPart.js +1 -1
- package/lib/module/speech/phoneSpeech.js +1 -1
- package/lib/module/speech/speechText.js +1 -1
- package/lib/module/useChat.js +1 -1
- package/lib/module/useChatHaptics.js +1 -1
- package/lib/module/useChatSound.js +1 -0
- package/lib/typescript/commonjs/ChatAppearanceScope.d.ts +11 -0
- package/lib/typescript/commonjs/ChatComposer.d.ts +5 -2
- package/lib/typescript/commonjs/ChatConversationActions.d.ts +1 -1
- package/lib/typescript/commonjs/ChatDictationButton.d.ts +3 -1
- package/lib/typescript/commonjs/ChatEmbed.d.ts +1 -1
- package/lib/typescript/commonjs/ChatFrame.d.ts +15 -4
- package/lib/typescript/commonjs/ChatLauncher.d.ts +22 -0
- package/lib/typescript/commonjs/ChatPanel.d.ts +39 -0
- package/lib/typescript/commonjs/ChatPastChats.d.ts +21 -0
- package/lib/typescript/commonjs/ChatScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ChatSheet.d.ts +1 -6
- package/lib/typescript/commonjs/ChatThread.d.ts +3 -1
- package/lib/typescript/commonjs/chatShared.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts +2 -1
- package/lib/typescript/commonjs/renderers/ChartPart.d.ts +1 -1
- package/lib/typescript/commonjs/renderers/FigureText.d.ts +4 -2
- package/lib/typescript/commonjs/renderers/HandoffPart.d.ts +1 -1
- package/lib/typescript/commonjs/renderers/ImagePart.d.ts +2 -1
- package/lib/typescript/commonjs/renderers/VoiceClipPart.d.ts +1 -1
- package/lib/typescript/commonjs/speech/speechText.d.ts +3 -3
- package/lib/typescript/commonjs/types.d.ts +28 -2
- package/lib/typescript/commonjs/useChat.d.ts +2 -0
- package/lib/typescript/commonjs/useChatSound.d.ts +35 -0
- package/lib/typescript/module/ChatAppearanceScope.d.ts +11 -0
- package/lib/typescript/module/ChatComposer.d.ts +5 -2
- package/lib/typescript/module/ChatConversationActions.d.ts +1 -1
- package/lib/typescript/module/ChatDictationButton.d.ts +3 -1
- package/lib/typescript/module/ChatEmbed.d.ts +1 -1
- package/lib/typescript/module/ChatFrame.d.ts +15 -4
- package/lib/typescript/module/ChatLauncher.d.ts +22 -0
- package/lib/typescript/module/ChatPanel.d.ts +39 -0
- package/lib/typescript/module/ChatPastChats.d.ts +21 -0
- package/lib/typescript/module/ChatScreen.d.ts +1 -1
- package/lib/typescript/module/ChatSheet.d.ts +1 -6
- package/lib/typescript/module/ChatThread.d.ts +3 -1
- package/lib/typescript/module/chatShared.d.ts +2 -0
- package/lib/typescript/module/index.d.ts +2 -1
- package/lib/typescript/module/renderers/ChartPart.d.ts +1 -1
- package/lib/typescript/module/renderers/FigureText.d.ts +4 -2
- package/lib/typescript/module/renderers/HandoffPart.d.ts +1 -1
- package/lib/typescript/module/renderers/ImagePart.d.ts +2 -1
- package/lib/typescript/module/renderers/VoiceClipPart.d.ts +1 -1
- package/lib/typescript/module/speech/speechText.d.ts +3 -3
- package/lib/typescript/module/types.d.ts +28 -2
- package/lib/typescript/module/useChat.d.ts +2 -0
- package/lib/typescript/module/useChatSound.d.ts +35 -0
- package/package.json +10 -9
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ChatLook } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type View } from "react-native";
|
|
4
|
+
export interface ChatLauncherProps {
|
|
5
|
+
look: ChatLook;
|
|
6
|
+
label: string;
|
|
7
|
+
side: "start" | "end";
|
|
8
|
+
offsetX: number;
|
|
9
|
+
offsetY: number;
|
|
10
|
+
/** Plays the entrance once, on the first show of the launcher. */
|
|
11
|
+
enter: boolean;
|
|
12
|
+
reduced: boolean;
|
|
13
|
+
buttonRef: React.RefObject<View | null>;
|
|
14
|
+
onPress: () => void;
|
|
15
|
+
testID: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The floating launcher as the look draws it: round or pill, with its label, the chosen entrance and the
|
|
19
|
+
* float idle. The entrance moves the button's own wrapper, so a scale or a turn happens around the button.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ChatLauncher({ look, label, side, offsetX, offsetY, enter, reduced, buttonRef, onPress, testID, }: ChatLauncherProps): React.ReactElement;
|
|
22
|
+
//# sourceMappingURL=ChatLauncher.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChatPanelMotion } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export type RevealSlot = "header" | "body" | "composer";
|
|
4
|
+
/** One open of the panel: the run number changes each open, so a new plan object replays the animation. */
|
|
5
|
+
export interface RevealPlan {
|
|
6
|
+
run: number;
|
|
7
|
+
delay: number;
|
|
8
|
+
duration: number;
|
|
9
|
+
distance: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GrowPlan {
|
|
12
|
+
run: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PanelRun {
|
|
15
|
+
grow: GrowPlan | null;
|
|
16
|
+
reveal: Record<RevealSlot, RevealPlan | null>;
|
|
17
|
+
}
|
|
18
|
+
/** The plans for one open of the panel. Each call builds new objects, so a changed run restarts the motion. */
|
|
19
|
+
export declare const panelRun: (options: {
|
|
20
|
+
motion: ChatPanelMotion;
|
|
21
|
+
reduced: boolean;
|
|
22
|
+
mode: "sheet" | "screen";
|
|
23
|
+
run: number;
|
|
24
|
+
}) => PanelRun;
|
|
25
|
+
interface ChatRevealProps {
|
|
26
|
+
plan: RevealPlan | null;
|
|
27
|
+
flex?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/** Fades and rises its child by the plan's distance, and plays again for each new plan. */
|
|
31
|
+
export declare function ChatReveal({ plan, flex, children }: ChatRevealProps): React.ReactElement;
|
|
32
|
+
interface ChatPanelGrowProps {
|
|
33
|
+
grow: GrowPlan | null;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** The spring panel: a full screen slides up from below. With no plan it draws its child as is. */
|
|
37
|
+
export declare function ChatPanelGrow({ grow, children }: ChatPanelGrowProps): React.ReactElement;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=ChatPanel.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";
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import { type ChatShellProps } from "./ChatFrame";
|
|
3
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,
|
|
4
|
+
export declare function ChatScreen({ chat, labels, renderers, layoutParts, loader, look, appearance, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, title, headerActions, onClose, testID, }: ChatShellProps): React.ReactElement | null;
|
|
5
5
|
//# sourceMappingURL=ChatScreen.d.ts.map
|
|
@@ -7,15 +7,10 @@ export interface ChatSheetProps extends ChatShellProps {
|
|
|
7
7
|
/** The starting state when `open` is not given. Default false. */
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
onOpenChange?: (open: boolean) => void;
|
|
10
|
-
position?: "end" | "start";
|
|
11
|
-
/** Space between the launcher and the bottom edge. Default 16. */
|
|
12
|
-
bottomOffset?: number;
|
|
13
10
|
snapPoints?: BottomSheetProps["snapPoints"];
|
|
14
|
-
/** The launcher shows only its icon. */
|
|
15
|
-
compact?: boolean;
|
|
16
11
|
/** Opens the sheet on this conversation when it changes to a new id (a push tap); uncontrolled sheets only. */
|
|
17
12
|
conversationId?: string | null;
|
|
18
13
|
}
|
|
19
14
|
/** The chat in a bottom sheet over the screen, opened from a floating launcher. */
|
|
20
|
-
export declare function ChatSheet({ chat, labels, renderers, layoutParts, loader,
|
|
15
|
+
export declare function ChatSheet({ chat, labels, renderers, layoutParts, loader, look, appearance, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, keyboardOffset, open, defaultOpen, onOpenChange, snapPoints, openTicket, handoffHosts, resolveLink, conversationId, onClose, testID, }: ChatSheetProps): React.ReactElement | null;
|
|
21
16
|
//# sourceMappingURL=ChatSheet.d.ts.map
|
|
@@ -18,6 +18,8 @@ export interface ChatThreadProps {
|
|
|
18
18
|
onNavigate?: (path: string) => void;
|
|
19
19
|
openTicket?: ChatOpenTicketHandler;
|
|
20
20
|
handoffHosts?: readonly string[];
|
|
21
|
+
resolveLink?: (href: string) => string | null;
|
|
22
|
+
focusComposer?: () => void;
|
|
21
23
|
keyboardAware?: boolean;
|
|
22
24
|
keyboardOffset?: number;
|
|
23
25
|
/** Drawn before the first message. */
|
|
@@ -30,5 +32,5 @@ export interface ChatThreadProps {
|
|
|
30
32
|
* pill while a paced reply is held, the loader while a reply is awaited and the error row after a
|
|
31
33
|
* failed or stopped turn.
|
|
32
34
|
*/
|
|
33
|
-
export declare function ChatThread({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, keyboardAware, keyboardOffset, empty, style, testID, }: ChatThreadProps): React.ReactElement;
|
|
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;
|
|
34
36
|
//# sourceMappingURL=ChatThread.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ChatLiveMessage } from "@webority/chat-core";
|
|
2
|
+
/** Moves screen-reader focus to a view. findNodeHandle throws on react-native-web, so the browser focuses the element itself. */
|
|
3
|
+
export declare function focusForAccessibility(node: unknown): void;
|
|
2
4
|
export declare function messageSignature(message: ChatLiveMessage): string;
|
|
3
5
|
export declare function defaultOpenTarget(target: string): void;
|
|
4
6
|
//# sourceMappingURL=chatShared.d.ts.map
|
|
@@ -10,6 +10,7 @@ export { ChatLiveBar } from "./ChatLiveBar";
|
|
|
10
10
|
export { ChatMessageActions } from "./ChatMessageActions";
|
|
11
11
|
export { ChatNudge } from "./ChatNudge";
|
|
12
12
|
export { ChatOpenTickets } from "./ChatOpenTickets";
|
|
13
|
+
export { ChatPastChats } from "./ChatPastChats";
|
|
13
14
|
export { ChatScreen } from "./ChatScreen";
|
|
14
15
|
export type { ChatSheetProps } from "./ChatSheet";
|
|
15
16
|
export { ChatSheet } from "./ChatSheet";
|
|
@@ -21,7 +22,7 @@ export { TypingPill } from "./loaders/TypingPill";
|
|
|
21
22
|
export { CHAT_PUSH_TYPE, chatConversationIdFromPush } from "./pushOpen";
|
|
22
23
|
export { ReadAloudButton } from "./ReadAloudButton";
|
|
23
24
|
export { defaultRenderers } from "./renderers";
|
|
24
|
-
export type { ChatLayoutParts, ChatPartRendererProps, ChatRenderers } from "./types";
|
|
25
|
+
export type { ChatAppearance, ChatLayoutParts, ChatLookInput, ChatPartRendererProps, ChatRenderers } from "./types";
|
|
25
26
|
export type { UseChatOptions, UseChatResult } from "./useChat";
|
|
26
27
|
export { useChat } from "./useChat";
|
|
27
28
|
export { useChatSpeech } from "./useChatSpeech";
|
|
@@ -3,6 +3,6 @@ import type { ChatPartRendererProps } from "../types";
|
|
|
3
3
|
type ChartPartProps = ChatPartRendererProps<Extract<ChatPart, {
|
|
4
4
|
kind: "Chart";
|
|
5
5
|
}>>;
|
|
6
|
-
export declare function ChartPart({ part, turn }: Pick<ChartPartProps, "part" | "turn">): import("react").JSX.Element
|
|
6
|
+
export declare function ChartPart({ part, turn }: Pick<ChartPartProps, "part" | "turn">): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=ChartPart.d.ts.map
|
|
@@ -10,12 +10,14 @@ export interface FigureRunsProps {
|
|
|
10
10
|
numberOfLines?: number;
|
|
11
11
|
accessibilityLabel?: string;
|
|
12
12
|
testID?: string;
|
|
13
|
+
heading?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface FigureTextProps extends Omit<FigureRunsProps, "runs"> {
|
|
15
16
|
text: string;
|
|
17
|
+
enabled?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export declare function runsToText(runs: readonly ChatFigureRun[]): string;
|
|
18
|
-
export declare function FigureRuns({ runs, variant, color, strong, numberOfLines, accessibilityLabel, testID, }: FigureRunsProps): import("react").JSX.Element;
|
|
19
|
-
export declare function FigureText({ text, variant, ...rest }: FigureTextProps): import("react").JSX.Element;
|
|
20
|
+
export declare function FigureRuns({ runs, variant, color, strong, numberOfLines, accessibilityLabel, testID, heading, }: FigureRunsProps): import("react").JSX.Element;
|
|
21
|
+
export declare function FigureText({ text, variant, enabled, ...rest }: FigureTextProps): import("react").JSX.Element;
|
|
20
22
|
export {};
|
|
21
23
|
//# sourceMappingURL=FigureText.d.ts.map
|
|
@@ -4,6 +4,6 @@ import type { ChatPartRendererProps } from "../types";
|
|
|
4
4
|
type HandoffView = Extract<ChatPart, {
|
|
5
5
|
kind: "Handoff";
|
|
6
6
|
}>;
|
|
7
|
-
export declare function HandoffPart({ part, turn }: ChatPartRendererProps<HandoffView>): React.ReactElement;
|
|
7
|
+
export declare function HandoffPart({ part, turn }: ChatPartRendererProps<HandoffView>): React.ReactElement | null;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=HandoffPart.d.ts.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ChatPart } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
2
3
|
import type { ChatPartRendererProps } from "../types";
|
|
3
4
|
type ImagePartProps = ChatPartRendererProps<Extract<ChatPart, {
|
|
4
5
|
kind: "Image";
|
|
5
6
|
}>>;
|
|
6
|
-
export declare function ImagePart({ part, turn }: Pick<ImagePartProps, "part" | "turn">):
|
|
7
|
+
export declare function ImagePart({ part, turn }: Pick<ImagePartProps, "part" | "turn">): React.JSX.Element;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=ImagePart.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const DEFAULT_SPEECH_LANGUAGE = "en-IN";
|
|
2
2
|
export declare const DEFAULT_SPEECH_VOICE = "en-IN-NeerjaNeural";
|
|
3
|
-
export declare const MAX_SPEAK_CHARS =
|
|
4
|
-
export declare const MAX_DICTATION_MS =
|
|
3
|
+
export declare const MAX_SPEAK_CHARS = 6000;
|
|
4
|
+
export declare const MAX_DICTATION_MS = 300000;
|
|
5
5
|
export declare const MIN_DICTATION_MS = 600;
|
|
6
6
|
/** The file extension a recording's bytes stand for. m4a is the fallback, the format the phone records. */
|
|
7
7
|
export declare function audioExtension(bytes: Uint8Array): string;
|
|
8
8
|
export declare function escapeSsml(text: string): string;
|
|
9
9
|
export declare function buildSsml(text: string, language: string, voice: string): string;
|
|
10
|
-
/** Cuts at the last sentence end
|
|
10
|
+
/** Cuts at the last sentence end within the limit, so a long reply is read whole sentences at a time. */
|
|
11
11
|
export declare function clampSpeakText(text: string): string;
|
|
12
12
|
/** Whole seconds as m:ss. A negative or non-finite value reads as 0:00. */
|
|
13
13
|
export declare function formatClipTime(ms: number): string;
|
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
import type { ChatLiveMessage, ChatPart, ChatPartKind, ChatTurnApi, ChatUploadFile } from "@webority/chat-core";
|
|
2
2
|
import type React from "react";
|
|
3
|
-
|
|
3
|
+
import type { View } from "react-native";
|
|
4
|
+
export type { ChatLookInput, ChatMotion } from "@webority/chat-core";
|
|
5
|
+
/**
|
|
6
|
+
* The web chat's appearance keys that the phone reads, under the names applyAppearance and the
|
|
7
|
+
* CSS variables use on the web. Each key the phone has no part for is left out, never accepted and ignored.
|
|
8
|
+
*/
|
|
9
|
+
export interface ChatAppearance {
|
|
10
|
+
/** Which side the launcher sits on. Default "end". */
|
|
11
|
+
position?: "end" | "start";
|
|
12
|
+
/** Launcher offset from the side edge, in px. */
|
|
13
|
+
offsetX?: number;
|
|
14
|
+
/** Launcher offset from the bottom edge, in px. */
|
|
15
|
+
offsetY?: number;
|
|
16
|
+
/** Accent colour as a hex string, or null for the theme's primary. */
|
|
17
|
+
"--wui-chat-accent"?: string | null;
|
|
18
|
+
/** Corner radius as a px length such as "14px", or null for the theme's radius. */
|
|
19
|
+
"--wui-chat-radius"?: string | null;
|
|
20
|
+
/** A font as the web names it: "var(--wui-font-display)" draws the display face, anything else the theme's UI face. */
|
|
21
|
+
"--wui-chat-font"?: string | null;
|
|
22
|
+
}
|
|
23
|
+
/** Host values the thread adds to each part's turn: the host's link resolver and the source rows a citation focuses. */
|
|
24
|
+
export interface ChatTurnHostApi {
|
|
25
|
+
resolveLink?: (href: string) => string | null;
|
|
26
|
+
registerSourceRow?: (marker: string, row: View | null) => void;
|
|
27
|
+
/** Moves focus to the composer input after a quick reply is chosen. */
|
|
28
|
+
focusComposer?: () => void;
|
|
29
|
+
}
|
|
4
30
|
export type ChatPartRendererProps<P extends ChatPart = ChatPart> = {
|
|
5
31
|
part: P;
|
|
6
32
|
message: ChatLiveMessage;
|
|
7
|
-
turn: ChatTurnApi;
|
|
33
|
+
turn: ChatTurnApi & ChatTurnHostApi;
|
|
8
34
|
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
9
35
|
};
|
|
10
36
|
export type ChatRenderers = Partial<{
|
|
@@ -33,6 +33,8 @@ export interface UseChatResult extends ChatSessionState, ChatActions {
|
|
|
33
33
|
emit: (name: string, data: Record<string, unknown>) => void;
|
|
34
34
|
/** The host reports whether the chat is on screen; the live stream runs only while it is and the app is active. */
|
|
35
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;
|
|
36
38
|
/** Present only when the host passed `onNavigate`; the turn API of each message hands relative links to it. */
|
|
37
39
|
onNavigate?: (path: string) => void;
|
|
38
40
|
}
|
|
@@ -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,11 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ChatAppearance } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Draws the accent colour, corner radius and font of the chat's appearance over its subtree, through a
|
|
5
|
+
* nested theme. With no appearance key set it draws its children as they are.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ChatAppearanceScope({ appearance, children, }: {
|
|
8
|
+
appearance?: ChatAppearance;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=ChatAppearanceScope.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ChatLabels, type ChatLook, type ChatUploadFile } from "@webority/chat-core";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
import type { UseChatResult } from "./useChat.js";
|
|
4
4
|
export interface ChatComposerProps {
|
|
@@ -9,6 +9,9 @@ export interface ChatComposerProps {
|
|
|
9
9
|
keyboardAware?: boolean;
|
|
10
10
|
safeArea?: boolean;
|
|
11
11
|
testID?: string;
|
|
12
|
+
focusRef?: React.MutableRefObject<(() => void) | null>;
|
|
13
|
+
/** The resolved look: its input ring and send reveal draw the box and the send button. */
|
|
14
|
+
look?: ChatLook;
|
|
12
15
|
}
|
|
13
|
-
export declare function ChatComposer({ chat, labels, pickAttachments, keyboardOffset, keyboardAware, safeArea, testID, }: ChatComposerProps): React.ReactElement;
|
|
16
|
+
export declare function ChatComposer({ chat, labels, pickAttachments, keyboardOffset, keyboardAware, safeArea, testID, focusRef, look, }: ChatComposerProps): React.ReactElement;
|
|
14
17
|
//# sourceMappingURL=ChatComposer.d.ts.map
|
|
@@ -4,6 +4,7 @@ import type { UseChatResult } from "./useChat.js";
|
|
|
4
4
|
export interface DictationNotice {
|
|
5
5
|
message: string;
|
|
6
6
|
openSettings: boolean;
|
|
7
|
+
tone: "danger" | "info";
|
|
7
8
|
}
|
|
8
9
|
export interface ChatDictationButtonProps {
|
|
9
10
|
chat: UseChatResult;
|
|
@@ -12,6 +13,7 @@ export interface ChatDictationButtonProps {
|
|
|
12
13
|
onText: (text: string) => void;
|
|
13
14
|
onNotice: (notice: DictationNotice | null) => void;
|
|
14
15
|
testID?: string;
|
|
16
|
+
stopRef?: React.MutableRefObject<(() => void) | null>;
|
|
15
17
|
}
|
|
16
|
-
export declare function ChatDictationButton({ chat, labels, disabled, onText, onNotice, testID, }: ChatDictationButtonProps): React.ReactElement | null;
|
|
18
|
+
export declare function ChatDictationButton({ chat, labels, disabled, onText, onNotice, testID, stopRef, }: ChatDictationButtonProps): React.ReactElement | null;
|
|
17
19
|
//# sourceMappingURL=ChatDictationButton.d.ts.map
|
|
@@ -7,5 +7,5 @@ export interface ChatEmbedProps extends ChatShellProps {
|
|
|
7
7
|
height?: number;
|
|
8
8
|
}
|
|
9
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,
|
|
10
|
+
export declare function ChatEmbed({ chat, labels, renderers, layoutParts, loader, look, appearance, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, title, headerActions, onClose, height, testID, }: ChatEmbedProps): React.ReactElement | null;
|
|
11
11
|
//# sourceMappingURL=ChatEmbed.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ChatLabels, type ChatLoaderStyle, type ChatLookInput, type ChatPart, type ChatUploadFile } from "@webority/chat-core";
|
|
2
2
|
import type React from "react";
|
|
3
|
-
import type { ChatLayoutParts, ChatOpenTicketHandler, ChatRenderers } from "./types.js";
|
|
3
|
+
import type { ChatAppearance, ChatLayoutParts, ChatOpenTicketHandler, ChatRenderers } from "./types.js";
|
|
4
4
|
import type { UseChatResult } from "./useChat.js";
|
|
5
5
|
export type ChatLayout = "screen" | "sheet" | "embedded";
|
|
6
6
|
/** The props every shell passes down to its frame. */
|
|
@@ -10,7 +10,8 @@ export interface ChatCommonProps {
|
|
|
10
10
|
renderers?: ChatRenderers;
|
|
11
11
|
layoutParts?: ChatLayoutParts;
|
|
12
12
|
loader?: ChatLoaderStyle;
|
|
13
|
-
motion
|
|
13
|
+
/** The look: its input ring and send reveal, its panel motion and its motion switch. Unset values take the defaults. */
|
|
14
|
+
look?: ChatLookInput;
|
|
14
15
|
pickAttachments?: () => Promise<ChatUploadFile[]>;
|
|
15
16
|
onOpenAttachment?: (part: Extract<ChatPart, {
|
|
16
17
|
kind: "File";
|
|
@@ -21,6 +22,8 @@ export interface ChatCommonProps {
|
|
|
21
22
|
openTicket?: ChatOpenTicketHandler;
|
|
22
23
|
/** Hosts an absolute https link or Navigate chip may open; any other absolute target is not linked. */
|
|
23
24
|
handoffHosts?: readonly string[];
|
|
25
|
+
/** Resolves a link in a reply to a host route or address; null leaves the link as text. */
|
|
26
|
+
resolveLink?: (href: string) => string | null;
|
|
24
27
|
keyboardOffset?: number;
|
|
25
28
|
testID?: string;
|
|
26
29
|
}
|
|
@@ -28,12 +31,20 @@ export interface ChatFrameProps extends ChatCommonProps {
|
|
|
28
31
|
layout: ChatLayout;
|
|
29
32
|
title?: string;
|
|
30
33
|
headerActions?: React.ReactNode;
|
|
34
|
+
/** The host sheet closes through this callback. */
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
/** Changes each time the panel opens, so the panel motion plays again. Default 0. */
|
|
37
|
+
enterKey?: number;
|
|
31
38
|
}
|
|
32
39
|
/** The props of the three shells: the frame's, with labels as a partial merged over the defaults. */
|
|
33
40
|
export interface ChatShellProps extends Omit<ChatCommonProps, "labels"> {
|
|
34
41
|
labels?: Partial<ChatLabels>;
|
|
35
42
|
title?: string;
|
|
36
43
|
headerActions?: React.ReactNode;
|
|
44
|
+
/** The host sheet closes through this callback. */
|
|
45
|
+
onClose?: () => void;
|
|
46
|
+
/** The web's appearance keys the phone reads: accent, corner radius and font, and the launcher side and offsets for a sheet. */
|
|
47
|
+
appearance?: ChatAppearance;
|
|
37
48
|
}
|
|
38
|
-
export declare function ChatFrame({ chat, labels, renderers, layoutParts, loader,
|
|
49
|
+
export declare function ChatFrame({ chat, labels, renderers, layoutParts, loader, look, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, layout, title, headerActions, onClose, enterKey, testID, }: ChatFrameProps): React.ReactElement | null;
|
|
39
50
|
//# sourceMappingURL=ChatFrame.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ChatLook } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { type View } from "react-native";
|
|
4
|
+
export interface ChatLauncherProps {
|
|
5
|
+
look: ChatLook;
|
|
6
|
+
label: string;
|
|
7
|
+
side: "start" | "end";
|
|
8
|
+
offsetX: number;
|
|
9
|
+
offsetY: number;
|
|
10
|
+
/** Plays the entrance once, on the first show of the launcher. */
|
|
11
|
+
enter: boolean;
|
|
12
|
+
reduced: boolean;
|
|
13
|
+
buttonRef: React.RefObject<View | null>;
|
|
14
|
+
onPress: () => void;
|
|
15
|
+
testID: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The floating launcher as the look draws it: round or pill, with its label, the chosen entrance and the
|
|
19
|
+
* float idle. The entrance moves the button's own wrapper, so a scale or a turn happens around the button.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ChatLauncher({ look, label, side, offsetX, offsetY, enter, reduced, buttonRef, onPress, testID, }: ChatLauncherProps): React.ReactElement;
|
|
22
|
+
//# sourceMappingURL=ChatLauncher.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChatPanelMotion } from "@webority/chat-core";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
export type RevealSlot = "header" | "body" | "composer";
|
|
4
|
+
/** One open of the panel: the run number changes each open, so a new plan object replays the animation. */
|
|
5
|
+
export interface RevealPlan {
|
|
6
|
+
run: number;
|
|
7
|
+
delay: number;
|
|
8
|
+
duration: number;
|
|
9
|
+
distance: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GrowPlan {
|
|
12
|
+
run: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PanelRun {
|
|
15
|
+
grow: GrowPlan | null;
|
|
16
|
+
reveal: Record<RevealSlot, RevealPlan | null>;
|
|
17
|
+
}
|
|
18
|
+
/** The plans for one open of the panel. Each call builds new objects, so a changed run restarts the motion. */
|
|
19
|
+
export declare const panelRun: (options: {
|
|
20
|
+
motion: ChatPanelMotion;
|
|
21
|
+
reduced: boolean;
|
|
22
|
+
mode: "sheet" | "screen";
|
|
23
|
+
run: number;
|
|
24
|
+
}) => PanelRun;
|
|
25
|
+
interface ChatRevealProps {
|
|
26
|
+
plan: RevealPlan | null;
|
|
27
|
+
flex?: boolean;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/** Fades and rises its child by the plan's distance, and plays again for each new plan. */
|
|
31
|
+
export declare function ChatReveal({ plan, flex, children }: ChatRevealProps): React.ReactElement;
|
|
32
|
+
interface ChatPanelGrowProps {
|
|
33
|
+
grow: GrowPlan | null;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/** The spring panel: a full screen slides up from below. With no plan it draws its child as is. */
|
|
37
|
+
export declare function ChatPanelGrow({ grow, children }: ChatPanelGrowProps): React.ReactElement;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=ChatPanel.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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import { type ChatShellProps } from "./ChatFrame.js";
|
|
3
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,
|
|
4
|
+
export declare function ChatScreen({ chat, labels, renderers, layoutParts, loader, look, appearance, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, resolveLink, keyboardOffset, title, headerActions, onClose, testID, }: ChatShellProps): React.ReactElement | null;
|
|
5
5
|
//# sourceMappingURL=ChatScreen.d.ts.map
|
|
@@ -7,15 +7,10 @@ export interface ChatSheetProps extends ChatShellProps {
|
|
|
7
7
|
/** The starting state when `open` is not given. Default false. */
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
onOpenChange?: (open: boolean) => void;
|
|
10
|
-
position?: "end" | "start";
|
|
11
|
-
/** Space between the launcher and the bottom edge. Default 16. */
|
|
12
|
-
bottomOffset?: number;
|
|
13
10
|
snapPoints?: BottomSheetProps["snapPoints"];
|
|
14
|
-
/** The launcher shows only its icon. */
|
|
15
|
-
compact?: boolean;
|
|
16
11
|
/** Opens the sheet on this conversation when it changes to a new id (a push tap); uncontrolled sheets only. */
|
|
17
12
|
conversationId?: string | null;
|
|
18
13
|
}
|
|
19
14
|
/** The chat in a bottom sheet over the screen, opened from a floating launcher. */
|
|
20
|
-
export declare function ChatSheet({ chat, labels, renderers, layoutParts, loader,
|
|
15
|
+
export declare function ChatSheet({ chat, labels, renderers, layoutParts, loader, look, appearance, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, keyboardOffset, open, defaultOpen, onOpenChange, snapPoints, openTicket, handoffHosts, resolveLink, conversationId, onClose, testID, }: ChatSheetProps): React.ReactElement | null;
|
|
21
16
|
//# sourceMappingURL=ChatSheet.d.ts.map
|
|
@@ -18,6 +18,8 @@ export interface ChatThreadProps {
|
|
|
18
18
|
onNavigate?: (path: string) => void;
|
|
19
19
|
openTicket?: ChatOpenTicketHandler;
|
|
20
20
|
handoffHosts?: readonly string[];
|
|
21
|
+
resolveLink?: (href: string) => string | null;
|
|
22
|
+
focusComposer?: () => void;
|
|
21
23
|
keyboardAware?: boolean;
|
|
22
24
|
keyboardOffset?: number;
|
|
23
25
|
/** Drawn before the first message. */
|
|
@@ -30,5 +32,5 @@ export interface ChatThreadProps {
|
|
|
30
32
|
* pill while a paced reply is held, the loader while a reply is awaited and the error row after a
|
|
31
33
|
* failed or stopped turn.
|
|
32
34
|
*/
|
|
33
|
-
export declare function ChatThread({ chat, labels, renderers, layoutParts, loader, motion, pickAttachments, onOpenAttachment, onOpenTarget, onNavigate, openTicket, handoffHosts, keyboardAware, keyboardOffset, empty, style, testID, }: ChatThreadProps): React.ReactElement;
|
|
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;
|
|
34
36
|
//# sourceMappingURL=ChatThread.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ChatLiveMessage } from "@webority/chat-core";
|
|
2
|
+
/** Moves screen-reader focus to a view. findNodeHandle throws on react-native-web, so the browser focuses the element itself. */
|
|
3
|
+
export declare function focusForAccessibility(node: unknown): void;
|
|
2
4
|
export declare function messageSignature(message: ChatLiveMessage): string;
|
|
3
5
|
export declare function defaultOpenTarget(target: string): void;
|
|
4
6
|
//# sourceMappingURL=chatShared.d.ts.map
|
|
@@ -10,6 +10,7 @@ export { ChatLiveBar } from "./ChatLiveBar.js";
|
|
|
10
10
|
export { ChatMessageActions } from "./ChatMessageActions.js";
|
|
11
11
|
export { ChatNudge } from "./ChatNudge.js";
|
|
12
12
|
export { ChatOpenTickets } from "./ChatOpenTickets.js";
|
|
13
|
+
export { ChatPastChats } from "./ChatPastChats.js";
|
|
13
14
|
export { ChatScreen } from "./ChatScreen.js";
|
|
14
15
|
export type { ChatSheetProps } from "./ChatSheet.js";
|
|
15
16
|
export { ChatSheet } from "./ChatSheet.js";
|
|
@@ -21,7 +22,7 @@ export { TypingPill } from "./loaders/TypingPill.js";
|
|
|
21
22
|
export { CHAT_PUSH_TYPE, chatConversationIdFromPush } from "./pushOpen.js";
|
|
22
23
|
export { ReadAloudButton } from "./ReadAloudButton.js";
|
|
23
24
|
export { defaultRenderers } from "./renderers/index.js";
|
|
24
|
-
export type { ChatLayoutParts, ChatPartRendererProps, ChatRenderers } from "./types.js";
|
|
25
|
+
export type { ChatAppearance, ChatLayoutParts, ChatLookInput, ChatPartRendererProps, ChatRenderers } from "./types.js";
|
|
25
26
|
export type { UseChatOptions, UseChatResult } from "./useChat.js";
|
|
26
27
|
export { useChat } from "./useChat.js";
|
|
27
28
|
export { useChatSpeech } from "./useChatSpeech.js";
|
|
@@ -3,6 +3,6 @@ import type { ChatPartRendererProps } from "../types.js";
|
|
|
3
3
|
type ChartPartProps = ChatPartRendererProps<Extract<ChatPart, {
|
|
4
4
|
kind: "Chart";
|
|
5
5
|
}>>;
|
|
6
|
-
export declare function ChartPart({ part, turn }: Pick<ChartPartProps, "part" | "turn">): import("react").JSX.Element
|
|
6
|
+
export declare function ChartPart({ part, turn }: Pick<ChartPartProps, "part" | "turn">): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=ChartPart.d.ts.map
|
|
@@ -10,12 +10,14 @@ export interface FigureRunsProps {
|
|
|
10
10
|
numberOfLines?: number;
|
|
11
11
|
accessibilityLabel?: string;
|
|
12
12
|
testID?: string;
|
|
13
|
+
heading?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface FigureTextProps extends Omit<FigureRunsProps, "runs"> {
|
|
15
16
|
text: string;
|
|
17
|
+
enabled?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export declare function runsToText(runs: readonly ChatFigureRun[]): string;
|
|
18
|
-
export declare function FigureRuns({ runs, variant, color, strong, numberOfLines, accessibilityLabel, testID, }: FigureRunsProps): import("react").JSX.Element;
|
|
19
|
-
export declare function FigureText({ text, variant, ...rest }: FigureTextProps): import("react").JSX.Element;
|
|
20
|
+
export declare function FigureRuns({ runs, variant, color, strong, numberOfLines, accessibilityLabel, testID, heading, }: FigureRunsProps): import("react").JSX.Element;
|
|
21
|
+
export declare function FigureText({ text, variant, enabled, ...rest }: FigureTextProps): import("react").JSX.Element;
|
|
20
22
|
export {};
|
|
21
23
|
//# sourceMappingURL=FigureText.d.ts.map
|
|
@@ -4,6 +4,6 @@ import type { ChatPartRendererProps } from "../types.js";
|
|
|
4
4
|
type HandoffView = Extract<ChatPart, {
|
|
5
5
|
kind: "Handoff";
|
|
6
6
|
}>;
|
|
7
|
-
export declare function HandoffPart({ part, turn }: ChatPartRendererProps<HandoffView>): React.ReactElement;
|
|
7
|
+
export declare function HandoffPart({ part, turn }: ChatPartRendererProps<HandoffView>): React.ReactElement | null;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=HandoffPart.d.ts.map
|