@lime-bundles/widget 3.0.0 → 3.1.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 +4 -6
- 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 +4 -6
- package/dist/index.js.map +1 -1
- package/dist/lime-bundle.global.js +11 -11
- package/dist/lime-bundle.global.js.map +1 -1
- 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
|
@@ -4190,19 +4190,17 @@ var LimeBundleElement = class extends HTMLElement {
|
|
|
4190
4190
|
* Resolve the visitor's A/B bucket for every bundle with an active test
|
|
4191
4191
|
* and merge Variant B overrides where applicable. Runs in parallel; any
|
|
4192
4192
|
* assignment failure logs internally but still renders Variant A (safe
|
|
4193
|
-
* default). The `getABTestAssignment` helper
|
|
4194
|
-
*
|
|
4195
|
-
* analytics.
|
|
4193
|
+
* default). The `getABTestAssignment` helper persists the bucket via a
|
|
4194
|
+
* first-party cookie; variant attribution is recorded server-side from
|
|
4195
|
+
* the analytics events the widget already emits.
|
|
4196
4196
|
*/
|
|
4197
4197
|
async applyABVariants() {
|
|
4198
|
-
if (
|
|
4198
|
+
if (this.bundles.length === 0) return;
|
|
4199
4199
|
const results = await Promise.all(
|
|
4200
4200
|
this.bundles.map(async (bundle) => {
|
|
4201
4201
|
if (!bundle.abTestId || !bundle.abVariantB) return bundle;
|
|
4202
4202
|
try {
|
|
4203
4203
|
const assignment = await getABTestAssignment(
|
|
4204
|
-
this.appUrl,
|
|
4205
|
-
this.shopDomain,
|
|
4206
4204
|
bundle.abTestId,
|
|
4207
4205
|
bundle.id
|
|
4208
4206
|
);
|