{"_id":"@telow/chat","_rev":"28-8e0d8bacb8ed3f0d9ad73a03be7d6100","name":"@telow/chat","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.2":{"name":"@telow/chat","version":"0.0.2","keywords":["telow","chat","widget","support","react"],"author":{"name":"Telow"},"license":"UNLICENSED","_id":"@telow/chat@0.0.2","maintainers":[{"name":"farhadsaadatpei","email":"farhad.saadatpei@me.com"}],"dist":{"shasum":"676cd2eaa2484a13583ad3b323cf8047aa1c172a","tarball":"https://registry.npmjs.org/@telow/chat/-/chat-0.0.2.tgz","fileCount":12,"integrity":"sha512-iI5AaRUAV4boVGKFDnHJfalumQMMrShTSvfaG9+alz9ae8R4Y+DvxLEu7XitAPP9I4epkJPrlKi4YQ+ILx5zOA==","signatures":[{"sig":"MEQCIC+nGDX22xAfWFrTvjo8W0K9+COlmzbztHiMICRYiVR5AiBkaUXioqJuOlqcaXon0dEDgzYg0cH//mqSpT5/2rJunQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1778568},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","browser":"dist/index.global.js","engines":{"npm":">=6.0.0","node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./style.css":{"default":"./dist/style.css"},"./dist/style.css":"./dist/style.css"},"gitHead":"8344dd746602d0a7479d4dc7a68c6a99e47638ed","scripts":{"dev":"tsup src/index.tsx --watch --dts --format esm,cjs --out-dir dist --sourcemap","lint":"tsc --noEmit","build":"npm run build:css && npm run build:js","build:js":"tsup","build:css":"tailwindcss -i ./src/tailwind.css -o ./dist/style.css --minify","unpublish":"npm unpublish @telow/chat","prepublishOnly":"npm run build","publish:public":"npm publish --access public","unpublish:help":"echo 'Usage: npm unpublish @telow/chat@<version> (e.g., npm unpublish @telow/chat@0.1.0)'","unpublish:force":"npm unpublish @telow/chat --force","unpublish:version":"node -e \"const pkg=require('./package.json'); require('child_process').execSync(`npm unpublish @telow/chat@${pkg.version}`, {stdio:'inherit'})\""},"_npmUser":{"name":"farhadsaadatpei","email":"farhad.saadatpei@me.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_npmVersion":"10.8.2","description":"Embeddable Telow chat widget for web apps and sites.","directories":{},"sideEffects":["**/*.css","dist/style.css"],"_nodeVersion":"20.18.3","dependencies":{"react-icons":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.6.3","tailwindcss":"^3.4.14","@types/react":"^18.3.7","@types/react-dom":"^18.3.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/chat_0.0.2_1765393207787_0.6922574048081906","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@telow/chat","version":"0.0.4","keywords":["telow","chat","widget","support","react"],"author":{"name":"Telow"},"license":"UNLICENSED","_id":"@telow/chat@0.0.4","maintainers":[{"name":"farhadsaadatpei","email":"farhad.saadatpei@me.com"}],"dist":{"shasum":"aa5cf0c733f135aadb63f9d030abad3eb0722736","tarball":"https://registry.npmjs.org/@telow/chat/-/chat-0.0.4.tgz","fileCount":12,"integrity":"sha512-AHndzl/92WHkYh+Wqv/HU7h6XJEENfjdKKKyHC2/WN0Rk/bW6uVsDWDMYkXKNoGi50dX3QwkLc2pVT2WhHRn3A==","signatures":[{"sig":"MEUCIAcDkwlUsbM+1CPf1Z4YaxP6wzzloqJ9nHryQiy49axLAiEA6jfAX5zqw+tga+QNE8gNULyneY9h6V6BTLZGokyrse4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1809055},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","browser":"dist/index.global.js","engines":{"npm":">=6.0.0","node":">=14.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./style.css":{"default":"./dist/style.css"},"./dist/style.css":"./dist/style.css"},"gitHead":"f090dc3e69f71bd0db2ee8538a80af1913d17136","scripts":{"dev":"tsup src/index.tsx --watch --dts --format esm,cjs --out-dir dist --sourcemap","lint":"tsc --noEmit","build":"npm run build:css && npm run build:js","build:js":"tsup","build:css":"tailwindcss -i ./src/tailwind.css -o ./dist/style.css --minify","unpublish":"npm unpublish @telow/chat","prepublishOnly":"npm run build","publish:public":"npm publish --access public","unpublish:help":"echo 'Usage: npm unpublish @telow/chat@<version> (e.g., npm unpublish @telow/chat@0.1.0)'","unpublish:force":"npm unpublish @telow/chat --force","unpublish:version":"node -e \"const pkg=require('./package.json'); require('child_process').execSync(`npm unpublish @telow/chat@${pkg.version}`, {stdio:'inherit'})\""},"_npmUser":{"name":"farhadsaadatpei","email":"farhad.saadatpei@me.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_npmVersion":"10.8.2","description":"Embeddable Telow chat widget for web apps and sites.","directories":{},"sideEffects":["**/*.css","dist/style.css"],"_nodeVersion":"20.18.3","dependencies":{"react-icons":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","react":"^18.3.1","react-dom":"^18.3.1","typescript":"^5.6.3","tailwindcss":"^3.4.14","@types/react":"^18.3.7","@types/react-dom":"^18.3.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/chat_0.0.4_1765394333927_0.7970733290549388","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-12-10T19:00:07.678Z","modified":"2025-12-15T22:47:28.580Z","0.1.0":"2025-12-10T15:46:35.915Z","0.1.1":"2025-12-10T15:54:18.807Z","0.1.2":"2025-12-10T15:56:31.063Z","0.1.3":"2025-12-10T16:48:43.966Z","0.1.4":"2025-12-10T16:55:01.178Z","0.1.5":"2025-12-10T17:21:53.931Z","0.1.6":"2025-12-10T17:25:06.020Z","0.1.7":"2025-12-10T17:36:47.355Z","0.1.8":"2025-12-10T17:42:04.448Z","0.1.9":"2025-12-10T17:45:26.772Z","0.0.1":"2025-12-10T18:03:51.748Z","0.0.3":"2025-12-10T18:34:00.659Z","0.0.2":"2025-12-10T19:00:07.943Z","0.0.4":"2025-12-10T19:18:54.104Z"},"author":{"name":"Telow"},"license":"UNLICENSED","keywords":["telow","chat","widget","support","react"],"description":"Embeddable Telow chat widget for web apps and sites.","maintainers":[{"email":"support@npmjs.com","name":"npm-support"}],"readme":"# @telow/chat\n\nEmbeddable AI-powered Telow chat widget for web apps and sites. Ships as a React component for npm installs and a global script for CDN usage. Professional design with light/dark themes, floating launcher, conversation management, voice input, and fully isolated CSS to prevent conflicts with your application.\n\n## Install\n\n```bash\nnpm install @telow/chat\n```\n\n## Requirements\n\n- **React**: >=16.8.0 (supports React 16.8+, 17.x, and 18.x)\n- **React DOM**: >=16.8.0\n- **Node.js**: >=14.0.0 (for development)\n\nThe package automatically detects your React version and uses the appropriate rendering API (ReactDOM.render for React 16/17, createRoot for React 18+).\n\n## Usage (npm)\n\n### Standard React App\n\n```tsx\nimport \"@telow/chat/style.css\";\nimport { TelowChat } from \"@telow/chat\";\n\nexport default function App() {\n  return (\n    <TelowChat\n      chatId=\"<CHAT_ID>\"\n      logo=\"/logo.png\"\n      companyName=\"Acme Corp Assistant\"\n      draggable={true} // Optional: enable dragging the button\n    />\n  );\n}\n```\n\n### Next.js App Router (13+)\n\nThe component is already marked as a client component, so you can use it directly:\n\n```tsx\n// app/page.tsx or any client component\n\"use client\"; // Only needed if this file is a server component\n\nimport \"@telow/chat/style.css\";\nimport { TelowChat } from \"@telow/chat\";\n\nexport default function Page() {\n  return (\n    <TelowChat\n      chatId=\"<CHAT_ID>\"\n      logo=\"/logo.png\"\n      companyName=\"Acme Corp Assistant\"\n    />\n  );\n}\n```\n\nOr use it in a client component file:\n\n```tsx\n// components/ChatWidget.tsx\n\"use client\";\n\nimport \"@telow/chat/style.css\";\nimport { TelowChat } from \"@telow/chat\";\n\nexport default function ChatWidget() {\n  return (\n    <TelowChat\n      chatId=\"<CHAT_ID>\"\n      logo=\"/logo.png\"\n      companyName=\"Acme Corp Assistant\"\n    />\n  );\n}\n```\n\n**Note**:\n\n- The `TelowChat` component already includes the `\"use client\"` directive, so it works seamlessly with Next.js App Router.\n- Use `@telow/chat/style.css` (not `@telow/chat/dist/style.css`) for Next.js compatibility.\n\n## Usage (CDN)\n\n```html\n<link\n  rel=\"stylesheet\"\n  href=\"https://unpkg.com/@telow/chat@latest/dist/style.css\"\n/>\n<div id=\"telow-chat-widget-root\"></div>\n<script src=\"https://unpkg.com/@telow/chat@latest/dist/index.global.js\"></script>\n<script>\n  TelowChat.mount({\n    chatId: \"<CHAT_ID>\",\n    logo: \"/logo.png\",\n    companyName: \"Acme Corp Assistant\",\n  });\n</script>\n```\n\nIf no `targetId` is provided, the widget mounts into a new `div` with the id `telow-chat-widget-root` appended to `document.body`.\n\n## Props\n\n- `chatId` (string, required): Telow chat identifier used when calling `https://ap.telow.com/api/v1/webhooks/:chatId/sync`.\n- `logo` (string, optional): URL for the AI assistant logo displayed in the chat header and messages. Should be a square image (1:1 aspect ratio) for best results.\n- `companyName` (string, optional): Company or brand name for personalizing the AI assistant. Defaults to \"AI Assistant\" if not provided.\n- `apiBase` (string, optional): Override API base; defaults to `https://ap.telow.com/api/v1/webhooks`.\n- `draggable` (boolean, optional): Enable dragging the chat button around the window. Defaults to `false`. When enabled, the dialog will appear above the button position.\n\n## Features\n\n- **Floating Chat Button**: Professional circular button with sparkle icon that opens the chat dialog\n- **Light & Dark Themes**: Built-in theme toggle with persistent preference storage\n- **Conversation Management**: Create, switch, and delete multiple conversations with persistent storage\n- **Voice Input**: Built-in speech recognition for hands-free messaging\n- **Centered Modal View**: Toggle between bottom-right floating and centered modal views\n- **Draggable Button** (optional): Move the chat button anywhere on the screen\n- **Auto-scroll**: Automatically scrolls to the latest message\n- **Sound Effects**: Audio feedback for opening, closing, sending, and receiving messages\n- **Responsive Design**: Works seamlessly on desktop and mobile devices\n- **Conversation History**: All conversations are saved to localStorage and persist across page refreshes\n\n## Notes\n\n- Import `@telow/chat/style.css` (or include the CDN stylesheet) to load the Tailwind-generated styles.\n- For Next.js, use `@telow/chat/style.css` instead of `@telow/chat/dist/style.css`.\n- The widget posts `{ chatId, message, conversation }` and renders the `value` field from the JSON response.\n- Conversation history is maintained and sent with each message for context.\n- Default container ID is `telow-chat-widget-root` (can be customized with `targetId` prop).\n- All conversations and theme preferences are stored in localStorage with keys prefixed by `chatId` to support multiple widgets on the same page.\n- Privacy Policy link points to `https://telow.com/privacy`.\n","readmeFilename":"README.md"}