{"_id":"@boostbossai/lumi-browser","name":"@boostbossai/lumi-browser","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@boostbossai/lumi-browser","version":"0.1.0","description":"Lumi for Browser App runtime SDK — Boost Boss's ad placements as an importable npm module. Same renderer as the JS snippet, with brand kit + voucher endcards from your Creatives library.","main":"./src/index.js","types":"./src/index.d.ts","type":"module","exports":{".":{"types":"./src/index.d.ts","import":"./src/index.js","default":"./src/index.js"}},"license":"Apache-2.0","author":{"name":"Boost Boss","email":"hello@boostboss.ai","url":"https://boostboss.ai"},"homepage":"https://boostboss.ai/publish/web","repository":{"type":"git","url":"git+https://github.com/BoostBoss-AI/boostboss.git","directory":"packages/lumi-browser"},"bugs":{"url":"https://github.com/BoostBoss-AI/boostboss/issues","email":"hello@boostboss.ai"},"keywords":["boost-boss","lumi","ads","ad-network","browser","web","ai-app","monetization","sponsored-content"],"engines":{"node":">=18"},"gitHead":"744b5e241262010498eb8410ae6e9ced604beb5c","_id":"@boostbossai/lumi-browser@0.1.0","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-lRg7jpYN5vMZWpFNmRoXOzNxr3H2stjG25MgSnrACG9Sh+nkjXUilZq9kCAEPhkyaZ6y89mW38FrE+hbywD0Tw==","shasum":"879dda3613d716610d8d80cb3b73aaa90e2288a4","tarball":"https://registry.npmjs.org/@boostbossai/lumi-browser/-/lumi-browser-0.1.0.tgz","fileCount":4,"unpackedSize":13709,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDkQhZdzdH2XzkgBdiBIP9w3O2WZsH8ajkpWurTGfrNewIgXf/1Kmfr3uz/EjpXkszOG9yfHmYgVmwDr0GRw1f0gXk="}]},"_npmUser":{"name":"boostboss","email":"admin@boostboss.ai"},"directories":{},"maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lumi-browser_0.1.0_1782378232075_0.9435071475309484"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T09:03:51.890Z","0.1.0":"2026-06-25T09:03:52.209Z","modified":"2026-06-25T09:03:52.415Z"},"maintainers":[{"name":"boostboss","email":"admin@boostboss.ai"}],"description":"Lumi for Browser App runtime SDK — Boost Boss's ad placements as an importable npm module. Same renderer as the JS snippet, with brand kit + voucher endcards from your Creatives library.","homepage":"https://boostboss.ai/publish/web","keywords":["boost-boss","lumi","ads","ad-network","browser","web","ai-app","monetization","sponsored-content"],"repository":{"type":"git","url":"git+https://github.com/BoostBoss-AI/boostboss.git","directory":"packages/lumi-browser"},"author":{"name":"Boost Boss","email":"hello@boostboss.ai","url":"https://boostboss.ai"},"bugs":{"url":"https://github.com/BoostBoss-AI/boostboss/issues","email":"hello@boostboss.ai"},"license":"Apache-2.0","readme":"# @boostbossai/lumi-browser\n\nBrowser App door runtime for the [Boost Boss](https://boostboss.ai) ad network.\n\nThis package is for publishers using bundlers (Vite, Webpack, Next.js, etc.) who would rather `import` the Lumi runtime than paste a `<script>` tag. Same renderer, same auction backend, same 8 placements as the JS snippet integration — just consumed as an npm module.\n\n## Install\n\n```bash\nnpm install @boostbossai/lumi-browser\n```\n\n## Quick start\n\n```js\nimport { init, render } from '@boostbossai/lumi-browser';\n\n// Boot once at app startup.\nawait init({ publisherId: 'pub_xxxxxxxxxxxx' });\n\n// Auto-discovery picks up any element with data-lumi-slot.\n// For dynamically-rendered slots (React, Vue, Svelte), call render():\nconst slot = document.querySelector('#my-ad-slot');\nrender(slot, { format: 'card', context: 'reading list' });\n```\n\n## React example\n\n```jsx\nimport { useEffect, useRef } from 'react';\nimport { init, render, destroy } from '@boostbossai/lumi-browser';\n\nexport function SponsoredCard({ context }) {\n  const slotRef = useRef(null);\n\n  useEffect(() => {\n    init({ publisherId: process.env.NEXT_PUBLIC_BB_PUBLISHER_ID });\n  }, []);\n\n  useEffect(() => {\n    if (!slotRef.current) return;\n    render(slotRef.current, { format: 'card', context });\n    return () => destroy();\n  }, [context]);\n\n  return <div ref={slotRef} />;\n}\n```\n\n## Conversion tracking\n\nSame shape as the `bbq.push('track', ...)` JS-snippet API:\n\n```js\nimport { trackConversion } from '@boostbossai/lumi-browser';\n\nawait trackConversion({\n  type: 'signup',\n  value: 29.99,\n  currency: 'USD',\n});\n```\n\n## Events\n\n```js\nimport { on } from '@boostbossai/lumi-browser';\n\nconst unsubscribe = on('impression', (detail) => {\n  console.log('impression fired', detail);\n});\n\n// Later:\nunsubscribe();\n```\n\nAvailable events: `ready` · `no_fill` · `error` · `impression` · `click` · `close`.\n\n## Placements\n\nThe Browser App door covers 8 placements:\n\n| Format | Where it renders |\n|---|---|\n| `corner` | Sticky floating unit, bottom-right |\n| `card` | Inline sponsored card with optional image |\n| `citation` | Compact sponsored source inline in answers |\n| `chip` | Suggested-action pill |\n| `hero` | Empty-state hero (full-width) |\n| `loading` | Loading-state ad shown while AI generates |\n| `settings` | Settings / preferences page slot |\n| `interstitial` | Page interstitial |\n\nWhen the advertiser has filled their Creatives library, every placement automatically renders the brand kit (logo + \"Sponsored by ...\") and any voucher endcard.\n\n## How it works\n\n`init()` dynamically loads `https://boostboss.ai/lumi.js` with your config. The script handles auction requests, frequency capping, intersection-observer impression tracking, and DOM rendering. Updates to the renderer auto-propagate — no need to bump this package every time the script changes.\n\nIf you'd rather host the script yourself, set `apiBase` to your own origin in `init()`.\n\n## Alternatives by door\n\n| Door | Package |\n|---|---|\n| Browser App | `@boostbossai/lumi-browser` (this) |\n| Browser Extension | `@boostbossai/lumi-extension` |\n| Computer App | `@boostbossai/install-desktop` (installer; reuses lumi-extension runtime) |\n| Mobile App | `@boostbossai/lumi-mobile` |\n\n## Docs\n\n- [Web SDK reference](https://boostboss.ai/docs/web)\n- [Creatives library](https://boostboss.ai/docs/creatives)\n- [Publisher dashboard](https://boostboss.ai/publish)\n\nApache 2.0 © Boost Boss\n","readmeFilename":"README.md","_rev":"1-1500a0329c836aa6f8aee22ddfd29a6b"}