@rebuy/rebuy 3.41.0 → 3.43.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 (60) hide show
  1. package/dist/index.cjs +971 -787
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.mjs +971 -787
  4. package/dist/pricing/index.cjs +58 -1
  5. package/dist/pricing/index.d.ts +2 -0
  6. package/dist/pricing/index.mjs +58 -1
  7. package/dist/pricing/postPurchaseDisplayFacts.d.ts +36 -0
  8. package/dist/pricing/postPurchaseDisplayPrice.d.ts +8 -0
  9. package/dist/pricing/postPurchaseReduction.d.ts +17 -0
  10. package/dist/schema/checkout-and-beyond/constants.cjs +4 -0
  11. package/dist/schema/checkout-and-beyond/constants.mjs +4 -0
  12. package/dist/schema/checkout-and-beyond/index.cjs +388 -374
  13. package/dist/schema/checkout-and-beyond/index.mjs +388 -374
  14. package/dist/schema/index.d.ts +2 -0
  15. package/dist/schema/postPurchaseAdmission.d.ts +33 -0
  16. package/dist/schema/postPurchaseDisplayPrice.d.ts +31 -0
  17. package/dist/schema/postPurchaseFollowups.d.ts +47 -0
  18. package/dist/schema/postPurchaseHealth.d.ts +5 -0
  19. package/dist/schema/postPurchasePlanCatalog.d.ts +2 -0
  20. package/dist/schema/postPurchaseProduct.d.ts +2 -0
  21. package/dist/schema/postPurchaseProductCollectionView.d.ts +62 -0
  22. package/dist/schema/postPurchaseProductView.d.ts +65 -0
  23. package/dist/schema/postPurchaseRecovery.d.ts +47 -0
  24. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +2 -0
  25. package/dist/schema/postPurchaseUpgrade.d.ts +117 -0
  26. package/dist/schema/widget-data.cjs +452 -441
  27. package/dist/schema/widget-data.mjs +452 -441
  28. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +14 -0
  29. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +8 -0
  30. package/dist/schema/widgets/checkout-and-beyond/imageThumbnails.d.ts +13 -0
  31. package/dist/schema/widgets/checkout-and-beyond/index.d.ts +1 -0
  32. package/dist/schema/widgets/checkout-and-beyond/variants.d.ts +1 -0
  33. package/dist/server/index.cjs +1721 -1419
  34. package/dist/server/index.mjs +1707 -1405
  35. package/dist/server/postPurchasePlanCatalog.d.ts +4 -1
  36. package/dist/server/preparePostPurchaseAdmissionView.d.ts +53 -0
  37. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +57 -0
  38. package/dist/server/preparePostPurchaseCollectionView.d.ts +53 -0
  39. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +53 -0
  40. package/dist/server/preparePostPurchaseGroupDefault.d.ts +53 -0
  41. package/dist/server/preparePostPurchaseGroupView.d.ts +53 -0
  42. package/dist/server/preparePostPurchaseMemberView.d.ts +159 -0
  43. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +53 -0
  44. package/dist/server/preparePostPurchaseQuantityView.d.ts +53 -0
  45. package/dist/server/preparePostPurchaseSubscription.d.ts +1 -0
  46. package/dist/server/selectPostPurchaseChoice.d.ts +1 -0
  47. package/dist/transforms/index.cjs +980 -581
  48. package/dist/transforms/index.mjs +980 -581
  49. package/dist/transforms/postPurchase/convertProductInformation.d.ts +6 -2
  50. package/dist/transforms/postPurchase/productCardControls.d.ts +7 -0
  51. package/dist/transforms/postPurchase/productCardCosts.d.ts +3 -0
  52. package/dist/transforms/postPurchase/productCardPricing.d.ts +3 -0
  53. package/dist/transforms/postPurchase/productCardRows.d.ts +63 -0
  54. package/dist/transforms/postPurchase/productCardSettings.d.ts +103 -0
  55. package/dist/transforms/postPurchase/types.d.ts +2 -2
  56. package/dist/transforms/productCard/earnedText.d.ts +25 -0
  57. package/dist/transforms/productCard/priceText.d.ts +2 -0
  58. package/dist/transforms/productCard/quantitySection.d.ts +28 -0
  59. package/dist/transforms/productCard/subscriptionToggle.d.ts +18 -0
  60. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  // src/schema/widgets/checkout-and-beyond/banner.ts
2
- import { z as z21 } from "zod";
2
+ import { z as z22 } from "zod";
3
3
 
4
4
  // src/schema/widgets/checkout-and-beyond/common.ts
5
5
  var freezeEnum = (values) => Object.freeze(Object.fromEntries(values.map((v) => [v, v])));
@@ -175,6 +175,8 @@ var variableTypes = ["boolean", "number", "text"];
175
175
  var VariableType = freezeEnum(variableTypes);
176
176
  var variantModes = ["multiple", "single"];
177
177
  var VariantMode = freezeEnum(variantModes);
178
+ var variantsModes = [...variantModes, "productGroup"];
179
+ var VariantsMode = freezeEnum(variantsModes);
178
180
  var variantSelectors = ["menu", "radio", "button"];
179
181
  var VariantSelector = freezeEnum(variantSelectors);
180
182
  var verticalAlignments = ["top", "middle", "bottom"];
@@ -209,18 +211,18 @@ var WidgetType = freezeEnum(widgetTypes);
209
211
 
210
212
  // src/schema/widgets/checkout-and-beyond/layout.ts
211
213
  import { v7 as uuidv713 } from "uuid";
212
- import { z as z20 } from "zod";
214
+ import { z as z21 } from "zod";
213
215
 
214
216
  // src/schema/widgets/checkout-and-beyond/shared.ts
215
- import { z as z19 } from "zod";
217
+ import { z as z20 } from "zod";
216
218
 
217
219
  // src/schema/widgets/checkout-and-beyond/button.ts
218
220
  import { v7 as uuidv73 } from "uuid";
219
- import { z as z5 } from "zod";
221
+ import { z as z6 } from "zod";
220
222
 
221
223
  // src/schema/widgets/checkout-and-beyond/image.ts
222
224
  import { v7 as uuidv7 } from "uuid";
223
- import { z as z3 } from "zod";
225
+ import { z as z4 } from "zod";
224
226
 
225
227
  // src/schema/widgets/checkout-and-beyond/icons.ts
226
228
  var iconNames = [
@@ -306,6 +308,13 @@ var IconSize = freezeEnum(iconSizes);
306
308
  var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "warning"];
307
309
  var IconTone = freezeEnum(iconTones);
308
310
 
311
+ // src/schema/widgets/checkout-and-beyond/imageThumbnails.ts
312
+ import { z } from "zod";
313
+ var CABImageThumbnails = z.object({
314
+ limit: z.number().int().min(1).default(8),
315
+ perLine: z.number().int().min(1).max(8).default(4)
316
+ });
317
+
309
318
  // src/schema/widgets/checkout-and-beyond/regex.ts
310
319
  var ARRAY_INDEX_STRING = /^(0|[1-9]\d*)$/;
311
320
  var DYNAMIC_TOKEN_REGEX = /^\{\{\s*[A-Za-z]+\s*\}\}$/;
@@ -382,10 +391,10 @@ var isTextType = isSectionType(SectionType.text);
382
391
  var isVariantsType = isSectionType(SectionType.variants);
383
392
 
384
393
  // src/schema/widgets/checkout-and-beyond/variables.ts
385
- import { z as z2 } from "zod";
394
+ import { z as z3 } from "zod";
386
395
 
387
396
  // src/schema/widgets/checkout-and-beyond/rule.ts
