@riverbankcms/sdk 0.167.0 → 0.168.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 (224) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-Dgb-ptph.d.ts → BlocksIslandsHydrator-CiD_VVGM.d.ts} +1 -1
  2. package/dist/_dts/{Page-Bs3WxFgr.d.ts → Page-Bj6VJRS5.d.ts} +7 -6
  3. package/dist/_dts/{SdkPreviewMode-DtUCsaHY.d.ts → SdkPreviewMode-ChpsnwDX.d.ts} +2 -2
  4. package/dist/_dts/{client-CwsI23pj.d.ts → client-C8mfUxrJ.d.ts} +65 -35
  5. package/dist/_dts/{content-types-CAeP_-cV.d.ts → content-types-_vXZyR4H.d.ts} +2 -2
  6. package/dist/_dts/{contracts-BXHCiF-b.d.ts → contracts-CJFfrVKU.d.ts} +5 -4
  7. package/dist/_dts/{footerPageOutline-Bb2gbppW.d.ts → footerPageOutline-CMegb23G.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-DaBBDx7M.d.ts → generatePageMetadata-D9YdAIMh.d.ts} +2 -2
  9. package/dist/_dts/{index-CS6b1B-c.d.ts → index-BQXaZ7aY.d.ts} +4 -4
  10. package/dist/_dts/{index-5_jf52sZ.d.ts → index-Bpr-wT5k.d.ts} +2 -2
  11. package/dist/_dts/{index-DeHDwMfu.d.ts → index-C7_Rz8EY.d.ts} +3 -3
  12. package/dist/_dts/{index-D7EbliE3.d.ts → index-Cx2BQlHL.d.ts} +3 -3
  13. package/dist/_dts/{index-C20yUyob.d.ts → index-Dgz6yhsy.d.ts} +1 -1
  14. package/dist/_dts/index-Vh8B9FSa.d.ts +14 -0
  15. package/dist/_dts/{index-bDln38Hm.d.ts → index-vR3p9Bu-.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-CTqcL7CS.d.ts → loadContent-dhWSgLeS.d.ts} +7 -7
  17. package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
  18. package/dist/_dts/{index-ChpjHK0U.d.ts → request-BrYhNV9Z.d.ts} +80718 -47665
  19. package/dist/_dts/{resolveBlockData-C3s9WMPs.d.ts → resolveBlockData-BfSHm8Ms.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-JPwgRxwh.d.ts → resolvePageContent-gZJ4i1wN.d.ts} +2 -2
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  28. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  29. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -5
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  54. package/dist/_dts/{types-CwtTcaQP.d.ts → types-BB33-Spd.d.ts} +3 -3
  55. package/dist/_dts/{types-D-WElMCy.d.ts → types-BVFXYtRg.d.ts} +7 -7
  56. package/dist/_dts/{types-BlaCuPLr.d.ts → types-FOsJ-KYb.d.ts} +4 -2
  57. package/dist/_dts/{validation-Y5wD9fGK.d.ts → validation-DckTc6TQ.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DFqkx158.mjs → BlocksIslandsHydrator-DcwEaliO.mjs} +21 -21
  59. package/dist/client/BookingMailingListNote-Dsugoe-n.mjs +946 -0
  60. package/dist/client/BookingQuestionFields-Bhh0cvsl.mjs +359 -0
  61. package/dist/client/{CalendarNavigationChevron-DQwJ7BPx.mjs → CalendarNavigationChevron-CNe3ZjdC.mjs} +7 -7
  62. package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
  63. package/dist/client/{DemoBookingPortalAccess-DdkY86qI.mjs → DemoBookingPortalAccess-BeiZxEUJ.mjs} +7 -7
  64. package/dist/client/{EventCalendar.client-DAeQPV76.mjs → EventCalendar.client-BL943-tl.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-Bus9R0bj.mjs → EventCombined.client-BFVxECTp.mjs} +8 -8
  66. package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
  67. package/dist/client/{EventItem-DPBLjGwj.mjs → EventItem-BIc4gjiD.mjs} +37 -15
  68. package/dist/client/{EventListWeekNavigation-D6cwU82_.mjs → EventListWeekNavigation-a0QEIEf0.mjs} +1 -1
  69. package/dist/client/{EventListing.client-Bogi_SnJ.mjs → EventListing.client-CEFTC3jH.mjs} +3 -3
  70. package/dist/client/{EventListing.view-CEumpN7i.mjs → EventListing.view-Bt2sBBms.mjs} +34 -16
  71. package/dist/client/{EventRegistrationPayment-CIQw6vNy.mjs → EventRegistrationPayment-D9YBNb_E.mjs} +250 -40
  72. package/dist/client/{LocationMapActions-BVO-qx4q.mjs → LocationMapActions-gqzt5gkW.mjs} +2 -2
  73. package/dist/client/{MapDrawingSvg-CcGaFawl.mjs → MapDrawingSvg-13JQI7_z.mjs} +1 -1
  74. package/dist/client/{Page-D4_H_u9V.mjs → Page-D_M2Vxz3.mjs} +4471 -1601
  75. package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
  76. package/dist/client/{StepIndicator-Dptantmg.mjs → StepIndicator-CaN8snZ8.mjs} +3 -3
  77. package/dist/client/{TabBarFragment-BxEGsKUx.mjs → TabBarFragment-DkVKtK5a.mjs} +1 -1
  78. package/dist/client/{ThemedButton-8jUc02mZ.mjs → ThemedButton-BdnEwA38.mjs} +2 -5
  79. package/dist/client/accessibleSurfaces-chpD4C2c.mjs +4278 -0
  80. package/dist/client/{accordion--EUHmEGa.mjs → accordion-DE7OG--d.mjs} +1 -1
  81. package/dist/client/{booking-form.client-BCXwOnhc.mjs → booking-form.client-CS1PPjw7.mjs} +842 -374
  82. package/dist/client/{bookingForm-sHHcdism.mjs → bookingForm-DE2CwIU9.mjs} +5 -4
  83. package/dist/client/{src-DjnxOjXG.mjs → bookingQuestionValues-BjcyCru5.mjs} +88 -1
  84. package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
  85. package/dist/client/bookings.mjs +18 -13
  86. package/dist/client/{carousel-Cp9xPBFZ.mjs → carousel-DZyUdnFh.mjs} +3 -3
  87. package/dist/client/{carousel.client-BO7sCEpH.mjs → carousel.client-BD4DXMtI.mjs} +62 -16
  88. package/dist/client/{carousel.shared-DBnWEJzo.mjs → carousel.shared-BFQ3kBEw.mjs} +6 -3
  89. package/dist/client/{cart-CCZZC-Lq.mjs → cart-D7HkkNwe.mjs} +3 -3
  90. package/dist/client/{cart.client-B7JfA19I.mjs → cart.client-H4sv2TpD.mjs} +1 -1
  91. package/dist/client/{checkout-CipmYL4A.mjs → checkout-2qVyG-Sh.mjs} +3 -3
  92. package/dist/client/{checkout.client-DraalWdH.mjs → checkout.client-DAjrBZ74.mjs} +1 -1
  93. package/dist/client/client.mjs +240 -63
  94. package/dist/client/{context-Cv3QHjAF.mjs → context-DXmIbXCK.mjs} +297 -3
  95. package/dist/client/{cta-P2vJVTEn.mjs → cta-DP_IBnq3.mjs} +2 -2
  96. package/dist/client/{dateFormatting-D8D47VT4.mjs → dateFormatting-CwrkFZTr.mjs} +1 -1
  97. package/dist/client/{demoPortalMagicLink-CXWZoV-d.mjs → demoPortalMagicLink-DQXK-Fh6.mjs} +1 -1
  98. package/dist/client/{enhanceHeaderSection-BkAro1DJ.mjs → enhanceHeaderSection-DheQj7rg.mjs} +3 -3
  99. package/dist/client/{event-details.client-dLmyuPap.mjs → event-details.client-C5UufcRp.mjs} +1 -1
  100. package/dist/client/{event-registration.client-BEhC2_-Y.mjs → event-registration.client-CMGg63IU.mjs} +72 -235
  101. package/dist/client/{eventCalendar-FBMS2Cpb.mjs → eventCalendar-DlD0GCEy.mjs} +4 -4
  102. package/dist/client/{eventCombined-BrBhUvGe.mjs → eventCombined-DoSi8p_l.mjs} +4 -4
  103. package/dist/client/{eventDetails-C7WUrbZ2.mjs → eventDetails-DzuQYgmO.mjs} +2 -2
  104. package/dist/client/{eventListing-Bih-BgQM.mjs → eventListing-CkiMjl0g.mjs} +4 -4
  105. package/dist/client/{eventRegistration-DfTlqGbl.mjs → eventRegistration-CjS3Zpjp.mjs} +4 -4
  106. package/dist/client/{form-Bw1uuiUs.mjs → form-DgQqm7T2.mjs} +3 -3
  107. package/dist/client/{form.client-pZ-9gN33.mjs → form.client-BI9Dcsq5.mjs} +5 -5
  108. package/dist/client/{form.parts-PXlu6XQO.mjs → form.parts-DevF0L_A.mjs} +3 -3
  109. package/dist/client/{formatDate-DI3DP48e.mjs → formatDate-DDyURjoe.mjs} +1 -1
  110. package/dist/client/gifting/client.mjs +3 -3
  111. package/dist/client/{headerSection-BpJYUMd6.mjs → headerSection-DYIG6Pwb.mjs} +2 -2
  112. package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
  113. package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-CSoP0cGR.mjs → newsletter-form.client-BWp7Y1e1.mjs} +6 -6
  115. package/dist/client/{newsletter-form.parts-DDbX_Sj0.mjs → newsletter-form.parts-Dg8s9NwJ.mjs} +2 -2
  116. package/dist/client/{newsletterForm-vCxYRar_.mjs → newsletterForm-DnPraMzx.mjs} +3 -3
  117. package/dist/client/{noop-ByVtIWf4.mjs → noop-ByFRHYQ2.mjs} +437 -496
  118. package/dist/client/portal/client.mjs +76 -229
  119. package/dist/client/{product-detail.client-7Pi6avM-.mjs → product-detail.client-BFAgHrdg.mjs} +1 -1
  120. package/dist/client/{product-list.client-DEad-Pma.mjs → product-list.client-DVrs_DyY.mjs} +1 -1
  121. package/dist/client/{productDetail-G1SMXG13.mjs → productDetail-D4rvl6Xg.mjs} +3 -3
  122. package/dist/client/{productList-B21TGdpT.mjs → productList-B8o5AOMX.mjs} +3 -3
  123. package/dist/client/{propsDecoder-B3vIBkex.mjs → propsDecoder-hhotPP6P.mjs} +5 -4
  124. package/dist/client/{registry.server-B8aQhJpO.mjs → registry.server-Ch3EpupA.mjs} +2213 -2433
  125. package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
  126. package/dist/client/rendering/client.mjs +30 -30
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +10 -9
  129. package/dist/client/{richText-coerce-DHkBtO0G.mjs → richText-coerce-C3LabQ1O.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-DbHX4JOS.mjs → routeIslandApiConfig-CQGlxId8.mjs} +1 -1
  131. package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
  132. package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
  133. package/dist/client/{shop-commerce-B2UmrQg_.mjs → shop-commerce-VDbVaKY-.mjs} +12 -12
  134. package/dist/client/{shop-commerce-store-B7n-Z7nY.mjs → shop-commerce-store-DqdgJ8Zw.mjs} +1 -1
  135. package/dist/client/{shop-mqyoOvOK.mjs → shop-rRXplPGZ.mjs} +3 -3
  136. package/dist/client/{shop.client-BH-BBnA9.mjs → shop.client-DdwvMvaK.mjs} +13 -13
  137. package/dist/client/{shop.interactive-mdM3UMWG.mjs → shop.interactive-C8OvFY06.mjs} +141 -66
  138. package/dist/client/{shopShared-CXF5wxdg.mjs → shopShared-BeuJiGPU.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
  141. package/dist/client/{timetableModel-CrC80EOG.mjs → timetableModel-Cko9LRKy.mjs} +11 -11
  142. package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
  143. package/dist/client/{useAvailableSlots-C4LOaI_Z.mjs → useAvailableSlots-M6QIEiWf.mjs} +3 -3
  144. package/dist/client/{useDiscountApply-6Q0nToVA.mjs → useDiscountApply-BJSnyO0f.mjs} +3 -3
  145. package/dist/client/{useDiscountCodeUi-CM-DTX5X.mjs → useDiscountCodeUi-D3XnOSCi.mjs} +1 -1
  146. package/dist/client/{useEventPagination-Bcs89BR5.mjs → useEventPagination-PhTIoFVX.mjs} +7 -7
  147. package/dist/client/{view-BN-fxyfq.mjs → view-448wvvEY.mjs} +11 -7
  148. package/dist/client/{view-Dh2tGoS0.mjs → view-L_mkgtnk.mjs} +4 -4
  149. package/dist/client/{site-styles-D56hT2u1.mjs → wizardSteps-CFulHWnT.mjs} +19660 -18565
  150. package/dist/preview-next/client/{ArrangementLookControls-D4VjPs-r.mjs → ArrangementLookControls-BpvnOGlN.mjs} +26 -17
  151. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
  152. package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
  153. package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
  154. package/dist/preview-next/client/{PreviewEditorSidebar-Ckr2zk_L.mjs → PreviewEditorSidebar-C0OtdWu_.mjs} +128 -21
  155. package/dist/preview-next/client/{PreviewEditorUI-KOZgw_gS.mjs → PreviewEditorUI-Csc5vH5k.mjs} +6 -6
  156. package/dist/preview-next/client/{PreviewShell-CyO2V4kB.mjs → PreviewShell-BOLH_pm-.mjs} +199 -155
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-DW3uKvNF.mjs → SdkPreviewModeRuntime-CKodLReY.mjs} +31 -32
  158. package/dist/preview-next/client/{SiteChromeCustomizeButton-CU9VD-7O.mjs → SiteChromeCustomizeButton-BeEZpeKn.mjs} +3780 -3436
  159. package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
  160. package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
  161. package/dist/preview-next/client/{previewAssistantSlot-DBi-WybM.mjs → previewAssistantSlot-BBdN5kfY.mjs} +18697 -15557
  162. package/dist/preview-next/client/{previewChromeSurface-BhkUJst9.mjs → previewChromeSurface-VZtGwPuH.mjs} +1 -1
  163. package/dist/preview-next/client/runtime.mjs +3 -3
  164. package/dist/preview-next/client/{sdk-runtime-BjCb6lOn.mjs → sdk-runtime-kiZkMcuR.mjs} +2 -2
  165. package/dist/preview-next/client/{useAutosaveStatus-CKxTaC3j.mjs → useAutosaveStatus-BiIHEeE0.mjs} +2 -2
  166. package/dist/preview-next/client/{useBlockCustomizeControls-B7MLTjBX.mjs → useBlockCustomizeControls-BuFLIpmX.mjs} +2 -2
  167. package/dist/preview-next/client/{useOpenBlockForSetup-BTUc0g9X.mjs → useOpenBlockForSetup-DlxYgmh_.mjs} +1 -1
  168. package/dist/preview-next/keepAlive.mjs +1 -1
  169. package/dist/preview-next/middleware.mjs +1 -1
  170. package/dist/preview-next/{route-contract-Bv3nkdpV.mjs → route-contract-C0sCvCYL.mjs} +165 -0
  171. package/dist/server/{Block.shared-4fMqzltx.mjs → Block.shared-Dnhc0Wu5.mjs} +5 -5
  172. package/dist/server/{ThemeScopeCore-C72VC_lR.mjs → ThemeScopeCore-NAQ_zsFu.mjs} +461 -128
  173. package/dist/server/{accessibleSurfaces-B_Y_dA20.mjs → accessibleSurfaces-108nxyGc.mjs} +319 -131
  174. package/dist/server/{bindings-ConMYJ2U.mjs → bindings-DLoZYUxG.mjs} +2 -2
  175. package/dist/server/{client-Cot-H5fQ.mjs → client-Bc8jI8zN.mjs} +261 -61
  176. package/dist/server/config-validation.mjs +1 -1
  177. package/dist/server/config.mjs +1 -1
  178. package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
  179. package/dist/server/data/resolveBlockData.mjs +1 -1
  180. package/dist/server/headerVariant-BwR9NV4b.mjs +463 -0
  181. package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
  182. package/dist/server/index.mjs +3 -3
  183. package/dist/server/{loadContent-BkaWYEwt.mjs → loadContent-D61gpqHB.mjs} +4 -5
  184. package/dist/server/{loadPage-kviUdH8c.mjs → loadPage-B4ZYpIcd.mjs} +2 -2
  185. package/dist/server/manifest.mjs +1 -1
  186. package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
  187. package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
  188. package/dist/server/next.mjs +6 -6
  189. package/dist/server/{opaqueSurface-BTnS09GS.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
  190. package/dist/server/{overrideResolution-itXZCXs7.mjs → overrideResolution-CDReKy2P.mjs} +1 -1
  191. package/dist/server/page-converter.mjs +3 -3
  192. package/dist/server/{pageRenderPlan-CDyn7iLy.mjs → pageRenderPlan-ByVTA7-4.mjs} +255 -158
  193. package/dist/server/{pageRuntimeSupport-DZ6cLxrM.mjs → pageRuntimeSupport-Dzz_Dze6.mjs} +291 -5
  194. package/dist/server/{pageShared-Q_Vij87H.mjs → pageShared-Dk5Ku6hs.mjs} +1285 -897
  195. package/dist/server/{schema-DEizlyi4.mjs → parseThemeForPersistence-pJPGfMrf.mjs} +593 -1592
  196. package/dist/server/{prebuild-DOG4MkOy.mjs → prebuild-CW4M0WEZ.mjs} +1 -1
  197. package/dist/server/prebuild.mjs +1 -1
  198. package/dist/server/{prefetchBlockData-DlprLLsc.mjs → prefetchBlockData-Bvx0SiIM.mjs} +5 -4
  199. package/dist/server/{registry-BPFcpn6k.mjs → registry-Bh0Y25zH.mjs} +4399 -4065
  200. package/dist/server/rendering/components/pageShared.mjs +1 -1
  201. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  202. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  203. package/dist/server/rendering/server.mjs +3 -3
  204. package/dist/server/rendering.mjs +8 -8
  205. package/dist/server/{resolveBlockData-BHvfGD4y.mjs → resolveBlockData-CnHHst9r.mjs} +1 -1
  206. package/dist/server/{resolveButtonColourStates-OXFRGn5M.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +399 -518
  207. package/dist/server/{responseMedia-D8J3VAFs.mjs → responseMedia-t6gs0cB7.mjs} +2 -2
  208. package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
  209. package/dist/server/server.mjs +3 -3
  210. package/dist/server/theme-bridge.mjs +2 -3
  211. package/dist/server/theme.mjs +1 -2
  212. package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
  213. package/dist/server/{validation-bl6WcAi_.mjs → validation-D2bHWSxJ.mjs} +57 -8
  214. package/dist/server/{version-BLXZ31S-.mjs → version-DkM1eAxG.mjs} +1 -1
  215. package/dist/styles/index.css +340 -68
  216. package/package.json +4 -3
  217. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  218. package/dist/_dts/index-RugyUnqR.d.ts +0 -31535
  219. package/dist/client/BookingMailingListNote-CCVXX1LN.mjs +0 -331
  220. package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
  221. package/dist/client/site-styles-CMCUxsIM.mjs +0 -3
  222. package/dist/client/useBookingNowIso-BDmWkYUW.mjs +0 -58
  223. package/dist/client/wizardSteps-DtkhwKXK.mjs +0 -6933
  224. package/dist/server/parseThemeForPersistence-CDrF51tJ.mjs +0 -52
@@ -1,1181 +1,9 @@
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";
1
+ import { A as expandPalette, Dt as themeColorTokenSchema, St as paletteColorsFromEntries, Tt as parseColorTokenParts, b as buttonSystemSchema, h as createStandardButtonSurfacePolicy, n as compileButtonColourStates, vt as hexColorSchema, xt as paletteColorEntries, yt as isThemeColorToken } from "./resolveButtonColourStates-Cn6j8Ee0.mjs";
2
+ import { A as tileTreatmentValues, C as accordionIconSetValues, D as headingDecorationColorTokenValues, E as eyebrowTreatmentValues, O as headingDecorationOverrideValues, R as asSiteStyleId, S as accordionIconMotionValues, T as eventListTreatmentValues, b as siteChromeBackgroundOverrideOwner, c as cardRoleSchema, i as boxBackgroundSchema, j as visibleHeadingDecorationFamilyValues, n as headerVariantWithLegacyAliasSchema, o as tokenOrCssColorValueSchema, u as cardSystemSchema, x as accordionIconColorTokenValues } from "./headerVariant-BwR9NV4b.mjs";
3
+ import { i as mediaSchema } from "./media-Brn9FW5s.mjs";
4
+ import { a as declarationValueSchema, i as customCssRulesSchema, n as blockCustomCssRulesSchema, o as declarationsSchema, s as selectorSchema } from "./customCss-QymcmOZ-.mjs";
4
5
  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
6
+ //#region ../site-contracts/src/theme/accordions.ts
1179
7
  /**
1180
8
  * Accordion icon styles for expand/collapse indicators
1181
9
  */
@@ -1282,75 +110,8 @@ const accordionSystemSchema = z.object({
1282
110
  }).optional(),
1283
111
  content: z.object({ textColorToken: themeColorTokenSchema })
1284
112
  });
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
113
  //#endregion
