{"_id":"@arunselvakumar/ai","_rev":"3-8060c4b68682261de1a945e30ee4df57","name":"@arunselvakumar/ai","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@arunselvakumar/ai","version":"0.1.0","license":"UNLICENSED","_id":"@arunselvakumar/ai@0.1.0","maintainers":[{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"}],"dist":{"shasum":"e34e048f8749b8dff675562f118cd3fa7bbfa58f","tarball":"https://registry.npmjs.org/@arunselvakumar/ai/-/ai-0.1.0.tgz","fileCount":10,"integrity":"sha512-Nl1lBN4L0b7Ym3NwlAyj1HSW7BmrFS5eNbkMSeijC2W2StFWHgcG3V8q4Hv/606YM4GTclDsxMCaNDH53nLPhA==","signatures":[{"sig":"MEYCIQCjkxG2z//tf9N1Q4nTjpwIMPrJYE9tadU3MFKpFsNx9AIhAJmYwbSt+pbEfq22A6x9dudc/oGWeRw7a/jcMZFOynS2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1051421},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cdn":"./dist/qwai.iife.js"},"scripts":{"dev":"vite","lint":"eslint .","build":"bun run typecheck && bun run build:npm && bun run build:cdn","format":"prettier --write .","lint:fix":"eslint . --fix","build:cdn":"vite build --config vite.config.cdn.ts","build:npm":"vite build --config vite.config.npm.ts","typecheck":"tsc -b","format:check":"prettier --check ."},"_npmUser":{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"},"_npmVersion":"11.6.2","description":"Embeddable AI-UI components for React applications and non-React hosts.","directories":{},"sideEffects":false,"_nodeVersion":"25.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"8.0.13","react":"19.2.6","eslint":"10.4.0","globals":"17.6.0","prettier":"3.8.3","react-dom":"19.2.6","@eslint/js":"10.0.1","typescript":"6.0.3","@types/node":"25.9.0","tailwindcss":"4.3.0","@types/react":"19.2.14","vite-plugin-dts":"5.0.1","@types/react-dom":"19.2.3","@tailwindcss/vite":"4.3.0","typescript-eslint":"8.59.4","@vitejs/plugin-react":"6.0.2","eslint-config-prettier":"10.1.8","eslint-plugin-react-hooks":"7.1.1","eslint-plugin-react-refresh":"0.5.2"},"peerDependencies":{"react":"^19","react-dom":"^19"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.0_1779188322524_0.6438332372954125","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arunselvakumar/ai","version":"0.2.0","license":"UNLICENSED","_id":"@arunselvakumar/ai@0.2.0","maintainers":[{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"}],"dist":{"shasum":"413949ee5af141800de0934db2eace3bb2bb4d97","tarball":"https://registry.npmjs.org/@arunselvakumar/ai/-/ai-0.2.0.tgz","fileCount":12,"integrity":"sha512-YWaB+D6so0z/Gh/2FsiIav+Ho7nwu1pBSpR+ctsWkV9Mqofp4ZzjTrnL56qfqHjW3lpoPNoG8YWxOf4Fh1z5fQ==","signatures":[{"sig":"MEQCIBwJBekZgSpsrDaZD07wOLdVWsJ+EqGa+wu4vqBtur1XAiB1raWfdP+VIX0tls/9U0bNwoCI3YQ2v9Eh23H7yjBawg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1065199},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cdn":"./dist/qwai.iife.js"},"scripts":{"dev":"vite","lint":"eslint .","build":"bun run typecheck && bun run build:npm && bun run build:cdn","format":"prettier --write .","lint:fix":"eslint . --fix","build:cdn":"vite build --config vite.config.cdn.ts","build:npm":"vite build --config vite.config.npm.ts","typecheck":"tsc -b","format:check":"prettier --check ."},"_npmUser":{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"},"_npmVersion":"11.6.2","description":"Embeddable AI-UI components for React applications and non-React hosts.","directories":{},"sideEffects":false,"_nodeVersion":"25.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"8.0.13","react":"19.2.6","eslint":"10.4.0","globals":"17.6.0","prettier":"3.8.3","react-dom":"19.2.6","@eslint/js":"10.0.1","typescript":"6.0.3","@types/node":"25.9.0","tailwindcss":"4.3.0","@types/react":"19.2.14","vite-plugin-dts":"5.0.1","@types/react-dom":"19.2.3","@tailwindcss/vite":"4.3.0","typescript-eslint":"8.59.4","@vitejs/plugin-react":"6.0.2","eslint-config-prettier":"10.1.8","eslint-plugin-react-hooks":"7.1.1","eslint-plugin-react-refresh":"0.5.2"},"peerDependencies":{"react":"^19","react-dom":"^19"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.2.0_1779690901450_0.8536920552694902","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@arunselvakumar/ai","version":"0.3.0","description":"Embeddable AI-UI components for React applications and non-React hosts.","type":"module","license":"UNLICENSED","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./cdn":"./dist/qwai.iife.js"},"publishConfig":{"access":"public"},"scripts":{"dev":"vite","typecheck":"tsc -b","build:npm":"vite build --config vite.config.npm.ts","build:cdn":"vite build --config vite.config.cdn.ts","build":"bun run typecheck && bun run build:npm && bun run build:cdn","lint":"eslint .","lint:fix":"eslint . --fix","format":"prettier --write .","format:check":"prettier --check ."},"peerDependencies":{"react":"^19","react-dom":"^19"},"devDependencies":{"@eslint/js":"10.0.1","@tailwindcss/vite":"4.3.0","@types/node":"25.9.0","@types/react":"19.2.14","@types/react-dom":"19.2.3","@vitejs/plugin-react":"6.0.2","eslint":"10.4.0","eslint-config-prettier":"10.1.8","eslint-plugin-react-hooks":"7.1.1","eslint-plugin-react-refresh":"0.5.2","globals":"17.6.0","prettier":"3.8.3","react":"19.2.6","react-dom":"19.2.6","tailwindcss":"4.3.0","typescript":"6.0.3","typescript-eslint":"8.59.4","vite":"8.0.13","vite-plugin-dts":"5.0.1"},"_id":"@arunselvakumar/ai@0.3.0","_nodeVersion":"25.2.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-OM3pfFhfiEyZiR8Mw5eJAPXqFyKxtNY142bA4UBp9N5yLNJ3CGN7We8DI1H/LyjH9/F9oj3ZItOyswztath0XA==","shasum":"121eda9f10b8089969232f8e78655b184965963e","tarball":"https://registry.npmjs.org/@arunselvakumar/ai/-/ai-0.3.0.tgz","fileCount":12,"unpackedSize":1065277,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAO/MZdGUSgdNu/QAR4MyJD6erKswy9Lr6aXjJTnMyG2AiEAyX/Ac0O4gpDhphG/bsB14uIFV7GgDWzDUpL6qclPG6s="}]},"_npmUser":{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"},"directories":{},"maintainers":[{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai_0.3.0_1779702864209_0.13307951832678633"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T10:58:42.426Z","modified":"2026-05-25T09:54:24.458Z","0.1.0":"2026-05-19T10:58:42.678Z","0.2.0":"2026-05-25T06:35:01.670Z","0.3.0":"2026-05-25T09:54:24.348Z"},"license":"UNLICENSED","description":"Embeddable AI-UI components for React applications and non-React hosts.","maintainers":[{"name":"arunselvakumar","email":"b.arunselvakumar@gmail.com"}],"readme":"# @quantumworkplace/ai\n\nEmbeddable AI-UI components, published once and consumed two ways:\n\n- **NPM Consumer** — a React app installs the package and renders components in\n  its own tree.\n- **CDN Consumer** — a non-React host (e.g. a .NET MVC app) loads one script and\n  mounts components via `window.qwai.render()`.\n\nSee [`CONTEXT.md`](./CONTEXT.md) for terminology and [`docs/adr/`](./docs/adr)\nfor the architectural decisions behind the dual-distribution design.\n\n## Requirements\n\n- [Bun](https://bun.sh) 1.3+\n\n## Development\n\n```sh\nbun install\nbun run dev          # Vite playground — exercises both consumption paths\nbun run typecheck    # tsc, no emit\nbun run lint         # ESLint\nbun run format       # Prettier (writes)\nbun run build        # typecheck + NPM build + CDN build → dist/\n```\n\n`bun run build` produces two artifacts in `dist/`:\n\n| File           | Consumer | Format | React           |\n| -------------- | -------- | ------ | --------------- |\n| `index.js`     | NPM      | ESM    | peer dependency |\n| `qwai.iife.js` | CDN      | IIFE   | bundled in      |\n\nType declarations (`index.d.ts` + friends) ship with the NPM build.\n\n## Consuming from a React app\n\nReact 19 is a peer dependency.\n\n```sh\nnpm install @quantumworkplace/ai\n```\n\n```tsx\nimport { HelloWorld } from '@quantumworkplace/ai';\n\nexport function Page() {\n  return <HelloWorld name=\"Arun\" />;\n}\n```\n\nStyles are injected automatically on mount — there is no CSS file to import.\n\n## Consuming from a .NET MVC page\n\nThe CDN build is a single self-contained file. The component renders inside a\nshadow root, so its styles are isolated from the page.\n\n```html\n<div id=\"qwai-hello\"></div>\n\n<!-- Replace the URL once the CDN host is decided -->\n<script src=\"https://YOUR_CDN/@quantumworkplace/ai@0.1.0/qwai.iife.js\"></script>\n<script>\n  qwai.render('qwai-hello', { name: '@Model.UserName' });\n</script>\n```\n\n`qwai.render(target, props)` accepts an element id or an `Element`.\n`qwai.unmount(target)` tears it down.\n\n## Publishing (manual, v0.1)\n\n1. Ensure the `@quantumworkplace` scope exists on npm and you are logged in\n   (`npm login`).\n2. Bump `version` in `package.json`.\n3. Build and publish:\n\n   ```sh\n   bun run build\n   npm publish\n   ```\n\n   `publishConfig.access` is set to `public`, so no `--access` flag is needed.\n   Only `dist/` is published (see the `files` field).\n\n## Project layout\n\n```\nsrc/\n  index.ts                  NPM entry — exports components\n  cdn.tsx                   CDN entry — defines window.qwai\n  components/HelloWorld/     the v0.1 component\n  lib/injectStyles.ts        CSS injection (document head or shadow root)\n  styles/tailwind.css        Tailwind v4, prefixed `tw:`, no preflight\nplayground/                  Vite dev playground\nvite.config.ts               dev playground config\nvite.config.npm.ts           NPM build config\nvite.config.cdn.ts           CDN build config\n```\n","readmeFilename":"README.md"}