@rebuy/rebuy 3.5.1 → 3.7.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 (41) hide show
  1. package/dist/index.cjs +762 -648
  2. package/dist/index.mjs +762 -648
  3. package/dist/schema/checkout-and-beyond/constants.cjs +16 -0
  4. package/dist/schema/checkout-and-beyond/constants.mjs +16 -0
  5. package/dist/schema/checkout-and-beyond/index.cjs +454 -362
  6. package/dist/schema/checkout-and-beyond/index.mjs +454 -362
  7. package/dist/schema/metadata.d.ts +3 -1
  8. package/dist/schema/widget-data.cjs +508 -435
  9. package/dist/schema/widget-data.mjs +508 -435
  10. package/dist/schema/widgetData.d.ts +438 -147
  11. package/dist/schema/widgets/checkout-and-beyond/banner.d.ts +145 -48
  12. package/dist/schema/widgets/checkout-and-beyond/button.d.ts +154 -49
  13. package/dist/schema/widgets/checkout-and-beyond/carousel.d.ts +145 -48
  14. package/dist/schema/widgets/checkout-and-beyond/cartLine.d.ts +145 -48
  15. package/dist/schema/widgets/checkout-and-beyond/common.d.ts +29 -0
  16. package/dist/schema/widgets/checkout-and-beyond/discount.d.ts +146 -0
  17. package/dist/schema/widgets/checkout-and-beyond/icons.d.ts +1 -1
  18. package/dist/schema/widgets/checkout-and-beyond/image.d.ts +294 -100
  19. package/dist/schema/widgets/checkout-and-beyond/index.d.ts +1 -0
  20. package/dist/schema/widgets/checkout-and-beyond/layout.d.ts +148 -52
  21. package/dist/schema/widgets/checkout-and-beyond/monetize.d.ts +146 -49
  22. package/dist/schema/widgets/checkout-and-beyond/offers.d.ts +145 -48
  23. package/dist/schema/widgets/checkout-and-beyond/product.d.ts +146 -0
  24. package/dist/schema/widgets/checkout-and-beyond/products.d.ts +292 -0
  25. package/dist/schema/widgets/checkout-and-beyond/progressBar.d.ts +145 -48
  26. package/dist/schema/widgets/checkout-and-beyond/quantity.d.ts +146 -49
  27. package/dist/schema/widgets/checkout-and-beyond/reviews.d.ts +146 -49
  28. package/dist/schema/widgets/checkout-and-beyond/root.d.ts +146 -49
  29. package/dist/schema/widgets/checkout-and-beyond/rule.d.ts +140 -68
  30. package/dist/schema/widgets/checkout-and-beyond/text.d.ts +146 -49
  31. package/dist/schema/widgets/checkout-and-beyond/variables.d.ts +470 -0
  32. package/dist/schema/widgets/checkout-and-beyond/variants.d.ts +146 -49
  33. package/dist/schema/widgets/contentBlock.d.ts +146 -49
  34. package/dist/schema/widgets/lineItemEditor.d.ts +146 -49
  35. package/dist/schema/widgets/rebuyButton.d.ts +146 -49
  36. package/dist/server/index.cjs +514 -417
  37. package/dist/server/index.mjs +514 -417
  38. package/dist/transforms/index.cjs +392 -317
  39. package/dist/transforms/index.mjs +392 -317
  40. package/dist/transforms/monetizeV1/convertMonetizeToV2.d.ts +2 -2
  41. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  // src/schema/widgetData.ts
2
- import { z as z29 } from "zod";
2
+ import { z as z30 } from "zod";
3
3
 
4
4
  // src/schema/widgets/abTestingPlaceholder.ts
5
5
  import { z } from "zod";
@@ -115,6 +115,8 @@ var languageKeys = [
115
115
  "zh"
116
116
  ];
117
117
  var LanguageKey = freezeEnum(languageKeys);
118
+ var mutatorEvents = ["item_added", "quantity_changed", "variant_selected"];
119
+ var MutatorEvent = freezeEnum(mutatorEvents);
118
120
  var objectFits = ["cover", "contain"];
119
121
  var ObjectFit = freezeEnum(objectFits);
120
122
  var popoverPositions = ["inlineStart", "inlineEnd", "blockStart", "blockEnd"];
@@ -127,6 +129,10 @@ var progressTierUnits = ["currency", "item"];
127
129
  var ProgressTierUnit = freezeEnum(progressTierUnits);
128
130
  var quantityInputs = ["select", "number"];
129
131
  var QuantityInput = freezeEnum(quantityInputs);
132
+ var resultCountOperators = ["equals", "greater_than", "less_than"];
133
+ var ResultCountOperator = freezeEnum(resultCountOperators);
134
+ var resultTagOperators = ["contains", "does_not_contain"];
135
+ var ResultTagOperator = freezeEnum(resultTagOperators);
130
136
  var reviewsSizes = ["small", "default", "large"];
131
137
  var ReviewsSize = freezeEnum(reviewsSizes);