1353
- //#region ../theme-core/src/inputs/types.ts
114
+ //#region ../site-contracts/src/theme/inputs.ts
1354
115
  /**
1355
116
  * Input styling configuration for a theme
1356
117
  *
@@ -1452,47 +213,137 @@ const inputSystemSchema = z.object({
1452
213
  opacity: z.number().min(.3).max(.7)
1453
214
  })
1454
215
  });
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
216
  //#endregion
1492
- //#region ../theme-core/src/gradients/types.ts
1493
- /**
1494
- * Gradient configuration types and schemas
1495
- */
217
+ //#region ../site-contracts/src/theme/interactive.ts
218
+ /**
219
+ * Typography settings shared by buttons and nav links
220
+ */
221
+ const interactiveTypographySchema = z.object({
222
+ /** Font family source */
223
+ typography: z.enum(["body", "heading"]).default("body"),
224
+ /** Font weight */
225
+ fontWeight: z.enum([
226
+ "regular",
227
+ "medium",
228
+ "semibold",
229
+ "bold"
230
+ ]).default("medium"),
231
+ /** Text transform */
232
+ textTransform: z.enum([
233
+ "none",
234
+ "uppercase",
235
+ "capitalize"
236
+ ]).default("none"),
237
+ /** Italic style */
238
+ italic: z.boolean().default(false)
239
+ });
240
+ /**
241
+ * Effect application reference (shared between buttons and nav)
242
+ */
243
+ const effectApplicationSchema = z.object({
244
+ /** Effect preset ID */
245
+ effectId: z.string(),
246
+ /** User-provided customization options */
247
+ options: z.record(z.string(), z.any()).optional()
248
+ });
249
+ /**
250
+ * Effect composition by state (shared pattern)
251
+ */
252
+ const effectCompositionSchema = z.object({
253
+ /** Effects always applied */
254
+ base: z.array(effectApplicationSchema).optional(),
255
+ /** Effects applied on hover */
256
+ hover: z.array(effectApplicationSchema).optional(),
257
+ /** Effects applied on active/pressed */
258
+ active: z.array(effectApplicationSchema).optional(),
259
+ /** Effects applied on focus */
260
+ focus: z.array(effectApplicationSchema).optional()
261
+ });
262
+ //#endregion
263
+ //#region ../site-contracts/src/theme/navigation.ts
264
+ /**
265
+ * Padding preset options for nav links
266
+ */
267
+ const navLinkPaddingSchema = z.enum([
268
+ "none",
269
+ "compact",
270
+ "default"
271
+ ]);
272
+ /**
273
+ * Horizontal padding override for nav links.
274
+ * When set, overrides only the horizontal component of the `padding` preset.
275
+ */
276
+ const navLinkPaddingXSchema = z.enum([
277
+ "none",
278
+ "tight",
279
+ "compact",
280
+ "default",
281
+ "relaxed",
282
+ "spacious"
283
+ ]);
284
+ /**
285
+ * Border radius options for nav links
286
+ */
287
+ const navLinkBorderRadiusSchema = z.enum([
288
+ "none",
289
+ "sm",
290
+ "md",
291
+ "full"
292
+ ]);
293
+ /**
294
+ * Typography size options for nav links.
295
+ */
296
+ const navLinkTextSizeSchema = z.enum([
297
+ "xs",
298
+ "sm",
299
+ "base",
300
+ "lg",
301
+ "xl"
302
+ ]);
303
+ /**
304
+ * Letter spacing options for nav links.
305
+ */
306
+ const navLinkLetterSpacingSchema = z.enum([
307
+ "normal",
308
+ "wide",
309
+ "wider",
310
+ "widest"
311
+ ]);
312
+ /**
313
+ * Optional legibility aid for nav text that floats over uncertain imagery or color.
314
+ */
315
+ const navLinkContrastTreatmentSchema = z.enum(["none", "soft-glow"]);
316
+ /**
317
+ * Nav link style schema
318
+ *
319
+ * Extends interactive typography base with nav-specific settings.
320
+ */
321
+ const navLinkStyleSchema = z.object({
322
+ /** Display name for the style */
323
+ name: z.string().min(1).max(30).optional(),
324
+ /** Typography settings (inherited from interactive base) */
325
+ ...interactiveTypographySchema.shape,
326
+ /** Text color token */
327
+ colorToken: themeColorTokenSchema.default("text"),
328
+ /** Optional text size override */
329
+ textSize: navLinkTextSizeSchema.optional(),
330
+ /** Optional letter spacing override */
331
+ letterSpacing: navLinkLetterSpacingSchema.optional(),
332
+ /** Optional text-only contrast treatment for transparent/overlay navigation */
333
+ contrastTreatment: navLinkContrastTreatmentSchema.optional(),
334
+ /** Hover/active color token (for color-change effects) */
335
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
336
+ /** Padding preset */
337
+ padding: navLinkPaddingSchema.default("compact"),
338
+ /** Horizontal padding override (overrides horizontal component of padding preset) */
339
+ paddingX: navLinkPaddingXSchema.optional(),
340
+ /** Border radius (for capsule/pill styles) */
341
+ borderRadius: navLinkBorderRadiusSchema.default("none"),
342
+ /** Composable effects */
343
+ effects: effectCompositionSchema.optional()
344
+ });
345
+ //#endregion
346
+ //#region ../site-contracts/src/theme/gradients.ts
1496
347
  /**
1497
348
  * Gradient color stop
1498
349
  */
