{"_id":"@bodhi_lab/bodhi-widget","name":"@bodhi_lab/bodhi-widget","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bodhi_lab/bodhi-widget","version":"0.1.0","private":false,"description":"React components for embedding hosted Bodhi agents and widgets","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"sideEffects":false,"publishConfig":{"access":"public"},"license":"MIT","dependencies":{"@bodhi_lab/bodhi-sdk-core":"0.1.0","@bodhi_lab/bodhi-web-sdk":"0.1.0"},"peerDependencies":{"react":">=18","react-dom":">=18"},"devDependencies":{"@types/react":"^19.2.14","@types/react-dom":"^19.2.3","react":"^19.2.4","react-dom":"^19.2.4","tsup":"^8.4.0","typescript":"^5.7.0","vitest":"^3.0.0"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@bodhi_lab/bodhi-widget@0.1.0","_integrity":"sha512-BPsQL5Jyb0uprGewglaY8AnTv8TH6sKK76g4RIlfmOVxKoSyKYcDtpB1sUDGhHDTH1XEOlHkSzG3GtOtdKSXrg==","_resolved":"/private/var/folders/x3/fz4m80xx1hbd41v2ylhmqh0r0000gn/T/f4541bd26e18edf74a85cbf2b4fd4d3f/bodhi_lab-bodhi-widget-0.1.0.tgz","_from":"file:bodhi_lab-bodhi-widget-0.1.0.tgz","_nodeVersion":"23.11.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-BPsQL5Jyb0uprGewglaY8AnTv8TH6sKK76g4RIlfmOVxKoSyKYcDtpB1sUDGhHDTH1XEOlHkSzG3GtOtdKSXrg==","shasum":"d21c96358965c801735639b487f7008cc346e5db","tarball":"https://registry.npmjs.org/@bodhi_lab/bodhi-widget/-/bodhi-widget-0.1.0.tgz","fileCount":8,"unpackedSize":34394,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAIHriyXs5kVrfnEuTFH4whJOvxxfXSNrSjGldDr93NcAiEA6IqW0tEDJtvJbmP9EdA5SHlaZxwqt0MWmaxrMc2QCJE="}]},"_npmUser":{"name":"bodhi_lab","email":"bodhiagent@gmail.com"},"directories":{},"maintainers":[{"name":"bodhi_lab","email":"bodhiagent@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bodhi-widget_0.1.0_1777676068706_0.4950514563957633"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-01T22:54:28.597Z","0.1.0":"2026-05-01T22:54:28.848Z","modified":"2026-05-01T22:54:29.095Z"},"maintainers":[{"name":"bodhi_lab","email":"bodhiagent@gmail.com"}],"description":"React components for embedding hosted Bodhi agents and widgets","license":"MIT","readme":"# @bodhi_lab/bodhi-widget\n\nSmall React components for embedding hosted Bodhi agents and widgets.\n\n## Scope\n\nThis package does **not** ship agent runtime logic.\n\nIt only:\n\n- calls your existing Bodhi API\n- creates a short-lived embed session\n- renders the hosted `/embed/avatar` iframe\n\n## Components\n\n- `BodhiWidgetFrame` for published `wg_*` widgets\n- `BodhiAgentFrame` for saved `ua_*` agents\n\n## Example: published widget\n\n```tsx\nimport { BodhiWidgetFrame } from '@bodhi_lab/bodhi-widget';\n\nexport function Demo() {\n  return (\n    <BodhiWidgetFrame\n      apiBaseUrl=\"https://YOUR_BODHI_API_ORIGIN\"\n      webBaseUrl=\"https://YOUR_BODHI_WEB_ORIGIN\"\n      widgetId=\"wg_0123456789abcdef\"\n      style={{ minHeight: 720 }}\n    />\n  );\n}\n```\n\n## Example: saved agent\n\n```tsx\nimport { BodhiAgentFrame } from '@bodhi_lab/bodhi-widget';\n\nexport function Demo() {\n  return (\n    <BodhiAgentFrame\n      apiBaseUrl=\"https://YOUR_BODHI_API_ORIGIN\"\n      webBaseUrl=\"https://YOUR_BODHI_WEB_ORIGIN\"\n      agentProfile=\"ua_0123456789abcdef\"\n      authToken=\"YOUR_AUTH_TOKEN\"\n    />\n  );\n}\n```\n\n## Zero-build script install\n\nFor plain script-tag installs, keep using the hosted `bodhi-widget.js` from your Bodhi web app.\n","readmeFilename":"README.md","_rev":"1-7f5a14bcf030422c26e802866bbeb39d"}