@riverbankcms/sdk 0.164.0 → 0.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-CubPwupc.d.ts → BlocksIslandsHydrator-CPvN6RBW.d.ts} +1 -1
  2. package/dist/_dts/{Page-CDzsagB2.d.ts → Page-rW0xgQCA.d.ts} +18 -256
  3. package/dist/_dts/{SdkPreviewMode-CPRQbRCI.d.ts → SdkPreviewMode-BWZh2WCk.d.ts} +107 -72
  4. package/dist/_dts/{client-CbeYTSry.d.ts → client-D4BXQEZc.d.ts} +5 -1
  5. package/dist/_dts/{content-types--uYRIcIF.d.ts → content-types-MUzta0l9.d.ts} +3 -3
  6. package/dist/_dts/{contracts-DJQYAOsv.d.ts → contracts-Cl9Xh1DO.d.ts} +4 -4
  7. package/dist/_dts/{footerPageOutline-CKkhBwgJ.d.ts → footerPageOutline-4BgLKehl.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata--qd7NCIA.d.ts → generatePageMetadata-BsmJ0qKh.d.ts} +2 -2
  9. package/dist/_dts/{index-wegfy7lf.d.ts → index--qflsCiy.d.ts} +4 -3
  10. package/dist/_dts/{index-CjdIn9-_.d.ts → index-BgJ2aU5c.d.ts} +2 -2
  11. package/dist/_dts/{index-BZE-1azr.d.ts → index-Bmboeb49.d.ts} +2 -2
  12. package/dist/_dts/{index-BpEbwDM7.d.ts → index-DdcwPqQN.d.ts} +4 -4
  13. package/dist/_dts/{index-DriYVLfT.d.ts → index-ahxQCUc7.d.ts} +2 -2
  14. package/dist/_dts/{index-DYQFmf--.d.ts → index-kQ5xkM6X.d.ts} +1 -1
  15. package/dist/_dts/{index-JS8WYgD3.d.ts → index-mMMvLLAJ.d.ts} +2996 -3079
  16. package/dist/_dts/{index-D_pQO-AS.d.ts → index-wbBZ0awa.d.ts} +49398 -48202
  17. package/dist/_dts/{loadContent-DUi94Qfk.d.ts → loadContent-BG5IAV-V.d.ts} +9 -6
  18. package/dist/_dts/resolveBlockData-Cmcle_zV.d.ts +136 -0
  19. package/dist/_dts/{resolvePageContent-JDE0ry6T.d.ts → resolvePageContent-BRJUTFoH.d.ts} +3 -2
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +9 -6
  23. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +20 -0
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +2 -0
  28. package/dist/_dts/sdk/src/data/types.d.ts +54 -0
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +9 -8
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +36 -48
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +3 -0
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +257 -0
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +8 -7
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
  48. package/dist/_dts/{themeAdmission-D_qtGYAT.d.ts → sdk/src/rendering/themeAdmission.d.ts} +3 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  50. package/dist/_dts/sdk/src/server.d.ts +7 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{types-DiciZDrk.d.ts → types-BX3Y-EW3.d.ts} +3 -3
  54. package/dist/_dts/{types-DubJnBnI.d.ts → types-DF54stxv.d.ts} +8 -7
  55. package/dist/_dts/{types-W40f2olO.d.ts → types-DuiHLiPo.d.ts} +2 -2
  56. package/dist/_dts/{validation-BF4_zNkR.d.ts → validation-Bxi0f81D.d.ts} +4 -4
  57. package/dist/client/{BlocksIslandsHydrator-64hFxF02.mjs → BlocksIslandsHydrator-DwiRGtgh.mjs} +31 -24
  58. package/dist/client/{BookingMailingListNote-CSQyFm9J.mjs → BookingMailingListNote-DOWOZYlK.mjs} +2 -2
  59. package/dist/client/{CalendarNavigationChevron-Bvkx8Z7Y.mjs → CalendarNavigationChevron-5a0x0vcC.mjs} +7 -7
  60. package/dist/client/{CheckboxChoice-3PhxDxgR.mjs → CheckboxChoice-CZ-anOqV.mjs} +1 -1
  61. package/dist/client/{DemoBookingPortalAccess-pt2xXBQp.mjs → DemoBookingPortalAccess-B2qLkPRB.mjs} +6 -6
  62. package/dist/client/{DemoPortalSignInLink-Qw780EfW.mjs → DemoPortalSignInLink-B9YrzZt2.mjs} +1 -1
  63. package/dist/client/{EventCalendar.client-DWoboRW5.mjs → EventCalendar.client-BhADnDCg.mjs} +17 -10
  64. package/dist/client/{EventCombined.client-C98ucpcP.mjs → EventCombined.client-jik34zTb.mjs} +8 -8
  65. package/dist/client/{EventEmbeddedCheckoutStep-DHRlFfkp.mjs → EventEmbeddedCheckoutStep-D_14yqAU.mjs} +27 -2
  66. package/dist/client/{EventItem-hrSyTApW.mjs → EventItem-CMKrtkT7.mjs} +33 -12
  67. package/dist/client/{EventListWeekNavigation-C3t7H13W.mjs → EventListWeekNavigation-AGHjxy6C.mjs} +1 -1
  68. package/dist/client/{EventListing.client-Cp11sBX_.mjs → EventListing.client-DZeDM0Qt.mjs} +3 -3
  69. package/dist/client/{EventListing.view-Dd5QHIAf.mjs → EventListing.view-3BBRdNVa.mjs} +70 -15
  70. package/dist/client/{EventRegistrationPayment-ByT88VHR.mjs → EventRegistrationPayment-CpNcpga4.mjs} +108 -11
  71. package/dist/client/{LocationMapActions-BsepG5Vv.mjs → LocationMapActions-D5-H9ooQ.mjs} +2 -2
  72. package/dist/client/{MapDrawingSvg-R4JMT4yd.mjs → MapDrawingSvg-C30geMl-.mjs} +1 -1
  73. package/dist/client/{Page-Dub71o3c.mjs → Page-DNDZLRlB.mjs} +3388 -11530
  74. package/dist/client/{ProtectedSubmitButton-DGbgGvdh.mjs → ProtectedSubmitButton-8DuDw2ag.mjs} +1 -1
  75. package/dist/client/{SpamProtectionWidget-CRsKTQV-.mjs → SpamProtectionWidget-CCF6YLUX.mjs} +5 -3
  76. package/dist/client/{StepIndicator-Bp7MyutT.mjs → StepIndicator-Bin7YR0A.mjs} +3 -3
  77. package/dist/client/{TabBarFragment-C4WJyybx.mjs → TabBarFragment-_IAthZVM.mjs} +1 -1
  78. package/dist/client/{ThemedButton-BGVwNwE-.mjs → ThemedButton-8jUc02mZ.mjs} +64 -2
  79. package/dist/client/{accordion-vCG_JC5t.mjs → accordion-uVqNowRX.mjs} +1 -1
  80. package/dist/client/{altchaProtection-BWchRM3v.mjs → altchaProtection-DjIV9A5n.mjs} +1 -1
  81. package/dist/client/{booking-form.client-CHTbcZJM.mjs → booking-form.client-w-PvyWBv.mjs} +19 -14
  82. package/dist/client/{bookingForm-BxbUbzUr.mjs → bookingForm-DNMojb6A.mjs} +4 -4
  83. package/dist/client/bookings.mjs +6 -6
  84. package/dist/client/{carousel-FM1mkkL0.mjs → carousel-C8kxI3Dm.mjs} +2 -2
  85. package/dist/client/{carousel.client-ChoLiWwD.mjs → carousel.client-BO7sCEpH.mjs} +1 -1
  86. package/dist/client/{cart-BDFhbh9j.mjs → cart-DCxjE3Is.mjs} +3 -3
  87. package/dist/client/{cart.client-x3HOke6T.mjs → cart.client-Ceeng8fB.mjs} +1 -1
  88. package/dist/client/{checkout-BibhwnTd.mjs → checkout-B0EKbeVv.mjs} +3 -3
  89. package/dist/client/{checkout.client-CE4jUi0G.mjs → checkout.client-DtPj3fYk.mjs} +1 -1
  90. package/dist/client/client.mjs +9465 -15
  91. package/dist/client/{context-BNAM7NsW.mjs → context-n6IZigd3.mjs} +8 -6
  92. package/dist/client/cta-CDeAwYoN.mjs +121 -0
  93. package/dist/client/{dateFormatting-QwBSo0hK.mjs → dateFormatting-BWPzdeZE.mjs} +1 -1
  94. package/dist/client/{demoPortalMagicLink-NwKJk6gn.mjs → demoPortalMagicLink-BdXu0fj-.mjs} +1 -1
  95. package/dist/client/{enhanceHeaderSection-D4zqEBDl.mjs → enhanceHeaderSection-VHfv8M6-.mjs} +3 -3
  96. package/dist/client/{event-details.client-jFyFjOIC.mjs → event-details.client-Cfr1_Cj4.mjs} +2 -2
  97. package/dist/client/{event-registration.client-BK_jVv3R.mjs → event-registration.client-BhygihpQ.mjs} +43 -17
  98. package/dist/client/{eventCalendar-DSkzejQh.mjs → eventCalendar-B4XCL9u6.mjs} +4 -4
  99. package/dist/client/{eventCombined-BG-BEaYh.mjs → eventCombined-DVjz4wdf.mjs} +4 -4
  100. package/dist/client/{eventDetails-BhIwXAKe.mjs → eventDetails-B0DA1Nw1.mjs} +2 -2
  101. package/dist/client/{eventListing-DQtyO1Xj.mjs → eventListing-2-xjn2nz.mjs} +4 -4
  102. package/dist/client/{eventRegistration-DRTz8X0M.mjs → eventRegistration-ng4iGo9O.mjs} +4 -4
  103. package/dist/client/{form-GXqjObPC.mjs → form-BeNQiZ2V.mjs} +3 -3
  104. package/dist/client/{form.client-CoKNba2e.mjs → form.client-BFdCKlp7.mjs} +7 -7
  105. package/dist/client/{form.parts-magB_epJ.mjs → form.parts-C7gLK3jh.mjs} +3 -3
  106. package/dist/client/{formatDate-BiloOyjS.mjs → formatDate-CWfelfMt.mjs} +1 -1
  107. package/dist/client/gifting/client.mjs +4 -5
  108. package/dist/client/{headerSection-BMQCPHT3.mjs → headerSection-CalNAShx.mjs} +2 -2
  109. package/dist/client/{mediaAssets-BX-vWwQc.mjs → mediaAssets-DpPauppt.mjs} +1 -1
  110. package/dist/client/{mediaContext-CdqGYlWl.mjs → mediaContext-BLo4NtjP.mjs} +25 -19
  111. package/dist/client/{newsletter-form.client-8orCez1z.mjs → newsletter-form.client-Dq7GHGXU.mjs} +9 -9
  112. package/dist/client/{newsletter-form.parts-D8NgHY_F.mjs → newsletter-form.parts-BSMDYQiS.mjs} +2 -2
  113. package/dist/client/{newsletterForm-BhBNsS3n.mjs → newsletterForm-snzZ4L6i.mjs} +3 -3
  114. package/dist/client/{noop-C2vZse15.mjs → noop-D-RG9eR3.mjs} +399 -169
  115. package/dist/client/portal/client.mjs +13 -14
  116. package/dist/client/{product-detail.client-CQ0k0fbH.mjs → product-detail.client-Gu0INDb7.mjs} +1 -1
  117. package/dist/client/{product-list.client-Xlr1P0x9.mjs → product-list.client-BmH40fNf.mjs} +1 -1
  118. package/dist/client/{productDetail-BsCao6X4.mjs → productDetail-DsPUmJ0z.mjs} +3 -3
  119. package/dist/client/{productList-Cc-PmbEe.mjs → productList-DjGrjOwD.mjs} +3 -3
  120. package/dist/client/{propsDecoder-DikkDJ9x.mjs → propsDecoder-kTVPMnfD.mjs} +4 -4
  121. package/dist/client/{registry.server-BpLZo3bC.mjs → registry.server-CKK_RXZo.mjs} +350 -424
  122. package/dist/client/rendering/client.mjs +29 -28
  123. package/dist/client/rendering/islands.mjs +1 -1
  124. package/dist/client/rendering.mjs +70 -8
  125. package/dist/client/{richText-coerce-WuMYrBm3.mjs → richText-coerce-BcjTX-7h.mjs} +1 -1
  126. package/dist/client/{routeIslandApiConfig-DNx6b07x.mjs → routeIslandApiConfig-CaXesATK.mjs} +1 -1
  127. package/dist/client/{shop-DyXtB5TD.mjs → shop-DLufMauE.mjs} +3 -3
  128. package/dist/client/{shop-commerce-xjWH7-Ym.mjs → shop-commerce-BxYYXLNK.mjs} +12 -12
  129. package/dist/client/{shop-commerce-store-CbBsS1kD.mjs → shop-commerce-store-Dp3Nl5YK.mjs} +1 -1
  130. package/dist/client/{shop.client-QOKqQPgK.mjs → shop.client-CBy9_alG.mjs} +13 -13
  131. package/dist/client/{shop.interactive-BQdm441g.mjs → shop.interactive-BM0NRsFQ.mjs} +265 -24
  132. package/dist/client/{shopShared-CyW6MU48.mjs → shopShared-lS23OQE-.mjs} +2 -2
  133. package/dist/client/site-styles-D8jEPGxA.mjs +3 -0
  134. package/dist/{preview-next/client/ThemedButton-g7NPrsGp.mjs → client/site-styles-DELkUk9s.mjs} +25654 -17259
  135. package/dist/client/spam-protection.mjs +2 -2
  136. package/dist/client/src-DjnxOjXG.mjs +217 -0
  137. package/dist/client/surfaceTransportMarker-BXepAVF6.mjs +152 -0
  138. package/dist/client/{timetableModel-BgdkhRuA.mjs → timetableModel-DzRWikCU.mjs} +157 -139
  139. package/dist/client/types-sF-IrGQr.mjs +633 -0
  140. package/dist/client/{useAvailableSlots-wmdo6uZ8.mjs → useAvailableSlots-C3LphWDX.mjs} +8 -5
  141. package/dist/client/{useBookingNowIso-CUExAee1.mjs → useBookingNowIso-Da-f9iHw.mjs} +1 -1
  142. package/dist/client/{useDiscountApply-BRM-OoTN.mjs → useDiscountApply-SLoWhcen.mjs} +3 -3
  143. package/dist/client/{useDiscountCodeUi-BEIvL31G.mjs → useDiscountCodeUi-D6a2BJij.mjs} +1 -1
  144. package/dist/client/{useEventPagination-Dk3g64we.mjs → useEventPagination-Ccr4TZlm.mjs} +12 -159
  145. package/dist/client/{view-BnaOmrap.mjs → view-8w4GA8rf.mjs} +4 -4
  146. package/dist/client/{view-vhKGFfC3.mjs → view-DAVEoe8A.mjs} +310 -247
  147. package/dist/client/{wizardSteps-xqU4q63H.mjs → wizardSteps-DNpajrAH.mjs} +495 -173
  148. package/dist/preview-next/before-render.mjs +4 -141
  149. package/dist/preview-next/client/ArrangementLookControls-DY5TzhEa.mjs +31197 -0
  150. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-43wIAWr4.mjs → EventEmbeddedCheckoutStep-C_h1cMYm.mjs} +33 -4
  151. package/dist/preview-next/client/{LocationPickerEnvironment-QtSG2Bl-.mjs → LocationPickerEnvironment-D56RD3e_.mjs} +1 -1
  152. package/dist/preview-next/client/{MapLibreEditMap-B-rohNcG.mjs → MapLibreEditMap-DFnyCckr.mjs} +2 -2
  153. package/dist/preview-next/client/PreviewEditorSidebar-DdnhmdFO.mjs +37049 -0
  154. package/dist/preview-next/client/PreviewEditorUI-C7ZmYE33.mjs +1189 -0
  155. package/dist/preview-next/client/PreviewShell-DnO38NaL.mjs +4707 -0
  156. package/dist/preview-next/client/SdkPreviewModeRuntime-D2OtoRMB.mjs +4258 -0
  157. package/dist/preview-next/client/SiteChromeCustomizeButton-eIu2RejJ.mjs +71144 -0
  158. package/dist/preview-next/client/ThemedButton-C0dgGJ5k.mjs +2006 -0
  159. package/dist/preview-next/client/{lucide-react-CA9cpo0P.mjs → lucide-react-CPBCf6QT.mjs} +15 -2
  160. package/dist/preview-next/client/previewAssistantSlot-Bp1AlAxx.mjs +110560 -0
  161. package/dist/preview-next/client/previewChromeSurface-D2cREDJ5.mjs +190 -0
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/sdk-runtime-DK0PUhLL.mjs +5 -0
  164. package/dist/preview-next/client/useAutosaveStatus--Pw8vnef.mjs +138 -0
  165. package/dist/preview-next/client/useBlockCustomizeControls-C1Rl73N4.mjs +2724 -0
  166. package/dist/preview-next/client/useOpenBlockForSetup-CL3842FM.mjs +28 -0
  167. package/dist/preview-next/keepAlive.mjs +27 -4
  168. package/dist/preview-next/middleware.mjs +2 -2
  169. package/dist/preview-next/{route-contract-D5tHZEz5.mjs → route-contract-Bq7SUX3K.mjs} +143 -126
  170. package/dist/preview-next/{session-P1R_ajT7.mjs → session-DU6zpYUQ.mjs} +1 -1
  171. package/dist/preview-next/session.mjs +1 -1
  172. package/dist/server/{Block.shared-Iy7g11iP.mjs → Block.shared-wXr7Iwhs.mjs} +7 -4
  173. package/dist/server/{src-cbbK3Bho.mjs → ThemeScopeCore-BI2mld9R.mjs} +1153 -2523
  174. package/dist/server/accessibleSurfaces-CuN8U_iU.mjs +2102 -0
  175. package/dist/server/{bindings-BVJGgUT0.mjs → bindings-DjdUq9FR.mjs} +2 -3
  176. package/dist/server/{publicProducts-D3Fc5TKk.mjs → client-07UeMDzA.mjs} +2492 -357
  177. package/dist/server/config-validation.mjs +1 -1
  178. package/dist/server/config.mjs +33 -2
  179. package/dist/server/data/dataLoaderContext.mjs +2 -0
  180. package/dist/server/data/resolveBlockData.mjs +2 -0
  181. package/dist/server/data/types.mjs +1 -0
  182. package/dist/server/dataLoaderContext-B3fXA54R.mjs +47 -0
  183. package/dist/server/identity-Bn9OQiT1.mjs +6 -0
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-BuintpdO.mjs → loadContent-ClpaSlBb.mjs} +6 -5
  186. package/dist/server/{loadPage-Dk4wea8M.mjs → loadPage-BwtVqpaA.mjs} +4 -2
  187. package/dist/server/manifest.mjs +1 -1
  188. package/dist/server/media-DnlczCMA.mjs +231 -0
  189. package/dist/server/mode-Cv_TG9gP.mjs +63 -0
  190. package/dist/server/next/middleware.mjs +1 -1
  191. package/dist/server/next/revalidate.mjs +1 -1
  192. package/dist/server/next.mjs +13 -13
  193. package/dist/server/opaqueSurface-3YSDPtDe.mjs +54 -0
  194. package/dist/server/{overrideResolution-BDiQWM7D.mjs → overrideResolution-Du_w3LY4.mjs} +2 -1
  195. package/dist/server/overrides-CD4d-1w7.mjs +177 -0
  196. package/dist/server/page-converter.mjs +243 -91
  197. package/dist/server/pageRenderPlan-BShULdc2.mjs +4055 -0
  198. package/dist/server/{themeAdmission-BdY8lP-K.mjs → pageRuntimeSupport-C4Dh5-mB.mjs} +13 -28
  199. package/dist/server/{overrides-DVemf-GV.mjs → pageShared-HdKFBpaX.mjs} +3594 -1726
  200. package/dist/server/parseThemeForPersistence-CJMrEkze.mjs +52 -0
  201. package/dist/server/{prebuild-DubLNgRH.mjs → prebuild-Cl-bkaMA.mjs} +1 -1
  202. package/dist/server/prebuild.mjs +1 -1
  203. package/dist/server/prefetchBlockData-C4yUmz-r.mjs +786 -0
  204. package/dist/server/publicProducts-W9hDRwjz.mjs +64 -0
  205. package/dist/server/{registry-zjd1P2Dl.mjs → registry-TFPJdGQi.mjs} +20901 -792
  206. package/dist/server/rendering/components/pageShared.mjs +2 -0
  207. package/dist/server/rendering/helpers/loadPage.mjs +2 -0
  208. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +2 -0
  209. package/dist/server/rendering/server.mjs +5 -4
  210. package/dist/server/rendering/themeAdmission.mjs +2 -0
  211. package/dist/server/rendering.mjs +11 -10
  212. package/dist/server/repeaterFields-MIz7r1ez.mjs +9 -0
  213. package/dist/server/{resolveBlockData-CZJ--nH6.mjs → resolveBlockData-OHlOXlOE.mjs} +6 -48
  214. package/dist/server/resolveButtonColourStates-lry2ORwX.mjs +2672 -0
  215. package/dist/server/{richTextSchema-YYc85FX4.mjs → richTextSchema-Euhuj-7V.mjs} +26 -1
  216. package/dist/server/routing.mjs +1 -1
  217. package/dist/server/schema-C2PqHrMo.mjs +2523 -0
  218. package/dist/server/server.mjs +3 -3
  219. package/dist/server/theme-bridge.mjs +1031 -1
  220. package/dist/server/theme.mjs +2 -1
  221. package/dist/server/themeAdmission-DGSAlFUK.mjs +18 -0
  222. package/dist/server/{three-pass-converter-Chnb1XD-.mjs → three-pass-converter-_j2UE2tR.mjs} +1 -1
  223. package/dist/server/validation-CDd6m8Ry.mjs +140 -0
  224. package/dist/server/{validation-CGH-Xs4E.mjs → validation-DIBFZeMB.mjs} +419 -3
  225. package/dist/server/{version-DoOG6F13.mjs → version-DZWZM1H6.mjs} +1 -1
  226. package/dist/styles/index.css +924 -10
  227. package/package.json +39 -1
  228. package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +0 -1
  229. package/dist/client/cta-ChiN1Vgg.mjs +0 -80
  230. package/dist/client/purchase-BMsWpx8y.mjs +0 -894
  231. package/dist/client/schema-DMUkBtIO.mjs +0 -15915
  232. package/dist/client/site-styles-BLHYJ8S7.mjs +0 -12339
  233. package/dist/client/src-VIsPY-kw.mjs +0 -62
  234. package/dist/preview-next/client/PreviewEditorSidebar-C3AQVxQt.mjs +0 -5441
  235. package/dist/preview-next/client/PreviewEditorUI-C-1zDCR_.mjs +0 -756
  236. package/dist/preview-next/client/SdkPreviewModeRuntime-B47yHFL0.mjs +0 -9130
  237. package/dist/preview-next/client/SdkPreviewModeRuntime-C6Rhm2NQ.mjs +0 -3
  238. package/dist/preview-next/client/previewAuthStore-By_zfrS5.mjs +0 -212195
  239. package/dist/preview-next/client/previewChromeSurface-Cjwxv90x.mjs +0 -85
  240. package/dist/preview-next/client/result-BjJUoxUF.mjs +0 -16
  241. package/dist/preview-next/client/sdk-runtime-BG2HYvQj.mjs +0 -4
  242. package/dist/preview-next/client/siteStyleAccess-BiSyYyyr.mjs +0 -14178
  243. package/dist/preview-next/client/spinner-DnWpeDp2.mjs +0 -67
  244. package/dist/preview-next/refresh-contract-uQ6BXgLJ.mjs +0 -25
  245. package/dist/server/bindings-Dgt_0goJ.mjs +0 -17
  246. package/dist/server/client-CiKaE8ms.mjs +0 -2330
  247. package/dist/server/effectiveNavLinkStyle-EDSdd_oK.mjs +0 -11574
  248. package/dist/server/loadPage-BwjncpJf.mjs +0 -2
  249. package/dist/server/prefetchBlockData-Bnbwoe5n.mjs +0 -4156
  250. package/dist/server/schema-BlTWmTSl.mjs +0 -16142
  251. package/dist/server/site-styles-yHytcXIB.mjs +0 -768
  252. package/dist/server/siteChromeOverlayClearance-D0uCNZ7E.mjs +0 -802
