{"_id":"@adrianmaj/typebot-js","_rev":"4-722fe802360d3afad4d6b58e9c3cc70b","name":"@adrianmaj/typebot-js","dist-tags":{"latest":"0.8.8"},"versions":{"0.8.5":{"name":"@adrianmaj/typebot-js","version":"0.8.5","license":"FSL-1.1-ALv2","_id":"@adrianmaj/typebot-js@0.8.5","maintainers":[{"name":"adrianmaj","email":"adrianmaj1122@gmail.com"}],"dist":{"shasum":"6d54707afb2898056d66febd49d24ecd9e1e4c5c","tarball":"https://registry.npmjs.org/@adrianmaj/typebot-js/-/typebot-js-0.8.5.tgz","fileCount":3,"integrity":"sha512-ztcJaXG/le6POVjZj/NkZiBvllC8Uhup6Jb8HYQA2w7FovEvMB3WNAq9abB+IB7FHoS5COm+0L+CrNFh4hVULg==","signatures":[{"sig":"MEUCIQD2RZSG1KkL8pKjLci0qv0W+SfwZWvUm/yLa3M5rpJ9VQIgS9CySjwKDFqtEYtMCyMGddDX+NSxk/2tbTIYgQ7HJ5c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9585},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./web":"./dist/web.js"},"gitHead":"81326c7be6bb673d8f70c0277ef046804a87456a","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"adrianmaj","actor":{"name":"adrianmaj","type":"user","email":"adrianmaj1122@gmail.com"},"email":"adrianmaj1122@gmail.com"},"_npmVersion":"10.9.2","description":"Javascript library to display typebots on your website","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ky":"1.2.4","tsup":"8.5.0","marked":"9.0.3","postcss":"8.5.3","solid-js":"1.9.5","dompurify":"3.2.4","partysocket":"1.0.2","tailwindcss":"3.4.17","autoprefixer":"10.4.20","@ark-ui/solid":"5.11.0","solid-element":"1.9.1","@typebot.io/ui":"workspace:*","@typebot.io/env":"workspace:*","@typebot.io/lib":"workspace:*","@ai-sdk/ui-utils":"1.2.2","@typebot.io/logs":"workspace:*","@types/dompurify":"3.2.0","@stripe/stripe-js":"1.54.1","@typebot.io/theme":"workspace:*","@typebot.io/schemas":"workspace:*","@typebot.io/chat-api":"workspace:*","@typebot.io/settings":"workspace:*","@typebot.io/tsconfig":"workspace:*","esbuild-plugin-solid":"0.6.0","@typebot.io/rich-text":"workspace:*","@fix-webm-duration/fix":"1.0.1","@typebot.io/blocks-logic":"workspace:*","@typebot.io/blocks-inputs":"workspace:*","@typebot.io/zendesk-block":"workspace:*","@typebot.io/blocks-bubbles":"workspace:*","@tailwindcss/container-queries":"0.1.1","@typebot.io/blocks-integrations":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/typebot-js_0.8.5_1750241127013_0.8804525058290484","host":"s3://npm-registry-packages-npm-production"}},"0.8.6":{"name":"@adrianmaj/typebot-js","version":"0.8.6","license":"FSL-1.1-ALv2","_id":"@adrianmaj/typebot-js@0.8.6","maintainers":[{"name":"adrianmaj","email":"adrianmaj1122@gmail.com"}],"dist":{"shasum":"d5dab8ca14bb1f8bb6558222d0f9e0a7a670c8e2","tarball":"https://registry.npmjs.org/@adrianmaj/typebot-js/-/typebot-js-0.8.6.tgz","fileCount":5,"integrity":"sha512-UgFUxc6Oqgxw5C52l8Ek59/Dur2q6uobNnryuYb0LasGsUc43s1bGphqn9JAVmB2Xz/GWmyvTs1I2RwVBfr2uw==","signatures":[{"sig":"MEQCIBJc/lOGLJcZZuxeqzuk0mMMJKKVPPmZt2VDBYAmBJo8AiAJm8eaTvhoQz8FBKulmImnCc93ge6rTLkYqRahrHDBsA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":709596},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./web":"./dist/web.js"},"gitHead":"81326c7be6bb673d8f70c0277ef046804a87456a","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"adrianmaj","actor":{"name":"adrianmaj","type":"user","email":"adrianmaj1122@gmail.com"},"email":"adrianmaj1122@gmail.com"},"_npmVersion":"10.9.2","description":"Javascript library to display typebots on your website","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ky":"1.2.4","tsup":"8.5.0","marked":"9.0.3","postcss":"8.5.3","solid-js":"1.9.5","dompurify":"3.2.4","partysocket":"1.0.2","tailwindcss":"3.4.17","autoprefixer":"10.4.20","@ark-ui/solid":"5.11.0","solid-element":"1.9.1","@typebot.io/ui":"workspace:*","@typebot.io/env":"workspace:*","@typebot.io/lib":"workspace:*","@ai-sdk/ui-utils":"1.2.2","@typebot.io/logs":"workspace:*","@types/dompurify":"3.2.0","@stripe/stripe-js":"1.54.1","@typebot.io/theme":"workspace:*","@typebot.io/schemas":"workspace:*","@typebot.io/chat-api":"workspace:*","@typebot.io/settings":"workspace:*","@typebot.io/tsconfig":"workspace:*","esbuild-plugin-solid":"0.6.0","@typebot.io/rich-text":"workspace:*","@fix-webm-duration/fix":"1.0.1","@typebot.io/blocks-logic":"workspace:*","@typebot.io/blocks-inputs":"workspace:*","@typebot.io/zendesk-block":"workspace:*","@typebot.io/blocks-bubbles":"workspace:*","@tailwindcss/container-queries":"0.1.1","@typebot.io/blocks-integrations":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/typebot-js_0.8.6_1750247236674_0.09576552621551104","host":"s3://npm-registry-packages-npm-production"}},"0.8.7":{"name":"@adrianmaj/typebot-js","version":"0.8.7","license":"FSL-1.1-ALv2","_id":"@adrianmaj/typebot-js@0.8.7","maintainers":[{"name":"adrianmaj","email":"adrianmaj1122@gmail.com"}],"dist":{"shasum":"e89cd902ee3c802b95370575c5e26fc991833b5d","tarball":"https://registry.npmjs.org/@adrianmaj/typebot-js/-/typebot-js-0.8.7.tgz","fileCount":5,"integrity":"sha512-O6PEbkQRySE2vUD8qe5YihGQU0PBb0icX0wxSI5YtYVT0Nc/eNdYpiDDfC2U0U/lquz6db+P3k0SPjMwOKOMfg==","signatures":[{"sig":"MEUCIQDK0UmIpVRJ5Ok5B+Z5ELDcx2Eb+t1r2ova5j51ETxmfgIgEAOYHUDkTu67yC43vCZuUFWxjupEd111L0+pmcIxx3Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":709590},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./web":"./dist/web.js"},"gitHead":"8c32d405e2dc8a0c4dac5f9b85140bd690bdf5ba","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"adrianmaj","actor":{"name":"adrianmaj","type":"user","email":"adrianmaj1122@gmail.com"},"email":"adrianmaj1122@gmail.com"},"_npmVersion":"10.9.2","description":"Javascript library to display typebots on your website","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ky":"1.2.4","tsup":"8.5.0","marked":"9.0.3","postcss":"8.5.3","solid-js":"1.9.5","dompurify":"3.2.4","partysocket":"1.0.2","tailwindcss":"3.4.17","autoprefixer":"10.4.20","@ark-ui/solid":"5.11.0","solid-element":"1.9.1","@typebot.io/ui":"workspace:*","@typebot.io/env":"workspace:*","@typebot.io/lib":"workspace:*","@ai-sdk/ui-utils":"1.2.2","@typebot.io/logs":"workspace:*","@types/dompurify":"3.2.0","@stripe/stripe-js":"1.54.1","@typebot.io/theme":"workspace:*","@typebot.io/schemas":"workspace:*","@typebot.io/chat-api":"workspace:*","@typebot.io/settings":"workspace:*","@typebot.io/tsconfig":"workspace:*","esbuild-plugin-solid":"0.6.0","@typebot.io/rich-text":"workspace:*","@fix-webm-duration/fix":"1.0.1","@typebot.io/blocks-logic":"workspace:*","@typebot.io/blocks-inputs":"workspace:*","@typebot.io/zendesk-block":"workspace:*","@typebot.io/blocks-bubbles":"workspace:*","@tailwindcss/container-queries":"0.1.1","@typebot.io/blocks-integrations":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/typebot-js_0.8.7_1750424850034_0.02228436653127952","host":"s3://npm-registry-packages-npm-production"}},"0.8.8":{"name":"@adrianmaj/typebot-js","version":"0.8.8","description":"Javascript library to display typebots on your website","license":"FSL-1.1-ALv2","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":"./dist/index.js","./web":"./dist/web.js"},"scripts":{"typecheck":"tsc --noEmit","dev":"tsup --watch","build":"tsup"},"devDependencies":{"@ai-sdk/ui-utils":"1.2.2","@ark-ui/solid":"5.11.0","@fix-webm-duration/fix":"1.0.1","@stripe/stripe-js":"1.54.1","@tailwindcss/container-queries":"0.1.1","@typebot.io/blocks-bubbles":"workspace:*","@typebot.io/blocks-inputs":"workspace:*","@typebot.io/blocks-integrations":"workspace:*","@typebot.io/blocks-logic":"workspace:*","@typebot.io/chat-api":"workspace:*","@typebot.io/env":"workspace:*","@typebot.io/lib":"workspace:*","@typebot.io/logs":"workspace:*","@typebot.io/rich-text":"workspace:*","@typebot.io/schemas":"workspace:*","@typebot.io/settings":"workspace:*","@typebot.io/theme":"workspace:*","@typebot.io/tsconfig":"workspace:*","@typebot.io/ui":"workspace:*","@typebot.io/zendesk-block":"workspace:*","@types/dompurify":"3.2.0","autoprefixer":"10.4.20","dompurify":"3.2.4","esbuild-plugin-solid":"0.6.0","ky":"1.2.4","marked":"9.0.3","partysocket":"1.0.2","postcss":"8.5.3","solid-element":"1.9.1","solid-js":"1.9.5","tailwindcss":"3.4.17","tsup":"8.5.0"},"publishConfig":{"access":"public"},"_id":"@adrianmaj/typebot-js@0.8.8","gitHead":"8c32d405e2dc8a0c4dac5f9b85140bd690bdf5ba","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-GeEhOp9bhWOTLRxssKaZyyj0K+T9Ex1FYv4nrYtsjOCXCTQWGHfJ+UBlErJwKrp7bOrnSYNUEpbt1kO7k8K9cA==","shasum":"ad7ebd0d675a972cd65262cbb5e24dc9d1cf5ec6","tarball":"https://registry.npmjs.org/@adrianmaj/typebot-js/-/typebot-js-0.8.8.tgz","fileCount":5,"unpackedSize":709596,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDa2QD965pCLTrTnY3TP9EdbFpjWr2/i+RHXymJzRlJXgIgITKu7UYvzDQc++d6LyXIn3UHS9oIlXvTRF+3EjdnE3I="}]},"_npmUser":{"name":"adrianmaj","email":"adrianmaj1122@gmail.com","actor":{"name":"adrianmaj","email":"adrianmaj1122@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"adrianmaj","email":"adrianmaj1122@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typebot-js_0.8.8_1750425087132_0.546175597113939"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-18T10:05:26.868Z","modified":"2025-06-20T13:11:27.503Z","0.8.5":"2025-06-18T10:05:27.189Z","0.8.6":"2025-06-18T11:47:16.844Z","0.8.7":"2025-06-20T13:07:30.225Z","0.8.8":"2025-06-20T13:11:27.328Z"},"license":"FSL-1.1-ALv2","description":"Javascript library to display typebots on your website","maintainers":[{"name":"adrianmaj","email":"adrianmaj1122@gmail.com"}],"readme":"# Typebot JS library\n\nFrontend library to embed typebots from [Typebot](https://www.typebot.io/).\n\n## Installation\n\n### Using npm\n\nTo install, simply run:\n\n```bash\nnpm install @typebot.io/js\n```\n\n### Directly in your HTML\n\n```\n<script type=\"module\">\n  import Typebot from 'https://cdn.jsdelivr.net/npm/@typebot.io/js@0/dist/web.js'\n\n  Typebot.initStandard({\n    typebot: 'my-typebot',\n  })\n</script>\n\n<typebot-standard style=\"width: 100%; height: 600px; \"></typebot-standard>\n```\n\n## Standard\n\nYou can get the standard HTML and Javascript code by clicking on the \"HTML & Javascript\" button in the \"Share\" tab of your typebot.\n\nThere, you can change the container dimensions. Here is a code example:\n\n```html\n<script type=\"module\">\n  import Typebot from \"https://cdn.jsdelivr.net/npm/@typebot.io/js@0/dist/web.js\";\n\n  Typebot.initStandard({\n    typebot: \"my-typebot\",\n  });\n</script>\n\n<typebot-standard style=\"width: 100%; height: 600px; \"></typebot-standard>\n```\n\nThis code is creating a container with a 100% width (will match parent width) and 600px height.\n\n## Popup\n\nYou can get the popup HTML and Javascript code by clicking on the \"HTML & Javascript\" button in the \"Share\" tab of your typebot.\n\nHere is an example:\n\n```html\n<script type=\"module\">\n  import Typebot from \"https://cdn.jsdelivr.net/npm/@typebot.io/js@0/dist/web.js\";\n\n  Typebot.initPopup({\n    typebot: \"my-typebot\",\n    apiHost: \"http://localhost:3001\",\n    autoShowDelay: 3000,\n  });\n</script>\n```\n\nThis code will automatically trigger the popup window after 3 seconds.\n\n### Open or Close a popup\n\nYou can use these commands:\n\n```js\nTypebot.open();\n```\n\n```js\nTypebot.close();\n```\n\n```js\nTypebot.toggle();\n```\n\nYou can bind these commands on a button element, for example:\n\n```html\n<button onclick=\"Typebot.open()\">Contact us</button>\n```\n\n## Bubble\n\nYou can get the bubble HTML and Javascript code by clicking on the \"HTML & Javascript\" button in the \"Share\" tab of your typebot.\n\nHere is an example:\n\n```html\n<script type=\"module\">\n  import Typebot from \"https://cdn.jsdelivr.net/npm/@typebot.io/js@0/dist/web.js\";\n\n  Typebot.initBubble({\n    typebot: \"my-typebot\",\n    previewMessage: {\n      message: \"I have a question for you!\",\n      autoShowDelay: 5000,\n      avatarUrl: \"https://avatars.githubusercontent.com/u/16015833?v=4\",\n    },\n    theme: {\n      button: { backgroundColor: \"#0042DA\", iconColor: \"#FFFFFF\" },\n      previewMessage: { backgroundColor: \"#ffffff\", textColor: \"black\" },\n      chatWindow: { backgroundColor: \"#ffffff\" },\n    },\n  });\n</script>\n```\n\nThis code will show the bubble and let a preview message appear after 5 seconds.\n\n### Open or close the preview message\n\nYou can use these commands:\n\n```js\nTypebot.showPreviewMessage();\n```\n\n```js\nTypebot.hidePreviewMessage();\n```\n\n### Open or close the typebot\n\nYou can use these commands:\n\n```js\nTypebot.open();\n```\n\n```js\nTypebot.close();\n```\n\n```js\nTypebot.toggle();\n```\n\nYou can bind these commands on a button element, for example:\n\n```html\n<button onclick=\"Typebot.open()\">Contact us</button>\n```\n\n## Additional configuration\n\nYou can prefill the bot variable values in your embed code by adding the `prefilledVariables` option. Here is an example:\n\n```js\nTypebot.initStandard({\n  typebot: \"my-typebot\",\n  prefilledVariables: {\n    \"Current URL\": \"https://my-site/account\",\n    \"User name\": \"John Doe\",\n  },\n});\n```\n\nIt will prefill the `Current URL` variable with \"https://my-site/account\" and the `User name` variable with \"John Doe\". More info about variables: [here](/editor/variables).\n\nNote that if your site URL contains query params (i.e. https://typebot.io?User%20name=John%20Doe), the variables will automatically be injected to the typebot. So you don't need to manually transfer query params to the bot embed configuration.\n","readmeFilename":"README.md"}