{"_id":"@airelogic/docs-chatbot","_rev":"7-8618a90d6f60621b668c50c6cad2f614","name":"@airelogic/docs-chatbot","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0-pre02":{"name":"@airelogic/docs-chatbot","version":"1.0.0-pre02","keywords":[],"author":{"name":"AireInnovate"},"_id":"@airelogic/docs-chatbot@1.0.0-pre02","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"dist":{"shasum":"6134bca2b9760bcb4aa222e749bae76ab6fc68e9","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.0.0-pre02.tgz","fileCount":6,"integrity":"sha512-ZYz9g59JQdm+U8t5r/4sAPtOBNcTjwCpZjDkPeDBXo+zKmEDIUWhw596MIJ+9MkH7MDn8Ea9yhlgoeQii7azKw==","signatures":[{"sig":"MEUCIE/IM8ekHfzABumL1NM4uV+wCC5I6Xis21mzS9UCT+PXAiEA0omCp2dyJ51IPtephZKSa1ZFBHsmUXwlMMFDiaJ0SRs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15251},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js"}},"gitHead":"d2723c84a8ca8a50a9e3329594043af46309ff8e","scripts":{"dev":"vite","build":"rimraf dist && rollup -c","start":"vite"},"_npmUser":{"name":"development.airelogic","actor":{"name":"development.airelogic","type":"user","email":"development@airelogic.com"},"email":"development@airelogic.com"},"_npmVersion":"10.8.2","description":"Chatbot for AireSuite Products","directories":{},"sideEffects":false,"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.2","devDependencies":{"tsx":"^4.20.3","vite":"^6.3.5","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.44.0","react-dom":"^19.1.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","rollup-plugin-dts":"^6.2.1","@vitejs/plugin-react":"^4.6.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.3","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/docs-chatbot_1.0.0-pre02_1750760042542_0.7963226230465419","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@airelogic/docs-chatbot","version":"1.0.0","keywords":[],"author":{"name":"AireInnovate"},"_id":"@airelogic/docs-chatbot@1.0.0","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"dist":{"shasum":"5d70ae5d2eb4962836d31845db4dd596ca2ade31","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.0.0.tgz","fileCount":6,"integrity":"sha512-lBVGL5dae7kRWDo3LFiMzqRRjCx4WoHry+Ji2OyUSGfbWmrUX/jm2/vytPV5mV/xq1keE8ksAzHWw+r6IPrMZg==","signatures":[{"sig":"MEUCIQD1Ucj8qhPxHtzSELV6dW120egX81/6G28prAA8Ep7owAIgYVOC/I92GrSL0DquXhhKM2allEjrvFwQ5b5tzCuMtig=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15506},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js"}},"gitHead":"3dd2c53a6911ca4aee0bd213ca9766063ba1f9c6","scripts":{"dev":"vite","build":"rimraf dist && rollup -c","start":"vite"},"_npmUser":{"name":"development.airelogic","actor":{"name":"development.airelogic","type":"user","email":"development@airelogic.com"},"email":"development@airelogic.com"},"_npmVersion":"10.8.2","description":"Chatbot for AireSuite Products","directories":{},"sideEffects":false,"_nodeVersion":"20.19.2","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.2","devDependencies":{"tsx":"^4.20.3","vite":"^6.3.5","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.44.0","react-dom":"^19.1.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","rollup-plugin-dts":"^6.2.1","@vitejs/plugin-react":"^4.6.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.3","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/docs-chatbot_1.0.0_1750836048420_0.4515773753202046","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@airelogic/docs-chatbot","version":"1.0.1","keywords":[],"author":{"name":"AireInnovate"},"_id":"@airelogic/docs-chatbot@1.0.1","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"dist":{"shasum":"64728e6fb5c9eb7a20aa9cf25bc0b63102093bef","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.0.1.tgz","fileCount":6,"integrity":"sha512-4KjBz4ZLuIu0SYtrj73GgdsAvbEKxYptPuWmUAB4ePz7l51LjzkIdh7FEY1iGkOddT4hrMfdd/tVzDQz64RiqA==","signatures":[{"sig":"MEYCIQDdFCv1l4MK2V/85uphSO464M3TKE9FmdWzebtoEm2YcAIhAL3GTMhPHGuuvwyGAVc8luVLXZwYFxetV5+RXV/5L4Q7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19925},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js"}},"gitHead":"5fdf69e1aa7cd22d1bb4a4240c3fe2b31e1dd269","scripts":{"dev":"vite","build":"rimraf dist && rollup -c","start":"vite"},"_npmUser":{"name":"development.airelogic","email":"development@airelogic.com"},"_npmVersion":"10.8.2","description":"Chatbot for AireSuite Products","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.2","devDependencies":{"tsx":"^4.20.3","vite":"^6.3.5","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.44.0","react-dom":"^19.1.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","rollup-plugin-dts":"^6.2.1","@vitejs/plugin-react":"^4.6.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.3","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/docs-chatbot_1.0.1_1752594277336_0.42648441109317337","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@airelogic/docs-chatbot","version":"1.0.2","keywords":[],"author":{"name":"AireInnovate"},"_id":"@airelogic/docs-chatbot@1.0.2","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"dist":{"shasum":"e98d763c39f743191c2e27987169956643291ba4","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.0.2.tgz","fileCount":6,"integrity":"sha512-KVkuKDixI8UJ4g4z9OQOaBA1sIkOBacjtBFbUlarnobM6fH7DL8CCiF7C3bmBWzTCA+LeCud5JGJpEboWiyspQ==","signatures":[{"sig":"MEUCIQDsByAvQE35314euOSTxCwZJb5c8HfEE+HZrqA/67XGGgIgVWUVxPfA+r+HLuRIexIWtnrbFIyQy30HLBEwvSKZ4FA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19901},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js"}},"gitHead":"4387067ac34be03298fd06d9db7bca4e5c89b1bd","scripts":{"dev":"vite","build":"rimraf dist && rollup -c","start":"vite"},"_npmUser":{"name":"development.airelogic","email":"development@airelogic.com"},"_npmVersion":"10.8.2","description":"Chatbot for AireSuite Products","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.2","devDependencies":{"tsx":"^4.20.3","vite":"^6.3.5","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.44.0","react-dom":"^19.1.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","rollup-plugin-dts":"^6.2.1","@vitejs/plugin-react":"^4.6.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.3","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/docs-chatbot_1.0.2_1753106210580_0.6556324147620634","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@airelogic/docs-chatbot","version":"1.0.3","keywords":[],"author":{"name":"AireInnovate"},"_id":"@airelogic/docs-chatbot@1.0.3","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"dist":{"shasum":"c6b01ecc5c1211bd068188b21ffc61213a8cff12","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.0.3.tgz","fileCount":6,"integrity":"sha512-KEO1kKwiutzdEcYaLaxra5P4W+wrK4B7YT9aNlC4ox7DdKi4aPdvV+YdX6OyrQEGPssODk0Ha4PhJCHvyJgcPQ==","signatures":[{"sig":"MEQCIGDRCe9gOkCgG/KP1y9ZH2GDi12TZFiG54Hb5ecawHHrAiA5flOgaxa++FOvL9oDEv58WNze9DQxva2WrR2PbksRQQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20135},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"types":"./dist/main.d.ts","import":"./dist/main.js"}},"gitHead":"1b7b6e96284839c8b8f26c2a2fa60ff65fa46f10","scripts":{"dev":"vite","build":"rimraf dist && rollup -c","start":"vite"},"_npmUser":{"name":"development.airelogic","email":"development@airelogic.com"},"_npmVersion":"10.8.2","description":"Chatbot for AireSuite Products","directories":{},"sideEffects":false,"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.2","devDependencies":{"tsx":"^4.20.3","vite":"^6.3.5","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.44.0","react-dom":"^19.1.0","typescript":"^5.8.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","rollup-plugin-dts":"^6.2.1","@vitejs/plugin-react":"^4.6.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.3","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/docs-chatbot_1.0.3_1753108142089_0.03422504900866974","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@airelogic/docs-chatbot","version":"1.1.0","description":"Chatbot for AireSuite Products","type":"module","module":"./dist/main.js","types":"./dist/main.d.ts","exports":{".":{"import":"./dist/main.js","types":"./dist/main.d.ts"}},"sideEffects":false,"scripts":{"build":"rimraf dist && rollup -c","dev":"vite","start":"vite"},"keywords":[],"author":{"name":"AireInnovate"},"packageManager":"pnpm@10.12.2","devDependencies":{"@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.3","@types/node":"^24.0.3","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@vitejs/plugin-react":"^4.6.0","react":"^19.1.0","react-dom":"^19.1.0","rimraf":"^6.0.1","rollup":"^4.44.0","rollup-plugin-dts":"^6.2.1","tslib":"^2.8.1","tsx":"^4.20.3","typescript":"^5.8.3","vite":"^6.3.5"},"_id":"@airelogic/docs-chatbot@1.1.0","gitHead":"a7c12227742c534d44e47c6e2fe13ff60a89ffe8","_nodeVersion":"20.19.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-5C7UPoxUU9SEFQCZS98mhg5UjFiv7Svwn2Da830shQblwcdu2VNb2aIGoBAz6Pnniyvg7opg2Y+0/fTxsMGGMg==","shasum":"d401d3df37195b5b610fb757a7f1d9968ba8f8f4","tarball":"https://registry.npmjs.org/@airelogic/docs-chatbot/-/docs-chatbot-1.1.0.tgz","fileCount":8,"unpackedSize":23119,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBkwrW9lN5hQ5QtAJ8Acgo6kwv867MFPT6lXuLdg2h8DAiAtlQ8yeswkKfK4qaVMY3D7p0b3mve6CunYRPma9Za2YQ=="}]},"_npmUser":{"name":"development.airelogic","email":"development@airelogic.com"},"directories":{},"maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/docs-chatbot_1.1.0_1753184672132_0.23046166123135436"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-24T10:14:02.541Z","modified":"2025-07-22T11:44:32.493Z","1.0.0-pre02":"2025-06-24T10:14:02.728Z","1.0.0":"2025-06-25T07:20:48.578Z","1.0.1":"2025-07-15T15:44:37.488Z","1.0.2":"2025-07-21T13:56:50.756Z","1.0.3":"2025-07-21T14:29:02.273Z","1.1.0":"2025-07-22T11:44:32.324Z"},"author":{"name":"AireInnovate"},"keywords":[],"description":"Chatbot for AireSuite Products","maintainers":[{"name":"development.airelogic","email":"development@airelogic.com"}],"readme":"# @airelogic/docs-chatbot\n\nA chatbot for the Airelogic documentation to be used in the Airesuite products.\n\n## Installation\n\n```bash\nnpm install @airelogic/docs-chatbot\n```\n\n## Usage\n\n### Basic Usage (Auto-mounting)\n\n```javascript\nimport React, { useRef } from \"react\";\nimport {\n  useDocsBotChat,\n  DocsBotChatRef,\n  DocsBotOptions,\n} from \"@airelogic/docs-chatbot\";\n\nconst widgetOptions: DocsBotOptions = {\n  botName: \"AireGlu Docs\",\n  description: \"Ask me anything about AireGlu!\",\n  color: \"#291b3e\",\n  alignment: \"left\",\n  labels: {\n    firstMessage:\n      \"Hi! I can help you with our documentation. What would you like to know?\",\n    floatingButton: \"Help\",\n    inputPlaceholder: \"Ask about our docs...\",\n    poweredBy: \"Aireinnovate\",\n  },\n  questions: [\n    \"How do I get started with AireGlu endpoints?\",\n    \"What are the main features of AireGlu?\",\n    \"How do I send an email from an AireGlu enpoint?\",\n  ],\n  verticalMargin: 10, // use 70 if there is a footer\n  horizontalMargin: 10,\n  customCSS: `\n    .docsbot-wrapper {\n      height: calc(100% - 230px);\n    }\n    `, // Adjust height to fit the page when there is a footer\n};\n\n{\n  /* Refer to AireGlu (magicman) on how the Bot Id is housed in an environment variable */\n}\nuseDocsBotChat({\n  botId: \"a1QS54aX5vqaWUgXH9c1/QYNQLIJlzqpRsJX90lLE\",\n  options: widgetOptions,\n});\n\n// include component, the bot Id is unique for Airelogic\nreturn (\n  <div>\n    <h1>Welcome to the Docs Chatbot Playground</h1>\n  </div>\n);\n```\n\n### Manual Control\n\nFor more control over when the chatbot loads and mounts, you can disable automatic injection:\n\n```javascript\nimport React, { useRef, useState } from \"react\";\nimport {\n  DocsBotChat,\n  DocsBotChatRef,\n  DocsBotOptions,\n} from \"@airelogic/docs-chatbot\";\n\nconst { mount, unmount, toggle } = useDocsBotChat({\n  botId: \"your-bot-id\",\n  options: widgetOptions,\n  inject: false,\n});\nconst [isMounted, setIsMounted] = useState(false);\n\nconst handleMount = async () => {\n  const success = await mount();\n  setIsMounted(success || false);\n};\n\nconst handleUnmount = async () => {\n  const success = await unmount();\n  setIsMounted(!success);\n};\n\nconst handleToggle = () => {\n  toggle();\n};\n\nreturn (\n  <div>\n    <div>\n      <button onClick={handleMount} disabled={isMounted}>\n        Mount Chatbot\n      </button>\n      <button onClick={handleUnmount} disabled={!isMounted}>\n        Unmount Chatbot\n      </button>\n      <button onClick={handleToggle} disabled={!isMounted}>\n        Toggle Chatbot\n      </button>\n    </div>\n  </div>\n);\n```\n\nImportant: When using manual control, ensure you have added a reference to the docsbot script in your HTML.\n\n```html\n<script src=\"https://widget.docsbot.ai/chat.js\" async></script>\n```\n\n## Props\n\n| Prop                     | Type                 | Default     | Description                               |\n| ------------------------ | -------------------- | ----------- | ----------------------------------------- |\n| `botId`                  | `string`             | Required    | The unique bot identifier                 |\n| `options`                | `DocsBotOptions`     | `{}`        | Widget configuration options              |\n| `identify`               | `DocsBotIdentify`    | `undefined` | User identification data                  |\n| `signature`              | `string`             | `undefined` | Authentication signature                  |\n| `supportCallback`        | `SupportCallback`    | `undefined` | Support ticket callback                   |\n| `keyboardShortcuts`      | `KeyboardShortcut[]` | `[]`        | Custom keyboard shortcuts                 |\n| `enableDefaultShortcuts` | `boolean`            | `true`      | Enable Ctrl+Q (toggle) and Escape (close) |\n| `inject`                 | `boolean`            | `true`      | Control automatic script injection        |\n\n## Methods\n\nThe hook (or the component ref) provides several methods to control the chatbot widget:\n\n- `mount()` - Manually mount the chatbot widget\n- `unmount()` - Unmount and clean up the chatbot widget\n- `open()` - Open the chatbot interface\n- `close()` - Close the chatbot interface\n- `toggle()` - Toggle the chatbot interface open/closed\n- `addUserMessage(message, send?)` - Add a user message to the chat\n- `addBotMessage(message)` - Add a bot message to the chat\n- `clearChatHistory()` - Clear the chat history\n\n```\n\n```\n","readmeFilename":"README.md"}