@lime-bundles/widget 3.0.0 → 3.2.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/dist/index.cjs +10 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -13
- package/dist/index.js.map +1 -1
- package/dist/lime-bundle.global.js +20 -21
- package/dist/lime-bundle.global.js.map +1 -1
- package/docs/css-variables.md +3 -0
- package/docs/react-nextjs.md +1 -11
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -33,9 +33,9 @@ declare class LimeBundleElement extends HTMLElement {
|
|
|
33
33
|
* Resolve the visitor's A/B bucket for every bundle with an active test
|
|
34
34
|
* and merge Variant B overrides where applicable. Runs in parallel; any
|
|
35
35
|
* assignment failure logs internally but still renders Variant A (safe
|
|
36
|
-
* default). The `getABTestAssignment` helper
|
|
37
|
-
*
|
|
38
|
-
* analytics.
|
|
36
|
+
* default). The `getABTestAssignment` helper persists the bucket via a
|
|
37
|
+
* first-party cookie; variant attribution is recorded server-side from
|
|
38
|
+
* the analytics events the widget already emits.
|
|
39
39
|
*/
|
|
40
40
|
private applyABVariants;
|
|
41
41
|
private fetchSingleBundle;
|
package/dist/index.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ declare class LimeBundleElement extends HTMLElement {
|
|
|
33
33
|
* Resolve the visitor's A/B bucket for every bundle with an active test
|
|
34
34
|
* and merge Variant B overrides where applicable. Runs in parallel; any
|
|
35
35
|
* assignment failure logs internally but still renders Variant A (safe
|
|
36
|
-
* default). The `getABTestAssignment` helper
|
|
37
|
-
*
|
|
38
|
-
* analytics.
|
|
36
|
+
* default). The `getABTestAssignment` helper persists the bucket via a
|
|
37
|
+
* first-party cookie; variant attribution is recorded server-side from
|
|
38
|
+
* the analytics events the widget already emits.
|
|
39
39
|
*/
|
|
40
40
|
private applyABVariants;
|
|
41
41
|
private fetchSingleBundle;
|
package/dist/index.js
CHANGED
|
@@ -3378,11 +3378,10 @@ var BUNDLE_MIX_MATCH_CSS = `/* Lime Bundles \u2014 Mix & Match styles */
|
|
|
3378
3378
|
|
|
3379
3379
|
/* Per-pick quantity stepper inside the picker modal product row.
|
|
3380
3380
|
Three flex cells (\u2212 / number / +) sharing a single outer border \u2014
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
per-button borders, so the rounded outer corners stay clean.
|
|
3381
|
+
driven by its own --lb-picker-qty-stepper-* variables so merchants
|
|
3382
|
+
can style the stepper independently of the variant dropdown. The
|
|
3383
|
+
cell dividers come from a 1px border on the centre value rather
|
|
3384
|
+
than per-button borders, so the rounded outer corners stay clean.
|
|
3386
3385
|
Mirrors extensions/bundle-theme/assets/bundle-mix-match.css so
|
|
3387
3386
|
the headless web component matches the Liquid theme widget. */
|
|
3388
3387
|
/* Quantity label + stepper sit together in a .lb-bundle-variant-option-group
|
|
@@ -3403,8 +3402,8 @@ var BUNDLE_MIX_MATCH_CSS = `/* Lime Bundles \u2014 Mix & Match styles */
|
|
|
3403
3402
|
align-items: stretch;
|
|
3404
3403
|
flex-shrink: 0;
|
|
3405
3404
|
height: 32px;
|
|
3406
|
-
border: var(--lb-picker-
|
|
3407
|
-
border-radius: var(--lb-picker-
|
|
3405
|
+
border: var(--lb-picker-qty-stepper-border-width) solid var(--lb-picker-qty-stepper-border-color);
|
|
3406
|
+
border-radius: var(--lb-picker-qty-stepper-radius);
|
|
3408
3407
|
background-color: var(--lb-picker-bg);
|
|
3409
3408
|
overflow: hidden;
|
|
3410
3409
|
box-sizing: border-box;
|
|
@@ -4190,19 +4189,17 @@ var LimeBundleElement = class extends HTMLElement {
|
|
|
4190
4189
|
* Resolve the visitor's A/B bucket for every bundle with an active test
|
|
4191
4190
|
* and merge Variant B overrides where applicable. Runs in parallel; any
|
|
4192
4191
|
* assignment failure logs internally but still renders Variant A (safe
|
|
4193
|
-
* default). The `getABTestAssignment` helper
|
|
4194
|
-
*
|
|
4195
|
-
* analytics.
|
|
4192
|
+
* default). The `getABTestAssignment` helper persists the bucket via a
|
|
4193
|
+
* first-party cookie; variant attribution is recorded server-side from
|
|
4194
|
+
* the analytics events the widget already emits.
|
|
4196
4195
|
*/
|
|
4197
4196
|
async applyABVariants() {
|
|
4198
|
-
if (
|
|
4197
|
+
if (this.bundles.length === 0) return;
|
|
4199
4198
|
const results = await Promise.all(
|
|
4200
4199
|
this.bundles.map(async (bundle) => {
|
|
4201
4200
|
if (!bundle.abTestId || !bundle.abVariantB) return bundle;
|
|
4202
4201
|
try {
|
|
4203
4202
|
const assignment = await getABTestAssignment(
|
|
4204
|
-
this.appUrl,
|
|
4205
|
-
this.shopDomain,
|
|
4206
4203
|
bundle.abTestId,
|
|
4207
4204
|
bundle.id
|
|
4208
4205
|
);
|