@nlxai/touchpoint-ui 1.1.7 → 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/README.md +23 -5
- package/lib/App.d.ts +1 -1
- package/lib/bidirectional/automaticContext.d.ts +1 -1
- package/lib/bidirectional/commandHandler.d.ts +1 -1
- package/lib/components/FullscreenVoice.d.ts +4 -6
- package/lib/components/Input.d.ts +1 -1
- package/lib/components/Messages.d.ts +3 -3
- package/lib/components/Settings.d.ts +1 -1
- package/lib/components/VoiceMini.d.ts +1 -1
- package/lib/components/defaultModalities/DefaultCard.d.ts +3 -0
- package/lib/components/defaultModalities/DefaultCarousel.d.ts +6 -0
- package/lib/components/defaultModalities/DefaultDateInput.d.ts +5 -0
- package/lib/components/defaultModalities/shared.d.ts +13 -0
- package/lib/components/ui/Carousel.d.ts +1 -0
- package/lib/components/ui/CustomCard.d.ts +4 -0
- package/lib/components/ui/DateInput.d.ts +4 -0
- package/lib/components/ui/Typography.d.ts +2 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4762 -4648
- package/lib/index.umd.js +38 -38
- package/lib/types.d.ts +7 -3
- package/lib/voice.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Touchpoint
|
|
2
|
+
|
|
3
|
+
Touchpoint UI provides a customizable chat interface that you can embed in your web applications. Touchpoint UI allows users to interact with your application and provides a seamless conversational experience.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import { create } from "@nlxai/touchpoint-ui";
|
|
7
|
+
|
|
8
|
+
const touchpoint = await create({
|
|
9
|
+
config: {
|
|
10
|
+
applicationUrl: "REPLACE_WITH_APPLICATION_URL",
|
|
11
|
+
headers: {
|
|
12
|
+
"nlx-api-key": "REPLACE_WITH_API_KEY",
|
|
13
|
+
},
|
|
14
|
+
languageCode: "en-US",
|
|
15
|
+
userId: "REPLACE_WITH_USER_ID",
|
|
16
|
+
},
|
|
17
|
+
colorMode: "light",
|
|
18
|
+
input: "voice",
|
|
19
|
+
theme: { fontFamily: '"Neue Haas Grotesk", sans-serif', accent: "#AECAFF" },
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[Official documentation](https://docs.nlx.ai/platform/touchpoint)
|
|
2
24
|
|
|
3
25
|
## Run locally
|
|
4
26
|
|
|
5
27
|
`npm install`
|
|
6
28
|
`npm run dev`
|
|
7
|
-
|
|
8
|
-
## Standalone dev environment and design system
|
|
9
|
-
|
|
10
|
-
`npm run design-system`
|
package/lib/App.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConversationHandler } from '@nlxai/
|
|
1
|
+
import { ConversationHandler } from '@nlxai/core';
|
|
2
2
|
import { BidirectionalConfig } from '../types';
|
|
3
3
|
export declare const commandHandler: (handler: ConversationHandler, bidirectional: BidirectionalConfig, pageState: {
|
|
4
4
|
current: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC
|
|
2
|
-
import { Context, ConversationHandler } from '@nlxai/
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Context, ConversationHandler } from '@nlxai/core';
|
|
3
3
|
import { ColorMode, InitializeConversation, CustomModalityComponent } from '../types';
|
|
4
4
|
import { ModalitiesWithContext } from '../voice';
|
|
5
5
|
interface Props {
|
|
@@ -13,10 +13,8 @@ interface Props {
|
|
|
13
13
|
customModalities?: Record<string, CustomModalityComponent<unknown>>;
|
|
14
14
|
}
|
|
15
15
|
export declare const VoiceModalities: FC<{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}>;
|
|
19
|
-
roomData: ModalitiesWithContext;
|
|
16
|
+
className?: string;
|
|
17
|
+
modalities: ModalitiesWithContext[];
|
|
20
18
|
customModalities: Record<string, CustomModalityComponent<unknown>>;
|
|
21
19
|
handler: ConversationHandler;
|
|
22
20
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { Response, ConversationHandler,
|
|
2
|
+
import { Response, ConversationHandler, ApplicationMessage } from '@nlxai/core';
|
|
3
3
|
import { CustomModalityComponent, ColorMode } from '../types';
|
|
4
4
|
export interface MessagesProps {
|
|
5
5
|
isWaiting: boolean;
|
|
@@ -10,14 +10,14 @@ export interface MessagesProps {
|
|
|
10
10
|
chatMode: boolean;
|
|
11
11
|
colorMode: ColorMode;
|
|
12
12
|
uploadedFiles: Record<string, File>;
|
|
13
|
-
|
|
13
|
+
lastApplicationResponseIndex?: number;
|
|
14
14
|
customModalities: Record<string, CustomModalityComponent<unknown>>;
|
|
15
15
|
className?: string;
|
|
16
16
|
enabled: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const MessageChoices: FC<{
|
|
19
19
|
handler: ConversationHandler;
|
|
20
|
-
message:
|
|
20
|
+
message: ApplicationMessage;
|
|
21
21
|
responseIndex: number;
|
|
22
22
|
messageIndex: number;
|
|
23
23
|
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConversationHandler } from '@nlxai/core';
|
|
2
|
+
export interface SaveAs {
|
|
3
|
+
type: "slot" | "context";
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CardData {
|
|
7
|
+
id?: string;
|
|
8
|
+
thumbnail?: string;
|
|
9
|
+
thumbnailAlt?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const saveFn: ($saveAs: SaveAs, conversationHandler: ConversationHandler) => ((val: any) => void);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConversationHandler } from '@nlxai/
|
|
1
|
+
import { ConversationHandler } from '@nlxai/core';
|
|
2
2
|
import { TextButton } from './components/ui/TextButton';
|
|
3
3
|
import { IconButton } from './components/ui/IconButton';
|
|
4
4
|
import { Ripple } from './components/Ripple';
|