@@ -1534,14 +385,271 @@ const gradientsSchema = z.object({
1534
385
  hero: z.string().min(1).nullable().optional(),
1535
386
  background: z.string().min(1).nullable().optional()
1536
387
  });
1537
- //#endregion
1538
- //#region ../theme-core/src/customCss/atRuleValidation.ts
388
+ //#endregion
389
+ //#region ../site-contracts/src/theme/fonts.ts
390
+ const fontWeightListSchema = z.array(z.number().int().min(100).max(900));
391
+ const fontLoadingSchema = z.object({
392
+ extraBodyFontWeights: fontWeightListSchema.optional(),
393
+ extraHeadingFontWeights: fontWeightListSchema.optional(),
394
+ italicBodyFontWeights: fontWeightListSchema.optional(),
395
+ italicHeadingFontWeights: fontWeightListSchema.optional()
396
+ });
397
+ const fontWidthSchema = z.number().finite().positive();
398
+ /** Curated variable families with a registered width axis, in percentages. */
399
+ const curatedFontWidths = {
400
+ Archivo: {
401
+ min: 62,
402
+ max: 125
403
+ },
404
+ "Instrument Sans": {
405
+ min: 75,
406
+ max: 100
407
+ }
408
+ };
409
+ function getFontWidthRange(family) {
410
+ return curatedFontWidths[(family.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "")];
411
+ }
412
+ //#endregion
413
+ //#region ../site-contracts/src/theme/typography.ts
414
+ const typographyStyleSchema = z.object({
415
+ width: fontWidthSchema.optional(),
416
+ family: z.string().min(1),
417
+ weight: z.enum([
418
+ "light",
419
+ "regular",
420
+ "medium",
421
+ "semibold",
422
+ "bold"
423
+ ]),
424
+ letterSpacing: z.enum([
425
+ "tight",
426
+ "normal",
427
+ "loose"
428
+ ]),
429
+ lineHeight: z.enum([
430
+ "normal",
431
+ "relaxed",
432
+ "loose"
433
+ ])
434
+ });
435
+ const bodyTypographyStyleSchema = typographyStyleSchema.extend({ size: z.enum([
436
+ "md",
437
+ "lg",
438
+ "xl"
439
+ ]) });
440
+ const headingSizeSchema = z.enum([
441
+ "xs",
442
+ "sm",
443
+ "md",
444
+ "lg",
445
+ "xl",
446
+ "2xl"
447
+ ]);
448
+ const headingTypographyOverridesSchema = z.object({
449
+ width: fontWidthSchema.nullable().optional(),
450
+ weight: z.enum([
451
+ "light",
452
+ "regular",
453
+ "medium",
454
+ "semibold",
455
+ "bold"
456
+ ]).nullable().optional(),
457
+ letterSpacing: z.enum([
458
+ "tight",
459
+ "normal",
460
+ "loose"
461
+ ]).nullable().optional(),
462
+ size: headingSizeSchema.nullable().optional(),
463
+ lineHeight: z.enum([
464
+ "tight",
465
+ "snug",
466
+ "normal",
467
+ "relaxed",
468
+ "loose"
469
+ ]).nullable().optional(),
470
+ italic: z.boolean().nullable().optional(),
471
+ colorToken: themeColorTokenSchema.nullable().optional()
472
+ });
473
+ const headingTypographyStyleSchema = typographyStyleSchema.extend({
474
+ case: z.enum([
475
+ "uppercase",
476
+ "normal",
477
+ "smallCaps"
478
+ ]).nullable(),
479
+ italic: z.boolean().nullable(),
480
+ colorToken: themeColorTokenSchema.nullable().optional()
481
+ });
482
+ const proseLinkUnderlineStyleSchema = z.enum([
483
+ "solid",
484
+ "dotted",
485
+ "dashed"
486
+ ]);
487
+ const proseLinkUnderlineThicknessSchema = z.enum([
488
+ "auto",
489
+ "fromFont",
490
+ "thin",
491
+ "medium",
492
+ "thick"
493
+ ]);
494
+ const proseLinkUnderlineOffsetSchema = z.enum([
495
+ "auto",
496
+ "tight",
497
+ "normal",
498
+ "loose"
499
+ ]);
500
+ const proseLinkStyleSchema = z.object({
501
+ colorToken: themeColorTokenSchema.optional(),
502
+ hoverColorToken: themeColorTokenSchema.optional(),
503
+ underline: z.boolean().optional(),
504
+ decorationColorToken: themeColorTokenSchema.optional(),
505
+ hoverDecorationColorToken: themeColorTokenSchema.optional(),
506
+ underlineStyle: proseLinkUnderlineStyleSchema.optional(),
507
+ underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
508
+ underlineOffset: proseLinkUnderlineOffsetSchema.optional()
509
+ });
510
+ const typographyScaleSchema = z.enum([
511
+ "compact",
512
+ "balanced",
513
+ "spacious",
514
+ "minorThird",
515
+ "majorThird",
516
+ "perfectFourth"
517
+ ]);
518
+ const eyebrowTypographyStyleSchema = z.object({
519
+ width: fontWidthSchema.optional(),
520
+ family: z.string().min(1),
521
+ size: z.enum([
522
+ "sm",
523
+ "md",
524
+ "lg"
525
+ ]).optional(),
526
+ weight: z.enum([
527
+ "light",
528
+ "regular",
529
+ "medium",
530
+ "semibold",
531
+ "bold"
532
+ ]).optional(),
533
+ letterSpacing: z.enum([
534
+ "tight",
535
+ "normal",
536
+ "loose",
537
+ "wide"
538
+ ]).optional(),
539
+ case: z.enum(["uppercase", "normal"]).optional()
540
+ });
541
+ const typographySchema = z.object({
542
+ body: bodyTypographyStyleSchema,
543
+ smallHeading: z.object({
544
+ family: z.string().min(1),
545
+ weight: z.enum([
546
+ "regular",
547
+ "medium",
548
+ "semibold",
549
+ "bold"
550
+ ])
551
+ }).optional(),
552
+ headings: z.object({
553
+ default: headingTypographyStyleSchema,
554
+ h1: headingTypographyOverridesSchema,
555
+ h2: headingTypographyOverridesSchema,
556
+ h3: headingTypographyOverridesSchema,
557
+ h4: headingTypographyOverridesSchema.optional(),
558
+ h5: headingTypographyOverridesSchema.optional(),
559
+ h6: headingTypographyOverridesSchema.optional()
560
+ }),
561
+ scale: typographyScaleSchema,
562
+ proseLinkStyle: proseLinkStyleSchema.optional(),
563
+ eyebrow: eyebrowTypographyStyleSchema.optional()
564
+ }).superRefine((typography, ctx) => {
565
+ [
566
+ {
567
+ style: typography.body,
568
+ family: typography.body.family,
569
+ path: ["body", "width"]
570
+ },
571
+ {
572
+ style: typography.headings.default,
573
+ family: typography.headings.default.family,
574
+ path: [
575
+ "headings",
576
+ "default",
577
+ "width"
578
+ ]
579
+ },
580
+ ...[
581
+ "h1",
582
+ "h2",
583
+ "h3",
584
+ "h4",
585
+ "h5",
586
+ "h6"
587
+ ].map((level) => ({
588
+ style: typography.headings[level],
589
+ family: typography.headings.default.family,
590
+ path: [
591
+ "headings",
592
+ level,
593
+ "width"
594
+ ]
595
+ })),
596
+ {
597
+ style: typography.eyebrow,
598
+ family: typography.eyebrow?.family ?? "",
599
+ path: ["eyebrow", "width"]
600
+ }
601
+ ].forEach(({ style, family, path }) => {
602
+ if (style?.width == null) return;
603
+ const range = getFontWidthRange(family);
604
+ if (!range || style.width < range.min || style.width > range.max) ctx.addIssue({
605
+ code: "custom",
606
+ path,
607
+ message: range ? `Font width must be between ${range.min}% and ${range.max}% for ${family}.` : `Font width is not declared for ${family}.`
608
+ });
609
+ });
610
+ });
611
+ //#endregion
612
+ //#region ../site-contracts/src/theme/componentStyles.ts
613
+ /**
614
+ * Shared Component Style Schemas
615
+ *
616
+ * Reusable schemas for border and shadow styling that can be shared across
617
+ * themed components (header, buttons, cards, accordions, inputs).
618
+ *
619
+ * Design decisions:
620
+ * - Shadow elevation uses CSS-aligned names (none/sm/md/lg/xl/2xl)
621
+ * - Shadow softness is controlled globally, not per-component
622
+ * - Border position is component-specific, not in shared schema
623
+ */
624
+ /**
625
+ * Shared border schema for themed components.
626
+ * Position is excluded - each component determines its own border position.
627
+ */
628
+ const componentBorderSchema = z.object({
629
+ width: z.enum([
630
+ "none",
631
+ "hairline",
632
+ "thin",
633
+ "medium",
634
+ "thick"
635
+ ]).default("none"),
636
+ style: z.enum(["solid", "dashed"]).default("solid"),
637
+ colorToken: themeColorTokenSchema.optional()
638
+ });
1539
639
  /**
1540
- * CSS At-Rule Validation Schemas
1541
- *
1542
- * Zod schemas for validating CSS at-rules.
1543
- * Blocks @import for security.
640
+ * Shared shadow schema for themed components.
641
+ * Softness is inherited from global theme, not configurable per-component.
1544
642
  */