388
- import { z } from "zod";
397
+ import { z as z2 } from "zod";
389
398
  var ruleTypes = [
390
399
  "cart",
391
400
  "cart_count",
@@ -404,7 +413,7 @@ var ruleTypes = [
404
413
  "product_type",
405
414
  "product_vendor"
406
415
  ];
407
- var ruleType = z.enum(ruleTypes);
416
+ var ruleType = z2.enum(ruleTypes);
408
417
  var RuleType = ruleType.enum;
409
418
  var ruleOperators = [
410
419
  "after",
@@ -419,124 +428,124 @@ var ruleOperators = [
419
428
  "greater_than",
420
429
  "less_than"
421
430
  ];
422
- var ruleOperator = z.enum(ruleOperators);
431
+ var ruleOperator = z2.enum(ruleOperators);
423
432
  var RuleOperator = ruleOperator.enum;
424
- var RuleCondition = z.object({
425
- operator: z.enum(ruleOperators).default(RuleOperator.anything),
426
- products: z.union([z.array(z.unknown()), z.strictObject({}).transform(() => [])]).default(() => []),
427
- type: z.enum(ruleTypes).default(RuleType.cart_subtotal),
428
- value: z.coerce.string().default("")
433
+ var RuleCondition = z2.object({
434
+ operator: z2.enum(ruleOperators).default(RuleOperator.anything),
435
+ products: z2.union([z2.array(z2.unknown()), z2.strictObject({}).transform(() => [])]).default(() => []),
436
+ type: z2.enum(ruleTypes).default(RuleType.cart_subtotal),
437
+ value: z2.coerce.string().default("")
429
438
  });
430
- var RuleLogicBlock = z.object({
431
- rules: z.array(RuleCondition).default(() => [])
439
+ var RuleLogicBlock = z2.object({
440
+ rules: z2.array(RuleCondition).default(() => [])
432
441
  });
433
- var CABRulesetEntry = z.object({
434
- exitIfMatched: z.boolean().default(true),
435
- logic: z.array(RuleLogicBlock).default(() => []),
436
- output: z.array(
437
- z.object({
438
- key: z.string().default("should_show"),
439
- type: z.literal("data_json").default("data_json"),
440
- value: z.string().default("true")
442
+ var CABRulesetEntry = z2.object({
443
+ exitIfMatched: z2.boolean().default(true),
444
+ logic: z2.array(RuleLogicBlock).default(() => []),
445
+ output: z2.array(
446
+ z2.object({
447
+ key: z2.string().default("should_show"),
448
+ type: z2.literal("data_json").default("data_json"),
449
+ value: z2.string().default("true")
441
450
  })
442
451
  ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
443
452
  });
444
- var CABRuleset = z.union([z.array(CABRulesetEntry), z.strictObject({}).transform(() => [])]).default(() => []);
453
+ var CABRuleset = z2.union([z2.array(CABRulesetEntry), z2.strictObject({}).transform(() => [])]).default(() => []);
445
454
 
446
455
  // src/schema/widgets/checkout-and-beyond/variables.ts
447
- var variableEffect = z2.enum(variableEffects);
448
- var CABVariableSeed = z2.object({
449
- dataSourceId: z2.number().nullable().default(null),
456
+ var variableEffect = z3.enum(variableEffects);
457
+ var CABVariableSeed = z3.object({
458
+ dataSourceId: z3.number().nullable().default(null),
450
459
  ruleset: CABRuleset
451
460
  });
452
- var CABBooleanVariable = z2.object({
461
+ var CABBooleanVariable = z3.object({
453
462
  /**
454
463
  * Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
455
464
  * from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
456
465
  * below; a cross-field default has no `.default()` spelling. An explicit value always wins.
457
466
  */
458
- defaultValue: z2.boolean().optional(),
459
- name: z2.string().min(1),
467
+ defaultValue: z3.boolean().optional(),
468
+ name: z3.string().min(1),
460
469
  seed: CABVariableSeed.optional(),
461
470
  /** Defaulted so every stored declaration (all boolean before `text` existed) parses unchanged. */
462
- type: z2.literal(VariableType.boolean).default(VariableType.boolean)
471
+ type: z3.literal(VariableType.boolean).default(VariableType.boolean)
463
472
  });
464
- var CABTextVariable = z2.object({
465
- defaultValue: z2.string(),
466
- name: z2.string().min(1),
467
- seed: z2.never().optional(),
468
- type: z2.literal(VariableType.text)
473
+ var CABTextVariable = z3.object({
474
+ defaultValue: z3.string(),
475
+ name: z3.string().min(1),
476
+ seed: z3.never().optional(),
477
+ type: z3.literal(VariableType.text)
469
478
  });
470
- var CABNumberVariable = z2.object({
471
- defaultValue: z2.number(),
472
- name: z2.string().min(1),
473
- seed: z2.never().optional(),
474
- type: z2.literal(VariableType.number)
479
+ var CABNumberVariable = z3.object({
480
+ defaultValue: z3.number(),
481
+ name: z3.string().min(1),
482
+ seed: z3.never().optional(),
483
+ type: z3.literal(VariableType.number)
475
484
  });
476
- var CABVariable = z2.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
485
+ var CABVariable = z3.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
477
486
  (variable) => variable.type === VariableType.boolean ? { ...variable, defaultValue: variable.defaultValue ?? variable.seed === void 0 } : variable
478
487
  );
479
- var CABVariableEffect = z2.object({
488
+ var CABVariableEffect = z3.object({
480
489
  effect: variableEffect.default(VariableEffect.toggle),
481
- variable: z2.string().min(1)
490
+ variable: z3.string().min(1)
482
491
  });
483
- var CABVisibility = z2.object({
484
- variable: z2.string().min(1),
485
- visibleWhen: z2.boolean().default(true)
492
+ var CABVisibility = z3.object({
493
+ variable: z3.string().min(1),
494
+ visibleWhen: z3.boolean().default(true)
486
495
  });
487
- var contentOperator = z2.enum(contentOperators);
488
- var resultCountOperator = z2.enum(resultCountOperators);
489
- var resultTagOperator = z2.enum(resultTagOperators);
490
- var mutatorEvent = z2.enum(mutatorEvents);
491
- var CABContentTrigger = z2.object({
496
+ var contentOperator = z3.enum(contentOperators);
497
+ var resultCountOperator = z3.enum(resultCountOperators);
498
+ var resultTagOperator = z3.enum(resultTagOperators);
499
+ var mutatorEvent = z3.enum(mutatorEvents);
500
+ var CABContentTrigger = z3.object({
492
501
  operator: contentOperator.default(ContentOperator.is_empty),
493
- type: z2.literal("content")
502
+ type: z3.literal("content")
494
503
  });
495
- var CABResultCountTrigger = z2.object({
504
+ var CABResultCountTrigger = z3.object({
496
505
  operator: resultCountOperator.default(ResultCountOperator.equals),
497
- type: z2.literal("result_count"),
498
- value: z2.number().default(0)
506
+ type: z3.literal("result_count"),
507
+ value: z3.number().default(0)
499
508
  });
500
- var CABResultTagTrigger = z2.object({
509
+ var CABResultTagTrigger = z3.object({
501
510
  operator: resultTagOperator.default(ResultTagOperator.contains),
502
- type: z2.literal("result_tag"),
503
- value: z2.string().min(1)
511
+ type: z3.literal("result_tag"),
512
+ value: z3.string().min(1)
504
513
  });
505
- var CABEventTrigger = z2.object({
514
+ var CABEventTrigger = z3.object({
506
515
  event: mutatorEvent,
507
- type: z2.literal("event")
516
+ type: z3.literal("event")
508
517
  });
509
- var CABVariableTrigger = z2.discriminatedUnion("type", [
518
+ var CABVariableTrigger = z3.discriminatedUnion("type", [
510
519
  CABContentTrigger,
511
520
  CABEventTrigger,
512
521
  CABResultCountTrigger,
513
522
  CABResultTagTrigger
514
523
  ]);
515
- var CABVariableMutator = z2.object({
524
+ var CABVariableMutator = z3.object({
516
525
  effect: variableEffect.default(VariableEffect.set_false),
517
- variable: z2.string().min(1),
526
+ variable: z3.string().min(1),
518
527
  when: CABVariableTrigger
519
528
  });
520
529
  var CABVariableFields = {
521
- mutators: z2.array(CABVariableMutator).optional(),
522
- variables: z2.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
530
+ mutators: z3.array(CABVariableMutator).optional(),
531
+ variables: z3.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
523
532
  message: "variable names must be unique within a section"
524
533
  }).optional(),
525
534
  visibility: CABVisibility.optional()
526
535
  };
527
536
 
528
537
  // src/schema/widgets/checkout-and-beyond/image.ts
529
- var CABImageSectionFields = z3.object({
538
+ var CABImageSectionFields = z4.object({
530
539
  ...CABVariableFields,
531
- altText: z3.string().refine(checkForHTML, NO_HTML).default(""),
540
+ altText: z4.string().refine(checkForHTML, NO_HTML).default(""),
532
541
  /**
533
542
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
534
543
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
535
544
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
536
545
  */
537
- aspectRatio: z3.number().positive().nullable().default(null),
538
- border: z3.lazy(() => CABBorder),
539
- buttonField: z3.enum(buttonFields).optional(),
546
+ aspectRatio: z4.number().positive().nullable().default(null),
547
+ border: z4.lazy(() => CABBorder),
548
+ buttonField: z4.enum(buttonFields).optional(),
540
549
  /**
541
550
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
542
551
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -555,29 +564,30 @@ var CABImageSectionFields = z3.object({
555
564
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
556
565
  * the risky half.
557
566
  */
558
- category: z3.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
567
+ category: z4.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
559
568
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
560
- iconSize: z3.enum(iconSizes).nullable().default(null),
569
+ iconSize: z4.enum(iconSizes).nullable().default(null),
561
570
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
562
- iconTone: z3.enum(iconTones).nullable().default(null),
563
- name: z3.string().optional(),
564
- naturalHeight: z3.number().default(0),
565
- naturalWidth: z3.number().default(0),
571
+ iconTone: z4.enum(iconTones).nullable().default(null),
572
+ name: z4.string().optional(),
573
+ naturalHeight: z4.number().default(0),
574
+ naturalWidth: z4.number().default(0),
566
575
  /**
567
576
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
568
577
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
569
578
  */
570
- objectFit: z3.enum(objectFits).default(ObjectFit.contain),
571
- sectionId: z3.uuid().default(() => uuidv7()),
572
- sectionType: z3.literal(SectionType.image).default(SectionType.image),
579
+ objectFit: z4.enum(objectFits).default(ObjectFit.contain),
580
+ sectionId: z4.uuid().default(() => uuidv7()),
581
+ sectionType: z4.literal(SectionType.image).default(SectionType.image),
573
582
  /**
574
583
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
575
584
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
576
585
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
577
586
  * server-chosen tier icon actually needs it.
578
587
  */
579
- source: z3.union([z3.url(), z3.literal(""), z3.string().regex(DYNAMIC_TOKEN_REGEX), z3.enum(iconNames)]).default(""),
580
- width: z3.number().default(100)
588
+ source: z4.union([z4.url(), z4.literal(""), z4.string().regex(DYNAMIC_TOKEN_REGEX), z4.enum(iconNames)]).default(""),
589
+ thumbnails: CABImageThumbnails.optional(),
590
+ width: z4.number().default(100)
581
591
  });
582
592
  var iconNameSet = new Set(iconNames);
583
593
  var isIconName = (source) => iconNameSet.has(source);
@@ -599,71 +609,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
599
609
  // src/schema/widgets/checkout-and-beyond/text.ts
600
610
  import { forEach, isString as isString2 } from "es-toolkit/compat";
601
611
  import { v7 as uuidv72 } from "uuid";
602
- import { z as z4 } from "zod";
603
- var enumOrOmit = (...vals) => z4.string().transform((val) => vals.includes(val) ? val : void 0).optional();
604
- var TiptapText = z4.object({
605
- marks: z4.union([
606
- z4.array(
607
- z4.discriminatedUnion("type", [
608
- z4.object({ type: z4.literal("bold") }),
609
- z4.object({ type: z4.literal("italic") }),
610
- z4.object({
611
- attrs: z4.object({
612
- class: z4.string().nullable(),
613
- href: z4.union([
614
- z4.url(),
615
- z4.literal("#"),
616
- z4.string().regex(DYNAMIC_TOKEN_REGEX),
617
- z4.string().regex(ROOT_RELATIVE_PATH_REGEX)
612
+ import { z as z5 } from "zod";
613
+ var enumOrOmit = (...vals) => z5.string().transform((val) => vals.includes(val) ? val : void 0).optional();
614
+ var TiptapText = z5.object({
615
+ marks: z5.union([
616
+ z5.array(
617
+ z5.discriminatedUnion("type", [
618
+ z5.object({ type: z5.literal("bold") }),
619
+ z5.object({ type: z5.literal("italic") }),
620
+ z5.object({
621
+ attrs: z5.object({
622
+ class: z5.string().nullable(),
623
+ href: z5.union([
624
+ z5.url(),
625
+ z5.literal("#"),
626
+ z5.string().regex(DYNAMIC_TOKEN_REGEX),
627
+ z5.string().regex(ROOT_RELATIVE_PATH_REGEX)
618
628
  ]),
619
- rel: z4.string().default("noopener noreferrer nofollow"),
620
- target: z4.string().default("_blank")
629
+ rel: z5.string().default("noopener noreferrer nofollow"),
630
+ target: z5.string().default("_blank")
621
631
  }),
622
- type: z4.literal("link")
632
+ type: z5.literal("link")
623
633
  }),
624
- z4.object({ type: z4.literal("strike") }),
625
- z4.object({
626
- attrs: z4.object({
634
+ z5.object({ type: z5.literal("strike") }),
635
+ z5.object({
636
+ attrs: z5.object({
627
637
  color: enumOrOmit(...textColorNames).default(TextColorName.base),
628
638
  fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
629
639
  }),
630
- type: z4.literal("textStyle")
640
+ type: z5.literal("textStyle")
631
641
  })
632
642
  ])
633
643
  ),
634
- z4.strictObject({}).transform(() => [])
644
+ z5.strictObject({}).transform(() => [])
635
645
  ]).optional(),
636
- text: z4.string().default(""),
637
- type: z4.literal("text").default("text")
646
+ text: z5.string().default(""),
647
+ type: z5.literal("text").default("text")
638
648
  });
639
- var TiptapParagraph = z4.object({
640
- attrs: z4.object({
649
+ var TiptapParagraph = z5.object({
650
+ attrs: z5.object({
641
651
  textAlign: enumOrOmit(...textAlignments)
642
652
  }).default({ textAlign: TextAlignment.start }),
643
- content: z4.union([z4.array(TiptapText), z4.strictObject({}).transform(() => [])]).default(() => []),
644
- type: z4.literal("paragraph").default("paragraph")
653
+ content: z5.union([z5.array(TiptapText), z5.strictObject({}).transform(() => [])]).default(() => []),
654
+ type: z5.literal("paragraph").default("paragraph")
645
655
  });
646
- var TiptapDocument = z4.object({
647
- attrs: z4.object({
656
+ var TiptapDocument = z5.object({
657
+ attrs: z5.object({
648
658
  blockSpacing: enumOrOmit(...spacings)
649
659
  }).default({ blockSpacing: Spacing.base }),
650
- content: z4.union([z4.array(TiptapParagraph), z4.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
651
- type: z4.literal("doc").default("doc")
660
+ content: z5.union([z5.array(TiptapParagraph), z5.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
661
+ type: z5.literal("doc").default("doc")
652
662
  });
653
- var CABTextTier = z4.object({
654
- threshold: z4.number().int().nonnegative(),
655
- thresholds: z4.record(z4.string(), z4.number().int().nonnegative()).default(() => ({})),
656
- tierId: z4.string().optional(),
657
- tierType: z4.enum(progressTierTypes).default(ProgressTierType.shipping)
663
+ var CABTextTier = z5.object({
664
+ threshold: z5.number().int().nonnegative(),
665
+ thresholds: z5.record(z5.string(), z5.number().int().nonnegative()).default(() => ({})),
666
+ tierId: z5.string().optional(),
667
+ tierType: z5.enum(progressTierTypes).default(ProgressTierType.shipping)
658
668
  });
659
- var CABTextSection = z4.object({
669
+ var CABTextSection = z5.object({
660
670
  ...CABVariableFields,
661
- buttonField: z4.enum(buttonFields).optional(),
662
- content: z4.record(z4.string(), z4.union([z4.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
663
- name: z4.string().optional(),
664
- optionId: z4.number().optional(),
665
- sectionId: z4.uuid().default(() => uuidv72()),
666
- sectionType: z4.literal(SectionType.text).default(SectionType.text),
671
+ buttonField: z5.enum(buttonFields).optional(),
672
+ content: z5.record(z5.string(), z5.union([z5.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
673
+ name: z5.string().optional(),
674
+ optionId: z5.number().optional(),
675
+ sectionId: z5.uuid().default(() => uuidv72()),
676
+ sectionType: z5.literal(SectionType.text).default(SectionType.text),
667
677
  tier: CABTextTier.optional()
668
678
  }).superRefine(({ buttonField, content }, ctx) => {
669
679
  if (buttonField === ButtonField.destinationUrl && content) {
@@ -685,35 +695,35 @@ var CABTextSection = z4.object({
685
695
  });
686
696
 
687
697
  // src/schema/widgets/checkout-and-beyond/button.ts
688
- var CABButtonContent = z5.lazy(
689
- () => z5.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
698
+ var CABButtonContent = z6.lazy(
699
+ () => z6.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
690
700
  );
691
- var CABButtonSection = z5.object({
701
+ var CABButtonSection = z6.object({
692
702
  ...CABVariableFields,
693
- action: z5.union([z5.literal(""), z5.enum(buttonActions)]).default(""),
694
- buttonStyle: z5.enum(buttonStyles).default(ButtonStyle.primary),
695
- custom: z5.object({
696
- color: z5.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
697
- height: z5.number().default(52),
698
- width: z5.number().default(300)
703
+ action: z6.union([z6.literal(""), z6.enum(buttonActions)]).default(""),
704
+ buttonStyle: z6.enum(buttonStyles).default(ButtonStyle.primary),
705
+ custom: z6.object({
706
+ color: z6.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
707
+ height: z6.number().default(52),
708
+ width: z6.number().default(300)
699
709
  }).default({
700
710
  color: "#005bd3",
701
711
  height: 52,
702
712
  width: 300
703
713
  }),
704
- disableDowngrade: z5.boolean().default(false),
705
- name: z5.string().optional(),
706
- optionId: z5.number().optional(),
707
- popover: z5.object({
708
- alignment: z5.enum(textAlignments).default(TextAlignment.center),
709
- position: z5.enum(popoverPositions).default(PopoverPosition.blockStart)
714
+ disableDowngrade: z6.boolean().default(false),
715
+ name: z6.string().optional(),
716
+ optionId: z6.number().optional(),
717
+ popover: z6.object({
718
+ alignment: z6.enum(textAlignments).default(TextAlignment.center),
719
+ position: z6.enum(popoverPositions).default(PopoverPosition.blockStart)
710
720
  }).optional().default(() => ({
711
721
  alignment: TextAlignment.center,
712
722
  position: PopoverPosition.blockStart
713
723
  })),
714
- sectionId: z5.uuid().default(() => uuidv73()),
715
- sections: z5.union([z5.array(CABButtonContent), z5.strictObject({}).transform(() => [])]).default(() => []),
716
- sectionType: z5.literal(SectionType.button).default(SectionType.button),
724
+ sectionId: z6.uuid().default(() => uuidv73()),
725
+ sections: z6.union([z6.array(CABButtonContent), z6.strictObject({}).transform(() => [])]).default(() => []),
726
+ sectionType: z6.literal(SectionType.button).default(SectionType.button),
717
727
  /**
718
728
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
719
729
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -728,25 +738,25 @@ var CABButtonSection = z5.object({
728
738
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
729
739
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
730
740
  */
731
- tier: z5.object({ tierId: z5.string().min(1) }).optional(),
741
+ tier: z6.object({ tierId: z6.string().min(1) }).optional(),
732
742
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
733
- trackingUrl: z5.string().optional(),
743
+ trackingUrl: z6.string().optional(),
734
744
  /**
735
745
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
736
746
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
737
747
  */
738
- variableEffects: z5.array(CABVariableEffect).optional()
748
+ variableEffects: z6.array(CABVariableEffect).optional()
739
749
  });
740
750
 
741
751
  // src/schema/widgets/checkout-and-beyond/carousel.ts
742
- import { z as z10 } from "zod";
752
+ import { z as z11 } from "zod";
743
753
 
744
754
  // src/schema/widgets/checkout-and-beyond/offers.ts
745
- import { z as z9 } from "zod";
755
+ import { z as z10 } from "zod";
746
756
 
747
757
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
748
758
  import { v7 as uuidv74 } from "uuid";
749
- import { z as z6 } from "zod";
759
+ import { z as z7 } from "zod";
750
760
 
751
761
  // src/schema/widgets/checkout-and-beyond/constants.ts
752
762
  import { uniqBy } from "es-toolkit";
@@ -800,77 +810,77 @@ var targetAreas = {
800
810
  };
801
811
 
802
812
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
803
- var CABDiscount = z6.object({
804
- amount: z6.union([z6.number(), z6.string()]).catch(0),
805
- discountedBy: z6.string().optional(),
806
- discountedFrom: z6.enum(discountSources).optional().catch(void 0),
807
- type: z6.enum(discountTypes).catch("none")
813
+ var CABDiscount = z7.object({
814
+ amount: z7.union([z7.number(), z7.string()]).catch(0),
815
+ discountedBy: z7.string().optional(),
816
+ discountedFrom: z7.enum(discountSources).optional().catch(void 0),
817
+ type: z7.enum(discountTypes).catch("none")
808
818
  });
809
- var CABIntegrations = z6.object({
810
- judgeme: z6.boolean().default(false),
811
- junip: z6.boolean().default(false),
812
- klaviyo: z6.boolean().default(false),
813
- loox: z6.boolean().default(false),
814
- okendo: z6.boolean().default(false),
815
- opinew: z6.boolean().default(false),
816
- reviewsio: z6.boolean().default(false),
817
- stamped: z6.boolean().default(false),
818
- yotpo: z6.boolean().default(false)
819
+ var CABIntegrations = z7.object({
820
+ judgeme: z7.boolean().default(false),
821
+ junip: z7.boolean().default(false),
822
+ klaviyo: z7.boolean().default(false),
823
+ loox: z7.boolean().default(false),
824
+ okendo: z7.boolean().default(false),
825
+ opinew: z7.boolean().default(false),
826
+ reviewsio: z7.boolean().default(false),
827
+ stamped: z7.boolean().default(false),
828
+ yotpo: z7.boolean().default(false)
819
829
  });
820
- var CABVariantLabels = z6.object({
821
- variantOption: z6.string().optional().catch(void 0),
822
- variantOptions: z6.string().optional().catch(void 0)
830
+ var CABVariantLabels = z7.object({
831
+ variantOption: z7.string().optional().catch(void 0),
832
+ variantOptions: z7.string().optional().catch(void 0)
823
833
  });
824
- var CABDataSourceSection = z6.object({
825
- dataSourceId: z6.number().nullable().default(null),
826
- dataSourcePath: z6.string().default(DEFAULT_ENDPOINTS[0].value),
834
+ var CABDataSourceSection = z7.object({
835
+ dataSourceId: z7.number().nullable().default(null),
836
+ dataSourcePath: z7.string().default(DEFAULT_ENDPOINTS[0].value),
827
837
  discount: CABDiscount.optional(),
828
838
  integrations: CABIntegrations.optional(),
829
- limit: z6.number().default(1),
830
- matchVariant: z6.boolean().default(false),
831
- matchVariantOutOfStock: z6.boolean().default(false),
832
- name: z6.string().default(DEFAULT_ENDPOINTS[0].label),
833
- productType: z6.enum(productTypes).optional(),
834
- sectionId: z6.uuid().default(() => uuidv74()),
835
- sectionType: z6.literal(SectionType.dataSource).default(SectionType.dataSource),
839
+ limit: z7.number().default(1),
840
+ matchVariant: z7.boolean().default(false),
841
+ matchVariantOutOfStock: z7.boolean().default(false),
842
+ name: z7.string().default(DEFAULT_ENDPOINTS[0].label),
843
+ productType: z7.enum(productTypes).optional(),
844
+ sectionId: z7.uuid().default(() => uuidv74()),
845
+ sectionType: z7.literal(SectionType.dataSource).default(SectionType.dataSource),
836
846
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
837
- subscriptionIsDefault: z6.boolean().default(false),
838
- treatAsGwp: z6.boolean().default(false),
847
+ subscriptionIsDefault: z7.boolean().default(false),
848
+ treatAsGwp: z7.boolean().default(false),
839
849
  variantLabels: CABVariantLabels.optional().catch(void 0)
840
850
  });
841
851
 
842
852
  // src/schema/widgets/checkout-and-beyond/products.ts
843
853
  import { v7 as uuidv76 } from "uuid";
844
- import { z as z8 } from "zod";
854
+ import { z as z9 } from "zod";
845
855
 
846
856
  // src/schema/widgets/checkout-and-beyond/product.ts
847
857
  import { v7 as uuidv75 } from "uuid";
848
- import { z as z7 } from "zod";
849
- var CABVariantContent = z7.lazy(
850
- () => z7.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
858
+ import { z as z8 } from "zod";
859
+ var CABVariantContent = z8.lazy(
860
+ () => z8.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
851
861
  );
852
- var CABProductSection = z7.object({
862
+ var CABProductSection = z8.object({
853
863
  ...CABVariableFields,
854
- name: z7.string().optional(),
855
- productId: z7.number().nullable().default(null),
856
- sectionId: z7.uuid().default(() => uuidv75()),
857
- sections: z7.union([z7.array(CABVariantContent), z7.strictObject({}).transform(() => [])]).default(() => []),
858
- sectionType: z7.literal(SectionType.product).default(SectionType.product),
859
- selectors: z7.record(z7.string(), z7.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
860
- variantMode: z7.enum(variantModes).default(VariantMode.multiple)
864
+ name: z8.string().optional(),
865
+ productId: z8.number().nullable().default(null),
866
+ sectionId: z8.uuid().default(() => uuidv75()),
867
+ sections: z8.union([z8.array(CABVariantContent), z8.strictObject({}).transform(() => [])]).default(() => []),
868
+ sectionType: z8.literal(SectionType.product).default(SectionType.product),
869
+ selectors: z8.record(z8.string(), z8.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
870
+ variantMode: z8.enum(variantModes).default(VariantMode.multiple)
861
871
  });
862
872
 
863
873
  // src/schema/widgets/checkout-and-beyond/products.ts
864
- var CABProductsSection = z8.object({
874
+ var CABProductsSection = z9.object({
865
875
  ...CABVariableFields,
866
- name: z8.string().optional(),
867
- sectionId: z8.uuid().default(() => uuidv76()),
868
- sections: z8.union([z8.array(z8.lazy(() => CABProductSection)), z8.strictObject({}).transform(() => [])]).default(() => []),
869
- sectionType: z8.literal(SectionType.products).default(SectionType.products)
876
+ name: z9.string().optional(),
877
+ sectionId: z9.uuid().default(() => uuidv76()),
878
+ sections: z9.union([z9.array(z9.lazy(() => CABProductSection)), z9.strictObject({}).transform(() => [])]).default(() => []),
879
+ sectionType: z9.literal(SectionType.products).default(SectionType.products)
870
880
  });
871
881
 
872
882
  // src/schema/widgets/checkout-and-beyond/offers.ts
873
- var CABOffersSection = z9.lazy(
883
+ var CABOffersSection = z10.lazy(
874
884
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
875
885
  /**
876
886
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -878,8 +888,8 @@ var CABOffersSection = z9.lazy(
878
888
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
879
889
  * hand-built tree keeps React CAB's dividerless rendering.
880
890
  */
881
- divider: z9.boolean().optional(),
882
- sections: z9.union([z9.array(z9.lazy(() => CABSection)), z9.strictObject({}).transform(() => [])]).default(() => [
891
+ divider: z10.boolean().optional(),
892
+ sections: z10.union([z10.array(z10.lazy(() => CABSection)), z10.strictObject({}).transform(() => [])]).default(() => [
883
893
  CABBannerSection.parse({
884
894
  buttonField: "undoAddToOrder",
885
895
  color: "success",
@@ -893,77 +903,77 @@ var CABOffersSection = z9.lazy(
893
903
  CABDataSourceSection.parse({}),
894
904
  CABProductsSection.parse({})
895
905
  ]),
896
- sectionType: z9.literal(SectionType.offers).default(SectionType.offers)
906
+ sectionType: z10.literal(SectionType.offers).default(SectionType.offers)
897
907
  })
898
908
  );
899
909
 
900
910
  // src/schema/widgets/checkout-and-beyond/carousel.ts
901
- var CABCarouselSection = z10.lazy(
911
+ var CABCarouselSection = z11.lazy(
902
912
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
903
- autoAdvanceInterval: z10.number().default(0),
904
- itemsAtOnce: z10.number().min(1).default(1),
913
+ autoAdvanceInterval: z11.number().default(0),
914
+ itemsAtOnce: z11.number().min(1).default(1),
905
915
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
906
- offersDirection: z10.enum(offersDirections).default("vertical"),
907
- sections: z10.union([z10.array(z10.lazy(() => CABSection)), z10.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
908
- sectionType: z10.literal(SectionType.carousel).default(SectionType.carousel)
916
+ offersDirection: z11.enum(offersDirections).default("vertical"),
917
+ sections: z11.union([z11.array(z11.lazy(() => CABSection)), z11.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
918
+ sectionType: z11.literal(SectionType.carousel).default(SectionType.carousel)
909
919
  })
910
920
  );
911
921
 
912
922
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
913
- import { z as z11 } from "zod";
914
- var CABCartLineSection = z11.lazy(
923
+ import { z as z12 } from "zod";
924
+ var CABCartLineSection = z12.lazy(
915
925
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
916
- sections: z11.union([z11.array(z11.lazy(() => CABSection)), z11.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
917
- sectionType: z11.literal(SectionType.cartLine).default(SectionType.cartLine)
926
+ sections: z12.union([z12.array(z12.lazy(() => CABSection)), z12.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
927
+ sectionType: z12.literal(SectionType.cartLine).default(SectionType.cartLine)
918
928
  })
919
929
  );
920
930
 
921
931
  // src/schema/widgets/checkout-and-beyond/discount.ts
922
932
  import { v7 as uuidv77 } from "uuid";
923
- import { z as z12 } from "zod";
924
- var CABDiscountSection = z12.object({
933
+ import { z as z13 } from "zod";
934
+ var CABDiscountSection = z13.object({
925
935
  ...CABVariableFields,
926
- amount: z12.union([z12.number(), z12.string()]).catch(0),
927
- discountedBy: z12.string().optional(),
928
- discountedFrom: z12.enum(discountSources).optional().catch(void 0),
929
- message: z12.string().optional(),
930
- name: z12.string().optional(),
931
- quantity: z12.number().default(1),
932
- sectionId: z12.uuid().default(() => uuidv77()),
933
- sectionType: z12.literal(SectionType.discount).default(SectionType.discount),
934
- type: z12.enum(discountTypes).catch("none")
936
+ amount: z13.union([z13.number(), z13.string()]).catch(0),
937
+ discountedBy: z13.string().optional(),
938
+ discountedFrom: z13.enum(discountSources).optional().catch(void 0),
939
+ message: z13.string().optional(),
940
+ name: z13.string().optional(),
941
+ quantity: z13.number().default(1),
942
+ sectionId: z13.uuid().default(() => uuidv77()),
943
+ sectionType: z13.literal(SectionType.discount).default(SectionType.discount),
944
+ type: z13.enum(discountTypes).catch("none")
935
945
  });
936
946
 
937
947
  // src/schema/widgets/checkout-and-beyond/monetize.ts
938
948
  import { v7 as uuidv78 } from "uuid";
939
- import { z as z13 } from "zod";
940
- var CABMonetizeAds = z13.object({
941
- requestId: z13.string().optional(),
949
+ import { z as z14 } from "zod";
950
+ var CABMonetizeAds = z14.object({
951
+ requestId: z14.string().optional(),
942
952
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
943
- testing: z13.boolean().default(false)
953
+ testing: z14.boolean().default(false)
944
954
  });
945
- var CABMonetizeSection = z13.object({
955
+ var CABMonetizeSection = z14.object({
946
956
  ...CABVariableFields,
947
957
  ads: CABMonetizeAds.optional(),
948
- name: z13.string().optional(),
958
+ name: z14.string().optional(),
949
959
  /**
950
960
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
951
961
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
952
962
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
953
963
  */
954
- offers: z13.array(z13.lazy(() => CABSection)).optional(),
964
+ offers: z14.array(z14.lazy(() => CABSection)).optional(),
955
965
  /** Privacy Policy footer href (the widget's `privacy_policy_url` setting); read server-side for hydration, relayed by the client only on the legacy `/cab/monetize` fallback. */
956
- privacyPolicyUrl: z13.string().optional(),
957
- sectionId: z13.uuid().default(() => uuidv78()),
958
- sectionType: z13.literal(SectionType.monetize).default(SectionType.monetize),
966
+ privacyPolicyUrl: z14.string().optional(),
967
+ sectionId: z14.uuid().default(() => uuidv78()),
968
+ sectionType: z14.literal(SectionType.monetize).default(SectionType.monetize),
959
969
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
960
- subVertical: z13.string().optional(),
970
+ subVertical: z14.string().optional(),
961
971
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
962
- vertical: z13.string().optional()
972
+ vertical: z14.string().optional()
963
973
  });
964
974
 
965
975
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
966
- import { z as z14 } from "zod";
976
+ import { z as z15 } from "zod";
967
977
 
968
978
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
969
979
  var GIFT_LABELS = {
@@ -1082,34 +1092,34 @@ var GIFT_LABELS = {
1082
1092
  };
1083
1093
 
1084
1094
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
1085
- var CABProgressTierExclusion = z14.object({
1086
- collectionIds: z14.array(z14.number().int().positive()).default(() => []),
1087
- productIds: z14.array(z14.number().int().positive()).default(() => []),
1088
- tags: z14.array(z14.string().min(1)).default(() => []),
1089
- type: z14.enum(progressTierExclusionTypes)
1095
+ var CABProgressTierExclusion = z15.object({
1096
+ collectionIds: z15.array(z15.number().int().positive()).default(() => []),
1097
+ productIds: z15.array(z15.number().int().positive()).default(() => []),
1098
+ tags: z15.array(z15.string().min(1)).default(() => []),
1099
+ type: z15.enum(progressTierExclusionTypes)
1090
1100
  });
1091
- var CABProgressTier = z14.object({
1101
+ var CABProgressTier = z15.object({
1092
1102
  /**
1093
1103
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
1094
1104
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
1095
1105
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
1096
1106
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
1097
1107
  */
1098
- discount: z14.object({ amount: z14.number().nonnegative(), type: z14.enum(["fixedAmount", "percentage"]) }).optional(),
1108
+ discount: z15.object({ amount: z15.number().nonnegative(), type: z15.enum(["fixedAmount", "percentage"]) }).optional(),
1099
1109
  /**
1100
1110
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
1101
1111
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
1102
1112
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
1103
1113
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
1104
1114
  */
1105
- exclusions: z14.array(CABProgressTierExclusion).default(() => []),
1115
+ exclusions: z15.array(CABProgressTierExclusion).default(() => []),
1106
1116
  /**
1107
1117
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
1108
1118
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
1109
1119
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
1110
1120
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
1111
1121
  */
1112
- filterOosVariants: z14.boolean().default(false),
1122
+ filterOosVariants: z15.boolean().default(false),
1113
1123
  /**
1114
1124
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
1115
1125
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -1117,10 +1127,10 @@ var CABProgressTier = z14.object({
1117
1127
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
1118
1128
  * tree is complete.
1119
1129
  */
1120
- gift: z14.object({
1121
- productId: z14.number().int().positive(),
1122
- title: z14.string().optional(),
1123
- variantIds: z14.array(z14.number().int().positive()).default(() => [])
1130
+ gift: z15.object({
1131
+ productId: z15.number().int().positive(),
1132
+ title: z15.string().optional(),
1133
+ variantIds: z15.array(z15.number().int().positive()).default(() => [])
1124
1134
  }).optional(),
1125
1135
  /**
1126
1136
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -1140,7 +1150,7 @@ var CABProgressTier = z14.object({
1140
1150
  * renderer never spells a fallback), which also makes a tree authored before this field render at
1141
1151
  * React's size rather than the old hardcoded 20.
1142
1152
  */
1143
- iconSizePx: z14.number().int().min(1).max(64).default(18),
1153
+ iconSizePx: z15.number().int().min(1).max(64).default(18),
1144
1154
  /**
1145
1155
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
1146
1156
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -1150,35 +1160,35 @@ var CABProgressTier = z14.object({
1150
1160
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
1151
1161
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
1152
1162
  */
1153
- label: z14.record(z14.string(), z14.string()).optional(),
1163
+ label: z15.record(z15.string(), z15.string()).optional(),
1154
1164
  /**
1155
1165
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
1156
1166
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
1157
1167
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
1158
1168
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
1159
1169
  */
1160
- productTierImage: z14.boolean().default(false),
1170
+ productTierImage: z15.boolean().default(false),
1161
1171
  /**
1162
1172
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
1163
1173
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
1164
1174
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
1165
1175
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
1166
1176
  */
1167
- threshold: z14.number().int().nonnegative(),
1177
+ threshold: z15.number().int().nonnegative(),
1168
1178
  /**
1169
1179
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
1170
1180
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
1171
1181
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
1172
1182
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
1173
1183
  */
1174
- thresholds: z14.record(z14.string(), z14.number().int().nonnegative()).default(() => ({})),
1184
+ thresholds: z15.record(z15.string(), z15.number().int().nonnegative()).default(() => ({})),
1175
1185
  /**
1176
1186
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
1177
1187
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
1178
1188
  * shipping bar (single unlabeled tier, no gift).
1179
1189
  */
1180
- tierId: z14.string().optional(),
1181
- tierType: z14.enum(progressTierTypes).default(ProgressTierType.shipping),
1190
+ tierId: z15.string().optional(),
1191
+ tierType: z15.enum(progressTierTypes).default(ProgressTierType.shipping),
1182
1192
  /**
1183
1193
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
1184
1194
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -1189,9 +1199,9 @@ var CABProgressTier = z14.object({
1189
1199
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
1190
1200
  * template text supplies grammatically-neutral wording around the token.
1191
1201
  */
1192
- unit: z14.enum(progressTierUnits).default(ProgressTierUnit.currency)
1202
+ unit: z15.enum(progressTierUnits).default(ProgressTierUnit.currency)
1193
1203
  });
1194
- var CABProgressBarSection = z14.lazy(
1204
+ var CABProgressBarSection = z15.lazy(
1195
1205
  () => CABLayoutSection.omit({ sectionType: true }).extend({
1196
1206
  /**
1197
1207
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -1200,35 +1210,35 @@ var CABProgressBarSection = z14.lazy(
1200
1210
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
1201
1211
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
1202
1212
  */
1203
- barId: z14.string().optional(),
1213
+ barId: z15.string().optional(),
1204
1214
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
1205
- countryCodes: z14.array(z14.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1215
+ countryCodes: z15.array(z15.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1206
1216
  /**
1207
1217
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
1208
1218
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
1209
1219
  */
1210
- excludeCountryCodes: z14.array(z14.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1220
+ excludeCountryCodes: z15.array(z15.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1211
1221
  /**
1212
1222
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
1213
1223
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
1214
1224
  * adds the cart's discount allocations back to the live subtotal.
1215
1225
  */
1216
- excludeDiscountInSubtotal: z14.boolean().default(false),
1226
+ excludeDiscountInSubtotal: z15.boolean().default(false),
1217
1227
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
1218
- excludedVariantIds: z14.array(z14.number().int().positive()).default(() => []),
1228
+ excludedVariantIds: z15.array(z15.number().int().positive()).default(() => []),
1219
1229
  /**
1220
1230
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
1221
1231
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
1222
1232
  */
1223
- freeShippingOnSubscription: z14.boolean().default(false),
1233
+ freeShippingOnSubscription: z15.boolean().default(false),
1224
1234
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
1225
- giftAreaTitle: z14.record(z14.string(), z14.string()).default(() => ({ en: "FREE GIFTS" })),
1235
+ giftAreaTitle: z15.record(z15.string(), z15.string()).default(() => ({ en: "FREE GIFTS" })),
1226
1236
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
1227
- giftLabels: z14.object({
1228
- addGift: z14.record(z14.string(), z14.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1229
- remove: z14.record(z14.string(), z14.string()).default(() => ({ ...GIFT_LABELS.remove })),
1230
- selectOptions: z14.record(z14.string(), z14.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1231
- yourGift: z14.record(z14.string(), z14.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1237
+ giftLabels: z15.object({
1238
+ addGift: z15.record(z15.string(), z15.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1239
+ remove: z15.record(z15.string(), z15.string()).default(() => ({ ...GIFT_LABELS.remove })),
1240
+ selectOptions: z15.record(z15.string(), z15.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1241
+ yourGift: z15.record(z15.string(), z15.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1232
1242
  }).default(() => ({
1233
1243
  addGift: { ...GIFT_LABELS.addGift },
1234
1244
  remove: { ...GIFT_LABELS.remove },
@@ -1236,38 +1246,38 @@ var CABProgressBarSection = z14.lazy(
1236
1246
  yourGift: { ...GIFT_LABELS.yourGift }
1237
1247
  })),
1238
1248
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
1239
- name: z14.string().default("Order progress"),
1249
+ name: z15.string().default("Order progress"),
1240
1250
  /**
1241
1251
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
1242
1252
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
1243
1253
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
1244
1254
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
1245
1255
  */
1246
- progressColor: z14.string().optional(),
1247
- sectionType: z14.literal(SectionType.progressBar).default(SectionType.progressBar),
1256
+ progressColor: z15.string().optional(),
1257
+ sectionType: z15.literal(SectionType.progressBar).default(SectionType.progressBar),
1248
1258
  /**
1249
1259
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
1250
1260
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
1251
1261
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
1252
1262
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
1253
1263
  */
1254
- tiers: z14.union([z14.array(CABProgressTier), z14.strictObject({}).transform(() => [])]).default(() => [])
1264
+ tiers: z15.union([z15.array(CABProgressTier), z15.strictObject({}).transform(() => [])]).default(() => [])
1255
1265
  })
1256
1266
  );
1257
1267
 
1258
1268
  // src/schema/widgets/checkout-and-beyond/quantity.ts
1259
1269
  import { v7 as uuidv79 } from "uuid";
1260
- import { z as z15 } from "zod";
1261
- var CABQuantitySection = z15.object({
1270
+ import { z as z16 } from "zod";
1271
+ var CABQuantitySection = z16.object({
1262
1272
  ...CABVariableFields,
1263
- errorMessages: z15.record(
1264
- z15.string(),
1265
- z15.object({
1273
+ errorMessages: z16.record(
1274
+ z16.string(),
1275
+ z16.object({
1266
1276
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
1267
- increment: z15.string().optional(),
1268
- max: z15.string().optional(),
1269
- min: z15.string().optional(),
1270
- neg: z15.string().optional()
1277
+ increment: z16.string().optional(),
1278
+ max: z16.string().optional(),
1279
+ min: z16.string().optional(),
1280
+ neg: z16.string().optional()
1271
1281
  })
1272
1282
  ).default({
1273
1283
  en: {
@@ -1277,18 +1287,18 @@ var CABQuantitySection = z15.object({
1277
1287
  neg: "Quantity cannot be negative"
1278
1288
  }
1279
1289
  }),
1280
- inputType: z15.enum(quantityInputs).default(QuantityInput.select),
1281
- max: z15.number().min(1).max(100).default(10),
1282
- min: z15.number().min(1).default(1),
1290
+ inputType: z16.enum(quantityInputs).default(QuantityInput.select),
1291
+ max: z16.number().min(1).max(100).default(10),
1292
+ min: z16.number().min(1).default(1),
1283
1293
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
1284
- name: z15.string().default("Quantity"),
1285
- sectionId: z15.uuid().default(() => uuidv79()),
1286
- sectionType: z15.literal(SectionType.quantity).default(SectionType.quantity)
1294
+ name: z16.string().default("Quantity"),
1295
+ sectionId: z16.uuid().default(() => uuidv79()),
1296
+ sectionType: z16.literal(SectionType.quantity).default(SectionType.quantity)
1287
1297
  });
1288
1298
 
1289
1299
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1290
1300
  import { v7 as uuidv710 } from "uuid";
1291
- import { z as z16 } from "zod";
1301
+ import { z as z17 } from "zod";
1292
1302
 
1293
1303
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
1294
1304
  var REVIEW_LABELS = {
@@ -1351,68 +1361,69 @@ var REVIEW_LABELS = {
1351
1361
  };
1352
1362
 
1353
1363
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1354
- var CABReviewsSection = z16.object({
1364
+ var CABReviewsSection = z17.object({
1355
1365
  ...CABVariableFields,
1356
- color: z16.string().default("#fadb14"),
1366
+ color: z17.string().default("#fadb14"),
1357
1367
  /**
1358
1368
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
1359
1369
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
1360
1370
  * or merchant work.
1361
1371
  */
1362
- countLabels: z16.object({
1363
- one: z16.record(z16.string(), z16.string()).default(() => ({ ...REVIEW_LABELS.one })),
1364
- other: z16.record(z16.string(), z16.string()).default(() => ({ ...REVIEW_LABELS.other }))
1372
+ countLabels: z17.object({
1373
+ one: z17.record(z17.string(), z17.string()).default(() => ({ ...REVIEW_LABELS.one })),
1374
+ other: z17.record(z17.string(), z17.string()).default(() => ({ ...REVIEW_LABELS.other }))
1365
1375
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
1366
- name: z16.string().optional(),
1367
- sectionId: z16.uuid().default(() => uuidv710()),
1368
- sectionType: z16.literal(SectionType.reviews).default(SectionType.reviews),
1369
- size: z16.enum(reviewsSizes).default(ReviewsSize.default),
1376
+ name: z17.string().optional(),
1377
+ sectionId: z17.uuid().default(() => uuidv710()),
1378
+ sectionType: z17.literal(SectionType.reviews).default(SectionType.reviews),
1379
+ size: z17.enum(reviewsSizes).default(ReviewsSize.default),
1370
1380
  /**
1371
1381
  * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
1372
1382
  * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
1373
1383
  * string: its converter must validate and fall back to this default rather than let one odd value drop
1374
1384
  * the whole reviews section.
1375
1385
  */
1376
- strokeColor: z16.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
1386
+ strokeColor: z17.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
1377
1387
  /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
1378
- strokeWidth: z16.number().nonnegative().default(0)
1388
+ strokeWidth: z17.number().nonnegative().default(0)
1379
1389
  });
1380
1390
 
1381
1391
  // src/schema/widgets/checkout-and-beyond/separator.ts
1382
1392
  import { v7 as uuidv711 } from "uuid";
1383
- import { z as z17 } from "zod";
1384
- var CABSeparatorSection = z17.object({
1393
+ import { z as z18 } from "zod";
1394
+ var CABSeparatorSection = z18.object({
1385
1395
  ...CABVariableFields,
1386
- sectionId: z17.uuid().default(() => uuidv711()),
1387
- sectionType: z17.literal(SectionType.separator).default(SectionType.separator)
1396
+ sectionId: z18.uuid().default(() => uuidv711()),
1397
+ sectionType: z18.literal(SectionType.separator).default(SectionType.separator)
1388
1398
  });
1389
1399
 
1390
1400
  // src/schema/widgets/checkout-and-beyond/variants.ts
1391
1401
  import { slice } from "es-toolkit/compat";
1392
1402
  import { v7 as uuidv712 } from "uuid";
1393
- import { z as z18 } from "zod";
1394
- var CABVariantsSection = z18.object({
1403
+ import { z as z19 } from "zod";
1404
+ var CABVariantsSection = z19.object({
1395
1405
  ...CABVariableFields,
1396
- hideOutOfStockVariants: z18.boolean().default(false),
1397
- name: z18.string().optional(),
1398
- sectionId: z18.uuid().default(() => uuidv712()),
1399
- sectionType: z18.literal(SectionType.variants).default(SectionType.variants),
1400
- selector: z18.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1401
- variantMode: z18.enum(variantModes).default(VariantMode.multiple)
1406
+ hideOutOfStockVariants: z19.boolean().default(false),
1407
+ name: z19.string().optional(),
1408
+ sectionId: z19.uuid().default(() => uuidv712()),
1409
+ sectionType: z19.literal(SectionType.variants).default(SectionType.variants),
1410
+ selector: z19.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1411
+ /** `productGroup` is additive (REB-24817): a renderer without group support must render nothing for it. */
1412
+ variantMode: z19.enum(variantsModes).default(VariantsMode.multiple)
1402
1413
  });
1403
1414
 
1404
1415
  // src/schema/widgets/checkout-and-beyond/shared.ts
1405
- var CABBorder = z19.object({
1406
- radius: z19.enum(borderRadii).default(BorderRadius.base),
1407
- style: z19.enum(borderStyles).default(BorderStyle.none),
1408
- width: z19.enum(borderWidths).default(BorderWidth.base)
1416
+ var CABBorder = z20.object({
1417
+ radius: z20.enum(borderRadii).default(BorderRadius.base),
1418
+ style: z20.enum(borderStyles).default(BorderStyle.none),
1419
+ width: z20.enum(borderWidths).default(BorderWidth.base)
1409
1420
  }).default({
1410
1421
  radius: BorderRadius.base,
1411
1422
  style: BorderStyle.none,
1412
1423
  width: BorderWidth.base
1413
1424
  });
1414
- var CABSection = z19.lazy(
1415
- () => z19.discriminatedUnion("sectionType", [
1425
+ var CABSection = z20.lazy(
1426
+ () => z20.discriminatedUnion("sectionType", [
1416
1427
  CABBannerSection,
1417
1428
  CABButtonSection,
1418
1429
  CABCarouselSection,
@@ -1435,50 +1446,50 @@ var CABSection = z19.lazy(
1435
1446
  );
1436
1447
 
1437
1448
  // src/schema/widgets/checkout-and-beyond/layout.ts
1438
- var GridItem = z20.union([z20.literal("auto"), z20.literal("fill"), z20.string().regex(/^\d+%$/), z20.number()]);
1439
- var CABLayoutWrapping = z20.object({
1440
- breakAt: z20.number().positive(),
1441
- maxPerLine: z20.number().int().positive()
1449
+ var GridItem = z21.union([z21.literal("auto"), z21.literal("fill"), z21.string().regex(/^\d+%$/), z21.number()]);
1450
+ var CABLayoutWrapping = z21.object({
1451
+ breakAt: z21.number().positive(),
1452
+ maxPerLine: z21.number().int().positive()
1442
1453
  });
1443
- var CABLayoutSection = z20.object({
1454
+ var CABLayoutSection = z21.object({
1444
1455
  ...CABVariableFields,
1445
- alignment: z20.object({
1446
- horizontal: z20.enum(horizontalAlignments).default(HorizontalAlignment.start),
1447
- vertical: z20.enum(verticalAlignments).default(VerticalAlignment.top)
1456
+ alignment: z21.object({
1457
+ horizontal: z21.enum(horizontalAlignments).default(HorizontalAlignment.start),
1458
+ vertical: z21.enum(verticalAlignments).default(VerticalAlignment.top)
1448
1459
  }).default({
1449
1460
  horizontal: HorizontalAlignment.start,
1450
1461
  vertical: VerticalAlignment.top
1451
1462
  }),
1452
- border: z20.lazy(() => CABBorder),
1453
- buttonField: z20.enum(buttonFields).optional(),
1454
- direction: z20.enum(directions).default(Direction.rows),
1463
+ border: z21.lazy(() => CABBorder),
1464
+ buttonField: z21.enum(buttonFields).optional(),
1465
+ direction: z21.enum(directions).default(Direction.rows),
1455
1466
  /**
1456
1467
  * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
1457
1468
  * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
1458
1469
  */
1459
- frame: z20.enum(layoutFrames).optional(),
1460
- grid: z20.object({
1461
- columns: z20.union([z20.array(GridItem), z20.undefined()]).default(() => ["auto"]),
1462
- rows: z20.union([z20.array(GridItem), z20.undefined()]).default(() => ["auto"])
1470
+ frame: z21.enum(layoutFrames).optional(),
1471
+ grid: z21.object({
1472
+ columns: z21.union([z21.array(GridItem), z21.undefined()]).default(() => ["auto"]),
1473
+ rows: z21.union([z21.array(GridItem), z21.undefined()]).default(() => ["auto"])
1463
1474
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
1464
- name: z20.string().optional(),
1465
- padding: z20.enum(spacings).default(Spacing.none),
1466
- sectionId: z20.uuid().default(() => uuidv713()),
1467
- sections: z20.union([z20.array(z20.lazy(() => CABSection)), z20.strictObject({}).transform(() => [])]).default(() => []),
1468
- sectionType: z20.literal(SectionType.layout).default(SectionType.layout),
1469
- spacing: z20.enum(spacings).default(Spacing.base),
1475
+ name: z21.string().optional(),
1476
+ padding: z21.enum(spacings).default(Spacing.none),
1477
+ sectionId: z21.uuid().default(() => uuidv713()),
1478
+ sections: z21.union([z21.array(z21.lazy(() => CABSection)), z21.strictObject({}).transform(() => [])]).default(() => []),
1479
+ sectionType: z21.literal(SectionType.layout).default(SectionType.layout),
1480
+ spacing: z21.enum(spacings).default(Spacing.base),
1470
1481
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
1471
- viewUrl: z20.string().optional(),
1472
- width: z20.number().default(100),
1482
+ viewUrl: z21.string().optional(),
1483
+ width: z21.number().default(100),
1473
1484
  wrapping: CABLayoutWrapping.optional()
1474
1485
  });
1475
1486
 
1476
1487
  // src/schema/widgets/checkout-and-beyond/banner.ts
1477
- var CABBannerSection = z21.lazy(
1488
+ var CABBannerSection = z22.lazy(
1478
1489
  () => CABLayoutSection.omit({ sectionType: true }).extend({
1479
- buttonField: z21.enum(buttonFields).optional(),
1480
- color: z21.enum(bannerColors).default("info"),
1481
- dismissible: z21.boolean().default(true),
1490
+ buttonField: z22.enum(buttonFields).optional(),
1491
+ color: z22.enum(bannerColors).default("info"),
1492
+ dismissible: z22.boolean().default(true),
1482
1493
  /**
1483
1494
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
1484
1495
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -1494,8 +1505,8 @@ var CABBannerSection = z21.lazy(
1494
1505
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
1495
1506
  * either strips first or teaches `normalizeTextContent` to strip this field.
1496
1507
  */
1497
- heading: z21.record(z21.string(), z21.string().refine(checkForHTML, NO_HTML)).optional(),
1498
- sectionType: z21.literal(SectionType.banner).default(SectionType.banner)
1508
+ heading: z22.record(z22.string(), z22.string().refine(checkForHTML, NO_HTML)).optional(),
1509
+ sectionType: z22.literal(SectionType.banner).default(SectionType.banner)
1499
1510
  })
1500
1511
  );
1501
1512
 
@@ -1732,7 +1743,7 @@ var OFFER_LABELS = {
1732
1743
  };
1733
1744
 
1734
1745
  // src/schema/widgets/checkout-and-beyond/root.ts
1735
- import { z as z22 } from "zod";
1746
+ import { z as z23 } from "zod";
1736
1747
 
1737
1748
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
1738
1749
  var UI_LABELS = {
@@ -1752,8 +1763,8 @@ var UI_LABELS = {
1752
1763
  };
1753
1764
 
1754
1765
  // src/schema/widgets/checkout-and-beyond/root.ts
1755
- var localized = (fallback) => z22.record(z22.string(), z22.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1756
- var CABUILabels = z22.object({
1766
+ var localized = (fallback) => z23.record(z23.string(), z23.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1767
+ var CABUILabels = z23.object({
1757
1768
  currentPage: localized(UI_LABELS.currentPage),
1758
1769
  guest: localized(UI_LABELS.guest),
1759
1770
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -1778,37 +1789,37 @@ var CABUILabels = z22.object({
1778
1789
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
1779
1790
  updating: { ...UI_LABELS.updating }
1780
1791
  }));
1781
- var TargetArea = z22.object({
1782
- fill: z22.boolean().optional(),
1783
- flip: z22.enum(["both", "horizontal", "vertical"]).optional(),
1784
- icon: z22.string(),
1785
- label: z22.string(),
1786
- width: z22.string()
1792
+ var TargetArea = z23.object({
1793
+ fill: z23.boolean().optional(),
1794
+ flip: z23.enum(["both", "horizontal", "vertical"]).optional(),
1795
+ icon: z23.string(),
1796
+ label: z23.string(),
1797
+ width: z23.string()
1787
1798
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
1788
- var CABTracking = z22.object({
1789
- enableAttribution: z22.boolean().nullish().transform((value) => value ?? true),
1790
- enableSource: z22.boolean().nullish().transform((value) => value ?? true),
1791
- enableWidget: z22.boolean().nullish().transform((value) => value ?? true)
1799
+ var CABTracking = z23.object({
1800
+ enableAttribution: z23.boolean().nullish().transform((value) => value ?? true),
1801
+ enableSource: z23.boolean().nullish().transform((value) => value ?? true),
1802
+ enableWidget: z23.boolean().nullish().transform((value) => value ?? true)
1792
1803
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
1793
- var CABExperiment = z22.object({
1794
- elementId: z22.number(),
1795
- experimentId: z22.number(),
1796
- experimentType: z22.string(),
1797
- selectedId: z22.number()
1804
+ var CABExperiment = z23.object({
1805
+ elementId: z23.number(),
1806
+ experimentId: z23.number(),
1807
+ experimentType: z23.string(),
1808
+ selectedId: z23.number()
1798
1809
  });
1799
1810
  var CABRootSection = CABLayoutSection.extend({
1800
- editorMode: z22.enum(editorModes).default(EditorMode.checkoutExtension),
1811
+ editorMode: z23.enum(editorModes).default(EditorMode.checkoutExtension),
1801
1812
  experiment: CABExperiment.optional(),
1802
1813
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
1803
1814
  // `null` must fall back rather than throw the widget; malformed values still throw.
1804
- previewMode: z22.boolean().nullish().transform((value) => value ?? false),
1805
- storeId: z22.number().nullable().default(null),
1815
+ previewMode: z23.boolean().nullish().transform((value) => value ?? false),
1816
+ storeId: z23.number().nullable().default(null),
1806
1817
  targetArea: TargetArea.nullable(),
1807
1818
  tracking: CABTracking,
1808
- type: z22.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1819
+ type: z23.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1809
1820
  uiLabels: CABUILabels,
1810
- version: z22.literal(2).default(2),
1811
- widgetId: z22.number().nullable().default(null)
1821
+ version: z23.literal(2).default(2),
1822
+ widgetId: z23.number().nullable().default(null)
1812
1823
  });
1813
1824
 
1814
1825
  // src/schema/widgets/checkout-and-beyond/switchLabels.ts
@@ -1950,6 +1961,7 @@ export {
1950
1961
  CABExperiment,
1951
1962
  CABImageSection,
1952
1963
  CABImageSectionFields,
1964
+ CABImageThumbnails,
1953
1965
  CABIntegrations,
1954
1966
  CABLayoutSection,
1955
1967
  CABLayoutWrapping,
@@ -2042,6 +2054,7 @@ export {
2042
2054
  VariableType,
2043
2055
  VariantMode,
2044
2056
  VariantSelector,
2057
+ VariantsMode,
2045
2058
  VerticalAlignment,
2046
2059
  WidgetType,
2047
2060
  bannerColors,
@@ -2111,6 +2124,7 @@ export {
2111
2124
  variableTypes,
2112
2125
  variantModes,
2113
2126
  variantSelectors,
2127
+ variantsModes,
2114
2128
  verticalAlignments,
2115
2129
  widgetTypes
2116
2130
  };