@lime-bundles/widget 4.1.1 → 4.3.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/README.md +4 -1
- package/dist/index.cjs +265 -100
- package/dist/index.d.cts +27 -6
- package/dist/index.d.ts +27 -6
- package/dist/index.js +273 -104
- package/dist/lime-bundle.global.js +85 -33
- package/dist/lime-bundle.global.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -58,6 +58,7 @@ document.querySelector("lime-bundle").addEventListener(
|
|
|
58
58
|
| `storefront-token` | ✓ | Storefront Access Token from `/app/settings/headless`. |
|
|
59
59
|
| `bundle-gid` | | Render one specific bundle. Overrides auto-detect. |
|
|
60
60
|
| `product-handle` | | Render bundles for this handle. Overrides URL detection. |
|
|
61
|
+
| `product-id` | | The product this embed is standing on — full GID or bare numeric id. Volume bundles price and sell this product; falls back to the handle cascade, then the bundle's first product. |
|
|
61
62
|
| `app-url` | | Enables impression + add-to-cart analytics when set. |
|
|
62
63
|
| `analytics` | | `"false"` suppresses analytics even when `app-url` is set. |
|
|
63
64
|
| `locale` | | BCP-47 tag forwarded to the Storefront API. |
|
|
@@ -67,6 +68,8 @@ document.querySelector("lime-bundle").addEventListener(
|
|
|
67
68
|
|
|
68
69
|
**Product resolution** (when `bundle-gid` is absent): explicit `product-handle` → `<meta name="shopify:product-handle">` → `/products/<handle>` URL segment.
|
|
69
70
|
|
|
71
|
+
**Multi-product binding**: a volume bundle can span several products, and the widget prices and sells the one the shopper is looking at: explicit `product-id` → the handle cascade above → the bundle's first product. On a pinned `bundle-gid` embed outside a `/products/<handle>` URL, set `product-id` (or `product-handle`) or the first product is what gets sold.
|
|
72
|
+
|
|
70
73
|
Changing any attribute at runtime re-fetches and re-renders.
|
|
71
74
|
|
|
72
75
|
### B2B buyer identity (programmatic property only)
|
|
@@ -129,7 +132,7 @@ The widget renders its own inline fallback; listen for this event if you want to
|
|
|
129
132
|
- **Countdown timer.** When a bundle has `endsAt`, the widget ticks live and hides on expiry.
|
|
130
133
|
- **Variant dropdowns.** Products with multiple eligible variants render a `<select>`; switching live-updates the row price and bundle total.
|
|
131
134
|
- **Mix-match picker modal.** Full modal with search, quantity stepper, progress bar, focus trap, and keyboard navigation.
|
|
132
|
-
- **Out-of-stock handling.**
|
|
135
|
+
- **Out-of-stock handling.** Sold-out products render greyed out with the CTA locked; a bundle that can't be completed doesn't render.
|
|
133
136
|
- **A/B testing.** Reads the merchant's A/B config, buckets the visitor via a first-party cookie, applies Variant B overrides.
|
|
134
137
|
- **Analytics.** Impression and add-to-cart events fire regardless of whether you override the cart.
|
|
135
138
|
|