@nlxai/touchpoint-ui 1.0.5-alpha.9 → 1.1.1
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/index.html +4 -3
- package/lib/analyzePageForms.d.ts +31 -0
- package/lib/components/FullscreenVoice.d.ts +15 -3
- package/lib/components/Header.d.ts +6 -1
- package/lib/components/Input.d.ts +0 -2
- package/lib/components/Messages.d.ts +1 -2
- package/lib/components/Settings.d.ts +1 -0
- package/lib/components/VoiceMini.d.ts +3 -0
- package/lib/components/ui/CustomCard.d.ts +8 -0
- package/lib/components/ui/IconButton.d.ts +4 -0
- package/lib/components/ui/Icons.d.ts +1 -0
- package/lib/index.d.ts +16 -1
- package/lib/index.js +7757 -6638
- package/lib/index.umd.js +49 -49
- package/lib/types.d.ts +8 -4
- package/lib/voice.d.ts +8 -1
- package/package.json +4 -3
- package/tailwind.config.js +1 -1
package/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Config, BotMessage, ConversationHandler, Context } from '@nlxai/chat-core';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Window size configuration
|
|
5
5
|
*/
|
|
@@ -29,7 +29,7 @@ export interface ChoiceMessage {
|
|
|
29
29
|
* Custom Modalities allow rendering of rich components from nodes.
|
|
30
30
|
* See: https://docs.studio.nlx.ai/build/resources/modalities
|
|
31
31
|
*/
|
|
32
|
-
export type CustomModalityComponent<Data> =
|
|
32
|
+
export type CustomModalityComponent<Data> = ComponentType<{
|
|
33
33
|
/**
|
|
34
34
|
* The payload of the Custom Modality. The schema is defined in Dialog Studio settings.
|
|
35
35
|
*/
|
|
@@ -156,6 +156,10 @@ export interface Theme {
|
|
|
156
156
|
* @param context - context set via TouchpointConfiguration.initialContext
|
|
157
157
|
*/
|
|
158
158
|
export type InitializeConversation = (handler: ConversationHandler, context?: Context) => void;
|
|
159
|
+
/**
|
|
160
|
+
* Input type for the experience
|
|
161
|
+
*/
|
|
162
|
+
export type Input = "text" | "voice" | "voiceMini";
|
|
159
163
|
/**
|
|
160
164
|
* Main Touchpoint creation properties object
|
|
161
165
|
*/
|
|
@@ -201,7 +205,7 @@ export interface TouchpointConfiguration {
|
|
|
201
205
|
/**
|
|
202
206
|
* Optional custom modality components to render in Touchpoint
|
|
203
207
|
*/
|
|
204
|
-
customModalities?: Record<string, CustomModalityComponent<
|
|
208
|
+
customModalities?: Record<string, CustomModalityComponent<unknown>>;
|
|
205
209
|
/**
|
|
206
210
|
* Custom conversation init method. Defaults to sending the welcome intent
|
|
207
211
|
* @param handler - the conversation handler.
|
|
@@ -211,7 +215,7 @@ export interface TouchpointConfiguration {
|
|
|
211
215
|
/**
|
|
212
216
|
* Controls the ways in which the user can communicate with the application. Defaults to `"text"`
|
|
213
217
|
*/
|
|
214
|
-
input?:
|
|
218
|
+
input?: Input;
|
|
215
219
|
/**
|
|
216
220
|
* Context sent with the initial request.
|
|
217
221
|
*/
|
package/lib/voice.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, ConversationHandler } from '@nlxai/chat-core';
|
|
1
|
+
import { Context, ConversationHandler, ModalityPayloads } from '@nlxai/chat-core';
|
|
2
2
|
type VoiceRoomState = "inactive" | "pending" | "active" | "error" | "terminated";
|
|
3
3
|
export interface SoundCheck {
|
|
4
4
|
micAllowed: boolean;
|
|
@@ -10,6 +10,8 @@ interface VoiceHookReturn {
|
|
|
10
10
|
isUserSpeaking: boolean;
|
|
11
11
|
isApplicationSpeaking: boolean;
|
|
12
12
|
soundCheck: null | SoundCheck;
|
|
13
|
+
roomData: null | ModalitiesWithContext;
|
|
14
|
+
retrySoundCheck: () => void;
|
|
13
15
|
}
|
|
14
16
|
interface UseVoiceParams {
|
|
15
17
|
active: boolean;
|
|
@@ -18,5 +20,10 @@ interface UseVoiceParams {
|
|
|
18
20
|
handler: ConversationHandler;
|
|
19
21
|
context?: Context;
|
|
20
22
|
}
|
|
23
|
+
export interface ModalitiesWithContext {
|
|
24
|
+
modalities: ModalityPayloads;
|
|
25
|
+
from?: string;
|
|
26
|
+
timestamp: number;
|
|
27
|
+
}
|
|
21
28
|
export declare const useVoice: ({ active, micEnabled, speakersEnabled, handler, context, }: UseVoiceParams) => VoiceHookReturn;
|
|
22
29
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlxai/touchpoint-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Web UI for Touchpoint",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"tsc": "tsc"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nlxai/chat-core": "^1.0.5-alpha.
|
|
27
|
+
"@nlxai/chat-core": "^1.0.5-alpha.13",
|
|
28
28
|
"@react-hookz/web": "^25.0.1",
|
|
29
29
|
"@react-input/mask": "^2.0.4",
|
|
30
30
|
"clsx": "^2.1.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@typescript-eslint/parser": "^7.8.0",
|
|
48
48
|
"@vitejs/plugin-react": "^4.2.1",
|
|
49
49
|
"autoprefixer": "^10.4.19",
|
|
50
|
+
"dom-accessibility-api": "^0.7.0",
|
|
50
51
|
"eslint-config-nlx": "*",
|
|
51
52
|
"postcss": "^8.4.38",
|
|
52
53
|
"tailwindcss": "^3.4.3",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"publishConfig": {
|
|
58
59
|
"access": "public"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b243443c611b5bf9c930e508b34195b25a8cb5bf"
|
|
61
62
|
}
|