@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/widgetData.ts
2
- import { z as z31 } from "zod";
2
+ import { z as z32 } from "zod";
3
3
 
4
4
  // src/schema/widgets/abTestingPlaceholder.ts
5
5
  import { z } from "zod";
@@ -178,6 +178,8 @@ var variableTypes = ["boolean", "number", "text"];
178
178
  var VariableType = freezeEnum(variableTypes);
179
179
  var variantModes = ["multiple", "single"];
180
180
  var VariantMode = freezeEnum(variantModes);
181
+ var variantsModes = [...variantModes, "productGroup"];
182
+ var VariantsMode = freezeEnum(variantsModes);
181
183
  var variantSelectors = ["menu", "radio", "button"];
182
184
  var VariantSelector = freezeEnum(variantSelectors);
183
185
  var verticalAlignments = ["top", "middle", "bottom"];
@@ -267,17 +269,17 @@ var CheckoutExtension = z2.looseObject({
267
269
  });
268
270
 
269
271
  // src/schema/widgets/contentBlock.ts
270
- import { z as z25 } from "zod";
272
+ import { z as z26 } from "zod";
271
273
 
272
274
  // src/schema/widgets/checkout-and-beyond/root.ts
273
- import { z as z24 } from "zod";
275
+ import { z as z25 } from "zod";
274
276
 
275
277
  // src/schema/widgets/checkout-and-beyond/layout.ts
276
278
  import { v7 as uuidv713 } from "uuid";
277
- import { z as z23 } from "zod";
279
+ import { z as z24 } from "zod";
278
280
 
279
281
  // src/schema/widgets/checkout-and-beyond/shared.ts
280
- import { z as z22 } from "zod";
282
+ import { z as z23 } from "zod";
281
283
 
282
284
  // src/schema/widgets/checkout-and-beyond/banner.ts
283
285
  import { z as z3 } from "zod";
