{"_id":"@peristyle/grocery-cart-widget","_rev":"8-fa3510ad33a43895109648db44d142ef","name":"@peristyle/grocery-cart-widget","dist-tags":{"latest":"0.7.2"},"versions":{"0.1.0":{"name":"@peristyle/grocery-cart-widget","version":"0.1.0","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.1.0","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"5bdef7dd6a37910691a06797b0081e136f816cb9","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.1.0.tgz","fileCount":7,"integrity":"sha512-KSjXGJYb9kdF9T9JF35PXN7ytDBvlGKeD1m2L27pMcascgpj63oFuEez9pDdLxJNFl7CXLUq6NOA1WHlmHv5Jw==","signatures":[{"sig":"MEQCIFcw/psWTXVEt4Wkb+Ib4mJfBgV4UIcErKhiqv+rNB49AiAAxxAe1IoRi8C9x9sHCYairnrvylhwMUGdOYg0SFXrrQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63219},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"27b6674057c270094124ed74451acad1b6256029","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","build":"tsup --config tsup.widget.config.ts && tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","emdash":"^0.22.0","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.1.0_1784411709260_0.05719297391847977","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@peristyle/grocery-cart-widget","version":"0.2.0","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.2.0","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"e332d338e8e26b7952fef7106321af6072541462","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.2.0.tgz","fileCount":7,"integrity":"sha512-tQLuoLbBr68aDHI2iAh6Hl1jmlhYNq+GwGX8G2XCRNPl1deVCCWjOsdrSOs1YMFSL+mib5e6jwgTEG0DNyvygA==","signatures":[{"sig":"MEUCIQCRwEfzZm3LNCcNBdv19G019x06x9ZLvorRz/c5MuDz8wIgcahyp+G8Gsu4zIu2c1kIrW0Rdi3kIYDVAoqzNqWQhvY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64064},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"abb287f65c6eef1cc80c0db3fb421843f38822fb","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","build":"tsup --config tsup.widget.config.ts && tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","emdash":"^0.22.0","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.2.0_1784419341100_0.9293678491218802","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@peristyle/grocery-cart-widget","version":"0.5.0","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.5.0","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"9facfe8944dc7df740cbd6941762fae9eb0c3e96","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.5.0.tgz","fileCount":9,"integrity":"sha512-nOJj3oaiPXuWeqptSODP1B85v93OPy3eD7tyu2qsXM5v3XUg2kCm2d+kT1DQ6Ow0Fouh7YV2Bx/FcdD8YJZK3A==","signatures":[{"sig":"MEYCIQDpnWNCg6E3QqfPUJxiwKbdPainGMCVGBEBWqBB/FdpewIhALEEsn4bwky47mpCq6MdiUJIXEXllrqf+bDPklGtTGCi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52717},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"c8b7e8cbb95a2b3e49d541a447cf35588fbbee60","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.5.0_1784574926190_0.46634563151013486","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@peristyle/grocery-cart-widget","version":"0.6.0","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.6.0","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"da65590d543154284acf9d1603322d8a8960d315","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.6.0.tgz","fileCount":9,"integrity":"sha512-3qUB0I0Ozp14xX1n4m6o+CjZp6qVV48NQZbml6yZaftI8/cL/dGWqOiZ1I7r5tdlRz/E+WwBfdQ9FhxNDxr/CA==","signatures":[{"sig":"MEUCIQCWNCcZleOKVpder28bK6x05UDpj/Wtu7kLiWFHo74wKwIgSm9xQUFXAJ31tJFjGrmoO59EOjmV9IiKNaC9KvscOgs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53131},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"3bc12f761468f388419065806a5847285fdb068e","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.6.0_1784645437538_0.7408148938866601","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@peristyle/grocery-cart-widget","version":"0.6.1","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.6.1","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"f7c646fea6b51ea1e30f5ca8f9540c30f82ea5d3","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.6.1.tgz","fileCount":9,"integrity":"sha512-8HduCRttbZxfPcV97C03eUcQco8b4eBCG5Xjk/bFTsTm3Om307HwnCBcYFI+YeyS3/CewtXmEvYHQD7/oDcngQ==","signatures":[{"sig":"MEQCIGBzBK0+TqUuq7pi3YxAGI23K8z1MReCncEu3rnFIK7+AiB6WGSPsyEJKJRhueroNxB+md53hWkSINuCBrbcjS4xfw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55596},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"41a98f71711c826b98f3a076962e513587c016ae","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.6.1_1784761194277_0.3782355860420721","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@peristyle/grocery-cart-widget","version":"0.7.0","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.7.0","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"6e8a9ed33c3c1030edd0941f811bee58e999f261","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.7.0.tgz","fileCount":9,"integrity":"sha512-hhgBYb7/nK8BnBRX04FOaEuFFnXHNkN2mtBjKEZed552Fghk2hmBehchNWh3J/6uUCGb5f9xkIsbRNbaMDBH9A==","signatures":[{"sig":"MEYCIQDecp6Hrb3spOKPuptJQGfc4GhqECoTEg3WMKEX43fAQgIhAIR3TGdLziH9MgLDD15r6jeAjWNIG10oqm0ERK1BBQOo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66129},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"44e2c585e89fbcbc9be37d9ef0f9c6743b8f7692","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs && node tests/embed-geometry.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","test:browser":"node tests/embed-browser.test.mjs","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.22.0","devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","playwright":"^1.62.1","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.7.0_1786321977843_0.5590376712827623","host":"s3://npm-registry-packages-npm-production"}},"0.7.1":{"name":"@peristyle/grocery-cart-widget","version":"0.7.1","keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_id":"@peristyle/grocery-cart-widget@0.7.1","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"dist":{"shasum":"8396c08fb323361ba3f3a00bfc6fb813bce22d04","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.7.1.tgz","fileCount":9,"integrity":"sha512-h89PvT9HidE97ri1DDiPiOWmZJArAK4DEzo05rI724jwuhAkLvL0E5sHpkwnydCAmlE/DIa1JHTn15XSOUn74g==","signatures":[{"sig":"MEUCIQC92sNsf3ticze5GT4y3dymUt/JMEJpZscQyqge1xq5hAIgC4SSSHUvt7fY0t9hNkqnnW0OQKWeQjXYqTYaVHGX4nc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67095},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"5909b9927b35b421cc32af5f1b5bb25d901cdaca","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs && node tests/embed-geometry.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","test:browser":"node tests/embed-browser.test.mjs","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.22.0","devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","playwright":"^1.62.1","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"tmp":"tmp/grocery-cart-widget_0.7.1_1787321315563_0.9815358661898723","host":"s3://npm-registry-packages-npm-production"}},"0.7.2":{"_id":"@peristyle/grocery-cart-widget@0.7.2","dist":{"shasum":"153ac23ad494669cad2412000ca38b1a682d5f22","tarball":"https://registry.npmjs.org/@peristyle/grocery-cart-widget/-/grocery-cart-widget-0.7.2.tgz","fileCount":9,"integrity":"sha512-DWvuxsdoCuuO8+0BB+eCIZYFz69XuJJG6xnAUbpyJxQBKMhVnManJueljBxLymouoR0UYxarUMH+gLiwU5KCag==","signatures":[{"sig":"MEYCIQD7h6+y+XM/gyOobedKkuiJF3PivbuTbH6bo9vfEc6mRAIhAOuiyEBT4JTr5jj23no4tZQZ8dvdMMR3KLy+hN9DGgUE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGjKrsCRoSKwx7aW4PdCtv49tC2wfWx2nrpjOC6j/ScmAiEA9XxVYx1/9Y6MCMfq/hsStIrmkoel7N7czANVaTPoZL8="}],"unpackedSize":67130},"name":"@peristyle/grocery-cart-widget","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sandbox":{"types":"./dist/sandbox-entry.d.ts","import":"./dist/sandbox-entry.js"}},"gitHead":"7b4c4b4bd768a04338aec41db6a3e8ca1b0267b1","scripts":{"dev":"tsup --config tsup.widget.config.ts && tsup --watch","test":"node tests/widget-flows.test.cjs && node tests/embed-geometry.test.cjs","build":"tsup --config tsup.widget.config.ts && tsup","sync:api":"cp dist/widget.iife.js ../../products/peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js","typecheck":"tsc --noEmit","test:browser":"node tests/embed-browser.test.mjs","prepublishOnly":"npm run typecheck && npm run build && npm run test"},"version":"0.7.2","_npmUser":{"name":"thehedges","email":"kthedges23@gmail.com"},"keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"_npmVersion":"11.6.2","description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","directories":{},"maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.22.0","devDependencies":{"tsup":"^8.0.0","jsdom":"^29.1.1","emdash":"^0.22.0","playwright":"^1.62.1","typescript":"^5.0.0"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.22.0 <1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/grocery-cart-widget_0.7.2_1790803740729_0.5227556312386326"}}},"time":{"created":"2026-07-18T21:55:09.137Z","modified":"2026-09-30T21:29:00.980Z","0.1.0":"2026-07-18T21:55:09.386Z","0.2.0":"2026-07-19T00:02:21.243Z","0.5.0":"2026-07-20T19:15:26.386Z","0.6.0":"2026-07-21T14:50:37.732Z","0.6.1":"2026-07-22T22:59:54.415Z","0.7.0":"2026-08-10T00:32:57.988Z","0.7.1":"2026-08-21T14:08:35.716Z","0.7.2":"2026-09-30T21:29:00.813Z"},"keywords":["emdash","emdash-plugin","recipes","grocery","peristyle"],"description":"Chat, recipe search, and one-click ingredient ordering (Kroger/Walmart via Peristyle) for EmDash-powered food blogs","maintainers":[{"name":"thehedges","email":"kthedges23@gmail.com"}],"readme":"# @peristyle/grocery-cart-widget\n\nAn [EmDash CMS](https://emdashcms.com) plugin that puts a **grocery concierge** on every page of a food blog: readers chat, search the blog's recipes, and order the ingredients at **Kroger** or **Walmart** — powered by the [Peristyle Grocery Cart API](https://peristyle.io).\n\n**Iframe architecture (0.5.0):** the plugin injects a ~1.4KB embed script that mounts a cross-origin `<iframe>` pointed at the Peristyle-served `/widget` page. Everything sensitive — the reader's `pk_` key, chat (including pantry-aware AI replies for signed-in readers), match data — lives inside the iframe on the Peristyle origin, where host-page scripts, analytics, and ads cannot reach it (the same isolation model claude.ai uses for artifacts and MCP-app widgets). The widget page is CSP-hardened: inline scripts hashed, `connect-src 'self'`, and `frame-ancestors` locked to the creator's verified domains when a widget token is present. The blog's brand colors are read from its CSS custom properties and passed through sanitized URL params, so the widget still matches the site. The embed script is the only code that runs in the page, which makes any future CMS integration (e.g. WordPress) trivial.\n\nAfter changing widget UI code, run `pnpm build && pnpm run sync:api` to refresh the bundle the API serves (`peristyle-grocery-list/src/peristyle_grocery_cart/assets/widget.js`).\n\n## What readers get\n\n- A floating **Grocery chat** launcher on every page\n- **Chat** — Peristyle's concierge, grounded on the blog's recipe index (never invents recipes). With a widget token configured, search and chat are scoped to *this* blog's recipes and the assistant speaks as this blog's concierge. AI vs. deterministic-search mode is decided server-side by Peristyle — no LLM key in the plugin.\n- **Recipe cards** with a **Shop** button per result\n- **Kroger** — one-time account connect (OAuth via Peristyle; the reader's `pk_…` key lives only in their browser, layered across localStorage → sessionStorage → memory so sign-in survives privacy modes as long as the browser allows), ingredient → product matching, server-side cart add\n- **Full screen (0.7.0)** — an expand control in the panel header hands the widget the whole viewport: the chat gets a centered reading column, the shopping list goes multi-up so a long recipe is reviewable without scrolling, and the header carries the concierge name. The choice is remembered for the tab (`sessionStorage`), never persisted — a full-page takeover should not outlive the visit that asked for it. `Escape` steps back one level at a time: out of full screen, then closed. In iframe mode the host embed script resizes the frame and locks the page behind it, restoring scroll on exit\n- **Mobile-aware composer** — the panel anchors to the *visual* viewport, so an open soft keyboard lifts the sheet instead of burying the input under it, and opening the widget on a touch device no longer raises the keyboard uninvited\n- A compact **Sign in / ● Signed in** chip in the panel header — always-visible status, tap to sign in anytime mid-session (it joins an already-open sign-in card rather than duplicating it) or, when signed in, to see status and sign out. Lives in the existing header bar, so chat space is untouched, including on mobile\n- **Walmart** — no sign-in; matching plus an add-to-cart checkout link\n- A reviewable match list before anything is added, in one of two tiers:\n  - **Simple list** (default) — untick what you have, see prices, add\n  - **Full review** — the [Peristyle Grocery Cart MCP app](https://peristyle.io) experience, ported to the blog: product photos, sale/stock badges, quantity steppers (minus at 1 removes a line), alternative-product swaps, a full-recipe reference section with one-tap add-back, a running estimated total, a proper cart confirmation panel (including an \"Already added\" state when the server dedupes a repeat add), and — for readers who opted into the Peristyle pantry — a one-tap post-checkout purchase confirmation that keeps their pantry current\n\n## Install\n\n```bash\npnpm add @peristyle/grocery-cart-widget\n```\n\n```js\n// astro.config.mjs\nimport emdash from \"emdash/astro\";\nimport { groceryCartWidgetPlugin } from \"@peristyle/grocery-cart-widget\";\n\nexport default defineConfig({\n  integrations: [\n    emdash({\n      plugins: [groceryCartWidgetPlugin()], // or sandboxed: [groceryCartWidgetPlugin()]\n    }),\n  ],\n});\n```\n\nThe widget is inlined into pages via the `page:fragments` hook. Configure under **Plugins → Grocery List** in the admin:\n\n| Setting                 | Default                    | Notes                                                                  |\n| ----------------------- | -------------------------- | ---------------------------------------------------------------------- |\n| Show the grocery widget | on                         |                                                                        |\n| Peristyle widget token  | —                          | `wt_…` from your Peristyle creator dashboard (`GET /v1/creator/widget-token`); scopes search + chat to your recipes and attributes widget traffic to you |\n| Default store           | Kroger                     | Readers can switch in the widget                                       |\n| Cart review experience  | Simple list                | \"Full review\" enables the MCP-app-style match review + pantry loop     |\n| Peristyle API base URL  | `https://api.peristyle.io` | Point at a staging API if needed                                       |\n\nFor matching to work end-to-end, the blog's recipes should be indexed in Peristyle (see [peristyle.io](https://peristyle.io) partner onboarding).\n\n## Capabilities & privacy\n\n- Declares only `hooks.page-fragments:register` — the plugin makes no server-side network calls\n- The reader's browser calls the Peristyle API directly: match routes return the full normalized shape (suggested product + alternatives, regular/promo prices, stock, pantry-staple flags); cart-add items carry optional `description` / `ingredient_name` / `price` context so pantry confirmations and order-value analytics stay readable upstream\n- The reader's Kroger key is issued by the Peristyle connect flow directly to their browser and sent per-request as a bearer; the plugin stores **no reader credentials** and no LLM keys anywhere\n\n## Development\n\n```bash\npnpm install\npnpm build       # builds the widget IIFE first, then the plugin (see tsup configs)\npnpm typecheck\npnpm test        # drives the built IIFE in jsdom against a stubbed Peristyle API, both tiers\npnpm test:browser # real Chrome + WebKit, host page ↔ iframe geometry (runs in CI)\n```\n\n`test:browser` covers what jsdom cannot: the production embed path (blog origin ↔ widget origin over `postMessage`), measured frame geometry, focus and tab-trap behavior, and keyboard-aware sizing. It needs Playwright (`pnpm add -D playwright && npx playwright install chromium webkit`) and skips with a notice when it is absent, so it stays out of `pnpm test` and `prepublishOnly`. CI installs the browsers and runs the suite on every push and pull request, so the skip is a local convenience and never a silent gap.\n\n**Known testing limit:** no headless browser can raise a real soft keyboard. That suite simulates it by driving a stand-in `window.visualViewport` exactly as a keyboard does, which proves the widget responds correctly to the signal — not that a physical iPhone emits it on schedule. WebKit-on-Linux is also the same engine as mobile Safari, not the same product: no real safe-area insets and no collapsing URL bar, which is precisely what `dvh` interacts with. Verify height-related changes on a device.\n\nThe widget (`src/widget.ts`) is compiled to `dist/widget.iife.js` and inlined as a string into the sandbox entry — no CDN request, always the same version as the installed package.\n\nServer-side counterparts live in the `peristyle-grocery-list` repo: `/v1/concierge/chat` (chat orchestration), widget tokens (`/v1/creator/widget-token`), creator-scoped `/v1/recipes/search`, and CORS for browser-direct calls.\n\n## Releasing\n\n1. Bump `\"version\"` in `package.json` (single source of truth; the build injects it into the descriptor).\n2. `npm publish` (runs typecheck + fresh build + tests via `prepublishOnly`).\n3. Commit, tag, push; bump consumers (e.g. `food-blog-base`).\n","readmeFilename":"README.md"}