@rebuy/rebuy 2.35.1 → 2.36.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 +20 -0
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +2 -2
- package/dist/schema/cabShopConfig.d.ts +1 -0
- package/dist/schema/cabShopConfig.d.ts.map +1 -1
- package/dist/schema/checkout-and-beyond/index.js +7 -0
- package/dist/schema/checkout-and-beyond/index.js.map +2 -2
- package/dist/schema/checkout-and-beyond/index.mjs +7 -0
- package/dist/schema/checkout-and-beyond/index.mjs.map +2 -2
- package/dist/schema/smartCart.d.ts +4 -0
- package/dist/schema/smartCart.d.ts.map +1 -1
- package/dist/schema/user-config.js +13 -0
- package/dist/schema/user-config.js.map +2 -2
- package/dist/schema/user-config.mjs +13 -0
- package/dist/schema/user-config.mjs.map +2 -2
- package/dist/schema/userConfig.d.ts +1 -0
- package/dist/schema/userConfig.d.ts.map +1 -1
- package/dist/schema/widget-data.js +7 -0
- package/dist/schema/widget-data.js.map +2 -2
- package/dist/schema/widget-data.mjs +7 -0
- package/dist/schema/widget-data.mjs.map +2 -2
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +2 -0
- package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts.map +1 -1
- package/dist/server/index.js +62 -17
- package/dist/server/index.js.map +3 -3
- package/dist/server/index.mjs +62 -17
- package/dist/server/index.mjs.map +3 -3
- package/dist/transforms/index.js +49 -17
- package/dist/transforms/index.js.map +3 -3
- package/dist/transforms/index.mjs +49 -17
- package/dist/transforms/index.mjs.map +3 -3
- package/dist/transforms/normalizeTokens.d.ts +1 -0
- package/dist/transforms/normalizeTokens.d.ts.map +1 -1
- package/dist/transforms/progressBarV1/convertProgressBarToV2.d.ts.map +1 -1
- package/dist/transforms/reactBarChrome.d.ts +18 -0
- package/dist/transforms/reactBarChrome.d.ts.map +1 -0
- package/dist/transforms/smartCart/convertSmartCartProgressBarToV2.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -780,6 +780,19 @@ var SmartCartTier = z.looseObject({
|
|
|
780
780
|
productAmountRemainingLabel: z.boolean().optional(),
|
|
781
781
|
productAmountRemainingLabelText: z.string().optional(),
|
|
782
782
|
products: z.array(SmartCartTierProduct).optional(),
|
|
783
|
+
/**
|
|
784
|
+
* onsite `product_tier_image`: on a product (gift) tier, show the gift's product image in the step-row
|
|
785
|
+
* slot instead of the generic bag icon (React `TierProgressIcon` swaps in the image when this is set and
|
|
786
|
+
* an image resolves). Per-tier; the client resolves the image (config carries only product IDs).
|
|
787
|
+
*
|
|
788
|
+
* `.catch(undefined)` is load-bearing. This key was previously unknown-and-ignored by the `looseObject`;
|
|
789
|
+
* declaring it as a real boolean means a stored non-boolean (`1` / `"1"` / `"true"`) would now FAIL the
|
|
790
|
+
* tier — and since `SmartCartConfig` is parsed `.nullish().catch(undefined)` (userConfig/cabShopConfig)
|
|
791
|
+
* with no intermediate catch, one drifted flag would drop EVERY progress bar for the shop, not just the
|
|
792
|
+
* flag. The converter only reads it for truthiness (`gift && tier.productTierImage`), so failing open to
|
|
793
|
+
* `undefined` (bag-icon fallback, the documented default) is strictly safer than that blast radius.
|
|
794
|
+
*/
|
|
795
|
+
productTierImage: z.boolean().optional().catch(void 0),
|
|
783
796
|
type: z.string().optional(),
|
|
784
797
|
/**
|
|
785
798
|
* onsite's PER-TIER unit switch (`unlock_condition_type`): `'item_quantity'` makes `minimum` an
|
|
@@ -2257,6 +2270,13 @@ var CABProgressTier = z23.object({
|
|
|
2257
2270
|
* emits no caption slot rather than an empty one). Plain text — a compact icon+label.
|
|
2258
2271
|
*/
|
|
2259
2272
|
label: z23.record(z23.string(), z23.string()).optional(),
|
|
2273
|
+
/**
|
|
2274
|
+
* Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
|
|
2275
|
+
* the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
|
|
2276
|
+
* carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
|
|
2277
|
+
* parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
|
|
2278
|
+
*/
|
|
2279
|
+
productTierImage: z23.boolean().default(false),
|
|
2260
2280
|
/**
|
|
2261
2281
|
* The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
|
|
2262
2282
|
* fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
|