gank-chat-widget 0.0.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/LICENSE +21 -0
- package/README.md +148 -0
- package/dist/App.d.ts +49 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/components/chat/Chat.d.ts +19 -0
- package/dist/components/chat/Chat.d.ts.map +1 -0
- package/dist/components/chat/footer/ChatFooter.d.ts +8 -0
- package/dist/components/chat/footer/ChatFooter.d.ts.map +1 -0
- package/dist/components/chat/header/ChatHeader.d.ts +11 -0
- package/dist/components/chat/header/ChatHeader.d.ts.map +1 -0
- package/dist/components/chat/input/ChatInput.d.ts +11 -0
- package/dist/components/chat/input/ChatInput.d.ts.map +1 -0
- package/dist/components/chat/message/Message.d.ts +13 -0
- package/dist/components/chat/message/Message.d.ts.map +1 -0
- package/dist/components/chat/message-list/MessageList.d.ts +24 -0
- package/dist/components/chat/message-list/MessageList.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts +12 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Markdown.d.ts +8 -0
- package/dist/components/ui/Markdown.d.ts.map +1 -0
- package/dist/components/ui/Popover.d.ts +7 -0
- package/dist/components/ui/Popover.d.ts.map +1 -0
- package/dist/components/ui/Textarea.d.ts +6 -0
- package/dist/components/ui/Textarea.d.ts.map +1 -0
- package/dist/gank-chat-widget.css +1 -0
- package/dist/gank-chat-widget.js +5 -0
- package/dist/gank-chat-widget.js.map +1 -0
- package/dist/gank-chat-widget.umd.cjs +93 -0
- package/dist/gank-chat-widget.umd.cjs.map +1 -0
- package/dist/icons/send.svg +3 -0
- package/dist/index-CjbKBZv0.js +6508 -0
- package/dist/index-CjbKBZv0.js.map +1 -0
- package/dist/index-speiZ67A.js +39908 -0
- package/dist/index-speiZ67A.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/parlant-logo.png +0 -0
- package/dist/theme.d.ts +8 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/utils/object.d.ts +2 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/utils.d.ts +4 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/package.json +75 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# parlant-chat-react
|
|
2
|
+
|
|
3
|
+
<!-- 
|
|
4
|
+

|
|
5
|
+
 -->