@@ -0,0 +1,2523 @@
1
+ import { At as parseThemeColorToken, B as hexColorSchema, H as paletteColorEntries, Nt as parseColorTokenParts, U as paletteColorsFromEntries, bt as surfaceInkDeclarations, jt as themeColorTokenSchema, kt as isThemeColorToken, pt as SURFACE_INK_CSS_VARS, u as tokenOrCssColorValueSchema, w as buttonSystemSchema } from "./resolveButtonColourStates-lry2ORwX.mjs";
2
+ import { i as mediaSchema, n as externalMediaSchema, r as imageMediaSchema, s as videoMediaSchema, t as assetMediaSchema } from "./media-DnlczCMA.mjs";
3
+ import { i as declarationsSchema, n as customCssRulesSchema, r as declarationValueSchema, s as selectorSchema, t as blockCustomCssRulesSchema } from "./validation-CDd6m8Ry.mjs";
4
+ import { z } from "zod";
5
+ //#region ../theme-core/src/site-styles/types.ts
6
+ const arrangementModes = [
7
+ "list",
8
+ "calendar",
9
+ "week"
10
+ ];
11
+ function isArrangementMode(value) {
12
+ return value === "list" || value === "calendar" || value === "week";
13
+ }
14
+ /**
15
+ * Defines a literal-preserving catalog while rejecting top-level extra keys on
16
+ * each entry: `defineExactCatalog<Entry>()([{ ... }])`.
17
+ */
18
+ function defineExactCatalog() {
19
+ return (entries) => entries;
20
+ }
21
+ function asDesignBlockId(value) {
22
+ return brandNonEmptyString(value, "DesignBlockId");
23
+ }
24
+ function asDesignBoundaryId(value) {
25
+ const boundaryId = brandNonEmptyString(value, "DesignBoundaryId");
26
+ if (!boundaryId.startsWith("boundary:")) throw new Error(`DesignBoundaryId must start with "boundary:". Received: ${value}`);
27
+ return boundaryId;
28
+ }
29
+ function asLayoutVariantKey(value) {
30
+ return brandNonEmptyString(value, "LayoutVariantKey");
31
+ }
32
+ function asAppearancePresetId(value) {
33
+ return brandNonEmptyString(value, "AppearancePresetId");
34
+ }
35
+ function asBoundaryOptionId(value) {
36
+ return brandNonEmptyString(value, "BoundaryOptionId");
37
+ }
38
+ function asPageFlowPresetId(value) {
39
+ return brandNonEmptyString(value, "PageFlowPresetId");
40
+ }
41
+ function asSiteStyleId(value) {
42
+ const siteStyleId = brandNonEmptyString(value, "SiteStyleId");
43
+ if (!siteStyleId.startsWith("site-style:")) throw new Error(`SiteStyleId must start with "site-style:". Received: ${value}`);
44
+ return siteStyleId;
45
+ }
46
+ function asDesignSystemTemplateId(value) {
47
+ return brandNonEmptyString(value, "DesignSystemTemplateId");
48
+ }
49
+ function toNonEmptyReadonlyArray(values) {
50
+ const [first, ...rest] = values;
51
+ return first === void 0 ? null : [first, ...rest];
52
+ }
53
+ function requireNonEmptyReadonlyArray(values, message = "Expected a non-empty array.") {
54
+ const result = toNonEmptyReadonlyArray(values);
55
+ if (!result) throw new Error(message);
56
+ return result;
57
+ }
58
+ function makeBoundaryId(previousBlockId, nextBlockId) {
59
+ return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
60
+ }
61
+ function assertNever(value, message = "Unhandled Theme V2 variant") {
62
+ throw new Error(`${message}: ${String(value)}`);
63
+ }
64
+ function brandNonEmptyString(value, label) {
65
+ if (value.length === 0) throw new Error(`${label} must be a non-empty string.`);
66
+ return value;
67
+ }
68
+ /**
69
+ * What a block's own section background field admits, read from its manifest.
70
+ * A site style's surface rule may paint a gradient or a photo; a block whose
71
+ * `_sectionStyles.background` refuses that paint would be dropped at render
72
+ * admission, so the runtime compiler paints the surface's colour equivalent
73
+ * instead (see `compileSectionBackground`).
74
+ */
75
+ const sectionBackgroundPaintValues = [
76
+ "color",
77
+ "gradient",
78
+ "image"
79
+ ];
80
+ const plainFrame = { kind: "plain" };
81
+ function panelFrame(treatment) {
82
+ return {
83
+ kind: "panel",
84
+ treatment
85
+ };
86
+ }
87
+ function flushPanelFrame(options) {
88
+ return {
89
+ kind: "flush-panel",
90
+ treatment: options.treatment ?? "media-panel",
91
+ bleed: options.bleed
92
+ };
93
+ }
94
+ function defineFrameCapability(capability) {
95
+ return capability;
96
+ }
97
+ const tileTreatmentValues = [
98
+ "default",
99
+ "quiet",
100
+ "brand-depth"
101
+ ];
102
+ const eventListTreatmentValues = [
103
+ "plain",
104
+ "lined-panel",
105
+ "ruled-register",
106
+ "editorial-register",
107
+ "dense-index"
108
+ ];
109
+ const introCompositionTreatmentValues = ["editorial-statement", "portrait-bio"];
110
+ const featureCardCompositionTreatmentValues = ["asymmetric-emphasis", "framed-programme"];
111
+ const testimonialsCompositionTreatmentValues = [
112
+ "open-editorial",
113
+ "evergreen-lead",
114
+ "room-and-response",
115
+ "open-floor"
116
+ ];
117
+ /**
118
+ * How an offerings preview arranges its groups. Structure only — the group
119
+ * card surface is the Look's `cardRole` and the site style's card system.
120
+ */
121
+ const offeringsPreviewCompositionTreatmentValues = [
122
+ "paired-feature-cards",
123
+ "open-editorial-columns",
124
+ "joined-programme-panel"
125
+ ];
126
+ const eyebrowTreatmentValues = [
127
+ "plain",
128
+ "accent",
129
+ "pill",
130
+ "accent-pill",
131
+ "pill-bounce",
132
+ "accent-pill-bounce"
133
+ ];
134
+ const visibleHeadingDecorationFamilyValues = ["organic-squiggle", "short-center-rule"];
135
+ const headingDecorationOverrideValues = ["site-default", "off"];
136
+ const headingDecorationColorTokenValues = [
137
+ "text",
138
+ "primary",
139
+ "secondary",
140
+ "accent",
141
+ "border",
142
+ "muted"
143
+ ];
144
+ const noHeadingDecoration = { family: "none" };
145
+ const accordionIconSetValues = [
146
+ "plus",
147
+ "chevron",
148
+ "caret",
149
+ "minimal-cross"
150
+ ];
151
+ const accordionIconColorTokenValues = [
152
+ "text",
153
+ "muted",
154
+ "primary",
155
+ "secondary",
156
+ "accent",
157
+ "current"
158
+ ];
159
+ const accordionIconMotionValues = [
160
+ "none",
161
+ "rotate",
162
+ "swap"
163
+ ];
164
+ function defineBlockDesignCapability(capability) {
165
+ return {
166
+ ...capability,
167
+ kind: "designed",
168
+ looks: capability.looks ?? "not-applicable",
169
+ sectionBackgroundPaints: admittedSectionBackgroundPaints(capability.sectionBackgroundPaints),
170
+ sectionHeights: capability.sectionHeights ?? ["default"],
171
+ imageSurfaceTreatments: capability.imageSurfaceTreatments ?? ["none"],
172
+ imageSurfaceMotions: capability.imageSurfaceMotions ?? ["static"],
173
+ tileTreatments: capability.tileTreatments ?? ["default"],
174
+ eventListTreatments: capability.eventListTreatments ?? ["plain"],
175
+ eyebrowTreatments: capability.eyebrowTreatments ?? ["plain"],
176
+ ...capability.headingDecorations ? { headingDecorations: capability.headingDecorations } : {},
177
+ headingDecorationCapability: capability.headingDecorationCapability ?? { kind: "unsupported" },
178
+ compositions: capability.compositions ?? { kind: "none" },
179
+ ...capability.accordionIconSets ? { accordionIconSets: capability.accordionIconSets } : {}
180
+ };
181
+ }
182
+ /** Absent means the block admits every section background paint. */
183
+ function admittedSectionBackgroundPaints(paints) {
184
+ return paints ?? sectionBackgroundPaintValues;
185
+ }
186
+ //#endregion
187
+ //#region ../theme-core/src/site-styles/rawStyleFields.ts
188
+ const themeV2RuntimeStyleFieldNames = [
189
+ "_frameStyles",
190
+ "_sectionStyles",
191
+ "_containerStyles",
192
+ "_cardStyles"
193
+ ];
194
+ const themeV2BlockSpecificRawStyleFieldNames = [
195
+ "_contentCardStyles",
196
+ "_heroLayoutStyles",
197
+ "_textCardStyles"
198
+ ];
199
+ const themeV2NormalEditorRawStyleFieldNames = [
200
+ ...themeV2RuntimeStyleFieldNames,
201
+ ...themeV2BlockSpecificRawStyleFieldNames,
202
+ "styleGroup"
203
+ ];
204
+ new Set(themeV2NormalEditorRawStyleFieldNames);
205
+ const themeV2CompilerOwnedFieldNames = [...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
206
+ const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
207
+ const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
208
+ const staleTransitionStyleGroupPrefix = "site-style-transition-";
209
+ /**
210
+ * A `styleGroup` in the retired `site-style-transition-*` namespace is residue
211
+ * from the old per-block transition path (issue 1422). Any other value is
212
+ * authored and must survive.
213
+ */
214
+ function isStaleTransitionStyleGroup(value) {
215
+ return typeof value === "string" && value.startsWith(staleTransitionStyleGroupPrefix);
216
+ }
217
+ /** Drops a stale transition `styleGroup`, leaving authored values untouched. */
218
+ function stripStaleTransitionStyleGroup(content) {
219
+ if (!isStaleTransitionStyleGroup(content.styleGroup)) return { ...content };
220
+ const { styleGroup: _stale, ...rest } = content;
221
+ return rest;
222
+ }
223
+ //#endregion
224
+ //#region ../theme-core/src/boxBackgroundSchema.ts
225
+ const boxBackgroundOverlaySchema = z.preprocess(normalizeAuthoringOpacity, z.discriminatedUnion("type", [
226
+ z.object({ type: z.literal("none") }),
227
+ z.object({
228
+ type: z.literal("color"),
229
+ color: tokenOrCssColorValueSchema.nullable().optional(),
230
+ opacity: z.number().min(0).max(1).nullable().optional()
231
+ }),
232
+ z.object({
233
+ type: z.literal("gradient"),
234
+ gradient: z.string().nullable().optional(),
235
+ opacity: z.number().min(0).max(1).nullable().optional()
236
+ })
237
+ ]));
238
+ const commonSchema = z.object({
239
+ contentOwner: z.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
240
+ textColor: tokenOrCssColorValueSchema.nullable().optional(),
241
+ headingColor: tokenOrCssColorValueSchema.nullable().optional(),
242
+ linkColor: tokenOrCssColorValueSchema.nullable().optional(),
243
+ supportingColor: tokenOrCssColorValueSchema.nullable().optional()
244
+ });
245
+ const mediaPresentationSchema = commonSchema.extend({
246
+ opacity: z.preprocess(normalizeOpacity, z.number().min(0).max(1).nullable()).optional(),
247
+ objectFit: z.enum([
248
+ "fill",
249
+ "fit",
250
+ "original",
251
+ "custom"
252
+ ]).nullable().optional(),
253
+ scale: z.string().nullable().optional(),
254
+ position: z.string().nullable().optional(),
255
+ motion: z.enum(["static", "fixed-frame"]).nullable().optional(),
256
+ overflow: z.boolean().nullable().optional(),
257
+ overlay: boxBackgroundOverlaySchema.nullable().optional()
258
+ });
259
+ const boxBackgroundSchema = z.discriminatedUnion("type", [
260
+ commonSchema.extend({
261
+ type: z.literal("color"),
262
+ color: tokenOrCssColorValueSchema.nullable().optional(),
263
+ /**
264
+ * Compiler-owned. The scrim a site-style colour surface lays over media
265
+ * that replaces it (a Look's band meeting an authored photo), sized so the
266
+ * surface's foreground stays legible over any pixel. A colour background
267
+ * never draws it itself; `resolveSectionBackground` moves it onto the
268
+ * merged media background as its overlay.
269
+ */
270
+ mediaScrim: boxBackgroundOverlaySchema.nullable().optional()
271
+ }),
272
+ commonSchema.extend({
273
+ type: z.literal("gradient"),
274
+ gradient: z.string().nullable().optional(),
275
+ gradientPresetId: z.string().min(1).nullable().optional(),
276
+ /** Compiler-owned; see the colour branch. */
277
+ mediaScrim: boxBackgroundOverlaySchema.nullable().optional()
278
+ }),
279
+ mediaPresentationSchema.extend({
280
+ type: z.literal("image"),
281
+ image: imageMediaSchema.nullable().optional()
282
+ }),
283
+ mediaPresentationSchema.extend({
284
+ type: z.literal("video"),
285
+ image: videoMediaSchema.nullable().optional(),
286
+ showVideoOnMobile: z.boolean().nullable().optional()
287
+ })
288
+ ]);
289
+ /** Application rendering sources are admitted separately from saved references. */
290
+ const runtimeBoxBackgroundSchema = z.discriminatedUnion("type", [
291
+ boxBackgroundSchema.options[0],
292
+ boxBackgroundSchema.options[1],
293
+ boxBackgroundSchema.options[2].extend({ image: z.union([
294
+ imageMediaSchema,
295
+ externalMediaSchema.extend({ type: z.literal("image") }),
296
+ assetMediaSchema.extend({ type: z.literal("image") })
297
+ ]).nullable().optional() }),
298
+ boxBackgroundSchema.options[3].extend({ image: z.union([
299
+ videoMediaSchema,
300
+ externalMediaSchema.extend({ type: z.literal("video") }),
301
+ assetMediaSchema.extend({ type: z.literal("video") })
302
+ ]).nullable().optional() })
303
+ ]);
304
+ function normalizeAuthoringOpacity(value) {
305
+ if (!isRecord(value)) return value;
306
+ return {
307
+ ...value,
308
+ opacity: normalizeOpacity(value.opacity)
309
+ };
310
+ }
311
+ function normalizeOpacity(value) {
312
+ return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
313
+ }
314
+ function isRecord(value) {
315
+ return typeof value === "object" && value !== null && !Array.isArray(value);
316
+ }
317
+ //#endregion
318
+ //#region ../theme-core/src/interactive/baseSchema.ts
319
+ /**
320
+ * Shared Base Schemas for Interactive Elements
321
+ *
322
+ * These Zod schemas are shared by buttons and nav links for DRY architecture.
323
+ */
324
+ /**
325
+ * Typography settings shared by buttons and nav links
326
+ */
327
+ const interactiveTypographySchema = z.object({
328
+ /** Font family source */
329
+ typography: z.enum(["body", "heading"]).default("body"),
330
+ /** Font weight */
331
+ fontWeight: z.enum([
332
+ "regular",
333
+ "medium",
334
+ "semibold",
335
+ "bold"
336
+ ]).default("medium"),
337
+ /** Text transform */
338
+ textTransform: z.enum([
339
+ "none",
340
+ "uppercase",
341
+ "capitalize"
342
+ ]).default("none"),
343
+ /** Italic style */
344
+ italic: z.boolean().default(false)
345
+ });
346
+ /**
347
+ * Effect application reference (shared between buttons and nav)
348
+ */
349
+ const effectApplicationSchema = z.object({
350
+ /** Effect preset ID */
351
+ effectId: z.string(),
352
+ /** User-provided customization options */
353
+ options: z.record(z.string(), z.any()).optional()
354
+ });
355
+ /**
356
+ * Effect composition by state (shared pattern)
357
+ */
358
+ const effectCompositionSchema = z.object({
359
+ /** Effects always applied */
360
+ base: z.array(effectApplicationSchema).optional(),
361
+ /** Effects applied on hover */
362
+ hover: z.array(effectApplicationSchema).optional(),
363
+ /** Effects applied on active/pressed */
364
+ active: z.array(effectApplicationSchema).optional(),
365
+ /** Effects applied on focus */
366
+ focus: z.array(effectApplicationSchema).optional()
367
+ });
368
+ const policiesById = {
369
+ "darken-background": "other",
370
+ "lighten-background": "other",
371
+ "fade-background": "other",
372
+ "opacity-reduce": "other",
373
+ "animated-gradient": "other",
374
+ "background-on-hover": "paired-hover",
375
+ "background-on-hover-alpha": "paired-hover",
376
+ "border-glow": "other",
377
+ "drop-shadow": "other",
378
+ "inner-shadow": "other",
379
+ "neumorphic-shadow": "other",
380
+ "outer-glow": "other",
381
+ "retro-3d-shadow": "other",
382
+ "scale-up": "other",
383
+ "scale-down": "other",
384
+ lift: "other",
385
+ "press-down": "other",
386
+ pop: "other",
387
+ "aurora-glow": "other",
388
+ "cosmic-stardust": "other",
389
+ "gradient-border-fill": "other",
390
+ "animated-gradient-border-fill": "other",
391
+ "border-bottom-grow": "other",
392
+ "gradient-text": "other",
393
+ "text-color-change": "text-colour",
394
+ "border-color-change": "other",
395
+ "sketchy-border": "other",
396
+ "inner-dashed-outline": "other",
397
+ "pulse-animation": "other",
398
+ "nav-underline": "underline",
399
+ "nav-frosted-base": "other",
400
+ "nav-frosted-hover": "other",
401
+ "nav-frosted-active": "other"
402
+ };
403
+ function navEffectPolicy(effectId) {
404
+ return policiesById[effectId] ?? null;
405
+ }
406
+ //#endregion
407
+ //#region ../theme-core/src/navigation/types.ts
408
+ /**
409
+ * Navigation Link Style Types
410
+ *
411
+ * Schema and types for composable nav link styling used by header and footer.
412
+ */
413
+ /**
414
+ * Padding preset options for nav links
415
+ */
416
+ const navLinkPaddingSchema = z.enum([
417
+ "none",
418
+ "compact",
419
+ "default"
420
+ ]);
421
+ /**
422
+ * Horizontal padding override for nav links.
423
+ * When set, overrides only the horizontal component of the `padding` preset.
424
+ */
425
+ const navLinkPaddingXSchema = z.enum([
426
+ "none",
427
+ "tight",
428
+ "compact",
429
+ "default",
430
+ "relaxed",
431
+ "spacious"
432
+ ]);
433
+ /**
434
+ * Border radius options for nav links
435
+ */
436
+ const navLinkBorderRadiusSchema = z.enum([
437
+ "none",
438
+ "sm",
439
+ "md",
440
+ "full"
441
+ ]);
442
+ /**
443
+ * Typography size options for nav links.
444
+ */
445
+ const navLinkTextSizeSchema = z.enum([
446
+ "xs",
447
+ "sm",
448
+ "base",
449
+ "lg",
450
+ "xl"
451
+ ]);
452
+ /**
453
+ * Letter spacing options for nav links.
454
+ */
455
+ const navLinkLetterSpacingSchema = z.enum([
456
+ "normal",
457
+ "wide",
458
+ "wider",
459
+ "widest"
460
+ ]);
461
+ /**
462
+ * Optional legibility aid for nav text that floats over uncertain imagery or color.
463
+ */
464
+ const navLinkContrastTreatmentSchema = z.enum(["none", "soft-glow"]);
465
+ /**
466
+ * Nav link style schema
467
+ *
468
+ * Extends interactive typography base with nav-specific settings.
469
+ */
470
+ const navLinkStyleSchema = z.object({
471
+ /** Display name for the style */
472
+ name: z.string().min(1).max(30).optional(),
473
+ /** Typography settings (inherited from interactive base) */
474
+ ...interactiveTypographySchema.shape,
475
+ /** Text color token */
476
+ colorToken: themeColorTokenSchema.default("text"),
477
+ /** Optional text size override */
478
+ textSize: navLinkTextSizeSchema.optional(),
479
+ /** Optional letter spacing override */
480
+ letterSpacing: navLinkLetterSpacingSchema.optional(),
481
+ /** Optional text-only contrast treatment for transparent/overlay navigation */
482
+ contrastTreatment: navLinkContrastTreatmentSchema.optional(),
483
+ /** Hover/active color token (for color-change effects) */
484
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
485
+ /** Padding preset */
486
+ padding: navLinkPaddingSchema.default("compact"),
487
+ /** Horizontal padding override (overrides horizontal component of padding preset) */
488
+ paddingX: navLinkPaddingXSchema.optional(),
489
+ /** Border radius (for capsule/pill styles) */
490
+ borderRadius: navLinkBorderRadiusSchema.default("none"),
491
+ /** Composable effects */
492
+ effects: effectCompositionSchema.optional()
493
+ });
494
+ function navLinkHoverColorCandidate(style) {
495
+ const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
496
+ return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
497
+ }
498
+ function navLinkOwnsHoverForeground(style) {
499
+ return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
500
+ }
501
+ function navLinkOwnsUnderline(style) {
502
+ return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
503
+ }
504
+ /**
505
+ * Padding values for nav link padding presets
506
+ */
507
+ const NAV_LINK_PADDING_MAP = {
508
+ none: "0",
509
+ compact: "0.5rem 1rem",
510
+ default: "0.75rem 1.25rem"
511
+ };
512
+ /**
513
+ * Horizontal padding values for nav link paddingX overrides
514
+ */
515
+ const NAV_LINK_PADDING_X_MAP = {
516
+ none: "0",
517
+ tight: "0.5rem",
518
+ compact: "0.75rem",
519
+ default: "1rem",
520
+ relaxed: "1.5rem",
521
+ spacious: "2rem"
522
+ };
523
+ /**
524
+ * Border radius values for nav link radius presets
525
+ */
526
+ const NAV_LINK_BORDER_RADIUS_MAP = {
527
+ none: "0",
528
+ sm: "0.25rem",
529
+ md: "0.5rem",
530
+ full: "9999px"
531
+ };
532
+ /**
533
+ * Font size values for nav link text size presets
534
+ */
535
+ const NAV_LINK_TEXT_SIZE_MAP = {
536
+ xs: "0.75rem",
537
+ sm: "0.875rem",
538
+ base: "1rem",
539
+ lg: "1.125rem",
540
+ xl: "1.25rem"
541
+ };
542
+ /**
543
+ * Letter spacing values for nav link tracking presets
544
+ */
545
+ const NAV_LINK_LETTER_SPACING_MAP = {
546
+ normal: "0em",
547
+ wide: "0.05em",
548
+ wider: "0.1em",
549
+ widest: "0.15em"
550
+ };
551
+ //#endregion
552
+ //#region ../theme-core/src/site-styles/logoBranding.ts
553
+ const logoTextConfidenceValues = [
554
+ "low",
555
+ "medium",
556
+ "high"
557
+ ];
558
+ const logoAssetShapeValues = [
559
+ "none",
560
+ "horizontal",
561
+ "square",
562
+ "portrait",
563
+ "tall"
564
+ ];
565
+ const logoKindValues = [
566
+ "mark",
567
+ "wordmark",
568
+ "lockup",
569
+ "badge",
570
+ "stacked-wordmark",
571
+ "unknown"
572
+ ];
573
+ const logoDensityValues = [
574
+ "simple",
575
+ "detailed",
576
+ "unknown"
577
+ ];
578
+ const logoContainsTextSchema = z.discriminatedUnion("kind", [
579
+ z.object({
580
+ kind: z.literal("contains-text"),
581
+ confidence: z.enum(logoTextConfidenceValues),
582
+ text: z.string().trim().min(1).max(200).optional()
583
+ }),
584
+ z.object({
585
+ kind: z.literal("no-text"),
586
+ confidence: z.enum(logoTextConfidenceValues)
587
+ }),
588
+ z.object({
589
+ kind: z.literal("unknown"),
590
+ reason: z.enum([
591
+ "analysis-unavailable",
592
+ "unsupported-file",
593
+ "low-confidence"
594
+ ])
595
+ })
596
+ ]);
597
+ const logoAnalysisSourceSchema = z.discriminatedUnion("kind", [
598
+ z.object({ kind: z.literal("none") }),
599
+ z.object({
600
+ kind: z.literal("deterministic"),
601
+ reason: z.enum(["dimensions", "fallback"])
602
+ }),
603
+ z.object({
604
+ kind: z.literal("llm"),
605
+ model: z.literal("gpt-5.4-mini"),
606
+ analyzedAt: z.string().trim().min(1).max(80).optional()
607
+ }),
608
+ z.object({ kind: z.literal("manual-override") })
609
+ ]);
610
+ z.object({
611
+ shape: z.enum(logoAssetShapeValues),
612
+ containsText: logoContainsTextSchema,
613
+ kind: z.enum(logoKindValues),
614
+ density: z.enum(logoDensityValues),
615
+ source: logoAnalysisSourceSchema
616
+ });
617
+ const brandDisplayModeValues = [
618
+ "auto",
619
+ "logo-only",
620
+ "logo-plus-title",
621
+ "title-only"
622
+ ];
623
+ const logoAccommodationPatternValues = [
624
+ "title-only",
625
+ "inline-logo-only",
626
+ "inline-wordmark",
627
+ "inline-mark-with-title",
628
+ "logo-plate",
629
+ "centered-badge",
630
+ "popout-badge",
631
+ "centered-masthead",
632
+ "hero-badge"
633
+ ];
634
+ const logoSizePolicyValues = [
635
+ "auto",
636
+ "compact",
637
+ "standard",
638
+ "generous",
639
+ "display"
640
+ ];
641
+ //#endregion
642
+ //#region ../theme-core/src/header/interactionPalette.ts
643
+ /**
644
+ * The palettes that fill the nav link with a colour on hover and focus. Each
645
+ * one names a background/foreground token pair.
646
+ */
647
+ const headerInteractionPillPaletteValues = [
648
+ "primary",
649
+ "secondary",
650
+ "accent"
651
+ ];
652
+ /**
653
+ * "No pill": a colour change on hover rather than a filled background.
654
+ *
655
+ * The palette step writes nothing (#1318 Phase 4c decision 2), but on a
656
+ * foreground-adaptive style that is not the end of the story: the hover colour
657
+ * is derived from the resolved opening foreground at render time, paired with
658
+ * the resting colour, so `quiet` resolves to a definite colour rather than to
659
+ * whatever brand token the recipe happened to name. See
660
+ * `applyOpeningForeground`.
661
+ *
662
+ * It exists because "a colour change on hover, no filled background" was not
663
+ * expressible in the vocabulary, and it is what
664
+ * `anna-raven-therapy-and-yoga` and `kirtan-lucy` have rendered since before
665
+ * the palette existed. Without it those two rows can only be classified as a
666
+ * conscious visual change.
667
+ */
668
+ const headerInteractionQuietPalette = "quiet";
669
+ const headerInteractionPaletteValues = [...headerInteractionPillPaletteValues, headerInteractionQuietPalette];
670
+ const headerInteractionPaletteSchema = z.enum(headerInteractionPaletteValues);
671
+ z.enum([
672
+ "card",
673
+ "statement",
674
+ "highlight"
675
+ ]);
676
+ const cardVariantRoleValues = ["default", "alternative"];
677
+ const boxlessCardVariantValue = "none";
678
+ const openCardRoleValue = "open";
679
+ /**
680
+ * The roles a site style implements with an actual card variant. `none` is
681
+ * deliberately absent: it is a role value only, never a variant.
682
+ */
683
+ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
684
+ /**
685
+ * The closed role vocabulary Looks and blocks use for surfaced and boxless
686
+ * card choices.
687
+ *
688
+ * - `none` — no site-style card surface; the block's own composition and
689
+ * the author's own card fields govern the item. This is *not*
690
+ * a promise of visible boxlessness: a block whose base class
691
+ * draws a border still draws one. It says the Look is not
692
+ * asking the site style for a card.
693
+ * - `open` — boxless but marked (a rule or accent edge, no enclosing box)
694
+ * - `default` — the site's quiet everyday card
695
+ * - `alternative` — the statement card carrying the site's personality
696
+ */
697
+ const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
698
+ const cardSpacingSchema = z.enum([
699
+ "none",
700
+ "compact",
701
+ "cozy",
702
+ "medium",
703
+ "comfortable",
704
+ "spacious"
705
+ ]);
706
+ /** Per-axis padding, for boxless cards whose inline padding differs from block. */
707
+ const cardSpacingAxesSchema = z.object({
708
+ block: cardSpacingSchema,
709
+ inline: cardSpacingSchema
710
+ });
711
+ /**
712
+ * A card's content padding: one value for both axes, or one per axis. Two
713
+ * fields would let a variant say both and leave the reader to guess, so this is
714
+ * a union.
715
+ */
716
+ const cardSpacingValueSchema = z.union([cardSpacingSchema, cardSpacingAxesSchema]);
717
+ const gradientDirectionSchema = z.enum([
718
+ "to-r",
719
+ "to-l",
720
+ "to-t",
721
+ "to-b",
722
+ "to-tr",
723
+ "to-tl",
724
+ "to-br",
725
+ "to-bl"
726
+ ]);
727
+ z.enum(cardVariantRoleValues);
728
+ const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
729
+ const cardRoleSchema = z.enum(cardRoleValues);
730
+ function isCardVariantRole(value) {
731
+ return typeof value === "string" && cardVariantRoleValues.includes(value);
732
+ }
733
+ function normalizeCardVariantRole(value) {
734
+ return isCardVariantRole(value) ? value : null;
735
+ }
736
+ /** The one untrusted-input boundary for the closed role vocabulary. */
737
+ function normalizeCardRole(value) {
738
+ if (value === "none") return boxlessCardVariantValue;
739
+ if (value === "open") return openCardRoleValue;
740
+ return normalizeCardVariantRole(value);
741
+ }
742
+ const cardBackgroundSchema = z.discriminatedUnion("type", [
743
+ z.object({
744
+ type: z.literal("solid"),
745
+ colorToken: themeColorTokenSchema
746
+ }),
747
+ z.object({
748
+ type: z.literal("gradient"),
749
+ fromToken: themeColorTokenSchema,
750
+ toToken: themeColorTokenSchema,
751
+ direction: gradientDirectionSchema
752
+ }),
753
+ z.object({ type: z.literal("transparent") })
754
+ ]);
755
+ const cardBorderSchema = z.object({
756
+ widthClass: z.string(),
757
+ colorToken: themeColorTokenSchema
758
+ });
759
+ /** Per-corner radius value. `expressive` is a large block-radius multiple. */
760
+ const cardCornerValueSchema = z.enum([
761
+ "square",
762
+ "soft",
763
+ "rounded",
764
+ "pill",
765
+ "expressive"
766
+ ]);
767
+ const cardEdgeSchema = z.enum([
768
+ "left",
769
+ "top",
770
+ "right",
771
+ "bottom"
772
+ ]);
773
+ /** `hairline` (1px) is the widening the boxless `open` role needs. */
774
+ const cardEdgeRuleWidthSchema = z.enum([
775
+ "hairline",
776
+ "thin",
777
+ "medium",
778
+ "thick",
779
+ "heavy"
780
+ ]);
781
+ const cardEdgeRuleLengthSchema = z.enum(["full", "short"]);
782
+ const cardEdgeRuleAlignSchema = z.enum([
783
+ "start",
784
+ "center",
785
+ "end"
786
+ ]);
787
+ /**
788
+ * Decorations are edge rules today. The alias exists so the list can grow into
789
+ * a discriminated union without every call site changing.
790
+ */
791
+ const cardDecorationSchema = z.object({
792
+ edge: cardEdgeSchema,
793
+ colorToken: themeColorTokenSchema,
794
+ width: cardEdgeRuleWidthSchema,
795
+ /** Defaults to `full`. */
796
+ length: cardEdgeRuleLengthSchema.optional(),
797
+ /** Where a `short` rule sits along its edge. Defaults to `start`. */
798
+ align: cardEdgeRuleAlignSchema.optional(),
799
+ /** Opacity applied to `colorToken`, 0–1. Scoped here, not on the token. */
800
+ alpha: z.number().min(0).max(1).optional()
801
+ });
802
+ const cardDecorationsSchema = z.array(cardDecorationSchema).max(2);
803
+ const cardCornerRadiiSchema = z.object({
804
+ topLeft: cardCornerValueSchema.optional(),
805
+ topRight: cardCornerValueSchema.optional(),
806
+ bottomLeft: cardCornerValueSchema.optional(),
807
+ bottomRight: cardCornerValueSchema.optional()
808
+ });
809
+ const cardVariantSchema = z.strictObject({
810
+ id: z.string(),
811
+ name: z.string().min(1).max(20),
812
+ enabled: z.boolean(),
813
+ priority: z.union([
814
+ z.literal(1),
815
+ z.literal(2),
816
+ z.literal(3)
817
+ ]),
818
+ role: surfaceCardRoleSchema,
819
+ background: cardBackgroundSchema,
820
+ spacing: cardSpacingValueSchema,
821
+ foregroundToken: themeColorTokenSchema.optional(),
822
+ shadow: z.object({
823
+ elevation: z.enum([
824
+ "none",
825
+ "low",
826
+ "medium",
827
+ "high"
828
+ ]),
829
+ softness: z.enum([
830
+ "crisp",
831
+ "soft",
832
+ "hard"
833
+ ]).nullable(),
834
+ position: z.enum(["bottom", "bottom-right"]).default("bottom")
835
+ }).optional(),
836
+ corners: z.enum([
837
+ "square",
838
+ "soft",
839
+ "rounded",
840
+ "pill"
841
+ ]).optional(),
842
+ cornerRadii: cardCornerRadiiSchema.optional(),
843
+ border: cardBorderSchema.optional(),
844
+ decorations: cardDecorationsSchema.optional()
845
+ });
846
+ /**
847
+ * A site style saying "these two
848
+ * variants are both the default card" is an authoring error worth rejecting.
849
+ */
850
+ function validateUniqueCardVariantRoles(system, ctx) {
851
+ const declared = /* @__PURE__ */ new Set();
852
+ system.variants.forEach((variant, index) => {
853
+ const role = variant.role;
854
+ if (declared.has(role)) {
855
+ ctx.addIssue({
856
+ code: "custom",
857
+ path: [
858
+ "variants",
859
+ index,
860
+ "role"
861
+ ],
862
+ message: `Card role "${role}" is already implemented by another variant.`
863
+ });
864
+ return;
865
+ }
866
+ declared.add(role);
867
+ });
868
+ }
869
+ const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueCardVariantRoles);
870
+ //#endregion
871
+ //#region ../theme-core/src/fonts/types.ts
872
+ const fontWeightListSchema = z.array(z.number().int().min(100).max(900));
873
+ const fontLoadingSchema = z.object({
874
+ extraBodyFontWeights: fontWeightListSchema.optional(),
875
+ extraHeadingFontWeights: fontWeightListSchema.optional(),
876
+ italicBodyFontWeights: fontWeightListSchema.optional(),
877
+ italicHeadingFontWeights: fontWeightListSchema.optional()
878
+ });
879
+ const fontWidthSchema = z.number().finite().positive();
880
+ /** Curated variable families with a registered width axis, in percentages. */
881
+ const curatedFontWidths = {
882
+ Archivo: {
883
+ min: 62,
884
+ max: 125
885
+ },
886
+ "Instrument Sans": {
887
+ min: 75,
888
+ max: 100
889
+ }
890
+ };
891
+ function getFontWidthRange(family) {
892
+ return curatedFontWidths[(family.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "")];
893
+ }
894
+ //#endregion
895
+ //#region ../theme-core/src/typography/schema.ts
896
+ const typographyStyleSchema = z.object({
897
+ width: fontWidthSchema.optional(),
898
+ family: z.string().min(1),
899
+ weight: z.enum([
900
+ "light",
901
+ "regular",
902
+ "medium",
903
+ "semibold",
904
+ "bold"
905
+ ]),
906
+ letterSpacing: z.enum([
907
+ "tight",
908
+ "normal",
909
+ "loose"
910
+ ]),
911
+ lineHeight: z.enum([
912
+ "normal",
913
+ "relaxed",
914
+ "loose"
915
+ ])
916
+ });
917
+ const bodyTypographyStyleSchema = typographyStyleSchema.extend({ size: z.enum([
918
+ "md",
919
+ "lg",
920
+ "xl"
921
+ ]) });
922
+ const headingSizeSchema = z.enum([
923
+ "xs",
924
+ "sm",
925
+ "md",
926
+ "lg",
927
+ "xl",
928
+ "2xl"
929
+ ]);
930
+ const headingTypographyOverridesSchema = z.object({
931
+ width: fontWidthSchema.nullable().optional(),
932
+ weight: z.enum([
933
+ "light",
934
+ "regular",
935
+ "medium",
936
+ "semibold",
937
+ "bold"
938
+ ]).nullable().optional(),
939
+ letterSpacing: z.enum([
940
+ "tight",
941
+ "normal",
942
+ "loose"
943
+ ]).nullable().optional(),
944
+ size: headingSizeSchema.nullable().optional(),
945
+ lineHeight: z.enum([
946
+ "tight",
947
+ "snug",
948
+ "normal",
949
+ "relaxed",
950
+ "loose"
951
+ ]).nullable().optional(),
952
+ italic: z.boolean().nullable().optional(),
953
+ colorToken: themeColorTokenSchema.nullable().optional()
954
+ });
955
+ const headingTypographyStyleSchema = typographyStyleSchema.extend({
956
+ case: z.enum([
957
+ "uppercase",
958
+ "normal",
959
+ "smallCaps"
960
+ ]).nullable(),
961
+ italic: z.boolean().nullable(),
962
+ colorToken: themeColorTokenSchema.nullable().optional()
963
+ });
964
+ const proseLinkUnderlineStyleSchema = z.enum([
965
+ "solid",
966
+ "dotted",
967
+ "dashed"
968
+ ]);
969
+ const proseLinkUnderlineThicknessSchema = z.enum([
970
+ "auto",
971
+ "fromFont",
972
+ "thin",
973
+ "medium",
974
+ "thick"
975
+ ]);
976
+ const proseLinkUnderlineOffsetSchema = z.enum([
977
+ "auto",
978
+ "tight",
979
+ "normal",
980
+ "loose"
981
+ ]);
982
+ const proseLinkStyleSchema = z.object({
983
+ colorToken: themeColorTokenSchema.optional(),
984
+ hoverColorToken: themeColorTokenSchema.optional(),
985
+ underline: z.boolean().optional(),
986
+ decorationColorToken: themeColorTokenSchema.optional(),
987
+ hoverDecorationColorToken: themeColorTokenSchema.optional(),
988
+ underlineStyle: proseLinkUnderlineStyleSchema.optional(),
989
+ underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
990
+ underlineOffset: proseLinkUnderlineOffsetSchema.optional()
991
+ });
992
+ const typographyScaleSchema = z.enum([
993
+ "compact",
994
+ "balanced",
995
+ "spacious",
996
+ "minorThird",
997
+ "majorThird",
998
+ "perfectFourth"
999
+ ]);
1000
+ const eyebrowTypographyStyleSchema = z.object({
1001
+ width: fontWidthSchema.optional(),
1002
+ family: z.string().min(1),
1003
+ size: z.enum([
1004
+ "sm",
1005
+ "md",
1006
+ "lg"
1007
+ ]).optional(),
1008
+ weight: z.enum([
1009
+ "light",
1010
+ "regular",
1011
+ "medium",
1012
+ "semibold",
1013
+ "bold"
1014
+ ]).optional(),
1015
+ letterSpacing: z.enum([
1016
+ "tight",
1017
+ "normal",
1018
+ "loose",
1019
+ "wide"
1020
+ ]).optional(),
1021
+ case: z.enum(["uppercase", "normal"]).optional()
1022
+ });
1023
+ const typographySchema = z.object({
1024
+ body: bodyTypographyStyleSchema,
1025
+ smallHeading: z.object({
1026
+ family: z.string().min(1),
1027
+ weight: z.enum([
1028
+ "regular",
1029
+ "medium",
1030
+ "semibold",
1031
+ "bold"
1032
+ ])
1033
+ }).optional(),
1034
+ headings: z.object({
1035
+ default: headingTypographyStyleSchema,
1036
+ h1: headingTypographyOverridesSchema,
1037
+ h2: headingTypographyOverridesSchema,
1038
+ h3: headingTypographyOverridesSchema,
1039
+ h4: headingTypographyOverridesSchema.optional(),
1040
+ h5: headingTypographyOverridesSchema.optional(),
1041
+ h6: headingTypographyOverridesSchema.optional()
1042
+ }),
1043
+ scale: typographyScaleSchema,
1044
+ proseLinkStyle: proseLinkStyleSchema.optional(),
1045
+ eyebrow: eyebrowTypographyStyleSchema.optional()
1046
+ }).superRefine((typography, ctx) => {
1047
+ [
1048
+ {
1049
+ style: typography.body,
1050
+ family: typography.body.family,
1051
+ path: ["body", "width"]
1052
+ },
1053
+ {
1054
+ style: typography.headings.default,
1055
+ family: typography.headings.default.family,
1056
+ path: [
1057
+ "headings",
1058
+ "default",
1059
+ "width"
1060
+ ]
1061
+ },
1062
+ ...[
1063
+ "h1",
1064
+ "h2",
1065
+ "h3",
1066
+ "h4",
1067
+ "h5",
1068
+ "h6"
1069
+ ].map((level) => ({
1070
+ style: typography.headings[level],
1071
+ family: typography.headings.default.family,
1072
+ path: [
1073
+ "headings",
1074
+ level,
1075
+ "width"
1076
+ ]
1077
+ })),
1078
+ {
1079
+ style: typography.eyebrow,
1080
+ family: typography.eyebrow?.family ?? "",
1081
+ path: ["eyebrow", "width"]
1082
+ }
1083
+ ].forEach(({ style, family, path }) => {
1084
+ if (style?.width == null) return;
1085
+ const range = getFontWidthRange(family);
1086
+ if (!range || style.width < range.min || style.width > range.max) ctx.addIssue({
1087
+ code: "custom",
1088
+ path,
1089
+ message: range ? `Font width must be between ${range.min}% and ${range.max}% for ${family}.` : `Font width is not declared for ${family}.`
1090
+ });
1091
+ });
1092
+ });
1093
+ const skinTokensSchema = z.partialRecord(z.enum([
1094
+ "radius",
1095
+ "rule",
1096
+ "mark-length",
1097
+ "mark-weight",
1098
+ "plate",
1099
+ "gutter",
1100
+ "copy-gap",
1101
+ "stack-gap",
1102
+ "shadow-offset",
1103
+ "rotation",
1104
+ "wrap",
1105
+ "margin",
1106
+ "rail",
1107
+ "main"
1108
+ ]), z.string()).superRefine((tokens, context) => {
1109
+ Object.entries(tokens).forEach(([name, value]) => {
1110
+ if (!(name === "rail" || name === "main" ? /^(?:[1-9]|1[0-2])$/.test(value) : /^-?(?:0|\d+(?:\.\d+)?(?:px|rem|em|deg|%))$/.test(value))) context.addIssue({
1111
+ code: "custom",
1112
+ path: [name],
1113
+ message: "Invalid skin measurement"
1114
+ });
1115
+ });
1116
+ });
1117
+ function skinTokenCssVars(tokens) {
1118
+ return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
1119
+ }
1120
+ const skinMarksSchema = z.enum(["primary"]);
1121
+ /** The booking bar's paint and shape as applied from an arrangement style (issue 1659); the plain bar when absent. */
1122
+ const skinBookingBarSchema = z.object({
1123
+ token: z.string().refine((value) => {
1124
+ const parts = parseColorTokenParts(value);
1125
+ return parts.kind === "token" && parts.opacityPercent === null && parts.token === value && isThemeColorToken(value);
1126
+ }, "Expected a plain Theme V2 colour token, without spaces or opacity"),
1127
+ shape: z.enum(["edge-to-edge", "field"])
1128
+ });
1129
+ const themeLookMetadataSchema = z.object({
1130
+ name: z.string().min(1).max(30),
1131
+ description: z.string().min(1).max(400),
1132
+ rationale: z.string().min(1).max(400),
1133
+ siteStyleId: z.string().min(1).transform(asSiteStyleId).optional(),
1134
+ skin: z.string().min(1).optional(),
1135
+ skinTokens: skinTokensSchema.optional(),
1136
+ fontLoading: fontLoadingSchema.optional(),
1137
+ /** Which palette colour an arrangement style derives its graphic marks from (D9); accent when absent. */
1138
+ skinMarks: skinMarksSchema.optional(),
1139
+ skinBookingBar: skinBookingBarSchema.optional()
1140
+ });
1141
+ //#endregion
1142
+ //#region ../theme-core/src/palette/colourSeeds.ts
1143
+ /** Owner colours in priority order, validated once at the input boundary. */
1144
+ const colourSeedsSchema = z.union([z.tuple([hexColorSchema]), z.tuple([hexColorSchema, hexColorSchema])]).refine((seeds) => seeds.length === 1 || seeds[0] !== seeds[1], { message: "Choose distinct colours" });
1145
+ //#endregion
1146
+ //#region ../theme-core/src/palette/schema.ts
1147
+ const colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
1148
+ const paletteColorSchema = z.object({
1149
+ name: z.string().min(1),
1150
+ hex: colourHexString
1151
+ });
1152
+ const paletteMetaSchema = z.object({
1153
+ mode: z.enum(["light", "dark"]),
1154
+ seeds: colourSeedsSchema.optional()
1155
+ });
1156
+ const paletteSchema = z.object({
1157
+ colors: z.array(paletteColorSchema),
1158
+ meta: paletteMetaSchema
1159
+ }).transform((palette, ctx) => {
1160
+ const colors = paletteColorsFromEntries(palette.colors);
1161
+ if (!colors.ok) {
1162
+ ctx.addIssue({
1163
+ code: "custom",
1164
+ message: `Invalid complete palette: ${colors.error.kind}`
1165
+ });
1166
+ return z.NEVER;
1167
+ }
1168
+ return {
1169
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
1170
+ name: String(name),
1171
+ hex: String(hex)
1172
+ })),
1173
+ meta: palette.meta
1174
+ };
1175
+ });
1176
+ //#endregion
1177
+ //#region ../theme-core/src/accordions/types.ts
1178
+ /**
1179
+ * Accordion icon styles for expand/collapse indicators
1180
+ */
1181
+ const accordionIconSchema = z.enum([
1182
+ "plus-minus",
1183
+ "chevron",
1184
+ "caret",
1185
+ "arrow",
1186
+ "circle-plus-minus"
1187
+ ]);
1188
+ /**
1189
+ * Accordion configuration for a theme
1190
+ * Single style per theme (no variants needed)
1191
+ */
1192
+ const accordionSystemSchema = z.object({
1193
+ background: z.object({
1194
+ type: z.literal("solid"),
1195
+ colorToken: themeColorTokenSchema
1196
+ }).nullable(),
1197
+ spacing: z.enum([
1198
+ "none",
1199
+ "compact",
1200
+ "cozy",
1201
+ "medium",
1202
+ "comfortable",
1203
+ "spacious"
1204
+ ]),
1205
+ corners: z.enum([
1206
+ "square",
1207
+ "soft",
1208
+ "rounded",
1209
+ "pill"
1210
+ ]).nullable(),
1211
+ border: z.object({
1212
+ widthClass: z.string(),
1213
+ colorToken: themeColorTokenSchema
1214
+ }).nullable(),
1215
+ shadow: z.object({
1216
+ elevation: z.enum([
1217
+ "none",
1218
+ "low",
1219
+ "medium",
1220
+ "high"
1221
+ ]),
1222
+ softness: z.enum([
1223
+ "soft",
1224
+ "crisp",
1225
+ "hard"
1226
+ ]).nullable(),
1227
+ position: z.enum(["bottom", "bottom-right"])
1228
+ }).nullable(),
1229
+ icon: z.object({
1230
+ style: accordionIconSchema,
1231
+ position: z.enum(["left", "right"]),
1232
+ size: z.enum([
1233
+ "sm",
1234
+ "md",
1235
+ "lg"
1236
+ ]),
1237
+ colorToken: themeColorTokenSchema.optional()
1238
+ }),
1239
+ trigger: z.object({
1240
+ textColorToken: themeColorTokenSchema,
1241
+ fontWeight: z.enum([
1242
+ "regular",
1243
+ "medium",
1244
+ "semibold",
1245
+ "bold"
1246
+ ]).nullable(),
1247
+ fontFamily: z.enum(["body", "heading"]).optional(),
1248
+ fontScale: z.enum([
1249
+ "body",
1250
+ "md",
1251
+ "lg"
1252
+ ]).optional(),
1253
+ letterSpacing: z.enum([
1254
+ "normal",
1255
+ "tight",
1256
+ "wide"
1257
+ ]).optional(),
1258
+ textTransform: z.enum(["none", "uppercase"]).optional()
1259
+ }),
1260
+ hover: z.object({
1261
+ backgroundColorToken: themeColorTokenSchema.optional(),
1262
+ textColorToken: themeColorTokenSchema.optional(),
1263
+ borderColorToken: themeColorTokenSchema.optional()
1264
+ }),
1265
+ openState: z.object({
1266
+ backgroundColorToken: themeColorTokenSchema.optional(),
1267
+ triggerColorToken: themeColorTokenSchema.optional(),
1268
+ accent: z.object({
1269
+ edge: z.enum([
1270
+ "left",
1271
+ "top",
1272
+ "bottom"
1273
+ ]),
1274
+ colorToken: themeColorTokenSchema,
1275
+ thickness: z.enum([
1276
+ "thin",
1277
+ "medium",
1278
+ "thick"
1279
+ ])
1280
+ }).optional()
1281
+ }).optional(),
1282
+ content: z.object({ textColorToken: themeColorTokenSchema })
1283
+ });
1284
+ /**
1285
+ * Icon configuration mapping icon styles to Lucide icons and behavior
1286
+ * Used by both CSS generation (for rotation) and component rendering (for icon selection)
1287
+ */
1288
+ const ICON_CONFIG = {
1289
+ "plus-minus": {
1290
+ closedIcon: "Plus",
1291
+ openIcon: "Minus",
1292
+ rotation: 0
1293
+ },
1294
+ "chevron": {
1295
+ closedIcon: "ChevronDown",
1296
+ rotation: 180
1297
+ },
1298
+ "caret": {
1299
+ closedIcon: "ChevronDown",
1300
+ rotation: 180
1301
+ },
1302
+ "arrow": {
1303
+ closedIcon: "ArrowDown",
1304
+ rotation: 180
1305
+ },
1306
+ "circle-plus-minus": {
1307
+ closedIcon: "CirclePlus",
1308
+ openIcon: "CircleMinus",
1309
+ rotation: 0
1310
+ }
1311
+ };
1312
+ /**
1313
+ * Icon size mapping (px values for CSS and Lucide React)
1314
+ */
1315
+ const ICON_SIZE_PX = {
1316
+ sm: "16px",
1317
+ md: "20px",
1318
+ lg: "24px"
1319
+ };
1320
+ /**
1321
+ * Spacing map for accordion content padding
1322
+ */
1323
+ const ACCORDION_SPACING_MAP = {
1324
+ none: "0",
1325
+ compact: "0.75rem",
1326
+ cozy: "1rem",
1327
+ medium: "1.25rem",
1328
+ comfortable: "1.5rem",
1329
+ spacious: "2rem"
1330
+ };
1331
+ /**
1332
+ * Question (trigger) font-size by scale step. Kept as self-contained clamps
1333
+ * rather than the heading-scale CSS vars so question size stays predictable
1334
+ * even when a theme configures very large headings.
1335
+ */
1336
+ const ACCORDION_TRIGGER_FONT_SCALE = {
1337
+ body: "clamp(0.95rem, var(--fs-body), 1.0625rem)",
1338
+ md: "clamp(1.0625rem, 0.98rem + 0.45vw, 1.3rem)",
1339
+ lg: "clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem)"
1340
+ };
1341
+ const ACCORDION_TRIGGER_LETTER_SPACING = {
1342
+ normal: "0",
1343
+ tight: "-0.01em",
1344
+ wide: "0.04em"
1345
+ };
1346
+ const ACCORDION_OPEN_ACCENT_THICKNESS = {
1347
+ thin: "2px",
1348
+ medium: "3px",
1349
+ thick: "4px"
1350
+ };
1351
+ //#endregion
1352
+ //#region ../theme-core/src/inputs/types.ts
1353
+ /**
1354
+ * Input styling configuration for a theme
1355
+ *
1356
+ * Provides comprehensive control over form input appearance including:
1357
+ * - Base styling (background, borders, spacing)
1358
+ * - Label styling
1359
+ * - Focus, error, and disabled states
1360
+ *
1361
+ * Single configuration per theme (no variants needed for inputs)
1362
+ */
1363
+ const inputSystemSchema = z.object({
1364
+ base: z.object({
1365
+ background: z.union([z.object({
1366
+ type: z.literal("solid"),
1367
+ colorToken: themeColorTokenSchema
1368
+ }), z.object({ type: z.literal("transparent") })]),
1369
+ textColorToken: themeColorTokenSchema,
1370
+ border: z.object({
1371
+ widthClass: z.string(),
1372
+ colorToken: themeColorTokenSchema,
1373
+ style: z.enum(["all", "underline"]).optional()
1374
+ }),
1375
+ corners: z.enum([
1376
+ "square",
1377
+ "soft",
1378
+ "rounded",
1379
+ "pill"
1380
+ ]).nullable(),
1381
+ shadow: z.object({
1382
+ elevation: z.enum([
1383
+ "none",
1384
+ "low",
1385
+ "medium"
1386
+ ]),
1387
+ softness: z.enum([
1388
+ "soft",
1389
+ "crisp",
1390
+ "hard"
1391
+ ]).nullable()
1392
+ }).nullable(),
1393
+ spacing: z.enum([
1394
+ "compact",
1395
+ "cozy",
1396
+ "medium",
1397
+ "comfortable"
1398
+ ]),
1399
+ fontSize: z.enum([
1400
+ "sm",
1401
+ "base",
1402
+ "lg"
1403
+ ])
1404
+ }),
1405
+ label: z.object({
1406
+ textColorToken: themeColorTokenSchema,
1407
+ fontWeight: z.enum([
1408
+ "regular",
1409
+ "medium",
1410
+ "semibold",
1411
+ "bold",
1412
+ "black"
1413
+ ]),
1414
+ fontSize: z.enum([
1415
+ "2xs",
1416
+ "xs",
1417
+ "sm",
1418
+ "base"
1419
+ ]),
1420
+ textTransform: z.enum([
1421
+ "none",
1422
+ "uppercase",
1423
+ "lowercase",
1424
+ "capitalize"
1425
+ ]).optional(),
1426
+ letterSpacing: z.enum([
1427
+ "normal",
1428
+ "wide",
1429
+ "wider",
1430
+ "widest"
1431
+ ]).optional(),
1432
+ opacity: z.number().min(.2).max(1).optional()
1433
+ }),
1434
+ focus: z.object({
1435
+ ringColorToken: themeColorTokenSchema,
1436
+ ringWidth: z.enum([
1437
+ "0",
1438
+ "1",
1439
+ "2",
1440
+ "3"
1441
+ ]),
1442
+ borderColorToken: themeColorTokenSchema.optional()
1443
+ }),
1444
+ error: z.object({
1445
+ borderColorToken: themeColorTokenSchema,
1446
+ textColorToken: themeColorTokenSchema
1447
+ }),
1448
+ disabled: z.object({
1449
+ backgroundColorToken: themeColorTokenSchema,
1450
+ textColorToken: themeColorTokenSchema,
1451
+ opacity: z.number().min(.3).max(.7)
1452
+ })
1453
+ });
1454
+ /**
1455
+ * Spacing map for input padding
1456
+ */
1457
+ const INPUT_SPACING_MAP = {
1458
+ compact: "0.5rem 0.75rem",
1459
+ cozy: "0.625rem 0.875rem",
1460
+ medium: "0.75rem 1rem",
1461
+ comfortable: "0.875rem 1.25rem"
1462
+ };
1463
+ /**
1464
+ * Font size map for inputs
1465
+ */
1466
+ const INPUT_FONT_SIZE_MAP = {
1467
+ sm: "0.875rem",
1468
+ base: "1rem",
1469
+ lg: "1.125rem"
1470
+ };
1471
+ /**
1472
+ * Label font size map
1473
+ */
1474
+ const LABEL_FONT_SIZE_MAP = {
1475
+ "2xs": "0.625rem",
1476
+ xs: "0.75rem",
1477
+ sm: "0.875rem",
1478
+ base: "1rem"
1479
+ };
1480
+ /**
1481
+ * Font weight map
1482
+ */
1483
+ const FONT_WEIGHT_MAP = {
1484
+ regular: "400",
1485
+ medium: "500",
1486
+ semibold: "600",
1487
+ bold: "700",
1488
+ black: "800"
1489
+ };
1490
+ //#endregion
1491
+ //#region ../theme-core/src/gradients/types.ts
1492
+ /**
1493
+ * Gradient configuration types and schemas
1494
+ */
1495
+ /**
1496
+ * Gradient color stop
1497
+ */
1498
+ const gradientStopSchema = z.object({
1499
+ color: themeColorTokenSchema,
1500
+ position: z.number().min(0).max(100)
1501
+ });
1502
+ /**
1503
+ * Radial gradient shape. Optional; defaults to `circle` (the historical shape)
1504
+ * so existing radial gradients are byte-identical.
1505
+ *
1506
+ * Named `RadialGradientShape` to avoid clashing with `styles/gradients.ts`'s
1507
+ * `GradientShape` (which names the gradient *kind*: linear/radial/conic).
1508
+ */
1509
+ const radialGradientShapeSchema = z.enum(["circle", "ellipse"]);
1510
+ /**
1511
+ * Gradient configuration.
1512
+ *
1513
+ * `type` is optional and defaults to `'linear'` so gradients persisted without a
1514
+ * type (or with an explicit `'linear'`) render exactly as before. `'radial'` and
1515
+ * `'conic'` are additive kinds:
1516
+ * - linear: `angle` (degrees)
1517
+ * - radial: optional `shape` (circle/ellipse) + `position`
1518
+ * - conic: optional `angle` (from-angle, degrees) + `position`
1519
+ */
1520
+ const gradientConfigSchema = z.object({
1521
+ type: z.enum([
1522
+ "linear",
1523
+ "radial",
1524
+ "conic"
1525
+ ]).default("linear"),
1526
+ angle: z.number().min(0).max(360).optional(),
1527
+ shape: radialGradientShapeSchema.optional(),
1528
+ position: z.string().optional(),
1529
+ stops: z.array(gradientStopSchema).min(2)
1530
+ });
1531
+ const gradientsSchema = z.object({
1532
+ button: z.string().min(1).nullable().optional(),
1533
+ hero: z.string().min(1).nullable().optional(),
1534
+ background: z.string().min(1).nullable().optional()
1535
+ });
1536
+ //#endregion
1537
+ //#region ../theme-core/src/customCss/atRuleValidation.ts
1538
+ /**
1539
+ * CSS At-Rule Validation Schemas
1540
+ *
1541
+ * Zod schemas for validating CSS at-rules.
1542
+ * Blocks @import for security.
1543
+ */
1544
+ /** Valid keyframe offset values - requires % for numeric values */
1545
+ const KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
1546
+ /** Valid animation name (CSS identifier) */
1547
+ const ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
1548
+ /** Blocked at-rules in raw CSS */
1549
+ const BLOCKED_AT_RULES = ["@import", "@charset"];
1550
+ /** Pattern to detect blocked at-rules */
1551
+ const BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
1552
+ /** Rule ID schema - reused from main validation */
1553
+ const ruleIdSchema = z.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
1554
+ /** Nested rule schema for @media and @supports */
1555
+ const nestedRuleSchema = z.object({
1556
+ selector: selectorSchema,
1557
+ declarations: declarationsSchema
1558
+ });
1559
+ /**
1560
+ * Validate keyframe offset is in valid range (0-100%).
1561
+ * Returns true for 'from', 'to', or numeric values 0-100.
1562
+ */
1563
+ function isValidKeyframeOffset(offset) {
1564
+ const trimmed = offset.trim().toLowerCase();
1565
+ if (trimmed === "from" || trimmed === "to") return true;
1566
+ const match = trimmed.match(/^(\d{1,3})%$/);
1567
+ if (!match || match[1] === void 0) return false;
1568
+ const value = parseInt(match[1], 10);
1569
+ return value >= 0 && value <= 100;
1570
+ }
1571
+ /** Keyframe offset validation (0%, 50%, 100%, from, to) */
1572
+ const keyframeOffsetSchema = z.string().transform((offset) => offset.trim()).refine((offset) => KEYFRAME_OFFSET_PATTERN.test(offset), { message: "Invalid keyframe offset. Use percentages (0%, 50%, 100%) or \"from\"/\"to\"" }).refine(isValidKeyframeOffset, { message: "Keyframe offset must be between 0% and 100%" });
1573
+ /** Animation name validation (CSS identifier) */
1574
+ const animationNameSchema = z.string().min(1, "Animation name is required").max(50, "Animation name too long").refine((name) => ANIMATION_NAME_PATTERN.test(name), { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" });
1575
+ /** Single keyframe (offset + declarations) */
1576
+ const keyframeSchema = z.object({
1577
+ offset: keyframeOffsetSchema,
1578
+ declarations: declarationsSchema
1579
+ });
1580
+ /** @keyframes rule schema */
1581
+ const keyframesAtRuleSchema = z.object({
1582
+ id: ruleIdSchema,
1583
+ type: z.literal("keyframes"),
1584
+ name: animationNameSchema,
1585
+ frames: z.array(keyframeSchema).min(1, "At least one keyframe is required")
1586
+ });
1587
+ /** Font-face declarations - uses standard declarations but with font-specific validation */
1588
+ const fontFaceDeclarationsSchema = z.record(z.string().min(1).max(100), declarationValueSchema).refine((decls) => "fontFamily" in decls || "font-family" in decls, { message: "font-family is required in @font-face" });
1589
+ /** @font-face rule schema */
1590
+ const fontFaceAtRuleSchema = z.object({
1591
+ id: ruleIdSchema,
1592
+ type: z.literal("font-face"),
1593
+ declarations: fontFaceDeclarationsSchema
1594
+ });
1595
+ /** Media query string validation */
1596
+ const mediaQuerySchema = z.string().min(1, "Media query is required").max(200, "Media query too long");
1597
+ /** @media rule schema */
1598
+ const mediaAtRuleSchema = z.object({
1599
+ id: ruleIdSchema,
1600
+ type: z.literal("media"),
1601
+ query: mediaQuerySchema,
1602
+ rules: z.array(nestedRuleSchema).min(1, "At least one rule is required")
1603
+ });
1604
+ /** Supports condition string validation */
1605
+ const supportsConditionSchema = z.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
1606
+ /** @supports rule schema */
1607
+ const supportsAtRuleSchema = z.object({
1608
+ id: ruleIdSchema,
1609
+ type: z.literal("supports"),
1610
+ condition: supportsConditionSchema,
1611
+ rules: z.array(nestedRuleSchema).min(1, "At least one rule is required")
1612
+ });
1613
+ /**
1614
+ * Check if raw CSS contains blocked at-rules.
1615
+ */
1616
+ function containsBlockedAtRule(css) {
1617
+ return BLOCKED_AT_RULE_PATTERN.test(css);
1618
+ }
1619
+ /** Raw CSS validation - blocks @import, @charset, must start with @ */
1620
+ const rawCssSchema = z.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine((css) => css.trim().startsWith("@"), { message: "Raw at-rule must start with @" }).refine((css) => !containsBlockedAtRule(css), { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` });
1621
+ /** Raw at-rule schema */
1622
+ const rawAtRuleSchema = z.object({
1623
+ id: ruleIdSchema,
1624
+ type: z.literal("raw"),
1625
+ css: rawCssSchema
1626
+ });
1627
+ /**
1628
+ * Discriminated union schema for all at-rule types.
1629
+ */
1630
+ const customCssAtRuleSchema = z.discriminatedUnion("type", [
1631
+ keyframesAtRuleSchema,
1632
+ fontFaceAtRuleSchema,
1633
+ mediaAtRuleSchema,
1634
+ supportsAtRuleSchema,
1635
+ rawAtRuleSchema
1636
+ ]);
1637
+ /**
1638
+ * Array of at-rules for theme-level styling.
1639
+ */
1640
+ const customCssAtRulesSchema = z.array(customCssAtRuleSchema).optional();
1641
+ //#endregion
1642
+ //#region ../theme-core/src/shared/componentStyles.ts
1643
+ /**
1644
+ * Shared Component Style Schemas
1645
+ *
1646
+ * Reusable schemas for border and shadow styling that can be shared across
1647
+ * themed components (header, buttons, cards, accordions, inputs).
1648
+ *
1649
+ * Design decisions:
1650
+ * - Shadow elevation uses CSS-aligned names (none/sm/md/lg/xl/2xl)
1651
+ * - Shadow softness is controlled globally, not per-component
1652
+ * - Border position is component-specific, not in shared schema
1653
+ */
1654
+ /**
1655
+ * Shared border schema for themed components.
1656
+ * Position is excluded - each component determines its own border position.
1657
+ */
1658
+ const componentBorderSchema = z.object({
1659
+ width: z.enum([
1660
+ "none",
1661
+ "hairline",
1662
+ "thin",
1663
+ "medium",
1664
+ "thick"
1665
+ ]).default("none"),
1666
+ style: z.enum(["solid", "dashed"]).default("solid"),
1667
+ colorToken: themeColorTokenSchema.optional()
1668
+ });
1669
+ /**
1670
+ * Shared shadow schema for themed components.
1671
+ * Softness is inherited from global theme, not configurable per-component.
1672
+ */
1673
+ const componentShadowSchema = z.object({ elevation: z.enum([
1674
+ "none",
1675
+ "sm",
1676
+ "md",
1677
+ "lg",
1678
+ "xl",
1679
+ "2xl"
1680
+ ]).default("sm") });
1681
+ /**
1682
+ * Get border width in pixels for CSS generation.
1683
+ *
1684
+ * Width mapping:
1685
+ * - none: 0
1686
+ * - hairline: 1px
1687
+ * - thin: 2px
1688
+ * - medium: 3px
1689
+ * - thick: 4px
1690
+ */
1691
+ function getComponentBorderWidthPx(width) {
1692
+ return {
1693
+ none: "0",
1694
+ hairline: "1px",
1695
+ thin: "2px",
1696
+ medium: "3px",
1697
+ thick: "4px"
1698
+ }[width];
1699
+ }
1700
+ /**
1701
+ * Get CSS variable reference for shadow elevation.
1702
+ * Returns null for 'none' elevation.
1703
+ *
1704
+ * Maps directly to CSS variables generated by the theme:
1705
+ * - sm: var(--shadow-sm)
1706
+ * - md: var(--shadow-md)
1707
+ * - lg: var(--shadow-lg)
1708
+ * - xl: var(--shadow-xl)
1709
+ * - 2xl: var(--shadow-2xl)
1710
+ */
1711
+ function getComponentShadowVar(elevation) {
1712
+ if (elevation === "none") return null;
1713
+ return `var(--shadow-${elevation})`;
1714
+ }
1715
+ //#endregion
1716
+ //#region ../theme-core/src/header/legacyHeaderVariant.ts
1717
+ /**
1718
+ * The header variants the system actually renders.
1719
+ *
1720
+ * Each one has a layout row in the site-header block and a paint target in
1721
+ * `paintTargets.ts`. This is the canonical list: the block transform's variant
1722
+ * class allowlist and the AI theme generator's enum both derive from it, so
1723
+ * they cannot drift.
1724
+ */
1725
+ const headerVariantValues = [
1726
+ "classic",
1727
+ "centered",
1728
+ "floating"
1729
+ ];
1730
+ z.enum(headerVariantValues);
1731
+ /**
1732
+ * Header variant spellings that were once authorable but no longer name a
1733
+ * layout of their own, and the variant they read as now.
1734
+ *
1735
+ * `transparent` was an overlay header with no CSS of its own: everything it
1736
+ * did (transparent root background, overlay content flow) is what `floating`
1737
+ * already does, and it had zero persisted usage in production or locally when
1738
+ * it was retired. It survives here as a one-boundary alias so a theme authored
1739
+ * against the old vocabulary still parses.
1740
+ *
1741
+ * This matters because the theme schema is strict and has no per-field
1742
+ * `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
1743
+ * *whole* theme, which silently swaps the site's theme for
1744
+ * `modernMinimalTheme`. Aliasing here keeps that from happening.
1745
+ */
1746
+ const legacyHeaderVariants = { transparent: "floating" };
1747
+ const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
1748
+ /**
1749
+ * The header variant boundary for themes that go through `themeSchema`:
1750
+ * canonical variants pass through, legacy spellings normalize to the variant
1751
+ * they meant, everything else fails the parse.
1752
+ *
1753
+ * Deliberately an enum plus a transform rather than a `z.preprocess`, so the
1754
+ * schema's *input* type stays an accurate union (the legacy spelling is still
1755
+ * accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
1756
+ * `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
1757
+ * would leak straight into a public type.
1758
+ *
1759
+ * Persisted runtime themes are admitted through `parseThemeForPersistence`
1760
+ * before reaching consumers, so legacy spellings normalize at that boundary.
1761
+ */
1762
+ const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
1763
+ const BREAKPOINT_LG = 1024;
1764
+ const BREAKPOINT_XL = 1280;
1765
+ const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
1766
+ function mqUp(px) {
1767
+ return `(min-width: ${px}px)`;
1768
+ }
1769
+ function mqDown(px) {
1770
+ return `(max-width: ${px}px)`;
1771
+ }
1772
+ function mqBetween(minPx, maxPx) {
1773
+ return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
1774
+ }
1775
+ const MQ_SM_UP = mqUp(640);
1776
+ const MQ_MD_UP = mqUp(768);
1777
+ const MQ_LG_UP = mqUp(BREAKPOINT_LG);
1778
+ mqUp(BREAKPOINT_XL);
1779
+ const MQ_SM_DOWN = mqDown(639);
1780
+ const MQ_MD_DOWN = mqDown(767);
1781
+ mqDown(BREAKPOINT_LG_DOWN);
1782
+ const MQ_TABLET_ONLY = mqBetween(640, BREAKPOINT_LG_DOWN);
1783
+ mqDown(640);
1784
+ mqDown(768);
1785
+ //#endregion
1786
+ //#region ../theme-core/src/header/paintTargets.ts
1787
+ /** Resolve the element that owns the visible header surface for each layout. */
1788
+ function getHeaderPaintTargets(variant, themeId, state = "base") {
1789
+ const scope = `:where([data-theme-scope="${themeId}"])`;
1790
+ const scrolledRoot = state === "scrolled" ? ".header-root.header-scrolled " : "";
1791
+ if (variant === "floating") {
1792
+ if (state === "scrolled") {
1793
+ const desktopOwner = `${scope} ${scrolledRoot}.header-floating-container`;
1794
+ const mobileOwner = `${scope} ${scrolledRoot}.header-mobile-bar`;
1795
+ return [{
1796
+ kind: "viewport-band",
1797
+ clipSelector: `${scope}:has(.header-root.header-scrolled)`,
1798
+ ownerSelector: desktopOwner,
1799
+ selector: `${desktopOwner}::before`,
1800
+ mediaQuery: MQ_MD_UP,
1801
+ extent: {
1802
+ top: {
1803
+ customProperty: "--rb-header-floating-top-gap",
1804
+ value: "1rem",
1805
+ ownerProperty: "top"
1806
+ },
1807
+ bottom: {
1808
+ customProperty: "--rb-header-floating-bottom-extension",
1809
+ value: "0.75rem"
1810
+ }
1811
+ },
1812
+ ownerNeedsPositioning: false
1813
+ }, {
1814
+ kind: "viewport-band",
1815
+ clipSelector: `${scope}:has(.header-root.header-scrolled)`,
1816
+ ownerSelector: mobileOwner,
1817
+ selector: `${mobileOwner}::before`,
1818
+ mediaQuery: MQ_MD_DOWN,
1819
+ extent: {
1820
+ top: {
1821
+ customProperty: "--rb-header-floating-top-gap",
1822
+ value: "0.75rem",
1823
+ ownerProperty: "margin-top"
1824
+ },
1825
+ bottom: {
1826
+ customProperty: "--rb-header-floating-bottom-extension",
1827
+ value: "0.75rem"
1828
+ }
1829
+ },
1830
+ ownerNeedsPositioning: true
1831
+ }];
1832
+ }
1833
+ return [{
1834
+ kind: "element-box",
1835
+ selector: `${scope} ${scrolledRoot}.header-floating-container`,
1836
+ mediaQuery: MQ_MD_UP
1837
+ }, {
1838
+ kind: "element-box",
1839
+ selector: `${scope} ${scrolledRoot}.header-mobile-bar`,
1840
+ mediaQuery: MQ_MD_DOWN
1841
+ }];
1842
+ }
1843
+ return [{
1844
+ kind: "element-box",
1845
+ selector: `${scope} .header-root${state === "scrolled" ? ".header-scrolled" : ""}::before`,
1846
+ pseudoElement: "inset"
1847
+ }];
1848
+ }
1849
+ function renderHeaderPaintTargetRules(targets, rules) {
1850
+ return targets.map((target) => {
1851
+ const block = renderHeaderPaintTargetRule(target, rules);
1852
+ return target.mediaQuery ? `@media ${target.mediaQuery} {\n${block}\n}` : block;
1853
+ }).join("\n");
1854
+ }
1855
+ function renderHeaderPaintTargetRule(target, rules) {
1856
+ switch (target.kind) {
1857
+ case "element-box": {
1858
+ const pseudoElementSetup = target.pseudoElement === "inset" ? [
1859
+ "content: \"\";",
1860
+ "position: absolute;",
1861
+ "inset: 0;",
1862
+ "pointer-events: none;",
1863
+ "border-radius: inherit;",
1864
+ "z-index: -1;"
1865
+ ] : [];
1866
+ return `${target.pseudoElement === "inset" ? headerPaintOwnerInks(target.selector.replace(/::before$/, ""), rules) : ""}${target.selector} {\n ${[...pseudoElementSetup, ...rules].join("\n ")}\n}`;
1867
+ }
1868
+ case "viewport-band": return renderViewportBandPaint(target, rules);
1869
+ }
1870
+ }
1871
+ function headerInkRules(rules) {
1872
+ return rules.filter((rule) => Object.values(SURFACE_INK_CSS_VARS).some((variable) => rule.startsWith(`${variable}:`)));
1873
+ }
1874
+ function headerPaintOwnerInks(selector, rules) {
1875
+ const inks = headerInkRules(rules);
1876
+ return inks.length === 0 ? "" : `${selector} {\n ${inks.join("\n ")}\n}\n`;
1877
+ }
1878
+ /** Viewport paint stays on its pseudo-element; inherited ink belongs to the content owner. */
1879
+ function renderViewportBandPaint(target, rules) {
1880
+ const { top, bottom } = target.extent;
1881
+ const ownerRules = [
1882
+ `${top.customProperty}: ${top.value};`,
1883
+ `${bottom.customProperty}: ${bottom.value};`,
1884
+ `${top.ownerProperty}: var(${top.customProperty});`,
1885
+ ...target.ownerNeedsPositioning ? ["position: relative;"] : [],
1886
+ "isolation: isolate;",
1887
+ "background: none;",
1888
+ "backdrop-filter: none;",
1889
+ "-webkit-backdrop-filter: none;",
1890
+ "border: 0;",
1891
+ "box-shadow: none;",
1892
+ ...headerInkRules(rules)
1893
+ ];
1894
+ const bandRules = [
1895
+ "content: \"\";",
1896
+ "position: absolute;",
1897
+ `top: calc(-1 * var(${top.customProperty}));`,
1898
+ `bottom: calc(-1 * var(${bottom.customProperty}));`,
1899
+ "left: 50%;",
1900
+ "width: 100vw;",
1901
+ "transform: translateX(-50%);",
1902
+ "pointer-events: none;",
1903
+ "border-radius: 0;",
1904
+ "z-index: -1;",
1905
+ ...rules
1906
+ ];
1907
+ return `${target.clipSelector} {\n overflow-x: clip;\n}\n${target.ownerSelector} {\n ${ownerRules.join("\n ")}\n}\n${target.selector} {\n ${bandRules.join("\n ")}\n}`;
1908
+ }
1909
+ //#endregion
1910
+ //#region ../theme-core/src/header/scrollTreatment.ts
1911
+ const headerScrollTreatmentSchema = z.discriminatedUnion("kind", [z.object({
1912
+ kind: z.literal("contrast-glass"),
1913
+ backgroundTone: z.enum(["light", "dark"])
1914
+ })]).optional();
1915
+ const CONTRAST_GLASS_BLUR = "blur(12px)";
1916
+ function generateMobileOverlayBackdropFilterFix(themeId, variant) {
1917
+ const root = `:where([data-theme-scope="${themeId}"]) .header-root:has([data-nav-mobile-overlay][aria-hidden="false"])`;
1918
+ return `\n${(variant === "floating" ? [`${root} .header-mobile-bar`, `${root} .header-mobile-bar::before`] : [`${root}::before`]).join(",\n")} {\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n}\n`;
1919
+ }
1920
+ function generateHeaderScrollTreatmentStyles(treatment, themeId, variant, surfaceRules = []) {
1921
+ if (!treatment) return "";
1922
+ switch (treatment.kind) {
1923
+ case "contrast-glass": {
1924
+ const backgroundChannels = treatment.backgroundTone === "dark" ? "0 0 0" : "255 255 255";
1925
+ return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
1926
+ `background-color: rgb(${backgroundChannels} / 0.60);`,
1927
+ `backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
1928
+ `-webkit-backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
1929
+ ...surfaceRules,
1930
+ ...surfaceInkDeclarations({ kind: "reset" }).map((rule) => rule.replace(";", " !important;"))
1931
+ ]);
1932
+ }
1933
+ }
1934
+ }
1935
+ //#endregion
1936
+ //#region ../theme-core/src/header/containerSchema.ts
1937
+ const headerContainerSchema = z.object({
1938
+ rounded: z.enum([
1939
+ "none",
1940
+ "sm",
1941
+ "md",
1942
+ "lg",
1943
+ "xl",
1944
+ "2xl"
1945
+ ]).default("xl"),
1946
+ border: z.boolean().default(true),
1947
+ shadow: z.boolean().default(true),
1948
+ padding: z.enum([
1949
+ "sm",
1950
+ "md",
1951
+ "lg"
1952
+ ]).default("md"),
1953
+ tint: z.string().nullable().optional(),
1954
+ mobileSheet: z.literal("inset").optional(),
1955
+ opacity: z.number().min(0).max(1).default(.12)
1956
+ }).optional();
1957
+ //#endregion
1958
+ //#region ../theme-core/src/schema.ts
1959
+ const axesSchema = z.object({
1960
+ tone: z.enum([
1961
+ "minimal",
1962
+ "classic",
1963
+ "bold"
1964
+ ]),
1965
+ energy: z.enum(["calm", "vibrant"]),
1966
+ density: z.enum([
1967
+ "airy",
1968
+ "regular",
1969
+ "compact"
1970
+ ]),
1971
+ mediaBias: z.enum([
1972
+ "text",
1973
+ "media",
1974
+ "mixed"
1975
+ ]),
1976
+ conversionBias: z.enum([
1977
+ "low",
1978
+ "med",
1979
+ "high"
1980
+ ]),
1981
+ motion: z.enum([
1982
+ "subtle",
1983
+ "standard",
1984
+ "expressive"
1985
+ ])
1986
+ });
1987
+ const semanticSpacingSchema = z.enum([
1988
+ "none",
1989
+ "compact",
1990
+ "cozy",
1991
+ "medium",
1992
+ "comfortable",
1993
+ "spacious"
1994
+ ]);
1995
+ const boxRoundedSchema = z.enum([
1996
+ "none",
1997
+ "sm",
1998
+ "md",
1999
+ "lg",
2000
+ "xl",
2001
+ "2xl",
2002
+ "full"
2003
+ ]);
2004
+ const noHeadingDecorationSchema = z.strictObject({ family: z.literal("none") });
2005
+ const visibleHeadingDecorationSchema = z.strictObject({
2006
+ family: z.enum(visibleHeadingDecorationFamilyValues),
2007
+ colorToken: z.enum(headingDecorationColorTokenValues).optional()
2008
+ });
2009
+ const headingDecorationSchema = z.union([noHeadingDecorationSchema, visibleHeadingDecorationSchema]);
2010
+ const headingDecorationOverrideSchema = z.enum(headingDecorationOverrideValues);
2011
+ const accordionIconTreatmentSchema = z.object({
2012
+ iconSet: z.enum(accordionIconSetValues),
2013
+ colorToken: z.enum(accordionIconColorTokenValues),
2014
+ openColorToken: z.enum(accordionIconColorTokenValues).optional(),
2015
+ motion: z.enum(accordionIconMotionValues)
2016
+ });
2017
+ const sectionStylesOverrideSchema = z.object({
2018
+ background: boxBackgroundSchema.nullable().optional(),
2019
+ spacing: semanticSpacingSchema.nullable().optional(),
2020
+ minHeight: z.enum([
2021
+ "none",
2022
+ "banner",
2023
+ "hero",
2024
+ "immersive"
2025
+ ]).nullable().optional(),
2026
+ tileTreatment: z.enum(tileTreatmentValues).nullable().optional(),
2027
+ eventListTreatment: z.enum(eventListTreatmentValues).nullable().optional(),
2028
+ eyebrowTreatment: z.enum(eyebrowTreatmentValues).nullable().optional(),
2029
+ headingDecoration: headingDecorationSchema.nullable().optional(),
2030
+ headingDecorationOverride: headingDecorationOverrideSchema.nullable().optional(),
2031
+ accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
2032
+ });
2033
+ const containerStylesOverrideSchema = z.object({
2034
+ background: boxBackgroundSchema.nullable().optional(),
2035
+ spacing: semanticSpacingSchema.nullable().optional(),
2036
+ raised: z.boolean().nullable().optional(),
2037
+ rounded: boxRoundedSchema.nullable().optional(),
2038
+ fullWidth: z.boolean().nullable().optional()
2039
+ });
2040
+ const cardBorderOverrideSchema = z.object({
2041
+ enabled: z.boolean().nullable().optional(),
2042
+ width: z.enum([
2043
+ "none",
2044
+ "1",
2045
+ "2",
2046
+ "3"
2047
+ ]).nullable().optional(),
2048
+ colorToken: themeColorTokenSchema.nullable().optional()
2049
+ });
2050
+ const cardStylesOverrideSchema = z.object({
2051
+ background: boxBackgroundSchema.nullable().optional(),
2052
+ border: cardBorderOverrideSchema.nullable().optional(),
2053
+ spacing: semanticSpacingSchema.nullable().optional(),
2054
+ raised: z.boolean().nullable().optional(),
2055
+ rounded: boxRoundedSchema.nullable().optional(),
2056
+ role: cardRoleSchema.nullable().optional()
2057
+ });
2058
+ const blockStyleOverridesSchema = z.object({
2059
+ sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
2060
+ containerStyles: containerStylesOverrideSchema.nullable().optional(),
2061
+ cardStyles: cardStylesOverrideSchema.nullable().optional()
2062
+ });
2063
+ const blockThemeOverrideSchema = z.object({
2064
+ typography: z.object({ proseLinkStyle: proseLinkStyleSchema.optional() }).optional(),
2065
+ styles: blockStyleOverridesSchema.optional()
2066
+ });
2067
+ const spaceSchema = z.enum([
2068
+ "comfortable",
2069
+ "standard",
2070
+ "dense"
2071
+ ]);
2072
+ const corners = z.enum([
2073
+ "square",
2074
+ "soft",
2075
+ "rounded",
2076
+ "pill"
2077
+ ]);
2078
+ const shadow = z.object({
2079
+ elevation: z.enum([
2080
+ "none",
2081
+ "low",
2082
+ "medium",
2083
+ "high"
2084
+ ]),
2085
+ softness: z.enum([
2086
+ "crisp",
2087
+ "soft",
2088
+ "hard"
2089
+ ]).nullable(),
2090
+ position: z.enum(["bottom", "bottom-right"]).default("bottom"),
2091
+ colorToken: themeColorTokenSchema.optional()
2092
+ });
2093
+ const border = z.object({
2094
+ width: z.enum([
2095
+ "none",
2096
+ "hairline",
2097
+ "thin",
2098
+ "thick"
2099
+ ]),
2100
+ style: z.enum(["solid", "dashed"])
2101
+ });
2102
+ const motion = z.object({
2103
+ level: z.enum([
2104
+ "off",
2105
+ "low",
2106
+ "medium",
2107
+ "high"
2108
+ ]),
2109
+ easing: z.enum([
2110
+ "standard",
2111
+ "snappy",
2112
+ "gentle"
2113
+ ]).nullable()
2114
+ });
2115
+ z.object({ shape: corners });
2116
+ const inputStyle = z.object({
2117
+ shape: corners,
2118
+ border: z.enum([
2119
+ "subtle",
2120
+ "defined",
2121
+ "underline"
2122
+ ]),
2123
+ focus: z.enum([
2124
+ "glow",
2125
+ "ring",
2126
+ "underline"
2127
+ ]),
2128
+ label: z.enum(["inside", "above"])
2129
+ });
2130
+ const headerPositioning = z.enum([
2131
+ "static",
2132
+ "sticky",
2133
+ "fixed"
2134
+ ]);
2135
+ const headerNavStyle = z.enum([
2136
+ "minimal",
2137
+ "underline",
2138
+ "underline-grow",
2139
+ "capsule",
2140
+ "scale",
2141
+ "frosted",
2142
+ "solid"
2143
+ ]);
2144
+ const navFontWeight = z.enum([
2145
+ "regular",
2146
+ "medium",
2147
+ "semibold",
2148
+ "bold"
2149
+ ]);
2150
+ const headerMaxWidth = z.enum(["container", "full"]);
2151
+ const headerBorderSchema = componentBorderSchema.extend({ position: z.enum([
2152
+ "bottom",
2153
+ "top",
2154
+ "both",
2155
+ "none"
2156
+ ]).default("bottom") }).optional();
2157
+ const logoStyleSchema = z.object({
2158
+ fontFamily: z.enum(["heading", "body"]).default("heading"),
2159
+ letterSpacing: z.enum([
2160
+ "normal",
2161
+ "wide",
2162
+ "wider",
2163
+ "widest"
2164
+ ]).default("normal"),
2165
+ gradient: z.boolean().default(false),
2166
+ brandDisplay: z.enum(brandDisplayModeValues).optional(),
2167
+ size: z.enum(logoSizePolicyValues).optional(),
2168
+ accommodation: z.enum(logoAccommodationPatternValues).optional()
2169
+ }).optional();
2170
+ const headerLogoTextSchema = z.object({
2171
+ mobileWrapLines: z.union([z.literal(1), z.literal(2)]).optional(),
2172
+ mobileMaxWidth: z.enum([
2173
+ "xs",
2174
+ "sm",
2175
+ "md"
2176
+ ]).optional(),
2177
+ hideOnShrink: z.boolean().optional()
2178
+ }).optional();
2179
+ const dropdownStyleSchema = z.object({
2180
+ background: themeColorTokenSchema.default("surface"),
2181
+ textColor: themeColorTokenSchema.default("text"),
2182
+ borderColor: themeColorTokenSchema.nullable().default("border"),
2183
+ shadow: z.enum([
2184
+ "none",
2185
+ "sm",
2186
+ "md",
2187
+ "lg"
2188
+ ]).default("md"),
2189
+ borderRadius: z.enum([
2190
+ "none",
2191
+ "sm",
2192
+ "md",
2193
+ "lg"
2194
+ ]).default("md"),
2195
+ surfaceTreatment: z.discriminatedUnion("kind", [z.object({ kind: z.literal("solid") }), z.object({
2196
+ kind: z.literal("frosted"),
2197
+ tone: z.enum(["fixed", "opening"]),
2198
+ opacity: z.number().min(0).max(1),
2199
+ blur: z.enum(["sm", "md"])
2200
+ })]).optional(),
2201
+ hoverBackground: themeColorTokenSchema.nullable().optional(),
2202
+ hoverTextColor: themeColorTokenSchema.nullable().optional(),
2203
+ textTransform: z.enum([
2204
+ "none",
2205
+ "uppercase",
2206
+ "capitalize"
2207
+ ]).default("none"),
2208
+ letterSpacing: z.enum([
2209
+ "normal",
2210
+ "wide",
2211
+ "wider"
2212
+ ]).default("normal"),
2213
+ fontWeight: z.enum([
2214
+ "regular",
2215
+ "medium",
2216
+ "semibold",
2217
+ "bold"
2218
+ ]).optional(),
2219
+ textSize: z.enum([
2220
+ "xs",
2221
+ "sm",
2222
+ "base",
2223
+ "lg"
2224
+ ]).optional()
2225
+ }).optional();
2226
+ /**
2227
+ * CTA button gap (left margin) for desktop header.
2228
+ * Controls the spacing between nav links and the CTA button.
2229
+ */
2230
+ const headerCtaGapSchema = z.enum([
2231
+ "none",
2232
+ "tight",
2233
+ "compact",
2234
+ "default",
2235
+ "relaxed",
2236
+ "spacious"
2237
+ ]);
2238
+ const headerCtaTreatmentSchema = z.enum([
2239
+ "default",
2240
+ "primary",
2241
+ "secondary",
2242
+ "inverted",
2243
+ "outline",
2244
+ "ghost"
2245
+ ]);
2246
+ const navContainerSchema = z.object({
2247
+ type: z.enum([
2248
+ "none",
2249
+ "pill",
2250
+ "glass"
2251
+ ]).default("none"),
2252
+ tint: z.string().nullable().optional(),
2253
+ opacity: z.number().min(0).max(1).default(.15)
2254
+ }).default({
2255
+ type: "none",
2256
+ tint: null,
2257
+ opacity: .15
2258
+ });
2259
+ const headerBackgroundSchema = z.object({
2260
+ type: z.enum([
2261
+ "color",
2262
+ "gradient",
2263
+ "image"
2264
+ ]),
2265
+ contentOwner: z.literal(siteChromeBackgroundOverrideOwner).optional(),
2266
+ color: tokenOrCssColorValueSchema.nullable().optional(),
2267
+ gradient: gradientConfigSchema.nullable().optional(),
2268
+ image: mediaSchema.nullable().optional(),
2269
+ textColor: tokenOrCssColorValueSchema.nullable().optional()
2270
+ });
2271
+ const headerSchema = z.object({
2272
+ variant: headerVariantWithLegacyAliasSchema,
2273
+ positioning: headerPositioning,
2274
+ shrinkOnScroll: z.boolean(),
2275
+ maxWidth: headerMaxWidth.default("container"),
2276
+ scrollTreatment: headerScrollTreatmentSchema,
2277
+ background: headerBackgroundSchema.default({
2278
+ type: "color",
2279
+ color: "surface"
2280
+ }),
2281
+ textColor: themeColorTokenSchema.nullable().optional(),
2282
+ navStyle: headerNavStyle,
2283
+ navColor: themeColorTokenSchema.nullable().optional(),
2284
+ navWeight: navFontWeight.default("medium"),
2285
+ navFontRole: z.enum(["body", "heading"]).optional(),
2286
+ navTextSize: navLinkStyleSchema.shape.textSize,
2287
+ interactionPalette: headerInteractionPaletteSchema.optional(),
2288
+ container: headerContainerSchema,
2289
+ border: headerBorderSchema,
2290
+ shadow: componentShadowSchema.optional(),
2291
+ logo: logoStyleSchema,
2292
+ logoText: headerLogoTextSchema,
2293
+ navContainer: navContainerSchema,
2294
+ navLinkStyle: navLinkStyleSchema.optional(),
2295
+ ctaGap: headerCtaGapSchema.optional(),
2296
+ ctaTreatment: headerCtaTreatmentSchema.optional(),
2297
+ ctaVariant: z.string().min(1).optional(),
2298
+ dropdownStyle: dropdownStyleSchema
2299
+ });
2300
+ const footerVariant = z.enum([
2301
+ "simple",
2302
+ "columns",
2303
+ "split",
2304
+ "centred"
2305
+ ]).transform((value) => value === "columns" ? "simple" : value);
2306
+ const footerMaxWidth = z.enum(["container", "full"]);
2307
+ const footerNavLayoutMode = z.enum([
2308
+ "stack",
2309
+ "inline",
2310
+ "inline-wrap"
2311
+ ]);
2312
+ const footerSpacing = z.enum([
2313
+ "none",
2314
+ "tight",
2315
+ "compact",
2316
+ "default",
2317
+ "relaxed",
2318
+ "spacious"
2319
+ ]);
2320
+ const footerLogoSize = z.enum([
2321
+ "sm",
2322
+ "md",
2323
+ "lg",
2324
+ "xl"
2325
+ ]);
2326
+ const footerLogoMaxHeight = z.enum([
2327
+ "sm",
2328
+ "md",
2329
+ "lg",
2330
+ "xl"
2331
+ ]);
2332
+ const footerBottomTextLinkStyleSchema = z.object({
2333
+ colorToken: themeColorTokenSchema.optional(),
2334
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
2335
+ decorationColorToken: themeColorTokenSchema.nullable().optional(),
2336
+ underline: z.boolean().optional()
2337
+ });
2338
+ const footerBottomBarSchema = z.object({
2339
+ enabled: z.boolean().optional(),
2340
+ fullBleed: z.boolean().optional(),
2341
+ background: headerBackgroundSchema.optional(),
2342
+ textColor: themeColorTokenSchema.nullable().optional(),
2343
+ textAlign: z.enum([
2344
+ "left",
2345
+ "center",
2346
+ "right"
2347
+ ]).optional(),
2348
+ paddingY: footerSpacing.optional(),
2349
+ paddingX: footerSpacing.optional(),
2350
+ borderTop: z.object({
2351
+ colorToken: themeColorTokenSchema.nullable().optional(),
2352
+ width: z.enum([
2353
+ "none",
2354
+ "thin",
2355
+ "medium",
2356
+ "thick"
2357
+ ]).optional()
2358
+ }).optional()
2359
+ });
2360
+ const footerNavLayoutSchema = z.object({ layout: footerNavLayoutMode.optional() });
2361
+ const footerLogoSchema = z.object({
2362
+ size: footerLogoSize.optional(),
2363
+ maxHeight: footerLogoMaxHeight.optional(),
2364
+ align: z.enum([
2365
+ "start",
2366
+ "center",
2367
+ "end"
2368
+ ]).optional()
2369
+ });
2370
+ const footerSchema = z.object({
2371
+ variant: footerVariant,
2372
+ maxWidth: footerMaxWidth,
2373
+ background: headerBackgroundSchema.default({
2374
+ type: "color",
2375
+ color: "surface"
2376
+ }),
2377
+ navStyle: headerNavStyle.default("minimal"),
2378
+ navColor: themeColorTokenSchema.nullable().optional(),
2379
+ navWeight: navFontWeight.default("medium"),
2380
+ navLinkStyle: navLinkStyleSchema.optional(),
2381
+ bottomTextLinkStyle: footerBottomTextLinkStyleSchema.optional(),
2382
+ navLayout: footerNavLayoutSchema.optional(),
2383
+ logo: footerLogoSchema.optional(),
2384
+ bottomBar: footerBottomBarSchema.optional()
2385
+ });
2386
+ const containerPaddingPresetSchema = z.enum([
2387
+ "tight",
2388
+ "compact",
2389
+ "default",
2390
+ "relaxed"
2391
+ ]);
2392
+ const layoutSchema = z.object({ containerPadding: z.object({
2393
+ mobile: containerPaddingPresetSchema.optional(),
2394
+ tablet: containerPaddingPresetSchema.optional(),
2395
+ desktop: containerPaddingPresetSchema.optional()
2396
+ }).optional() }).optional();
2397
+ const heroTypographySizeSchema = z.enum([
2398
+ "sm",
2399
+ "base",
2400
+ "lg",
2401
+ "xl",
2402
+ "2xl",
2403
+ "3xl",
2404
+ "4xl",
2405
+ "5xl",
2406
+ "6xl",
2407
+ "editorial"
2408
+ ]);
2409
+ const heroTypographyLineHeightSchema = z.enum([
2410
+ "tight",
2411
+ "snug",
2412
+ "normal",
2413
+ "relaxed"
2414
+ ]);
2415
+ const heroResponsiveTypographySchema = z.object({
2416
+ headlineSize: heroTypographySizeSchema.optional(),
2417
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
2418
+ subheadlineSize: heroTypographySizeSchema.optional(),
2419
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
2420
+ });
2421
+ const heroTypographySchema = z.object({
2422
+ headlineSize: heroTypographySizeSchema.optional(),
2423
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
2424
+ subheadlineSize: heroTypographySizeSchema.optional(),
2425
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
2426
+ microHeadlineSize: heroTypographySizeSchema.optional(),
2427
+ microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
2428
+ microSubheadlineSize: heroTypographySizeSchema.optional(),
2429
+ microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
2430
+ responsive: z.object({
2431
+ tablet: heroResponsiveTypographySchema.optional(),
2432
+ mobile: heroResponsiveTypographySchema.optional()
2433
+ }).optional()
2434
+ });
2435
+ const heroSchema = z.object({ typography: heroTypographySchema.optional() }).optional();
2436
+ const bodyTextIntroTypographySizeSchema = z.enum(["default", "editorial"]);
2437
+ const bodyTextSchema = z.object({ intro: z.object({
2438
+ paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
2439
+ headingSize: bodyTextIntroTypographySizeSchema.optional()
2440
+ }).optional() }).optional();
2441
+ /**
2442
+ * Testimonial quote-mark treatment, owned by the site style (analogous to the
2443
+ * accordion icon). `style` is the coarse selector; the optional fields fine-tune
2444
+ * it. `none` hides the mark. The block renders the mark; the site style decides
2445
+ * its character; a look may still hide it.
2446
+ */
2447
+ const testimonialQuoteTreatmentSchema = z.object({
2448
+ style: z.enum([
2449
+ "serif-display",
2450
+ "accent-glyph",
2451
+ "none"
2452
+ ]),
2453
+ fontFamily: z.enum(["heading", "body"]).optional(),
2454
+ scale: z.enum([
2455
+ "sm",
2456
+ "md",
2457
+ "lg",
2458
+ "xl"
2459
+ ]).optional(),
2460
+ colorToken: themeColorTokenSchema.optional(),
2461
+ opacity: z.number().min(0).max(1).optional()
2462
+ });
2463
+ const themeSchema = z.object({
2464
+ ...themeLookMetadataSchema.shape,
2465
+ axes: axesSchema,
2466
+ palette: paletteSchema,
2467
+ typography: typographySchema,
2468
+ space: spaceSchema,
2469
+ border,
2470
+ shadow,
2471
+ motion,
2472
+ corners,
2473
+ gradients: gradientsSchema.optional(),
2474
+ layout: layoutSchema,
2475
+ hero: heroSchema,
2476
+ bodyText: bodyTextSchema,
2477
+ header: headerSchema,
2478
+ footer: footerSchema,
2479
+ buttons: buttonSystemSchema.optional(),
2480
+ cards: cardSystemSchema.optional(),
2481
+ accordions: accordionSystemSchema.optional(),
2482
+ testimonialQuote: testimonialQuoteTreatmentSchema.optional(),
2483
+ inputs: inputSystemSchema.optional(),
2484
+ inputStyle: inputStyle.optional(),
2485
+ blockCustomVars: z.record(z.string(), z.record(z.string(), z.string())).optional(),
2486
+ blockOverrides: z.record(z.string(), blockThemeOverrideSchema).optional(),
2487
+ headingDecoration: headingDecorationSchema.optional(),
2488
+ customCssRules: customCssRulesSchema,
2489
+ blockCustomCssRules: blockCustomCssRulesSchema,
2490
+ customCssAtRules: customCssAtRulesSchema,
2491
+ /**
2492
+ * Style groups define named visual presets that content authors can apply to blocks.
2493
+ *
2494
+ * Unlike variants (which change block structure/layout), style groups only affect
2495
+ * CSS styling. The selected style group is rendered as a `data-style-group` attribute
2496
+ * on the block wrapper, which can be targeted in `blockCustomCssRules`.
2497
+ *
2498
+ * @example
2499
+ * ```typescript
2500
+ * {
2501
+ * styleGroups: {
2502
+ * hero: ['bold', 'minimal', 'featured'],
2503
+ * 'body-text': ['intro', 'compact'],
2504
+ * },
2505
+ * blockCustomCssRules: [
2506
+ * {
2507
+ * id: 'hero-bold-headline',
2508
+ * blockKind: 'hero',
2509
+ * selector: '&[data-style-group="bold"] .hero-headline',
2510
+ * declarations: { fontWeight: '800', fontSize: '3rem' }
2511
+ * }
2512
+ * ]
2513
+ * }
2514
+ * ```
2515
+ */
2516
+ styleGroups: z.record(z.string(), z.array(z.string())).optional()
2517
+ });
2518
+ z.object({
2519
+ message: z.string().min(1),
2520
+ themes: z.array(themeSchema).length(3)
2521
+ });
2522
+ //#endregion
2523
+ export { asSiteStyleId as $, NAV_LINK_BORDER_RADIUS_MAP as A, boxBackgroundSchema as B, ICON_SIZE_PX as C, cardVariantRoleValues as D, cardRoleValues as E, navLinkHoverColorCandidate as F, themeV2CompilerOwnedFieldNames as G, pageDesignEditorBackgroundOverrideOwner as H, navLinkOwnsHoverForeground as I, asBoundaryOptionId as J, arrangementModes as K, navLinkOwnsUnderline as L, NAV_LINK_PADDING_MAP as M, NAV_LINK_PADDING_X_MAP as N, normalizeCardRole as O, NAV_LINK_TEXT_SIZE_MAP as P, asPageFlowPresetId as Q, navEffectPolicy as R, ICON_CONFIG as S, cardRoleSchema as T, siteChromeBackgroundOverrideOwner as U, runtimeBoxBackgroundSchema as V, stripStaleTransitionStyleGroup as W, asDesignSystemTemplateId as X, asDesignBlockId as Y, asLayoutVariantKey as Z, LABEL_FONT_SIZE_MAP as _, testimonialsCompositionTreatmentValues as _t, renderHeaderPaintTargetRules as a, eyebrowTreatmentValues as at, ACCORDION_TRIGGER_FONT_SCALE as b, visibleHeadingDecorationFamilyValues as bt, MQ_SM_DOWN as c, headingDecorationColorTokenValues as ct, headerVariantValues as d, makeBoundaryId as dt, assertNever as et, getComponentBorderWidthPx as f, noHeadingDecoration as ft, INPUT_SPACING_MAP as g, requireNonEmptyReadonlyArray as gt, INPUT_FONT_SIZE_MAP as h, plainFrame as ht, getHeaderPaintTargets as i, eventListTreatmentValues as it, NAV_LINK_LETTER_SPACING_MAP as j, surfaceCardRoleValues as k, MQ_SM_UP as l, introCompositionTreatmentValues as lt, FONT_WEIGHT_MAP as m, panelFrame as mt, generateHeaderScrollTreatmentStyles as n, defineExactCatalog as nt, MQ_LG_UP as o, featureCardCompositionTreatmentValues as ot, getComponentShadowVar as p, offeringsPreviewCompositionTreatmentValues as pt, asAppearancePresetId as q, generateMobileOverlayBackdropFilterFix as r, defineFrameCapability as rt, MQ_MD_DOWN as s, flushPanelFrame as st, themeSchema as t, defineBlockDesignCapability as tt, MQ_TABLET_ONLY as u, isArrangementMode as ut, ACCORDION_OPEN_ACCENT_THICKNESS as v, tileTreatmentValues as vt, skinTokenCssVars as w, ACCORDION_TRIGGER_LETTER_SPACING as x, ACCORDION_SPACING_MAP as y, toNonEmptyReadonlyArray as yt, boxBackgroundOverlaySchema as z };