@rebuy/rebuy 2.30.0 → 2.31.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.js +4 -0
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +2 -2
- package/dist/server/analytics.d.ts +13 -0
- package/dist/server/analytics.d.ts.map +1 -1
- package/dist/server/index.js +13 -1
- package/dist/server/index.js.map +2 -2
- package/dist/server/index.mjs +13 -1
- package/dist/server/index.mjs.map +2 -2
- package/dist/transforms/index.js +4 -0
- package/dist/transforms/index.js.map +2 -2
- package/dist/transforms/index.mjs +4 -0
- package/dist/transforms/index.mjs.map +2 -2
- package/dist/transforms/offerV1/offerCard.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -78,6 +78,19 @@ declare const TAXONOMY: {
|
|
|
78
78
|
};
|
|
79
79
|
'widget-viewed': {
|
|
80
80
|
buildTags: ({ experimentId }: Record<string, unknown>) => string[] | undefined;
|
|
81
|
+
/** Under an experiment the view belongs to the VARIANT element, not the placeholder (React parity, same as added-to-cart) — else views credit the placeholder while adds credit the variant and per-widget conversion is meaningless. */
|
|
82
|
+
buildWidgetId: ({ elementId }: Record<string, unknown>, input: {
|
|
83
|
+
events: {
|
|
84
|
+
name: string;
|
|
85
|
+
properties?: Record<string, unknown> | undefined;
|
|
86
|
+
sentAt?: string | undefined;
|
|
87
|
+
}[];
|
|
88
|
+
shop: string;
|
|
89
|
+
visitorId: string;
|
|
90
|
+
cartToken?: string | undefined;
|
|
91
|
+
checkoutToken?: string | undefined;
|
|
92
|
+
widgetId?: string | undefined;
|
|
93
|
+
}) => string | undefined;
|
|
81
94
|
noun: "widget";
|
|
82
95
|
subject: "user";
|
|
83
96
|
usesWidgetId: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/server/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,K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,KAAK,aAAa,KAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAuBjH,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -2513,6 +2513,8 @@ var buildImage = (settings) => ({
|
|
|
2513
2513
|
...settings.displaySettings?.image?.imageFit && {
|
|
2514
2514
|
objectFit: settings.displaySettings.image.imageFit
|
|
2515
2515
|
},
|
|
2516
|
+
/** Accessible name for the product image (legacy `OfferImage` used `accessibilityDescription={variantTitle}`); the renderer interpolates it, so an empty default would announce the image as decorative. */
|
|
2517
|
+
altText: "{{variantTitle}}",
|
|
2516
2518
|
sectionType: "image",
|
|
2517
2519
|
source: settings.images?.source === "product" ? "{{productImage}}" : "{{variantImage}}",
|
|
2518
2520
|
width: 100
|
|
@@ -2592,6 +2594,8 @@ var buildSubscriptionButton = (settings) => {
|
|
|
2592
2594
|
{
|
|
2593
2595
|
action: "switchToSubscription",
|
|
2594
2596
|
buttonStyle: "plain",
|
|
2597
|
+
/** A `subscription` widget offers no one-time purchase (legacy's offers checkbox renders only when `isProductTypeBoth`); suppress the downgrade so the buyer can't switch to one-time on a subscription-only offer. */
|
|
2598
|
+
...settings.productType === "subscription" && { disableDowngrade: true },
|
|
2595
2599
|
sections: [
|
|
2596
2600
|
slot("subscriptionOption", void 0),
|
|
2597
2601
|
slot("switchToOneTimePurchase", language?.cartSwitchToOnetime),
|
|
@@ -3650,7 +3654,15 @@ var TAXONOMY = {
|
|
|
3650
3654
|
usesWidgetId: true,
|
|
3651
3655
|
verb: "tracking"
|
|
3652
3656
|
},
|
|
3653
|
-
"widget-viewed": {
|
|
3657
|
+
"widget-viewed": {
|
|
3658
|
+
buildTags: experimentTags,
|
|
3659
|
+
/** Under an experiment the view belongs to the VARIANT element, not the placeholder (React parity, same as added-to-cart) — else views credit the placeholder while adds credit the variant and per-widget conversion is meaningless. */
|
|
3660
|
+
buildWidgetId: ({ elementId }, input) => elementId != null ? String(elementId) : input.widgetId,
|
|
3661
|
+
noun: "widget",
|
|
3662
|
+
subject: "user",
|
|
3663
|
+
usesWidgetId: true,
|
|
3664
|
+
verb: "viewed"
|
|
3665
|
+
}
|
|
3654
3666
|
};
|
|
3655
3667
|
var isKnownEvent = (name) => name in TAXONOMY;
|
|
3656
3668
|
var translateAnalyticsEvent = (event, input) => {
|