643
+ const componentShadowSchema = z.object({ elevation: z.enum([
644
+ "none",
645
+ "sm",
646
+ "md",
647
+ "lg",
648
+ "xl",
649
+ "2xl"
650
+ ]).default("sm") });
651
+ //#endregion
652
+ //#region ../site-contracts/src/theme/customCssAtRules.ts
1545
653
  /** Valid keyframe offset values - requires % for numeric values */
1546
654
  const KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
1547
655
  /** Valid animation name (CSS identifier) */
@@ -1640,301 +748,7 @@ const customCssAtRuleSchema = z.discriminatedUnion("type", [
1640
748
  */
1641
749
  const customCssAtRulesSchema = z.array(customCssAtRuleSchema).optional();
1642
750
  //#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
751
+ //#region ../site-contracts/src/theme/headerContainer.ts
1938
752
  const headerContainerSchema = z.object({
1939
753
  rounded: z.enum([
1940
754
  "none",
@@ -1956,7 +770,149 @@ const headerContainerSchema = z.object({
1956
770
  opacity: z.number().min(0).max(1).default(.12)
1957
771
  }).optional();
1958
772
  //#endregion
1959
- //#region ../theme-core/src/schema.ts
773
+ //#region ../site-contracts/src/theme/headerInteraction.ts
774
+ /**
775
+ * The palettes that fill the nav link with a colour on hover and focus. Each
776
+ * one names a background/foreground token pair.
777
+ */
778
+ const headerInteractionPillPaletteValues = [
779
+ "primary",
780
+ "secondary",
781
+ "accent"
782
+ ];
783
+ /**
784
+ * "No pill": a colour change on hover rather than a filled background.
785
+ *
786
+ * The palette step writes nothing (#1318 Phase 4c decision 2), but on a
787
+ * foreground-adaptive style that is not the end of the story: the hover colour
788
+ * is derived from the resolved opening foreground at render time, paired with
789
+ * the resting colour, so `quiet` resolves to a definite colour rather than to
790
+ * whatever brand token the recipe happened to name. See
791
+ * `applyOpeningForeground`.
792
+ *
793
+ * It exists because "a colour change on hover, no filled background" was not
794
+ * expressible in the vocabulary, and it is what
795
+ * `anna-raven-therapy-and-yoga` and `kirtan-lucy` have rendered since before
796
+ * the palette existed. Without it those two rows can only be classified as a
797
+ * conscious visual change.
798
+ */
799
+ const headerInteractionQuietPalette = "quiet";
800
+ const headerInteractionPaletteValues = [...headerInteractionPillPaletteValues, headerInteractionQuietPalette];
801
+ const headerInteractionPaletteSchema = z.enum(headerInteractionPaletteValues);
802
+ //#endregion
803
+ //#region ../site-contracts/src/theme/headerScroll.ts
804
+ const headerScrollTreatmentSchema = z.discriminatedUnion("kind", [z.object({
805
+ kind: z.literal("contrast-glass"),
806
+ backgroundTone: z.enum(["light", "dark"])
807
+ })]).optional();
808
+ //#endregion
809
+ //#region ../site-contracts/src/theme/logoFacts.ts
810
+ const brandDisplayModeValues = [
811
+ "auto",
812
+ "logo-only",
813
+ "logo-plus-title",
814
+ "title-only"
815
+ ];
816
+ const logoAccommodationPatternValues = [
817
+ "title-only",
818
+ "inline-logo-only",
819
+ "inline-wordmark",
820
+ "inline-mark-with-title",
821
+ "logo-plate",
822
+ "centered-badge",
823
+ "popout-badge",
824
+ "centered-masthead",
825
+ "hero-badge"
826
+ ];
827
+ const logoSizePolicyValues = [
828
+ "auto",
829
+ "compact",
830
+ "standard",
831
+ "generous",
832
+ "display"
833
+ ];
834
+ //#endregion
835
+ //#region ../site-contracts/src/theme/colourSeeds.ts
836
+ /** Owner colours in priority order, validated once at the input boundary. */
837
+ const colourSeedsSchema = z.union([z.tuple([hexColorSchema]), z.tuple([hexColorSchema, hexColorSchema])]).refine((seeds) => seeds.length === 1 || seeds[0] !== seeds[1], { message: "Choose distinct colours" });
838
+ //#endregion
839
+ //#region ../site-contracts/src/theme/palette.ts
840
+ const colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
841
+ const paletteColorSchema = z.object({
842
+ name: z.string().min(1),
843
+ hex: colourHexString
844
+ });
845
+ const paletteMetaSchema = z.object({
846
+ mode: z.enum(["light", "dark"]),
847
+ seeds: colourSeedsSchema.optional()
848
+ });
849
+ const paletteSchema = z.object({
850
+ colors: z.array(paletteColorSchema),
851
+ meta: paletteMetaSchema
852
+ }).transform((palette, ctx) => {
853
+ const colors = paletteColorsFromEntries(palette.colors);
854
+ if (!colors.ok) {
855
+ ctx.addIssue({
856
+ code: "custom",
857
+ message: `Invalid complete palette: ${colors.error.kind}`
858
+ });
859
+ return z.NEVER;
860
+ }
861
+ return {
862
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
863
+ name: String(name),
864
+ hex: String(hex)
865
+ })),
866
+ meta: palette.meta
867
+ };
868
+ });
869
+ const skinTokensSchema = z.partialRecord(z.enum([
870
+ "radius",
871
+ "rule",
872
+ "mark-length",
873
+ "mark-weight",
874
+ "plate",
875
+ "gutter",
876
+ "copy-gap",
877
+ "stack-gap",
878
+ "shadow-offset",
879
+ "rotation",
880
+ "wrap",
881
+ "margin",
882
+ "rail",
883
+ "main"
884
+ ]), z.string()).superRefine((tokens, context) => {
885
+ Object.entries(tokens).forEach(([name, value]) => {
886
+ if (!(name === "rail" || name === "main" ? /^(?:[1-9]|1[0-2])$/.test(value) : /^-?(?:0|\d+(?:\.\d+)?(?:px|rem|em|deg|%))$/.test(value))) context.addIssue({
887
+ code: "custom",
888
+ path: [name],
889
+ message: "Invalid skin measurement"
890
+ });
891
+ });
892
+ });
893
+ const skinMarksSchema = z.enum(["primary"]);
894
+ /** The booking bar's paint and shape as applied from an arrangement style (issue 1659); the plain bar when absent. */
895
+ const skinBookingBarSchema = z.object({
896
+ token: z.string().refine((value) => {
897
+ const parts = parseColorTokenParts(value);
898
+ return parts.kind === "token" && parts.opacityPercent === null && parts.token === value && isThemeColorToken(value);
899
+ }, "Expected a plain Theme V2 colour token, without spaces or opacity"),
900
+ shape: z.enum(["edge-to-edge", "field"])
901
+ });
902
+ const themeLookMetadataSchema = z.object({
903
+ name: z.string().min(1).max(30),
904
+ description: z.string().min(1).max(400),
905
+ rationale: z.string().min(1).max(400),
906
+ siteStyleId: z.string().min(1).transform(asSiteStyleId).optional(),
907
+ skin: z.string().min(1).optional(),
908
+ skinTokens: skinTokensSchema.optional(),
909
+ fontLoading: fontLoadingSchema.optional(),
910
+ /** Which palette colour an arrangement style derives its graphic marks from (D9); accent when absent. */
911
+ skinMarks: skinMarksSchema.optional(),
912
+ skinBookingBar: skinBookingBarSchema.optional()
913
+ });
914
+ //#endregion
915
+ //#region ../site-contracts/src/theme/schema.ts
1960
916
  const axesSchema = z.object({
1961
917
  tone: z.enum([
1962
918
  "minimal",
@@ -2516,9 +1472,54 @@ const themeSchema = z.object({
2516
1472
  */
2517
1473
  styleGroups: z.record(z.string(), z.array(z.string())).optional()
2518
1474
  });
2519
- z.object({
2520
- message: z.string().min(1),
2521
- themes: z.array(themeSchema).length(3)
2522
- });
2523
1475
  //#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 };
1476
+ //#region ../theme-core/src/buttons/parseThemeForPersistence.ts
1477
+ /**
1478
+ * Proves that every persisted button variant compiles against the theme's
1479
+ * concrete palette. Public rendering may still recover from malformed
1480
+ * external/runtime input, but persistence boundaries must reject it.
1481
+ */
1482
+ function parseThemeForPersistence(value) {
1483
+ const parsed = themeSchema.safeParse(value);
1484
+ if (!parsed.success) return {
1485
+ ok: false,
1486
+ error: {
1487
+ kind: "invalid-theme-schema",
1488
+ issues: parsed.error.issues
1489
+ }
1490
+ };
1491
+ const parsedTheme = parsed.data;
1492
+ const theme = parsedTheme.buttons && !parsedTheme.buttons.surfacePolicy ? {
1493
+ ...parsedTheme,
1494
+ buttons: {
1495
+ ...parsedTheme.buttons,
1496
+ surfacePolicy: createStandardButtonSurfacePolicy()
1497
+ }
1498
+ } : parsedTheme;
1499
+ if (!theme.buttons) return {
1500
+ ok: true,
1501
+ value: theme
1502
+ };
1503
+ const palette = expandPalette(theme.palette);
1504
+ for (const variant of theme.buttons.variants) {
1505
+ const result = compileButtonColourStates({
1506
+ variant,
1507
+ global: theme.buttons.global,
1508
+ palette
1509
+ });
1510
+ if (!result.ok) return {
1511
+ ok: false,
1512
+ error: {
1513
+ kind: "invalid-button-colour-contract",
1514
+ variantId: variant.id,
1515
+ cause: result.error
1516
+ }
1517
+ };
1518
+ }
1519
+ return {
1520
+ ok: true,
1521
+ value: theme
1522
+ };
1523
+ }
1524
+ //#endregion
1525
+ export { themeSchema as n, parseThemeForPersistence as t };