{"_id":"@adamweiss/feedback-widget","_rev":"2-b76c843a8b69eaa24d171c520910413b","name":"@adamweiss/feedback-widget","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.2":{"name":"@adamweiss/feedback-widget","version":"0.1.2","_id":"@adamweiss/feedback-widget@0.1.2","maintainers":[{"name":"adamweiss","email":"adam.weiss@eistudio.ai"}],"dist":{"shasum":"418069aa5c627e719cfa55ab300e796a09bcf30c","tarball":"https://registry.npmjs.org/@adamweiss/feedback-widget/-/feedback-widget-0.1.2.tgz","fileCount":8,"integrity":"sha512-fJMQwpJ4Nin0SGKghMGO8VpZj/7dc3EKeKyyBTPBKlQ2dJMesELC14sIMrx4HFFlgxnda4X0b2Y0feunaTDgeQ==","signatures":[{"sig":"MEYCIQCmt6CkKL4lIMe0+Z+Ei3NslocKEx6rg/6QG9j/gQuSCwIhAMAuOSxivx/PHOVW0jj6eBZRsKy7PkE71piUWDWj1ITN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100277},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"7b1bd7b95fc9e9e13e4e068219851c2d0c054cba","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","prepare":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"adamweiss","email":"adam.weiss@eistudio.ai"},"_npmVersion":"11.9.0","description":"Drop-in floating feedback widget for React prototypes.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"html2canvas-pro":"^1.6.7"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","jsdom":"^29.0.2","react":"^19.1.0","vitest":"^4.1.5","react-dom":"^19.1.0","typescript":"^5.6.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/feedback-widget_0.1.2_1778097217138_0.7684673362009915","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@adamweiss/feedback-widget","version":"0.1.3","description":"Drop-in floating feedback widget for React prototypes.","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepare":"tsup"},"peerDependencies":{"react":">=18","react-dom":">=18"},"dependencies":{"html2canvas-pro":"^1.6.7"},"devDependencies":{"@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","jsdom":"^29.0.2","react":"^19.1.0","react-dom":"^19.1.0","tsup":"^8.3.0","typescript":"^5.6.0","vitest":"^4.1.5"},"gitHead":"7b1bd7b95fc9e9e13e4e068219851c2d0c054cba","_id":"@adamweiss/feedback-widget@0.1.3","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-IXb+wpnDnfAze9cNezKKDCdUt8E+i4A0RZGNZBjOCH6uWjNOfpcgzSLlffA7iCA+dWv4yNaBxRLf7E7jIgkwlQ==","shasum":"a822cf5503a793001dd15c7305fe86473cc16a7a","tarball":"https://registry.npmjs.org/@adamweiss/feedback-widget/-/feedback-widget-0.1.3.tgz","fileCount":8,"unpackedSize":100277,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHcPg0AQD/C6k5vOC8VMhLcHOVSK5xU0PbPc0bn18UOgIhAMA2F9QmH2g67KFLTsd5P8uBy4nC+IDzganLVV3f9ZP3"}]},"_npmUser":{"name":"adamweiss","email":"adam.weiss@eistudio.ai"},"directories":{},"maintainers":[{"name":"adamweiss","email":"adam.weiss@eistudio.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/feedback-widget_0.1.3_1778097523860_0.25072742623291755"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-06T19:53:37.083Z","modified":"2026-05-06T19:58:44.123Z","0.1.2":"2026-05-06T19:53:37.328Z","0.1.3":"2026-05-06T19:58:44.002Z"},"description":"Drop-in floating feedback widget for React prototypes.","maintainers":[{"name":"adamweiss","email":"adam.weiss@eistudio.ai"}],"readme":"# @dnosaj/feedback-widget\n\nDrop-in floating feedback widget for React prototypes. Single `<FeedbackWidget />` component, shadow-DOM isolated, talks to the `feedback-service` backend at a URL you provide.\n\n## Install\n\n```bash\nnpm install github:studioEIGen/feedback-widget\n# or pin to a tag:\nnpm install github:studioEIGen/feedback-widget#v0.1.0\n```\n\n## Use\n\n```tsx\n// app/layout.tsx (Next.js App Router)\nimport { FeedbackWidget } from \"@dnosaj/feedback-widget\";\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n  return (\n    <html>\n      <body>\n        {children}\n        <FeedbackWidget\n          projectSlug=\"report-analyzer\"\n          apiUrl={process.env.NEXT_PUBLIC_FEEDBACK_API_URL}\n          userName={session?.user?.name}           // optional\n          hideOnPaths={[\"/login\", \"/legal\"]}       // optional\n        />\n      </body>\n    </html>\n  );\n}\n```\n\n### `.env.local`\n\n```\nNEXT_PUBLIC_FEEDBACK_API_URL=https://your-feedback-service.vercel.app\n```\n\n## Props\n\n| Prop | Type | Required | Notes |\n|---|---|---|---|\n| `projectSlug` | string | yes | Must match a row in the service's `projects` table. |\n| `apiUrl` | string | at least one | Overrides `NEXT_PUBLIC_FEEDBACK_API_URL`. |\n| `userName` | string | no | Pre-fills the name field. Overrides localStorage + URL param. |\n| `hideOnPaths` | string[] | no | Suppress the pill on these paths. |\n| `position` | `\"bottom-right\"` \\| `\"bottom-left\"` | no | Default `bottom-right`. |\n| `onSubmit` | `(fb) => void` | no | Called after successful submit. |\n\n## Connecting a new prototype\n\n1. Go to the [Feedback Admin](https://feedback-service-nu.vercel.app/admin) and click **+** next to the project dropdown.\n2. Enter a name — the slug auto-generates (this is what you pass to `projectSlug`). Hit **Create project**.\n3. Copy the env var snippet and add it to your prototype's `.env.local`:\n   ```\n   NEXT_PUBLIC_FEEDBACK_API_URL=https://feedback-service-nu.vercel.app\n   ```\n4. Add the widget to your layout with the slug from step 2:\n   ```tsx\n   <FeedbackWidget projectSlug=\"your-slug\" apiUrl={process.env.NEXT_PUBLIC_FEEDBACK_API_URL} />\n   ```\n\nThat's it. The project accepts submissions from any origin by default — no extra configuration needed.\n\n> **Tip:** After creating the project, double-check the slug in the admin dropdown or in Supabase → projects table. If the project name had a trailing space, the slug may end with a dash (e.g. `my-project-`). Fix it in the table before wiring up the widget, or you'll get a 404 \"unknown_project\" error on submit.\n\n## What's captured\n\nEvery submission includes: page URL, page path, viewport size, user-agent, timestamp, plus the text + category + optional screenshot.\n\n## Keyboard shortcuts\n\n- `⌘⇧F` / `Ctrl⇧F` toggles the panel\n- `Esc` closes it\n\n## Deferred to stage 2\n\n- Pen/arrow annotation on screenshots\n- Voice capture + transcription\n- Three capture modes (anonymous / session pseudonyms / QR handoff)\n- Claude Code auto-plan pipeline\n\nSee the design spec for the full roadmap.\n","readmeFilename":"README.md"}