@rebuy/rebuy 3.46.0 → 3.47.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.
@@ -5,7 +5,7 @@ import { type MonetizeInput } from '../server/shared';
5
5
  * Compose one ads-engine offer into a renderable CAB card: a bordered `layout` whose `viewUrl` is the
6
6
  * impression pixel, holding the header chrome, the copy (headline + HTML body, pre-converted to a
7
7
  * small-sized Tiptap doc by {@link smallText}) beside the optional image (75%/fill — the React desktop split),
8
- * the two CTAs in a 50/50 row, and the right-aligned Privacy Policy footer. `acceptOffer` links out
8
+ * the two CTAs in a 50/50 row, the paging dots, and the right-aligned Privacy Policy footer. `acceptOffer` links out
9
9
  * to the advertiser (`destinationUrl` = `click_url`, which self-tracks); `declineOffer` fires the
10
10
  * decline pixel (`trackingUrl`) and advances. Parsing through the schema fills defaults and validates
11
11
  * the shape.
@@ -5630,6 +5630,25 @@ var disclaimerSections = (offer) => {
5630
5630
  }
5631
5631
  ];
5632
5632
  };
5633
+ var pagingDot = (buttonField, opacity) => ({
5634
+ buttonField,
5635
+ sectionType: SectionType.image,
5636
+ source: `data:image/svg+xml,${encodeURIComponent(
5637
+ `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><circle cx="4" cy="4" r="4" fill="#808080" fill-opacity="${opacity}"/></svg>`
5638
+ )}`
5639
+ });
5640
+ var pagingDots = () => ({
5641
+ alignment: { horizontal: HorizontalAlignment.center, vertical: VerticalAlignment.top },
5642
+ sections: [
5643
+ {
5644
+ action: ButtonAction.showPagination,
5645
+ buttonStyle: ButtonStyle.plain,
5646
+ sections: [pagingDot(ButtonField.activePage, 1), pagingDot(ButtonField.inactivePage, 0.35)],
5647
+ sectionType: SectionType.button
5648
+ }
5649
+ ],
5650
+ sectionType: SectionType.layout
5651
+ });
5633
5652
  var composeOfferCard = (offer, input, storeName) => {
5634
5653
  const copy = {
5635
5654
  sections: [headlineText(offer.headline), smallText(offer.description)],
@@ -5686,6 +5705,7 @@ var composeOfferCard = (offer, input, storeName) => {
5686
5705
  sectionType: SectionType.layout
5687
5706
  },
5688
5707
  ...disclaimerSections(offer),
5708
+ pagingDots(),
5689
5709
  /**
5690
5710
  * Ad-unit Privacy Policy footer (compliance). Its own end-aligned layout packs a fit-content
5691
5711
  * paragraph right; the paragraph's own `textAlign: end` covers the full-width case — together
@@ -5558,6 +5558,25 @@ var disclaimerSections = (offer) => {
5558
5558
  }
5559
5559
  ];
5560
5560
  };
5561
+ var pagingDot = (buttonField, opacity) => ({
5562
+ buttonField,
5563
+ sectionType: SectionType.image,
5564
+ source: `data:image/svg+xml,${encodeURIComponent(
5565
+ `<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><circle cx="4" cy="4" r="4" fill="#808080" fill-opacity="${opacity}"/></svg>`
5566
+ )}`
5567
+ });
5568
+ var pagingDots = () => ({
5569
+ alignment: { horizontal: HorizontalAlignment.center, vertical: VerticalAlignment.top },
5570
+ sections: [
5571
+ {
5572
+ action: ButtonAction.showPagination,
5573
+ buttonStyle: ButtonStyle.plain,
5574
+ sections: [pagingDot(ButtonField.activePage, 1), pagingDot(ButtonField.inactivePage, 0.35)],
5575
+ sectionType: SectionType.button
5576
+ }
5577
+ ],
5578
+ sectionType: SectionType.layout
5579
+ });
5561
5580
  var composeOfferCard = (offer, input, storeName) => {
5562
5581
  const copy = {
5563
5582
  sections: [headlineText(offer.headline), smallText(offer.description)],
@@ -5614,6 +5633,7 @@ var composeOfferCard = (offer, input, storeName) => {
5614
5633
  sectionType: SectionType.layout
5615
5634
  },
5616
5635
  ...disclaimerSections(offer),
5636
+ pagingDots(),
5617
5637
  /**
5618
5638
  * Ad-unit Privacy Policy footer (compliance). Its own end-aligned layout packs a fit-content
5619
5639
  * paragraph right; the paragraph's own `textAlign: end` covers the full-width case — together
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebuy/rebuy",
3
- "version": "3.46.0",
3
+ "version": "3.47.0",
4
4
  "description": "Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",