@rebuy/rebuy 2.34.0-rc.3 → 2.34.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.
Files changed (39) hide show
  1. package/dist/index.js +5 -125
  2. package/dist/index.js.map +3 -3
  3. package/dist/index.mjs +5 -125
  4. package/dist/index.mjs.map +3 -3
  5. package/dist/schema/checkout-and-beyond/constants.js +0 -2
  6. package/dist/schema/checkout-and-beyond/constants.js.map +2 -2
  7. package/dist/schema/checkout-and-beyond/constants.mjs +0 -2
  8. package/dist/schema/checkout-and-beyond/constants.mjs.map +2 -2
  9. package/dist/schema/checkout-and-beyond/index.js +5 -125
  10. package/dist/schema/checkout-and-beyond/index.js.map +3 -3
  11. package/dist/schema/checkout-and-beyond/index.mjs +5 -125
  12. package/dist/schema/checkout-and-beyond/index.mjs.map +3 -3
  13. package/dist/schema/widget-data.js +5 -119
  14. package/dist/schema/widget-data.js.map +3 -3
  15. package/dist/schema/widget-data.mjs +5 -119
  16. package/dist/schema/widget-data.mjs.map +3 -3
  17. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +0 -2
  18. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts.map +1 -1
  19. package/dist/schema/widgets/checkout-and-beyond/button.d.ts +0 -13
  20. package/dist/schema/widgets/checkout-and-beyond/button.d.ts.map +1 -1
  21. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +1 -3
  22. package/dist/schema/widgets/checkout-and-beyond/common.d.ts.map +1 -1
  23. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +2 -96
  24. package/dist/schema/widgets/checkout-and-beyond/image.d.ts.map +1 -1
  25. package/dist/schema/widgets/checkout-and-beyond/index.d.ts +0 -1
  26. package/dist/schema/widgets/checkout-and-beyond/index.d.ts.map +1 -1
  27. package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts.map +1 -1
  28. package/dist/server/index.js +6 -120
  29. package/dist/server/index.js.map +3 -3
  30. package/dist/server/index.mjs +6 -120
  31. package/dist/server/index.mjs.map +3 -3
  32. package/dist/transforms/index.js +6 -120
  33. package/dist/transforms/index.js.map +3 -3
  34. package/dist/transforms/index.mjs +6 -120
  35. package/dist/transforms/index.mjs.map +3 -3
  36. package/dist/transforms/smartCart/convertSmartCartProgressBarToV2.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/schema/widgets/checkout-and-beyond/icons.d.ts +0 -124
  39. package/dist/schema/widgets/checkout-and-beyond/icons.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -83,9 +83,6 @@ __export(src_exports, {
83
83
  HEX_COLOR_REGEX: () => HEX_COLOR_REGEX,
84
84
  HTML_TAGS_REGEX: () => HTML_TAGS_REGEX,
85
85
  HorizontalAlignment: () => HorizontalAlignment,
86
- IconName: () => IconName,
87
- IconSize: () => IconSize,
88
- IconTone: () => IconTone,
89
86
  Identity: () => Identity,
90
87
  ImageBlock: () => ImageBlock,
91
88
  ImageContentBlock: () => ImageContentBlock,
@@ -180,9 +177,6 @@ __export(src_exports, {
180
177
  getIdFromGraphUrl: () => getIdFromGraphUrl,
181
178
  hasHTMLInDoc: () => hasHTMLInDoc,
182
179
  horizontalAlignments: () => horizontalAlignments,
183
- iconNames: () => iconNames,
184
- iconSizes: () => iconSizes,
185
- iconTones: () => iconTones,
186
180
  isBannerType: () => isBannerType,
187
181
  isBase64Encoded: () => isBase64Encoded,
188
182
  isButtonType: () => isButtonType,
@@ -1521,7 +1515,6 @@ var borderWidths = ["base", "medium", "thick"];
1521
1515
  var BorderWidth = freezeEnum(borderWidths);
1522
1516
  var buttonActions = [
1523
1517
  "acceptOffer",
1524
- "addGift",
1525
1518
  "addToOrder",
1526
1519
  "declineAllOffers",
1527
1520
  "declineOffer",
@@ -1531,7 +1524,6 @@ var buttonActions = [
1531
1524
  "goToPrevPage",
1532
1525
  "goToURL",
1533
1526
  "removeFromOrder",
1534
- "removeGift",
1535
1527
  "selectVariant",
1536
1528
  "showPagination",
1537
1529
  "switchToSubscription",
@@ -1835,8 +1827,6 @@ var CABBannerSection = import_zod11.z.lazy(
1835
1827
  buttonField: import_zod11.z.enum(buttonFields).optional(),
1836
1828
  color: import_zod11.z.enum(bannerColors).default("info"),
1837
1829
  dismissible: import_zod11.z.boolean().default(true),
1838
- /** The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent ⇒ no heading. */
1839
- heading: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.string()).optional(),
1840
1830
  sectionType: import_zod11.z.literal(SectionType.banner).default(SectionType.banner)
1841
1831
  })
1842
1832
  );
@@ -1849,90 +1839,6 @@ var import_zod14 = require("zod");
1849
1839
  var import_uuid = require("uuid");
1850
1840
  var import_zod12 = require("zod");
1851
1841
 
1852
- // src/schema/widgets/checkout-and-beyond/icons.ts
1853
- var iconNames = [
1854
- "alert-circle",
1855
- "alert-triangle",
1856
- "alert-triangle-filled",
1857
- "arrow-down",
1858
- "arrow-left",
1859
- "arrow-right",
1860
- "arrow-up",
1861
- "arrow-up-right",
1862
- "bag",
1863
- "bullet",
1864
- "calendar",
1865
- "camera",
1866
- "caret-down",
1867
- "cart",
1868
- "cash-dollar",
1869
- "categories",
1870
- "check",
1871
- "check-circle",
1872
- "check-circle-filled",
1873
- "chevron-down",
1874
- "chevron-left",
1875
- "chevron-right",
1876
- "chevron-up",
1877
- "circle",
1878
- "clipboard",
1879
- "clock",
1880
- "credit-card",
1881
- "delete",
1882
- "delivered",
1883
- "delivery",
1884
- "disabled",
1885
- "discount",
1886
- "edit",
1887
- "email",
1888
- "empty",
1889
- "external",
1890
- "filter",
1891
- "geolocation",
1892
- "gift-card",
1893
- "globe",
1894
- "grid",
1895
- "image",
1896
- "info",
1897
- "info-filled",
1898
- "list-bulleted",
1899
- "location",
1900
- "lock",
1901
- "map",
1902
- "menu",
1903
- "menu-horizontal",
1904
- "menu-vertical",
1905
- "minus",
1906
- "mobile",
1907
- "note",
1908
- "order",
1909
- "organization",
1910
- "plus",
1911
- "profile",
1912
- "question-circle",
1913
- "question-circle-filled",
1914
- "reorder",
1915
- "reset",
1916
- "return",
1917
- "savings",
1918
- "search",
1919
- "settings",
1920
- "star",
1921
- "star-filled",
1922
- "star-half",
1923
- "store",
1924
- "truck",
1925
- "upload",
1926
- "x",
1927
- "x-circle",
1928
- "x-circle-filled"
1929
- ];
1930
- var IconName = freezeEnum(iconNames);
1931
- var iconSizes = ["base", "large", "large-100", "small", "small-100", "small-200"];
1932
- var IconSize = freezeEnum(iconSizes);
1933
- var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "warning"];
1934
- var IconTone = freezeEnum(iconTones);
1935
-
1936
1842
  // src/schema/widgets/checkout-and-beyond/regex.ts
1937
1843
  var ARRAY_INDEX_STRING = /^(0|[1-9]\d*)$/;
1938
1844
  var DYNAMIC_TOKEN_REGEX = /^\{\{\s*[A-Za-z]+\s*\}\}$/;
@@ -1987,26 +1893,10 @@ var convertNumericObjects = (input) => {
1987
1893
  // src/schema/widgets/checkout-and-beyond/image.ts
1988
1894
  var CABImageSection = import_zod12.z.object({
1989
1895
  altText: import_zod12.z.string().refine(checkForHTML, NO_HTML).default(""),
1990
- /** Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any ratio — never limited to 1. */
1991
- aspectRatio: import_zod12.z.number().nullable().default(null),
1896
+ aspectRatio: import_zod12.z.literal(1).nullable().default(null),
1992
1897
  border: import_zod12.z.lazy(() => CABBorder),
1993
1898
  buttonField: import_zod12.z.enum(buttonFields).optional(),
1994
- /**
1995
- * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
1996
- * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
1997
- * implementation — they were never significant to rendering (`icons`, plural, is NOT deprecated, just one of
1998
- * those inert legacy tags); `icon` is the first value that means anything.
1999
- *
2000
- * INVARIANT (not schema-encoded — `CABImageSection` is a discriminated-union member, so it can't carry a
2001
- * `.refine`): `category: 'icon'` ⇔ `source` is an icon name; any other category ⇒ `source` is a URL/token.
2002
- * The renderer enforces it by branching on `category`, and icon-mode sources are client-assembled from known
2003
- * `iconNames` constants (never merchant/server data), so a mismatched pairing can't arise in practice.
2004
- */
2005
- category: import_zod12.z.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2006
- /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
2007
- iconSize: import_zod12.z.enum(iconSizes).nullable().default(null),
2008
- /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
2009
- iconTone: import_zod12.z.enum(iconTones).nullable().default(null),
1899
+ category: import_zod12.z.enum(["gallery", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
2010
1900
  name: import_zod12.z.string().optional(),
2011
1901
  naturalHeight: import_zod12.z.number().default(0),
2012
1902
  naturalWidth: import_zod12.z.number().default(0),
@@ -2018,8 +1908,7 @@ var CABImageSection = import_zod12.z.object({
2018
1908
  rule: CABRule.optional(),
2019
1909
  sectionId: import_zod12.z.uuid().default(() => (0, import_uuid.v7)()),
2020
1910
  sectionType: import_zod12.z.literal(SectionType.image).default(SectionType.image),
2021
- /** A URL / dynamic token for an image, an empty default, or an icon NAME when `category: 'icon'`. */
2022
- source: import_zod12.z.union([import_zod12.z.url(), import_zod12.z.literal(""), import_zod12.z.string().regex(DYNAMIC_TOKEN_REGEX), import_zod12.z.enum(iconNames)]).default(""),
1911
+ source: import_zod12.z.union([import_zod12.z.url(), import_zod12.z.literal(""), import_zod12.z.string().regex(DYNAMIC_TOKEN_REGEX)]).default(""),
2023
1912
  width: import_zod12.z.number().default(100)
2024
1913
  });
2025
1914
 
@@ -2141,13 +2030,6 @@ var CABButtonSection = import_zod14.z.object({
2141
2030
  sectionId: import_zod14.z.uuid().default(() => (0, import_uuid3.v7)()),
2142
2031
  sections: import_zod14.z.union([import_zod14.z.array(CABButtonContent), import_zod14.z.strictObject({}).transform(() => [])]).default(() => []),
2143
2032
  sectionType: import_zod14.z.literal(SectionType.button).default(SectionType.button),
2144
- /**
2145
- * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift,
2146
- * the same way {@link CABTextSection} carries a `tier`. The client resolves the tier's gift (productId) from
2147
- * the progress-bar context by this `tierId` — the button node stays data, no bespoke per-tier wiring. Absent
2148
- * on non-gift buttons (offer add/remove, navigation, links).
2149
- */
2150
- tier: CABTextTier.optional(),
2151
2033
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
2152
2034
  trackingUrl: import_zod14.z.string().optional()
2153
2035
  });
@@ -2443,10 +2325,8 @@ var CABProgressTier = import_zod23.z.object({
2443
2325
  }).optional(),
2444
2326
  /**
2445
2327
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
2446
- * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
2447
- * the gift PRODUCT title, which the converter can't supply (config carries only product IDs), so the
2448
- * client resolves it (authoritative Shopify title, React parity) with its own localized generic fallback.
2449
- * Localized content; absent ⇒ no label under the tier's icon. Plain text — a compact icon+label.
2328
+ * type default ('Free Shipping' / product title / '{n}% Discount'). Localized content; blank ⇒ no
2329
+ * label under the tier's icon. Plain text — the step row is a compact icon+label, not rich copy.
2450
2330
  */
2451
2331
  label: import_zod23.z.record(import_zod23.z.string(), import_zod23.z.string()).optional(),
2452
2332
  /**