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