@nlxai/touchpoint-ui 1.0.5-alpha.11 → 1.0.5-alpha.13

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,5 +1,5 @@
1
1
  import { Config, BotMessage, ConversationHandler, Context } from '@nlxai/chat-core';
2
- import { FC } from 'react';
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> = FC<{
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
  */
@@ -205,7 +205,7 @@ export interface TouchpointConfiguration {
205
205
  /**
206
206
  * Optional custom modality components to render in Touchpoint
207
207
  */
208
- customModalities?: Record<string, CustomModalityComponent<any>>;
208
+ customModalities?: Record<string, CustomModalityComponent<unknown>>;
209
209
  /**
210
210
  * Custom conversation init method. Defaults to sending the welcome intent
211
211
  * @param handler - the conversation handler.
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,7 @@ interface VoiceHookReturn {
10
10
  isUserSpeaking: boolean;
11
11
  isApplicationSpeaking: boolean;
12
12
  soundCheck: null | SoundCheck;
13
+ roomData: null | ModalitiesWithContext;
13
14
  }
14
15
  interface UseVoiceParams {
15
16
  active: boolean;
@@ -18,5 +19,10 @@ interface UseVoiceParams {
18
19
  handler: ConversationHandler;
19
20
  context?: Context;
20
21
  }
22
+ export interface ModalitiesWithContext {
23
+ modalities: ModalityPayloads;
24
+ from?: string;
25
+ timestamp: number;
26
+ }
21
27
  export declare const useVoice: ({ active, micEnabled, speakersEnabled, handler, context, }: UseVoiceParams) => VoiceHookReturn;
22
28
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlxai/touchpoint-ui",
3
- "version": "1.0.5-alpha.11",
3
+ "version": "1.0.5-alpha.13",
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.11",
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": "c5324ea31b9f4c806e6ddb8fd547405b7298d2b0"
61
+ "gitHead": "2760fadb724143d4d72ca5a4a4da77a71aa41199"
61
62
  }
@@ -11,7 +11,7 @@ module.exports = {
11
11
  overlay: "48px",
12
12
  },
13
13
  maxWidth: {
14
- content: "608px",
14
+ content: "640px",
15
15
  },
16
16
  borderRadius: {
17
17
  inner: "var(--inner-border-radius)",