@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.mjs CHANGED
@@ -3764,6 +3764,8 @@ var buildImage = (settings) => ({
3764
3764
  ...settings.displaySettings?.image?.imageFit && {
3765
3765
  objectFit: settings.displaySettings.image.imageFit
3766
3766
  },
3767
+ /** 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. */
3768
+ altText: "{{variantTitle}}",
3767
3769
  sectionType: "image",
3768
3770
  source: settings.images?.source === "product" ? "{{productImage}}" : "{{variantImage}}",
3769
3771
  width: 100
@@ -3843,6 +3845,8 @@ var buildSubscriptionButton = (settings) => {
3843
3845
  {
3844
3846
  action: "switchToSubscription",
3845
3847
  buttonStyle: "plain",
3848
+ /** 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. */
3849
+ ...settings.productType === "subscription" && { disableDowngrade: true },
3846
3850
  sections: [
3847
3851
  slot("subscriptionOption", void 0),
3848
3852
  slot("switchToOneTimePurchase", language?.cartSwitchToOnetime),