{"_id":"@0xbot/chat-react","_rev":"9-f4ecb3557694016a9b1ba0163cd054ae","name":"@0xbot/chat-react","dist-tags":{"latest":"1.0.16"},"versions":{"1.0.8":{"name":"@0xbot/chat-react","version":"1.0.8","_id":"@0xbot/chat-react@1.0.8","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"79bc19256c78c3b88f09c7bbd3d70370611a9ca4","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.8.tgz","fileCount":17,"integrity":"sha512-WeeetMdf/zqCHcFwmlY2+DrvbWoTGZG0LE39SIX4QzBMKTtI1E9HIaIQM8PpMxanyCsAZnV4EJN1Yi9158csMQ==","signatures":[{"sig":"MEUCIFcq0u+MXTtDENhk/6FWJh5fxfp1kYpT7ol2ZlKHjpsXAiEAvFuxRc1Y08X9I0OHLd/MxatqHcQOiGazzHIE/9qlyQo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69347},"main":"./dist/index.umd.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.es.js","private":false,"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support.","directories":{},"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","@types/node":"^22.14.1","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.0","eslint":"^8.56.0","typescript":"^5.2.2","@types/react":"^18.2.55","vite-plugin-dts":"^3.7.1","@types/react-dom":"^18.2.19","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.1","@typescript-eslint/parser":"^6.21.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.5","@typescript-eslint/eslint-plugin":"^6.21.0"},"peerDependencies":{"axios":"^1.6.7","react":"^18.2.0","react-dom":"^18.2.0","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.58.5","@fingerprintjs/fingerprintjs":"^4.2.1"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.8_1745062407579_0.34553115907654286","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@0xbot/chat-react","version":"1.0.9","_id":"@0xbot/chat-react@1.0.9","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"ef11d46277a985b5a4b5b35662c22b3401568b57","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.9.tgz","fileCount":17,"integrity":"sha512-Ny5sTGtJ+JCz9Ab16zYd4icfZIhT7hw6vjioVbhG3Cbf/9P2lWUweXsgyV8PXs/DcV+vnt56RwGatvmD+LehtQ==","signatures":[{"sig":"MEQCICGIr7MP6qiqyY7IfJbySMLkd6er1zyiH9bMWaksZHEoAiAcEY24HNCweiahE01EBC4GF53rDYqs6Oo6JpJ9pu1isQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68044},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.9_1745150584705_0.02256312768026847","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"@0xbot/chat-react","version":"1.0.10","_id":"@0xbot/chat-react@1.0.10","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"e1761a561fcac7f9a766371645f2a2426a8aea6a","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.10.tgz","fileCount":192,"integrity":"sha512-QbxwIn7Prv6GKBVnzkjmdK03X6t2LDVdB5WQVPAzW8HogMh8eMPZFolxyXKyJjCMTMEHF2pWKuUtm5uOZ7GJbA==","signatures":[{"sig":"MEYCIQC8WAqy6Pbczsk5uKYOGIACwisyQNEEG0GWmJ8qtRaiRgIhAJvfKySfyC2OFJtGOtGYrdUByGiMrp6z1zQ1uYJUL8Hx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12655085},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","actor":{"name":"curtains415","type":"user","email":"1084491297@qq.com"},"email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.10_1750156405400_0.25563922286780016","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"@0xbot/chat-react","version":"1.0.11","_id":"@0xbot/chat-react@1.0.11","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"7a219cf4a3f37cebbb2b161f5ec64ce3059a2549","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.11.tgz","fileCount":192,"integrity":"sha512-2xjdzdkOp3FUISc34Q62OGDsDibX25Ig8eb4SRudCxk0CrFq++gGBkNgmM2YRhX+OYoQUeP+zyEProjkc/fuFQ==","signatures":[{"sig":"MEYCIQD2Y42vXKxFi6Ww1saXsy0SuXIIbf+ZcHlN/l+tn1DdOgIhAJcfZeUbwSVT7WFf+IoEoKDattEMK4t6TQywLcX48o1l","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12656424},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","actor":{"name":"curtains415","type":"user","email":"1084491297@qq.com"},"email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.11_1750159370265_0.053852011484240236","host":"s3://npm-registry-packages-npm-production"}},"1.0.12":{"name":"@0xbot/chat-react","version":"1.0.12","_id":"@0xbot/chat-react@1.0.12","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"f9b928bf725a3d3581c45dafd80b5346551e4cbe","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.12.tgz","fileCount":192,"integrity":"sha512-ng2Efe5u0SdSbtX3wiytA/pBHrLXSNp2u3pLa6yHO/Os2RF7yRoNqSegt0kLbRachQbvEnkTLDBSnEHMM+Uqng==","signatures":[{"sig":"MEQCIDi5p8d5NXksxtMmgELXJqz4tkHgmIr62CmsZvtZWOs9AiA9xHZcrA4r1NgDBgDf4NteHi9trM350fUpO6XOBpUl8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12656283},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","actor":{"name":"curtains415","type":"user","email":"1084491297@qq.com"},"email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.12_1750159904934_0.0847215884758068","host":"s3://npm-registry-packages-npm-production"}},"1.0.13":{"name":"@0xbot/chat-react","version":"1.0.13","_id":"@0xbot/chat-react@1.0.13","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"5e147ff466026b5ed7e09c94abe4f2cdc30344b2","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.13.tgz","fileCount":192,"integrity":"sha512-kaE/S8AjzfRzUxz3N9KfC1lK5QRTxbHYoZNYDnhlSsVjFGZoPXbY8yXub2KWn0RN38oDYhebKc85NTXaA9cyPA==","signatures":[{"sig":"MEUCIHg6uJdGDW+BqfUJ46/ugkEltVM5tBkgwCh+c7LbBKpJAiEAufF5T5qHq839xBwQSKqTQr/sRVHE5PMRSyGpdnZBKp8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12656299},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","actor":{"name":"curtains415","type":"user","email":"1084491297@qq.com"},"email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.13_1750736649250_0.7908139266214282","host":"s3://npm-registry-packages-npm-production"}},"1.0.14":{"name":"@0xbot/chat-react","version":"1.0.14","author":{"name":"0xBot Studio"},"license":"MIT","_id":"@0xbot/chat-react@1.0.14","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"445a747328ea1db392951d2c2d1aba2f96b26cfc","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.14.tgz","fileCount":192,"integrity":"sha512-iqVstF1aFSbDxGXrA+VboDdiKrVek4jwwJLVSjMyPlE6sBHoF9r6KeE3/cNxbbHBBuj6ngJUbnA9nXt+Y5N1mQ==","signatures":[{"sig":"MEYCIQCSWWS07BFe49K5erflzVJRb3R/+v1S2KSogErpFwCiFAIhAKLzpciA1LoOPKB+8F5Gg6PKFMHAQNEZkSIUZZvT2cuY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12656318},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","gitHead":"5fb6b14e2c40469c43d6980335a3857a72790827","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","actor":{"name":"curtains415","type":"user","email":"1084491297@qq.com"},"email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.14_1752136234056_0.14554328106576064","host":"s3://npm-registry-packages-npm-production"}},"1.0.15":{"name":"@0xbot/chat-react","version":"1.0.15","author":{"name":"0xBot Studio"},"license":"MIT","_id":"@0xbot/chat-react@1.0.15","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"dist":{"shasum":"88617fa5b107372da58202366cca75ec175d350c","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.15.tgz","fileCount":192,"integrity":"sha512-n7m5l2/7hYewwvxCZZopZNqbtJVcfjbZnpf0h+1tRdGYp9XbMIIG2iDT/3LQsYxNyNrdB5L5uUyNiPNLxUMq9Q==","signatures":[{"sig":"MEYCIQD/e22oStIeen0ev4PZsv/pbJinnwkQ5uEZeezU/1gBBQIhAMzHwnwEpH84ECX6DttObj7J9JxWV/AEdg18HzVKFsSw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12665002},"main":"dist/chat-library.umd.js","types":"dist/index.d.ts","module":"dist/chat-library.es.js","gitHead":"0f2df835d97894b6ee2fda2b0e445b362f041d9c","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"curtains415","email":"1084491297@qq.com"},"_npmVersion":"10.5.0","description":"A React component for building chat interfaces with streaming support","directories":{},"sideEffects":["*.css","*.scss"],"_nodeVersion":"18.20.0","dependencies":{"axios":"^1.6.7","localforage":"^1.10.0","markdown-it":"^14.0.0","highlight.js":"^11.9.0","@unocss/reset":"^0.63.3","@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","typescript":"^5.0.0","@types/react":"^18.2.0","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.0","@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-react_1.0.15_1765892644807_0.8277014574024464","host":"s3://npm-registry-packages-npm-production"}},"1.0.16":{"name":"@0xbot/chat-react","version":"1.0.16","description":"A React component for building chat interfaces with streaming support","main":"dist/chat-library.umd.js","module":"dist/chat-library.es.js","types":"dist/index.d.ts","author":{"name":"0xBot Studio"},"license":"MIT","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"peerDependencies":{"react":">=18 <20","react-dom":">=18 <20","@types/react":">=18 <20","@types/react-dom":">=18 <20"},"dependencies":{"@dodoex/widgets":"^3.1.3","@fingerprintjs/fingerprintjs":"^4.2.1","@unocss/reset":"^0.63.3","axios":"^1.6.7","highlight.js":"^11.9.0","localforage":"^1.10.0","markdown-it":"^14.0.0"},"devDependencies":{"@types/markdown-it":"^14.1.2","@vitejs/plugin-react":"^4.2.0","typescript":"^5.0.0","vite":"^5.0.0","vite-plugin-dts":"^3.7.0"},"sideEffects":["*.css","*.scss"],"_id":"@0xbot/chat-react@1.0.16","gitHead":"d69fc3b6fe19f9866ca54b03edd9c2b1bf000ba6","_nodeVersion":"18.20.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-gEBm/C+80p8fF0NyMOZpf8JEricb4KRCiBYLzf5JdgY7ZI3yXUzOkCho9mYDjIrsDgfNGnC+N903GP4etvXG2Q==","shasum":"08e9e18e2db3ed651a02e58b0e5130bf33b632ef","tarball":"https://registry.npmjs.org/@0xbot/chat-react/-/chat-react-1.0.16.tgz","fileCount":192,"unpackedSize":12666055,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH+fCuuPC8xE0uLCSdalOHsMayG0R35IrmFwQWVmjgnFAiB7qDDphTTiTKEHuDo8EYPSyiEAaC9p7FrIndLqjevi5A=="}]},"_npmUser":{"name":"curtains415","email":"1084491297@qq.com"},"directories":{},"maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-react_1.0.16_1766494840863_0.24375002606156437"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-19T11:33:27.486Z","modified":"2025-12-23T13:00:41.359Z","1.0.8":"2025-04-19T11:33:27.798Z","1.0.9":"2025-04-20T12:03:04.937Z","1.0.10":"2025-06-17T10:33:25.689Z","1.0.11":"2025-06-17T11:22:50.480Z","1.0.12":"2025-06-17T11:31:45.166Z","1.0.13":"2025-06-24T03:44:09.502Z","1.0.14":"2025-07-10T08:30:34.327Z","1.0.15":"2025-12-16T13:44:05.115Z","1.0.16":"2025-12-23T13:00:41.104Z"},"author":{"name":"0xBot Studio"},"license":"MIT","description":"A React component for building chat interfaces with streaming support","maintainers":[{"name":"curtains415","email":"1084491297@qq.com"}],"readme":"# Chat Library React\r\n\r\nA React component for building chat interfaces with streaming support.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @0xbot/chat-react\r\n# or\r\nyarn add @0xbot/chat-react\r\n# or\r\npnpm add @0xbot/chat-react\r\n```\r\n\r\n## Usage\r\n\r\n```tsx\r\nimport React from 'react'\r\nimport { ChatLibrary } from '@0xbot/chat-react'\r\nimport '@0xbot/chat-react/dist/index.css' // Import the CSS\r\n\r\nconst App = () => {\r\n  return (\r\n    <ChatLibrary\r\n      apiKey=\"your-api-key\"  // required  \r\n      serverUrl=\"your-server-url\" // not required\r\n      UserAvatar={<YourUserAvatar />} // required\r\n      AgentAvatar={<YourAgentAvatar />} // required\r\n      loadingText=\"AI is thinking...\" // not required\r\n      emptyText=\"No messages yet\" // not required\r\n      tradeApiKey=\"xxxx-xxxx-xx\"\r\n    />\r\n  )\r\n}\r\n\r\nexport default App\r\n```\r\n\r\n## Props\r\n\r\n| Prop | Type | Required | Default | Description |\r\n|------|------|----------|---------|-------------|\r\n| apiKey | string | Yes | - | Your API key for authentication |\r\n| serverUrl | string | Yes | - | The server URL for API requests |\r\n| UserAvatar | ReactNode | Yes | - | The avatar component for user messages |\r\n| AgentAvatar | ReactNode | Yes | - | The avatar component for agent messages |\r\n| loadingText | string | No | 'AI is thinking...' | Text to display while loading |\r\n| emptyText | string | No | 'No messages yet' | Text to display when there are no messages |\r\n| theme | object | No | {} | Theme configuration object |\r\n| tradeApiKey | string | No | '' | trade api key |\r\n\r\n## Features\r\n\r\n- Real-time message streaming\r\n- Markdown support\r\n- Customizable theme\r\n- Responsive design\r\n- Built-in loading states\r\n- Error handling\r\n\r\n## Dependencies\r\n\r\nThis library requires the following peer dependencies:\r\n\r\n- React 18 or higher\r\n- React DOM 18 or higher\r\n- @types/react 18 or higher (for TypeScript projects)\r\n- @types/react-dom 18 or higher (for TypeScript projects)\r\n\r\n## Styling\r\n\r\nYou can customize the appearance of the chat component by overriding the following CSS classes:\r\n\r\n```css\r\n/* Main container */\r\n.chat-library {\r\n  box-sizing: border-box;\r\n  height: 100%;\r\n  position: relative;\r\n  display: flex;\r\n  flex-direction: column;\r\n  justify-content: space-between;\r\n  gap: 16px;\r\n}\r\n\r\n/* Bottom bar */\r\n.chat-bar {\r\n  display: flex;\r\n  align-items: center;\r\n  gap: 16px;\r\n}\r\n\r\n/* Input field */\r\n.chat-bar-input {\r\n  flex: 1;\r\n  height: 44px;\r\n  outline: none;\r\n  border-radius: 99999px;\r\n  border: 1px solid #ccc;\r\n  background-color: transparent;\r\n  color: #fff;\r\n  padding: 0 16px;\r\n  min-width: 0;\r\n}\r\n\r\n/* Send button */\r\n.chat-bar-send {\r\n  flex: none;\r\n  width: auto;\r\n  border: 1px solid;\r\n  height: 48px;\r\n  padding: 0 32px;\r\n  border-radius: 99999px;\r\n  cursor: pointer;\r\n  background-color: transparent;\r\n  transition: all 0.2s ease-in-out;\r\n}\r\n\r\n/* Send button hover */\r\n.chat-bar-send:hover {\r\n  background-color: var(--primary-color);\r\n  color: white !important;\r\n}\r\n\r\n/* Chat container (excluding bottom bar) */\r\n.chat-container {\r\n  flex: 1;\r\n  overflow-y: scroll;\r\n  scrollbar-width: none;\r\n  -ms-overflow-style: none;\r\n}\r\n\r\n/* Hide scrollbar */\r\n.chat-container::-webkit-scrollbar {\r\n  display: none;\r\n}\r\n\r\n/* Chat message list */\r\n.chat-container-list {\r\n  display: flex;\r\n  flex-direction: column;\r\n  gap: 16px;\r\n}\r\n\r\n/* Message bubble */\r\n.message-bubble {\r\n  padding: 12px 16px;\r\n  border-radius: 8px;\r\n  max-width: 90%;\r\n  font-size: 14px;\r\n  word-break: break-all;\r\n  line-height: 24px;\r\n}\r\n\r\n@media (min-width: 768px) {\r\n  .message-bubble {\r\n    max-width: 70%;\r\n    font-size: 13px;\r\n  }\r\n}\r\n\r\n/* Avatar */\r\n.chat-avatar {\r\n  width: 44px;\r\n  height: 44px;\r\n  max-width:44px;\r\n  max-height:44px;\r\n  min-width: 44px;\r\n  min-height: 44px;\r\n  border-radius: 8px;\r\n}\r\n\r\n/* Message bubble background */\r\n.chat-message {\r\n  background-color: rgba(255, 255, 255, 0.1)\r\n}\r\n\r\n/* Message container */\r\n.message-container {\r\n  display: flex;\r\n}\r\n\r\n/* Delete button */\r\n.chat-bar-trash {\r\n  width: 24px;\r\n  height: 24px;\r\n  min-width: 24px;\r\n  min-height: 24px;\r\n  color: #fff;\r\n  cursor: pointer;\r\n}\r\n\r\n/* Loading state */\r\n.message-loading {\r\n  color: #fff;\r\n  font-style: italic;\r\n}\r\n\r\n/* Empty message state */\r\n.message-empty {\r\n  color: #fff;\r\n  font-style: italic;\r\n  text-align: center;\r\n}\r\n\r\n/* Trade modal */\r\n.dodo-swap {\r\n  position: fixed;\r\n  z-index: 1000;\r\n  top: 0;\r\n  left: 0;\r\n  width: 100%;\r\n  height: 100%;\r\n  background-color: rgba(0, 0, 0, 0.35);\r\n  display: flex;\r\n  align-items: center;\r\n  justify-content: center;\r\n}\r\n```\r\n\r\n### How to Override Styles\r\n\r\nYou can override these styles by adding your own CSS rules after importing the library's CSS. For example:\r\n\r\n```css\r\n/* Import the library's CSS first */\r\n@import '@0xbot/chat-react/dist/index.css';\r\n\r\n/* Then add your custom styles */\r\n.chat-bar-input {\r\n  border-color: #ff0000;\r\n  background-color: #f0f0f0;\r\n  color: #333;\r\n}\r\n\r\n.chat-bar-send {\r\n  background-color: #4CAF50;\r\n  color: white;\r\n  border: none;\r\n}\r\n```\r\n\r\n## License\r\n\r\nMIT ","readmeFilename":"README.md"}