@@ -356,11 +358,11 @@ var CABBannerSection = z3.lazy(
356
358
 
357
359
  // src/schema/widgets/checkout-and-beyond/button.ts
358
360
  import { v7 as uuidv73 } from "uuid";
359
- import { z as z8 } from "zod";
361
+ import { z as z9 } from "zod";
360
362
 
361
363
  // src/schema/widgets/checkout-and-beyond/image.ts
362
364
  import { v7 as uuidv7 } from "uuid";
363
- import { z as z6 } from "zod";
365
+ import { z as z7 } from "zod";
364
366
 
365
367
  // src/schema/widgets/checkout-and-beyond/icons.ts
366
368
  var iconNames = [
@@ -446,11 +448,18 @@ var IconSize = freezeEnum(iconSizes);
446
448
  var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "warning"];
447
449
  var IconTone = freezeEnum(iconTones);
448
450
 
451
+ // src/schema/widgets/checkout-and-beyond/imageThumbnails.ts
452
+ import { z as z4 } from "zod";
453
+ var CABImageThumbnails = z4.object({
454
+ limit: z4.number().int().min(1).default(8),
455
+ perLine: z4.number().int().min(1).max(8).default(4)
456
+ });
457
+
449
458
  // src/schema/widgets/checkout-and-beyond/variables.ts
450
- import { z as z5 } from "zod";
459
+ import { z as z6 } from "zod";
451
460
 
452
461
  // src/schema/widgets/checkout-and-beyond/rule.ts
453
- import { z as z4 } from "zod";
462
+ import { z as z5 } from "zod";
454
463
  var ruleTypes = [
455
464
  "cart",
456
465
  "cart_count",
@@ -469,7 +478,7 @@ var ruleTypes = [
469
478
  "product_type",
470
479
  "product_vendor"
471
480
  ];
472
- var ruleType = z4.enum(ruleTypes);
481
+ var ruleType = z5.enum(ruleTypes);
473
482
  var RuleType = ruleType.enum;
474
483
  var ruleOperators = [
475
484
  "after",
@@ -484,124 +493,124 @@ var ruleOperators = [
484
493
  "greater_than",
485
494
  "less_than"
486
495
  ];
487
- var ruleOperator = z4.enum(ruleOperators);
496
+ var ruleOperator = z5.enum(ruleOperators);
488
497
  var RuleOperator = ruleOperator.enum;
489
- var RuleCondition = z4.object({
490
- operator: z4.enum(ruleOperators).default(RuleOperator.anything),
491
- products: z4.union([z4.array(z4.unknown()), z4.strictObject({}).transform(() => [])]).default(() => []),
492
- type: z4.enum(ruleTypes).default(RuleType.cart_subtotal),
493
- value: z4.coerce.string().default("")
498
+ var RuleCondition = z5.object({
499
+ operator: z5.enum(ruleOperators).default(RuleOperator.anything),
500
+ products: z5.union([z5.array(z5.unknown()), z5.strictObject({}).transform(() => [])]).default(() => []),
501
+ type: z5.enum(ruleTypes).default(RuleType.cart_subtotal),
502
+ value: z5.coerce.string().default("")
494
503
  });
495
- var RuleLogicBlock = z4.object({
496
- rules: z4.array(RuleCondition).default(() => [])
504
+ var RuleLogicBlock = z5.object({
505
+ rules: z5.array(RuleCondition).default(() => [])
497
506
  });
498
- var CABRulesetEntry = z4.object({
499
- exitIfMatched: z4.boolean().default(true),
500
- logic: z4.array(RuleLogicBlock).default(() => []),
501
- output: z4.array(
502
- z4.object({
503
- key: z4.string().default("should_show"),
504
- type: z4.literal("data_json").default("data_json"),
505
- value: z4.string().default("true")
507
+ var CABRulesetEntry = z5.object({
508
+ exitIfMatched: z5.boolean().default(true),
509
+ logic: z5.array(RuleLogicBlock).default(() => []),
510
+ output: z5.array(
511
+ z5.object({
512
+ key: z5.string().default("should_show"),
513
+ type: z5.literal("data_json").default("data_json"),
514
+ value: z5.string().default("true")
506
515
  })
507
516
  ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
508
517
  });
509
- var CABRuleset = z4.union([z4.array(CABRulesetEntry), z4.strictObject({}).transform(() => [])]).default(() => []);
518
+ var CABRuleset = z5.union([z5.array(CABRulesetEntry), z5.strictObject({}).transform(() => [])]).default(() => []);
510
519
 
511
520
  // src/schema/widgets/checkout-and-beyond/variables.ts
512
- var variableEffect = z5.enum(variableEffects);
513
- var CABVariableSeed = z5.object({
514
- dataSourceId: z5.number().nullable().default(null),
521
+ var variableEffect = z6.enum(variableEffects);
522
+ var CABVariableSeed = z6.object({
523
+ dataSourceId: z6.number().nullable().default(null),
515
524
  ruleset: CABRuleset
516
525
  });
517
- var CABBooleanVariable = z5.object({
526
+ var CABBooleanVariable = z6.object({
518
527
  /**
519
528
  * Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
520
529
  * from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
521
530
  * below; a cross-field default has no `.default()` spelling. An explicit value always wins.
522
531
  */
523
- defaultValue: z5.boolean().optional(),
524
- name: z5.string().min(1),
532
+ defaultValue: z6.boolean().optional(),
533
+ name: z6.string().min(1),
525
534
  seed: CABVariableSeed.optional(),
526
535
  /** Defaulted so every stored declaration (all boolean before `text` existed) parses unchanged. */
527
- type: z5.literal(VariableType.boolean).default(VariableType.boolean)
536
+ type: z6.literal(VariableType.boolean).default(VariableType.boolean)
528
537
  });
529
- var CABTextVariable = z5.object({
530
- defaultValue: z5.string(),
531
- name: z5.string().min(1),
532
- seed: z5.never().optional(),
533
- type: z5.literal(VariableType.text)
538
+ var CABTextVariable = z6.object({
539
+ defaultValue: z6.string(),
540
+ name: z6.string().min(1),
541
+ seed: z6.never().optional(),
542
+ type: z6.literal(VariableType.text)
534
543
  });
535
- var CABNumberVariable = z5.object({
536
- defaultValue: z5.number(),
537
- name: z5.string().min(1),
538
- seed: z5.never().optional(),
539
- type: z5.literal(VariableType.number)
544
+ var CABNumberVariable = z6.object({
545
+ defaultValue: z6.number(),
546
+ name: z6.string().min(1),
547
+ seed: z6.never().optional(),
548
+ type: z6.literal(VariableType.number)
540
549
  });
541
- var CABVariable = z5.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
550
+ var CABVariable = z6.union([CABTextVariable, CABNumberVariable, CABBooleanVariable]).transform(
542
551
  (variable) => variable.type === VariableType.boolean ? { ...variable, defaultValue: variable.defaultValue ?? variable.seed === void 0 } : variable
543
552
  );
544
- var CABVariableEffect = z5.object({
553
+ var CABVariableEffect = z6.object({
545
554
  effect: variableEffect.default(VariableEffect.toggle),
546
- variable: z5.string().min(1)
555
+ variable: z6.string().min(1)
547
556
  });
548
- var CABVisibility = z5.object({
549
- variable: z5.string().min(1),
550
- visibleWhen: z5.boolean().default(true)
557
+ var CABVisibility = z6.object({
558
+ variable: z6.string().min(1),
559
+ visibleWhen: z6.boolean().default(true)
551
560
  });
552
- var contentOperator = z5.enum(contentOperators);
553
- var resultCountOperator = z5.enum(resultCountOperators);
554
- var resultTagOperator = z5.enum(resultTagOperators);
555
- var mutatorEvent = z5.enum(mutatorEvents);
556
- var CABContentTrigger = z5.object({
561
+ var contentOperator = z6.enum(contentOperators);
562
+ var resultCountOperator = z6.enum(resultCountOperators);
563
+ var resultTagOperator = z6.enum(resultTagOperators);
564
+ var mutatorEvent = z6.enum(mutatorEvents);
565
+ var CABContentTrigger = z6.object({
557
566
  operator: contentOperator.default(ContentOperator.is_empty),
558
- type: z5.literal("content")
567
+ type: z6.literal("content")
559
568
  });
560
- var CABResultCountTrigger = z5.object({
569
+ var CABResultCountTrigger = z6.object({
561
570
  operator: resultCountOperator.default(ResultCountOperator.equals),
562
- type: z5.literal("result_count"),
563
- value: z5.number().default(0)
571
+ type: z6.literal("result_count"),
572
+ value: z6.number().default(0)
564
573
  });
565
- var CABResultTagTrigger = z5.object({
574
+ var CABResultTagTrigger = z6.object({
566
575
  operator: resultTagOperator.default(ResultTagOperator.contains),
567
- type: z5.literal("result_tag"),
568
- value: z5.string().min(1)
576
+ type: z6.literal("result_tag"),
577
+ value: z6.string().min(1)
569
578
  });
570
- var CABEventTrigger = z5.object({
579
+ var CABEventTrigger = z6.object({
571
580
  event: mutatorEvent,
572
- type: z5.literal("event")
581
+ type: z6.literal("event")
573
582
  });
574
- var CABVariableTrigger = z5.discriminatedUnion("type", [
583
+ var CABVariableTrigger = z6.discriminatedUnion("type", [
575
584
  CABContentTrigger,
576
585
  CABEventTrigger,
577
586
  CABResultCountTrigger,
578
587
  CABResultTagTrigger
579
588
  ]);
580
- var CABVariableMutator = z5.object({
589
+ var CABVariableMutator = z6.object({
581
590
  effect: variableEffect.default(VariableEffect.set_false),
582
- variable: z5.string().min(1),
591
+ variable: z6.string().min(1),
583
592
  when: CABVariableTrigger
584
593
  });
585
594
  var CABVariableFields = {
586
- mutators: z5.array(CABVariableMutator).optional(),
587
- variables: z5.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
595
+ mutators: z6.array(CABVariableMutator).optional(),
596
+ variables: z6.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
588
597
  message: "variable names must be unique within a section"
589
598
  }).optional(),
590
599
  visibility: CABVisibility.optional()
591
600
  };
592
601
 
593
602
  // src/schema/widgets/checkout-and-beyond/image.ts
594
- var CABImageSectionFields = z6.object({
603
+ var CABImageSectionFields = z7.object({
595
604
  ...CABVariableFields,
596
- altText: z6.string().refine(checkForHTML, NO_HTML).default(""),
605
+ altText: z7.string().refine(checkForHTML, NO_HTML).default(""),
597
606
  /**
598
607
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
599
608
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
600
609
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
601
610
  */
602
- aspectRatio: z6.number().positive().nullable().default(null),
603
- border: z6.lazy(() => CABBorder),
604
- buttonField: z6.enum(buttonFields).optional(),
611
+ aspectRatio: z7.number().positive().nullable().default(null),
612
+ border: z7.lazy(() => CABBorder),
613
+ buttonField: z7.enum(buttonFields).optional(),
605
614
  /**
606
615
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
607
616
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -620,29 +629,30 @@ var CABImageSectionFields = z6.object({
620
629
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
621
630
  * the risky half.
622
631
  */
623
- category: z6.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
632
+ category: z7.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
624
633
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
625
- iconSize: z6.enum(iconSizes).nullable().default(null),
634
+ iconSize: z7.enum(iconSizes).nullable().default(null),
626
635
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
627
- iconTone: z6.enum(iconTones).nullable().default(null),
628
- name: z6.string().optional(),
629
- naturalHeight: z6.number().default(0),
630
- naturalWidth: z6.number().default(0),
636
+ iconTone: z7.enum(iconTones).nullable().default(null),
637
+ name: z7.string().optional(),
638
+ naturalHeight: z7.number().default(0),
639
+ naturalWidth: z7.number().default(0),
631
640
  /**
632
641
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
633
642
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
634
643
  */
635
- objectFit: z6.enum(objectFits).default(ObjectFit.contain),
636
- sectionId: z6.uuid().default(() => uuidv7()),
637
- sectionType: z6.literal(SectionType.image).default(SectionType.image),
644
+ objectFit: z7.enum(objectFits).default(ObjectFit.contain),
645
+ sectionId: z7.uuid().default(() => uuidv7()),
646
+ sectionType: z7.literal(SectionType.image).default(SectionType.image),
638
647
  /**
639
648
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
640
649
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
641
650
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
642
651
  * server-chosen tier icon actually needs it.
643
652
  */
644
- source: z6.union([z6.url(), z6.literal(""), z6.string().regex(DYNAMIC_TOKEN_REGEX), z6.enum(iconNames)]).default(""),
645
- width: z6.number().default(100)
653
+ source: z7.union([z7.url(), z7.literal(""), z7.string().regex(DYNAMIC_TOKEN_REGEX), z7.enum(iconNames)]).default(""),
654
+ thumbnails: CABImageThumbnails.optional(),
655
+ width: z7.number().default(100)
646
656
  });
647
657
  var iconNameSet = new Set(iconNames);
648
658
  var isIconName = (source) => iconNameSet.has(source);
@@ -664,71 +674,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
664
674
  // src/schema/widgets/checkout-and-beyond/text.ts
665
675
  import { forEach, isString as isString2 } from "es-toolkit/compat";
666
676
  import { v7 as uuidv72 } from "uuid";
667
- import { z as z7 } from "zod";
668
- var enumOrOmit = (...vals) => z7.string().transform((val) => vals.includes(val) ? val : void 0).optional();
669
- var TiptapText = z7.object({
670
- marks: z7.union([
671
- z7.array(
672
- z7.discriminatedUnion("type", [
673
- z7.object({ type: z7.literal("bold") }),
674
- z7.object({ type: z7.literal("italic") }),
675
- z7.object({
676
- attrs: z7.object({
677
- class: z7.string().nullable(),
678
- href: z7.union([
679
- z7.url(),
680
- z7.literal("#"),
681
- z7.string().regex(DYNAMIC_TOKEN_REGEX),
682
- z7.string().regex(ROOT_RELATIVE_PATH_REGEX)
677
+ import { z as z8 } from "zod";
678
+ var enumOrOmit = (...vals) => z8.string().transform((val) => vals.includes(val) ? val : void 0).optional();
679
+ var TiptapText = z8.object({
680
+ marks: z8.union([
681
+ z8.array(
682
+ z8.discriminatedUnion("type", [
683
+ z8.object({ type: z8.literal("bold") }),
684
+ z8.object({ type: z8.literal("italic") }),
685
+ z8.object({
686
+ attrs: z8.object({
687
+ class: z8.string().nullable(),
688
+ href: z8.union([
689
+ z8.url(),
690
+ z8.literal("#"),
691
+ z8.string().regex(DYNAMIC_TOKEN_REGEX),
692
+ z8.string().regex(ROOT_RELATIVE_PATH_REGEX)
683
693
  ]),
684
- rel: z7.string().default("noopener noreferrer nofollow"),
685
- target: z7.string().default("_blank")
694
+ rel: z8.string().default("noopener noreferrer nofollow"),
695
+ target: z8.string().default("_blank")
686
696
  }),
687
- type: z7.literal("link")
697
+ type: z8.literal("link")
688
698
  }),
689
- z7.object({ type: z7.literal("strike") }),
690
- z7.object({
691
- attrs: z7.object({
699
+ z8.object({ type: z8.literal("strike") }),
700
+ z8.object({
701
+ attrs: z8.object({
692
702
  color: enumOrOmit(...textColorNames).default(TextColorName.base),
693
703
  fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
694
704
  }),
695
- type: z7.literal("textStyle")
705
+ type: z8.literal("textStyle")
696
706
  })
697
707
  ])
698
708
  ),
699
- z7.strictObject({}).transform(() => [])
709
+ z8.strictObject({}).transform(() => [])
700
710
  ]).optional(),
701
- text: z7.string().default(""),
702
- type: z7.literal("text").default("text")
711
+ text: z8.string().default(""),
712
+ type: z8.literal("text").default("text")
703
713
  });
704
- var TiptapParagraph = z7.object({
705
- attrs: z7.object({
714
+ var TiptapParagraph = z8.object({
715
+ attrs: z8.object({
706
716
  textAlign: enumOrOmit(...textAlignments)
707
717
  }).default({ textAlign: TextAlignment.start }),
708
- content: z7.union([z7.array(TiptapText), z7.strictObject({}).transform(() => [])]).default(() => []),
709
- type: z7.literal("paragraph").default("paragraph")
718
+ content: z8.union([z8.array(TiptapText), z8.strictObject({}).transform(() => [])]).default(() => []),
719
+ type: z8.literal("paragraph").default("paragraph")
710
720
  });
711
- var TiptapDocument = z7.object({
712
- attrs: z7.object({
721
+ var TiptapDocument = z8.object({
722
+ attrs: z8.object({
713
723
  blockSpacing: enumOrOmit(...spacings)
714
724
  }).default({ blockSpacing: Spacing.base }),
715
- content: z7.union([z7.array(TiptapParagraph), z7.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
716
- type: z7.literal("doc").default("doc")
725
+ content: z8.union([z8.array(TiptapParagraph), z8.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
726
+ type: z8.literal("doc").default("doc")
717
727
  });
718
- var CABTextTier = z7.object({
719
- threshold: z7.number().int().nonnegative(),
720
- thresholds: z7.record(z7.string(), z7.number().int().nonnegative()).default(() => ({})),
721
- tierId: z7.string().optional(),
722
- tierType: z7.enum(progressTierTypes).default(ProgressTierType.shipping)
728
+ var CABTextTier = z8.object({
729
+ threshold: z8.number().int().nonnegative(),
730
+ thresholds: z8.record(z8.string(), z8.number().int().nonnegative()).default(() => ({})),
731
+ tierId: z8.string().optional(),
732
+ tierType: z8.enum(progressTierTypes).default(ProgressTierType.shipping)
723
733
  });
724
- var CABTextSection = z7.object({
734
+ var CABTextSection = z8.object({
725
735
  ...CABVariableFields,
726
- buttonField: z7.enum(buttonFields).optional(),
727
- content: z7.record(z7.string(), z7.union([z7.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
728
- name: z7.string().optional(),
729
- optionId: z7.number().optional(),
730
- sectionId: z7.uuid().default(() => uuidv72()),
731
- sectionType: z7.literal(SectionType.text).default(SectionType.text),
736
+ buttonField: z8.enum(buttonFields).optional(),
737
+ content: z8.record(z8.string(), z8.union([z8.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
738
+ name: z8.string().optional(),
739
+ optionId: z8.number().optional(),
740
+ sectionId: z8.uuid().default(() => uuidv72()),
741
+ sectionType: z8.literal(SectionType.text).default(SectionType.text),
732
742
  tier: CABTextTier.optional()
733
743
  }).superRefine(({ buttonField, content }, ctx) => {
734
744
  if (buttonField === ButtonField.destinationUrl && content) {
@@ -750,35 +760,35 @@ var CABTextSection = z7.object({
750
760
  });
751
761
 
752
762
  // src/schema/widgets/checkout-and-beyond/button.ts
753
- var CABButtonContent = z8.lazy(
754
- () => z8.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
763
+ var CABButtonContent = z9.lazy(
764
+ () => z9.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
755
765
  );
756
- var CABButtonSection = z8.object({
766
+ var CABButtonSection = z9.object({
757
767
  ...CABVariableFields,
758
- action: z8.union([z8.literal(""), z8.enum(buttonActions)]).default(""),
759
- buttonStyle: z8.enum(buttonStyles).default(ButtonStyle.primary),
760
- custom: z8.object({
761
- color: z8.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
762
- height: z8.number().default(52),
763
- width: z8.number().default(300)
768
+ action: z9.union([z9.literal(""), z9.enum(buttonActions)]).default(""),
769
+ buttonStyle: z9.enum(buttonStyles).default(ButtonStyle.primary),
770
+ custom: z9.object({
771
+ color: z9.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
772
+ height: z9.number().default(52),
773
+ width: z9.number().default(300)
764
774
  }).default({
765
775
  color: "#005bd3",
766
776
  height: 52,
767
777
  width: 300
768
778
  }),
769
- disableDowngrade: z8.boolean().default(false),
770
- name: z8.string().optional(),
771
- optionId: z8.number().optional(),
772
- popover: z8.object({
773
- alignment: z8.enum(textAlignments).default(TextAlignment.center),
774
- position: z8.enum(popoverPositions).default(PopoverPosition.blockStart)
779
+ disableDowngrade: z9.boolean().default(false),
780
+ name: z9.string().optional(),
781
+ optionId: z9.number().optional(),
782
+ popover: z9.object({
783
+ alignment: z9.enum(textAlignments).default(TextAlignment.center),
784
+ position: z9.enum(popoverPositions).default(PopoverPosition.blockStart)
775
785
  }).optional().default(() => ({
776
786
  alignment: TextAlignment.center,
777
787
  position: PopoverPosition.blockStart
778
788
  })),
779
- sectionId: z8.uuid().default(() => uuidv73()),
780
- sections: z8.union([z8.array(CABButtonContent), z8.strictObject({}).transform(() => [])]).default(() => []),
781
- sectionType: z8.literal(SectionType.button).default(SectionType.button),
789
+ sectionId: z9.uuid().default(() => uuidv73()),
790
+ sections: z9.union([z9.array(CABButtonContent), z9.strictObject({}).transform(() => [])]).default(() => []),
791
+ sectionType: z9.literal(SectionType.button).default(SectionType.button),
782
792
  /**
783
793
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
784
794
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -793,96 +803,96 @@ var CABButtonSection = z8.object({
793
803
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
794
804
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
795
805
  */
796
- tier: z8.object({ tierId: z8.string().min(1) }).optional(),
806
+ tier: z9.object({ tierId: z9.string().min(1) }).optional(),
797
807
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
798
- trackingUrl: z8.string().optional(),
808
+ trackingUrl: z9.string().optional(),
799
809
  /**
800
810
  * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
801
811
  * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
802
812
  */
803
- variableEffects: z8.array(CABVariableEffect).optional()
813
+ variableEffects: z9.array(CABVariableEffect).optional()
804
814
  });
805
815
 
806
816
  // src/schema/widgets/checkout-and-beyond/carousel.ts
807
- import { z as z13 } from "zod";
817
+ import { z as z14 } from "zod";
808
818
 
809
819
  // src/schema/widgets/checkout-and-beyond/offers.ts
810
- import { z as z12 } from "zod";
820
+ import { z as z13 } from "zod";
811
821
 
812
822
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
813
823
  import { v7 as uuidv74 } from "uuid";
814
- import { z as z9 } from "zod";
815
- var CABDiscount = z9.object({
816
- amount: z9.union([z9.number(), z9.string()]).catch(0),
817
- discountedBy: z9.string().optional(),
818
- discountedFrom: z9.enum(discountSources).optional().catch(void 0),
819
- type: z9.enum(discountTypes).catch("none")
824
+ import { z as z10 } from "zod";
825
+ var CABDiscount = z10.object({
826
+ amount: z10.union([z10.number(), z10.string()]).catch(0),
827
+ discountedBy: z10.string().optional(),
828
+ discountedFrom: z10.enum(discountSources).optional().catch(void 0),
829
+ type: z10.enum(discountTypes).catch("none")
820
830
  });
821
- var CABIntegrations = z9.object({
822
- judgeme: z9.boolean().default(false),
823
- junip: z9.boolean().default(false),
824
- klaviyo: z9.boolean().default(false),
825
- loox: z9.boolean().default(false),
826
- okendo: z9.boolean().default(false),
827
- opinew: z9.boolean().default(false),
828
- reviewsio: z9.boolean().default(false),
829
- stamped: z9.boolean().default(false),
830
- yotpo: z9.boolean().default(false)
831
+ var CABIntegrations = z10.object({
832
+ judgeme: z10.boolean().default(false),
833
+ junip: z10.boolean().default(false),
834
+ klaviyo: z10.boolean().default(false),
835
+ loox: z10.boolean().default(false),
836
+ okendo: z10.boolean().default(false),
837
+ opinew: z10.boolean().default(false),
838
+ reviewsio: z10.boolean().default(false),
839
+ stamped: z10.boolean().default(false),
840
+ yotpo: z10.boolean().default(false)
831
841
  });
832
- var CABVariantLabels = z9.object({
833
- variantOption: z9.string().optional().catch(void 0),
834
- variantOptions: z9.string().optional().catch(void 0)
842
+ var CABVariantLabels = z10.object({
843
+ variantOption: z10.string().optional().catch(void 0),
844
+ variantOptions: z10.string().optional().catch(void 0)
835
845
  });
836
- var CABDataSourceSection = z9.object({
837
- dataSourceId: z9.number().nullable().default(null),
838
- dataSourcePath: z9.string().default(DEFAULT_ENDPOINTS[0].value),
846
+ var CABDataSourceSection = z10.object({
847
+ dataSourceId: z10.number().nullable().default(null),
848
+ dataSourcePath: z10.string().default(DEFAULT_ENDPOINTS[0].value),
839
849
  discount: CABDiscount.optional(),
840
850
  integrations: CABIntegrations.optional(),
841
- limit: z9.number().default(1),
842
- matchVariant: z9.boolean().default(false),
843
- matchVariantOutOfStock: z9.boolean().default(false),
844
- name: z9.string().default(DEFAULT_ENDPOINTS[0].label),
845
- productType: z9.enum(productTypes).optional(),
846
- sectionId: z9.uuid().default(() => uuidv74()),
847
- sectionType: z9.literal(SectionType.dataSource).default(SectionType.dataSource),
851
+ limit: z10.number().default(1),
852
+ matchVariant: z10.boolean().default(false),
853
+ matchVariantOutOfStock: z10.boolean().default(false),
854
+ name: z10.string().default(DEFAULT_ENDPOINTS[0].label),
855
+ productType: z10.enum(productTypes).optional(),
856
+ sectionId: z10.uuid().default(() => uuidv74()),
857
+ sectionType: z10.literal(SectionType.dataSource).default(SectionType.dataSource),
848
858
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
849
- subscriptionIsDefault: z9.boolean().default(false),
850
- treatAsGwp: z9.boolean().default(false),
859
+ subscriptionIsDefault: z10.boolean().default(false),
860
+ treatAsGwp: z10.boolean().default(false),
851
861
  variantLabels: CABVariantLabels.optional().catch(void 0)
852
862
  });
853
863
 
854
864
  // src/schema/widgets/checkout-and-beyond/products.ts
855
865
  import { v7 as uuidv76 } from "uuid";
856
- import { z as z11 } from "zod";
866
+ import { z as z12 } from "zod";
857
867
 
858
868
  // src/schema/widgets/checkout-and-beyond/product.ts
859
869
  import { v7 as uuidv75 } from "uuid";
860
- import { z as z10 } from "zod";
861
- var CABVariantContent = z10.lazy(
862
- () => z10.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
870
+ import { z as z11 } from "zod";
871
+ var CABVariantContent = z11.lazy(
872
+ () => z11.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
863
873
  );
864
- var CABProductSection = z10.object({
874
+ var CABProductSection = z11.object({
865
875
  ...CABVariableFields,
866
- name: z10.string().optional(),
867
- productId: z10.number().nullable().default(null),
868
- sectionId: z10.uuid().default(() => uuidv75()),
869
- sections: z10.union([z10.array(CABVariantContent), z10.strictObject({}).transform(() => [])]).default(() => []),
870
- sectionType: z10.literal(SectionType.product).default(SectionType.product),
871
- selectors: z10.record(z10.string(), z10.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
872
- variantMode: z10.enum(variantModes).default(VariantMode.multiple)
876
+ name: z11.string().optional(),
877
+ productId: z11.number().nullable().default(null),
878
+ sectionId: z11.uuid().default(() => uuidv75()),
879
+ sections: z11.union([z11.array(CABVariantContent), z11.strictObject({}).transform(() => [])]).default(() => []),
880
+ sectionType: z11.literal(SectionType.product).default(SectionType.product),
881
+ selectors: z11.record(z11.string(), z11.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
882
+ variantMode: z11.enum(variantModes).default(VariantMode.multiple)
873
883
  });
874
884
 
875
885
  // src/schema/widgets/checkout-and-beyond/products.ts
876
- var CABProductsSection = z11.object({
886
+ var CABProductsSection = z12.object({
877
887
  ...CABVariableFields,
878
- name: z11.string().optional(),
879
- sectionId: z11.uuid().default(() => uuidv76()),
880
- sections: z11.union([z11.array(z11.lazy(() => CABProductSection)), z11.strictObject({}).transform(() => [])]).default(() => []),
881
- sectionType: z11.literal(SectionType.products).default(SectionType.products)
888
+ name: z12.string().optional(),
889
+ sectionId: z12.uuid().default(() => uuidv76()),
890
+ sections: z12.union([z12.array(z12.lazy(() => CABProductSection)), z12.strictObject({}).transform(() => [])]).default(() => []),
891
+ sectionType: z12.literal(SectionType.products).default(SectionType.products)
882
892
  });
883
893
 
884
894
  // src/schema/widgets/checkout-and-beyond/offers.ts
885
- var CABOffersSection = z12.lazy(
895
+ var CABOffersSection = z13.lazy(
886
896
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
887
897
  /**
888
898
  * A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
@@ -890,8 +900,8 @@ var CABOffersSection = z12.lazy(
890
900
  * run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
891
901
  * hand-built tree keeps React CAB's dividerless rendering.
892
902
  */
893
- divider: z12.boolean().optional(),
894
- sections: z12.union([z12.array(z12.lazy(() => CABSection)), z12.strictObject({}).transform(() => [])]).default(() => [
903
+ divider: z13.boolean().optional(),
904
+ sections: z13.union([z13.array(z13.lazy(() => CABSection)), z13.strictObject({}).transform(() => [])]).default(() => [
895
905
  CABBannerSection.parse({
896
906
  buttonField: "undoAddToOrder",
897
907
  color: "success",
@@ -905,77 +915,77 @@ var CABOffersSection = z12.lazy(
905
915
  CABDataSourceSection.parse({}),
906
916
  CABProductsSection.parse({})
907
917
  ]),
908
- sectionType: z12.literal(SectionType.offers).default(SectionType.offers)
918
+ sectionType: z13.literal(SectionType.offers).default(SectionType.offers)
909
919
  })
910
920
  );
911
921
 
912
922
  // src/schema/widgets/checkout-and-beyond/carousel.ts
913
- var CABCarouselSection = z13.lazy(
923
+ var CABCarouselSection = z14.lazy(
914
924
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
915
- autoAdvanceInterval: z13.number().default(0),
916
- itemsAtOnce: z13.number().min(1).default(1),
925
+ autoAdvanceInterval: z14.number().default(0),
926
+ itemsAtOnce: z14.number().min(1).default(1),
917
927
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
918
- offersDirection: z13.enum(offersDirections).default("vertical"),
919
- sections: z13.union([z13.array(z13.lazy(() => CABSection)), z13.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
920
- sectionType: z13.literal(SectionType.carousel).default(SectionType.carousel)
928
+ offersDirection: z14.enum(offersDirections).default("vertical"),
929
+ sections: z14.union([z14.array(z14.lazy(() => CABSection)), z14.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
930
+ sectionType: z14.literal(SectionType.carousel).default(SectionType.carousel)
921
931
  })
922
932
  );
923
933
 
924
934
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
925
- import { z as z14 } from "zod";
926
- var CABCartLineSection = z14.lazy(
935
+ import { z as z15 } from "zod";
936
+ var CABCartLineSection = z15.lazy(
927
937
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
928
- sections: z14.union([z14.array(z14.lazy(() => CABSection)), z14.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
929
- sectionType: z14.literal(SectionType.cartLine).default(SectionType.cartLine)
938
+ sections: z15.union([z15.array(z15.lazy(() => CABSection)), z15.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
939
+ sectionType: z15.literal(SectionType.cartLine).default(SectionType.cartLine)
930
940
  })
931
941
  );
932
942
 
933
943
  // src/schema/widgets/checkout-and-beyond/discount.ts
934
944
  import { v7 as uuidv77 } from "uuid";
935
- import { z as z15 } from "zod";
936
- var CABDiscountSection = z15.object({
945
+ import { z as z16 } from "zod";
946
+ var CABDiscountSection = z16.object({
937
947
  ...CABVariableFields,
938
- amount: z15.union([z15.number(), z15.string()]).catch(0),
939
- discountedBy: z15.string().optional(),
940
- discountedFrom: z15.enum(discountSources).optional().catch(void 0),
941
- message: z15.string().optional(),
942
- name: z15.string().optional(),
943
- quantity: z15.number().default(1),
944
- sectionId: z15.uuid().default(() => uuidv77()),
945
- sectionType: z15.literal(SectionType.discount).default(SectionType.discount),
946
- type: z15.enum(discountTypes).catch("none")
948
+ amount: z16.union([z16.number(), z16.string()]).catch(0),
949
+ discountedBy: z16.string().optional(),
950
+ discountedFrom: z16.enum(discountSources).optional().catch(void 0),
951
+ message: z16.string().optional(),
952
+ name: z16.string().optional(),
953
+ quantity: z16.number().default(1),
954
+ sectionId: z16.uuid().default(() => uuidv77()),
955
+ sectionType: z16.literal(SectionType.discount).default(SectionType.discount),
956
+ type: z16.enum(discountTypes).catch("none")
947
957
  });
948
958
 
949
959
  // src/schema/widgets/checkout-and-beyond/monetize.ts
950
960
  import { v7 as uuidv78 } from "uuid";
951
- import { z as z16 } from "zod";
952
- var CABMonetizeAds = z16.object({
953
- requestId: z16.string().optional(),
961
+ import { z as z17 } from "zod";
962
+ var CABMonetizeAds = z17.object({
963
+ requestId: z17.string().optional(),
954
964
  /** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
955
- testing: z16.boolean().default(false)
965
+ testing: z17.boolean().default(false)
956
966
  });
957
- var CABMonetizeSection = z16.object({
967
+ var CABMonetizeSection = z17.object({
958
968
  ...CABVariableFields,
959
969
  ads: CABMonetizeAds.optional(),
960
- name: z16.string().optional(),
970
+ name: z17.string().optional(),
961
971
  /**
962
972
  * Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
963
973
  * context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
964
974
  * nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
965
975
  */
966
- offers: z16.array(z16.lazy(() => CABSection)).optional(),
976
+ offers: z17.array(z17.lazy(() => CABSection)).optional(),
967
977
  /** 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. */
968
- privacyPolicyUrl: z16.string().optional(),
969
- sectionId: z16.uuid().default(() => uuidv78()),
970
- sectionType: z16.literal(SectionType.monetize).default(SectionType.monetize),
978
+ privacyPolicyUrl: z17.string().optional(),
979
+ sectionId: z17.uuid().default(() => uuidv78()),
980
+ sectionType: z17.literal(SectionType.monetize).default(SectionType.monetize),
971
981
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
972
- subVertical: z16.string().optional(),
982
+ subVertical: z17.string().optional(),
973
983
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
974
- vertical: z16.string().optional()
984
+ vertical: z17.string().optional()
975
985
  });
976
986
 
977
987
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
978
- import { z as z17 } from "zod";
988
+ import { z as z18 } from "zod";
979
989
 
980
990
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
981
991
  var GIFT_LABELS = {
@@ -1094,34 +1104,34 @@ var GIFT_LABELS = {
1094
1104
  };
1095
1105
 
1096
1106
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
1097
- var CABProgressTierExclusion = z17.object({
1098
- collectionIds: z17.array(z17.number().int().positive()).default(() => []),
1099
- productIds: z17.array(z17.number().int().positive()).default(() => []),
1100
- tags: z17.array(z17.string().min(1)).default(() => []),
1101
- type: z17.enum(progressTierExclusionTypes)
1107
+ var CABProgressTierExclusion = z18.object({
1108
+ collectionIds: z18.array(z18.number().int().positive()).default(() => []),
1109
+ productIds: z18.array(z18.number().int().positive()).default(() => []),
1110
+ tags: z18.array(z18.string().min(1)).default(() => []),
1111
+ type: z18.enum(progressTierExclusionTypes)
1102
1112
  });
1103
- var CABProgressTier = z17.object({
1113
+ var CABProgressTier = z18.object({
1104
1114
  /**
1105
1115
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
1106
1116
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
1107
1117
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
1108
1118
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
1109
1119
  */
1110
- discount: z17.object({ amount: z17.number().nonnegative(), type: z17.enum(["fixedAmount", "percentage"]) }).optional(),
1120
+ discount: z18.object({ amount: z18.number().nonnegative(), type: z18.enum(["fixedAmount", "percentage"]) }).optional(),
1111
1121
  /**
1112
1122
  * Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
1113
1123
  * toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
1114
1124
  * the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
1115
1125
  * `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
1116
1126
  */
1117
- exclusions: z17.array(CABProgressTierExclusion).default(() => []),
1127
+ exclusions: z18.array(CABProgressTierExclusion).default(() => []),
1118
1128
  /**
1119
1129
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
1120
1130
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
1121
1131
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
1122
1132
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
1123
1133
  */
1124
- filterOosVariants: z17.boolean().default(false),
1134
+ filterOosVariants: z18.boolean().default(false),
1125
1135
  /**
1126
1136
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
1127
1137
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -1129,10 +1139,10 @@ var CABProgressTier = z17.object({
1129
1139
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
1130
1140
  * tree is complete.
1131
1141
  */
1132
- gift: z17.object({
1133
- productId: z17.number().int().positive(),
1134
- title: z17.string().optional(),
1135
- variantIds: z17.array(z17.number().int().positive()).default(() => [])
1142
+ gift: z18.object({
1143
+ productId: z18.number().int().positive(),
1144
+ title: z18.string().optional(),
1145
+ variantIds: z18.array(z18.number().int().positive()).default(() => [])
1136
1146
  }).optional(),
1137
1147
  /**
1138
1148
  * The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
@@ -1152,7 +1162,7 @@ var CABProgressTier = z17.object({
1152
1162
  * renderer never spells a fallback), which also makes a tree authored before this field render at
1153
1163
  * React's size rather than the old hardcoded 20.
1154
1164
  */
1155
- iconSizePx: z17.number().int().min(1).max(64).default(18),
1165
+ iconSizePx: z18.number().int().min(1).max(64).default(18),
1156
1166
  /**
1157
1167
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
1158
1168
  * type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
@@ -1162,35 +1172,35 @@ var CABProgressTier = z17.object({
1162
1172
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
1163
1173
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
1164
1174
  */
1165
- label: z17.record(z17.string(), z17.string()).optional(),
1175
+ label: z18.record(z18.string(), z18.string()).optional(),
1166
1176
  /**
1167
1177
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
1168
1178
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
1169
1179
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
1170
1180
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
1171
1181
  */
1172
- productTierImage: z17.boolean().default(false),
1182
+ productTierImage: z18.boolean().default(false),
1173
1183
  /**
1174
1184
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
1175
1185
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
1176
1186
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
1177
1187
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
1178
1188
  */
1179
- threshold: z17.number().int().nonnegative(),
1189
+ threshold: z18.number().int().nonnegative(),
1180
1190
  /**
1181
1191
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
1182
1192
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
1183
1193
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
1184
1194
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
1185
1195
  */
1186
- thresholds: z17.record(z17.string(), z17.number().int().nonnegative()).default(() => ({})),
1196
+ thresholds: z18.record(z18.string(), z18.number().int().nonnegative()).default(() => ({})),
1187
1197
  /**
1188
1198
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
1189
1199
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
1190
1200
  * shipping bar (single unlabeled tier, no gift).
1191
1201
  */
1192
- tierId: z17.string().optional(),
1193
- tierType: z17.enum(progressTierTypes).default(ProgressTierType.shipping),
1202
+ tierId: z18.string().optional(),
1203
+ tierType: z18.enum(progressTierTypes).default(ProgressTierType.shipping),
1194
1204
  /**
1195
1205
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
1196
1206
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -1201,9 +1211,9 @@ var CABProgressTier = z17.object({
1201
1211
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
1202
1212
  * template text supplies grammatically-neutral wording around the token.
1203
1213
  */
1204
- unit: z17.enum(progressTierUnits).default(ProgressTierUnit.currency)
1214
+ unit: z18.enum(progressTierUnits).default(ProgressTierUnit.currency)
1205
1215
  });
1206
- var CABProgressBarSection = z17.lazy(
1216
+ var CABProgressBarSection = z18.lazy(
1207
1217
  () => CABLayoutSection.omit({ sectionType: true }).extend({
1208
1218
  /**
1209
1219
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -1212,35 +1222,35 @@ var CABProgressBarSection = z17.lazy(
1212
1222
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
1213
1223
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
1214
1224
  */
1215
- barId: z17.string().optional(),
1225
+ barId: z18.string().optional(),
1216
1226
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
1217
- countryCodes: z17.array(z17.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1227
+ countryCodes: z18.array(z18.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1218
1228
  /**
1219
1229
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
1220
1230
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
1221
1231
  */
1222
- excludeCountryCodes: z17.array(z17.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1232
+ excludeCountryCodes: z18.array(z18.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1223
1233
  /**
1224
1234
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
1225
1235
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
1226
1236
  * adds the cart's discount allocations back to the live subtotal.
1227
1237
  */
1228
- excludeDiscountInSubtotal: z17.boolean().default(false),
1238
+ excludeDiscountInSubtotal: z18.boolean().default(false),
1229
1239
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
1230
- excludedVariantIds: z17.array(z17.number().int().positive()).default(() => []),
1240
+ excludedVariantIds: z18.array(z18.number().int().positive()).default(() => []),
1231
1241
  /**
1232
1242
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
1233
1243
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
1234
1244
  */
1235
- freeShippingOnSubscription: z17.boolean().default(false),
1245
+ freeShippingOnSubscription: z18.boolean().default(false),
1236
1246
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
1237
- giftAreaTitle: z17.record(z17.string(), z17.string()).default(() => ({ en: "FREE GIFTS" })),
1247
+ giftAreaTitle: z18.record(z18.string(), z18.string()).default(() => ({ en: "FREE GIFTS" })),
1238
1248
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
1239
- giftLabels: z17.object({
1240
- addGift: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1241
- remove: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.remove })),
1242
- selectOptions: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1243
- yourGift: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1249
+ giftLabels: z18.object({
1250
+ addGift: z18.record(z18.string(), z18.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1251
+ remove: z18.record(z18.string(), z18.string()).default(() => ({ ...GIFT_LABELS.remove })),
1252
+ selectOptions: z18.record(z18.string(), z18.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1253
+ yourGift: z18.record(z18.string(), z18.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1244
1254
  }).default(() => ({
1245
1255
  addGift: { ...GIFT_LABELS.addGift },
1246
1256
  remove: { ...GIFT_LABELS.remove },
@@ -1248,38 +1258,38 @@ var CABProgressBarSection = z17.lazy(
1248
1258
  yourGift: { ...GIFT_LABELS.yourGift }
1249
1259
  })),
1250
1260
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
1251
- name: z17.string().default("Order progress"),
1261
+ name: z18.string().default("Order progress"),
1252
1262
  /**
1253
1263
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
1254
1264
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
1255
1265
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
1256
1266
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
1257
1267
  */
1258
- progressColor: z17.string().optional(),
1259
- sectionType: z17.literal(SectionType.progressBar).default(SectionType.progressBar),
1268
+ progressColor: z18.string().optional(),
1269
+ sectionType: z18.literal(SectionType.progressBar).default(SectionType.progressBar),
1260
1270
  /**
1261
1271
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
1262
1272
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
1263
1273
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
1264
1274
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
1265
1275
  */
1266
- tiers: z17.union([z17.array(CABProgressTier), z17.strictObject({}).transform(() => [])]).default(() => [])
1276
+ tiers: z18.union([z18.array(CABProgressTier), z18.strictObject({}).transform(() => [])]).default(() => [])
1267
1277
  })
1268
1278
  );
1269
1279
 
1270
1280
  // src/schema/widgets/checkout-and-beyond/quantity.ts
1271
1281
  import { v7 as uuidv79 } from "uuid";
1272
- import { z as z18 } from "zod";
1273
- var CABQuantitySection = z18.object({
1282
+ import { z as z19 } from "zod";
1283
+ var CABQuantitySection = z19.object({
1274
1284
  ...CABVariableFields,
1275
- errorMessages: z18.record(
1276
- z18.string(),
1277
- z18.object({
1285
+ errorMessages: z19.record(
1286
+ z19.string(),
1287
+ z19.object({
1278
1288
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
1279
- increment: z18.string().optional(),
1280
- max: z18.string().optional(),
1281
- min: z18.string().optional(),
1282
- neg: z18.string().optional()
1289
+ increment: z19.string().optional(),
1290
+ max: z19.string().optional(),
1291
+ min: z19.string().optional(),
1292
+ neg: z19.string().optional()
1283
1293
  })
1284
1294
  ).default({
1285
1295
  en: {
@@ -1289,18 +1299,18 @@ var CABQuantitySection = z18.object({
1289
1299
  neg: "Quantity cannot be negative"
1290
1300
  }
1291
1301
  }),
1292
- inputType: z18.enum(quantityInputs).default(QuantityInput.select),
1293
- max: z18.number().min(1).max(100).default(10),
1294
- min: z18.number().min(1).default(1),
1302
+ inputType: z19.enum(quantityInputs).default(QuantityInput.select),
1303
+ max: z19.number().min(1).max(100).default(10),
1304
+ min: z19.number().min(1).default(1),
1295
1305
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
1296
- name: z18.string().default("Quantity"),
1297
- sectionId: z18.uuid().default(() => uuidv79()),
1298
- sectionType: z18.literal(SectionType.quantity).default(SectionType.quantity)
1306
+ name: z19.string().default("Quantity"),
1307
+ sectionId: z19.uuid().default(() => uuidv79()),
1308
+ sectionType: z19.literal(SectionType.quantity).default(SectionType.quantity)
1299
1309
  });
1300
1310
 
1301
1311
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1302
1312
  import { v7 as uuidv710 } from "uuid";
1303
- import { z as z19 } from "zod";
1313
+ import { z as z20 } from "zod";
1304
1314
 
1305
1315
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
1306
1316
  var REVIEW_LABELS = {
@@ -1363,68 +1373,69 @@ var REVIEW_LABELS = {
1363
1373
  };
1364
1374
 
1365
1375
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1366
- var CABReviewsSection = z19.object({
1376
+ var CABReviewsSection = z20.object({
1367
1377
  ...CABVariableFields,
1368
- color: z19.string().default("#fadb14"),
1378
+ color: z20.string().default("#fadb14"),
1369
1379
  /**
1370
1380
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
1371
1381
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
1372
1382
  * or merchant work.
1373
1383
  */
1374
- countLabels: z19.object({
1375
- one: z19.record(z19.string(), z19.string()).default(() => ({ ...REVIEW_LABELS.one })),
1376
- other: z19.record(z19.string(), z19.string()).default(() => ({ ...REVIEW_LABELS.other }))
1384
+ countLabels: z20.object({
1385
+ one: z20.record(z20.string(), z20.string()).default(() => ({ ...REVIEW_LABELS.one })),
1386
+ other: z20.record(z20.string(), z20.string()).default(() => ({ ...REVIEW_LABELS.other }))
1377
1387
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
1378
- name: z19.string().optional(),
1379
- sectionId: z19.uuid().default(() => uuidv710()),
1380
- sectionType: z19.literal(SectionType.reviews).default(SectionType.reviews),
1381
- size: z19.enum(reviewsSizes).default(ReviewsSize.default),
1388
+ name: z20.string().optional(),
1389
+ sectionId: z20.uuid().default(() => uuidv710()),
1390
+ sectionType: z20.literal(SectionType.reviews).default(SectionType.reviews),
1391
+ size: z20.enum(reviewsSizes).default(ReviewsSize.default),
1382
1392
  /**
1383
1393
  * Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
1384
1394
  * `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
1385
1395
  * string: its converter must validate and fall back to this default rather than let one odd value drop
1386
1396
  * the whole reviews section.
1387
1397
  */
1388
- strokeColor: z19.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
1398
+ strokeColor: z20.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
1389
1399
  /** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
1390
- strokeWidth: z19.number().nonnegative().default(0)
1400
+ strokeWidth: z20.number().nonnegative().default(0)
1391
1401
  });
1392
1402
 
1393
1403
  // src/schema/widgets/checkout-and-beyond/separator.ts
1394
1404
  import { v7 as uuidv711 } from "uuid";
1395
- import { z as z20 } from "zod";
1396
- var CABSeparatorSection = z20.object({
1405
+ import { z as z21 } from "zod";
1406
+ var CABSeparatorSection = z21.object({
1397
1407
  ...CABVariableFields,
1398
- sectionId: z20.uuid().default(() => uuidv711()),
1399
- sectionType: z20.literal(SectionType.separator).default(SectionType.separator)
1408
+ sectionId: z21.uuid().default(() => uuidv711()),
1409
+ sectionType: z21.literal(SectionType.separator).default(SectionType.separator)
1400
1410
  });
1401
1411
 
1402
1412
  // src/schema/widgets/checkout-and-beyond/variants.ts
1403
1413
  import { slice } from "es-toolkit/compat";
1404
1414
  import { v7 as uuidv712 } from "uuid";
1405
- import { z as z21 } from "zod";
1406
- var CABVariantsSection = z21.object({
1415
+ import { z as z22 } from "zod";
1416
+ var CABVariantsSection = z22.object({
1407
1417
  ...CABVariableFields,
1408
- hideOutOfStockVariants: z21.boolean().default(false),
1409
- name: z21.string().optional(),
1410
- sectionId: z21.uuid().default(() => uuidv712()),
1411
- sectionType: z21.literal(SectionType.variants).default(SectionType.variants),
1412
- selector: z21.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1413
- variantMode: z21.enum(variantModes).default(VariantMode.multiple)
1418
+ hideOutOfStockVariants: z22.boolean().default(false),
1419
+ name: z22.string().optional(),
1420
+ sectionId: z22.uuid().default(() => uuidv712()),
1421
+ sectionType: z22.literal(SectionType.variants).default(SectionType.variants),
1422
+ selector: z22.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1423
+ /** `productGroup` is additive (REB-24817): a renderer without group support must render nothing for it. */
1424
+ variantMode: z22.enum(variantsModes).default(VariantsMode.multiple)
1414
1425
  });
1415
1426
 
1416
1427
  // src/schema/widgets/checkout-and-beyond/shared.ts
1417
- var CABBorder = z22.object({
1418
- radius: z22.enum(borderRadii).default(BorderRadius.base),
1419
- style: z22.enum(borderStyles).default(BorderStyle.none),
1420
- width: z22.enum(borderWidths).default(BorderWidth.base)
1428
+ var CABBorder = z23.object({
1429
+ radius: z23.enum(borderRadii).default(BorderRadius.base),
1430
+ style: z23.enum(borderStyles).default(BorderStyle.none),
1431
+ width: z23.enum(borderWidths).default(BorderWidth.base)
1421
1432
  }).default({
1422
1433
  radius: BorderRadius.base,
1423
1434
  style: BorderStyle.none,
1424
1435
  width: BorderWidth.base
1425
1436
  });
1426
- var CABSection = z22.lazy(
1427
- () => z22.discriminatedUnion("sectionType", [
1437
+ var CABSection = z23.lazy(
1438
+ () => z23.discriminatedUnion("sectionType", [
1428
1439
  CABBannerSection,
1429
1440
  CABButtonSection,
1430
1441
  CABCarouselSection,
@@ -1447,41 +1458,41 @@ var CABSection = z22.lazy(
1447
1458
  );
1448
1459
 
1449
1460
  // src/schema/widgets/checkout-and-beyond/layout.ts
1450
- var GridItem = z23.union([z23.literal("auto"), z23.literal("fill"), z23.string().regex(/^\d+%$/), z23.number()]);
1451
- var CABLayoutWrapping = z23.object({
1452
- breakAt: z23.number().positive(),
1453
- maxPerLine: z23.number().int().positive()
1461
+ var GridItem = z24.union([z24.literal("auto"), z24.literal("fill"), z24.string().regex(/^\d+%$/), z24.number()]);
1462
+ var CABLayoutWrapping = z24.object({
1463
+ breakAt: z24.number().positive(),
1464
+ maxPerLine: z24.number().int().positive()
1454
1465
  });
1455
- var CABLayoutSection = z23.object({
1466
+ var CABLayoutSection = z24.object({
1456
1467
  ...CABVariableFields,
1457
- alignment: z23.object({
1458
- horizontal: z23.enum(horizontalAlignments).default(HorizontalAlignment.start),
1459
- vertical: z23.enum(verticalAlignments).default(VerticalAlignment.top)
1468
+ alignment: z24.object({
1469
+ horizontal: z24.enum(horizontalAlignments).default(HorizontalAlignment.start),
1470
+ vertical: z24.enum(verticalAlignments).default(VerticalAlignment.top)
1460
1471
  }).default({
1461
1472
  horizontal: HorizontalAlignment.start,
1462
1473
  vertical: VerticalAlignment.top
1463
1474
  }),
1464
- border: z23.lazy(() => CABBorder),
1465
- buttonField: z23.enum(buttonFields).optional(),
1466
- direction: z23.enum(directions).default(Direction.rows),
1475
+ border: z24.lazy(() => CABBorder),
1476
+ buttonField: z24.enum(buttonFields).optional(),
1477
+ direction: z24.enum(directions).default(Direction.rows),
1467
1478
  /**
1468
1479
  * Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
1469
1480
  * (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content card.
1470
1481
  */
1471
- frame: z23.enum(layoutFrames).optional(),
1472
- grid: z23.object({
1473
- columns: z23.union([z23.array(GridItem), z23.undefined()]).default(() => ["auto"]),
1474
- rows: z23.union([z23.array(GridItem), z23.undefined()]).default(() => ["auto"])
1482
+ frame: z24.enum(layoutFrames).optional(),
1483
+ grid: z24.object({
1484
+ columns: z24.union([z24.array(GridItem), z24.undefined()]).default(() => ["auto"]),
1485
+ rows: z24.union([z24.array(GridItem), z24.undefined()]).default(() => ["auto"])
1475
1486
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
1476
- name: z23.string().optional(),
1477
- padding: z23.enum(spacings).default(Spacing.none),
1478
- sectionId: z23.uuid().default(() => uuidv713()),
1479
- sections: z23.union([z23.array(z23.lazy(() => CABSection)), z23.strictObject({}).transform(() => [])]).default(() => []),
1480
- sectionType: z23.literal(SectionType.layout).default(SectionType.layout),
1481
- spacing: z23.enum(spacings).default(Spacing.base),
1487
+ name: z24.string().optional(),
1488
+ padding: z24.enum(spacings).default(Spacing.none),
1489
+ sectionId: z24.uuid().default(() => uuidv713()),
1490
+ sections: z24.union([z24.array(z24.lazy(() => CABSection)), z24.strictObject({}).transform(() => [])]).default(() => []),
1491
+ sectionType: z24.literal(SectionType.layout).default(SectionType.layout),
1492
+ spacing: z24.enum(spacings).default(Spacing.base),
1482
1493
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
1483
- viewUrl: z23.string().optional(),
1484
- width: z23.number().default(100),
1494
+ viewUrl: z24.string().optional(),
1495
+ width: z24.number().default(100),
1485
1496
  wrapping: CABLayoutWrapping.optional()
1486
1497
  });
1487
1498
 
@@ -1503,8 +1514,8 @@ var UI_LABELS = {
1503
1514
  };
1504
1515
 
1505
1516
  // src/schema/widgets/checkout-and-beyond/root.ts
1506
- var localized = (fallback) => z24.record(z24.string(), z24.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1507
- var CABUILabels = z24.object({
1517
+ var localized = (fallback) => z25.record(z25.string(), z25.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1518
+ var CABUILabels = z25.object({
1508
1519
  currentPage: localized(UI_LABELS.currentPage),
1509
1520
  guest: localized(UI_LABELS.guest),
1510
1521
  loadingOptions: localized(UI_LABELS.loadingOptions),
@@ -1529,154 +1540,154 @@ var CABUILabels = z24.object({
1529
1540
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
1530
1541
  updating: { ...UI_LABELS.updating }
1531
1542
  }));
1532
- var TargetArea = z24.object({
1533
- fill: z24.boolean().optional(),
1534
- flip: z24.enum(["both", "horizontal", "vertical"]).optional(),
1535
- icon: z24.string(),
1536
- label: z24.string(),
1537
- width: z24.string()
1543
+ var TargetArea = z25.object({
1544
+ fill: z25.boolean().optional(),
1545
+ flip: z25.enum(["both", "horizontal", "vertical"]).optional(),
1546
+ icon: z25.string(),
1547
+ label: z25.string(),
1548
+ width: z25.string()
1538
1549
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
1539
- var CABTracking = z24.object({
1540
- enableAttribution: z24.boolean().nullish().transform((value) => value ?? true),
1541
- enableSource: z24.boolean().nullish().transform((value) => value ?? true),
1542
- enableWidget: z24.boolean().nullish().transform((value) => value ?? true)
1550
+ var CABTracking = z25.object({
1551
+ enableAttribution: z25.boolean().nullish().transform((value) => value ?? true),
1552
+ enableSource: z25.boolean().nullish().transform((value) => value ?? true),
1553
+ enableWidget: z25.boolean().nullish().transform((value) => value ?? true)
1543
1554
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
1544
- var CABExperiment = z24.object({
1545
- elementId: z24.number(),
1546
- experimentId: z24.number(),
1547
- experimentType: z24.string(),
1548
- selectedId: z24.number()
1555
+ var CABExperiment = z25.object({
1556
+ elementId: z25.number(),
1557
+ experimentId: z25.number(),
1558
+ experimentType: z25.string(),
1559
+ selectedId: z25.number()
1549
1560
  });
1550
1561
  var CABRootSection = CABLayoutSection.extend({
1551
- editorMode: z24.enum(editorModes).default(EditorMode.checkoutExtension),
1562
+ editorMode: z25.enum(editorModes).default(EditorMode.checkoutExtension),
1552
1563
  experiment: CABExperiment.optional(),
1553
1564
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
1554
1565
  // `null` must fall back rather than throw the widget; malformed values still throw.
1555
- previewMode: z24.boolean().nullish().transform((value) => value ?? false),
1556
- storeId: z24.number().nullable().default(null),
1566
+ previewMode: z25.boolean().nullish().transform((value) => value ?? false),
1567
+ storeId: z25.number().nullable().default(null),
1557
1568
  targetArea: TargetArea.nullable(),
1558
1569
  tracking: CABTracking,
1559
- type: z24.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1570
+ type: z25.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1560
1571
  uiLabels: CABUILabels,
1561
- version: z24.literal(2).default(2),
1562
- widgetId: z24.number().nullable().default(null)
1572
+ version: z25.literal(2).default(2),
1573
+ widgetId: z25.number().nullable().default(null)
1563
1574
  });
1564
1575
 
1565
1576
  // src/schema/widgets/contentBlock.ts
1566
- var ContentBlockV1 = z25.object({
1567
- blockSpacing: z25.enum(spacings).optional(),
1568
- imageBlocks: z25.union([
1569
- z25.array(
1570
- z25.object({
1571
- altText: z25.string().nullable(),
1572
- description: z25.string().nullable(),
1573
- id: z25.uuid(),
1574
- imagePlacement: z25.enum(["top", "right", "bottom", "left"]),
1575
- imageSize: z25.number(),
1576
- imageUrl: z25.url(),
1577
- textAlignment: z25.enum(["left", "center", "right"]),
1577
+ var ContentBlockV1 = z26.object({
1578
+ blockSpacing: z26.enum(spacings).optional(),
1579
+ imageBlocks: z26.union([
1580
+ z26.array(
1581
+ z26.object({
1582
+ altText: z26.string().nullable(),
1583
+ description: z26.string().nullable(),
1584
+ id: z26.uuid(),
1585
+ imagePlacement: z26.enum(["top", "right", "bottom", "left"]),
1586
+ imageSize: z26.number(),
1587
+ imageUrl: z26.url(),
1588
+ textAlignment: z26.enum(["left", "center", "right"]),
1578
1589
  /** Inline scale only: an image caption can never be a block-level heading. */
1579
- textSize: z25.enum(inlineTextSizeNames)
1590
+ textSize: z26.enum(inlineTextSizeNames)
1580
1591
  })
1581
1592
  ),
1582
- z25.strictObject({}).transform(() => [])
1593
+ z26.strictObject({}).transform(() => [])
1583
1594
  ]).optional(),
1584
- imageLayout: z25.enum(["row", "column"]).optional(),
1585
- language: z25.object({
1586
- description: z25.string(),
1587
- superTitle: z25.string(),
1588
- title: z25.string()
1595
+ imageLayout: z26.enum(["row", "column"]).optional(),
1596
+ language: z26.object({
1597
+ description: z26.string(),
1598
+ superTitle: z26.string(),
1599
+ title: z26.string()
1589
1600
  }),
1590
- previewMode: z25.boolean(),
1591
- type: z25.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1592
- version: z25.literal(1)
1601
+ previewMode: z26.boolean(),
1602
+ type: z26.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1603
+ version: z26.literal(1)
1593
1604
  });
1594
- var ContentBlock = z25.discriminatedUnion("version", [
1605
+ var ContentBlock = z26.discriminatedUnion("version", [
1595
1606
  ContentBlockV1,
1596
1607
  CABRootSection.extend({
1597
- type: z25.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1608
+ type: z26.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1598
1609
  })
1599
1610
  ]);
1600
1611
 
1601
1612
  // src/schema/widgets/giftWithPurchase.ts
1602
- import { z as z26 } from "zod";
1603
- var GiftWithPurchase = z26.looseObject({
1604
- type: z26.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1613
+ import { z as z27 } from "zod";
1614
+ var GiftWithPurchase = z27.looseObject({
1615
+ type: z27.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1605
1616
  });
1606
1617
 
1607
1618
  // src/schema/widgets/lineItemEditor.ts
1608
- import { z as z27 } from "zod";
1609
- var LineItemEditorSwitchLanguageV1 = z27.object({
1610
- downgradeToOneTimeLabel: z27.string().optional(),
1619
+ import { z as z28 } from "zod";
1620
+ var LineItemEditorSwitchLanguageV1 = z28.object({
1621
+ downgradeToOneTimeLabel: z28.string().optional(),
1611
1622
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
1612
- subscriptionOptionLabel: z27.string().optional(),
1613
- upgradeToSubscriptionLabel: z27.string().optional(),
1614
- upgradeToSubscriptionWithoutDiscountLabel: z27.string().optional()
1623
+ subscriptionOptionLabel: z28.string().optional(),
1624
+ upgradeToSubscriptionLabel: z28.string().optional(),
1625
+ upgradeToSubscriptionWithoutDiscountLabel: z28.string().optional()
1615
1626
  });
1616
- var LineItemEditorV1 = z27.object({
1627
+ var LineItemEditorV1 = z28.object({
1617
1628
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
1618
- button: z27.object({ kind: z27.enum(["plain", "primary", "secondary"]).optional() }).optional(),
1619
- previewMode: z27.boolean().optional(),
1620
- switchToSubscription: z27.object({
1621
- disableDowngrade: z27.boolean().optional(),
1629
+ button: z28.object({ kind: z28.enum(["plain", "primary", "secondary"]).optional() }).optional(),
1630
+ previewMode: z28.boolean().optional(),
1631
+ switchToSubscription: z28.object({
1632
+ disableDowngrade: z28.boolean().optional(),
1622
1633
  language: LineItemEditorSwitchLanguageV1.optional()
1623
1634
  }).optional(),
1624
- switchToSubscriptionEnabled: z27.boolean().optional(),
1625
- tracking: z27.object({
1626
- enableAttribution: z27.boolean().optional(),
1627
- enableSource: z27.boolean().optional(),
1628
- enableWidget: z27.boolean().optional()
1635
+ switchToSubscriptionEnabled: z28.boolean().optional(),
1636
+ tracking: z28.object({
1637
+ enableAttribution: z28.boolean().optional(),
1638
+ enableSource: z28.boolean().optional(),
1639
+ enableWidget: z28.boolean().optional()
1629
1640
  }).optional(),
1630
- type: z27.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
1631
- version: z27.literal(1)
1641
+ type: z28.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
1642
+ version: z28.literal(1)
1632
1643
  });
1633
- var LineItemEditor = z27.discriminatedUnion("version", [
1644
+ var LineItemEditor = z28.discriminatedUnion("version", [
1634
1645
  LineItemEditorV1,
1635
1646
  CABRootSection.extend({
1636
- type: z27.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1647
+ type: z28.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1637
1648
  })
1638
1649
  ]);
1639
1650
 
1640
1651
  // src/schema/widgets/progressBar.ts
1641
- import { z as z28 } from "zod";
1642
- var ProgressBar = z28.looseObject({
1643
- type: z28.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1652
+ import { z as z29 } from "zod";
1653
+ var ProgressBar = z29.looseObject({
1654
+ type: z29.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1644
1655
  });
1645
1656
 
1646
1657
  // src/schema/widgets/rebuyButton.ts
1647
- import { z as z29 } from "zod";
1648
- var RebuyButtonV1 = z29.looseObject({
1649
- type: z29.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1650
- version: z29.literal(1)
1658
+ import { z as z30 } from "zod";
1659
+ var RebuyButtonV1 = z30.looseObject({
1660
+ type: z30.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1661
+ version: z30.literal(1)
1651
1662
  });
1652
- var RebuyButton = z29.discriminatedUnion("version", [
1663
+ var RebuyButton = z30.discriminatedUnion("version", [
1653
1664
  RebuyButtonV1,
1654
1665
  CABRootSection.extend({
1655
- type: z29.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1666
+ type: z30.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1656
1667
  })
1657
1668
  ]);
1658
1669
 
1659
1670
  // src/schema/widgets/rebuyMonetize.ts
1660
- import { z as z30 } from "zod";
1661
- var RebuyMonetize = z30.looseObject({
1662
- type: z30.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1671
+ import { z as z31 } from "zod";
1672
+ var RebuyMonetize = z31.looseObject({
1673
+ type: z31.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1663
1674
  });
1664
- var RebuyMonetizeV1 = z30.object({
1665
- name: z30.string().nullable().optional(),
1666
- previewMode: z30.boolean().optional(),
1675
+ var RebuyMonetizeV1 = z31.object({
1676
+ name: z31.string().nullable().optional(),
1677
+ previewMode: z31.boolean().optional(),
1667
1678
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
1668
- privacyPolicyUrl: z30.string().nullable().optional(),
1679
+ privacyPolicyUrl: z31.string().nullable().optional(),
1669
1680
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
1670
- subVertical: z30.string().nullable().optional(),
1671
- tracking: z30.object({
1672
- enableAttribution: z30.boolean().optional(),
1673
- enableSource: z30.boolean().optional(),
1674
- enableWidget: z30.boolean().optional()
1681
+ subVertical: z31.string().nullable().optional(),
1682
+ tracking: z31.object({
1683
+ enableAttribution: z31.boolean().optional(),
1684
+ enableSource: z31.boolean().optional(),
1685
+ enableWidget: z31.boolean().optional()
1675
1686
  }).optional(),
1676
- type: z30.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
1677
- version: z30.literal(1),
1687
+ type: z31.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
1688
+ version: z31.literal(1),
1678
1689
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
1679
- vertical: z30.string().nullable().optional()
1690
+ vertical: z31.string().nullable().optional()
1680
1691
  });
1681
1692
 
1682
1693
  // src/schema/widgetData.ts
@@ -1690,7 +1701,7 @@ var extensionWidgetTypes = [
1690
1701
  WidgetType.ui_extension_line_item_editor,
1691
1702
  WidgetType.ui_extension_progress_bar
1692
1703
  ];
1693
- var WidgetData = z31.discriminatedUnion("type", [
1704
+ var WidgetData = z32.discriminatedUnion("type", [
1694
1705
  ABTestingPlaceholder,
1695
1706
  CheckoutExtension,
1696
1707
  ContentBlock,