@riverbankcms/sdk 0.90.0 → 0.91.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 (90) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-3TT47WCF.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-ORCLLUNZ.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  5. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  6. package/dist/_dts/api/src/index.d.ts +4 -0
  7. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  8. package/dist/_dts/api/src/navigation.d.ts +2 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
  10. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
  14. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  15. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +17 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  22. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  23. package/dist/_dts/core/src/string.d.ts +12 -0
  24. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
  25. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  26. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  27. package/dist/_dts/sdk/src/version.d.ts +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-AFPMCLS7.mjs} +2 -2
  29. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-GDT2QGIL.mjs} +1 -1
  30. package/dist/{chunk-PMBB6MQ7.mjs → chunk-RQUZYSES.mjs} +345 -153
  31. package/dist/{chunk-AEOYWPE4.mjs → chunk-S3YHJWEU.mjs} +7 -7
  32. package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
  33. package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
  34. package/dist/cli/index.mjs +363 -437
  35. package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
  36. package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
  37. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-AFX37652.mjs} +2 -2
  38. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-32V5QCOW.mjs} +6 -6
  39. package/dist/client/bookings.mjs +1170 -571
  40. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-TJGQJ7ER.mjs} +3 -3
  41. package/dist/client/{cart-IYIBA5CL.mjs → cart-JUU2JEW4.mjs} +6 -6
  42. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-RD6BTFX4.mjs} +6 -6
  43. package/dist/client/{chunk-DAS5CIER.mjs → chunk-6QZIBNGV.mjs} +119 -21
  44. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-6RN62XBV.mjs} +1 -1
  45. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-C4LP6BPG.mjs} +1 -1
  46. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-CKXEUWWA.mjs} +2 -2
  47. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-E6VIWZUG.mjs} +6 -3
  48. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-FMZZHAIR.mjs} +2 -2
  49. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-ISAUXU5R.mjs} +1 -1
  50. package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
  51. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-MLBNVN4H.mjs} +99 -26
  52. package/dist/client/{chunk-7DH35FGA.mjs → chunk-PMNAV6LO.mjs} +1 -1
  53. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-RMOFBBNA.mjs} +5 -5
  54. package/dist/client/{chunk-25W2EQUN.mjs → chunk-RWYFG625.mjs} +17 -8
  55. package/dist/client/client.mjs +305 -113
  56. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-X63QAIVV.mjs} +6 -6
  57. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-5T24GCZL.mjs} +9 -9
  58. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-AZVTF22X.mjs} +9 -9
  59. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-7GPFNLGF.mjs} +9 -9
  60. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-QEUMTMUM.mjs} +9 -9
  61. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-P2EDKCQZ.mjs} +9 -9
  62. package/dist/client/{form-ZS6KX4U2.mjs → form-NUJ7H4IN.mjs} +3 -3
  63. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-JB7LECPL.mjs} +3 -3
  64. package/dist/client/hooks.mjs +93 -42
  65. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-UEYWUCSW.mjs} +3 -3
  66. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-S2YZQ2X7.mjs} +3 -3
  67. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-H5MADGG7.mjs} +6 -6
  68. package/dist/client/{productList-NI72Q62Z.mjs → productList-DK7YON7H.mjs} +6 -6
  69. package/dist/client/rendering/client.mjs +262 -70
  70. package/dist/client/rendering/islands.mjs +19 -19
  71. package/dist/client/rendering.mjs +306 -114
  72. package/dist/client/{shop-3ZQPEWYI.mjs → shop-6PA7RDRJ.mjs} +6 -6
  73. package/dist/client/spam-protection.mjs +10 -10
  74. package/dist/preview-next/client/runtime.mjs +5 -5
  75. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-JP5347OB.mjs} +6 -6
  76. package/dist/server/components.mjs +149 -69
  77. package/dist/server/config-validation.mjs +85 -34
  78. package/dist/server/config.mjs +85 -34
  79. package/dist/server/data.mjs +93 -42
  80. package/dist/server/index.mjs +1 -1
  81. package/dist/server/navigation.mjs +2 -2
  82. package/dist/server/next.mjs +170 -90
  83. package/dist/server/page-converter.mjs +77 -26
  84. package/dist/server/prebuild.mjs +1 -1
  85. package/dist/server/rendering/server.mjs +161 -81
  86. package/dist/server/rendering.mjs +165 -85
  87. package/dist/server/routing.mjs +135 -58
  88. package/dist/server/server.mjs +102 -51
  89. package/package.json +2 -2
  90. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -86,7 +86,7 @@ function ze() {
86
86
  /* @__PURE__ */ Te(P)
87
87
  );
88
88
  }