132
138
  var sectionTypes = [
@@ -159,6 +165,8 @@ var inlineTextSizeNames = ["extraSmall", "small", "base", "medium", "large", "ex
159
165
  var InlineTextSizeName = freezeEnum(inlineTextSizeNames);
160
166
  var textSizeNames = [...inlineTextSizeNames, "heading"];
161
167
  var TextSizeName = freezeEnum(textSizeNames);
168
+ var variableEffects = ["set_false", "set_true", "toggle"];
169
+ var VariableEffect = freezeEnum(variableEffects);
162
170
  var variantModes = ["multiple", "single"];
163
171
  var VariantMode = freezeEnum(variantModes);
164
172
  var variantSelectors = ["menu", "radio", "button"];
@@ -248,87 +256,20 @@ var CheckoutExtension = z2.looseObject({
248
256
  });
249
257
 
250
258
  // src/schema/widgets/contentBlock.ts
251
- import { z as z23 } from "zod";
259
+ import { z as z24 } from "zod";
252
260
 
253
261
  // src/schema/widgets/checkout-and-beyond/root.ts
254
- import { z as z22 } from "zod";
262
+ import { z as z23 } from "zod";
255
263
 
256
264
  // src/schema/widgets/checkout-and-beyond/layout.ts
257
265
  import { v7 as uuidv712 } from "uuid";
258
- import { z as z21 } from "zod";
259
-
260
- // src/schema/widgets/checkout-and-beyond/rule.ts
261
- import { z as z3 } from "zod";
262
- var ruleTypes = [
263
- "cart",
264
- "cart_count",
265
- "cart_item_count",
266
- "cart_line_count",
267
- "cart_subtotal",
268
- "collection",
269
- "customer",
270
- "customer_order_count",
271
- "customer_tag",
272
- "customer_total_spent",
273
- "date",
274
- "product",
275
- "product_tag",
276
- "product_title",
277
- "product_type",
278
- "product_vendor"
279
- ];
280
- var ruleType = z3.enum(ruleTypes);
281
- var RuleType = ruleType.enum;
282
- var ruleOperators = [
283
- "after",
284
- "anything",
285
- "before",
286
- "contains",
287
- "contains_any",
288
- "does_not_contain",
289
- "does_not_contain_any",
290
- "equals",
291
- "does_not_equal",
292
- "greater_than",
293
- "less_than"
294
- ];
295
- var ruleOperator = z3.enum(ruleOperators);
296
- var RuleOperator = ruleOperator.enum;
297
- var RuleCondition = z3.object({
298
- operator: z3.enum(ruleOperators).default(RuleOperator.anything),
299
- products: z3.union([z3.array(z3.unknown()), z3.strictObject({}).transform(() => [])]).default(() => []),
300
- type: z3.enum(ruleTypes).default(RuleType.cart_subtotal),
301
- value: z3.coerce.string().default("")
302
- });
303
- var RuleLogicBlock = z3.object({
304
- rules: z3.array(RuleCondition).default(() => [])
305
- });
306
- var CABRule = z3.object({
307
- dataSourceId: z3.number().nullable().default(null),
308
- enabled: z3.boolean().default(false),
309
- ruleset: z3.union([
310
- z3.array(
311
- z3.object({
312
- exitIfMatched: z3.boolean().default(true),
313
- logic: z3.array(RuleLogicBlock).default(() => []),
314
- output: z3.array(
315
- z3.object({
316
- key: z3.string().default("should_show"),
317
- type: z3.literal("data_json").default("data_json"),
318
- value: z3.string().default("true")
319
- })
320
- ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
321
- })
322
- ),
323
- z3.strictObject({}).transform(() => [])
324
- ]).default(() => [])
325
- });
266
+ import { z as z22 } from "zod";
326
267
 
327
268
  // src/schema/widgets/checkout-and-beyond/shared.ts
328
- import { z as z20 } from "zod";
269
+ import { z as z21 } from "zod";
329
270
 
330
271
  // src/schema/widgets/checkout-and-beyond/banner.ts
331
- import { z as z4 } from "zod";
272
+ import { z as z3 } from "zod";
332
273
 
333
274
  // src/schema/widgets/checkout-and-beyond/utils.ts
334
275
  import { isPlainObject } from "es-toolkit";
@@ -377,11 +318,11 @@ var isTextType = isSectionType(SectionType.text);
377
318
  var isVariantsType = isSectionType(SectionType.variants);
378
319
 
379
320
  // src/schema/widgets/checkout-and-beyond/banner.ts
380
- var CABBannerSection = z4.lazy(
321
+ var CABBannerSection = z3.lazy(
381
322
  () => CABLayoutSection.omit({ sectionType: true }).extend({
382
- buttonField: z4.enum(buttonFields).optional(),
383
- color: z4.enum(bannerColors).default("info"),
384
- dismissible: z4.boolean().default(true),
323
+ buttonField: z3.enum(buttonFields).optional(),
324
+ color: z3.enum(bannerColors).default("info"),
325
+ dismissible: z3.boolean().default(true),
385
326
  /**
386
327
  * The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
387
328
  * blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
@@ -397,18 +338,18 @@ var CABBannerSection = z4.lazy(
397
338
  * not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
398
339
  * either strips first or teaches `normalizeTextContent` to strip this field.
399
340
  */
400
- heading: z4.record(z4.string(), z4.string().refine(checkForHTML, NO_HTML)).optional(),
401
- sectionType: z4.literal(SectionType.banner).default(SectionType.banner)
341
+ heading: z3.record(z3.string(), z3.string().refine(checkForHTML, NO_HTML)).optional(),
342
+ sectionType: z3.literal(SectionType.banner).default(SectionType.banner)
402
343
  })
403
344
  );
404
345
 
405
346
  // src/schema/widgets/checkout-and-beyond/button.ts
406
347
  import { v7 as uuidv73 } from "uuid";
407
- import { z as z7 } from "zod";
348
+ import { z as z8 } from "zod";
408
349
 
409
350
  // src/schema/widgets/checkout-and-beyond/image.ts
410
351
  import { v7 as uuidv7 } from "uuid";
411
- import { z as z5 } from "zod";
352
+ import { z as z6 } from "zod";
412
353
 
413
354
  // src/schema/widgets/checkout-and-beyond/icons.ts
414
355
  var iconNames = [
@@ -494,17 +435,142 @@ var IconSize = freezeEnum(iconSizes);
494
435
  var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "warning"];
495
436
  var IconTone = freezeEnum(iconTones);
496
437
 
438
+ // src/schema/widgets/checkout-and-beyond/variables.ts
439
+ import { z as z5 } from "zod";
440
+
441
+ // src/schema/widgets/checkout-and-beyond/rule.ts
442
+ import { z as z4 } from "zod";
443
+ var ruleTypes = [
444
+ "cart",
445
+ "cart_count",
446
+ "cart_item_count",
447
+ "cart_line_count",
448
+ "cart_subtotal",
449
+ "collection",
450
+ "customer",
451
+ "customer_order_count",
452
+ "customer_tag",
453
+ "customer_total_spent",
454
+ "date",
455
+ "product",
456
+ "product_tag",
457
+ "product_title",
458
+ "product_type",
459
+ "product_vendor"
460
+ ];
461
+ var ruleType = z4.enum(ruleTypes);
462
+ var RuleType = ruleType.enum;
463
+ var ruleOperators = [
464
+ "after",
465
+ "anything",
466
+ "before",
467
+ "contains",
468
+ "contains_any",
469
+ "does_not_contain",
470
+ "does_not_contain_any",
471
+ "equals",
472
+ "does_not_equal",
473
+ "greater_than",
474
+ "less_than"
475
+ ];
476
+ var ruleOperator = z4.enum(ruleOperators);
477
+ var RuleOperator = ruleOperator.enum;
478
+ var RuleCondition = z4.object({
479
+ operator: z4.enum(ruleOperators).default(RuleOperator.anything),
480
+ products: z4.union([z4.array(z4.unknown()), z4.strictObject({}).transform(() => [])]).default(() => []),
481
+ type: z4.enum(ruleTypes).default(RuleType.cart_subtotal),
482
+ value: z4.coerce.string().default("")
483
+ });
484
+ var RuleLogicBlock = z4.object({
485
+ rules: z4.array(RuleCondition).default(() => [])
486
+ });
487
+ var CABRulesetEntry = z4.object({
488
+ exitIfMatched: z4.boolean().default(true),
489
+ logic: z4.array(RuleLogicBlock).default(() => []),
490
+ output: z4.array(
491
+ z4.object({
492
+ key: z4.string().default("should_show"),
493
+ type: z4.literal("data_json").default("data_json"),
494
+ value: z4.string().default("true")
495
+ })
496
+ ).default(() => [{ key: "should_show", type: "data_json", value: "true" }])
497
+ });
498
+ var CABRuleset = z4.union([z4.array(CABRulesetEntry), z4.strictObject({}).transform(() => [])]).default(() => []);
499
+
500
+ // src/schema/widgets/checkout-and-beyond/variables.ts
501
+ var variableEffect = z5.enum(variableEffects);
502
+ var CABVariableSeed = z5.object({
503
+ dataSourceId: z5.number().nullable().default(null),
504
+ ruleset: CABRuleset
505
+ });
506
+ var CABVariable = z5.object({
507
+ /**
508
+ * Holds until the first seed verdict lands (and forever, for unseeded variables). Omitted, it derives
509
+ * from seededness — `false` with a `seed` (visibility is EARNED), `true` without — via the transform
510
+ * below; a cross-field default has no `.default()` spelling. An explicit value always wins.
511
+ */
512
+ defaultValue: z5.boolean().optional(),
513
+ name: z5.string().min(1),
514
+ seed: CABVariableSeed.optional()
515
+ }).transform(({ defaultValue, ...variable }) => ({
516
+ defaultValue: defaultValue ?? variable.seed === void 0,
517
+ ...variable
518
+ }));
519
+ var CABVariableEffect = z5.object({
520
+ effect: variableEffect.default(VariableEffect.toggle),
521
+ variable: z5.string().min(1)
522
+ });
523
+ var CABVisibility = z5.object({
524
+ variable: z5.string().min(1),
525
+ visibleWhen: z5.boolean().default(true)
526
+ });
527
+ var resultCountOperator = z5.enum(resultCountOperators);
528
+ var resultTagOperator = z5.enum(resultTagOperators);
529
+ var mutatorEvent = z5.enum(mutatorEvents);
530
+ var CABResultCountTrigger = z5.object({
531
+ operator: resultCountOperator.default(ResultCountOperator.equals),
532
+ type: z5.literal("result_count"),
533
+ value: z5.number().default(0)
534
+ });
535
+ var CABResultTagTrigger = z5.object({
536
+ operator: resultTagOperator.default(ResultTagOperator.contains),
537
+ type: z5.literal("result_tag"),
538
+ value: z5.string().min(1)
539
+ });
540
+ var CABEventTrigger = z5.object({
541
+ event: mutatorEvent,
542
+ type: z5.literal("event")
543
+ });
544
+ var CABVariableTrigger = z5.discriminatedUnion("type", [
545
+ CABEventTrigger,
546
+ CABResultCountTrigger,
547
+ CABResultTagTrigger
548
+ ]);
549
+ var CABVariableMutator = z5.object({
550
+ effect: variableEffect.default(VariableEffect.set_false),
551
+ variable: z5.string().min(1),
552
+ when: CABVariableTrigger
553
+ });
554
+ var CABVariableFields = {
555
+ mutators: z5.array(CABVariableMutator).optional(),
556
+ variables: z5.array(CABVariable).refine((variables) => new Set(variables.map(({ name }) => name)).size === variables.length, {
557
+ message: "variable names must be unique within a section"
558
+ }).optional(),
559
+ visibility: CABVisibility.optional()
560
+ };
561
+
497
562
  // src/schema/widgets/checkout-and-beyond/image.ts
498
- var CABImageSectionFields = z5.object({
499
- altText: z5.string().refine(checkForHTML, NO_HTML).default(""),
563
+ var CABImageSectionFields = z6.object({
564
+ ...CABVariableFields,
565
+ altText: z6.string().refine(checkForHTML, NO_HTML).default(""),
500
566
  /**
501
567
  * Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
502
568
  * ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
503
569
  * and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
504
570
  */
505
- aspectRatio: z5.number().positive().nullable().default(null),
506
- border: z5.lazy(() => CABBorder),
507
- buttonField: z5.enum(buttonFields).optional(),
571
+ aspectRatio: z6.number().positive().nullable().default(null),
572
+ border: z6.lazy(() => CABBorder),
573
+ buttonField: z6.enum(buttonFields).optional(),
508
574
  /**
509
575
  * `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
510
576
  * `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
@@ -523,30 +589,29 @@ var CABImageSectionFields = z5.object({
523
589
  * behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
524
590
  * the risky half.
525
591
  */
526
- category: z5.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
592
+ category: z6.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
527
593
  /** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
528
- iconSize: z5.enum(iconSizes).nullable().default(null),
594
+ iconSize: z6.enum(iconSizes).nullable().default(null),
529
595
  /** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
530
- iconTone: z5.enum(iconTones).nullable().default(null),
531
- name: z5.string().optional(),
532
- naturalHeight: z5.number().default(0),
533
- naturalWidth: z5.number().default(0),
596
+ iconTone: z6.enum(iconTones).nullable().default(null),
597
+ name: z6.string().optional(),
598
+ naturalHeight: z6.number().default(0),
599
+ naturalWidth: z6.number().default(0),
534
600
  /**
535
601
  * `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
536
602
  * `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
537
603
  */
538
- objectFit: z5.enum(objectFits).default(ObjectFit.contain),
539
- rule: CABRule.optional(),
540
- sectionId: z5.uuid().default(() => uuidv7()),
541
- sectionType: z5.literal(SectionType.image).default(SectionType.image),
604
+ objectFit: z6.enum(objectFits).default(ObjectFit.contain),
605
+ sectionId: z6.uuid().default(() => uuidv7()),
606
+ sectionType: z6.literal(SectionType.image).default(SectionType.image),
542
607
  /**
543
608
  * An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
544
609
  * takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
545
610
  * would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
546
611
  * server-chosen tier icon actually needs it.
547
612
  */
548
- source: z5.union([z5.url(), z5.literal(""), z5.string().regex(DYNAMIC_TOKEN_REGEX), z5.enum(iconNames)]).default(""),
549
- width: z5.number().default(100)
613
+ source: z6.union([z6.url(), z6.literal(""), z6.string().regex(DYNAMIC_TOKEN_REGEX), z6.enum(iconNames)]).default(""),
614
+ width: z6.number().default(100)
550
615
  });
551
616
  var iconNameSet = new Set(iconNames);
552
617
  var isIconName = (source) => iconNameSet.has(source);
@@ -568,71 +633,71 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source }, c
568
633
  // src/schema/widgets/checkout-and-beyond/text.ts
569
634
  import { forEach, isString as isString2 } from "es-toolkit/compat";
570
635
  import { v7 as uuidv72 } from "uuid";
571
- import { z as z6 } from "zod";
572
- var enumOrOmit = (...vals) => z6.string().transform((val) => vals.includes(val) ? val : void 0).optional();
573
- var TiptapText = z6.object({
574
- marks: z6.union([
575
- z6.array(
576
- z6.discriminatedUnion("type", [
577
- z6.object({ type: z6.literal("bold") }),
578
- z6.object({ type: z6.literal("italic") }),
579
- z6.object({
580
- attrs: z6.object({
581
- class: z6.string().nullable(),
582
- href: z6.union([
583
- z6.url(),
584
- z6.literal("#"),
585
- z6.string().regex(DYNAMIC_TOKEN_REGEX),
586
- z6.string().regex(ROOT_RELATIVE_PATH_REGEX)
636
+ import { z as z7 } from "zod";
637
+ var enumOrOmit = (...vals) => z7.string().transform((val) => vals.includes(val) ? val : void 0).optional();
638
+ var TiptapText = z7.object({
639
+ marks: z7.union([
640
+ z7.array(
641
+ z7.discriminatedUnion("type", [
642
+ z7.object({ type: z7.literal("bold") }),
643
+ z7.object({ type: z7.literal("italic") }),
644
+ z7.object({
645
+ attrs: z7.object({
646
+ class: z7.string().nullable(),
647
+ href: z7.union([
648
+ z7.url(),
649
+ z7.literal("#"),
650
+ z7.string().regex(DYNAMIC_TOKEN_REGEX),
651
+ z7.string().regex(ROOT_RELATIVE_PATH_REGEX)
587
652
  ]),
588
- rel: z6.string().default("noopener noreferrer nofollow"),
589
- target: z6.string().default("_blank")
653
+ rel: z7.string().default("noopener noreferrer nofollow"),
654
+ target: z7.string().default("_blank")
590
655
  }),
591
- type: z6.literal("link")
656
+ type: z7.literal("link")
592
657
  }),
593
- z6.object({ type: z6.literal("strike") }),
594
- z6.object({
595
- attrs: z6.object({
658
+ z7.object({ type: z7.literal("strike") }),
659
+ z7.object({
660
+ attrs: z7.object({
596
661
  color: enumOrOmit(...textColorNames).default(TextColorName.base),
597
662
  fontSize: enumOrOmit(...textSizeNames).default(TextSizeName.base)
598
663
  }),
599
- type: z6.literal("textStyle")
664
+ type: z7.literal("textStyle")
600
665
  })
601
666
  ])
602
667
  ),
603
- z6.strictObject({}).transform(() => [])
668
+ z7.strictObject({}).transform(() => [])
604
669
  ]).optional(),
605
- text: z6.string().default(""),
606
- type: z6.literal("text").default("text")
670
+ text: z7.string().default(""),
671
+ type: z7.literal("text").default("text")
607
672
  });
608
- var TiptapParagraph = z6.object({
609
- attrs: z6.object({
673
+ var TiptapParagraph = z7.object({
674
+ attrs: z7.object({
610
675
  textAlign: enumOrOmit(...textAlignments)
611
676
  }).default({ textAlign: TextAlignment.start }),
612
- content: z6.union([z6.array(TiptapText), z6.strictObject({}).transform(() => [])]).default(() => []),
613
- type: z6.literal("paragraph").default("paragraph")
677
+ content: z7.union([z7.array(TiptapText), z7.strictObject({}).transform(() => [])]).default(() => []),
678
+ type: z7.literal("paragraph").default("paragraph")
614
679
  });
615
- var TiptapDocument = z6.object({
616
- attrs: z6.object({
680
+ var TiptapDocument = z7.object({
681
+ attrs: z7.object({
617
682
  blockSpacing: enumOrOmit(...spacings)
618
683
  }).default({ blockSpacing: Spacing.base }),
619
- content: z6.union([z6.array(TiptapParagraph), z6.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
620
- type: z6.literal("doc").default("doc")
684
+ content: z7.union([z7.array(TiptapParagraph), z7.strictObject({}).transform(() => [])]).default(() => [TiptapParagraph.parse({})]),
685
+ type: z7.literal("doc").default("doc")
621
686
  });
622
- var CABTextTier = z6.object({
623
- threshold: z6.number().int().nonnegative(),
624
- thresholds: z6.record(z6.string(), z6.number().int().nonnegative()).default(() => ({})),
625
- tierId: z6.string().optional(),
626
- tierType: z6.enum(progressTierTypes).default(ProgressTierType.shipping)
687
+ var CABTextTier = z7.object({
688
+ threshold: z7.number().int().nonnegative(),
689
+ thresholds: z7.record(z7.string(), z7.number().int().nonnegative()).default(() => ({})),
690
+ tierId: z7.string().optional(),
691
+ tierType: z7.enum(progressTierTypes).default(ProgressTierType.shipping)
627
692
  });
628
- var CABTextSection = z6.object({
629
- buttonField: z6.enum(buttonFields).optional(),
630
- content: z6.record(z6.string(), z6.union([z6.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
631
- name: z6.string().optional(),
632
- optionId: z6.number().optional(),
633
- rule: CABRule.optional(),
634
- sectionId: z6.uuid().default(() => uuidv72()),
635
- sectionType: z6.literal(SectionType.text).default(SectionType.text),
693
+ var CABTextSection = z7.object({
694
+ ...CABVariableFields,
695
+ buttonField: z7.enum(buttonFields).optional(),
696
+ content: z7.record(z7.string(), z7.union([z7.string(), TiptapDocument]).refine(checkForHTML, NO_HTML).optional()).default({ en: TiptapDocument.parse({}) }).optional(),
697
+ name: z7.string().optional(),
698
+ optionId: z7.number().optional(),
699
+ sectionId: z7.uuid().default(() => uuidv72()),
700
+ sectionType: z7.literal(SectionType.text).default(SectionType.text),
636
701
  tier: CABTextTier.optional()
637
702
  }).superRefine(({ buttonField, content }, ctx) => {
638
703
  if (buttonField === ButtonField.destinationUrl && content) {
@@ -654,35 +719,35 @@ var CABTextSection = z6.object({
654
719
  });
655
720
 
656
721
  // src/schema/widgets/checkout-and-beyond/button.ts
657
- var CABButtonContent = z7.lazy(
658
- () => z7.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
722
+ var CABButtonContent = z8.lazy(
723
+ () => z8.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
659
724
  );
660
- var CABButtonSection = z7.object({
661
- action: z7.union([z7.literal(""), z7.enum(buttonActions)]).default(""),
662
- buttonStyle: z7.enum(buttonStyles).default(ButtonStyle.primary),
663
- custom: z7.object({
664
- color: z7.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
665
- height: z7.number().default(52),
666
- width: z7.number().default(300)
725
+ var CABButtonSection = z8.object({
726
+ ...CABVariableFields,
727
+ action: z8.union([z8.literal(""), z8.enum(buttonActions)]).default(""),
728
+ buttonStyle: z8.enum(buttonStyles).default(ButtonStyle.primary),
729
+ custom: z8.object({
730
+ color: z8.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
731
+ height: z8.number().default(52),
732
+ width: z8.number().default(300)
667
733
  }).default({
668
734
  color: "#005bd3",
669
735
  height: 52,
670
736
  width: 300
671
737
  }),
672
- disableDowngrade: z7.boolean().default(false),
673
- name: z7.string().optional(),
674
- optionId: z7.number().optional(),
675
- popover: z7.object({
676
- alignment: z7.enum(textAlignments).default(TextAlignment.center),
677
- position: z7.enum(popoverPositions).default(PopoverPosition.blockStart)
738
+ disableDowngrade: z8.boolean().default(false),
739
+ name: z8.string().optional(),
740
+ optionId: z8.number().optional(),
741
+ popover: z8.object({
742
+ alignment: z8.enum(textAlignments).default(TextAlignment.center),
743
+ position: z8.enum(popoverPositions).default(PopoverPosition.blockStart)
678
744
  }).optional().default(() => ({
679
745
  alignment: TextAlignment.center,
680
746
  position: PopoverPosition.blockStart
681
747
  })),
682
- rule: CABRule.optional(),
683
- sectionId: z7.uuid().default(() => uuidv73()),
684
- sections: z7.union([z7.array(CABButtonContent), z7.strictObject({}).transform(() => [])]).default(() => []),
685
- sectionType: z7.literal(SectionType.button).default(SectionType.button),
748
+ sectionId: z8.uuid().default(() => uuidv73()),
749
+ sections: z8.union([z8.array(CABButtonContent), z8.strictObject({}).transform(() => [])]).default(() => []),
750
+ sectionType: z8.literal(SectionType.button).default(SectionType.button),
686
751
  /**
687
752
  * The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
688
753
  * client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
@@ -697,86 +762,93 @@ var CABButtonSection = z7.object({
697
762
  * lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
698
763
  * stored payloads to grandfather, and the producer is client code, not a merchant form.
699
764
  */
700
- tier: z7.object({ tierId: z7.string().min(1) }).optional(),
765
+ tier: z8.object({ tierId: z8.string().min(1) }).optional(),
701
766
  /** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
702
- trackingUrl: z7.string().optional()
767
+ trackingUrl: z8.string().optional(),
768
+ /**
769
+ * Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
770
+ * `action` — an `addToOrder` button can also flip a variable. Applied in array order.
771
+ */
772
+ variableEffects: z8.array(CABVariableEffect).optional()
703
773
  });
704
774
 
705
775
  // src/schema/widgets/checkout-and-beyond/carousel.ts
706
- import { z as z12 } from "zod";
776
+ import { z as z13 } from "zod";
707
777
 
708
778
  // src/schema/widgets/checkout-and-beyond/offers.ts
709
- import { z as z11 } from "zod";
779
+ import { z as z12 } from "zod";
710
780
 
711
781
  // src/schema/widgets/checkout-and-beyond/dataSource.ts
712
782
  import { v7 as uuidv74 } from "uuid";
713
- import { z as z8 } from "zod";
714
- var CABDiscount = z8.object({
715
- amount: z8.union([z8.number(), z8.string()]).catch(0),
716
- discountedBy: z8.string().optional(),
717
- discountedFrom: z8.enum(discountSources).optional().catch(void 0),
718
- type: z8.enum(discountTypes).catch("none")
783
+ import { z as z9 } from "zod";
784
+ var CABDiscount = z9.object({
785
+ amount: z9.union([z9.number(), z9.string()]).catch(0),
786
+ discountedBy: z9.string().optional(),
787
+ discountedFrom: z9.enum(discountSources).optional().catch(void 0),
788
+ type: z9.enum(discountTypes).catch("none")
719
789
  });
720
- var CABIntegrations = z8.object({
721
- judgeme: z8.boolean().default(false),
722
- junip: z8.boolean().default(false),
723
- klaviyo: z8.boolean().default(false),
724
- loox: z8.boolean().default(false),
725
- okendo: z8.boolean().default(false),
726
- opinew: z8.boolean().default(false),
727
- reviewsio: z8.boolean().default(false),
728
- stamped: z8.boolean().default(false),
729
- yotpo: z8.boolean().default(false)
790
+ var CABIntegrations = z9.object({
791
+ judgeme: z9.boolean().default(false),
792
+ junip: z9.boolean().default(false),
793
+ klaviyo: z9.boolean().default(false),
794
+ loox: z9.boolean().default(false),
795
+ okendo: z9.boolean().default(false),
796
+ opinew: z9.boolean().default(false),
797
+ reviewsio: z9.boolean().default(false),
798
+ stamped: z9.boolean().default(false),
799
+ yotpo: z9.boolean().default(false)
730
800
  });
731
- var CABDataSourceSection = z8.object({
732
- dataSourceId: z8.number().nullable().default(null),
733
- dataSourcePath: z8.string().default(DEFAULT_ENDPOINTS[0].value),
801
+ var CABDataSourceSection = z9.object({
802
+ dataSourceId: z9.number().nullable().default(null),
803
+ dataSourcePath: z9.string().default(DEFAULT_ENDPOINTS[0].value),
734
804
  discount: CABDiscount.optional(),
735
805
  integrations: CABIntegrations.optional(),
736
- limit: z8.number().default(1),
737
- matchVariant: z8.boolean().default(false),
738
- matchVariantOutOfStock: z8.boolean().default(false),
739
- name: z8.string().default(DEFAULT_ENDPOINTS[0].label),
740
- productType: z8.enum(productTypes).optional(),
741
- sectionId: z8.uuid().default(() => uuidv74()),
742
- sectionType: z8.literal(SectionType.dataSource).default(SectionType.dataSource),
806
+ limit: z9.number().default(1),
807
+ matchVariant: z9.boolean().default(false),
808
+ matchVariantOutOfStock: z9.boolean().default(false),
809
+ name: z9.string().default(DEFAULT_ENDPOINTS[0].label),
810
+ productType: z9.enum(productTypes).optional(),
811
+ sectionId: z9.uuid().default(() => uuidv74()),
812
+ sectionType: z9.literal(SectionType.dataSource).default(SectionType.dataSource),
743
813
  /** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
744
- subscriptionIsDefault: z8.boolean().default(false),
745
- treatAsGwp: z8.boolean().default(false)
814
+ subscriptionIsDefault: z9.boolean().default(false),
815
+ treatAsGwp: z9.boolean().default(false)
746
816
  });
747
817
 
748
818
  // src/schema/widgets/checkout-and-beyond/products.ts
749
819
  import { v7 as uuidv76 } from "uuid";
750
- import { z as z10 } from "zod";
820
+ import { z as z11 } from "zod";
751
821
 
752
822
  // src/schema/widgets/checkout-and-beyond/product.ts
753
823
  import { v7 as uuidv75 } from "uuid";
754
- import { z as z9 } from "zod";
755
- var CABVariantContent = z9.lazy(
756
- () => z9.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
824
+ import { z as z10 } from "zod";
825
+ var CABVariantContent = z10.lazy(
826
+ () => z10.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
757
827
  );
758
- var CABProductSection = z9.object({
759
- name: z9.string().optional(),
760
- productId: z9.number().nullable().default(null),
761
- sectionId: z9.uuid().default(() => uuidv75()),
762
- sections: z9.union([z9.array(CABVariantContent), z9.strictObject({}).transform(() => [])]).default(() => []),
763
- sectionType: z9.literal(SectionType.product).default(SectionType.product),
764
- selectors: z9.record(z9.string(), z9.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
765
- variantMode: z9.enum(variantModes).default(VariantMode.multiple)
828
+ var CABProductSection = z10.object({
829
+ ...CABVariableFields,
830
+ name: z10.string().optional(),
831
+ productId: z10.number().nullable().default(null),
832
+ sectionId: z10.uuid().default(() => uuidv75()),
833
+ sections: z10.union([z10.array(CABVariantContent), z10.strictObject({}).transform(() => [])]).default(() => []),
834
+ sectionType: z10.literal(SectionType.product).default(SectionType.product),
835
+ selectors: z10.record(z10.string(), z10.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
836
+ variantMode: z10.enum(variantModes).default(VariantMode.multiple)
766
837
  });
767
838
 
768
839
  // src/schema/widgets/checkout-and-beyond/products.ts
769
- var CABProductsSection = z10.object({
770
- name: z10.string().optional(),
771
- sectionId: z10.uuid().default(() => uuidv76()),
772
- sections: z10.union([z10.array(z10.lazy(() => CABProductSection)), z10.strictObject({}).transform(() => [])]).default(() => []),
773
- sectionType: z10.literal(SectionType.products).default(SectionType.products)
840
+ var CABProductsSection = z11.object({
841
+ ...CABVariableFields,
842
+ name: z11.string().optional(),
843
+ sectionId: z11.uuid().default(() => uuidv76()),
844
+ sections: z11.union([z11.array(z11.lazy(() => CABProductSection)), z11.strictObject({}).transform(() => [])]).default(() => []),
845
+ sectionType: z11.literal(SectionType.products).default(SectionType.products)
774
846
  });
775
847
 
776
848
  // src/schema/widgets/checkout-and-beyond/offers.ts
777
- var CABOffersSection = z11.lazy(
849
+ var CABOffersSection = z12.lazy(
778
850
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
779
- sections: z11.union([z11.array(z11.lazy(() => CABSection)), z11.strictObject({}).transform(() => [])]).default(() => [
851
+ sections: z12.union([z12.array(z12.lazy(() => CABSection)), z12.strictObject({}).transform(() => [])]).default(() => [
780
852
  CABBannerSection.parse({
781
853
  buttonField: "undoAddToOrder",
782
854
  color: "success",
@@ -790,64 +862,65 @@ var CABOffersSection = z11.lazy(
790
862
  CABDataSourceSection.parse({}),
791
863
  CABProductsSection.parse({})
792
864
  ]),
793
- sectionType: z11.literal(SectionType.offers).default(SectionType.offers)
865
+ sectionType: z12.literal(SectionType.offers).default(SectionType.offers)
794
866
  })
795
867
  );
796
868
 
797
869
  // src/schema/widgets/checkout-and-beyond/carousel.ts
798
- var CABCarouselSection = z12.lazy(
870
+ var CABCarouselSection = z13.lazy(
799
871
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
800
- autoAdvanceInterval: z12.number().default(0),
801
- itemsAtOnce: z12.number().min(1).default(1),
872
+ autoAdvanceInterval: z13.number().default(0),
873
+ itemsAtOnce: z13.number().min(1).default(1),
802
874
  /** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
803
- offersDirection: z12.enum(offersDirections).default("vertical"),
804
- sections: z12.union([z12.array(z12.lazy(() => CABSection)), z12.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
805
- sectionType: z12.literal(SectionType.carousel).default(SectionType.carousel)
875
+ offersDirection: z13.enum(offersDirections).default("vertical"),
876
+ sections: z13.union([z13.array(z13.lazy(() => CABSection)), z13.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
877
+ sectionType: z13.literal(SectionType.carousel).default(SectionType.carousel)
806
878
  })
807
879
  );
808
880
 
809
881
  // src/schema/widgets/checkout-and-beyond/cartLine.ts
810
- import { z as z13 } from "zod";
811
- var CABCartLineSection = z13.lazy(
882
+ import { z as z14 } from "zod";
883
+ var CABCartLineSection = z14.lazy(
812
884
  () => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
813
- sections: z13.union([z13.array(z13.lazy(() => CABSection)), z13.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
814
- sectionType: z13.literal(SectionType.cartLine).default(SectionType.cartLine)
885
+ sections: z14.union([z14.array(z14.lazy(() => CABSection)), z14.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
886
+ sectionType: z14.literal(SectionType.cartLine).default(SectionType.cartLine)
815
887
  })
816
888
  );
817
889
 
818
890
  // src/schema/widgets/checkout-and-beyond/discount.ts
819
891
  import { v7 as uuidv77 } from "uuid";
820
- import { z as z14 } from "zod";
821
- var CABDiscountSection = z14.object({
822
- amount: z14.union([z14.number(), z14.string()]).catch(0),
823
- discountedBy: z14.string().optional(),
824
- discountedFrom: z14.enum(discountSources).optional().catch(void 0),
825
- message: z14.string().optional(),
826
- name: z14.string().optional(),
827
- quantity: z14.number().default(1),
828
- sectionId: z14.uuid().default(() => uuidv77()),
829
- sectionType: z14.literal(SectionType.discount).default(SectionType.discount),
830
- type: z14.enum(discountTypes).catch("none")
892
+ import { z as z15 } from "zod";
893
+ var CABDiscountSection = z15.object({
894
+ ...CABVariableFields,
895
+ amount: z15.union([z15.number(), z15.string()]).catch(0),
896
+ discountedBy: z15.string().optional(),
897
+ discountedFrom: z15.enum(discountSources).optional().catch(void 0),
898
+ message: z15.string().optional(),
899
+ name: z15.string().optional(),
900
+ quantity: z15.number().default(1),
901
+ sectionId: z15.uuid().default(() => uuidv77()),
902
+ sectionType: z15.literal(SectionType.discount).default(SectionType.discount),
903
+ type: z15.enum(discountTypes).catch("none")
831
904
  });
832
905
 
833
906
  // src/schema/widgets/checkout-and-beyond/monetize.ts
834
907
  import { v7 as uuidv78 } from "uuid";
835
- import { z as z15 } from "zod";
836
- var CABMonetizeSection = z15.object({
837
- name: z15.string().optional(),
908
+ import { z as z16 } from "zod";
909
+ var CABMonetizeSection = z16.object({
910
+ ...CABVariableFields,
911
+ name: z16.string().optional(),
838
912
  /** Privacy Policy footer href (the widget's `privacy_policy_url` setting); the client relays it to `/cab/monetize`. */
839
- privacyPolicyUrl: z15.string().optional(),
840
- rule: CABRule.optional(),
841
- sectionId: z15.uuid().default(() => uuidv78()),
842
- sectionType: z15.literal(SectionType.monetize).default(SectionType.monetize),
913
+ privacyPolicyUrl: z16.string().optional(),
914
+ sectionId: z16.uuid().default(() => uuidv78()),
915
+ sectionType: z16.literal(SectionType.monetize).default(SectionType.monetize),
843
916
  /** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
844
- subVertical: z15.string().optional(),
917
+ subVertical: z16.string().optional(),
845
918
  /** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
846
- vertical: z15.string().optional()
919
+ vertical: z16.string().optional()
847
920
  });
848
921
 
849
922
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
850
- import { z as z16 } from "zod";
923
+ import { z as z17 } from "zod";
851
924
 
852
925
  // src/schema/widgets/checkout-and-beyond/giftLabels.ts
853
926
  var GIFT_LABELS = {
@@ -966,21 +1039,21 @@ var GIFT_LABELS = {
966
1039
  };
967
1040
 
968
1041
  // src/schema/widgets/checkout-and-beyond/progressBar.ts
969
- var CABProgressTier = z16.object({
1042
+ var CABProgressTier = z17.object({
970
1043
  /**
971
1044
  * Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
972
1045
  * cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
973
1046
  * `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
974
1047
  * `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
975
1048
  */
976
- discount: z16.object({ amount: z16.number().nonnegative(), type: z16.enum(["fixedAmount", "percentage"]) }).optional(),
1049
+ discount: z17.object({ amount: z17.number().nonnegative(), type: z17.enum(["fixedAmount", "percentage"]) }).optional(),
977
1050
  /**
978
1051
  * Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
979
1052
  * tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
980
1053
  * controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
981
1054
  * on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
982
1055
  */
983
- filterOosVariants: z16.boolean().default(false),
1056
+ filterOosVariants: z17.boolean().default(false),
984
1057
  /**
985
1058
  * Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
986
1059
  * `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
@@ -988,10 +1061,10 @@ var CABProgressTier = z16.object({
988
1061
  * tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
989
1062
  * tree is complete.
990
1063
  */
991
- gift: z16.object({
992
- productId: z16.number().int().positive(),
993
- title: z16.string().optional(),
994
- variantIds: z16.array(z16.number().int().positive()).default(() => [])
1064
+ gift: z17.object({
1065
+ productId: z17.number().int().positive(),
1066
+ title: z17.string().optional(),
1067
+ variantIds: z17.array(z17.number().int().positive()).default(() => [])
995
1068
  }).optional(),
996
1069
  /**
997
1070
  * The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
@@ -1002,35 +1075,35 @@ var CABProgressTier = z16.object({
1002
1075
  * turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
1003
1076
  * emits no caption slot rather than an empty one). Plain text — a compact icon+label.
1004
1077
  */
1005
- label: z16.record(z16.string(), z16.string()).optional(),
1078
+ label: z17.record(z17.string(), z17.string()).optional(),
1006
1079
  /**
1007
1080
  * Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
1008
1081
  * the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
1009
1082
  * carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
1010
1083
  * parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
1011
1084
  */
1012
- productTierImage: z16.boolean().default(false),
1085
+ productTierImage: z17.boolean().default(false),
1013
1086
  /**
1014
1087
  * The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
1015
1088
  * fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
1016
1089
  * multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
1017
1090
  * `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
1018
1091
  */
1019
- threshold: z16.number().int().nonnegative(),
1092
+ threshold: z17.number().int().nonnegative(),
1020
1093
  /**
1021
1094
  * Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
1022
1095
  * When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
1023
1096
  * `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
1024
1097
  * converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
1025
1098
  */
1026
- thresholds: z16.record(z16.string(), z16.number().int().nonnegative()).default(() => ({})),
1099
+ thresholds: z17.record(z17.string(), z17.number().int().nonnegative()).default(() => ({})),
1027
1100
  /**
1028
1101
  * Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
1029
1102
  * match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
1030
1103
  * shipping bar (single unlabeled tier, no gift).
1031
1104
  */
1032
- tierId: z16.string().optional(),
1033
- tierType: z16.enum(progressTierTypes).default(ProgressTierType.shipping),
1105
+ tierId: z17.string().optional(),
1106
+ tierType: z17.enum(progressTierTypes).default(ProgressTierType.shipping),
1034
1107
  /**
1035
1108
  * What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
1036
1109
  * the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
@@ -1041,9 +1114,9 @@ var CABProgressTier = z16.object({
1041
1114
  * count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
1042
1115
  * template text supplies grammatically-neutral wording around the token.
1043
1116
  */
1044
- unit: z16.enum(progressTierUnits).default(ProgressTierUnit.currency)
1117
+ unit: z17.enum(progressTierUnits).default(ProgressTierUnit.currency)
1045
1118
  });
1046
- var CABProgressBarSection = z16.lazy(
1119
+ var CABProgressBarSection = z17.lazy(
1047
1120
  () => CABLayoutSection.omit({ sectionType: true }).extend({
1048
1121
  /**
1049
1122
  * The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
@@ -1052,35 +1125,35 @@ var CABProgressBarSection = z16.lazy(
1052
1125
  * checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
1053
1126
  * (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
1054
1127
  */
1055
- barId: z16.string().optional(),
1128
+ barId: z17.string().optional(),
1056
1129
  /** Empty = shown everywhere; otherwise uppercase ISO country codes. */
1057
- countryCodes: z16.array(z16.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1130
+ countryCodes: z17.array(z17.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1058
1131
  /**
1059
1132
  * Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
1060
1133
  * hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
1061
1134
  */
1062
- excludeCountryCodes: z16.array(z16.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1135
+ excludeCountryCodes: z17.array(z17.string().transform((code) => code.trim().toUpperCase())).default(() => []),
1063
1136
  /**
1064
1137
  * Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
1065
1138
  * forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
1066
1139
  * adds the cart's discount allocations back to the live subtotal.
1067
1140
  */
1068
- excludeDiscountInSubtotal: z16.boolean().default(false),
1141
+ excludeDiscountInSubtotal: z17.boolean().default(false),
1069
1142
  /** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
1070
- excludedVariantIds: z16.array(z16.number().int().positive()).default(() => []),
1143
+ excludedVariantIds: z17.array(z17.number().int().positive()).default(() => []),
1071
1144
  /**
1072
1145
  * When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
1073
1146
  * `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
1074
1147
  */
1075
- freeShippingOnSubscription: z16.boolean().default(false),
1148
+ freeShippingOnSubscription: z17.boolean().default(false),
1076
1149
  /** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
1077
- giftAreaTitle: z16.record(z16.string(), z16.string()).default(() => ({ en: "FREE GIFTS" })),
1150
+ giftAreaTitle: z17.record(z17.string(), z17.string()).default(() => ({ en: "FREE GIFTS" })),
1078
1151
  /** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
1079
- giftLabels: z16.object({
1080
- addGift: z16.record(z16.string(), z16.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1081
- remove: z16.record(z16.string(), z16.string()).default(() => ({ ...GIFT_LABELS.remove })),
1082
- selectOptions: z16.record(z16.string(), z16.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1083
- yourGift: z16.record(z16.string(), z16.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1152
+ giftLabels: z17.object({
1153
+ addGift: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.addGift })),
1154
+ remove: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.remove })),
1155
+ selectOptions: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
1156
+ yourGift: z17.record(z17.string(), z17.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
1084
1157
  }).default(() => ({
1085
1158
  addGift: { ...GIFT_LABELS.addGift },
1086
1159
  remove: { ...GIFT_LABELS.remove },
@@ -1088,37 +1161,38 @@ var CABProgressBarSection = z16.lazy(
1088
1161
  yourGift: { ...GIFT_LABELS.yourGift }
1089
1162
  })),
1090
1163
  /** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
1091
- name: z16.string().default("Order progress"),
1164
+ name: z17.string().default("Order progress"),
1092
1165
  /**
1093
1166
  * Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
1094
1167
  * fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
1095
1168
  * absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
1096
1169
  * optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
1097
1170
  */
1098
- progressColor: z16.string().optional(),
1099
- sectionType: z16.literal(SectionType.progressBar).default(SectionType.progressBar),
1171
+ progressColor: z17.string().optional(),
1172
+ sectionType: z17.literal(SectionType.progressBar).default(SectionType.progressBar),
1100
1173
  /**
1101
1174
  * The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
1102
1175
  * O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
1103
1176
  * count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
1104
1177
  * gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
1105
1178
  */
1106
- tiers: z16.union([z16.array(CABProgressTier), z16.strictObject({}).transform(() => [])]).default(() => [])
1179
+ tiers: z17.union([z17.array(CABProgressTier), z17.strictObject({}).transform(() => [])]).default(() => [])
1107
1180
  })
1108
1181
  );
1109
1182
 
1110
1183
  // src/schema/widgets/checkout-and-beyond/quantity.ts
1111
1184
  import { v7 as uuidv79 } from "uuid";
1112
- import { z as z17 } from "zod";
1113
- var CABQuantitySection = z17.object({
1114
- errorMessages: z17.record(
1115
- z17.string(),
1116
- z17.object({
1185
+ import { z as z18 } from "zod";
1186
+ var CABQuantitySection = z18.object({
1187
+ ...CABVariableFields,
1188
+ errorMessages: z18.record(
1189
+ z18.string(),
1190
+ z18.object({
1117
1191
  /** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
1118
- increment: z17.string().optional(),
1119
- max: z17.string().optional(),
1120
- min: z17.string().optional(),
1121
- neg: z17.string().optional()
1192
+ increment: z18.string().optional(),
1193
+ max: z18.string().optional(),
1194
+ min: z18.string().optional(),
1195
+ neg: z18.string().optional()
1122
1196
  })
1123
1197
  ).default({
1124
1198
  en: {
@@ -1128,19 +1202,18 @@ var CABQuantitySection = z17.object({
1128
1202
  neg: "Quantity cannot be negative"
1129
1203
  }
1130
1204
  }),
1131
- inputType: z17.enum(quantityInputs).default(QuantityInput.select),
1132
- max: z17.number().min(1).max(100).default(10),
1133
- min: z17.number().min(1).default(1),
1205
+ inputType: z18.enum(quantityInputs).default(QuantityInput.select),
1206
+ max: z18.number().min(1).max(100).default(10),
1207
+ min: z18.number().min(1).default(1),
1134
1208
  /** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
1135
- name: z17.string().default("Quantity"),
1136
- rule: CABRule.optional(),
1137
- sectionId: z17.uuid().default(() => uuidv79()),
1138
- sectionType: z17.literal(SectionType.quantity).default(SectionType.quantity)
1209
+ name: z18.string().default("Quantity"),
1210
+ sectionId: z18.uuid().default(() => uuidv79()),
1211
+ sectionType: z18.literal(SectionType.quantity).default(SectionType.quantity)
1139
1212
  });
1140
1213
 
1141
1214
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1142
1215
  import { v7 as uuidv710 } from "uuid";
1143
- import { z as z18 } from "zod";
1216
+ import { z as z19 } from "zod";
1144
1217
 
1145
1218
  // src/schema/widgets/checkout-and-beyond/reviewLabels.ts
1146
1219
  var REVIEW_LABELS = {
@@ -1203,50 +1276,50 @@ var REVIEW_LABELS = {
1203
1276
  };
1204
1277
 
1205
1278
  // src/schema/widgets/checkout-and-beyond/reviews.ts
1206
- var CABReviewsSection = z18.object({
1207
- color: z18.string().default("#fadb14"),
1279
+ var CABReviewsSection = z19.object({
1280
+ ...CABVariableFields,
1281
+ color: z19.string().default("#fadb14"),
1208
1282
  /**
1209
1283
  * Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
1210
1284
  * form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
1211
1285
  * or merchant work.
1212
1286
  */
1213
- countLabels: z18.object({
1214
- one: z18.record(z18.string(), z18.string()).default(() => ({ ...REVIEW_LABELS.one })),
1215
- other: z18.record(z18.string(), z18.string()).default(() => ({ ...REVIEW_LABELS.other }))
1287
+ countLabels: z19.object({
1288
+ one: z19.record(z19.string(), z19.string()).default(() => ({ ...REVIEW_LABELS.one })),
1289
+ other: z19.record(z19.string(), z19.string()).default(() => ({ ...REVIEW_LABELS.other }))
1216
1290
  }).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
1217
- name: z18.string().optional(),
1218
- rule: CABRule.optional(),
1219
- sectionId: z18.uuid().default(() => uuidv710()),
1220
- sectionType: z18.literal(SectionType.reviews).default(SectionType.reviews),
1221
- size: z18.enum(reviewsSizes).default(ReviewsSize.default)
1291
+ name: z19.string().optional(),
1292
+ sectionId: z19.uuid().default(() => uuidv710()),
1293
+ sectionType: z19.literal(SectionType.reviews).default(SectionType.reviews),
1294
+ size: z19.enum(reviewsSizes).default(ReviewsSize.default)
1222
1295
  });
1223
1296
 
1224
1297
  // src/schema/widgets/checkout-and-beyond/variants.ts
1225
1298
  import { slice } from "es-toolkit/compat";
1226
1299
  import { v7 as uuidv711 } from "uuid";
1227
- import { z as z19 } from "zod";
1228
- var CABVariantsSection = z19.object({
1229
- hideOutOfStockVariants: z19.boolean().default(false),
1230
- name: z19.string().optional(),
1231
- rule: CABRule.optional(),
1232
- sectionId: z19.uuid().default(() => uuidv711()),
1233
- sectionType: z19.literal(SectionType.variants).default(SectionType.variants),
1234
- selector: z19.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1235
- variantMode: z19.enum(variantModes).default(VariantMode.multiple)
1300
+ import { z as z20 } from "zod";
1301
+ var CABVariantsSection = z20.object({
1302
+ ...CABVariableFields,
1303
+ hideOutOfStockVariants: z20.boolean().default(false),
1304
+ name: z20.string().optional(),
1305
+ sectionId: z20.uuid().default(() => uuidv711()),
1306
+ sectionType: z20.literal(SectionType.variants).default(SectionType.variants),
1307
+ selector: z20.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
1308
+ variantMode: z20.enum(variantModes).default(VariantMode.multiple)
1236
1309
  });
1237
1310
 
1238
1311
  // src/schema/widgets/checkout-and-beyond/shared.ts
1239
- var CABBorder = z20.object({
1240
- radius: z20.enum(borderRadii).default(BorderRadius.base),
1241
- style: z20.enum(borderStyles).default(BorderStyle.none),
1242
- width: z20.enum(borderWidths).default(BorderWidth.base)
1312
+ var CABBorder = z21.object({
1313
+ radius: z21.enum(borderRadii).default(BorderRadius.base),
1314
+ style: z21.enum(borderStyles).default(BorderStyle.none),
1315
+ width: z21.enum(borderWidths).default(BorderWidth.base)
1243
1316
  }).default({
1244
1317
  radius: BorderRadius.base,
1245
1318
  style: BorderStyle.none,
1246
1319
  width: BorderWidth.base
1247
1320
  });
1248
- var CABSection = z20.lazy(
1249
- () => z20.discriminatedUnion("sectionType", [
1321
+ var CABSection = z21.lazy(
1322
+ () => z21.discriminatedUnion("sectionType", [
1250
1323
  CABBannerSection,
1251
1324
  CABButtonSection,
1252
1325
  CABCarouselSection,
@@ -1268,32 +1341,32 @@ var CABSection = z20.lazy(
1268
1341
  );
1269
1342
 
1270
1343
  // src/schema/widgets/checkout-and-beyond/layout.ts
1271
- var GridItem = z21.union([z21.literal("auto"), z21.literal("fill"), z21.string().regex(/^\d+%$/), z21.number()]);
1272
- var CABLayoutSection = z21.object({
1273
- alignment: z21.object({
1274
- horizontal: z21.enum(horizontalAlignments).default(HorizontalAlignment.start),
1275
- vertical: z21.enum(verticalAlignments).default(VerticalAlignment.top)
1344
+ var GridItem = z22.union([z22.literal("auto"), z22.literal("fill"), z22.string().regex(/^\d+%$/), z22.number()]);
1345
+ var CABLayoutSection = z22.object({
1346
+ ...CABVariableFields,
1347
+ alignment: z22.object({
1348
+ horizontal: z22.enum(horizontalAlignments).default(HorizontalAlignment.start),
1349
+ vertical: z22.enum(verticalAlignments).default(VerticalAlignment.top)
1276
1350
  }).default({
1277
1351
  horizontal: HorizontalAlignment.start,
1278
1352
  vertical: VerticalAlignment.top
1279
1353
  }),
1280
- border: z21.lazy(() => CABBorder),
1281
- buttonField: z21.enum(buttonFields).optional(),
1282
- direction: z21.enum(directions).default(Direction.rows),
1283
- grid: z21.object({
1284
- columns: z21.union([z21.array(GridItem), z21.undefined()]).default(() => ["auto"]),
1285
- rows: z21.union([z21.array(GridItem), z21.undefined()]).default(() => ["auto"])
1354
+ border: z22.lazy(() => CABBorder),
1355
+ buttonField: z22.enum(buttonFields).optional(),
1356
+ direction: z22.enum(directions).default(Direction.rows),
1357
+ grid: z22.object({
1358
+ columns: z22.union([z22.array(GridItem), z22.undefined()]).default(() => ["auto"]),
1359
+ rows: z22.union([z22.array(GridItem), z22.undefined()]).default(() => ["auto"])
1286
1360
  }).default({ columns: ["auto"], rows: ["auto"] }).optional(),
1287
- name: z21.string().optional(),
1288
- padding: z21.enum(spacings).default(Spacing.none),
1289
- rule: CABRule.optional(),
1290
- sectionId: z21.uuid().default(() => uuidv712()),
1291
- sections: z21.union([z21.array(z21.lazy(() => CABSection)), z21.strictObject({}).transform(() => [])]).default(() => []),
1292
- sectionType: z21.literal(SectionType.layout).default(SectionType.layout),
1293
- spacing: z21.enum(spacings).default(Spacing.base),
1361
+ name: z22.string().optional(),
1362
+ padding: z22.enum(spacings).default(Spacing.none),
1363
+ sectionId: z22.uuid().default(() => uuidv712()),
1364
+ sections: z22.union([z22.array(z22.lazy(() => CABSection)), z22.strictObject({}).transform(() => [])]).default(() => []),
1365
+ sectionType: z22.literal(SectionType.layout).default(SectionType.layout),
1366
+ spacing: z22.enum(spacings).default(Spacing.base),
1294
1367
  /** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
1295
- viewUrl: z21.string().optional(),
1296
- width: z21.number().default(100)
1368
+ viewUrl: z22.string().optional(),
1369
+ width: z22.number().default(100)
1297
1370
  });
1298
1371
 
1299
1372
  // src/schema/widgets/checkout-and-beyond/uiLabels.ts
@@ -1310,8 +1383,8 @@ var UI_LABELS = {
1310
1383
  };
1311
1384
 
1312
1385
  // src/schema/widgets/checkout-and-beyond/root.ts
1313
- var localized = (fallback) => z22.record(z22.string(), z22.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1314
- var CABUILabels = z22.object({
1386
+ var localized = (fallback) => z23.record(z23.string(), z23.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
1387
+ var CABUILabels = z23.object({
1315
1388
  currentPage: localized(UI_LABELS.currentPage),
1316
1389
  loadingOptions: localized(UI_LABELS.loadingOptions),
1317
1390
  nextPage: localized(UI_LABELS.nextPage),
@@ -1332,154 +1405,154 @@ var CABUILabels = z22.object({
1332
1405
  subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
1333
1406
  updating: { ...UI_LABELS.updating }
1334
1407
  }));
1335
- var TargetArea = z22.object({
1336
- fill: z22.boolean().optional(),
1337
- flip: z22.enum(["both", "horizontal", "vertical"]).optional(),
1338
- icon: z22.string(),
1339
- label: z22.string(),
1340
- width: z22.string()
1408
+ var TargetArea = z23.object({
1409
+ fill: z23.boolean().optional(),
1410
+ flip: z23.enum(["both", "horizontal", "vertical"]).optional(),
1411
+ icon: z23.string(),
1412
+ label: z23.string(),
1413
+ width: z23.string()
1341
1414
  }).default(targetAreas[EditorMode.checkoutExtension][1]);
1342
- var CABTracking = z22.object({
1343
- enableAttribution: z22.boolean().nullish().transform((value) => value ?? true),
1344
- enableSource: z22.boolean().nullish().transform((value) => value ?? true),
1345
- enableWidget: z22.boolean().nullish().transform((value) => value ?? true)
1415
+ var CABTracking = z23.object({
1416
+ enableAttribution: z23.boolean().nullish().transform((value) => value ?? true),
1417
+ enableSource: z23.boolean().nullish().transform((value) => value ?? true),
1418
+ enableWidget: z23.boolean().nullish().transform((value) => value ?? true)
1346
1419
  }).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
1347
- var CABExperiment = z22.object({
1348
- elementId: z22.number(),
1349
- experimentId: z22.number(),
1350
- experimentType: z22.string(),
1351
- selectedId: z22.number()
1420
+ var CABExperiment = z23.object({
1421
+ elementId: z23.number(),
1422
+ experimentId: z23.number(),
1423
+ experimentType: z23.string(),
1424
+ selectedId: z23.number()
1352
1425
  });
1353
1426
  var CABRootSection = CABLayoutSection.extend({
1354
- editorMode: z22.enum(editorModes).default(EditorMode.checkoutExtension),
1427
+ editorMode: z23.enum(editorModes).default(EditorMode.checkoutExtension),
1355
1428
  experiment: CABExperiment.optional(),
1356
1429
  // Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
1357
1430
  // `null` must fall back rather than throw the widget; malformed values still throw.
1358
- previewMode: z22.boolean().nullish().transform((value) => value ?? false),
1359
- storeId: z22.number().nullable().default(null),
1431
+ previewMode: z23.boolean().nullish().transform((value) => value ?? false),
1432
+ storeId: z23.number().nullable().default(null),
1360
1433
  targetArea: TargetArea.nullable(),
1361
1434
  tracking: CABTracking,
1362
- type: z22.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1435
+ type: z23.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
1363
1436
  uiLabels: CABUILabels,
1364
- version: z22.literal(2).default(2),
1365
- widgetId: z22.number().nullable().default(null)
1437
+ version: z23.literal(2).default(2),
1438
+ widgetId: z23.number().nullable().default(null)
1366
1439
  });
1367
1440
 
1368
1441
  // src/schema/widgets/contentBlock.ts
1369
- var ContentBlockV1 = z23.object({
1370
- blockSpacing: z23.enum(spacings).optional(),
1371
- imageBlocks: z23.union([
1372
- z23.array(
1373
- z23.object({
1374
- altText: z23.string().nullable(),
1375
- description: z23.string().nullable(),
1376
- id: z23.uuid(),
1377
- imagePlacement: z23.enum(["top", "right", "bottom", "left"]),
1378
- imageSize: z23.number(),
1379
- imageUrl: z23.url(),
1380
- textAlignment: z23.enum(["left", "center", "right"]),
1442
+ var ContentBlockV1 = z24.object({
1443
+ blockSpacing: z24.enum(spacings).optional(),
1444
+ imageBlocks: z24.union([
1445
+ z24.array(
1446
+ z24.object({
1447
+ altText: z24.string().nullable(),
1448
+ description: z24.string().nullable(),
1449
+ id: z24.uuid(),
1450
+ imagePlacement: z24.enum(["top", "right", "bottom", "left"]),
1451
+ imageSize: z24.number(),
1452
+ imageUrl: z24.url(),
1453
+ textAlignment: z24.enum(["left", "center", "right"]),
1381
1454
  /** Inline scale only: an image caption can never be a block-level heading. */
1382
- textSize: z23.enum(inlineTextSizeNames)
1455
+ textSize: z24.enum(inlineTextSizeNames)
1383
1456
  })
1384
1457
  ),
1385
- z23.strictObject({}).transform(() => [])
1458
+ z24.strictObject({}).transform(() => [])
1386
1459
  ]).optional(),
1387
- imageLayout: z23.enum(["row", "column"]).optional(),
1388
- language: z23.object({
1389
- description: z23.string(),
1390
- superTitle: z23.string(),
1391
- title: z23.string()
1460
+ imageLayout: z24.enum(["row", "column"]).optional(),
1461
+ language: z24.object({
1462
+ description: z24.string(),
1463
+ superTitle: z24.string(),
1464
+ title: z24.string()
1392
1465
  }),
1393
- previewMode: z23.boolean(),
1394
- type: z23.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1395
- version: z23.literal(1)
1466
+ previewMode: z24.boolean(),
1467
+ type: z24.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
1468
+ version: z24.literal(1)
1396
1469
  });
1397
- var ContentBlock = z23.discriminatedUnion("version", [
1470
+ var ContentBlock = z24.discriminatedUnion("version", [
1398
1471
  ContentBlockV1,
1399
1472
  CABRootSection.extend({
1400
- type: z23.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1473
+ type: z24.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
1401
1474
  })
1402
1475
  ]);
1403
1476
 
1404
1477
  // src/schema/widgets/giftWithPurchase.ts
1405
- import { z as z24 } from "zod";
1406
- var GiftWithPurchase = z24.looseObject({
1407
- type: z24.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1478
+ import { z as z25 } from "zod";
1479
+ var GiftWithPurchase = z25.looseObject({
1480
+ type: z25.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
1408
1481
  });
1409
1482
 
1410
1483
  // src/schema/widgets/lineItemEditor.ts
1411
- import { z as z25 } from "zod";
1412
- var LineItemEditorSwitchLanguageV1 = z25.object({
1413
- downgradeToOneTimeLabel: z25.string().optional(),
1484
+ import { z as z26 } from "zod";
1485
+ var LineItemEditorSwitchLanguageV1 = z26.object({
1486
+ downgradeToOneTimeLabel: z26.string().optional(),
1414
1487
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
1415
- subscriptionOptionLabel: z25.string().optional(),
1416
- upgradeToSubscriptionLabel: z25.string().optional(),
1417
- upgradeToSubscriptionWithoutDiscountLabel: z25.string().optional()
1488
+ subscriptionOptionLabel: z26.string().optional(),
1489
+ upgradeToSubscriptionLabel: z26.string().optional(),
1490
+ upgradeToSubscriptionWithoutDiscountLabel: z26.string().optional()
1418
1491
  });
1419
- var LineItemEditorV1 = z25.object({
1492
+ var LineItemEditorV1 = z26.object({
1420
1493
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
1421
- button: z25.object({ kind: z25.enum(["plain", "primary", "secondary"]).optional() }).optional(),
1422
- previewMode: z25.boolean().optional(),
1423
- switchToSubscription: z25.object({
1424
- disableDowngrade: z25.boolean().optional(),
1494
+ button: z26.object({ kind: z26.enum(["plain", "primary", "secondary"]).optional() }).optional(),
1495
+ previewMode: z26.boolean().optional(),
1496
+ switchToSubscription: z26.object({
1497
+ disableDowngrade: z26.boolean().optional(),
1425
1498
  language: LineItemEditorSwitchLanguageV1.optional()
1426
1499
  }).optional(),
1427
- switchToSubscriptionEnabled: z25.boolean().optional(),
1428
- tracking: z25.object({
1429
- enableAttribution: z25.boolean().optional(),
1430
- enableSource: z25.boolean().optional(),
1431
- enableWidget: z25.boolean().optional()
1500
+ switchToSubscriptionEnabled: z26.boolean().optional(),
1501
+ tracking: z26.object({
1502
+ enableAttribution: z26.boolean().optional(),
1503
+ enableSource: z26.boolean().optional(),
1504
+ enableWidget: z26.boolean().optional()
1432
1505
  }).optional(),
1433
- type: z25.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
1434
- version: z25.literal(1)
1506
+ type: z26.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
1507
+ version: z26.literal(1)
1435
1508
  });
1436
- var LineItemEditor = z25.discriminatedUnion("version", [
1509
+ var LineItemEditor = z26.discriminatedUnion("version", [
1437
1510
  LineItemEditorV1,
1438
1511
  CABRootSection.extend({
1439
- type: z25.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1512
+ type: z26.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
1440
1513
  })
1441
1514
  ]);
1442
1515
 
1443
1516
  // src/schema/widgets/progressBar.ts
1444
- import { z as z26 } from "zod";
1445
- var ProgressBar = z26.looseObject({
1446
- type: z26.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1517
+ import { z as z27 } from "zod";
1518
+ var ProgressBar = z27.looseObject({
1519
+ type: z27.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
1447
1520
  });
1448
1521
 
1449
1522
  // src/schema/widgets/rebuyButton.ts
1450
- import { z as z27 } from "zod";
1451
- var RebuyButtonV1 = z27.looseObject({
1452
- type: z27.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1453
- version: z27.literal(1)
1523
+ import { z as z28 } from "zod";
1524
+ var RebuyButtonV1 = z28.looseObject({
1525
+ type: z28.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
1526
+ version: z28.literal(1)
1454
1527
  });
1455
- var RebuyButton = z27.discriminatedUnion("version", [
1528
+ var RebuyButton = z28.discriminatedUnion("version", [
1456
1529
  RebuyButtonV1,
1457
1530
  CABRootSection.extend({
1458
- type: z27.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1531
+ type: z28.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
1459
1532
  })
1460
1533
  ]);
1461
1534
 
1462
1535
  // src/schema/widgets/rebuyMonetize.ts
1463
- import { z as z28 } from "zod";
1464
- var RebuyMonetize = z28.looseObject({
1465
- type: z28.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1536
+ import { z as z29 } from "zod";
1537
+ var RebuyMonetize = z29.looseObject({
1538
+ type: z29.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
1466
1539
  });
1467
- var RebuyMonetizeV1 = z28.object({
1468
- name: z28.string().nullable().optional(),
1469
- previewMode: z28.boolean().optional(),
1540
+ var RebuyMonetizeV1 = z29.object({
1541
+ name: z29.string().nullable().optional(),
1542
+ previewMode: z29.boolean().optional(),
1470
1543
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
1471
- privacyPolicyUrl: z28.string().nullable().optional(),
1544
+ privacyPolicyUrl: z29.string().nullable().optional(),
1472
1545
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
1473
- subVertical: z28.string().nullable().optional(),
1474
- tracking: z28.object({
1475
- enableAttribution: z28.boolean().optional(),
1476
- enableSource: z28.boolean().optional(),
1477
- enableWidget: z28.boolean().optional()
1546
+ subVertical: z29.string().nullable().optional(),
1547
+ tracking: z29.object({
1548
+ enableAttribution: z29.boolean().optional(),
1549
+ enableSource: z29.boolean().optional(),
1550
+ enableWidget: z29.boolean().optional()
1478
1551
  }).optional(),
1479
- type: z28.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
1480
- version: z28.literal(1),
1552
+ type: z29.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
1553
+ version: z29.literal(1),
1481
1554
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
1482
- vertical: z28.string().nullable().optional()
1555
+ vertical: z29.string().nullable().optional()
1483
1556
  });
1484
1557
 
1485
1558
  // src/schema/widgetData.ts
@@ -1493,7 +1566,7 @@ var extensionWidgetTypes = [
1493
1566
  WidgetType.ui_extension_line_item_editor,
1494
1567
  WidgetType.ui_extension_progress_bar
1495
1568
  ];
1496
- var WidgetData = z29.discriminatedUnion("type", [
1569
+ var WidgetData = z30.discriminatedUnion("type", [
1497
1570
  ABTestingPlaceholder,
1498
1571
  CheckoutExtension,
1499
1572
  ContentBlock,