|
|
6
|
+
|
|
7
|
+
A flexible and customizable React chat component for integrating Parlant agents seamlessly into your website.
|
|
8
|
+
|
|
9
|
+
<img src="src/assets/chatbox.gif" alt="Parlant Chatbox Demo" width="300">
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install parlant-chat-react
|
|
16
|
+
# or
|
|
17
|
+
yarn add parlant-chat-react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
Here's how to quickly add the chat component to your React application:
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
import React from 'react';
|
|
26
|
+
import ParlantChatbox from 'parlant-chat-react';
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return (
|
|
30
|
+
<div>
|
|
31
|
+
<h1>My Application</h1>
|
|
32
|
+
<ParlantChatbox
|
|
33
|
+
agentId="AGENT_ID"
|
|
34
|
+
server="PARLANT_SERVER_URL"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default App;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage Examples
|
|
44
|
+
|
|
45
|
+
### Basic Embedded Chat
|
|
46
|
+
|
|
47
|
+
Add a chat interface directly in your page layout:
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
<ParlantChatbox
|
|
51
|
+
agentId="AGENT_ID"
|
|
52
|
+
server="PARLANT_SERVER_URL"
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Popup Chat
|
|
57
|
+
|
|
58
|
+
Display the chat as a popup that can be toggled with a button:
|
|
59
|
+
|
|
60
|
+
```jsx
|
|
61
|
+
<ParlantChatbox
|
|
62
|
+
float
|
|
63
|
+
agentId="AGENT_ID"
|
|
64
|
+
server="PARLANT_SERVER_URL"
|
|
65
|
+
/>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Customized Popup Button
|
|
69
|
+
|
|
70
|
+
Use a custom button component:
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
import { Send } from 'lucide-react';
|
|
74
|
+
|
|
75
|
+
<ParlantChatbox
|
|
76
|
+
float
|
|
77
|
+
agentId="AGENT_ID"
|
|
78
|
+
server="PARLANT_SERVER_URL"
|
|
79
|
+
popupButton={<Send color="white" size={24} />}
|
|
80
|
+
/>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Advanced Styling
|
|
84
|
+
|
|
85
|
+
Apply custom class names to various parts of the chat:
|
|
86
|
+
|
|
87
|
+
```jsx
|
|
88
|
+
<ParlantChatbox
|
|
89
|
+
agentId="AGENT_ID"
|
|
90
|
+
server="PARLANT_SERVER_URL"
|
|
91
|
+
classNames={{
|
|
92
|
+
chatboxWrapper: "my-chatbox-wrapper-class",
|
|
93
|
+
chatbox: "my-chatbox-class",
|
|
94
|
+
messagesArea: "my-messages-class",
|
|
95
|
+
agentMessage: "agent-bubble",
|
|
96
|
+
customerMessage: "customer-bubble",
|
|
97
|
+
textarea: "my-input-class",
|
|
98
|
+
popupButton: "my-button-class",
|
|
99
|
+
popupButtonIcon: "my-icon-class",
|
|
100
|
+
chatDescription: "my-description-class",
|
|
101
|
+
bottomLine: "my-footer-class"
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Custom Component Replacement
|
|
107
|
+
|
|
108
|
+
Replace default UI components with your own:
|
|
109
|
+
|
|
110
|
+
```jsx
|
|
111
|
+
<ParlantChatbox
|
|
112
|
+
agentId="AGENT_ID"
|
|
113
|
+
server="PARLANT_SERVER_URL"
|
|
114
|
+
components={{
|
|
115
|
+
popupButton: ({ toggleChatOpen }) => (
|
|
116
|
+
<button onClick={toggleChatOpen}>Chat with us</button>
|
|
117
|
+
),
|
|
118
|
+
agentMessage: ({ message }) => (
|
|
119
|
+
<div>
|
|
120
|
+
<p>{message.data.message}</p>
|
|
121
|
+
<span>Agent</span>
|
|
122
|
+
</div>
|
|
123
|
+
),
|
|
124
|
+
customerMessage: ({ message }) => (
|
|
125
|
+
<div>
|
|
126
|
+
<p>{message.data.message}</p>
|
|
127
|
+
<span>You</span>
|
|
128
|
+
</div>
|
|
129
|
+
),
|
|
130
|
+
header: ({ changeIsExpanded }) => (
|
|
131
|
+
<div>
|
|
132
|
+
<h2>Custom Header</h2>
|
|
133
|
+
<button onClick={changeIsExpanded}>Toggle Expanded</button>
|
|
134
|
+
</div>
|
|
135
|
+
)
|
|
136
|
+
}}
|
|
137
|
+
/>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Props
|
|
141
|
+
|
|
142
|
+
| Prop | Type | Required | Default | Description |
|
|
143
|
+
|------------------------|----------------|----------|---------|-----------------------------------------------------------------------------|
|
|
144
|
+
| `server` | string | Yes | - | API endpoint for chat communication |
|
|
145
|
+
| `sessionId` | string | No | - | Unique identifier for an existing chat session |
|
|
146
|
+
| `customerId` | string | No | - | Unique identifier for the customer |
|
|
147
|
+
| `titleFn` | function | No | - | Function that returns a string to generate dynamic chat session titles |
|
|
148
|
+
| `agentId`
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { JSX, ReactElement } from 'react';
|
|
2
|
+
import { MessageInterface } from './components/chat/Chat';
|
|
3
|
+
interface MessageComponentProps {
|
|
4
|
+
message: MessageInterface;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PopupButtonComponentProps {
|
|
8
|
+
toggleChatOpen: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface ChatProps {
|
|
11
|
+
server: string;
|
|
12
|
+
sessionId?: string;
|
|
13
|
+
agentName?: string;
|
|
14
|
+
agentAvatar?: JSX.Element;
|
|
15
|
+
chatDescription?: string;
|
|
16
|
+
float?: boolean;
|
|
17
|
+
onPopupButtonClick?: () => void;
|
|
18
|
+
agentOpeningMessage?: string;
|
|
19
|
+
titleFn?: () => string;
|
|
20
|
+
popupButton?: JSX.Element;
|
|
21
|
+
sendIcon?: JSX.Element;
|
|
22
|
+
agentId?: string;
|
|
23
|
+
customerId?: string;
|
|
24
|
+
classNames?: {
|
|
25
|
+
chatboxWrapper?: string;
|
|
26
|
+
chatbox?: string;
|
|
27
|
+
messagesArea?: string;
|
|
28
|
+
agentMessage?: string;
|
|
29
|
+
customerMessage?: string;
|
|
30
|
+
textarea?: string;
|
|
31
|
+
popupButton?: string;
|
|
32
|
+
popupButtonIcon?: string;
|
|
33
|
+
chatDescription?: string;
|
|
34
|
+
bottomLine?: string;
|
|
35
|
+
};
|
|
36
|
+
components?: {
|
|
37
|
+
popupButton?: (props: PopupButtonComponentProps) => ReactElement;
|
|
38
|
+
agentMessage?: (props: MessageComponentProps) => ReactElement;
|
|
39
|
+
customerMessage?: (props: MessageComponentProps) => ReactElement;
|
|
40
|
+
header?: ({ changeIsExpanded, agentName }: {
|
|
41
|
+
changeIsExpanded: () => void;
|
|
42
|
+
agentName: string | undefined;
|
|
43
|
+
}) => ReactElement;
|
|
44
|
+
};
|
|
45
|
+
onSessionCreated?: (sessionId: string) => void;
|
|
46
|
+
}
|
|
47
|
+
declare const Chatbox: ({ server, titleFn, agentId, customerId, sessionId, agentName, agentAvatar, onPopupButtonClick, agentOpeningMessage, chatDescription, float, popupButton, components, sendIcon, classNames, onSessionCreated }: ChatProps) => JSX.Element;
|
|
48
|
+
export default Chatbox;
|
|
49
|
+
//# sourceMappingURL=App.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,GAAG,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AAG7C,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAiD7D,UAAU,qBAAqB;IAC9B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,yBAAyB;IAClC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,UAAU,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,UAAU,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,YAAY,CAAC;QACjE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,YAAY,CAAC;QAC9D,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,YAAY,CAAC;QACjE,MAAM,CAAC,EAAE,CAAC,EAAC,gBAAgB,EAAE,SAAS,EAAC,EAAE;YAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC;YAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;SAAC,KAAK,YAAY,CAAC;KACzH,CAAC;IACF,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAID,QAAA,MAAM,OAAO,kNAAyN,SAAS,KAAG,GAAG,CAAC,OAmGrP,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Event, EventCreationParams } from 'parlant-client/src/api';
|
|
2
|
+
import { default as React, JSX } from 'react';
|
|
3
|
+
import { ChatProps } from '../../App';
|
|
4
|
+
export interface MessageInterface extends Event {
|
|
5
|
+
status: string | null;
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const createEmptyPendingMessage: () => Partial<Event & {
|
|
9
|
+
serverStatus: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const getInitialMessages: (agentOpeningMessage?: string) => MessageInterface[];
|
|
12
|
+
declare const Chat: ({ server, sessionId, agentId, agentName, agentAvatar, components, agentOpeningMessage, sendIcon, createSession, classNames, float, changeIsExpanded, chatDescription, messages, setMessages }: ChatProps & {
|
|
13
|
+
changeIsExpanded?: () => void;
|
|
14
|
+
createSession: (message: EventCreationParams) => void;
|
|
15
|
+
messages: MessageInterface[];
|
|
16
|
+
setMessages: React.Dispatch<React.SetStateAction<MessageInterface[]>>;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
export default Chat;
|
|
19
|
+
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/chat/Chat.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,KAAK,EAAE,mBAAmB,EAAU,MAAM,wBAAwB,CAAC;AAEvF,OAAO,KAAK,EAAE,EAAC,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AA2BrC,MAAM,WAAW,gBAAiB,SAAQ,KAAK;IAC9C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAOD,eAAO,MAAM,yBAAyB,QAAO,OAAO,CAAC,KAAK,GAAG;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,CAUjF,CAAC;AAEH,eAAO,MAAM,kBAAkB,yBAA0B,MAAM,KAAG,gBAAgB,EAiBjF,CAAA;AAED,QAAA,MAAM,IAAI,kMAAiM,SAAS,GAAG;IAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAAC,aAAa,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAAC,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;CAAC,KAAG,GAAG,CAAC,OA8KxZ,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/footer/ChatFooter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2BD,QAAA,MAAM,UAAU,4BAA6B,eAAe,KAAG,GAAG,CAAC,OAclE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
interface ChatHeaderProps {
|
|
3
|
+
agentName?: string;
|
|
4
|
+
agentAvatar?: JSX.Element;
|
|
5
|
+
changeIsExpanded: () => void;
|
|
6
|
+
isExpanded?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const ChatHeader: ({ agentName, agentAvatar, changeIsExpanded, isExpanded, className }: ChatHeaderProps) => JSX.Element;
|
|
10
|
+
export default ChatHeader;
|
|
11
|
+
//# sourceMappingURL=ChatHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/header/ChatHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0DD,QAAA,MAAM,UAAU,wEAMb,eAAe,KAAG,GAAG,CAAC,OA+BxB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
interface ChatInputProps {
|
|
3
|
+
onSendMessage: (message: string) => Promise<void>;
|
|
4
|
+
sendIcon?: JSX.Element;
|
|
5
|
+
className?: string;
|
|
6
|
+
float?: boolean;
|
|
7
|
+
focusTrigger?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ChatInput: ({ onSendMessage, sendIcon, className, float, focusTrigger, }: ChatInputProps) => JSX.Element;
|
|
10
|
+
export default ChatInput;
|
|
11
|
+
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/input/ChatInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAOjC,UAAU,cAAc;IACtB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAgFD,QAAA,MAAM,SAAS,iEAMZ,cAAc,KAAG,GAAG,CAAC,OAqEvB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MessageInterface } from '../Chat';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
|
+
interface MessageProps {
|
|
4
|
+
message: MessageInterface;
|
|
5
|
+
agentName?: string;
|
|
6
|
+
agentAvatar?: JSX.Element;
|
|
7
|
+
isSameSourceAsPrevious?: boolean;
|
|
8
|
+
isNextSourceSame?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Message: ({ message, agentName, agentAvatar, className, isSameSourceAsPrevious, isNextSourceSame }: MessageProps) => JSX.Element;
|
|
12
|
+
export default Message;
|
|
13
|
+
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/message/Message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAkJ/B,UAAU,YAAY;IACrB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,OAAO,6FAA4F,YAAY,KAAG,GAAG,CAAC,OAyC3H,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { MessageInterface } from '../Chat';
|
|
3
|
+
import { default as Message } from '../message/Message';
|
|
4
|
+
interface MessageListProps {
|
|
5
|
+
messages: MessageInterface[];
|
|
6
|
+
showInfo?: string;
|
|
7
|
+
agentName?: string;
|
|
8
|
+
agentAvatar?: JSX.Element;
|
|
9
|
+
components?: {
|
|
10
|
+
customerMessage?: typeof Message;
|
|
11
|
+
agentMessage?: typeof Message;
|
|
12
|
+
};
|
|
13
|
+
classNames?: {
|
|
14
|
+
messagesArea?: string;
|
|
15
|
+
customerMessage?: string;
|
|
16
|
+
agentMessage?: string;
|
|
17
|
+
chatDescription?: string;
|
|
18
|
+
};
|
|
19
|
+
chatDescription?: string;
|
|
20
|
+
isExpanded?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MessageList: ({ messages, showInfo, agentName, agentAvatar, components, isExpanded, classNames, chatDescription, }: MessageListProps) => JSX.Element;
|
|
23
|
+
export default MessageList;
|
|
24
|
+
//# sourceMappingURL=MessageList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/message-list/MessageList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,OAAO,MAAM,mCAAmC,CAAC;AAKxD,UAAU,gBAAgB;IACxB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE;QACX,eAAe,CAAC,EAAE,OAAO,OAAO,CAAC;QACjC,YAAY,CAAC,EAAE,OAAO,OAAO,CAAC;KAC/B,CAAC;IACF,UAAU,CAAC,EAAE;QACX,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAwFD,QAAA,MAAM,WAAW,yGASd,gBAAgB,KAAG,GAAG,CAAC,OAgEzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;mFA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAgBjC,UAAU,aAAa;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,QAAQ,4BAA6B,aAAa,KAAG,GAAG,CAAC,OAmC9D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
7
|
+
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAkC5D,QAAA,MAAM,OAAO,yCAAwB,CAAC;AAEtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAEhD,QAAA,MAAM,cAAc,gKA+BnB,CAAC;AAIF,OAAO,EAAC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
5
|
+
export { Textarea };
|
|
6
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAE9D,QAAA,MAAM,QAAQ,2FAWb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gank-chat-widget.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|