wineater-bot 4.23.3 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +9 -0
- package/dist/wineater-chatbot.mjs +19 -16
- package/dist/wineater-chatbot.umd.js +19 -16
- package/package.json +1 -1
- package/src/App.svelte +112 -10
- package/src/components/WineTile.svelte +43 -2
- package/src/index.js +3 -1
- package/src/services/analytics/analytics.ts +12 -2
- package/src/services/api/api.ts +59 -7
- package/src/services/i18n/translations.json +36 -9
- package/src/services/profile/consent.svelte.ts +11 -0
- package/src/services/shopify/cart.ts +105 -0
- package/src/services/shopify/shopify.spec.ts +66 -0
- package/src/services/shopify/shopify.ts +150 -0
- package/src/services/store/app-store.svelte.ts +57 -2
package/CLAUDE.md
CHANGED
|
@@ -87,6 +87,15 @@ Note the intentional typo in "conteiner" — it is used in production, do not fi
|
|
|
87
87
|
- The `es` bundle is minified by the `minify-esm-bundle` plugin in `vite.config.js` (Vite skips whitespace minification for `es` lib builds)
|
|
88
88
|
- `@import` in project `customCss` is converted to `<link rel="stylesheet">` by `generateInlineStyle`
|
|
89
89
|
|
|
90
|
+
## Shopify mode (4.24+)
|
|
91
|
+
|
|
92
|
+
On a Shopify storefront the Wineater app embed (repo `wineater-shopify`) sets `window.wineaterData.shopify`
|
|
93
|
+
(`shop`, `locale`, `currency`, `root`, `config`, `color`) and `mountTarget` (a div inside a shadow root), then loads
|
|
94
|
+
this bundle. `src/services/shopify/` switches the widget to `/shopify/storefront/{instant,search,events}`, BUY becomes
|
|
95
|
+
"Add to cart" (`Shopify.actions` → `/cart/add.js` → cart permalink, cart attribute `_wineater_session`), 429
|
|
96
|
+
`quota_exceeded` shows instant picks + "Our sommelier is resting", no footer link, no own cookies or web fonts, consent
|
|
97
|
+
from the Shopify Customer Privacy API. Without `wineaterData.shopify` nothing changes for existing clients.
|
|
98
|
+
|
|
90
99
|
## Important Gotchas
|
|
91
100
|
|
|
92
101
|
|