@riverbankcms/sdk 0.90.0 → 0.90.1

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