@cmnd-ai/chatbot-react 1.3.0 → 1.3.2

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
@@ -20,6 +20,7 @@ yarn add @cmnd-ai/chatbot-react
20
20
 
21
21
  ```javascript
22
22
  import { ChatProvider } from "@cmnd-ai/chatbot-react";
23
+ import "@cmnd-ai/chatbot-react/dist/styles/index.css"
23
24
 
24
25
  const App = () => {
25
26
  return (
@@ -1,6 +1,5 @@
1
1
  import React, { Dispatch, SetStateAction } from "react";
2
2
  import { CustomStyles, InputFieldProps, SendButtonProps, UIFunctionArguments } from "../type.js";
3
- import "../styles/index.css";
4
3
  export interface ConversationProps {
5
4
  messages: any[];
6
5
  setMessages: Dispatch<SetStateAction<any[]>>;
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Chatbubble from "./Chatbubble.js";
3
3
  import LoadingBubble from "./LoadingBubble.js";
4
4
  import ChatInputBox from "./ChatInputBox.js";
5
- import "../styles/index.css";
6
5
  const Conversation = ({ messages, handleSendClick, isChatLoading, error, messagesRef, enabledTools, postSessionMessage, setMessages, setChatbotConversationId, setIsChatLoading, setCanSendMessage, scrollToBottom, canSendMessage, setInput, input, Components, UITools, customStyles, }) => {
7
6
  return (_jsxs("div", { className: "cmnd-conversations", children: [_jsxs("div", { ref: messagesRef, id: "messages", className: "cmnd-conversations-messages", children: [error, messages.map((m, i) => (_jsx(Chatbubble, { customStyles: customStyles, hide: m.hiddenFromUser, message: m.message, role: m.role, toolCallDetails: m.tool, tools: enabledTools, postSessionMessage: postSessionMessage, messages: messages, setMessages: setMessages, id: m.id, setChatbotConversationId: setChatbotConversationId, setIsChatLoading: setIsChatLoading, setCanSendMessage: setCanSendMessage, scrollToBottom: scrollToBottom, UITools: UITools }, i))), isChatLoading ? _jsx(LoadingBubble, { customStyles: customStyles }) : null] }), _jsxs("div", { id: "cmnd-input-div", className: "cmnd-input-div", children: [Components?.InputField ? (_jsx(Components.InputField, { ...{ input, setInput, canSendMessage, handleSendClick } })) : (_jsx(ChatInputBox, { input: input, setInput: setInput, handleSendClick: handleSendClick })), Components?.SendButton ? (_jsx(Components.SendButton, { ...{
8
7
  canSendMessage,
@@ -19,7 +19,6 @@
19
19
  overflow-y: scroll;
20
20
  overflow-x: hidden;
21
21
  width: 60%;
22
- justify-content: center;
23
22
  align-items: center;
24
23
  padding: 10px;
25
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmnd-ai/chatbot-react",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "main": "dist/index.js",
5
5
  "description": "",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "scripts": {
14
14
  "build": "tsc && npm run copy-css",
15
15
  "copy-css": "mkdir -p dist/styles && cp src/styles/index.css dist/styles/index.css",
16
- "dev": "tsc -w",
16
+ "dev": "npm run copy-css && tsc -w",
17
17
  "prepublishOnly": "npm run build",
18
18
  "semantic-release": "semantic-release"
19
19
  },