parlant-chat-react 1.0.0 → 1.0.3

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 CHANGED
@@ -6,6 +6,9 @@
6
6
 
7
7
  A flexible and customizable React chat component for integrating Parlant agents seamlessly into your website.
8
8
 
9
+ <img src="src/assets/chatbox.gif" alt="Parlant Chatbox Demo" width="300">
10
+
11
+
9
12
  ## Installation
10
13
 
11
14
  ```bash
@@ -141,38 +144,4 @@ Replace default UI components with your own:
141
144
  | `server` | string | Yes | - | API endpoint for chat communication |
142
145
  | `sessionId` | string | No | - | Unique identifier for an existing chat session |
143
146
  | `titleFn` | function | No | - | Function that returns a string to generate dynamic chat session titles |
144
- | `agentId` | string | No | - | Unique identifier for creating a new chat session with a specific agent |
145
- | `agentName` | string | No | - | Name of the chat agent |
146
- | `agentAvatar` | JSX.Element | No | - | Custom avatar for the agent |
147
- | `chatDescription` | string | No | - | Description text shown at the top of the chat |
148
- | `float` | boolean | No | `false` | Whether to display as a popup chat |
149
- | `popupButton` | JSX.Element | No | - | Custom button element for popup mode |
150
- | `sendIcon` | JSX.Element | No | - | Custom send message icon |
151
- | `classNames` | object | No | - | Custom CSS class names for styling |
152
- | `components` | object | No | - | Custom React components to replace defaults |
153
- | `onPopupButtonClick` | function | No | - | Callback fired when the popup button is clicked (in popup mode) |
154
- | `agentOpeningMessage` | string | No | - | Message shown as the first message from the agent when starting a session |
155
-
156
- ### ClassNames Object Properties
157
-
158
- | Property | Description |
159
- |-------------------------|------------------------------------|
160
- | `chatboxWrapper` | Wrapper around the main chatbox |
161
- | `chatbox` | Main chat container |
162
- | `messagesArea` | Messages list container |
163
- | `agentMessage` | Agent message bubble |
164
- | `customerMessage` | Customer message bubble |
165
- | `textarea` | Message input field |
166
- | `popupButton` | Popup toggle button |
167
- | `popupButtonIcon` | Icon in the popup button |
168
- | `chatDescription` | Chat description container |
169
- | `bottomLine` | Footer of the chat |
170
-
171
- ### Components Object Properties
172
-
173
- | Property | Description | Props Passed |
174
- |------------------|----------------------------------|-------------------------------|
175
- | `popupButton` | Custom popup button component | `{ toggleChatOpen }` |
176
- | `agentMessage` | Custom agent message component | `{ message }` |
177
- | `customerMessage`| Custom customer message component| `{ message }` |
178
- | `header` | Custom header component | `{ changeIsExpanded }` |
147
+ | `agentId`
package/dist/App.d.ts CHANGED
@@ -41,6 +41,6 @@ export interface ChatProps {
41
41
  }) => ReactElement;
42
42
  };
43
43
  }
44
- declare const Chatbot: ({ server, titleFn, agentId, sessionId, agentName, agentAvatar, onPopupButtonClick, agentOpeningMessage, chatDescription, float, popupButton, components, sendIcon, classNames }: ChatProps) => JSX.Element;
45
- export default Chatbot;
44
+ declare const Chatbox: ({ server, titleFn, agentId, sessionId, agentName, agentAvatar, onPopupButtonClick, agentOpeningMessage, chatDescription, float, popupButton, components, sendIcon, classNames }: ChatProps) => JSX.Element;
45
+ export default Chatbox;
46
46
  //# sourceMappingURL=App.d.ts.map
@@ -1 +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;AAKjC,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4CD,QAAA,MAAM,UAAU,4BAA6B,eAAe,KAAG,GAAG,CAAC,OA6BlE,CAAC;AAEF,eAAe,UAAU,CAAC"}
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;AAKjC,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6CD,QAAA,MAAM,UAAU,4BAA6B,eAAe,KAAG,GAAG,CAAC,OA6BlE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,8 +5,9 @@ interface MessageProps {
5
5
  agentName?: string;
6
6
  agentAvatar?: JSX.Element;
7
7
  isSameSourceAsPrevious?: boolean;
8
+ isNextSourceSame?: boolean;
8
9
  className?: string;
9
10
  }
10
- declare const Message: ({ message, agentName, agentAvatar, className, isSameSourceAsPrevious }: MessageProps) => JSX.Element;
11
+ declare const Message: ({ message, agentName, agentAvatar, className, isSameSourceAsPrevious, isNextSourceSame }: MessageProps) => JSX.Element;
11
12
  export default Message;
12
13
  //# sourceMappingURL=Message.d.ts.map
@@ -1 +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;AAsI/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,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,OAAO,2EAA0E,YAAY,KAAG,GAAG,CAAC,OAyCzG,CAAC;AAEF,eAAe,OAAO,CAAC"}
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"}
@@ -1 +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;AA4ED,QAAA,MAAM,WAAW,yGASd,gBAAgB,KAAG,GAAG,CAAC,OA6DzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
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;AA4ED,QAAA,MAAM,WAAW,yGASd,gBAAgB,KAAG,GAAG,CAAC,OA8DzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- import { a as ee, c as Un, p as te, r as bn, s as de, b as ue, d as pn, e as fr, m as M, f as V, g as mr, h as dr, i as hn, j as v, k as ne, n as Ce, l as Qe, o as Ct, q as Re, t as gr, u as yr, v as It, w as xr } from "./index-DyClDvPO.js";
1
+ import { a as ee, c as Un, p as te, r as bn, s as de, b as ue, d as pn, e as fr, m as M, f as V, g as mr, h as dr, i as hn, j as v, k as ne, n as Ce, l as Qe, o as Ct, q as Re, t as gr, u as yr, v as It, w as xr } from "./index-FfCgMu11.js";
2
2
  import { jsxs as kr, jsx as br, Fragment as wr } from "react/jsx-runtime";
3
3
  import { useState as Vn, useEffect as Sr } from "react";
4
4
  const qn = document.createElement("i");
@@ -6505,4 +6505,4 @@ export {
6505
6505
  Sa as default,
6506
6506
  xa as defaultUrlTransform
6507
6507
  };
6508
- //# sourceMappingURL=index-Dx2Omwgo.js.map
6508
+ //# sourceMappingURL=index-B6RvMoSl.js.map