@webority/mobile-chat 0.135.1 → 0.137.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/ChatComposer.js +1 -1
- package/lib/commonjs/ChatFrame.js +1 -1
- package/lib/commonjs/ChatLauncher.js +1 -1
- package/lib/commonjs/ChatLiveBar.js +1 -1
- package/lib/commonjs/ChatMessageActions.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/chatShared.js +1 -1
- package/lib/commonjs/loaders/ReplyRing.js +1 -0
- package/lib/commonjs/renderers/ActionPart.js +1 -1
- package/lib/commonjs/renderers/InputRequestPart.js +1 -1
- package/lib/commonjs/renderers/QuickRepliesPart.js +1 -1
- package/lib/commonjs/renderers/TextPart.js +1 -1
- package/lib/commonjs/renderers/chipLook.js +1 -0
- package/lib/commonjs/speech/azureSpeech.js +1 -1
- package/lib/commonjs/useChat.js +1 -1
- package/lib/commonjs/useTranscriptActions.js +1 -1
- package/lib/module/AgentByline.js +1 -1
- package/lib/module/ChatComposer.js +1 -1
- package/lib/module/ChatFrame.js +1 -1
- package/lib/module/ChatLauncher.js +1 -1
- package/lib/module/ChatLiveBar.js +1 -1
- package/lib/module/ChatMessageActions.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/chatShared.js +1 -1
- package/lib/module/loaders/ReplyRing.js +1 -0
- package/lib/module/renderers/ActionPart.js +1 -1
- package/lib/module/renderers/InputRequestPart.js +1 -1
- package/lib/module/renderers/QuickRepliesPart.js +1 -1
- package/lib/module/renderers/TextPart.js +1 -1
- package/lib/module/renderers/chipLook.js +1 -0
- package/lib/module/speech/azureSpeech.js +1 -1
- package/lib/module/useChat.js +1 -1
- package/lib/module/useTranscriptActions.js +1 -1
- package/lib/typescript/commonjs/AgentByline.d.ts +2 -1
- package/lib/typescript/commonjs/ChatComposer.d.ts +6 -3
- package/lib/typescript/commonjs/ChatFrame.d.ts +3 -3
- package/lib/typescript/commonjs/ChatLauncher.d.ts +6 -2
- package/lib/typescript/commonjs/ChatStarters.d.ts +4 -1
- package/lib/typescript/commonjs/ChatThread.d.ts +10 -4
- package/lib/typescript/commonjs/chatShared.d.ts +1 -0
- package/lib/typescript/commonjs/loaders/ReplyRing.d.ts +9 -0
- package/lib/typescript/commonjs/renderers/chipLook.d.ts +7 -0
- package/lib/typescript/commonjs/types.d.ts +6 -1
- package/lib/typescript/commonjs/useChat.d.ts +3 -1
- package/lib/typescript/module/AgentByline.d.ts +2 -1
- package/lib/typescript/module/ChatComposer.d.ts +6 -3
- package/lib/typescript/module/ChatFrame.d.ts +3 -3
- package/lib/typescript/module/ChatLauncher.d.ts +6 -2
- package/lib/typescript/module/ChatStarters.d.ts +4 -1
- package/lib/typescript/module/ChatThread.d.ts +10 -4
- package/lib/typescript/module/chatShared.d.ts +1 -0
- package/lib/typescript/module/loaders/ReplyRing.d.ts +9 -0
- package/lib/typescript/module/renderers/chipLook.d.ts +7 -0
- package/lib/typescript/module/types.d.ts +6 -1
- package/lib/typescript/module/useChat.d.ts +3 -1
- package/package.json +12 -11
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
export interface ReplyRingProps {
|
|
3
|
+
active: boolean;
|
|
4
|
+
reduced: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** A two-tone ring that turns around its children while a reply is in progress; plain children otherwise. */
|
|
8
|
+
export declare function ReplyRing({ active, reduced, children }: ReplyRingProps): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ReplyRing.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChatQuickReplyVariant } from "@webority/chat-core";
|
|
2
|
+
import type { ChipTone, ChipVariant } from "@webority/mobile-ui";
|
|
3
|
+
export declare function chipLook(variant: ChatQuickReplyVariant | null): {
|
|
4
|
+
variant: ChipVariant;
|
|
5
|
+
tone?: ChipTone;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=chipLook.d.ts.map
|
|
@@ -27,11 +27,16 @@ export interface ChatTurnHostApi {
|
|
|
27
27
|
/** Moves focus to the composer input after a quick reply is chosen. */
|
|
28
28
|
focusComposer?: () => void;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Opens the app's file picker. accept lists the media types a file question takes;
|
|
32
|
+
* an app may ignore it, the server checks every upload.
|
|
33
|
+
*/
|
|
34
|
+
export type PickAttachments = (accept?: readonly string[]) => Promise<ChatUploadFile[]>;
|
|
30
35
|
export type ChatPartRendererProps<P extends ChatPart = ChatPart> = {
|
|
31
36
|
part: P;
|
|
32
37
|
message: ChatLiveMessage;
|
|
33
38
|
turn: ChatTurnApi & ChatTurnHostApi;
|
|
34
|
-
pickAttachments?:
|
|
39
|
+
pickAttachments?: PickAttachments;
|
|
35
40
|
};
|
|
36
41
|
export type ChatRenderers = Partial<{
|
|
37
42
|
[K in ChatPartKind]: React.ComponentType<ChatPartRendererProps<Extract<ChatPart, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatBehaviour, ChatClient, ChatFeature, ChatSession, ChatSessionState } from "@webority/chat-core";
|
|
1
|
+
import type { ChatAttribution, ChatBehaviour, ChatClient, ChatFeature, ChatSession, ChatSessionState } from "@webority/chat-core";
|
|
2
2
|
import type { ChatLayout } from "./ChatFrame.js";
|
|
3
3
|
export interface ChatPrefs {
|
|
4
4
|
get(key: string): string | null;
|
|
@@ -18,6 +18,8 @@ export interface UseChatOptions {
|
|
|
18
18
|
pageContext?: unknown;
|
|
19
19
|
/** The behaviour the host app measured; read at the moment of sending. */
|
|
20
20
|
behaviour?: () => ChatBehaviour | null;
|
|
21
|
+
/** The campaign touch a lead captured in the chat carries; read at the moment of sending. */
|
|
22
|
+
attribution?: () => ChatAttribution | null;
|
|
21
23
|
/** Where the session keeps the mute choice (key wchat:muted). */
|
|
22
24
|
prefs: ChatPrefs;
|
|
23
25
|
getCaptchaToken?: (action: string) => Promise<string | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.137.0",
|
|
4
4
|
"description": "Webority Chat for React Native apps: the chat screen, sheet and embedded shells, thread, composer, one renderer per message part kind and the useChat hook, built on @webority/chat-core and @webority/mobile-ui.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"!**/*.map"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@webority/chat-core": "0.
|
|
46
|
-
"@webority/markdown-core": "^0.
|
|
47
|
-
"@webority/mobile-core": "^0.
|
|
48
|
-
"@webority/mobile-ui": "^0.
|
|
45
|
+
"@webority/chat-core": "0.137.0",
|
|
46
|
+
"@webority/markdown-core": "^0.134.0",
|
|
47
|
+
"@webority/mobile-core": "^0.134.0",
|
|
48
|
+
"@webority/mobile-ui": "^0.134.0",
|
|
49
49
|
"expo-audio": ">=57.0.0",
|
|
50
50
|
"expo-file-system": ">=57.0.0",
|
|
51
51
|
"react": "^19.1.0",
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
"@react-native/jest-preset": "0.86.3",
|
|
97
97
|
"@react-native/metro-config": "0.86.3",
|
|
98
98
|
"@testing-library/react-native": "12.9.0",
|
|
99
|
+
"@types/jest": "29.5.14",
|
|
99
100
|
"@types/react": "19.2.18",
|
|
100
|
-
"@webority/canvas-kit": "0.
|
|
101
|
-
"@webority/chat-core": "0.
|
|
102
|
-
"@webority/markdown-core": "0.
|
|
103
|
-
"@webority/mobile-core": "0.
|
|
104
|
-
"@webority/mobile-ui": "0.
|
|
101
|
+
"@webority/canvas-kit": "0.134.0",
|
|
102
|
+
"@webority/chat-core": "0.137.0",
|
|
103
|
+
"@webority/markdown-core": "0.134.0",
|
|
104
|
+
"@webority/mobile-core": "0.134.0",
|
|
105
|
+
"@webority/mobile-ui": "0.134.0",
|
|
105
106
|
"babel-jest": "29.7.0",
|
|
106
107
|
"expo": "57.0.31",
|
|
107
108
|
"expo-application": "57.0.3",
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
"clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"",
|
|
135
136
|
"lint": "biome lint ./src",
|
|
136
137
|
"lint:fix": "biome lint --write ./src",
|
|
137
|
-
"test": "jest",
|
|
138
|
+
"test": "tsc -p tsconfig.test.json && jest",
|
|
138
139
|
"typecheck": "tsc --noEmit"
|
|
139
140
|
}
|
|
140
141
|
}
|