89
- function z20(e) {
89
+ function z25(e) {
90
90
  if (L) {
91
91
  if (/* @__PURE__ */ Te(P) !== null)
92
92
  throw Tt(), Je;
@@ -2115,12 +2115,12 @@ function ha(e, t) {
2115
2115
  var mt = we(Dr, 2);
2116
2116
  let Pr;
2117
2117
  var We = X(mt);
2118
- en(We), We.__change = ui, z20(mt);
2118
+ en(We), We.__change = ui, z25(mt);
2119
2119
  var Ut = we(mt, 2), wi = X(Ut);
2120
2120
  {
2121
2121
  var pi = (n) => {
2122
2122
  var u = na(), _ = Gr(u), y = X(_);
2123
- Ge(y, () => c(re).verified), z20(_);
2123
+ Ge(y, () => c(re).verified), z25(_);
2124
2124
  var T = we(_, 2);
2125
2125
  en(T), Pe(() => {
2126
2126
  se(T, "name", V()), jo(T, c(Le));
@@ -2129,10 +2129,10 @@ function ha(e, t) {
2129
2129
  {
2130
2130
  var _ = (T) => {
2131
2131
  var E = ia(), p = X(E);
2132
- Ge(p, () => c(re).verifying), z20(E), ne(T, E);
2132
+ Ge(p, () => c(re).verifying), z25(E), ne(T, E);
2133
2133
  }, y = (T) => {
2134
2134
  var E = oa(), p = X(E);
2135
- Ge(p, () => c(re).label), z20(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2135
+ Ge(p, () => c(re).label), z25(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2136
2136
  };
2137
2137
  $e(
2138
2138
  n,
@@ -2147,18 +2147,18 @@ function ha(e, t) {
2147
2147
  c(C) === b.VERIFIED ? n(pi) : n(bi, false);
2148
2148
  });
2149
2149
  }
2150
- z20(Ut);
2150
+ z25(Ut);
2151
2151
  var yi = we(Ut, 2);
2152
2152
  {
2153
2153
  var Ei = (n) => {
2154
2154
  var u = aa(), _ = X(u);
2155
- se(_, "href", sr), z20(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2155
+ se(_, "href", sr), z25(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2156
2156
  };
2157
2157
  $e(yi, (n) => {
2158
2158
  (N() !== true || c(Dt)) && n(Ei);
2159
2159
  });
2160
2160
  }
2161
- z20(Mt);
2161
+ z25(Mt);
2162
2162
  var Or = we(Mt, 2);
2163
2163
  {
2164
2164
  var xi = (n) => {
@@ -2166,16 +2166,16 @@ function ha(e, t) {
2166
2166
  {
2167
2167
  var y = (E) => {
2168
2168
  var p = la(), x = X(p);
2169
- Ge(x, () => c(re).expired), z20(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2169
+ Ge(x, () => c(re).expired), z25(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2170
2170
  }, T = (E) => {
2171
2171
  var p = sa(), x = X(p);
2172
- Ge(x, () => c(re).error), z20(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2172
+ Ge(x, () => c(re).error), z25(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2173
2173
  };
2174
2174
  $e(_, (E) => {
2175
2175
  c(C) === b.EXPIRED ? E(y) : E(T, false);
2176
2176
  });
2177
2177
  }
2178
- z20(u), ne(n, u);
2178
+ z25(u), ne(n, u);
2179
2179
  };
2180
2180
  $e(Or, (n) => {
2181
2181
  (c(He) || c(C) === b.EXPIRED) && n(xi);
@@ -2185,7 +2185,7 @@ function ha(e, t) {
2185
2185
  {
2186
2186
  var $i = (n) => {
2187
2187
  var u = ua(), _ = X(u), y = X(_);
2188
- Ge(y, () => c(re).footer), z20(_), z20(u), ne(n, u);
2188
+ Ge(y, () => c(re).footer), z25(_), z25(u), ne(n, u);
2189
2189
  };
2190
2190
  $e(Fr, (n) => {
2191
2191
  c(re).footer && (k() !== true || c(Dt)) && n($i);
@@ -2201,7 +2201,7 @@ function ha(e, t) {
2201
2201
  v() && n(Ci);
2202
2202
  });
2203
2203
  }
2204
- return z20(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2204
+ return z25(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2205
2205
  (n) => {
2206
2206
  se(ot, "data-state", c(C)), se(ot, "data-floating", v()), Pr = Fo(mt, 1, "altcha-checkbox", null, Pr, n), se(We, "id", c(cr)), We.required = r2() !== "onsubmit" && (!v() || r2() !== "off");
2207
2207
  },
@@ -5289,6 +5289,8 @@ function publicEventPricingType(pricing) {
5289
5289
  case "ticket_types":
5290
5290
  case "course":
5291
5291
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
5292
+ case "external":
5293
+ return "external";
5292
5294
  }
5293
5295
  }
5294
5296
  function publicEventScalarPrice(pricing) {
@@ -5303,6 +5305,7 @@ function publicEventPricingMode(pricing) {
5303
5305
  return "ticket_types";
5304
5306
  case "drop_in":
5305
5307
  case "course":
5308
+ case "external":
5306
5309
  return void 0;
5307
5310
  }
5308
5311
  }
@@ -5320,6 +5323,7 @@ function isFreePublicEventPriceDisplay(display) {
5320
5323
  case "range":
5321
5324
  case "mixed":
5322
5325
  case "unavailable":
5326
+ case "external":
5323
5327
  return false;
5324
5328
  }
5325
5329
  }
@@ -5410,10 +5414,11 @@ function omitZeroAmountFutureRows(rows) {
5410
5414
  if (rows.length <= 1) {
5411
5415
  return rows;
5412
5416
  }
5413
- const [firstRow, ...futureRows] = rows;
5414
- if (!firstRow) {
5417
+ const firstRow = rows[0];
5418
+ if (firstRow === void 0) {
5415
5419
  return [];
5416
5420
  }
5421
+ const futureRows = rows.slice(1);
5417
5422
  return [
5418
5423
  firstRow,
5419
5424
  ...futureRows.filter((row) => row.amountCents > 0)
@@ -5456,11 +5461,11 @@ function isValidTimeZone(timeZone) {
5456
5461
  }
5457
5462
  function getSafeTimeZone(timeZone) {
5458
5463
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
5459
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
5464
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
5460
5465
  }
5461
5466
  function parseStrictBookingTimeZone(timeZone) {
5462
5467
  const normalized = timeZone.trim();
5463
- if (!normalized || !isValidTimeZone(normalized)) {
5468
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
5464
5469
  return null;
5465
5470
  }
5466
5471
  return normalized;
@@ -5547,7 +5552,7 @@ function parseScheduledBookingDateTime(input) {
5547
5552
  try {
5548
5553
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
5549
5554
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
5550
- if (!timeZone) {
5555
+ if (timeZone === null) {
5551
5556
  return {
5552
5557
  ok: false,
5553
5558
  field: "timeZone",
@@ -5594,7 +5599,7 @@ function getBookingLocalDateKey(input) {
5594
5599
  }
5595
5600
  function parseBookingLocalDate(value) {
5596
5601
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
5597
- if (!match?.groups) {
5602
+ if (match === null || match.groups === void 0) {
5598
5603
  throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
5599
5604
  }
5600
5605
  const year = Number(match.groups.year);
@@ -5622,9 +5627,107 @@ function addLocalScheduleDays(date, days) {
5622
5627
  };
5623
5628
  }
5624
5629
 
5625
- // ../theme-core/src/accordions/types.ts
5630
+ // ../blocks/src/system/manifest/richTextSchema.ts
5626
5631
  import { z as z5 } from "zod";
5627
- var accordionIconSchema = z5.enum([
5632
+ var TipTapMarkSchema = z5.object({
5633
+ type: z5.string(),
5634
+ attrs: z5.record(z5.string(), z5.unknown()).optional()
5635
+ });
5636
+ var TipTapNodeSchema = z5.lazy(
5637
+ () => z5.object({
5638
+ type: z5.string(),
5639
+ content: z5.array(TipTapNodeSchema).optional(),
5640
+ text: z5.string().optional(),
5641
+ attrs: z5.record(z5.string(), z5.unknown()).optional(),
5642
+ marks: z5.array(TipTapMarkSchema).optional()
5643
+ })
5644
+ );
5645
+ var RichTextValueSchema = z5.union([
5646
+ // Canonical: TipTap document directly
5647
+ TipTapNodeSchema,
5648
+ // Legacy (read-tolerance only): wrapped in { doc: {...} }
5649
+ z5.object({
5650
+ doc: TipTapNodeSchema
5651
+ })
5652
+ ]);
5653
+ var RichTextDocSchema = z5.object({
5654
+ type: z5.literal("doc"),
5655
+ content: z5.array(TipTapNodeSchema)
5656
+ });
5657
+
5658
+ // ../blocks/src/lib/media.ts
5659
+ import z6 from "zod";
5660
+ var hotspotSchema = z6.object({
5661
+ x: z6.number().min(0).max(1),
5662
+ y: z6.number().min(0).max(1),
5663
+ radius: z6.number().optional()
5664
+ });
5665
+ var rotationSchema = z6.union([z6.literal(0), z6.literal(90), z6.literal(180), z6.literal(270)]);
5666
+ var rectSchema = z6.tuple([z6.number(), z6.number(), z6.number(), z6.number()]);
5667
+ var aspectCropSchema = z6.object({
5668
+ aspect: z6.preprocess((value) => value == null ? void 0 : value, z6.string().optional()),
5669
+ rect: z6.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
5670
+ hotspot: z6.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
5671
+ rotation: z6.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
5672
+ });
5673
+ var transformSchema = z6.object({
5674
+ aspectCrops: z6.preprocess((value) => {
5675
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
5676
+ return void 0;
5677
+ }
5678
+ return value;
5679
+ }, z6.record(z6.string(), aspectCropSchema.catch({}))).optional(),
5680
+ rect: rectSchema.optional(),
5681
+ hotspot: hotspotSchema.optional(),
5682
+ rotation: rotationSchema.optional()
5683
+ });
5684
+ var mediaPosterSchema = z6.discriminatedUnion("tag", [
5685
+ z6.object({
5686
+ tag: z6.literal("storage"),
5687
+ assetId: z6.string().optional(),
5688
+ storageBucket: z6.string().min(1),
5689
+ storagePath: z6.string().min(1)
5690
+ }),
5691
+ z6.object({
5692
+ tag: z6.literal("external-src"),
5693
+ assetId: z6.string().optional(),
5694
+ src: z6.string().url()
5695
+ })
5696
+ ]);
5697
+ var mediaBaseSchema = z6.object({
5698
+ purpose: z6.string().optional(),
5699
+ placeholder: z6.boolean().default(true).optional(),
5700
+ assetId: z6.string().optional(),
5701
+ identifier: z6.string().optional(),
5702
+ src: z6.string().optional(),
5703
+ alt: z6.string().optional(),
5704
+ filename: z6.string().optional(),
5705
+ mimeType: z6.string().optional(),
5706
+ width: z6.number().optional(),
5707
+ height: z6.number().optional(),
5708
+ storageBucket: z6.string().optional(),
5709
+ storagePath: z6.string().optional(),
5710
+ poster: mediaPosterSchema.optional(),
5711
+ transform: transformSchema.optional()
5712
+ });
5713
+ var imageMediaSchema = mediaBaseSchema.extend({ type: z6.literal("image") });
5714
+ var videoMediaSchema = mediaBaseSchema.extend({ type: z6.literal("video") });
5715
+ var audioMediaSchema = mediaBaseSchema.extend({ type: z6.literal("audio") });
5716
+ var documentMediaSchema = mediaBaseSchema.extend({ type: z6.literal("document") });
5717
+ var spreadsheetMediaSchema = mediaBaseSchema.extend({ type: z6.literal("spreadsheet") });
5718
+ var archiveMediaSchema = mediaBaseSchema.extend({ type: z6.literal("archive") });
5719
+ var mediaSchema = z6.discriminatedUnion("type", [
5720
+ imageMediaSchema,
5721
+ videoMediaSchema,
5722
+ audioMediaSchema,
5723
+ documentMediaSchema,
5724
+ spreadsheetMediaSchema,
5725
+ archiveMediaSchema
5726
+ ]);
5727
+
5728
+ // ../theme-core/src/accordions/types.ts
5729
+ import { z as z7 } from "zod";
5730
+ var accordionIconSchema = z7.enum([
5628
5731
  "plus-minus",
5629
5732
  // + becomes - (swap or rotate 90°)
5630
5733
  "chevron",
@@ -5636,70 +5739,70 @@ var accordionIconSchema = z5.enum([
5636
5739
  "circle-plus-minus"
5637
5740
  // ⊕ becomes ⊖ (swap with fade)
5638
5741
  ]);
5639
- var accordionSystemSchema = z5.object({
5742
+ var accordionSystemSchema = z7.object({
5640
5743
  // Visual styling (solid color only - gradients can be added later if needed).
5641
5744
  // null = no fill, so the accordion sits transparently on the section
5642
5745
  // surface (used by open, boxless "divided" looks).
5643
- background: z5.object({
5644
- type: z5.literal("solid"),
5746
+ background: z7.object({
5747
+ type: z7.literal("solid"),
5645
5748
  colorToken: themeColorTokenSchema
5646
5749
  }).nullable(),
5647
5750
  // Spacing (padding inside items)
5648
- spacing: z5.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
5751
+ spacing: z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
5649
5752
  // Border radius (null = inherit from theme.corners)
5650
- corners: z5.enum(["square", "soft", "rounded", "pill"]).nullable(),
5753
+ corners: z7.enum(["square", "soft", "rounded", "pill"]).nullable(),
5651
5754
  // Border styling (null = inherit from theme.border)
5652
- border: z5.object({
5653
- widthClass: z5.string(),
5755
+ border: z7.object({
5756
+ widthClass: z7.string(),
5654
5757
  // e.g., 'border', 'border-2', 'border-0'
5655
5758
  colorToken: themeColorTokenSchema
5656
5759
  }).nullable(),
5657
5760
  // Shadow (null = inherit from theme.shadow)
5658
- shadow: z5.object({
5659
- elevation: z5.enum(["none", "low", "medium", "high"]),
5660
- softness: z5.enum(["soft", "crisp", "hard"]).nullable(),
5661
- position: z5.enum(["bottom", "bottom-right"])
5761
+ shadow: z7.object({
5762
+ elevation: z7.enum(["none", "low", "medium", "high"]),
5763
+ softness: z7.enum(["soft", "crisp", "hard"]).nullable(),
5764
+ position: z7.enum(["bottom", "bottom-right"])
5662
5765
  }).nullable(),
5663
5766
  // Icon style and animation
5664
- icon: z5.object({
5767
+ icon: z7.object({
5665
5768
  style: accordionIconSchema,
5666
- position: z5.enum(["left", "right"]),
5667
- size: z5.enum(["sm", "md", "lg"]),
5769
+ position: z7.enum(["left", "right"]),
5770
+ size: z7.enum(["sm", "md", "lg"]),
5668
5771
  colorToken: themeColorTokenSchema.optional()
5669
5772
  }),
5670
5773
  // Trigger (question) styling
5671
- trigger: z5.object({
5774
+ trigger: z7.object({
5672
5775
  textColorToken: themeColorTokenSchema,
5673
- fontWeight: z5.enum(["regular", "medium", "semibold", "bold"]).nullable(),
5776
+ fontWeight: z7.enum(["regular", "medium", "semibold", "bold"]).nullable(),
5674
5777
  // null = inherit from theme
5675
5778
  // Question typography. Defaults keep the historical body-font look; set
5676
5779
  // fontFamily 'heading' + a larger scale to give questions real presence.
5677
- fontFamily: z5.enum(["body", "heading"]).optional(),
5780
+ fontFamily: z7.enum(["body", "heading"]).optional(),
5678
5781
  // default 'body'
5679
- fontScale: z5.enum(["body", "md", "lg"]).optional(),
5782
+ fontScale: z7.enum(["body", "md", "lg"]).optional(),
5680
5783
  // default 'body'
5681
- letterSpacing: z5.enum(["normal", "tight", "wide"]).optional(),
5682
- textTransform: z5.enum(["none", "uppercase"]).optional()
5784
+ letterSpacing: z7.enum(["normal", "tight", "wide"]).optional(),
5785
+ textTransform: z7.enum(["none", "uppercase"]).optional()
5683
5786
  }),
5684
5787
  // Hover state styling
5685
- hover: z5.object({
5788
+ hover: z7.object({
5686
5789
  backgroundColorToken: themeColorTokenSchema.optional(),
5687
5790
  textColorToken: themeColorTokenSchema.optional(),
5688
5791
  borderColorToken: themeColorTokenSchema.optional()
5689
5792
  }),
5690
5793
  // Open-state emphasis: how an expanded item is visually rewarded. All
5691
5794
  // optional; omit for the historical "only the text recolors" behaviour.
5692
- openState: z5.object({
5795
+ openState: z7.object({
5693
5796
  backgroundColorToken: themeColorTokenSchema.optional(),
5694
5797
  triggerColorToken: themeColorTokenSchema.optional(),
5695
- accent: z5.object({
5696
- edge: z5.enum(["left", "top", "bottom"]),
5798
+ accent: z7.object({
5799
+ edge: z7.enum(["left", "top", "bottom"]),
5697
5800
  colorToken: themeColorTokenSchema,
5698
- thickness: z5.enum(["thin", "medium", "thick"])
5801
+ thickness: z7.enum(["thin", "medium", "thick"])
5699
5802
  }).optional()
5700
5803
  }).optional(),
5701
5804
  // Content (answer) styling
5702
- content: z5.object({
5805
+ content: z7.object({
5703
5806
  textColorToken: themeColorTokenSchema
5704
5807
  })
5705
5808
  });
@@ -6473,12 +6576,170 @@ var logger = {
6473
6576
  withFields: (_) => logger
6474
6577
  };
6475
6578
 
6579
+ // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
6580
+ import { z as z8 } from "zod";
6581
+ var bookingDepositRefundPolicySchema = z8.enum([
6582
+ "refundable",
6583
+ "non_refundable"
6584
+ ]);
6585
+ var bookingInstalmentPlanSchema = z8.union([
6586
+ z8.object({
6587
+ kind: z8.literal("deposit_plus_one_remainder"),
6588
+ depositAmountCents: z8.number().int().min(0),
6589
+ depositRefundability: bookingDepositRefundPolicySchema,
6590
+ remainderDueCount: z8.number().int().positive(),
6591
+ intervalUnit: z8.enum(["day", "week", "month"])
6592
+ }),
6593
+ z8.object({
6594
+ kind: z8.literal("deposit_plus_scheduled_instalments"),
6595
+ depositAmountCents: z8.number().int().min(0),
6596
+ depositRefundability: bookingDepositRefundPolicySchema,
6597
+ instalmentCount: z8.number().int().positive(),
6598
+ intervalCount: z8.number().int().positive(),
6599
+ intervalUnit: z8.enum(["day", "week", "month"])
6600
+ }),
6601
+ z8.object({
6602
+ kind: z8.literal("equal_scheduled_instalments"),
6603
+ instalmentCount: z8.number().int().positive(),
6604
+ intervalCount: z8.number().int().positive(),
6605
+ intervalUnit: z8.enum(["day", "week", "month"])
6606
+ })
6607
+ ]);
6608
+ var bookingFlexibleBalanceDueDateRuleSchema = z8.union([
6609
+ z8.object({
6610
+ kind: z8.literal("relative_to_start_date"),
6611
+ daysBeforeStart: z8.number().int().positive()
6612
+ }),
6613
+ z8.object({
6614
+ kind: z8.literal("fixed_calendar_date"),
6615
+ dueAt: z8.string().datetime()
6616
+ })
6617
+ ]);
6618
+ var bookingFlexibleBalanceConfigSchema = z8.object({
6619
+ upfrontAmountCents: z8.number().int().min(0),
6620
+ dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
6621
+ depositRefundability: bookingDepositRefundPolicySchema
6622
+ });
6623
+ var blockBookingPaymentCollectionOptionSchema = z8.union([
6624
+ z8.object({
6625
+ kind: z8.literal("upfront")
6626
+ }),
6627
+ z8.object({
6628
+ kind: z8.literal("deferred_manual")
6629
+ }),
6630
+ z8.object({
6631
+ kind: z8.literal("instalment_plan"),
6632
+ plan: bookingInstalmentPlanSchema
6633
+ }),
6634
+ z8.object({
6635
+ kind: z8.literal("flexible_balance"),
6636
+ config: bookingFlexibleBalanceConfigSchema
6637
+ })
6638
+ ]);
6639
+ var blockBookingPaymentTermsSchema = z8.object({
6640
+ allowedOptions: z8.array(blockBookingPaymentCollectionOptionSchema).min(1)
6641
+ });
6642
+
6643
+ // ../blocks/src/system/blocks/courses/shared/schemas.ts
6644
+ import { z as z9 } from "zod";
6645
+ var courseVenueSchema = z9.object({
6646
+ id: z9.string(),
6647
+ name: z9.string(),
6648
+ address: z9.string().nullable()
6649
+ });
6650
+ var courseSessionSchema = z9.object({
6651
+ id: z9.string(),
6652
+ startsAt: z9.string(),
6653
+ endsAt: z9.string(),
6654
+ timeZone: z9.string(),
6655
+ capacityOverride: z9.number().nullable().optional(),
6656
+ overrides: z9.record(z9.string(), z9.unknown()).nullable().optional()
6657
+ });
6658
+ var courseTeamMemberSummarySchema = z9.object({
6659
+ id: z9.string(),
6660
+ name: z9.string(),
6661
+ roleLabel: z9.string().nullable(),
6662
+ summary: z9.string().nullable(),
6663
+ profilePath: z9.string().nullable()
6664
+ });
6665
+ var coursePricingOptionSchema = z9.object({
6666
+ id: z9.string(),
6667
+ name: z9.string(),
6668
+ description: z9.string().nullable(),
6669
+ priceAmount: z9.number(),
6670
+ isActive: z9.boolean(),
6671
+ sortOrder: z9.number(),
6672
+ capacityLimit: z9.number().nullable(),
6673
+ saleStartsAt: z9.string().nullable(),
6674
+ saleEndsAt: z9.string().nullable(),
6675
+ attendanceScope: z9.enum(["in_person", "online", "both"]).nullable().optional()
6676
+ });
6677
+ var coursePricingSchema = z9.object({
6678
+ bookingRequirement: z9.enum(["none", "required"]),
6679
+ pricingStrategy: z9.enum(["free", "single", "tiered"]),
6680
+ currency: z9.string(),
6681
+ singlePriceAmount: z9.number().nullable(),
6682
+ paymentTerms: blockBookingPaymentTermsSchema,
6683
+ options: z9.array(coursePricingOptionSchema)
6684
+ });
6685
+ var publicCourseSchema = z9.object({
6686
+ id: z9.string(),
6687
+ title: z9.string(),
6688
+ slug: z9.string(),
6689
+ description: z9.unknown().nullable(),
6690
+ teamMembers: z9.array(courseTeamMemberSummarySchema).optional(),
6691
+ enrollmentOpen: z9.boolean(),
6692
+ pricing: coursePricingSchema.optional(),
6693
+ priceCents: z9.number().nullable(),
6694
+ currency: z9.string(),
6695
+ paymentTerms: blockBookingPaymentTermsSchema,
6696
+ enrollmentCapacity: z9.number().nullable(),
6697
+ acceptsMemberships: z9.boolean(),
6698
+ status: z9.enum(["active", "draft", "cancelled"]),
6699
+ sessionsCount: z9.number(),
6700
+ enrolledCount: z9.number(),
6701
+ availableSpots: z9.number().nullable(),
6702
+ sessions: z9.array(courseSessionSchema),
6703
+ venue: courseVenueSchema.nullable(),
6704
+ contentEntryId: z9.string().nullable()
6705
+ });
6706
+ var publicCoursesArraySchema = z9.array(publicCourseSchema);
6707
+
6708
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
6709
+ function isRecord3(value) {
6710
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6711
+ }
6712
+ function isRuntimeEventDestination(value) {
6713
+ if (!isRecord3(value) || typeof value.kind !== "string") return false;
6714
+ if (value.kind === "native") {
6715
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
6716
+ }
6717
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
6718
+ }
6719
+ function resolveRuntimeEventDestination(event) {
6720
+ if (isRuntimeEventDestination(event.destination)) {
6721
+ return event.destination;
6722
+ }
6723
+ return {
6724
+ kind: "native",
6725
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
6726
+ path: typeof event.path === "string" ? event.path : ""
6727
+ };
6728
+ }
6729
+
6476
6730
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
6477
6731
  var DEFAULT_EVENT_CURRENCY = "USD";
6478
6732
  function resolveRuntimeEventPricing(event) {
6479
6733
  if (isPublicEventPricing(event.pricing)) {
6480
6734
  return event.pricing;
6481
6735
  }
6736
+ const destination = resolveRuntimeEventDestination(event);
6737
+ if (destination.kind === "external") {
6738
+ return {
6739
+ kind: "external",
6740
+ display: { kind: "external", label: "External registration" }
6741
+ };
6742
+ }
6482
6743
  const legacy = event;
6483
6744
  const currency = readCurrency(legacy.currency);
6484
6745
  if (event.requiresRegistration === false) {
@@ -6515,22 +6776,22 @@ function resolveRuntimeEventPricing(event) {
6515
6776
  function readCurrency(value) {
6516
6777
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
6517
6778
  }
6518
- function isRecord3(value) {
6779
+ function isRecord4(value) {
6519
6780
  return typeof value === "object" && value !== null && !Array.isArray(value);
6520
6781
  }
6521
6782
  function isPublicEventPricing(value) {
6522
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
6523
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
6783
+ if (!isRecord4(value) || typeof value.kind !== "string") return false;
6784
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
6524
6785
  }
6525
6786
  function isPublicEventTicketType(value) {
6526
- return isRecord3(value) && typeof value.id === "string";
6787
+ return isRecord4(value) && typeof value.id === "string";
6527
6788
  }
6528
6789
  function readTicketTypePriceDisplay(value, currency) {
6529
6790
  const display = readLegacyPriceDisplay(value, currency);
6530
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
6791
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
6531
6792
  }
6532
6793
  function readLegacyPriceDisplay(value, currency) {
6533
- if (!isRecord3(value) || typeof value.kind !== "string") {
6794
+ if (!isRecord4(value) || typeof value.kind !== "string") {
6534
6795
  return { kind: "unavailable", currency };
6535
6796
  }
6536
6797
  const displayCurrency = readCurrency(value.currency);
@@ -6569,7 +6830,7 @@ function readLegacyPriceDisplay(value, currency) {
6569
6830
  case "unavailable":
6570
6831
  return { kind: "unavailable", currency: displayCurrency };
6571
6832
  case "course":
6572
- return isRecord3(value.display) ? {
6833
+ return isRecord4(value.display) ? {
6573
6834
  kind: "course",
6574
6835
  display: readCoursePriceDisplay(value.display, displayCurrency)
6575
6836
  } : {
@@ -6605,69 +6866,69 @@ function readAmount(value) {
6605
6866
  }
6606
6867
 
6607
6868
  // ../theme-core/src/utils/tokenOrColor.ts
6608
- import { z as z6 } from "zod";
6609
- var tokenOrCssColorValueSchema = z6.string();
6869
+ import { z as z10 } from "zod";
6870
+ var tokenOrCssColorValueSchema = z10.string();
6610
6871
 
6611
6872
  // ../theme-core/src/cards/types.ts
6612
- import { z as z7 } from "zod";
6873
+ import { z as z11 } from "zod";
6613
6874
  var cardVariantRoleValues = ["default", "alternative"];
6614
6875
  var boxlessCardVariantValue = "none";
6615
- var cardSpacingSchema = z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
6616
- var gradientDirectionSchema2 = z7.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
6617
- var cardVariantRoleSchema = z7.enum(cardVariantRoleValues);
6618
- var boxStylesCardVariantSchema = z7.enum([
6876
+ var cardSpacingSchema = z11.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
6877
+ var gradientDirectionSchema2 = z11.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
6878
+ var cardVariantRoleSchema = z11.enum(cardVariantRoleValues);
6879
+ var boxStylesCardVariantSchema = z11.enum([
6619
6880
  ...cardVariantRoleValues,
6620
6881
  boxlessCardVariantValue
6621
6882
  ]);
6622
- var cardBackgroundSchema = z7.discriminatedUnion("type", [
6623
- z7.object({ type: z7.literal("solid"), colorToken: themeColorTokenSchema }),
6624
- z7.object({
6625
- type: z7.literal("gradient"),
6883
+ var cardBackgroundSchema = z11.discriminatedUnion("type", [
6884
+ z11.object({ type: z11.literal("solid"), colorToken: themeColorTokenSchema }),
6885
+ z11.object({
6886
+ type: z11.literal("gradient"),
6626
6887
  fromToken: themeColorTokenSchema,
6627
6888
  toToken: themeColorTokenSchema,
6628
6889
  direction: gradientDirectionSchema2
6629
6890
  }),
6630
- z7.object({ type: z7.literal("transparent") })
6891
+ z11.object({ type: z11.literal("transparent") })
6631
6892
  ]);
6632
- var cardBorderSchema = z7.object({
6633
- widthClass: z7.string(),
6893
+ var cardBorderSchema = z11.object({
6894
+ widthClass: z11.string(),
6634
6895
  colorToken: themeColorTokenSchema
6635
6896
  });
6636
- var cardCornerValueSchema = z7.enum([
6897
+ var cardCornerValueSchema = z11.enum([
6637
6898
  "square",
6638
6899
  "soft",
6639
6900
  "rounded",
6640
6901
  "pill",
6641
6902
  "expressive"
6642
6903
  ]);
6643
- var cardAccentEdgeSchema = z7.object({
6644
- edge: z7.enum(["left", "top", "right", "bottom"]),
6904
+ var cardAccentEdgeSchema = z11.object({
6905
+ edge: z11.enum(["left", "top", "right", "bottom"]),
6645
6906
  colorToken: themeColorTokenSchema,
6646
- width: z7.enum(["thin", "medium", "thick", "heavy"])
6907
+ width: z11.enum(["thin", "medium", "thick", "heavy"])
6647
6908
  });
6648
- var cardCornerRadiiSchema = z7.object({
6909
+ var cardCornerRadiiSchema = z11.object({
6649
6910
  topLeft: cardCornerValueSchema.optional(),
6650
6911
  topRight: cardCornerValueSchema.optional(),
6651
6912
  bottomLeft: cardCornerValueSchema.optional(),
6652
6913
  bottomRight: cardCornerValueSchema.optional()
6653
6914
  });
6654
- var cardVariantSchema = z7.object({
6655
- id: z7.string(),
6656
- name: z7.string().min(1).max(20),
6657
- enabled: z7.boolean(),
6658
- priority: z7.union([z7.literal(1), z7.literal(2), z7.literal(3)]),
6915
+ var cardVariantSchema = z11.object({
6916
+ id: z11.string(),
6917
+ name: z11.string().min(1).max(20),
6918
+ enabled: z11.boolean(),
6919
+ priority: z11.union([z11.literal(1), z11.literal(2), z11.literal(3)]),
6659
6920
  // Appearance (token-based)
6660
6921
  background: cardBackgroundSchema,
6661
6922
  spacing: cardSpacingSchema,
6662
6923
  // Optional foreground (card text) color, for cards on a strong fill.
6663
6924
  foregroundToken: themeColorTokenSchema.optional(),
6664
6925
  // Optional overrides (uses theme defaults if not specified)
6665
- shadow: z7.object({
6666
- elevation: z7.enum(["none", "low", "medium", "high"]),
6667
- softness: z7.enum(["crisp", "soft", "hard"]).nullable(),
6668
- position: z7.enum(["bottom", "bottom-right"]).default("bottom")
6926
+ shadow: z11.object({
6927
+ elevation: z11.enum(["none", "low", "medium", "high"]),
6928
+ softness: z11.enum(["crisp", "soft", "hard"]).nullable(),
6929
+ position: z11.enum(["bottom", "bottom-right"]).default("bottom")
6669
6930
  }).optional(),
6670
- corners: z7.enum(["square", "soft", "rounded", "pill"]).optional(),
6931
+ corners: z11.enum(["square", "soft", "rounded", "pill"]).optional(),
6671
6932
  // Per-corner radius override; wins over `corners` when set.
6672
6933
  cornerRadii: cardCornerRadiiSchema.optional(),
6673
6934
  // Border (optional)
@@ -6675,10 +6936,206 @@ var cardVariantSchema = z7.object({
6675
6936
  // Single accent edge; replaces `border` when set.
6676
6937
  accentEdge: cardAccentEdgeSchema.optional()
6677
6938
  });
6678
- var cardSystemSchema = z7.object({
6679
- variants: z7.array(cardVariantSchema).min(1).max(3)
6939
+ var cardSystemSchema = z11.object({
6940
+ variants: z11.array(cardVariantSchema).min(1).max(3)
6680
6941
  });
6681
6942
 
6943
+ // ../blocks/src/system/blocks/events/shared/schemas.ts
6944
+ import { z as z12 } from "zod";
6945
+ var eventPresetSchema = z12.enum(["event", "class", "workshop", "retreat", "performance"]);
6946
+ var eventScheduleScopeSchema = z12.enum(["recurring", "oneOff"]);
6947
+ var eventDestinationModeSchema = z12.enum(["cms-managed", "system-managed"]);
6948
+ var publicEventDestinationSchema = z12.discriminatedUnion("kind", [
6949
+ z12.object({
6950
+ kind: z12.literal("native"),
6951
+ mode: eventDestinationModeSchema,
6952
+ path: z12.string()
6953
+ }),
6954
+ z12.object({
6955
+ kind: z12.literal("external"),
6956
+ url: z12.string(),
6957
+ label: z12.string()
6958
+ })
6959
+ ]);
6960
+ var eventVenueSchema = z12.object({
6961
+ id: z12.string(),
6962
+ name: z12.string(),
6963
+ address: z12.string().nullable(),
6964
+ location: z12.object({
6965
+ lat: z12.number(),
6966
+ lng: z12.number()
6967
+ }).nullable()
6968
+ });
6969
+ var eventCategorySchema = z12.object({
6970
+ id: z12.string(),
6971
+ name: z12.string(),
6972
+ color: z12.string().nullable()
6973
+ });
6974
+ var pricingTypeSchema = z12.enum(["free", "paid", "external"]);
6975
+ var accessRestrictionSchema = z12.enum(["none", "category"]);
6976
+ var eventPricingModeSchema = z12.enum(["single", "ticket_types"]);
6977
+ var publicCoursePriceDisplaySchema = z12.discriminatedUnion("kind", [
6978
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
6979
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
6980
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
6981
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() })
6982
+ ]);
6983
+ var publicEventPriceDisplaySchema = z12.discriminatedUnion("kind", [
6984
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
6985
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
6986
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
6987
+ z12.object({ kind: z12.literal("range"), minAmount: z12.number(), maxAmount: z12.number(), currency: z12.string() }),
6988
+ z12.object({
6989
+ kind: z12.literal("mixed"),
6990
+ paidFromAmount: z12.number(),
6991
+ paidToAmount: z12.number(),
6992
+ currency: z12.string()
6993
+ }),
6994
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() }),
6995
+ z12.object({ kind: z12.literal("external"), label: z12.string() }),
6996
+ z12.object({ kind: z12.literal("course"), display: publicCoursePriceDisplaySchema })
6997
+ ]);
6998
+ var publicEventTicketTypePriceDisplaySchema = z12.union([
6999
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
7000
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
7001
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
7002
+ z12.object({ kind: z12.literal("range"), minAmount: z12.number(), maxAmount: z12.number(), currency: z12.string() }),
7003
+ z12.object({
7004
+ kind: z12.literal("mixed"),
7005
+ paidFromAmount: z12.number(),
7006
+ paidToAmount: z12.number(),
7007
+ currency: z12.string()
7008
+ }),
7009
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() })
7010
+ ]);
7011
+ var publicEventAttendanceModeSchema = z12.enum(["in_person", "online"]);
7012
+ var publicEventAttendanceModeAvailabilitySchema = z12.object({
7013
+ mode: publicEventAttendanceModeSchema,
7014
+ capacity: z12.number().nullable(),
7015
+ registeredCount: z12.number(),
7016
+ availableSpots: z12.number().nullable(),
7017
+ waitlistEnabled: z12.boolean()
7018
+ });
7019
+ var publicEventTicketTypeAvailabilitySchema = z12.union([
7020
+ z12.object({
7021
+ kind: z12.literal("available"),
7022
+ remainingCapacity: z12.number().nullable()
7023
+ }),
7024
+ z12.object({
7025
+ kind: z12.literal("unavailable"),
7026
+ reason: z12.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
7027
+ remainingCapacity: z12.number().nullable()
7028
+ })
7029
+ ]);
7030
+ var publicEventTicketTypeSchema = z12.object({
7031
+ id: z12.string(),
7032
+ siteId: z12.string(),
7033
+ eventSeriesId: z12.string(),
7034
+ name: z12.string(),
7035
+ description: z12.string().nullable(),
7036
+ priceAmount: z12.number(),
7037
+ isActive: z12.boolean(),
7038
+ sortOrder: z12.number(),
7039
+ capacityMode: z12.enum(["limited", "unlimited"]),
7040
+ capacityLimit: z12.number().nullable(),
7041
+ attendanceScope: z12.enum(["in_person", "online", "both"]).optional(),
7042
+ saleStartsAt: z12.string().nullable(),
7043
+ saleEndsAt: z12.string().nullable(),
7044
+ availability: publicEventTicketTypeAvailabilitySchema,
7045
+ createdAt: z12.string(),
7046
+ updatedAt: z12.string()
7047
+ });
7048
+ var publicEventPricingSchema = z12.discriminatedUnion("kind", [
7049
+ z12.object({
7050
+ kind: z12.literal("drop_in"),
7051
+ currency: z12.string(),
7052
+ display: z12.object({ kind: z12.literal("free"), currency: z12.string() })
7053
+ }),
7054
+ z12.object({
7055
+ kind: z12.literal("free_registration"),
7056
+ currency: z12.string(),
7057
+ display: z12.object({ kind: z12.literal("free"), currency: z12.string() })
7058
+ }),
7059
+ z12.object({
7060
+ kind: z12.literal("single_paid"),
7061
+ amount: z12.number(),
7062
+ currency: z12.string(),
7063
+ display: z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() })
7064
+ }),
7065
+ z12.object({
7066
+ kind: z12.literal("ticket_types"),
7067
+ currency: z12.string(),
7068
+ ticketTypes: z12.array(publicEventTicketTypeSchema),
7069
+ display: publicEventTicketTypePriceDisplaySchema
7070
+ }),
7071
+ z12.object({
7072
+ kind: z12.literal("course"),
7073
+ display: z12.object({ kind: z12.literal("course"), display: publicCoursePriceDisplaySchema })
7074
+ }),
7075
+ z12.object({
7076
+ kind: z12.literal("external"),
7077
+ display: z12.object({ kind: z12.literal("external"), label: z12.string() })
7078
+ })
7079
+ ]);
7080
+ var publicTeamMemberSummarySchema = z12.object({
7081
+ id: z12.string(),
7082
+ name: z12.string(),
7083
+ roleLabel: z12.string().nullable(),
7084
+ summary: z12.string().nullable(),
7085
+ profilePath: z12.string().nullable()
7086
+ });
7087
+ var publicEventSchema = z12.object({
7088
+ kind: z12.enum(["event", "course_session"]).optional(),
7089
+ eventPreset: eventPresetSchema.optional(),
7090
+ eventDestinationMode: eventDestinationModeSchema.optional(),
7091
+ scheduleScope: eventScheduleScopeSchema.optional(),
7092
+ id: z12.string(),
7093
+ occurrenceId: z12.string(),
7094
+ seriesId: z12.string(),
7095
+ title: z12.string(),
7096
+ description: z12.string().nullable(),
7097
+ content: z12.object({
7098
+ body: RichTextDocSchema.nullable().optional()
7099
+ }).optional(),
7100
+ presentation: z12.object({
7101
+ cardTitleOverride: z12.string().nullable().optional(),
7102
+ summary: z12.string().nullable().optional(),
7103
+ image: mediaSchema.nullable().optional()
7104
+ }).optional(),
7105
+ slug: z12.string(),
7106
+ path: z12.string().nullable(),
7107
+ destination: publicEventDestinationSchema,
7108
+ requiresRegistration: z12.boolean(),
7109
+ deliveryMode: z12.enum(["in_person", "online", "hybrid"]),
7110
+ attendanceModes: z12.array(publicEventAttendanceModeAvailabilitySchema),
7111
+ startsAt: z12.string(),
7112
+ endsAt: z12.string(),
7113
+ capacity: z12.number().nullable(),
7114
+ registeredCount: z12.number(),
7115
+ availableSpots: z12.number().nullable(),
7116
+ waitlistEnabled: z12.boolean(),
7117
+ venue: eventVenueSchema.nullable(),
7118
+ eventCategory: eventCategorySchema.nullable(),
7119
+ teamMembers: z12.array(publicTeamMemberSummarySchema).optional(),
7120
+ status: z12.enum(["active", "draft", "archived"]).optional(),
7121
+ timeZone: z12.string(),
7122
+ pricing: publicEventPricingSchema,
7123
+ paymentTerms: blockBookingPaymentTermsSchema,
7124
+ accessRestriction: accessRestrictionSchema,
7125
+ allowedCategoryIds: z12.array(z12.string()),
7126
+ requireGuestDetails: z12.boolean().optional(),
7127
+ acceptsPasses: z12.boolean().optional(),
7128
+ acceptsMemberships: z12.boolean().optional(),
7129
+ course: z12.object({
7130
+ id: z12.string(),
7131
+ pricing: coursePricingSchema.optional(),
7132
+ priceCents: z12.number().nullable(),
7133
+ currency: z12.string(),
7134
+ enrollmentOpen: z12.boolean()
7135
+ }).nullable().optional()
7136
+ });
7137
+ var publicEventsArraySchema = z12.array(publicEventSchema);
7138
+
6682
7139
  // ../blocks/src/system/constants/events.ts
6683
7140
  var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
6684
7141
  function isEventContentType(slug) {
@@ -6711,172 +7168,172 @@ function resolveHeaderCtaVariant(theme, treatment) {
6711
7168
  }
6712
7169
 
6713
7170
  // ../theme-core/src/palette/variants/types.ts
6714
- import { z as z18 } from "zod";
7171
+ import { z as z23 } from "zod";
6715
7172
 
6716
7173
  // ../theme-core/src/schema.ts
6717
- import { z as z17 } from "zod";
7174
+ import { z as z22 } from "zod";
6718
7175
 
6719
7176
  // ../theme-core/src/lib/media.ts
6720
- import z8 from "zod";
6721
- var hotspotSchema = z8.object({
6722
- x: z8.number().min(0).max(1),
6723
- y: z8.number().min(0).max(1),
6724
- radius: z8.number().optional()
7177
+ import z13 from "zod";
7178
+ var hotspotSchema2 = z13.object({
7179
+ x: z13.number().min(0).max(1),
7180
+ y: z13.number().min(0).max(1),
7181
+ radius: z13.number().optional()
6725
7182
  });
6726
- var rotationSchema = z8.union([z8.literal(0), z8.literal(90), z8.literal(180), z8.literal(270)]);
6727
- var rectSchema = z8.tuple([z8.number(), z8.number(), z8.number(), z8.number()]);
6728
- var aspectCropSchema = z8.object({
6729
- aspect: z8.preprocess((value) => value == null ? void 0 : value, z8.string().optional()),
6730
- rect: z8.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
6731
- hotspot: z8.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
6732
- rotation: z8.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
7183
+ var rotationSchema2 = z13.union([z13.literal(0), z13.literal(90), z13.literal(180), z13.literal(270)]);
7184
+ var rectSchema2 = z13.tuple([z13.number(), z13.number(), z13.number(), z13.number()]);
7185
+ var aspectCropSchema2 = z13.object({
7186
+ aspect: z13.preprocess((value) => value == null ? void 0 : value, z13.string().optional()),
7187
+ rect: z13.preprocess((value) => value == null ? void 0 : value, rectSchema2.optional()),
7188
+ hotspot: z13.preprocess((value) => value == null ? void 0 : value, hotspotSchema2.optional()),
7189
+ rotation: z13.preprocess((value) => value == null ? void 0 : value, rotationSchema2.optional())
6733
7190
  });
6734
- var transformSchema = z8.object({
6735
- aspectCrops: z8.preprocess((value) => {
7191
+ var transformSchema2 = z13.object({
7192
+ aspectCrops: z13.preprocess((value) => {
6736
7193
  if (!value || typeof value !== "object" || Array.isArray(value)) {
6737
7194
  return void 0;
6738
7195
  }
6739
7196
  return value;
6740
- }, z8.record(z8.string(), aspectCropSchema.catch({}))).optional(),
6741
- rect: rectSchema.optional(),
6742
- hotspot: hotspotSchema.optional(),
6743
- rotation: rotationSchema.optional()
7197
+ }, z13.record(z13.string(), aspectCropSchema2.catch({}))).optional(),
7198
+ rect: rectSchema2.optional(),
7199
+ hotspot: hotspotSchema2.optional(),
7200
+ rotation: rotationSchema2.optional()
6744
7201
  });
6745
- var mediaSchema = z8.object({
6746
- type: z8.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
6747
- purpose: z8.string().optional(),
6748
- placeholder: z8.boolean().default(true).optional(),
6749
- assetId: z8.string().optional(),
6750
- identifier: z8.string().optional(),
6751
- src: z8.string().optional(),
6752
- alt: z8.string().optional(),
6753
- filename: z8.string().optional(),
6754
- mimeType: z8.string().optional(),
6755
- width: z8.number().optional(),
6756
- height: z8.number().optional(),
6757
- storageBucket: z8.string().optional(),
6758
- storagePath: z8.string().optional(),
6759
- transform: transformSchema.optional()
7202
+ var mediaSchema2 = z13.object({
7203
+ type: z13.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
7204
+ purpose: z13.string().optional(),
7205
+ placeholder: z13.boolean().default(true).optional(),
7206
+ assetId: z13.string().optional(),
7207
+ identifier: z13.string().optional(),
7208
+ src: z13.string().optional(),
7209
+ alt: z13.string().optional(),
7210
+ filename: z13.string().optional(),
7211
+ mimeType: z13.string().optional(),
7212
+ width: z13.number().optional(),
7213
+ height: z13.number().optional(),
7214
+ storageBucket: z13.string().optional(),
7215
+ storagePath: z13.string().optional(),
7216
+ transform: transformSchema2.optional()
6760
7217
  });
6761
7218
 
6762
7219
  // ../theme-core/src/inputs/types.ts
6763
- import { z as z9 } from "zod";
6764
- var inputSystemSchema = z9.object({
7220
+ import { z as z14 } from "zod";
7221
+ var inputSystemSchema = z14.object({
6765
7222
  // Base styling (applied to all inputs)
6766
- base: z9.object({
6767
- background: z9.union([
6768
- z9.object({
6769
- type: z9.literal("solid"),
7223
+ base: z14.object({
7224
+ background: z14.union([
7225
+ z14.object({
7226
+ type: z14.literal("solid"),
6770
7227
  colorToken: themeColorTokenSchema
6771
7228
  }),
6772
- z9.object({
6773
- type: z9.literal("transparent")
7229
+ z14.object({
7230
+ type: z14.literal("transparent")
6774
7231
  })
6775
7232
  ]),
6776
7233
  textColorToken: themeColorTokenSchema,
6777
- border: z9.object({
6778
- widthClass: z9.string(),
7234
+ border: z14.object({
7235
+ widthClass: z14.string(),
6779
7236
  // e.g., 'border', 'border-2'
6780
7237
  colorToken: themeColorTokenSchema,
6781
- style: z9.enum(["all", "underline"]).optional()
7238
+ style: z14.enum(["all", "underline"]).optional()
6782
7239
  }),
6783
- corners: z9.enum(["square", "soft", "rounded", "pill"]).nullable(),
7240
+ corners: z14.enum(["square", "soft", "rounded", "pill"]).nullable(),
6784
7241
  // null = inherit from theme.corners
6785
- shadow: z9.object({
6786
- elevation: z9.enum(["none", "low", "medium"]),
6787
- softness: z9.enum(["soft", "crisp", "hard"]).nullable()
7242
+ shadow: z14.object({
7243
+ elevation: z14.enum(["none", "low", "medium"]),
7244
+ softness: z14.enum(["soft", "crisp", "hard"]).nullable()
6788
7245
  }).nullable(),
6789
- spacing: z9.enum(["compact", "cozy", "medium", "comfortable"]),
7246
+ spacing: z14.enum(["compact", "cozy", "medium", "comfortable"]),
6790
7247
  // padding inside inputs
6791
- fontSize: z9.enum(["sm", "base", "lg"])
7248
+ fontSize: z14.enum(["sm", "base", "lg"])
6792
7249
  }),
6793
7250
  // Label styling
6794
- label: z9.object({
7251
+ label: z14.object({
6795
7252
  textColorToken: themeColorTokenSchema,
6796
- fontWeight: z9.enum(["regular", "medium", "semibold", "bold", "black"]),
6797
- fontSize: z9.enum(["2xs", "xs", "sm", "base"]),
6798
- textTransform: z9.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
6799
- letterSpacing: z9.enum(["normal", "wide", "wider", "widest"]).optional(),
6800
- opacity: z9.number().min(0.2).max(1).optional()
7253
+ fontWeight: z14.enum(["regular", "medium", "semibold", "bold", "black"]),
7254
+ fontSize: z14.enum(["2xs", "xs", "sm", "base"]),
7255
+ textTransform: z14.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
7256
+ letterSpacing: z14.enum(["normal", "wide", "wider", "widest"]).optional(),
7257
+ opacity: z14.number().min(0.2).max(1).optional()
6801
7258
  }),
6802
7259
  // Focus state
6803
- focus: z9.object({
7260
+ focus: z14.object({
6804
7261
  ringColorToken: themeColorTokenSchema,
6805
- ringWidth: z9.enum(["0", "1", "2", "3"]),
7262
+ ringWidth: z14.enum(["0", "1", "2", "3"]),
6806
7263
  borderColorToken: themeColorTokenSchema.optional()
6807
7264
  // Change border color on focus
6808
7265
  }),
6809
7266
  // Error state (for validation feedback)
6810
- error: z9.object({
7267
+ error: z14.object({
6811
7268
  borderColorToken: themeColorTokenSchema,
6812
7269
  textColorToken: themeColorTokenSchema
6813
7270
  }),
6814
7271
  // Disabled state
6815
- disabled: z9.object({
7272
+ disabled: z14.object({
6816
7273
  backgroundColorToken: themeColorTokenSchema,
6817
7274
  textColorToken: themeColorTokenSchema,
6818
- opacity: z9.number().min(0.3).max(0.7)
7275
+ opacity: z14.number().min(0.3).max(0.7)
6819
7276
  })
6820
7277
  });
6821
7278
 
6822
7279
  // ../theme-core/src/gradients/types.ts
6823
- import { z as z10 } from "zod";
6824
- var gradientStopSchema = z10.object({
7280
+ import { z as z15 } from "zod";
7281
+ var gradientStopSchema = z15.object({
6825
7282
  color: themeColorTokenSchema,
6826
- position: z10.number().min(0).max(100)
7283
+ position: z15.number().min(0).max(100)
6827
7284
  // Percentage 0-100
6828
7285
  });
6829
- var gradientConfigSchema = z10.object({
6830
- type: z10.enum(["linear", "radial"]),
6831
- angle: z10.number().min(0).max(360).optional(),
7286
+ var gradientConfigSchema = z15.object({
7287
+ type: z15.enum(["linear", "radial"]),
7288
+ angle: z15.number().min(0).max(360).optional(),
6832
7289
  // For linear gradients (degrees)
6833
- position: z10.string().optional(),
7290
+ position: z15.string().optional(),
6834
7291
  // For radial gradients ('center', 'top left', etc.)
6835
- stops: z10.array(gradientStopSchema).min(2)
7292
+ stops: z15.array(gradientStopSchema).min(2)
6836
7293
  });
6837
7294
 
6838
7295
  // ../theme-core/src/navigation/types.ts
6839
- import { z as z12 } from "zod";
7296
+ import { z as z17 } from "zod";
6840
7297
 
6841
7298
  // ../theme-core/src/interactive/baseSchema.ts
6842
- import { z as z11 } from "zod";
6843
- var interactiveTypographySchema = z11.object({
7299
+ import { z as z16 } from "zod";
7300
+ var interactiveTypographySchema = z16.object({
6844
7301
  /** Font family source */
6845
- typography: z11.enum(["body", "heading"]).default("body"),
7302
+ typography: z16.enum(["body", "heading"]).default("body"),
6846
7303
  /** Font weight */
6847
- fontWeight: z11.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
7304
+ fontWeight: z16.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
6848
7305
  /** Text transform */
6849
- textTransform: z11.enum(["none", "uppercase", "capitalize"]).default("none"),
7306
+ textTransform: z16.enum(["none", "uppercase", "capitalize"]).default("none"),
6850
7307
  /** Italic style */
6851
- italic: z11.boolean().default(false)
7308
+ italic: z16.boolean().default(false)
6852
7309
  });
6853
- var effectApplicationSchema2 = z11.object({
7310
+ var effectApplicationSchema2 = z16.object({
6854
7311
  /** Effect preset ID */
6855
- effectId: z11.string(),
7312
+ effectId: z16.string(),
6856
7313
  /** User-provided customization options */
6857
- options: z11.record(z11.string(), z11.any()).optional()
7314
+ options: z16.record(z16.string(), z16.any()).optional()
6858
7315
  });
6859
- var effectCompositionSchema = z11.object({
7316
+ var effectCompositionSchema = z16.object({
6860
7317
  /** Effects always applied */
6861
- base: z11.array(effectApplicationSchema2).optional(),
7318
+ base: z16.array(effectApplicationSchema2).optional(),
6862
7319
  /** Effects applied on hover */
6863
- hover: z11.array(effectApplicationSchema2).optional(),
7320
+ hover: z16.array(effectApplicationSchema2).optional(),
6864
7321
  /** Effects applied on active/pressed */
6865
- active: z11.array(effectApplicationSchema2).optional(),
7322
+ active: z16.array(effectApplicationSchema2).optional(),
6866
7323
  /** Effects applied on focus */
6867
- focus: z11.array(effectApplicationSchema2).optional()
7324
+ focus: z16.array(effectApplicationSchema2).optional()
6868
7325
  });
6869
7326
 
6870
7327
  // ../theme-core/src/navigation/types.ts
6871
- var navLinkPaddingSchema = z12.enum(["none", "compact", "default"]);
6872
- var navLinkPaddingXSchema = z12.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
6873
- var navLinkBorderRadiusSchema = z12.enum(["none", "sm", "md", "full"]);
6874
- var navLinkTextSizeSchema = z12.enum(["xs", "sm", "base", "lg"]);
6875
- var navLinkLetterSpacingSchema = z12.enum(["normal", "wide", "wider", "widest"]);
6876
- var navLinkContrastTreatmentSchema = z12.enum(["none", "soft-glow"]);
6877
- var navLinkStyleSchema = z12.object({
7328
+ var navLinkPaddingSchema = z17.enum(["none", "compact", "default"]);
7329
+ var navLinkPaddingXSchema = z17.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
7330
+ var navLinkBorderRadiusSchema = z17.enum(["none", "sm", "md", "full"]);
7331
+ var navLinkTextSizeSchema = z17.enum(["xs", "sm", "base", "lg"]);
7332
+ var navLinkLetterSpacingSchema = z17.enum(["normal", "wide", "wider", "widest"]);
7333
+ var navLinkContrastTreatmentSchema = z17.enum(["none", "soft-glow"]);
7334
+ var navLinkStyleSchema = z17.object({
6878
7335
  /** Display name for the style */
6879
- name: z12.string().min(1).max(30).optional(),
7336
+ name: z17.string().min(1).max(30).optional(),
6880
7337
  /** Typography settings (inherited from interactive base) */
6881
7338
  ...interactiveTypographySchema.shape,
6882
7339
  /** Text color token */
@@ -6900,7 +7357,7 @@ var navLinkStyleSchema = z12.object({
6900
7357
  });
6901
7358
 
6902
7359
  // ../theme-core/src/customCss/validation.ts
6903
- import { z as z13 } from "zod";
7360
+ import { z as z18 } from "zod";
6904
7361
  var FORBIDDEN_SELECTORS = [":root", "html", "body"];
6905
7362
  var UNIVERSAL_SELECTOR = "*";
6906
7363
  var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
@@ -6942,7 +7399,7 @@ function containsForbiddenSelector(selector) {
6942
7399
  }
6943
7400
  return false;
6944
7401
  }
6945
- var selectorSchema = z13.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
7402
+ var selectorSchema = z18.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
6946
7403
  (s) => !containsForbiddenSelector(s),
6947
7404
  { message: "Global selectors (:root, html, body, *) are not allowed" }
6948
7405
  );
@@ -6952,38 +7409,38 @@ function containsRemoteUrl(value) {
6952
7409
  function containsJavascriptUrl(value) {
6953
7410
  return JAVASCRIPT_URL_PATTERN.test(value);
6954
7411
  }
6955
- var declarationValueSchema = z13.string().max(500, "Declaration value too long (max 500 characters)").refine(
7412
+ var declarationValueSchema = z18.string().max(500, "Declaration value too long (max 500 characters)").refine(
6956
7413
  (v) => !containsRemoteUrl(v),
6957
7414
  { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
6958
7415
  ).refine(
6959
7416
  (v) => !containsJavascriptUrl(v),
6960
7417
  { message: "javascript: URLs are not allowed" }
6961
7418
  );
6962
- var declarationsSchema = z13.record(
6963
- z13.string().min(1).max(100),
7419
+ var declarationsSchema = z18.record(
7420
+ z18.string().min(1).max(100),
6964
7421
  // property name
6965
7422
  declarationValueSchema
6966
7423
  // property value
6967
7424
  );
6968
- var customCssRuleSchema = z13.object({
6969
- id: z13.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
7425
+ var customCssRuleSchema = z18.object({
7426
+ id: z18.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
6970
7427
  selector: selectorSchema,
6971
7428
  declarations: declarationsSchema
6972
7429
  });
6973
7430
  var blockCustomCssRuleSchema = customCssRuleSchema.extend({
6974
- blockKind: z13.string().min(1, "Block kind is required").max(50, "Block kind too long")
7431
+ blockKind: z18.string().min(1, "Block kind is required").max(50, "Block kind too long")
6975
7432
  });
6976
- var customCssRulesSchema = z13.array(customCssRuleSchema).optional();
6977
- var blockCustomCssRulesSchema = z13.array(blockCustomCssRuleSchema).optional();
7433
+ var customCssRulesSchema = z18.array(customCssRuleSchema).optional();
7434
+ var blockCustomCssRulesSchema = z18.array(blockCustomCssRuleSchema).optional();
6978
7435
 
6979
7436
  // ../theme-core/src/customCss/atRuleValidation.ts
6980
- import { z as z14 } from "zod";
7437
+ import { z as z19 } from "zod";
6981
7438
  var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
6982
7439
  var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
6983
7440
  var BLOCKED_AT_RULES = ["@import", "@charset"];
6984
7441
  var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
6985
- var ruleIdSchema = z14.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
6986
- var nestedRuleSchema = z14.object({
7442
+ var ruleIdSchema = z19.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
7443
+ var nestedRuleSchema = z19.object({
6987
7444
  selector: selectorSchema,
6988
7445
  declarations: declarationsSchema
6989
7446
  });
@@ -6995,88 +7452,88 @@ function isValidKeyframeOffset(offset) {
6995
7452
  const value = parseInt(match[1], 10);
6996
7453
  return value >= 0 && value <= 100;
6997
7454
  }
6998
- var keyframeOffsetSchema = z14.string().transform((offset) => offset.trim()).refine(
7455
+ var keyframeOffsetSchema = z19.string().transform((offset) => offset.trim()).refine(
6999
7456
  (offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
7000
7457
  { message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
7001
7458
  ).refine(
7002
7459
  isValidKeyframeOffset,
7003
7460
  { message: "Keyframe offset must be between 0% and 100%" }
7004
7461
  );
7005
- var animationNameSchema = z14.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
7462
+ var animationNameSchema = z19.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
7006
7463
  (name) => ANIMATION_NAME_PATTERN.test(name),
7007
7464
  { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
7008
7465
  );
7009
- var keyframeSchema = z14.object({
7466
+ var keyframeSchema = z19.object({
7010
7467
  offset: keyframeOffsetSchema,
7011
7468
  declarations: declarationsSchema
7012
7469
  });
7013
- var keyframesAtRuleSchema = z14.object({
7470
+ var keyframesAtRuleSchema = z19.object({
7014
7471
  id: ruleIdSchema,
7015
- type: z14.literal("keyframes"),
7472
+ type: z19.literal("keyframes"),
7016
7473
  name: animationNameSchema,
7017
- frames: z14.array(keyframeSchema).min(1, "At least one keyframe is required")
7474
+ frames: z19.array(keyframeSchema).min(1, "At least one keyframe is required")
7018
7475
  });
7019
- var fontFaceDeclarationsSchema = z14.record(z14.string().min(1).max(100), declarationValueSchema).refine(
7476
+ var fontFaceDeclarationsSchema = z19.record(z19.string().min(1).max(100), declarationValueSchema).refine(
7020
7477
  (decls) => "fontFamily" in decls || "font-family" in decls,
7021
7478
  { message: "font-family is required in @font-face" }
7022
7479
  );
7023
- var fontFaceAtRuleSchema = z14.object({
7480
+ var fontFaceAtRuleSchema = z19.object({
7024
7481
  id: ruleIdSchema,
7025
- type: z14.literal("font-face"),
7482
+ type: z19.literal("font-face"),
7026
7483
  declarations: fontFaceDeclarationsSchema
7027
7484
  });
7028
- var mediaQuerySchema = z14.string().min(1, "Media query is required").max(200, "Media query too long");
7029
- var mediaAtRuleSchema = z14.object({
7485
+ var mediaQuerySchema = z19.string().min(1, "Media query is required").max(200, "Media query too long");
7486
+ var mediaAtRuleSchema = z19.object({
7030
7487
  id: ruleIdSchema,
7031
- type: z14.literal("media"),
7488
+ type: z19.literal("media"),
7032
7489
  query: mediaQuerySchema,
7033
- rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
7490
+ rules: z19.array(nestedRuleSchema).min(1, "At least one rule is required")
7034
7491
  });
7035
- var supportsConditionSchema = z14.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
7036
- var supportsAtRuleSchema = z14.object({
7492
+ var supportsConditionSchema = z19.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
7493
+ var supportsAtRuleSchema = z19.object({
7037
7494
  id: ruleIdSchema,
7038
- type: z14.literal("supports"),
7495
+ type: z19.literal("supports"),
7039
7496
  condition: supportsConditionSchema,
7040
- rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
7497
+ rules: z19.array(nestedRuleSchema).min(1, "At least one rule is required")
7041
7498
  });
7042
7499
  function containsBlockedAtRule(css) {
7043
7500
  return BLOCKED_AT_RULE_PATTERN.test(css);
7044
7501
  }
7045
- var rawCssSchema = z14.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
7502
+ var rawCssSchema = z19.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
7046
7503
  (css) => css.trim().startsWith("@"),
7047
7504
  { message: "Raw at-rule must start with @" }
7048
7505
  ).refine(
7049
7506
  (css) => !containsBlockedAtRule(css),
7050
7507
  { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
7051
7508
  );
7052
- var rawAtRuleSchema = z14.object({
7509
+ var rawAtRuleSchema = z19.object({
7053
7510
  id: ruleIdSchema,
7054
- type: z14.literal("raw"),
7511
+ type: z19.literal("raw"),
7055
7512
  css: rawCssSchema
7056
7513
  });
7057
- var customCssAtRuleSchema = z14.discriminatedUnion("type", [
7514
+ var customCssAtRuleSchema = z19.discriminatedUnion("type", [
7058
7515
  keyframesAtRuleSchema,
7059
7516
  fontFaceAtRuleSchema,
7060
7517
  mediaAtRuleSchema,
7061
7518
  supportsAtRuleSchema,
7062
7519
  rawAtRuleSchema
7063
7520
  ]);
7064
- var customCssAtRulesSchema = z14.array(customCssAtRuleSchema).optional();
7521
+ var customCssAtRulesSchema = z19.array(customCssAtRuleSchema).optional();
7065
7522
 
7066
7523
  // ../theme-core/src/shared/componentStyles.ts
7067
- import { z as z15 } from "zod";
7068
- var componentBorderSchema = z15.object({
7069
- width: z15.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
7070
- style: z15.enum(["solid", "dashed"]).default("solid"),
7524
+ import { z as z20 } from "zod";
7525
+ var componentBorderSchema = z20.object({
7526
+ width: z20.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
7527
+ style: z20.enum(["solid", "dashed"]).default("solid"),
7071
7528
  colorToken: themeColorTokenSchema.optional()
7072
7529
  // defaults to "border" if not set
7073
7530
  });
7074
- var componentShadowSchema = z15.object({
7075
- elevation: z15.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
7531
+ var componentShadowSchema = z20.object({
7532
+ elevation: z20.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
7076
7533
  });
7077
7534
 
7078
7535
  // ../theme-core/src/site-styles/logoBranding.ts
7079
- import { z as z16 } from "zod";
7536
+ import { z as z21 } from "zod";
7080
7537
  var logoTextConfidenceValues = ["low", "medium", "high"];
7081
7538
  var logoAssetShapeValues = [
7082
7539
  "none",
@@ -7094,43 +7551,43 @@ var logoKindValues = [
7094
7551
  "unknown"
7095
7552
  ];
7096
7553
  var logoDensityValues = ["simple", "detailed", "unknown"];
7097
- var logoContainsTextSchema = z16.discriminatedUnion("kind", [
7098
- z16.object({
7099
- kind: z16.literal("contains-text"),
7100
- confidence: z16.enum(logoTextConfidenceValues),
7101
- text: z16.string().trim().min(1).max(200).optional()
7554
+ var logoContainsTextSchema = z21.discriminatedUnion("kind", [
7555
+ z21.object({
7556
+ kind: z21.literal("contains-text"),
7557
+ confidence: z21.enum(logoTextConfidenceValues),
7558
+ text: z21.string().trim().min(1).max(200).optional()
7102
7559
  }),
7103
- z16.object({
7104
- kind: z16.literal("no-text"),
7105
- confidence: z16.enum(logoTextConfidenceValues)
7560
+ z21.object({
7561
+ kind: z21.literal("no-text"),
7562
+ confidence: z21.enum(logoTextConfidenceValues)
7106
7563
  }),
7107
- z16.object({
7108
- kind: z16.literal("unknown"),
7109
- reason: z16.enum([
7564
+ z21.object({
7565
+ kind: z21.literal("unknown"),
7566
+ reason: z21.enum([
7110
7567
  "analysis-unavailable",
7111
7568
  "unsupported-file",
7112
7569
  "low-confidence"
7113
7570
  ])
7114
7571
  })
7115
7572
  ]);
7116
- var logoAnalysisSourceSchema = z16.discriminatedUnion("kind", [
7117
- z16.object({ kind: z16.literal("none") }),
7118
- z16.object({
7119
- kind: z16.literal("deterministic"),
7120
- reason: z16.enum(["dimensions", "fallback"])
7573
+ var logoAnalysisSourceSchema = z21.discriminatedUnion("kind", [
7574
+ z21.object({ kind: z21.literal("none") }),
7575
+ z21.object({
7576
+ kind: z21.literal("deterministic"),
7577
+ reason: z21.enum(["dimensions", "fallback"])
7121
7578
  }),
7122
- z16.object({
7123
- kind: z16.literal("llm"),
7124
- model: z16.literal("gpt-5.4-mini"),
7125
- analyzedAt: z16.string().trim().min(1).max(80).optional()
7579
+ z21.object({
7580
+ kind: z21.literal("llm"),
7581
+ model: z21.literal("gpt-5.4-mini"),
7582
+ analyzedAt: z21.string().trim().min(1).max(80).optional()
7126
7583
  }),
7127
- z16.object({ kind: z16.literal("manual-override") })
7584
+ z21.object({ kind: z21.literal("manual-override") })
7128
7585
  ]);
7129
- var logoFactsSchema = z16.object({
7130
- shape: z16.enum(logoAssetShapeValues),
7586
+ var logoFactsSchema = z21.object({
7587
+ shape: z21.enum(logoAssetShapeValues),
7131
7588
  containsText: logoContainsTextSchema,
7132
- kind: z16.enum(logoKindValues),
7133
- density: z16.enum(logoDensityValues),
7589
+ kind: z21.enum(logoKindValues),
7590
+ density: z21.enum(logoDensityValues),
7134
7591
  source: logoAnalysisSourceSchema
7135
7592
  });
7136
7593
  var brandDisplayModeValues = [
@@ -7188,74 +7645,74 @@ var pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
7188
7645
  var siteChromeBackgroundOverrideOwner = "site-chrome-editor";
7189
7646
 
7190
7647
  // ../theme-core/src/schema.ts
7191
- var axesSchema = z17.object({
7192
- tone: z17.enum(["minimal", "classic", "bold"]),
7193
- energy: z17.enum(["calm", "vibrant"]),
7194
- density: z17.enum(["airy", "regular", "compact"]),
7195
- mediaBias: z17.enum(["text", "media", "mixed"]),
7196
- conversionBias: z17.enum(["low", "med", "high"]),
7197
- motion: z17.enum(["subtle", "standard", "expressive"])
7648
+ var axesSchema = z22.object({
7649
+ tone: z22.enum(["minimal", "classic", "bold"]),
7650
+ energy: z22.enum(["calm", "vibrant"]),
7651
+ density: z22.enum(["airy", "regular", "compact"]),
7652
+ mediaBias: z22.enum(["text", "media", "mixed"]),
7653
+ conversionBias: z22.enum(["low", "med", "high"]),
7654
+ motion: z22.enum(["subtle", "standard", "expressive"])
7198
7655
  });
7199
- var colourHexString = z17.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
7200
- var paletteColorSchema = z17.object({
7201
- name: z17.string().min(1),
7656
+ var colourHexString = z22.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
7657
+ var paletteColorSchema = z22.object({
7658
+ name: z22.string().min(1),
7202
7659
  hex: colourHexString
7203
7660
  });
7204
- var paletteMetaSchema = z17.object({
7205
- mode: z17.enum(["light", "dark"])
7661
+ var paletteMetaSchema = z22.object({
7662
+ mode: z22.enum(["light", "dark"])
7206
7663
  });
7207
- var paletteSchema = z17.object({
7208
- colors: z17.array(paletteColorSchema),
7664
+ var paletteSchema = z22.object({
7665
+ colors: z22.array(paletteColorSchema),
7209
7666
  meta: paletteMetaSchema
7210
7667
  });
7211
- var typographyStyleSchema = z17.object({
7212
- family: z17.string().min(1),
7213
- weight: z17.enum(["light", "regular", "medium", "semibold", "bold"]),
7214
- letterSpacing: z17.enum(["tight", "normal", "loose"]),
7215
- lineHeight: z17.enum(["normal", "relaxed", "loose"])
7668
+ var typographyStyleSchema = z22.object({
7669
+ family: z22.string().min(1),
7670
+ weight: z22.enum(["light", "regular", "medium", "semibold", "bold"]),
7671
+ letterSpacing: z22.enum(["tight", "normal", "loose"]),
7672
+ lineHeight: z22.enum(["normal", "relaxed", "loose"])
7216
7673
  });
7217
7674
  var bodyTypographyStyleSchema = typographyStyleSchema.extend({
7218
- size: z17.enum(["md", "lg", "xl"])
7675
+ size: z22.enum(["md", "lg", "xl"])
7219
7676
  });
7220
- var headingSizeSchema = z17.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
7221
- var headingTypographyOverridesSchema = z17.object({
7222
- weight: z17.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
7223
- letterSpacing: z17.enum(["tight", "normal", "loose"]).nullable().optional(),
7677
+ var headingSizeSchema = z22.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
7678
+ var headingTypographyOverridesSchema = z22.object({
7679
+ weight: z22.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
7680
+ letterSpacing: z22.enum(["tight", "normal", "loose"]).nullable().optional(),
7224
7681
  size: headingSizeSchema.nullable().optional(),
7225
- lineHeight: z17.enum(["normal", "relaxed", "loose"]).nullable().optional(),
7226
- italic: z17.boolean().nullable().optional(),
7682
+ lineHeight: z22.enum(["normal", "relaxed", "loose"]).nullable().optional(),
7683
+ italic: z22.boolean().nullable().optional(),
7227
7684
  colorToken: themeColorTokenSchema.nullable().optional()
7228
7685
  });
7229
7686
  var headingTypographyStyleSchema = typographyStyleSchema.extend({
7230
- case: z17.enum(["uppercase", "normal", "smallCaps"]).nullable(),
7231
- italic: z17.boolean().nullable(),
7687
+ case: z22.enum(["uppercase", "normal", "smallCaps"]).nullable(),
7688
+ italic: z22.boolean().nullable(),
7232
7689
  colorToken: themeColorTokenSchema.nullable().optional()
7233
7690
  });
7234
- var proseLinkUnderlineStyleSchema = z17.enum(["solid", "dotted", "dashed"]);
7235
- var proseLinkUnderlineThicknessSchema = z17.enum([
7691
+ var proseLinkUnderlineStyleSchema = z22.enum(["solid", "dotted", "dashed"]);
7692
+ var proseLinkUnderlineThicknessSchema = z22.enum([
7236
7693
  "auto",
7237
7694
  "fromFont",
7238
7695
  "thin",
7239
7696
  "medium",
7240
7697
  "thick"
7241
7698
  ]);
7242
- var proseLinkUnderlineOffsetSchema = z17.enum([
7699
+ var proseLinkUnderlineOffsetSchema = z22.enum([
7243
7700
  "auto",
7244
7701
  "tight",
7245
7702
  "normal",
7246
7703
  "loose"
7247
7704
  ]);
7248
- var proseLinkStyleSchema = z17.object({
7705
+ var proseLinkStyleSchema = z22.object({
7249
7706
  colorToken: themeColorTokenSchema.optional(),
7250
7707
  hoverColorToken: themeColorTokenSchema.optional(),
7251
- underline: z17.boolean().optional(),
7708
+ underline: z22.boolean().optional(),
7252
7709
  decorationColorToken: themeColorTokenSchema.optional(),
7253
7710
  hoverDecorationColorToken: themeColorTokenSchema.optional(),
7254
7711
  underlineStyle: proseLinkUnderlineStyleSchema.optional(),
7255
7712
  underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
7256
7713
  underlineOffset: proseLinkUnderlineOffsetSchema.optional()
7257
7714
  });
7258
- var semanticSpacingSchema = z17.enum([
7715
+ var semanticSpacingSchema = z22.enum([
7259
7716
  "none",
7260
7717
  "compact",
7261
7718
  "cozy",
@@ -7263,61 +7720,61 @@ var semanticSpacingSchema = z17.enum([
7263
7720
  "comfortable",
7264
7721
  "spacious"
7265
7722
  ]);
7266
- var boxRoundedSchema = z17.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
7267
- var boxBackgroundOverlaySchema = z17.object({
7268
- type: z17.enum(["none", "color", "gradient"]).nullable().optional(),
7723
+ var boxRoundedSchema = z22.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
7724
+ var boxBackgroundOverlaySchema = z22.object({
7725
+ type: z22.enum(["none", "color", "gradient"]).nullable().optional(),
7269
7726
  color: tokenOrCssColorValueSchema.nullable().optional(),
7270
- gradient: z17.string().nullable().optional(),
7271
- opacity: z17.number().min(0).max(1).nullable().optional()
7727
+ gradient: z22.string().nullable().optional(),
7728
+ opacity: z22.number().min(0).max(1).nullable().optional()
7272
7729
  });
7273
- var boxBackgroundSchema = z17.object({
7274
- type: z17.enum(["color", "gradient", "image"]).optional(),
7275
- contentOwner: z17.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
7730
+ var boxBackgroundSchema = z22.object({
7731
+ type: z22.enum(["color", "gradient", "image"]).optional(),
7732
+ contentOwner: z22.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
7276
7733
  color: tokenOrCssColorValueSchema.nullable().optional(),
7277
- gradient: z17.string().nullable().optional(),
7278
- gradientPresetId: z17.string().min(1).nullable().optional(),
7279
- image: mediaSchema.nullable().optional(),
7280
- objectFit: z17.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
7281
- scale: z17.string().nullable().optional(),
7282
- position: z17.string().nullable().optional(),
7283
- opacity: z17.number().min(0).max(1).nullable().optional(),
7284
- motion: z17.enum(["static", "fixed-frame"]).nullable().optional(),
7734
+ gradient: z22.string().nullable().optional(),
7735
+ gradientPresetId: z22.string().min(1).nullable().optional(),
7736
+ image: mediaSchema2.nullable().optional(),
7737
+ objectFit: z22.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
7738
+ scale: z22.string().nullable().optional(),
7739
+ position: z22.string().nullable().optional(),
7740
+ opacity: z22.number().min(0).max(1).nullable().optional(),
7741
+ motion: z22.enum(["static", "fixed-frame"]).nullable().optional(),
7285
7742
  overlay: boxBackgroundOverlaySchema.nullable().optional(),
7286
7743
  textColor: tokenOrCssColorValueSchema.nullable().optional(),
7287
7744
  headingColor: tokenOrCssColorValueSchema.nullable().optional(),
7288
7745
  linkColor: tokenOrCssColorValueSchema.nullable().optional(),
7289
7746
  supportingColor: tokenOrCssColorValueSchema.nullable().optional()
7290
7747
  });
7291
- var noHeadingDecorationSchema = z17.object({
7292
- family: z17.literal("none")
7748
+ var noHeadingDecorationSchema = z22.object({
7749
+ family: z22.literal("none")
7293
7750
  });
7294
- var visibleHeadingDecorationSchema = z17.object({
7295
- family: z17.enum(visibleHeadingDecorationFamilyValues),
7296
- colorToken: z17.enum(headingDecorationColorTokenValues).optional()
7751
+ var visibleHeadingDecorationSchema = z22.object({
7752
+ family: z22.enum(visibleHeadingDecorationFamilyValues),
7753
+ colorToken: z22.enum(headingDecorationColorTokenValues).optional()
7297
7754
  });
7298
- var headingDecorationSchema = z17.union([
7755
+ var headingDecorationSchema = z22.union([
7299
7756
  noHeadingDecorationSchema,
7300
7757
  visibleHeadingDecorationSchema
7301
7758
  ]);
7302
- var headingDecorationOverrideSchema = z17.union([
7303
- z17.enum(headingDecorationOverrideValues),
7759
+ var headingDecorationOverrideSchema = z22.union([
7760
+ z22.enum(headingDecorationOverrideValues),
7304
7761
  // Legacy authoring value from the earlier model. In the render-time model
7305
7762
  // "on" cannot force a fragment into a block, so it is equivalent to default.
7306
- z17.literal("on").transform(() => "site-default")
7763
+ z22.literal("on").transform(() => "site-default")
7307
7764
  ]);
7308
- var accordionIconTreatmentSchema = z17.object({
7309
- iconSet: z17.enum(accordionIconSetValues),
7310
- colorToken: z17.enum(accordionIconColorTokenValues),
7311
- openColorToken: z17.enum(accordionIconColorTokenValues).optional(),
7312
- motion: z17.enum(accordionIconMotionValues)
7765
+ var accordionIconTreatmentSchema = z22.object({
7766
+ iconSet: z22.enum(accordionIconSetValues),
7767
+ colorToken: z22.enum(accordionIconColorTokenValues),
7768
+ openColorToken: z22.enum(accordionIconColorTokenValues).optional(),
7769
+ motion: z22.enum(accordionIconMotionValues)
7313
7770
  });
7314
- var sectionStylesOverrideSchema = z17.object({
7771
+ var sectionStylesOverrideSchema = z22.object({
7315
7772
  background: boxBackgroundSchema.nullable().optional(),
7316
7773
  spacing: semanticSpacingSchema.nullable().optional(),
7317
- minHeight: z17.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
7318
- tileTreatment: z17.enum(tileTreatmentValues).nullable().optional(),
7319
- eventListTreatment: z17.enum(eventListTreatmentValues).nullable().optional(),
7320
- eyebrowTreatment: z17.enum(eyebrowTreatmentValues).nullable().optional(),
7774
+ minHeight: z22.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
7775
+ tileTreatment: z22.enum(tileTreatmentValues).nullable().optional(),
7776
+ eventListTreatment: z22.enum(eventListTreatmentValues).nullable().optional(),
7777
+ eyebrowTreatment: z22.enum(eyebrowTreatmentValues).nullable().optional(),
7321
7778
  headingDecoration: headingDecorationSchema.nullable().optional(),
7322
7779
  // Author-level opt-out consumed by render-time theme projection. Persisted
7323
7780
  // content may also carry legacy `headingDecoration` / `on` values; those are
@@ -7326,25 +7783,25 @@ var sectionStylesOverrideSchema = z17.object({
7326
7783
  headingDecorationOverride: headingDecorationOverrideSchema.nullable().optional(),
7327
7784
  accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
7328
7785
  });
7329
- var containerStylesOverrideSchema = z17.object({
7786
+ var containerStylesOverrideSchema = z22.object({
7330
7787
  background: boxBackgroundSchema.nullable().optional(),
7331
7788
  spacing: semanticSpacingSchema.nullable().optional(),
7332
- raised: z17.boolean().nullable().optional(),
7789
+ raised: z22.boolean().nullable().optional(),
7333
7790
  rounded: boxRoundedSchema.nullable().optional(),
7334
- fullWidth: z17.boolean().nullable().optional()
7791
+ fullWidth: z22.boolean().nullable().optional()
7335
7792
  });
7336
- var cardBorderOverrideSchema = z17.object({
7337
- enabled: z17.boolean().nullable().optional(),
7338
- width: z17.enum(["none", "1", "2", "3"]).nullable().optional(),
7793
+ var cardBorderOverrideSchema = z22.object({
7794
+ enabled: z22.boolean().nullable().optional(),
7795
+ width: z22.enum(["none", "1", "2", "3"]).nullable().optional(),
7339
7796
  colorToken: themeColorTokenSchema.nullable().optional()
7340
7797
  });
7341
- var cardStylesOverrideSchema = z17.object({
7798
+ var cardStylesOverrideSchema = z22.object({
7342
7799
  background: boxBackgroundSchema.nullable().optional(),
7343
7800
  border: cardBorderOverrideSchema.nullable().optional(),
7344
7801
  spacing: semanticSpacingSchema.nullable().optional(),
7345
- raised: z17.boolean().nullable().optional(),
7802
+ raised: z22.boolean().nullable().optional(),
7346
7803
  rounded: boxRoundedSchema.nullable().optional(),
7347
- treatment: z17.enum([
7804
+ treatment: z22.enum([
7348
7805
  "accent-quote",
7349
7806
  "editorial-rule",
7350
7807
  "soft-panel",
@@ -7356,18 +7813,18 @@ var cardStylesOverrideSchema = z17.object({
7356
7813
  // 'none' is boxless. Driven by the block look via testimonialCardTreatment.
7357
7814
  cardVariant: boxStylesCardVariantSchema.nullable().optional()
7358
7815
  });
7359
- var blockStyleOverridesSchema = z17.object({
7816
+ var blockStyleOverridesSchema = z22.object({
7360
7817
  sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
7361
7818
  containerStyles: containerStylesOverrideSchema.nullable().optional(),
7362
7819
  cardStyles: cardStylesOverrideSchema.nullable().optional()
7363
7820
  });
7364
- var blockThemeOverrideSchema = z17.object({
7365
- typography: z17.object({
7821
+ var blockThemeOverrideSchema = z22.object({
7822
+ typography: z22.object({
7366
7823
  proseLinkStyle: proseLinkStyleSchema.optional()
7367
7824
  }).optional(),
7368
7825
  styles: blockStyleOverridesSchema.optional()
7369
7826
  });
7370
- var typographyScaleSchema = z17.enum([
7827
+ var typographyScaleSchema = z22.enum([
7371
7828
  // New intuitive names
7372
7829
  "compact",
7373
7830
  // ratio 1.2 (was minorThird)
@@ -7380,9 +7837,9 @@ var typographyScaleSchema = z17.enum([
7380
7837
  "majorThird",
7381
7838
  "perfectFourth"
7382
7839
  ]);
7383
- var typographySchema = z17.object({
7840
+ var typographySchema = z22.object({
7384
7841
  body: bodyTypographyStyleSchema,
7385
- headings: z17.object({
7842
+ headings: z22.object({
7386
7843
  default: headingTypographyStyleSchema,
7387
7844
  h1: headingTypographyOverridesSchema,
7388
7845
  h2: headingTypographyOverridesSchema,
@@ -7395,41 +7852,41 @@ var typographySchema = z17.object({
7395
7852
  scale: typographyScaleSchema,
7396
7853
  proseLinkStyle: proseLinkStyleSchema.optional()
7397
7854
  });
7398
- var spaceSchema = z17.enum(["comfortable", "standard", "dense"]);
7399
- var corners = z17.enum(["square", "soft", "rounded", "pill"]);
7400
- var shadow = z17.object({
7401
- elevation: z17.enum(["none", "low", "medium", "high"]),
7402
- softness: z17.enum(["crisp", "soft", "hard"]).nullable(),
7403
- position: z17.enum(["bottom", "bottom-right"]).default("bottom")
7855
+ var spaceSchema = z22.enum(["comfortable", "standard", "dense"]);
7856
+ var corners = z22.enum(["square", "soft", "rounded", "pill"]);
7857
+ var shadow = z22.object({
7858
+ elevation: z22.enum(["none", "low", "medium", "high"]),
7859
+ softness: z22.enum(["crisp", "soft", "hard"]).nullable(),
7860
+ position: z22.enum(["bottom", "bottom-right"]).default("bottom")
7404
7861
  });
7405
- var border = z17.object({
7406
- width: z17.enum(["none", "hairline", "thin", "thick"]),
7407
- style: z17.enum(["solid", "dashed"])
7862
+ var border = z22.object({
7863
+ width: z22.enum(["none", "hairline", "thin", "thick"]),
7864
+ style: z22.enum(["solid", "dashed"])
7408
7865
  });
7409
- var motion = z17.object({
7410
- level: z17.enum(["off", "low", "medium", "high"]),
7411
- easing: z17.enum(["standard", "snappy", "gentle"]).nullable()
7866
+ var motion = z22.object({
7867
+ level: z22.enum(["off", "low", "medium", "high"]),
7868
+ easing: z22.enum(["standard", "snappy", "gentle"]).nullable()
7412
7869
  });
7413
- var buttonStyle = z17.object({
7870
+ var buttonStyle = z22.object({
7414
7871
  shape: corners
7415
7872
  // Used for --radius-control CSS variable
7416
7873
  });
7417
- var cardStyle = z17.object({
7418
- elevation: z17.enum(["none", "low", "medium", "high"]),
7419
- border: z17.enum(["none", "subtle", "defined"]),
7874
+ var cardStyle = z22.object({
7875
+ elevation: z22.enum(["none", "low", "medium", "high"]),
7876
+ border: z22.enum(["none", "subtle", "defined"]),
7420
7877
  shape: corners,
7421
- headerStyle: z17.enum(["plain", "accentBar", "subtleBg"]).nullable(),
7422
- mediaTreatment: z17.enum(["square", "rounded", "bleed"]).nullable()
7878
+ headerStyle: z22.enum(["plain", "accentBar", "subtleBg"]).nullable(),
7879
+ mediaTreatment: z22.enum(["square", "rounded", "bleed"]).nullable()
7423
7880
  });
7424
- var inputStyle = z17.object({
7881
+ var inputStyle = z22.object({
7425
7882
  shape: corners,
7426
- border: z17.enum(["subtle", "defined", "underline"]),
7427
- focus: z17.enum(["glow", "ring", "underline"]),
7428
- label: z17.enum(["inside", "above"])
7883
+ border: z22.enum(["subtle", "defined", "underline"]),
7884
+ focus: z22.enum(["glow", "ring", "underline"]),
7885
+ label: z22.enum(["inside", "above"])
7429
7886
  });
7430
- var headerVariant = z17.enum(["classic", "centered", "transparent", "floating"]);
7431
- var headerPositioning = z17.enum(["static", "sticky", "fixed"]);
7432
- var headerNavStyle = z17.enum([
7887
+ var headerVariant = z22.enum(["classic", "centered", "transparent", "floating"]);
7888
+ var headerPositioning = z22.enum(["static", "sticky", "fixed"]);
7889
+ var headerNavStyle = z22.enum([
7433
7890
  "minimal",
7434
7891
  "underline",
7435
7892
  "underline-grow",
@@ -7438,57 +7895,57 @@ var headerNavStyle = z17.enum([
7438
7895
  "frosted",
7439
7896
  "solid"
7440
7897
  ]);
7441
- var navFontWeight = z17.enum(["regular", "medium", "semibold", "bold"]);
7442
- var headerMaxWidth = z17.enum(["container", "full"]);
7443
- var headerContainerSchema = z17.object({
7444
- rounded: z17.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
7445
- border: z17.boolean().default(true),
7446
- shadow: z17.boolean().default(true),
7447
- padding: z17.enum(["sm", "md", "lg"]).default("md"),
7448
- tint: z17.string().nullable().optional(),
7449
- opacity: z17.number().min(0).max(1).default(0.12)
7898
+ var navFontWeight = z22.enum(["regular", "medium", "semibold", "bold"]);
7899
+ var headerMaxWidth = z22.enum(["container", "full"]);
7900
+ var headerContainerSchema = z22.object({
7901
+ rounded: z22.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
7902
+ border: z22.boolean().default(true),
7903
+ shadow: z22.boolean().default(true),
7904
+ padding: z22.enum(["sm", "md", "lg"]).default("md"),
7905
+ tint: z22.string().nullable().optional(),
7906
+ opacity: z22.number().min(0).max(1).default(0.12)
7450
7907
  }).optional();
7451
7908
  var headerBorderSchema = componentBorderSchema.extend({
7452
- position: z17.enum(["bottom", "top", "both", "none"]).default("bottom")
7909
+ position: z22.enum(["bottom", "top", "both", "none"]).default("bottom")
7453
7910
  }).optional();
7454
- var logoStyleSchema = z17.object({
7455
- fontFamily: z17.enum(["heading", "body"]).default("heading"),
7456
- letterSpacing: z17.enum(["normal", "wide", "wider", "widest"]).default("normal"),
7457
- gradient: z17.boolean().default(false),
7458
- brandDisplay: z17.enum(brandDisplayModeValues).optional(),
7459
- size: z17.enum(logoSizePolicyValues).optional(),
7460
- accommodation: z17.enum(logoAccommodationPatternValues).optional()
7911
+ var logoStyleSchema = z22.object({
7912
+ fontFamily: z22.enum(["heading", "body"]).default("heading"),
7913
+ letterSpacing: z22.enum(["normal", "wide", "wider", "widest"]).default("normal"),
7914
+ gradient: z22.boolean().default(false),
7915
+ brandDisplay: z22.enum(brandDisplayModeValues).optional(),
7916
+ size: z22.enum(logoSizePolicyValues).optional(),
7917
+ accommodation: z22.enum(logoAccommodationPatternValues).optional()
7461
7918
  }).optional();
7462
- var headerLogoTextSchema = z17.object({
7463
- mobileWrapLines: z17.union([z17.literal(1), z17.literal(2)]).optional(),
7464
- mobileMaxWidth: z17.enum(["xs", "sm", "md"]).optional(),
7465
- hideOnShrink: z17.boolean().optional()
7919
+ var headerLogoTextSchema = z22.object({
7920
+ mobileWrapLines: z22.union([z22.literal(1), z22.literal(2)]).optional(),
7921
+ mobileMaxWidth: z22.enum(["xs", "sm", "md"]).optional(),
7922
+ hideOnShrink: z22.boolean().optional()
7466
7923
  }).optional();
7467
- var navEffectsSchema = z17.object({
7468
- underlineGradient: z17.boolean().default(false),
7469
- glow: z17.boolean().default(false),
7470
- glowColor: z17.string().optional(),
7471
- neumorphic: z17.boolean().default(false)
7924
+ var navEffectsSchema = z22.object({
7925
+ underlineGradient: z22.boolean().default(false),
7926
+ glow: z22.boolean().default(false),
7927
+ glowColor: z22.string().optional(),
7928
+ neumorphic: z22.boolean().default(false)
7472
7929
  }).optional();
7473
- var dropdownStyleSchema = z17.object({
7930
+ var dropdownStyleSchema = z22.object({
7474
7931
  // Container styling
7475
7932
  background: themeColorTokenSchema.default("surface"),
7476
7933
  textColor: themeColorTokenSchema.default("text"),
7477
7934
  borderColor: themeColorTokenSchema.nullable().default("border"),
7478
- shadow: z17.enum(["none", "sm", "md", "lg"]).default("md"),
7479
- borderRadius: z17.enum(["none", "sm", "md", "lg"]).default("md"),
7935
+ shadow: z22.enum(["none", "sm", "md", "lg"]).default("md"),
7936
+ borderRadius: z22.enum(["none", "sm", "md", "lg"]).default("md"),
7480
7937
  // Link hover states (explicit control)
7481
7938
  hoverBackground: themeColorTokenSchema.nullable().optional(),
7482
7939
  hoverTextColor: themeColorTokenSchema.nullable().optional(),
7483
7940
  // Typography
7484
- textTransform: z17.enum(["none", "uppercase", "capitalize"]).default("none"),
7485
- letterSpacing: z17.enum(["normal", "wide", "wider"]).default("normal"),
7486
- fontWeight: z17.enum(["regular", "medium", "semibold", "bold"]).optional(),
7941
+ textTransform: z22.enum(["none", "uppercase", "capitalize"]).default("none"),
7942
+ letterSpacing: z22.enum(["normal", "wide", "wider"]).default("normal"),
7943
+ fontWeight: z22.enum(["regular", "medium", "semibold", "bold"]).optional(),
7487
7944
  // optional = inherit from navWeight
7488
- textSize: z17.enum(["xs", "sm", "base", "lg"]).optional()
7945
+ textSize: z22.enum(["xs", "sm", "base", "lg"]).optional()
7489
7946
  // optional = no override (browser default)
7490
7947
  }).optional();
7491
- var headerCtaGapSchema = z17.enum([
7948
+ var headerCtaGapSchema = z22.enum([
7492
7949
  "none",
7493
7950
  "tight",
7494
7951
  "compact",
@@ -7496,7 +7953,7 @@ var headerCtaGapSchema = z17.enum([
7496
7953
  "relaxed",
7497
7954
  "spacious"
7498
7955
  ]);
7499
- var headerCtaTreatmentSchema = z17.enum([
7956
+ var headerCtaTreatmentSchema = z22.enum([
7500
7957
  "default",
7501
7958
  "primary",
7502
7959
  "secondary",
@@ -7504,25 +7961,25 @@ var headerCtaTreatmentSchema = z17.enum([
7504
7961
  "outline",
7505
7962
  "ghost"
7506
7963
  ]);
7507
- var navContainerSchema = z17.object({
7508
- type: z17.enum(["none", "pill", "glass"]).default("none"),
7509
- tint: z17.string().nullable().optional(),
7510
- opacity: z17.number().min(0).max(1).default(0.15)
7964
+ var navContainerSchema = z22.object({
7965
+ type: z22.enum(["none", "pill", "glass"]).default("none"),
7966
+ tint: z22.string().nullable().optional(),
7967
+ opacity: z22.number().min(0).max(1).default(0.15)
7511
7968
  }).default({ type: "none", tint: null, opacity: 0.15 });
7512
- var headerBackgroundSchema = z17.object({
7513
- type: z17.enum(["color", "gradient", "image"]),
7514
- contentOwner: z17.literal(siteChromeBackgroundOverrideOwner).optional(),
7969
+ var headerBackgroundSchema = z22.object({
7970
+ type: z22.enum(["color", "gradient", "image"]),
7971
+ contentOwner: z22.literal(siteChromeBackgroundOverrideOwner).optional(),
7515
7972
  color: tokenOrCssColorValueSchema.nullable().optional(),
7516
7973
  gradient: gradientConfigSchema.nullable().optional(),
7517
- image: mediaSchema.nullable().optional(),
7974
+ image: mediaSchema2.nullable().optional(),
7518
7975
  textColor: tokenOrCssColorValueSchema.nullable().optional()
7519
7976
  });
7520
- var headerSchema = z17.object({
7977
+ var headerSchema = z22.object({
7521
7978
  variant: headerVariant,
7522
7979
  positioning: headerPositioning,
7523
- shrinkOnScroll: z17.boolean(),
7980
+ shrinkOnScroll: z22.boolean(),
7524
7981
  maxWidth: headerMaxWidth,
7525
- logoOverride: mediaSchema.nullable().optional(),
7982
+ logoOverride: mediaSchema2.nullable().optional(),
7526
7983
  background: headerBackgroundSchema.default({
7527
7984
  type: "color",
7528
7985
  color: "surface"
@@ -7550,16 +8007,16 @@ var headerSchema = z17.object({
7550
8007
  // Optional theme-level CTA variant for header/nav CTA buttons.
7551
8008
  // Internal runtime bridge for the block renderer; prefer ctaTreatment in
7552
8009
  // authored Theme V2 concepts.
7553
- ctaVariant: z17.string().min(1).optional(),
8010
+ ctaVariant: z22.string().min(1).optional(),
7554
8011
  // Dropdown menu styling (nav dropdowns and mobile drawer)
7555
8012
  dropdownStyle: dropdownStyleSchema
7556
8013
  });
7557
- var footerVariant = z17.enum(["simple", "columns", "split"]);
7558
- var footerMaxWidth = z17.enum(["container", "full"]);
7559
- var footerMode = z17.enum(["default", "blocks", "default+blocks", "none"]);
7560
- var footerNavLayoutMode = z17.enum(["stack", "inline", "inline-wrap"]);
7561
- var footerNavLayoutAlign = z17.enum(["start", "center", "end", "space-between"]);
7562
- var footerSpacing = z17.enum([
8014
+ var footerVariant = z22.enum(["simple", "columns", "split"]);
8015
+ var footerMaxWidth = z22.enum(["container", "full"]);
8016
+ var footerMode = z22.enum(["default", "blocks", "default+blocks", "none"]);
8017
+ var footerNavLayoutMode = z22.enum(["stack", "inline", "inline-wrap"]);
8018
+ var footerNavLayoutAlign = z22.enum(["start", "center", "end", "space-between"]);
8019
+ var footerSpacing = z22.enum([
7563
8020
  "none",
7564
8021
  "tight",
7565
8022
  "compact",
@@ -7567,44 +8024,44 @@ var footerSpacing = z17.enum([
7567
8024
  "relaxed",
7568
8025
  "spacious"
7569
8026
  ]);
7570
- var footerLogoPlacement = z17.enum(["left", "right", "above", "below"]);
7571
- var footerLogoSize = z17.enum(["sm", "md", "lg", "xl"]);
7572
- var footerLogoMaxHeight = z17.enum(["sm", "md", "lg", "xl"]);
7573
- var footerBottomTextLinkStyleSchema = z17.object({
8027
+ var footerLogoPlacement = z22.enum(["left", "right", "above", "below"]);
8028
+ var footerLogoSize = z22.enum(["sm", "md", "lg", "xl"]);
8029
+ var footerLogoMaxHeight = z22.enum(["sm", "md", "lg", "xl"]);
8030
+ var footerBottomTextLinkStyleSchema = z22.object({
7574
8031
  colorToken: themeColorTokenSchema.optional(),
7575
8032
  hoverColorToken: themeColorTokenSchema.nullable().optional(),
7576
8033
  decorationColorToken: themeColorTokenSchema.nullable().optional(),
7577
- underline: z17.boolean().optional()
8034
+ underline: z22.boolean().optional()
7578
8035
  });
7579
- var footerBottomBarSchema = z17.object({
7580
- enabled: z17.boolean().optional(),
7581
- fullBleed: z17.boolean().optional(),
8036
+ var footerBottomBarSchema = z22.object({
8037
+ enabled: z22.boolean().optional(),
8038
+ fullBleed: z22.boolean().optional(),
7582
8039
  background: headerBackgroundSchema.optional(),
7583
8040
  textColor: themeColorTokenSchema.nullable().optional(),
7584
- textAlign: z17.enum(["left", "center", "right"]).optional(),
8041
+ textAlign: z22.enum(["left", "center", "right"]).optional(),
7585
8042
  paddingY: footerSpacing.optional(),
7586
8043
  paddingX: footerSpacing.optional(),
7587
- borderTop: z17.object({
8044
+ borderTop: z22.object({
7588
8045
  colorToken: themeColorTokenSchema.nullable().optional(),
7589
- width: z17.enum(["none", "thin", "medium", "thick"]).optional()
8046
+ width: z22.enum(["none", "thin", "medium", "thick"]).optional()
7590
8047
  }).optional()
7591
8048
  });
7592
- var footerNavLayoutSchema = z17.object({
8049
+ var footerNavLayoutSchema = z22.object({
7593
8050
  layout: footerNavLayoutMode.optional(),
7594
8051
  align: footerNavLayoutAlign.optional(),
7595
8052
  gapX: footerSpacing.optional(),
7596
8053
  gapY: footerSpacing.optional(),
7597
- columns: z17.number().int().min(1).max(6).optional()
8054
+ columns: z22.number().int().min(1).max(6).optional()
7598
8055
  });
7599
- var footerLogoSchema = z17.object({
7600
- showLogo: z17.boolean().default(true),
7601
- showLogoText: z17.boolean().optional(),
8056
+ var footerLogoSchema = z22.object({
8057
+ showLogo: z22.boolean().default(true),
8058
+ showLogoText: z22.boolean().optional(),
7602
8059
  placement: footerLogoPlacement.optional(),
7603
8060
  size: footerLogoSize.optional(),
7604
8061
  maxHeight: footerLogoMaxHeight.optional(),
7605
- align: z17.enum(["start", "center", "end"]).optional()
8062
+ align: z22.enum(["start", "center", "end"]).optional()
7606
8063
  });
7607
- var footerSchema = z17.object({
8064
+ var footerSchema = z22.object({
7608
8065
  /**
7609
8066
  * SDK-only footer rendering mode.
7610
8067
  *
@@ -7613,7 +8070,7 @@ var footerSchema = z17.object({
7613
8070
  mode: footerMode.optional(),
7614
8071
  variant: footerVariant,
7615
8072
  maxWidth: footerMaxWidth,
7616
- showLogoText: z17.boolean().optional(),
8073
+ showLogoText: z22.boolean().optional(),
7617
8074
  background: headerBackgroundSchema.default({
7618
8075
  type: "color",
7619
8076
  color: "surface"
@@ -7631,20 +8088,20 @@ var footerSchema = z17.object({
7631
8088
  logo: footerLogoSchema.optional(),
7632
8089
  bottomBar: footerBottomBarSchema.optional()
7633
8090
  });
7634
- var containerPaddingPresetSchema = z17.enum([
8091
+ var containerPaddingPresetSchema = z22.enum([
7635
8092
  "tight",
7636
8093
  "compact",
7637
8094
  "default",
7638
8095
  "relaxed"
7639
8096
  ]);
7640
- var layoutSchema = z17.object({
7641
- containerPadding: z17.object({
8097
+ var layoutSchema = z22.object({
8098
+ containerPadding: z22.object({
7642
8099
  mobile: containerPaddingPresetSchema.optional(),
7643
8100
  tablet: containerPaddingPresetSchema.optional(),
7644
8101
  desktop: containerPaddingPresetSchema.optional()
7645
8102
  }).optional()
7646
8103
  }).optional();
7647
- var heroTypographySizeSchema = z17.enum([
8104
+ var heroTypographySizeSchema = z22.enum([
7648
8105
  "sm",
7649
8106
  "base",
7650
8107
  "lg",
@@ -7656,19 +8113,19 @@ var heroTypographySizeSchema = z17.enum([
7656
8113
  "6xl",
7657
8114
  "editorial"
7658
8115
  ]);
7659
- var heroTypographyLineHeightSchema = z17.enum([
8116
+ var heroTypographyLineHeightSchema = z22.enum([
7660
8117
  "tight",
7661
8118
  "snug",
7662
8119
  "normal",
7663
8120
  "relaxed"
7664
8121
  ]);
7665
- var heroResponsiveTypographySchema = z17.object({
8122
+ var heroResponsiveTypographySchema = z22.object({
7666
8123
  headlineSize: heroTypographySizeSchema.optional(),
7667
8124
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
7668
8125
  subheadlineSize: heroTypographySizeSchema.optional(),
7669
8126
  subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
7670
8127
  });
7671
- var heroTypographySchema = z17.object({
8128
+ var heroTypographySchema = z22.object({
7672
8129
  headlineSize: heroTypographySizeSchema.optional(),
7673
8130
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
7674
8131
  subheadlineSize: heroTypographySizeSchema.optional(),
@@ -7677,38 +8134,38 @@ var heroTypographySchema = z17.object({
7677
8134
  microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
7678
8135
  microSubheadlineSize: heroTypographySizeSchema.optional(),
7679
8136
  microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
7680
- responsive: z17.object({
8137
+ responsive: z22.object({
7681
8138
  tablet: heroResponsiveTypographySchema.optional(),
7682
8139
  mobile: heroResponsiveTypographySchema.optional()
7683
8140
  }).optional()
7684
8141
  });
7685
- var heroSchema = z17.object({
8142
+ var heroSchema = z22.object({
7686
8143
  typography: heroTypographySchema.optional()
7687
8144
  }).optional();
7688
- var bodyTextIntroTypographySizeSchema = z17.enum(["default", "editorial"]);
7689
- var bodyTextSchema = z17.object({
7690
- intro: z17.object({
8145
+ var bodyTextIntroTypographySizeSchema = z22.enum(["default", "editorial"]);
8146
+ var bodyTextSchema = z22.object({
8147
+ intro: z22.object({
7691
8148
  paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
7692
8149
  headingSize: bodyTextIntroTypographySizeSchema.optional()
7693
8150
  }).optional()
7694
8151
  }).optional();
7695
- var gradientsSchema = z17.object({
7696
- button: z17.string().min(1).nullable().optional(),
7697
- hero: z17.string().min(1).nullable().optional(),
7698
- background: z17.string().min(1).nullable().optional()
8152
+ var gradientsSchema = z22.object({
8153
+ button: z22.string().min(1).nullable().optional(),
8154
+ hero: z22.string().min(1).nullable().optional(),
8155
+ background: z22.string().min(1).nullable().optional()
7699
8156
  });
7700
- var testimonialQuoteTreatmentSchema = z17.object({
7701
- style: z17.enum(["serif-display", "accent-glyph", "none"]),
7702
- fontFamily: z17.enum(["heading", "body"]).optional(),
7703
- scale: z17.enum(["sm", "md", "lg", "xl"]).optional(),
8157
+ var testimonialQuoteTreatmentSchema = z22.object({
8158
+ style: z22.enum(["serif-display", "accent-glyph", "none"]),
8159
+ fontFamily: z22.enum(["heading", "body"]).optional(),
8160
+ scale: z22.enum(["sm", "md", "lg", "xl"]).optional(),
7704
8161
  colorToken: themeColorTokenSchema.optional(),
7705
- opacity: z17.number().min(0).max(1).optional()
8162
+ opacity: z22.number().min(0).max(1).optional()
7706
8163
  });
7707
- var themeSchema = z17.object({
7708
- name: z17.string().min(1).max(30),
7709
- description: z17.string().min(1).max(400),
7710
- rationale: z17.string().min(1).max(400),
7711
- siteStyleId: z17.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
8164
+ var themeSchema = z22.object({
8165
+ name: z22.string().min(1).max(30),
8166
+ description: z22.string().min(1).max(400),
8167
+ rationale: z22.string().min(1).max(400),
8168
+ siteStyleId: z22.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
7712
8169
  axes: axesSchema,
7713
8170
  palette: paletteSchema,
7714
8171
  typography: typographySchema,
@@ -7738,15 +8195,15 @@ var themeSchema = z17.object({
7738
8195
  // Block-specific customization (Tier 3)
7739
8196
  // blockCustomVars: Per-block CSS variable overrides as bare values
7740
8197
  // Example: { "event-registration": { "--step-color": "#6d28d9" } }
7741
- blockCustomVars: z17.record(
7742
- z17.string(),
8198
+ blockCustomVars: z22.record(
8199
+ z22.string(),
7743
8200
  // block kind (matches data-block attribute)
7744
- z17.record(z17.string(), z17.string())
8201
+ z22.record(z22.string(), z22.string())
7745
8202
  // { '--var-name': 'value' }
7746
8203
  ).optional(),
7747
8204
  // Structured block-kind theme overrides (v1: typography prose-link style only)
7748
8205
  // Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
7749
- blockOverrides: z17.record(z17.string(), blockThemeOverrideSchema).optional(),
8206
+ blockOverrides: z22.record(z22.string(), blockThemeOverrideSchema).optional(),
7750
8207
  // Site-wide heading decoration signature (family + colour). Set once per Look
7751
8208
  // and projected transiently onto eligible block headings at render time.
7752
8209
  // Alignment is inherited from the heading, so no placement is stored.
@@ -7784,11 +8241,11 @@ var themeSchema = z17.object({
7784
8241
  * }
7785
8242
  * ```
7786
8243
  */
7787
- styleGroups: z17.record(z17.string(), z17.array(z17.string())).optional()
8244
+ styleGroups: z22.record(z22.string(), z22.array(z22.string())).optional()
7788
8245
  });
7789
- var themesTurnSchema = z17.object({
7790
- message: z17.string().min(1),
7791
- themes: z17.array(themeSchema).length(3)
8246
+ var themesTurnSchema = z22.object({
8247
+ message: z22.string().min(1),
8248
+ themes: z22.array(themeSchema).length(3)
7792
8249
  });
7793
8250
 
7794
8251
  // ../theme-core/src/palette/variants/types.ts
@@ -7798,19 +8255,19 @@ function asPaletteVariantId(value) {
7798
8255
  }
7799
8256
  return value;
7800
8257
  }
7801
- var paletteVariantIdSchema = z18.string().min(1).transform((value) => asPaletteVariantId(value));
8258
+ var paletteVariantIdSchema = z23.string().min(1).transform((value) => asPaletteVariantId(value));
7802
8259
  var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
7803
- var hexColorSchema = z18.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
8260
+ var hexColorSchema = z23.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
7804
8261
  var variantPaletteColorSchema = paletteColorSchema.extend({
7805
8262
  name: paletteTokenNameSchema
7806
8263
  });
7807
- var paletteVariantSchema = z18.object({
8264
+ var paletteVariantSchema = z23.object({
7808
8265
  id: paletteVariantIdSchema,
7809
- name: z18.string().min(1),
7810
- description: z18.string().min(1),
8266
+ name: z23.string().min(1),
8267
+ description: z23.string().min(1),
7811
8268
  tags: styleTagsSchema,
7812
- mode: z18.enum(["light", "dark"]),
7813
- colors: z18.array(variantPaletteColorSchema).min(1)
8269
+ mode: z23.enum(["light", "dark"]),
8270
+ colors: z23.array(variantPaletteColorSchema).min(1)
7814
8271
  });
7815
8272
  function definePaletteVariant(input) {
7816
8273
  return {
@@ -7822,7 +8279,7 @@ function definePaletteVariant(input) {
7822
8279
  colors: input.colors
7823
8280
  };
7824
8281
  }
7825
- var paletteOverridesSchema = z18.object({
8282
+ var paletteOverridesSchema = z23.object({
7826
8283
  primary: hexColorSchema.optional(),
7827
8284
  primaryForeground: hexColorSchema.optional(),
7828
8285
  secondary: hexColorSchema.optional(),
@@ -10224,66 +10681,66 @@ var typographyPresetsById = new Map(
10224
10681
  );
10225
10682
 
10226
10683
  // ../theme-core/src/site-styles/designState.ts
10227
- import { z as z19 } from "zod";
10684
+ import { z as z24 } from "zod";
10228
10685
  var themeV2DesignStateSchemaVersion = 1;
10229
- var designResolutionPolicySchema = z19.enum(["generated", "user", "admin", "sdk"]);
10230
- var runtimeStyleFieldNameSchema = z19.enum(themeV2RuntimeStyleFieldNames);
10231
- var nonEmptyRuntimeStyleFieldNamesSchema = z19.array(runtimeStyleFieldNameSchema).min(1).transform((fields) => [
10686
+ var designResolutionPolicySchema = z24.enum(["generated", "user", "admin", "sdk"]);
10687
+ var runtimeStyleFieldNameSchema = z24.enum(themeV2RuntimeStyleFieldNames);
10688
+ var nonEmptyRuntimeStyleFieldNamesSchema = z24.array(runtimeStyleFieldNameSchema).min(1).transform((fields) => [
10232
10689
  fields[0],
10233
10690
  ...fields.slice(1)
10234
10691
  ]);
10235
- var heroLegibilityStrategySchema = z19.enum([
10692
+ var heroLegibilityStrategySchema = z24.enum([
10236
10693
  "none",
10237
10694
  "scrim-gradient",
10238
10695
  "solid-panel"
10239
10696
  ]);
10240
- var heroCompositionIntentSchema = z19.enum([
10697
+ var heroCompositionIntentSchema = z24.enum([
10241
10698
  "center",
10242
10699
  "bottom-left"
10243
10700
  ]);
10244
- var heroTypographyScaleIntentSchema = z19.enum([
10701
+ var heroTypographyScaleIntentSchema = z24.enum([
10245
10702
  "quiet",
10246
10703
  "editorial",
10247
10704
  "display",
10248
10705
  "poster"
10249
10706
  ]);
10250
- var sectionHeightIntentSchema = z19.enum([
10707
+ var sectionHeightIntentSchema = z24.enum([
10251
10708
  "default",
10252
10709
  "banner",
10253
10710
  "hero",
10254
10711
  "immersive"
10255
10712
  ]);
10256
- var imageSurfaceTreatmentIntensitySchema = z19.enum(["soft", "balanced", "strong"]);
10257
- var imageSurfaceMotionSchema = z19.enum(["static", "fixed-frame"]);
10258
- var imageSurfaceTreatmentSchema = z19.discriminatedUnion("kind", [
10259
- z19.object({ kind: z19.literal("none") }).strict(),
10260
- z19.object({
10261
- kind: z19.literal("brand-scrim"),
10262
- token: z19.enum(["primary", "secondary", "accent"]),
10713
+ var imageSurfaceTreatmentIntensitySchema = z24.enum(["soft", "balanced", "strong"]);
10714
+ var imageSurfaceMotionSchema = z24.enum(["static", "fixed-frame"]);
10715
+ var imageSurfaceTreatmentSchema = z24.discriminatedUnion("kind", [
10716
+ z24.object({ kind: z24.literal("none") }).strict(),
10717
+ z24.object({
10718
+ kind: z24.literal("brand-scrim"),
10719
+ token: z24.enum(["primary", "secondary", "accent"]),
10263
10720
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10264
10721
  }).strict(),
10265
- z19.object({
10266
- kind: z19.literal("brand-wash"),
10267
- token: z19.enum(["primary", "secondary", "accent"]),
10722
+ z24.object({
10723
+ kind: z24.literal("brand-wash"),
10724
+ token: z24.enum(["primary", "secondary", "accent"]),
10268
10725
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10269
10726
  }).strict(),
10270
- z19.object({
10271
- kind: z19.literal("neutral-scrim"),
10727
+ z24.object({
10728
+ kind: z24.literal("neutral-scrim"),
10272
10729
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10273
10730
  }).strict(),
10274
- z19.object({
10275
- kind: z19.literal("neutral-wash"),
10731
+ z24.object({
10732
+ kind: z24.literal("neutral-wash"),
10276
10733
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10277
10734
  }).strict(),
10278
- z19.object({
10279
- kind: z19.literal("solid-panel"),
10735
+ z24.object({
10736
+ kind: z24.literal("solid-panel"),
10280
10737
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10281
10738
  }).strict()
10282
10739
  ]);
10283
- var testimonialCardTreatmentSchema = z19.enum(["default", "accent-quote"]);
10284
- var tileTreatmentSchema = z19.enum(tileTreatmentValues);
10285
- var eventListTreatmentSchema = z19.enum(eventListTreatmentValues);
10286
- var eyebrowTreatmentSchema = z19.enum(eyebrowTreatmentValues);
10740
+ var testimonialCardTreatmentSchema = z24.enum(["default", "accent-quote"]);
10741
+ var tileTreatmentSchema = z24.enum(tileTreatmentValues);
10742
+ var eventListTreatmentSchema = z24.enum(eventListTreatmentValues);
10743
+ var eyebrowTreatmentSchema = z24.enum(eyebrowTreatmentValues);
10287
10744
  function uniqueNonEmpty(values) {
10288
10745
  const uniqueValues = [...new Set(values)];
10289
10746
  const firstValue = uniqueValues[0];
@@ -10301,27 +10758,27 @@ var userFlushTreatments = uniqueNonEmpty(
10301
10758
  var userFlushBleeds = uniqueNonEmpty(
10302
10759
  userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
10303
10760
  );
10304
- var contentFrameIntentSchema = z19.discriminatedUnion("kind", [
10305
- z19.object({ kind: z19.literal("plain") }).strict(),
10306
- z19.object({
10307
- kind: z19.literal("panel"),
10308
- treatment: z19.enum(userPanelTreatments)
10761
+ var contentFrameIntentSchema = z24.discriminatedUnion("kind", [
10762
+ z24.object({ kind: z24.literal("plain") }).strict(),
10763
+ z24.object({
10764
+ kind: z24.literal("panel"),
10765
+ treatment: z24.enum(userPanelTreatments)
10309
10766
  }).strict(),
10310
- z19.object({
10311
- kind: z19.literal("flush-panel"),
10312
- treatment: z19.enum(userFlushTreatments),
10313
- bleed: z19.enum(userFlushBleeds)
10767
+ z24.object({
10768
+ kind: z24.literal("flush-panel"),
10769
+ treatment: z24.enum(userFlushTreatments),
10770
+ bleed: z24.enum(userFlushBleeds)
10314
10771
  }).strict()
10315
10772
  ]);
10316
- var blockDesignPlanSchema = z19.object({
10317
- blockId: z19.string().min(1).transform(asDesignBlockId),
10318
- blockKind: z19.string().min(1),
10319
- purpose: z19.string().min(1),
10320
- sectionSurface: z19.enum(userDesignOptionCatalog.sectionSurfaces),
10773
+ var blockDesignPlanSchema = z24.object({
10774
+ blockId: z24.string().min(1).transform(asDesignBlockId),
10775
+ blockKind: z24.string().min(1),
10776
+ purpose: z24.string().min(1),
10777
+ sectionSurface: z24.enum(userDesignOptionCatalog.sectionSurfaces),
10321
10778
  contentFrame: contentFrameIntentSchema,
10322
- itemSurface: z19.enum(userDesignOptionCatalog.itemSurfaces),
10323
- transitionAfter: z19.enum(userDesignOptionCatalog.transitions),
10324
- emphasis: z19.enum(userDesignOptionCatalog.emphases),
10779
+ itemSurface: z24.enum(userDesignOptionCatalog.itemSurfaces),
10780
+ transitionAfter: z24.enum(userDesignOptionCatalog.transitions),
10781
+ emphasis: z24.enum(userDesignOptionCatalog.emphases),
10325
10782
  sectionHeight: sectionHeightIntentSchema.optional(),
10326
10783
  heroLegibility: heroLegibilityStrategySchema.optional(),
10327
10784
  heroComposition: heroCompositionIntentSchema.optional(),
@@ -10333,39 +10790,39 @@ var blockDesignPlanSchema = z19.object({
10333
10790
  eventListTreatment: eventListTreatmentSchema.optional(),
10334
10791
  eyebrowTreatment: eyebrowTreatmentSchema.optional()
10335
10792
  }).strict();
10336
- var styleAuthoritySchema = z19.discriminatedUnion("kind", [
10337
- z19.object({
10338
- kind: z19.literal("theme-v2"),
10793
+ var styleAuthoritySchema = z24.discriminatedUnion("kind", [
10794
+ z24.object({
10795
+ kind: z24.literal("theme-v2"),
10339
10796
  source: designResolutionPolicySchema,
10340
- siteStyleId: z19.string().min(1).transform(asSiteStyleId),
10341
- templateId: z19.string().min(1).transform(asDesignSystemTemplateId),
10342
- templateVersion: z19.number().int().nonnegative(),
10343
- resolverVersion: z19.number().int().nonnegative()
10797
+ siteStyleId: z24.string().min(1).transform(asSiteStyleId),
10798
+ templateId: z24.string().min(1).transform(asDesignSystemTemplateId),
10799
+ templateVersion: z24.number().int().nonnegative(),
10800
+ resolverVersion: z24.number().int().nonnegative()
10344
10801
  }).strict(),
10345
- z19.object({
10346
- kind: z19.literal("legacy-raw"),
10347
- reason: z19.enum(["pre-theme-v2", "manual-runtime-fields"])
10802
+ z24.object({
10803
+ kind: z24.literal("legacy-raw"),
10804
+ reason: z24.enum(["pre-theme-v2", "manual-runtime-fields"])
10348
10805
  }).strict(),
10349
- z19.object({
10350
- kind: z19.literal("advanced-detached"),
10351
- reason: z19.literal("detached-custom-runtime-fields")
10806
+ z24.object({
10807
+ kind: z24.literal("advanced-detached"),
10808
+ reason: z24.literal("detached-custom-runtime-fields")
10352
10809
  }).strict()
10353
10810
  ]);
10354
- var blockRuntimeStyleAuthoritySchema = z19.object({
10355
- unit: z19.literal("block-runtime-fields"),
10356
- blockId: z19.string().min(1).transform(asDesignBlockId),
10811
+ var blockRuntimeStyleAuthoritySchema = z24.object({
10812
+ unit: z24.literal("block-runtime-fields"),
10813
+ blockId: z24.string().min(1).transform(asDesignBlockId),
10357
10814
  fields: nonEmptyRuntimeStyleFieldNamesSchema,
10358
10815
  authority: styleAuthoritySchema
10359
10816
  }).strict();
10360
- var persistedPageDesignStateV1Schema = z19.object({
10361
- schemaVersion: z19.literal(themeV2DesignStateSchemaVersion),
10362
- siteStyleId: z19.string().min(1).transform(asSiteStyleId),
10363
- templateId: z19.string().min(1).transform(asDesignSystemTemplateId),
10364
- templateVersion: z19.number().int().nonnegative(),
10365
- resolverVersion: z19.number().int().nonnegative(),
10366
- rhythmPresetId: z19.string().min(1),
10367
- blocks: z19.array(blockDesignPlanSchema),
10368
- styleAuthorities: z19.array(blockRuntimeStyleAuthoritySchema)
10817
+ var persistedPageDesignStateV1Schema = z24.object({
10818
+ schemaVersion: z24.literal(themeV2DesignStateSchemaVersion),
10819
+ siteStyleId: z24.string().min(1).transform(asSiteStyleId),
10820
+ templateId: z24.string().min(1).transform(asDesignSystemTemplateId),
10821
+ templateVersion: z24.number().int().nonnegative(),
10822
+ resolverVersion: z24.number().int().nonnegative(),
10823
+ rhythmPresetId: z24.string().min(1),
10824
+ blocks: z24.array(blockDesignPlanSchema),
10825
+ styleAuthorities: z24.array(blockRuntimeStyleAuthoritySchema)
10369
10826
  }).strict();
10370
10827
 
10371
10828
  // ../theme-core/src/site-styles/runtimeCompiler.ts
@@ -11907,7 +12364,7 @@ function resolveEventRequiresPayment(input) {
11907
12364
  if (!input.event) {
11908
12365
  return false;
11909
12366
  }
11910
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
12367
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
11911
12368
  }
11912
12369
  function resolveDiscountContext(input) {
11913
12370
  const selection = input.paymentSelection.method ? input.paymentSelection : null;
@@ -11996,22 +12453,22 @@ function AltchaWidget({
11996
12453
  if (typeof window === "undefined") return;
11997
12454
  let widget = null;
11998
12455
  Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
11999
- if (!containerRef.current) return;
12456
+ if (containerRef.current === null) return;
12000
12457
  widget = document.createElement("altcha-widget");
12001
12458
  widget.setAttribute("challengeurl", challengeUrl);
12002
- if (auto) {
12459
+ if (auto === true) {
12003
12460
  widget.setAttribute("auto", "onload");
12004
12461
  }
12005
- if (hidelogo) {
12462
+ if (hidelogo === true) {
12006
12463
  widget.setAttribute("hidelogo", "true");
12007
12464
  }
12008
12465
  widget.setAttribute("hidefooter", "true");
12009
- if (className) {
12466
+ if (className !== void 0 && className.length > 0) {
12010
12467
  widget.className = className;
12011
12468
  }
12012
12469
  widget.addEventListener("statechange", ((event) => {
12013
12470
  const { state, payload } = event.detail;
12014
- if (state === "verified" && payload) {
12471
+ if (state === "verified" && payload !== void 0 && payload.length > 0) {
12015
12472
  onSolutionChange?.(payload);
12016
12473
  } else if (state === "error" || state === "expired") {
12017
12474
  onSolutionChange?.(null);
@@ -12022,7 +12479,7 @@ function AltchaWidget({
12022
12479
  console.error("Failed to load ALTCHA widget:", err3);
12023
12480
  });
12024
12481
  return () => {
12025
- if (widget && containerRef.current) {
12482
+ if (widget !== null && containerRef.current !== null) {
12026
12483
  containerRef.current.removeChild(widget);
12027
12484
  }
12028
12485
  };
@@ -12077,15 +12534,15 @@ var encoder = new TextEncoder();
12077
12534
  // ../altcha/src/index.ts
12078
12535
  function getCmsApiUrl() {
12079
12536
  const env = process.env.RIVERBANK_ENV;
12080
- if (env) {
12537
+ if (env !== void 0 && env.length > 0) {
12081
12538
  const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
12082
12539
  const dashboardUrl2 = process.env[envKey];
12083
- if (dashboardUrl2) {
12540
+ if (dashboardUrl2 !== void 0 && dashboardUrl2.length > 0) {
12084
12541
  return `${dashboardUrl2.replace(/\/$/, "")}/api`;
12085
12542
  }
12086
12543
  }
12087
12544
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
12088
- if (dashboardUrl) {
12545
+ if (dashboardUrl !== void 0 && dashboardUrl.length > 0) {
12089
12546
  return `${dashboardUrl.replace(/\/$/, "")}/api`;
12090
12547
  }
12091
12548
  throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
@@ -12919,8 +13376,10 @@ function buildBookingPaymentOptionViewModel(input) {
12919
13376
  totalAmountCents: input.totalCents,
12920
13377
  config: input.option.config
12921
13378
  });
13379
+ const remainingBalance = Math.max(0, input.totalCents - dueToday);
12922
13380
  const formattedTotal = formatPrice(input.totalCents, input.currency, input.locale);
12923
13381
  const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
13382
+ const formattedRemainingBalance = formatPrice(remainingBalance, input.currency, input.locale);
12924
13383
  const dueAt = resolveFlexibleBalanceDueAt({
12925
13384
  bookingStartAt: input.bookingStartAt ?? (/* @__PURE__ */ new Date()).toISOString(),
12926
13385
  dueDateRule: input.option.config.dueDateRule
@@ -12937,6 +13396,7 @@ function buildBookingPaymentOptionViewModel(input) {
12937
13396
  summaryRows: [
12938
13397
  { label: "Total", value: formattedTotal },
12939
13398
  { label: "Due today", value: formattedDueToday },
13399
+ { label: "Remaining balance", value: formattedRemainingBalance },
12940
13400
  { label: "Balance due by", value: formatScheduleDate(dueAt, input.locale) },
12941
13401
  {
12942
13402
  label: "Deposit policy",
@@ -13786,7 +14246,7 @@ function omitRecordKey(record, key) {
13786
14246
  return rest;
13787
14247
  }
13788
14248
  function readAppointmentBookingOverrideData(value) {
13789
- if (!isRecord4(value)) return null;
14249
+ if (!isRecord5(value)) return null;
13790
14250
  const services = normalizeBookingServices(value.services);
13791
14251
  return {
13792
14252
  form: normalizeBookingFormConfig(value.form),
@@ -13799,7 +14259,7 @@ function createOverrideInputError(reason, message, warnInDev = false) {
13799
14259
  }
13800
14260
  return { ok: false, reason, message };
13801
14261
  }
13802
- function isRecord4(value) {
14262
+ function isRecord5(value) {
13803
14263
  return typeof value === "object" && value !== null;
13804
14264
  }
13805
14265
 
@@ -16040,8 +16500,8 @@ function getEventRegistrationOverrideInput(props) {
16040
16500
  };
16041
16501
  }
16042
16502
  const content = props.content ?? {};
16043
- const data = isRecord5(props.data) ? props.data : {};
16044
- const events = Array.isArray(data.events) ? data.events.filter(isPublicEventLike) : [];
16503
+ const data = isRecord6(props.data) ? props.data : {};
16504
+ const events = Array.isArray(data.events) ? data.events.map(normalizePublicEventLike).filter((event) => event !== null) : [];
16045
16505
  return {
16046
16506
  ok: true,
16047
16507
  value: {
@@ -16066,20 +16526,22 @@ function getEventRegistrationOverrideInput(props) {
16066
16526
  }
16067
16527
  };
16068
16528
  }
16069
- function isRecord5(value) {
16070
- return typeof value === "object" && value !== null;
16071
- }
16072
- function isPublicEventLike(value) {
16073
- return isRecord5(value) && typeof value.id === "string" && typeof value.occurrenceId === "string" && typeof value.seriesId === "string" && typeof value.title === "string" && typeof value.slug === "string" && typeof value.path === "string" && typeof value.requiresRegistration === "boolean" && isDeliveryMode(value.deliveryMode) && Array.isArray(value.attendanceModes) && typeof value.startsAt === "string" && typeof value.endsAt === "string" && typeof value.timeZone === "string" && isRecord5(value.pricing) && isRecord5(value.paymentTerms) && isAccessRestriction(value.accessRestriction) && Array.isArray(value.allowedCategoryIds);
16074
- }
16075
- function isDeliveryMode(value) {
16076
- return value === "in_person" || value === "online" || value === "hybrid";
16529
+ function isRecord6(value) {
16530
+ return typeof value === "object" && value !== null && !Array.isArray(value);
16077
16531
  }
16078
- function isAccessRestriction(value) {
16079
- return value === "none" || value === "category";
16532
+ function normalizePublicEventLike(value) {
16533
+ if (!isRecord6(value)) {
16534
+ return null;
16535
+ }
16536
+ const candidate = {
16537
+ ...value,
16538
+ destination: resolveRuntimeEventDestination(value)
16539
+ };
16540
+ const parsed = publicEventSchema.safeParse(candidate);
16541
+ return parsed.success ? parsed.data : null;
16080
16542
  }
16081
16543
  function isEventRegistrationContentEntryLike(value) {
16082
- return isRecord5(value) && typeof value.id === "string" && typeof value.slug === "string" && typeof value.contentTypeSlug === "string";
16544
+ return isRecord6(value) && typeof value.id === "string" && typeof value.slug === "string" && typeof value.contentTypeSlug === "string";
16083
16545
  }
16084
16546
 
16085
16547
  // ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts
@@ -16770,6 +17232,98 @@ function cleanupStaleRegistrations() {
16770
17232
  }
16771
17233
  }
16772
17234
 
17235
+ // ../blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.ts
17236
+ var DEFAULT_EVENT_DIRECT_PAYMENT_OPTION = {
17237
+ kind: "upfront"
17238
+ };
17239
+ function buildEventRegistrationPaymentOptionsViewModel(input) {
17240
+ const supportedOptions = selectSupportedEventDirectPaymentOptions(
17241
+ input.paymentTerms
17242
+ );
17243
+ const selection = buildBookingPaymentSelectionViewModel({
17244
+ serviceTitle: input.eventTitle,
17245
+ paymentTerms: { allowedOptions: [...supportedOptions] },
17246
+ priceAmount: input.totalPriceCents,
17247
+ priceCurrency: input.currency,
17248
+ bookingStartAt: input.startsAt,
17249
+ locale: input.locale
17250
+ });
17251
+ return {
17252
+ mode: selection.mode,
17253
+ sectionTitle: selection.sectionTitle,
17254
+ options: selection.options.map(
17255
+ (option) => toEventDirectPaymentOption(option, selection.mode)
17256
+ )
17257
+ };
17258
+ }
17259
+ function selectSupportedEventDirectPaymentOptions(paymentTerms) {
17260
+ const supported = paymentTerms?.allowedOptions.filter(isSupportedEventDirectPaymentOption) ?? [];
17261
+ return supported.length > 0 ? supported : [DEFAULT_EVENT_DIRECT_PAYMENT_OPTION];
17262
+ }
17263
+ function isSupportedEventDirectPaymentOption(option) {
17264
+ return option.kind === "upfront" || option.kind === "flexible_balance";
17265
+ }
17266
+ function toEventDirectPaymentOption(option, mode) {
17267
+ switch (option.kind) {
17268
+ case "upfront":
17269
+ return {
17270
+ ...option,
17271
+ kind: "upfront",
17272
+ label: mode === "choice_required" ? "Pay in full now" : "Pay by card"
17273
+ };
17274
+ case "flexible_balance":
17275
+ return {
17276
+ ...option,
17277
+ kind: "flexible_balance",
17278
+ label: "Pay deposit now"
17279
+ };
17280
+ case "deferred_manual":
17281
+ case "instalment_plan":
17282
+ throw new Error(
17283
+ `Unsupported event registration payment option: ${option.kind}`
17284
+ );
17285
+ }
17286
+ }
17287
+ function resolveEventRegistrationDirectPaymentSelection(input) {
17288
+ if (input.selection.method !== "stripe") {
17289
+ return { kind: "not-stripe" };
17290
+ }
17291
+ const fallbackOption = input.options[0];
17292
+ if (!fallbackOption) {
17293
+ return { kind: "unavailable" };
17294
+ }
17295
+ const requestedKind = input.selection.collectionOptionKind;
17296
+ const selectedOption = requestedKind == null ? input.options.find((option) => option.kind === "upfront") : input.options.find((option) => option.kind === requestedKind);
17297
+ if (selectedOption) {
17298
+ return {
17299
+ kind: "valid",
17300
+ selection: {
17301
+ method: "stripe",
17302
+ collectionOptionKind: selectedOption.kind
17303
+ }
17304
+ };
17305
+ }
17306
+ return {
17307
+ kind: "invalid",
17308
+ fallbackSelection: {
17309
+ method: "stripe",
17310
+ collectionOptionKind: fallbackOption.kind
17311
+ }
17312
+ };
17313
+ }
17314
+ function normalizeEventRegistrationDirectPaymentSelection(input) {
17315
+ const selectionState = resolveEventRegistrationDirectPaymentSelection(input);
17316
+ switch (selectionState.kind) {
17317
+ case "valid":
17318
+ return selectionState.selection;
17319
+ case "invalid":
17320
+ return selectionState.fallbackSelection;
17321
+ case "not-stripe":
17322
+ case "unavailable":
17323
+ return input.selection;
17324
+ }
17325
+ }
17326
+
16773
17327
  // ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
16774
17328
  import { useCallback as useCallback6, useEffect as useEffect11, useMemo as useMemo6, useReducer as useReducer9, useState as useState4 } from "react";
16775
17329
 
@@ -18473,10 +19027,24 @@ function useEventRegistrationController(options) {
18473
19027
  ]
18474
19028
  );
18475
19029
  const currentStep = steps.find((step) => step.state === "active") ?? null;
19030
+ const directPaymentOptions = useMemo8(
19031
+ () => resolveHeadlessDirectPaymentOptions(wizard),
19032
+ [
19033
+ wizard.eligibility,
19034
+ wizard.occurrenceContext,
19035
+ wizard.preSelectedEvent,
19036
+ wizard.selectedEvent,
19037
+ wizard.ticketsCount
19038
+ ]
19039
+ );
18476
19040
  const submit = useCallback7(
18477
19041
  async (submitOptions) => {
19042
+ const paymentSelection = normalizeEventRegistrationDirectPaymentSelection({
19043
+ options: directPaymentOptions,
19044
+ selection: wizard.paymentSelection
19045
+ });
18478
19046
  const plan = resolveEventRegistrationSubmitPlan({
18479
- paymentSelection: wizard.paymentSelection,
19047
+ paymentSelection,
18480
19048
  eventRequiresPayment: wizard.eventRequiresPayment,
18481
19049
  canJoinWaitlist: wizard.eligibility?.canJoinWaitlist
18482
19050
  });
@@ -18495,7 +19063,7 @@ function useEventRegistrationController(options) {
18495
19063
  submitOptions
18496
19064
  );
18497
19065
  },
18498
- [wizard]
19066
+ [directPaymentOptions, wizard]
18499
19067
  );
18500
19068
  const next = useCallback7(async () => {
18501
19069
  switch (wizard.step) {
@@ -18581,9 +19149,14 @@ function useEventRegistrationController(options) {
18581
19149
  );
18582
19150
  const selectPayment = useCallback7(
18583
19151
  (selection) => {
18584
- wizard.handlePaymentSelectionChange(toInternalPaymentSelection(selection));
19152
+ wizard.handlePaymentSelectionChange(
19153
+ normalizeEventRegistrationDirectPaymentSelection({
19154
+ options: directPaymentOptions,
19155
+ selection: toInternalPaymentSelection(selection)
19156
+ })
19157
+ );
18585
19158
  },
18586
- [wizard]
19159
+ [directPaymentOptions, wizard]
18587
19160
  );
18588
19161
  const showSpamProtection = options.spamProtectionEnabled ?? isSpamProtectionEnabled();
18589
19162
  const spamProtection = showSpamProtection ? {
@@ -18592,7 +19165,7 @@ function useEventRegistrationController(options) {
18592
19165
  challenge: { url: getChallengeUrl(), auto: "onfocus" },
18593
19166
  solution: wizard.altchaSolution
18594
19167
  } : { enabled: false };
18595
- const payment = resolvePaymentModel(wizard);
19168
+ const payment = resolvePaymentModel(wizard, directPaymentOptions);
18596
19169
  const flow = {
18597
19170
  status: resolveHeadlessEventRegistrationStatus(wizard),
18598
19171
  view: resolveHeadlessEventRegistrationView(wizard),
@@ -18697,12 +19270,22 @@ function resolveExistingRegistrationState(wizard) {
18697
19270
  return { tag: "loaded", value: wizard.existingRegistration };
18698
19271
  }
18699
19272
  }
18700
- function resolvePaymentModel(wizard) {
18701
- const selection = toHeadlessPaymentSelection(wizard.paymentSelection);
19273
+ function resolvePaymentModel(wizard, directPaymentOptions) {
19274
+ const internalSelection = normalizeEventRegistrationDirectPaymentSelection({
19275
+ options: directPaymentOptions,
19276
+ selection: wizard.paymentSelection
19277
+ });
19278
+ const selection = toHeadlessPaymentSelection(internalSelection);
19279
+ const directPaymentSelectionState = resolveEventRegistrationDirectPaymentSelection({
19280
+ options: directPaymentOptions,
19281
+ selection: internalSelection
19282
+ });
18702
19283
  if (wizard.step !== "select-payment") {
18703
19284
  return {
18704
19285
  kind: "hidden",
18705
19286
  selection,
19287
+ directPaymentOptions,
19288
+ directPaymentSelectionState,
18706
19289
  stepState: wizard.paymentStepState
18707
19290
  };
18708
19291
  }
@@ -18710,11 +19293,27 @@ function resolvePaymentModel(wizard) {
18710
19293
  return {
18711
19294
  kind: status,
18712
19295
  selection,
19296
+ directPaymentOptions,
19297
+ directPaymentSelectionState,
18713
19298
  stepState: wizard.paymentStepState,
18714
19299
  eligibility: wizard.eligibility,
18715
19300
  eligibilityError: wizard.eligibilityError
18716
19301
  };
18717
19302
  }
19303
+ function resolveHeadlessDirectPaymentOptions(wizard) {
19304
+ const eligibility = wizard.eligibility;
19305
+ if (!eligibility?.eligible || !eligibility.canPayDirectly || !eligibility.price) {
19306
+ return [];
19307
+ }
19308
+ const event = wizard.selectedEvent ?? wizard.preSelectedEvent;
19309
+ return buildEventRegistrationPaymentOptionsViewModel({
19310
+ eventTitle: event?.title ?? "Event",
19311
+ paymentTerms: event?.paymentTerms,
19312
+ totalPriceCents: eligibility.price * wizard.ticketsCount,
19313
+ currency: eligibility.currency,
19314
+ startsAt: wizard.occurrenceContext?.startsAt ?? event?.startsAt
19315
+ }).options;
19316
+ }
18718
19317
 
18719
19318
  // ../blocks/src/system/runtime/hooks/useBookingFormConfig.ts
18720
19319
  import { useEffect as useEffect12, useReducer as useReducer10 } from "react";