@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 CHANGED
@@ -4009,6 +4009,8 @@ var buildImage = (settings) => ({
4009
4009
  ...settings.displaySettings?.image?.imageFit && {
4010
4010
  objectFit: settings.displaySettings.image.imageFit
4011
4011
  },
4012
+ /** 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. */
4013
+ altText: "{{variantTitle}}",
4012
4014
  sectionType: "image",
4013
4015
  source: settings.images?.source === "product" ? "{{productImage}}" : "{{variantImage}}",
4014
4016
  width: 100
@@ -4088,6 +4090,8 @@ var buildSubscriptionButton = (settings) => {
4088
4090
  {
4089
4091
  action: "switchToSubscription",
4090
4092
  buttonStyle: "plain",
4093
+ /** 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. */
4094
+ ...settings.productType === "subscription" && { disableDowngrade: true },
4091
4095
  sections: [
4092
4096
  slot("subscriptionOption", void 0),
4093
4097
  slot("switchToOneTimePurchase", language?.cartSwitchToOnetime),