@nlxai/touchpoint-ui 1.1.6 → 1.1.8-alpha.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/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Config, BotMessage, ConversationHandler, Context } from '@nlxai/chat-core';
1
+ import { Config, ApplicationMessage, ConversationHandler, Context } from '@nlxai/core';
2
2
  import { ComponentType } from 'react';
3
3
  /**
4
4
  * Window size configuration
@@ -15,7 +15,7 @@ export interface ChoiceMessage {
15
15
  /**
16
16
  * Message contents
17
17
  */
18
- message: BotMessage;
18
+ message: ApplicationMessage;
19
19
  /**
20
20
  * Index in the response transcript history
21
21
  */
@@ -44,6 +44,10 @@ export type CustomModalityComponent<Data> = ComponentType<{
44
44
  * @internal
45
45
  */
46
46
  enabled: boolean;
47
+ /**
48
+ * Class name to propagate to the container
49
+ */
50
+ className?: string;
47
51
  }>;
48
52
  /**
49
53
  * The full theme expressed as CSS custom properties
@@ -181,7 +185,7 @@ export type BidirectionalConfig = {
181
185
  * Attempt to gather and send page context automatically. This will work well on semantically coded pages without too many custom form controls.
182
186
  * This enables a number of automatic features.
183
187
  *
184
- * Defaults to `false`.
188
+ * Defaults to `true`.
185
189
  */
186
190
  automaticContext?: true;
187
191
  /**
@@ -192,7 +196,7 @@ export type BidirectionalConfig = {
192
196
  * @param destination - The name of the destination to navigate to if `action` is `"page_custom"`.
193
197
  * @param destinations - A map of destination names to URLs for custom navigation. Only present if `automaticContext` is enabled.
194
198
  */
195
- navigation?: (action: "page_next" | "page_previous" | "page_custom", destination: string | undefined, destinations: Record<string, string>) => void;
199
+ navigation?: (action: "page_next" | "page_previous" | "page_custom" | "page_unknown", destination: string | undefined, destinations: Record<string, string>) => void;
196
200
  /**
197
201
  * A callback for filling out form fields in bidirectional mode.
198
202
  *
@@ -216,7 +220,7 @@ export type BidirectionalConfig = {
216
220
  * Attempt to gather and send page context automatically. This will work well on semantically coded pages without too many custom form controls.
217
221
  * This enables a number of automatic features.
218
222
  *
219
- * Defaults to `false`.
223
+ * Defaults to `true`.
220
224
  */
221
225
  automaticContext: false;
222
226
  /**
@@ -226,7 +230,7 @@ export type BidirectionalConfig = {
226
230
  * @param action - The navigation action to perform.
227
231
  * @param destination - The name of the destination to navigate to if `action` is `"page_custom"`.
228
232
  */
229
- navigation?: (action: "page_next" | "page_previous" | "page_custom", destination?: string) => void;
233
+ navigation?: (action: "page_next" | "page_previous" | "page_custom" | "page_unknown", destination?: string) => void;
230
234
  /**
231
235
  * A callback for filling out form fields in bidirectional mode.
232
236
  *
@@ -250,7 +254,7 @@ export type BidirectionalConfig = {
250
254
  */
251
255
  export interface TouchpointConfiguration {
252
256
  /**
253
- * Connection information for the \@nlxai/chat-core conversation handler
257
+ * Connection information for the \@nlxai/core conversation handler
254
258
  */
255
259
  config: Config;
256
260
  /**
@@ -314,4 +318,6 @@ export interface TouchpointConfiguration {
314
318
  /**
315
319
  * @internal
316
320
  */
317
- export type NormalizedTouchpointConfiguration = TouchpointConfiguration & Required<Pick<TouchpointConfiguration, "initializeConversation" | "input">>;
321
+ export type NormalizedTouchpointConfiguration = TouchpointConfiguration & Required<Pick<TouchpointConfiguration, "initializeConversation" | "input">> & {
322
+ config: Required<Pick<Config, "conversationId" | "userId" | "bidirectional">>;
323
+ };
package/lib/voice.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Context, ConversationHandler, ModalityPayloads } from '@nlxai/chat-core';
1
+ import { Context, ConversationHandler, ModalityPayloads } from '@nlxai/core';
2
2
  export interface SoundCheck {
3
3
  micAllowed: boolean;
4
4
  micNames: string[];
@@ -14,7 +14,7 @@ interface VoiceHookReturn {
14
14
  roomState: VoiceRoomState;
15
15
  isUserSpeaking: boolean;
16
16
  isApplicationSpeaking: boolean;
17
- roomData: null | ModalitiesWithContext;
17
+ modalities: ModalitiesWithContext[];
18
18
  retry: () => Promise<void>;
19
19
  }
20
20
  interface VoiceHookParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlxai/touchpoint-ui",
3
- "version": "1.1.6",
3
+ "version": "1.1.8-alpha.0",
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.1.4",
27
+ "@nlxai/core": "^1.1.8-alpha.0",
28
28
  "@react-hookz/web": "^25.0.1",
29
29
  "@react-input/mask": "^2.0.4",
30
30
  "clsx": "^2.1.1",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "37834eaca71f85c26deee2b8609d129944673033"
63
+ "gitHead": "8f4341c889c73a3b681dcdf25420ecec285c1ef6"
64
64
  }