@riverbankcms/sdk 0.166.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 (230) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +5 -0
  3. package/dist/_dts/{BlocksIslandsHydrator-CPvN6RBW.d.ts → BlocksIslandsHydrator-CiD_VVGM.d.ts} +1 -1
  4. package/dist/_dts/{Page-rW0xgQCA.d.ts → Page-Bj6VJRS5.d.ts} +9 -8
  5. package/dist/_dts/{SdkPreviewMode-BWZh2WCk.d.ts → SdkPreviewMode-ChpsnwDX.d.ts} +2 -2
  6. package/dist/_dts/{client-D4BXQEZc.d.ts → client-C8mfUxrJ.d.ts} +73 -35
  7. package/dist/_dts/{content-types-MUzta0l9.d.ts → content-types-_vXZyR4H.d.ts} +2 -2
  8. package/dist/_dts/{contracts-Cl9Xh1DO.d.ts → contracts-CJFfrVKU.d.ts} +9 -5
  9. package/dist/_dts/{footerPageOutline-4BgLKehl.d.ts → footerPageOutline-CMegb23G.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-BsmJ0qKh.d.ts → generatePageMetadata-D9YdAIMh.d.ts} +2 -2
  11. package/dist/_dts/{index-DdcwPqQN.d.ts → index-BQXaZ7aY.d.ts} +4 -4
  12. package/dist/_dts/{index-ahxQCUc7.d.ts → index-Bpr-wT5k.d.ts} +2 -2
  13. package/dist/_dts/{index--qflsCiy.d.ts → index-C7_Rz8EY.d.ts} +3 -3
  14. package/dist/_dts/{index-kQ5xkM6X.d.ts → index-Cx2BQlHL.d.ts} +3 -3
  15. package/dist/_dts/{index-Bmboeb49.d.ts → index-Dgz6yhsy.d.ts} +1 -1
  16. package/dist/_dts/index-Vh8B9FSa.d.ts +14 -0
  17. package/dist/_dts/{index-BgJ2aU5c.d.ts → index-vR3p9Bu-.d.ts} +2 -2
  18. package/dist/_dts/{loadContent-BG5IAV-V.d.ts → loadContent-dhWSgLeS.d.ts} +7 -7
  19. package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
  20. package/dist/_dts/{index-wbBZ0awa.d.ts → request-BrYhNV9Z.d.ts} +81287 -47810
  21. package/dist/_dts/{resolveBlockData-Cmcle_zV.d.ts → resolveBlockData-BfSHm8Ms.d.ts} +5 -5
  22. package/dist/_dts/{resolvePageContent-BRJUTFoH.d.ts → resolvePageContent-gZJ4i1wN.d.ts} +2 -2
  23. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  25. package/dist/_dts/sdk/src/client.d.ts +7 -7
  26. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  27. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  29. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  30. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  31. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  32. package/dist/_dts/sdk/src/index.d.ts +8 -8
  33. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/metadata/index.d.ts +6 -1
  35. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  36. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  37. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  38. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  39. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  40. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  43. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  45. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -5
  48. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  49. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  50. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  51. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  52. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  53. package/dist/_dts/sdk/src/server.d.ts +5 -5
  54. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  55. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  56. package/dist/_dts/{types-BX3Y-EW3.d.ts → types-BB33-Spd.d.ts} +3 -3
  57. package/dist/_dts/{types-DF54stxv.d.ts → types-BVFXYtRg.d.ts} +7 -7
  58. package/dist/_dts/{types-DuiHLiPo.d.ts → types-FOsJ-KYb.d.ts} +4 -2
  59. package/dist/_dts/{validation-Bxi0f81D.d.ts → validation-DckTc6TQ.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-DwiRGtgh.mjs → BlocksIslandsHydrator-DcwEaliO.mjs} +21 -21
  61. package/dist/client/BookingMailingListNote-Dsugoe-n.mjs +946 -0
  62. package/dist/client/BookingQuestionFields-Bhh0cvsl.mjs +359 -0
  63. package/dist/client/{CalendarNavigationChevron-5a0x0vcC.mjs → CalendarNavigationChevron-CNe3ZjdC.mjs} +166 -17
  64. package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-B2qLkPRB.mjs → DemoBookingPortalAccess-BeiZxEUJ.mjs} +7 -7
  66. package/dist/client/{EventCalendar.client-BhADnDCg.mjs → EventCalendar.client-BL943-tl.mjs} +11 -30
  67. package/dist/client/{EventCombined.client-jik34zTb.mjs → EventCombined.client-BFVxECTp.mjs} +137 -61
  68. package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
  69. package/dist/client/{EventItem-CMKrtkT7.mjs → EventItem-BIc4gjiD.mjs} +86 -17
  70. package/dist/client/{EventListWeekNavigation-AGHjxy6C.mjs → EventListWeekNavigation-a0QEIEf0.mjs} +1 -1
  71. package/dist/client/{EventListing.client-DZeDM0Qt.mjs → EventListing.client-CEFTC3jH.mjs} +3 -3
  72. package/dist/client/{EventListing.view-3BBRdNVa.mjs → EventListing.view-Bt2sBBms.mjs} +41 -50
  73. package/dist/client/{EventRegistrationPayment-CpNcpga4.mjs → EventRegistrationPayment-D9YBNb_E.mjs} +255 -40
  74. package/dist/client/{LocationMapActions-D5-H9ooQ.mjs → LocationMapActions-gqzt5gkW.mjs} +2 -2
  75. package/dist/client/{MapDrawingSvg-C30geMl-.mjs → MapDrawingSvg-13JQI7_z.mjs} +22 -2
  76. package/dist/client/{Page-DNDZLRlB.mjs → Page-D_M2Vxz3.mjs} +26063 -22139
  77. package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
  78. package/dist/client/{StepIndicator-Bin7YR0A.mjs → StepIndicator-CaN8snZ8.mjs} +3 -3
  79. package/dist/client/{TabBarFragment-_IAthZVM.mjs → TabBarFragment-DkVKtK5a.mjs} +19 -19
  80. package/dist/client/{ThemedButton-8jUc02mZ.mjs → ThemedButton-BdnEwA38.mjs} +2 -5
  81. package/dist/client/accessibleSurfaces-chpD4C2c.mjs +4278 -0
  82. package/dist/client/{accordion-uVqNowRX.mjs → accordion-DE7OG--d.mjs} +1 -1
  83. package/dist/client/{booking-form.client-w-PvyWBv.mjs → booking-form.client-CS1PPjw7.mjs} +842 -374
  84. package/dist/client/{bookingForm-DNMojb6A.mjs → bookingForm-DE2CwIU9.mjs} +5 -4
  85. package/dist/client/{src-DjnxOjXG.mjs → bookingQuestionValues-BjcyCru5.mjs} +88 -1
  86. package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
  87. package/dist/client/bookings.mjs +18 -13
  88. package/dist/client/{carousel-C8kxI3Dm.mjs → carousel-DZyUdnFh.mjs} +3 -3
  89. package/dist/client/{carousel.client-BO7sCEpH.mjs → carousel.client-BD4DXMtI.mjs} +62 -16
  90. package/dist/client/{carousel.shared-DBnWEJzo.mjs → carousel.shared-BFQ3kBEw.mjs} +6 -3
  91. package/dist/client/{cart-DCxjE3Is.mjs → cart-D7HkkNwe.mjs} +3 -3
  92. package/dist/client/{cart.client-Ceeng8fB.mjs → cart.client-H4sv2TpD.mjs} +1 -1
  93. package/dist/client/{checkout-B0EKbeVv.mjs → checkout-2qVyG-Sh.mjs} +3 -3
  94. package/dist/client/{checkout.client-DtPj3fYk.mjs → checkout.client-DAjrBZ74.mjs} +1 -1
  95. package/dist/client/client.mjs +325 -65
  96. package/dist/client/{context-n6IZigd3.mjs → context-DXmIbXCK.mjs} +300 -3
  97. package/dist/client/{cta-CDeAwYoN.mjs → cta-DP_IBnq3.mjs} +2 -2
  98. package/dist/client/{dateFormatting-BWPzdeZE.mjs → dateFormatting-CwrkFZTr.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BdXu0fj-.mjs → demoPortalMagicLink-DQXK-Fh6.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-VHfv8M6-.mjs → enhanceHeaderSection-DheQj7rg.mjs} +4 -4
  101. package/dist/client/{event-details.client-Cfr1_Cj4.mjs → event-details.client-C5UufcRp.mjs} +1 -1
  102. package/dist/client/{event-registration.client-BhygihpQ.mjs → event-registration.client-CMGg63IU.mjs} +73 -239
  103. package/dist/client/{eventCalendar-B4XCL9u6.mjs → eventCalendar-DlD0GCEy.mjs} +4 -4
  104. package/dist/client/{eventCombined-DVjz4wdf.mjs → eventCombined-DoSi8p_l.mjs} +4 -4
  105. package/dist/client/{eventDetails-B0DA1Nw1.mjs → eventDetails-DzuQYgmO.mjs} +2 -2
  106. package/dist/client/{eventListing-2-xjn2nz.mjs → eventListing-CkiMjl0g.mjs} +4 -4
  107. package/dist/client/{eventRegistration-ng4iGo9O.mjs → eventRegistration-CjS3Zpjp.mjs} +4 -4
  108. package/dist/client/{form-BeNQiZ2V.mjs → form-DgQqm7T2.mjs} +3 -3
  109. package/dist/client/{form.client-BFdCKlp7.mjs → form.client-BI9Dcsq5.mjs} +5 -5
  110. package/dist/client/{form.parts-C7gLK3jh.mjs → form.parts-DevF0L_A.mjs} +3 -3
  111. package/dist/client/{formatDate-CWfelfMt.mjs → formatDate-DDyURjoe.mjs} +1 -1
  112. package/dist/client/gifting/client.mjs +3 -3
  113. package/dist/client/{headerSection-CalNAShx.mjs → headerSection-DYIG6Pwb.mjs} +2 -2
  114. package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
  115. package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
  116. package/dist/client/{newsletter-form.client-Dq7GHGXU.mjs → newsletter-form.client-BWp7Y1e1.mjs} +6 -6
  117. package/dist/client/{newsletter-form.parts-BSMDYQiS.mjs → newsletter-form.parts-Dg8s9NwJ.mjs} +2 -2
  118. package/dist/client/{newsletterForm-snzZ4L6i.mjs → newsletterForm-DnPraMzx.mjs} +3 -3
  119. package/dist/client/{noop-D-RG9eR3.mjs → noop-ByFRHYQ2.mjs} +456 -491
  120. package/dist/client/portal/client.mjs +76 -229
  121. package/dist/client/{product-detail.client-Gu0INDb7.mjs → product-detail.client-BFAgHrdg.mjs} +1 -1
  122. package/dist/client/{product-list.client-BmH40fNf.mjs → product-list.client-DVrs_DyY.mjs} +1 -1
  123. package/dist/client/{productDetail-DsPUmJ0z.mjs → productDetail-D4rvl6Xg.mjs} +3 -3
  124. package/dist/client/{productList-DjGrjOwD.mjs → productList-B8o5AOMX.mjs} +3 -3
  125. package/dist/client/{propsDecoder-kTVPMnfD.mjs → propsDecoder-hhotPP6P.mjs} +5 -5
  126. package/dist/client/{registry.server-CKK_RXZo.mjs → registry.server-Ch3EpupA.mjs} +2296 -2489
  127. package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
  128. package/dist/client/rendering/client.mjs +30 -30
  129. package/dist/client/rendering/islands.mjs +1 -1
  130. package/dist/client/rendering.mjs +10 -9
  131. package/dist/client/{richText-coerce-BcjTX-7h.mjs → richText-coerce-C3LabQ1O.mjs} +1 -1
  132. package/dist/client/{routeIslandApiConfig-CaXesATK.mjs → routeIslandApiConfig-CQGlxId8.mjs} +1 -1
  133. package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
  134. package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
  135. package/dist/client/{shop-commerce-BxYYXLNK.mjs → shop-commerce-VDbVaKY-.mjs} +12 -12
  136. package/dist/client/{shop-commerce-store-Dp3Nl5YK.mjs → shop-commerce-store-DqdgJ8Zw.mjs} +1 -1
  137. package/dist/client/{shop-DLufMauE.mjs → shop-rRXplPGZ.mjs} +3 -3
  138. package/dist/client/{shop.client-CBy9_alG.mjs → shop.client-DdwvMvaK.mjs} +13 -13
  139. package/dist/client/{shop.interactive-BM0NRsFQ.mjs → shop.interactive-C8OvFY06.mjs} +167 -68
  140. package/dist/client/{shopShared-lS23OQE-.mjs → shopShared-BeuJiGPU.mjs} +2 -2
  141. package/dist/client/spam-protection.mjs +1 -1
  142. package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
  143. package/dist/client/{timetableModel-DzRWikCU.mjs → timetableModel-Cko9LRKy.mjs} +13 -158
  144. package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
  145. package/dist/client/{useAvailableSlots-C3LphWDX.mjs → useAvailableSlots-M6QIEiWf.mjs} +3 -3
  146. package/dist/client/{useDiscountApply-SLoWhcen.mjs → useDiscountApply-BJSnyO0f.mjs} +3 -3
  147. package/dist/client/{useDiscountCodeUi-D6a2BJij.mjs → useDiscountCodeUi-D3XnOSCi.mjs} +1 -1
  148. package/dist/client/{useEventPagination-Ccr4TZlm.mjs → useEventPagination-PhTIoFVX.mjs} +7 -7
  149. package/dist/client/{view-DAVEoe8A.mjs → view-448wvvEY.mjs} +21 -12
  150. package/dist/client/{view-8w4GA8rf.mjs → view-L_mkgtnk.mjs} +4 -4
  151. package/dist/client/{site-styles-DELkUk9s.mjs → wizardSteps-CFulHWnT.mjs} +19371 -17045
  152. package/dist/preview-next/client/{ArrangementLookControls-DY5TzhEa.mjs → ArrangementLookControls-BpvnOGlN.mjs} +26 -17
  153. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
  154. package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
  155. package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
  156. package/dist/preview-next/client/{PreviewEditorSidebar-DdnhmdFO.mjs → PreviewEditorSidebar-C0OtdWu_.mjs} +432 -127
  157. package/dist/preview-next/client/{PreviewEditorUI-C7ZmYE33.mjs → PreviewEditorUI-Csc5vH5k.mjs} +6 -6
  158. package/dist/preview-next/client/{PreviewShell-DnO38NaL.mjs → PreviewShell-BOLH_pm-.mjs} +252 -158
  159. package/dist/preview-next/client/{SdkPreviewModeRuntime-D2OtoRMB.mjs → SdkPreviewModeRuntime-CKodLReY.mjs} +31 -32
  160. package/dist/preview-next/client/{SiteChromeCustomizeButton-eIu2RejJ.mjs → SiteChromeCustomizeButton-BeEZpeKn.mjs} +19484 -18082
  161. package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
  162. package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
  163. package/dist/preview-next/client/{previewAssistantSlot-Bp1AlAxx.mjs → previewAssistantSlot-BBdN5kfY.mjs} +21470 -16697
  164. package/dist/preview-next/client/{previewChromeSurface-D2cREDJ5.mjs → previewChromeSurface-VZtGwPuH.mjs} +1 -1
  165. package/dist/preview-next/client/runtime.mjs +3 -3
  166. package/dist/preview-next/client/{sdk-runtime-DK0PUhLL.mjs → sdk-runtime-kiZkMcuR.mjs} +2 -2
  167. package/dist/preview-next/client/{useAutosaveStatus--Pw8vnef.mjs → useAutosaveStatus-BiIHEeE0.mjs} +2 -2
  168. package/dist/preview-next/client/{useBlockCustomizeControls-C1Rl73N4.mjs → useBlockCustomizeControls-BuFLIpmX.mjs} +2 -93
  169. package/dist/preview-next/client/{useOpenBlockForSetup-CL3842FM.mjs → useOpenBlockForSetup-DlxYgmh_.mjs} +1 -1
  170. package/dist/preview-next/keepAlive.mjs +1 -1
  171. package/dist/preview-next/middleware.mjs +1 -1
  172. package/dist/preview-next/{route-contract-Bq7SUX3K.mjs → route-contract-C0sCvCYL.mjs} +248 -0
  173. package/dist/server/{Block.shared-wXr7Iwhs.mjs → Block.shared-Dnhc0Wu5.mjs} +5 -5
  174. package/dist/server/{ThemeScopeCore-BI2mld9R.mjs → ThemeScopeCore-NAQ_zsFu.mjs} +1173 -148
  175. package/dist/server/{accessibleSurfaces-CuN8U_iU.mjs → accessibleSurfaces-108nxyGc.mjs} +520 -129
  176. package/dist/server/{bindings-DjdUq9FR.mjs → bindings-DLoZYUxG.mjs} +2 -2
  177. package/dist/server/{client-07UeMDzA.mjs → client-Bc8jI8zN.mjs} +346 -63
  178. package/dist/server/config-validation.mjs +1 -1
  179. package/dist/server/config.mjs +1 -1
  180. package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
  181. package/dist/server/data/resolveBlockData.mjs +1 -1
  182. package/dist/server/headerVariant-BwR9NV4b.mjs +463 -0
  183. package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-ClpaSlBb.mjs → loadContent-D61gpqHB.mjs} +4 -5
  186. package/dist/server/{loadPage-BwtVqpaA.mjs → loadPage-B4ZYpIcd.mjs} +2 -2
  187. package/dist/server/manifest.mjs +1 -1
  188. package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
  189. package/dist/server/metadata.mjs +5 -1
  190. package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
  191. package/dist/server/next/revalidate.mjs +9 -4
  192. package/dist/server/next.mjs +6 -6
  193. package/dist/server/{opaqueSurface-3YSDPtDe.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
  194. package/dist/server/{overrideResolution-Du_w3LY4.mjs → overrideResolution-CDReKy2P.mjs} +1 -1
  195. package/dist/server/page-converter.mjs +3 -3
  196. package/dist/server/{pageRenderPlan-BShULdc2.mjs → pageRenderPlan-ByVTA7-4.mjs} +375 -171
  197. package/dist/server/{pageRuntimeSupport-C4Dh5-mB.mjs → pageRuntimeSupport-Dzz_Dze6.mjs} +291 -5
  198. package/dist/server/{pageShared-HdKFBpaX.mjs → pageShared-Dk5Ku6hs.mjs} +12184 -11593
  199. package/dist/server/{schema-C2PqHrMo.mjs → parseThemeForPersistence-pJPGfMrf.mjs} +593 -1591
  200. package/dist/server/{prebuild-Cl-bkaMA.mjs → prebuild-CW4M0WEZ.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-C4yUmz-r.mjs → prefetchBlockData-Bvx0SiIM.mjs} +5 -34
  203. package/dist/server/{registry-TFPJdGQi.mjs → registry-Bh0Y25zH.mjs} +6041 -4562
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +3 -3
  208. package/dist/server/rendering.mjs +8 -8
  209. package/dist/server/{resolveBlockData-OHlOXlOE.mjs → resolveBlockData-CnHHst9r.mjs} +1 -1
  210. package/dist/server/{resolveButtonColourStates-lry2ORwX.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +393 -502
  211. package/dist/server/responseMedia-t6gs0cB7.mjs +115 -0
  212. package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
  213. package/dist/server/server.mjs +3 -3
  214. package/dist/server/theme-bridge.mjs +2 -3
  215. package/dist/server/theme.mjs +1 -2
  216. package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
  217. package/dist/server/{validation-DIBFZeMB.mjs → validation-D2bHWSxJ.mjs} +59 -10
  218. package/dist/server/{version-DZWZM1H6.mjs → version-DkM1eAxG.mjs} +1 -1
  219. package/dist/styles/index.css +991 -48
  220. package/package.json +4 -3
  221. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  222. package/dist/_dts/index-mMMvLLAJ.d.ts +0 -31339
  223. package/dist/client/BookingMailingListNote-DOWOZYlK.mjs +0 -331
  224. package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
  225. package/dist/client/events-BmqPeeQm.mjs +0 -20
  226. package/dist/client/site-styles-D8jEPGxA.mjs +0 -3
  227. package/dist/client/useBookingNowIso-Da-f9iHw.mjs +0 -58
  228. package/dist/client/wizardSteps-DNpajrAH.mjs +0 -6926
  229. package/dist/server/parseThemeForPersistence-CJMrEkze.mjs +0 -52
  230. package/dist/server/publicProducts-W9hDRwjz.mjs +0 -64
@@ -1,1180 +1,9 @@
1
- import { At as parseThemeColorToken, B as hexColorSchema, H as paletteColorEntries, Nt as parseColorTokenParts, U as paletteColorsFromEntries, bt as surfaceInkDeclarations, jt as themeColorTokenSchema, kt as isThemeColorToken, pt as SURFACE_INK_CSS_VARS, u as tokenOrCssColorValueSchema, w as buttonSystemSchema } from "./resolveButtonColourStates-lry2ORwX.mjs";
2
- import { i as mediaSchema, n as externalMediaSchema, r as imageMediaSchema, s as videoMediaSchema, t as assetMediaSchema } from "./media-DnlczCMA.mjs";
3
- import { i as declarationsSchema, n as customCssRulesSchema, r as declarationValueSchema, s as selectorSchema, t as blockCustomCssRulesSchema } from "./validation-CDd6m8Ry.mjs";
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
- ];
11
- function isArrangementMode(value) {
12
- return value === "list" || value === "calendar" || value === "week";
13
- }
14
- /**
15
- * Defines a literal-preserving catalog while rejecting top-level extra keys on
16
- * each entry: `defineExactCatalog<Entry>()([{ ... }])`.
17
- */
18
- function defineExactCatalog() {
19
- return (entries) => entries;
20
- }
21
- function asDesignBlockId(value) {
22
- return brandNonEmptyString(value, "DesignBlockId");
23
- }
24
- function asDesignBoundaryId(value) {
25
- const boundaryId = brandNonEmptyString(value, "DesignBoundaryId");
26
- if (!boundaryId.startsWith("boundary:")) throw new Error(`DesignBoundaryId must start with "boundary:". Received: ${value}`);
27
- return boundaryId;
28
- }
29
- function asLayoutVariantKey(value) {
30
- return brandNonEmptyString(value, "LayoutVariantKey");
31
- }
32
- function asAppearancePresetId(value) {
33
- return brandNonEmptyString(value, "AppearancePresetId");
34
- }
35
- function asBoundaryOptionId(value) {
36
- return brandNonEmptyString(value, "BoundaryOptionId");
37
- }
38
- function asPageFlowPresetId(value) {
39
- return brandNonEmptyString(value, "PageFlowPresetId");
40
- }
41
- function asSiteStyleId(value) {
42
- const siteStyleId = brandNonEmptyString(value, "SiteStyleId");
43
- if (!siteStyleId.startsWith("site-style:")) throw new Error(`SiteStyleId must start with "site-style:". Received: ${value}`);
44
- return siteStyleId;
45
- }
46
- function asDesignSystemTemplateId(value) {
47
- return brandNonEmptyString(value, "DesignSystemTemplateId");
48
- }
49
- function toNonEmptyReadonlyArray(values) {
50
- const [first, ...rest] = values;
51
- return first === void 0 ? null : [first, ...rest];
52
- }
53
- function requireNonEmptyReadonlyArray(values, message = "Expected a non-empty array.") {
54
- const result = toNonEmptyReadonlyArray(values);
55
- if (!result) throw new Error(message);
56
- return result;
57
- }
58
- function makeBoundaryId(previousBlockId, nextBlockId) {
59
- return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
60
- }
61
- function assertNever(value, message = "Unhandled Theme V2 variant") {
62
- throw new Error(`${message}: ${String(value)}`);
63
- }
64
- function brandNonEmptyString(value, label) {
65
- if (value.length === 0) throw new Error(`${label} must be a non-empty string.`);
66
- return value;
67
- }
68
- /**
69
- * What a block's own section background field admits, read from its manifest.
70
- * A site style's surface rule may paint a gradient or a photo; a block whose
71
- * `_sectionStyles.background` refuses that paint would be dropped at render
72
- * admission, so the runtime compiler paints the surface's colour equivalent
73
- * instead (see `compileSectionBackground`).
74
- */
75
- const sectionBackgroundPaintValues = [
76
- "color",
77
- "gradient",
78
- "image"
79
- ];
80
- const plainFrame = { kind: "plain" };
81
- function panelFrame(treatment) {
82
- return {
83
- kind: "panel",
84
- treatment
85
- };
86
- }
87
- function flushPanelFrame(options) {
88
- return {
89
- kind: "flush-panel",
90
- treatment: options.treatment ?? "media-panel",
91
- bleed: options.bleed
92
- };
93
- }
94
- function defineFrameCapability(capability) {
95
- return capability;
96
- }
97
- const tileTreatmentValues = [
98
- "default",
99
- "quiet",
100
- "brand-depth"
101
- ];
102
- const eventListTreatmentValues = [
103
- "plain",
104
- "lined-panel",
105
- "ruled-register",
106
- "editorial-register",
107
- "dense-index"
108
- ];
109
- const introCompositionTreatmentValues = ["editorial-statement", "portrait-bio"];
110
- const featureCardCompositionTreatmentValues = ["asymmetric-emphasis", "framed-programme"];
111
- const testimonialsCompositionTreatmentValues = [
112
- "open-editorial",
113
- "evergreen-lead",
114
- "room-and-response",
115
- "open-floor"
116
- ];
117
- /**
118
- * How an offerings preview arranges its groups. Structure only — the group
119
- * card surface is the Look's `cardRole` and the site style's card system.
120
- */
121
- const offeringsPreviewCompositionTreatmentValues = [
122
- "paired-feature-cards",
123
- "open-editorial-columns",
124
- "joined-programme-panel"
125
- ];
126
- const eyebrowTreatmentValues = [
127
- "plain",
128
- "accent",
129
- "pill",
130
- "accent-pill",
131
- "pill-bounce",
132
- "accent-pill-bounce"
133
- ];
134
- const visibleHeadingDecorationFamilyValues = ["organic-squiggle", "short-center-rule"];
135
- const headingDecorationOverrideValues = ["site-default", "off"];
136
- const headingDecorationColorTokenValues = [
137
- "text",
138
- "primary",
139
- "secondary",
140
- "accent",
141
- "border",
142
- "muted"
143
- ];
144
- const noHeadingDecoration = { family: "none" };
145
- const accordionIconSetValues = [
146
- "plus",
147
- "chevron",
148
- "caret",
149
- "minimal-cross"
150
- ];
151
- const accordionIconColorTokenValues = [
152
- "text",
153
- "muted",
154
- "primary",
155
- "secondary",
156
- "accent",
157
- "current"
158
- ];
159
- const accordionIconMotionValues = [
160
- "none",
161
- "rotate",
162
- "swap"
163
- ];
164
- function defineBlockDesignCapability(capability) {
165
- return {
166
- ...capability,
167
- kind: "designed",
168
- looks: capability.looks ?? "not-applicable",
169
- sectionBackgroundPaints: admittedSectionBackgroundPaints(capability.sectionBackgroundPaints),
170
- sectionHeights: capability.sectionHeights ?? ["default"],
171
- imageSurfaceTreatments: capability.imageSurfaceTreatments ?? ["none"],
172
- imageSurfaceMotions: capability.imageSurfaceMotions ?? ["static"],
173
- tileTreatments: capability.tileTreatments ?? ["default"],
174
- eventListTreatments: capability.eventListTreatments ?? ["plain"],
175
- eyebrowTreatments: capability.eyebrowTreatments ?? ["plain"],
176
- ...capability.headingDecorations ? { headingDecorations: capability.headingDecorations } : {},
177
- headingDecorationCapability: capability.headingDecorationCapability ?? { kind: "unsupported" },
178
- compositions: capability.compositions ?? { kind: "none" },
179
- ...capability.accordionIconSets ? { accordionIconSets: capability.accordionIconSets } : {}
180
- };
181
- }
182
- /** Absent means the block admits every section background paint. */
183
- function admittedSectionBackgroundPaints(paints) {
184
- return paints ?? sectionBackgroundPaintValues;
185
- }
186
- //#endregion
187
- //#region ../theme-core/src/site-styles/rawStyleFields.ts
188
- const themeV2RuntimeStyleFieldNames = [
189
- "_frameStyles",
190
- "_sectionStyles",
191
- "_containerStyles",
192
- "_cardStyles"
193
- ];
194
- const themeV2BlockSpecificRawStyleFieldNames = [
195
- "_contentCardStyles",
196
- "_heroLayoutStyles",
197
- "_textCardStyles"
198
- ];
199
- const themeV2NormalEditorRawStyleFieldNames = [
200
- ...themeV2RuntimeStyleFieldNames,
201
- ...themeV2BlockSpecificRawStyleFieldNames,
202
- "styleGroup"
203
- ];
204
- new Set(themeV2NormalEditorRawStyleFieldNames);
205
- const themeV2CompilerOwnedFieldNames = [...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
206
- const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
207
- const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
208
- const staleTransitionStyleGroupPrefix = "site-style-transition-";
209
- /**
210
- * A `styleGroup` in the retired `site-style-transition-*` namespace is residue
211
- * from the old per-block transition path (issue 1422). Any other value is
212
- * authored and must survive.
213
- */
214
- function isStaleTransitionStyleGroup(value) {
215
- return typeof value === "string" && value.startsWith(staleTransitionStyleGroupPrefix);
216
- }
217
- /** Drops a stale transition `styleGroup`, leaving authored values untouched. */
218
- function stripStaleTransitionStyleGroup(content) {
219
- if (!isStaleTransitionStyleGroup(content.styleGroup)) return { ...content };
220
- const { styleGroup: _stale, ...rest } = content;
221
- return rest;
222
- }
223
- //#endregion
224
- //#region ../theme-core/src/boxBackgroundSchema.ts
225
- const boxBackgroundOverlaySchema = z.preprocess(normalizeAuthoringOpacity, z.discriminatedUnion("type", [
226
- z.object({ type: z.literal("none") }),
227
- z.object({
228
- type: z.literal("color"),
229
- color: tokenOrCssColorValueSchema.nullable().optional(),
230
- opacity: z.number().min(0).max(1).nullable().optional()
231
- }),
232
- z.object({
233
- type: z.literal("gradient"),
234
- gradient: z.string().nullable().optional(),
235
- opacity: z.number().min(0).max(1).nullable().optional()
236
- })
237
- ]));
238
- const commonSchema = z.object({
239
- contentOwner: z.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
240
- textColor: tokenOrCssColorValueSchema.nullable().optional(),
241
- headingColor: tokenOrCssColorValueSchema.nullable().optional(),
242
- linkColor: tokenOrCssColorValueSchema.nullable().optional(),
243
- supportingColor: tokenOrCssColorValueSchema.nullable().optional()
244
- });
245
- const mediaPresentationSchema = commonSchema.extend({
246
- opacity: z.preprocess(normalizeOpacity, z.number().min(0).max(1).nullable()).optional(),
247
- objectFit: z.enum([
248
- "fill",
249
- "fit",
250
- "original",
251
- "custom"
252
- ]).nullable().optional(),
253
- scale: z.string().nullable().optional(),
254
- position: z.string().nullable().optional(),
255
- motion: z.enum(["static", "fixed-frame"]).nullable().optional(),
256
- overflow: z.boolean().nullable().optional(),
257
- overlay: boxBackgroundOverlaySchema.nullable().optional()
258
- });
259
- const boxBackgroundSchema = z.discriminatedUnion("type", [
260
- commonSchema.extend({
261
- type: z.literal("color"),
262
- color: tokenOrCssColorValueSchema.nullable().optional(),
263
- /**
264
- * Compiler-owned. The scrim a site-style colour surface lays over media
265
- * that replaces it (a Look's band meeting an authored photo), sized so the
266
- * surface's foreground stays legible over any pixel. A colour background
267
- * never draws it itself; `resolveSectionBackground` moves it onto the
268
- * merged media background as its overlay.
269
- */
270
- mediaScrim: boxBackgroundOverlaySchema.nullable().optional()
271
- }),
272
- commonSchema.extend({
273
- type: z.literal("gradient"),
274
- gradient: z.string().nullable().optional(),
275
- gradientPresetId: z.string().min(1).nullable().optional(),
276
- /** Compiler-owned; see the colour branch. */
277
- mediaScrim: boxBackgroundOverlaySchema.nullable().optional()
278
- }),
279
- mediaPresentationSchema.extend({
280
- type: z.literal("image"),
281
- image: imageMediaSchema.nullable().optional()
282
- }),
283
- mediaPresentationSchema.extend({
284
- type: z.literal("video"),
285
- image: videoMediaSchema.nullable().optional(),
286
- showVideoOnMobile: z.boolean().nullable().optional()
287
- })
288
- ]);
289
- /** Application rendering sources are admitted separately from saved references. */
290
- const runtimeBoxBackgroundSchema = z.discriminatedUnion("type", [
291
- boxBackgroundSchema.options[0],
292
- boxBackgroundSchema.options[1],
293
- boxBackgroundSchema.options[2].extend({ image: z.union([
294
- imageMediaSchema,
295
- externalMediaSchema.extend({ type: z.literal("image") }),
296
- assetMediaSchema.extend({ type: z.literal("image") })
297
- ]).nullable().optional() }),
298
- boxBackgroundSchema.options[3].extend({ image: z.union([
299
- videoMediaSchema,
300
- externalMediaSchema.extend({ type: z.literal("video") }),
301
- assetMediaSchema.extend({ type: z.literal("video") })
302
- ]).nullable().optional() })
303
- ]);
304
- function normalizeAuthoringOpacity(value) {
305
- if (!isRecord(value)) return value;
306
- return {
307
- ...value,
308
- opacity: normalizeOpacity(value.opacity)
309
- };
310
- }
311
- function normalizeOpacity(value) {
312
- return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
313
- }
314
- function isRecord(value) {
315
- return typeof value === "object" && value !== null && !Array.isArray(value);
316
- }
317
- //#endregion
318
- //#region ../theme-core/src/interactive/baseSchema.ts
319
- /**
320
- * Shared Base Schemas for Interactive Elements
321
- *
322
- * These Zod schemas are shared by buttons and nav links for DRY architecture.
323
- */
324
- /**
325
- * Typography settings shared by buttons and nav links
326
- */
327
- const interactiveTypographySchema = z.object({
328
- /** Font family source */
329
- typography: z.enum(["body", "heading"]).default("body"),
330
- /** Font weight */
331
- fontWeight: z.enum([
332
- "regular",
333
- "medium",
334
- "semibold",
335
- "bold"
336
- ]).default("medium"),
337
- /** Text transform */
338
- textTransform: z.enum([
339
- "none",
340
- "uppercase",
341
- "capitalize"
342
- ]).default("none"),
343
- /** Italic style */
344
- italic: z.boolean().default(false)
345
- });
346
- /**
347
- * Effect application reference (shared between buttons and nav)
348
- */
349
- const effectApplicationSchema = z.object({
350
- /** Effect preset ID */
351
- effectId: z.string(),
352
- /** User-provided customization options */
353
- options: z.record(z.string(), z.any()).optional()
354
- });
355
- /**
356
- * Effect composition by state (shared pattern)
357
- */
358
- const effectCompositionSchema = z.object({
359
- /** Effects always applied */
360
- base: z.array(effectApplicationSchema).optional(),
361
- /** Effects applied on hover */
362
- hover: z.array(effectApplicationSchema).optional(),
363
- /** Effects applied on active/pressed */
364
- active: z.array(effectApplicationSchema).optional(),
365
- /** Effects applied on focus */
366
- focus: z.array(effectApplicationSchema).optional()
367
- });
368
- const policiesById = {
369
- "darken-background": "other",
370
- "lighten-background": "other",
371
- "fade-background": "other",
372
- "opacity-reduce": "other",
373
- "animated-gradient": "other",
374
- "background-on-hover": "paired-hover",
375
- "background-on-hover-alpha": "paired-hover",
376
- "border-glow": "other",
377
- "drop-shadow": "other",
378
- "inner-shadow": "other",
379
- "neumorphic-shadow": "other",
380
- "outer-glow": "other",
381
- "retro-3d-shadow": "other",
382
- "scale-up": "other",
383
- "scale-down": "other",
384
- lift: "other",
385
- "press-down": "other",
386
- pop: "other",
387
- "aurora-glow": "other",
388
- "cosmic-stardust": "other",
389
- "gradient-border-fill": "other",
390
- "animated-gradient-border-fill": "other",
391
- "border-bottom-grow": "other",
392
- "gradient-text": "other",
393
- "text-color-change": "text-colour",
394
- "border-color-change": "other",
395
- "sketchy-border": "other",
396
- "inner-dashed-outline": "other",
397
- "pulse-animation": "other",
398
- "nav-underline": "underline",
399
- "nav-frosted-base": "other",
400
- "nav-frosted-hover": "other",
401
- "nav-frosted-active": "other"
402
- };
403
- function navEffectPolicy(effectId) {
404
- return policiesById[effectId] ?? null;
405
- }
406
- //#endregion
407
- //#region ../theme-core/src/navigation/types.ts
408
- /**
409
- * Navigation Link Style Types
410
- *
411
- * Schema and types for composable nav link styling used by header and footer.
412
- */
413
- /**
414
- * Padding preset options for nav links
415
- */
416
- const navLinkPaddingSchema = z.enum([
417
- "none",
418
- "compact",
419
- "default"
420
- ]);
421
- /**
422
- * Horizontal padding override for nav links.
423
- * When set, overrides only the horizontal component of the `padding` preset.
424
- */
425
- const navLinkPaddingXSchema = z.enum([
426
- "none",
427
- "tight",
428
- "compact",
429
- "default",
430
- "relaxed",
431
- "spacious"
432
- ]);
433
- /**
434
- * Border radius options for nav links
435
- */
436
- const navLinkBorderRadiusSchema = z.enum([
437
- "none",
438
- "sm",
439
- "md",
440
- "full"
441
- ]);
442
- /**
443
- * Typography size options for nav links.
444
- */
445
- const navLinkTextSizeSchema = z.enum([
446
- "xs",
447
- "sm",
448
- "base",
449
- "lg",
450
- "xl"
451
- ]);
452
- /**
453
- * Letter spacing options for nav links.
454
- */
455
- const navLinkLetterSpacingSchema = z.enum([
456
- "normal",
457
- "wide",
458
- "wider",
459
- "widest"
460
- ]);
461
- /**
462
- * Optional legibility aid for nav text that floats over uncertain imagery or color.
463
- */
464
- const navLinkContrastTreatmentSchema = z.enum(["none", "soft-glow"]);
465
- /**
466
- * Nav link style schema
467
- *
468
- * Extends interactive typography base with nav-specific settings.
469
- */
470
- const navLinkStyleSchema = z.object({
471
- /** Display name for the style */
472
- name: z.string().min(1).max(30).optional(),
473
- /** Typography settings (inherited from interactive base) */
474
- ...interactiveTypographySchema.shape,
475
- /** Text color token */
476
- colorToken: themeColorTokenSchema.default("text"),
477
- /** Optional text size override */
478
- textSize: navLinkTextSizeSchema.optional(),
479
- /** Optional letter spacing override */
480
- letterSpacing: navLinkLetterSpacingSchema.optional(),
481
- /** Optional text-only contrast treatment for transparent/overlay navigation */
482
- contrastTreatment: navLinkContrastTreatmentSchema.optional(),
483
- /** Hover/active color token (for color-change effects) */
484
- hoverColorToken: themeColorTokenSchema.nullable().optional(),
485
- /** Padding preset */
486
- padding: navLinkPaddingSchema.default("compact"),
487
- /** Horizontal padding override (overrides horizontal component of padding preset) */
488
- paddingX: navLinkPaddingXSchema.optional(),
489
- /** Border radius (for capsule/pill styles) */
490
- borderRadius: navLinkBorderRadiusSchema.default("none"),
491
- /** Composable effects */
492
- effects: effectCompositionSchema.optional()
493
- });
494
- function navLinkHoverColorCandidate(style) {
495
- const effect = style?.effects?.hover?.find((item) => navEffectPolicy(item.effectId) === "text-colour");
496
- return parseThemeColorToken(effect?.options?.hoverColorToken ?? style?.hoverColorToken);
497
- }
498
- function navLinkOwnsHoverForeground(style) {
499
- return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "paired-hover") ?? false;
500
- }
501
- function navLinkOwnsUnderline(style) {
502
- return style?.effects?.hover?.some((effect) => navEffectPolicy(effect.effectId) === "underline") ?? false;
503
- }
504
- /**
505
- * Padding values for nav link padding presets
506
- */
507
- const NAV_LINK_PADDING_MAP = {
508
- none: "0",
509
- compact: "0.5rem 1rem",
510
- default: "0.75rem 1.25rem"
511
- };
512
- /**
513
- * Horizontal padding values for nav link paddingX overrides
514
- */
515
- const NAV_LINK_PADDING_X_MAP = {
516
- none: "0",
517
- tight: "0.5rem",
518
- compact: "0.75rem",
519
- default: "1rem",
520
- relaxed: "1.5rem",
521
- spacious: "2rem"
522
- };
523
- /**
524
- * Border radius values for nav link radius presets
525
- */
526
- const NAV_LINK_BORDER_RADIUS_MAP = {
527
- none: "0",
528
- sm: "0.25rem",
529
- md: "0.5rem",
530
- full: "9999px"
531
- };
532
- /**
533
- * Font size values for nav link text size presets
534
- */
535
- const NAV_LINK_TEXT_SIZE_MAP = {
536
- xs: "0.75rem",
537
- sm: "0.875rem",
538
- base: "1rem",
539
- lg: "1.125rem",
540
- xl: "1.25rem"
541
- };
542
- /**
543
- * Letter spacing values for nav link tracking presets
544
- */
545
- const NAV_LINK_LETTER_SPACING_MAP = {
546
- normal: "0em",
547
- wide: "0.05em",
548
- wider: "0.1em",
549
- widest: "0.15em"
550
- };
551
- //#endregion
552
- //#region ../theme-core/src/site-styles/logoBranding.ts
553
- const logoTextConfidenceValues = [
554
- "low",
555
- "medium",
556
- "high"
557
- ];
558
- const logoAssetShapeValues = [
559
- "none",
560
- "horizontal",
561
- "square",
562
- "portrait",
563
- "tall"
564
- ];
565
- const logoKindValues = [
566
- "mark",
567
- "wordmark",
568
- "lockup",
569
- "badge",
570
- "stacked-wordmark",
571
- "unknown"
572
- ];
573
- const logoDensityValues = [
574
- "simple",
575
- "detailed",
576
- "unknown"
577
- ];
578
- const logoContainsTextSchema = z.discriminatedUnion("kind", [
579
- z.object({
580
- kind: z.literal("contains-text"),
581
- confidence: z.enum(logoTextConfidenceValues),
582
- text: z.string().trim().min(1).max(200).optional()
583
- }),
584
- z.object({
585
- kind: z.literal("no-text"),
586
- confidence: z.enum(logoTextConfidenceValues)
587
- }),
588
- z.object({
589
- kind: z.literal("unknown"),
590
- reason: z.enum([
591
- "analysis-unavailable",
592
- "unsupported-file",
593
- "low-confidence"
594
- ])
595
- })
596
- ]);
597
- const logoAnalysisSourceSchema = z.discriminatedUnion("kind", [
598
- z.object({ kind: z.literal("none") }),
599
- z.object({
600
- kind: z.literal("deterministic"),
601
- reason: z.enum(["dimensions", "fallback"])
602
- }),
603
- z.object({
604
- kind: z.literal("llm"),
605
- model: z.literal("gpt-5.4-mini"),
606
- analyzedAt: z.string().trim().min(1).max(80).optional()
607
- }),
608
- z.object({ kind: z.literal("manual-override") })
609
- ]);
610
- z.object({
611
- shape: z.enum(logoAssetShapeValues),
612
- containsText: logoContainsTextSchema,
613
- kind: z.enum(logoKindValues),
614
- density: z.enum(logoDensityValues),
615
- source: logoAnalysisSourceSchema
616
- });
617
- const brandDisplayModeValues = [
618
- "auto",
619
- "logo-only",
620
- "logo-plus-title",
621
- "title-only"
622
- ];
623
- const logoAccommodationPatternValues = [
624
- "title-only",
625
- "inline-logo-only",
626
- "inline-wordmark",
627
- "inline-mark-with-title",
628
- "logo-plate",
629
- "centered-badge",
630
- "popout-badge",
631
- "centered-masthead",
632
- "hero-badge"
633
- ];
634
- const logoSizePolicyValues = [
635
- "auto",
636
- "compact",
637
- "standard",
638
- "generous",
639
- "display"
640
- ];
641
- //#endregion
642
- //#region ../theme-core/src/header/interactionPalette.ts
643
- /**
644
- * The palettes that fill the nav link with a colour on hover and focus. Each
645
- * one names a background/foreground token pair.
646
- */
647
- const headerInteractionPillPaletteValues = [
648
- "primary",
649
- "secondary",
650
- "accent"
651
- ];
652
- /**
653
- * "No pill": a colour change on hover rather than a filled background.
654
- *
655
- * The palette step writes nothing (#1318 Phase 4c decision 2), but on a
656
- * foreground-adaptive style that is not the end of the story: the hover colour
657
- * is derived from the resolved opening foreground at render time, paired with
658
- * the resting colour, so `quiet` resolves to a definite colour rather than to
659
- * whatever brand token the recipe happened to name. See
660
- * `applyOpeningForeground`.
661
- *
662
- * It exists because "a colour change on hover, no filled background" was not
663
- * expressible in the vocabulary, and it is what
664
- * `anna-raven-therapy-and-yoga` and `kirtan-lucy` have rendered since before
665
- * the palette existed. Without it those two rows can only be classified as a
666
- * conscious visual change.
667
- */
668
- const headerInteractionQuietPalette = "quiet";
669
- const headerInteractionPaletteValues = [...headerInteractionPillPaletteValues, headerInteractionQuietPalette];
670
- const headerInteractionPaletteSchema = z.enum(headerInteractionPaletteValues);
671
- z.enum([
672
- "card",
673
- "statement",
674
- "highlight"
675
- ]);
676
- const cardVariantRoleValues = ["default", "alternative"];
677
- const boxlessCardVariantValue = "none";
678
- const openCardRoleValue = "open";
679
- /**
680
- * The roles a site style implements with an actual card variant. `none` is
681
- * deliberately absent: it is a role value only, never a variant.
682
- */
683
- const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
684
- /**
685
- * The closed role vocabulary Looks and blocks use for surfaced and boxless
686
- * card choices.
687
- *
688
- * - `none` — no site-style card surface; the block's own composition and
689
- * the author's own card fields govern the item. This is *not*
690
- * a promise of visible boxlessness: a block whose base class
691
- * draws a border still draws one. It says the Look is not
692
- * asking the site style for a card.
693
- * - `open` — boxless but marked (a rule or accent edge, no enclosing box)
694
- * - `default` — the site's quiet everyday card
695
- * - `alternative` — the statement card carrying the site's personality
696
- */
697
- const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
698
- const cardSpacingSchema = z.enum([
699
- "none",
700
- "compact",
701
- "cozy",
702
- "medium",
703
- "comfortable",
704
- "spacious"
705
- ]);
706
- /** Per-axis padding, for boxless cards whose inline padding differs from block. */
707
- const cardSpacingAxesSchema = z.object({
708
- block: cardSpacingSchema,
709
- inline: cardSpacingSchema
710
- });
711
- /**
712
- * A card's content padding: one value for both axes, or one per axis. Two
713
- * fields would let a variant say both and leave the reader to guess, so this is
714
- * a union.
715
- */
716
- const cardSpacingValueSchema = z.union([cardSpacingSchema, cardSpacingAxesSchema]);
717
- const gradientDirectionSchema = z.enum([
718
- "to-r",
719
- "to-l",
720
- "to-t",
721
- "to-b",
722
- "to-tr",
723
- "to-tl",
724
- "to-br",
725
- "to-bl"
726
- ]);
727
- z.enum(cardVariantRoleValues);
728
- const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
729
- const cardRoleSchema = z.enum(cardRoleValues);
730
- function isCardVariantRole(value) {
731
- return typeof value === "string" && cardVariantRoleValues.includes(value);
732
- }
733
- function normalizeCardVariantRole(value) {
734
- return isCardVariantRole(value) ? value : null;
735
- }
736
- /** The one untrusted-input boundary for the closed role vocabulary. */
737
- function normalizeCardRole(value) {
738
- if (value === "none") return boxlessCardVariantValue;
739
- if (value === "open") return openCardRoleValue;
740
- return normalizeCardVariantRole(value);
741
- }
742
- const cardBackgroundSchema = z.discriminatedUnion("type", [
743
- z.object({
744
- type: z.literal("solid"),
745
- colorToken: themeColorTokenSchema
746
- }),
747
- z.object({
748
- type: z.literal("gradient"),
749
- fromToken: themeColorTokenSchema,
750
- toToken: themeColorTokenSchema,
751
- direction: gradientDirectionSchema
752
- }),
753
- z.object({ type: z.literal("transparent") })
754
- ]);
755
- const cardBorderSchema = z.object({
756
- widthClass: z.string(),
757
- colorToken: themeColorTokenSchema
758
- });
759
- /** Per-corner radius value. `expressive` is a large block-radius multiple. */
760
- const cardCornerValueSchema = z.enum([
761
- "square",
762
- "soft",
763
- "rounded",
764
- "pill",
765
- "expressive"
766
- ]);
767
- const cardEdgeSchema = z.enum([
768
- "left",
769
- "top",
770
- "right",
771
- "bottom"
772
- ]);
773
- /** `hairline` (1px) is the widening the boxless `open` role needs. */
774
- const cardEdgeRuleWidthSchema = z.enum([
775
- "hairline",
776
- "thin",
777
- "medium",
778
- "thick",
779
- "heavy"
780
- ]);
781
- const cardEdgeRuleLengthSchema = z.enum(["full", "short"]);
782
- const cardEdgeRuleAlignSchema = z.enum([
783
- "start",
784
- "center",
785
- "end"
786
- ]);
787
- /**
788
- * Decorations are edge rules today. The alias exists so the list can grow into
789
- * a discriminated union without every call site changing.
790
- */
791
- const cardDecorationSchema = z.object({
792
- edge: cardEdgeSchema,
793
- colorToken: themeColorTokenSchema,
794
- width: cardEdgeRuleWidthSchema,
795
- /** Defaults to `full`. */
796
- length: cardEdgeRuleLengthSchema.optional(),
797
- /** Where a `short` rule sits along its edge. Defaults to `start`. */
798
- align: cardEdgeRuleAlignSchema.optional(),
799
- /** Opacity applied to `colorToken`, 0–1. Scoped here, not on the token. */
800
- alpha: z.number().min(0).max(1).optional()
801
- });
802
- const cardDecorationsSchema = z.array(cardDecorationSchema).max(2);
803
- const cardCornerRadiiSchema = z.object({
804
- topLeft: cardCornerValueSchema.optional(),
805
- topRight: cardCornerValueSchema.optional(),
806
- bottomLeft: cardCornerValueSchema.optional(),
807
- bottomRight: cardCornerValueSchema.optional()
808
- });
809
- const cardVariantSchema = z.strictObject({
810
- id: z.string(),
811
- name: z.string().min(1).max(20),
812
- enabled: z.boolean(),
813
- priority: z.union([
814
- z.literal(1),
815
- z.literal(2),
816
- z.literal(3)
817
- ]),
818
- role: surfaceCardRoleSchema,
819
- background: cardBackgroundSchema,
820
- spacing: cardSpacingValueSchema,
821
- foregroundToken: themeColorTokenSchema.optional(),
822
- shadow: z.object({
823
- elevation: z.enum([
824
- "none",
825
- "low",
826
- "medium",
827
- "high"
828
- ]),
829
- softness: z.enum([
830
- "crisp",
831
- "soft",
832
- "hard"
833
- ]).nullable(),
834
- position: z.enum(["bottom", "bottom-right"]).default("bottom")
835
- }).optional(),
836
- corners: z.enum([
837
- "square",
838
- "soft",
839
- "rounded",
840
- "pill"
841
- ]).optional(),
842
- cornerRadii: cardCornerRadiiSchema.optional(),
843
- border: cardBorderSchema.optional(),
844
- decorations: cardDecorationsSchema.optional()
845
- });
846
- /**
847
- * A site style saying "these two
848
- * variants are both the default card" is an authoring error worth rejecting.
849
- */
850
- function validateUniqueCardVariantRoles(system, ctx) {
851
- const declared = /* @__PURE__ */ new Set();
852
- system.variants.forEach((variant, index) => {
853
- const role = variant.role;
854
- if (declared.has(role)) {
855
- ctx.addIssue({
856
- code: "custom",
857
- path: [
858
- "variants",
859
- index,
860
- "role"
861
- ],
862
- message: `Card role "${role}" is already implemented by another variant.`
863
- });
864
- return;
865
- }
866
- declared.add(role);
867
- });
868
- }
869
- const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueCardVariantRoles);
870
- //#endregion
871
- //#region ../theme-core/src/fonts/types.ts
872
- const fontWeightListSchema = z.array(z.number().int().min(100).max(900));
873
- const fontLoadingSchema = z.object({
874
- extraBodyFontWeights: fontWeightListSchema.optional(),
875
- extraHeadingFontWeights: fontWeightListSchema.optional(),
876
- italicBodyFontWeights: fontWeightListSchema.optional(),
877
- italicHeadingFontWeights: fontWeightListSchema.optional()
878
- });
879
- const fontWidthSchema = z.number().finite().positive();
880
- /** Curated variable families with a registered width axis, in percentages. */
881
- const curatedFontWidths = {
882
- Archivo: {
883
- min: 62,
884
- max: 125
885
- },
886
- "Instrument Sans": {
887
- min: 75,
888
- max: 100
889
- }
890
- };
891
- function getFontWidthRange(family) {
892
- return curatedFontWidths[(family.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "")];
893
- }
894
- //#endregion
895
- //#region ../theme-core/src/typography/schema.ts
896
- const typographyStyleSchema = z.object({
897
- width: fontWidthSchema.optional(),
898
- family: z.string().min(1),
899
- weight: z.enum([
900
- "light",
901
- "regular",
902
- "medium",
903
- "semibold",
904
- "bold"
905
- ]),
906
- letterSpacing: z.enum([
907
- "tight",
908
- "normal",
909
- "loose"
910
- ]),
911
- lineHeight: z.enum([
912
- "normal",
913
- "relaxed",
914
- "loose"
915
- ])
916
- });
917
- const bodyTypographyStyleSchema = typographyStyleSchema.extend({ size: z.enum([
918
- "md",
919
- "lg",
920
- "xl"
921
- ]) });
922
- const headingSizeSchema = z.enum([
923
- "xs",
924
- "sm",
925
- "md",
926
- "lg",
927
- "xl",
928
- "2xl"
929
- ]);
930
- const headingTypographyOverridesSchema = z.object({
931
- width: fontWidthSchema.nullable().optional(),
932
- weight: z.enum([
933
- "light",
934
- "regular",
935
- "medium",
936
- "semibold",
937
- "bold"
938
- ]).nullable().optional(),
939
- letterSpacing: z.enum([
940
- "tight",
941
- "normal",
942
- "loose"
943
- ]).nullable().optional(),
944
- size: headingSizeSchema.nullable().optional(),
945
- lineHeight: z.enum([
946
- "tight",
947
- "snug",
948
- "normal",
949
- "relaxed",
950
- "loose"
951
- ]).nullable().optional(),
952
- italic: z.boolean().nullable().optional(),
953
- colorToken: themeColorTokenSchema.nullable().optional()
954
- });
955
- const headingTypographyStyleSchema = typographyStyleSchema.extend({
956
- case: z.enum([
957
- "uppercase",
958
- "normal",
959
- "smallCaps"
960
- ]).nullable(),
961
- italic: z.boolean().nullable(),
962
- colorToken: themeColorTokenSchema.nullable().optional()
963
- });
964
- const proseLinkUnderlineStyleSchema = z.enum([
965
- "solid",
966
- "dotted",
967
- "dashed"
968
- ]);
969
- const proseLinkUnderlineThicknessSchema = z.enum([
970
- "auto",
971
- "fromFont",
972
- "thin",
973
- "medium",
974
- "thick"
975
- ]);
976
- const proseLinkUnderlineOffsetSchema = z.enum([
977
- "auto",
978
- "tight",
979
- "normal",
980
- "loose"
981
- ]);
982
- const proseLinkStyleSchema = z.object({
983
- colorToken: themeColorTokenSchema.optional(),
984
- hoverColorToken: themeColorTokenSchema.optional(),
985
- underline: z.boolean().optional(),
986
- decorationColorToken: themeColorTokenSchema.optional(),
987
- hoverDecorationColorToken: themeColorTokenSchema.optional(),
988
- underlineStyle: proseLinkUnderlineStyleSchema.optional(),
989
- underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
990
- underlineOffset: proseLinkUnderlineOffsetSchema.optional()
991
- });
992
- const typographyScaleSchema = z.enum([
993
- "compact",
994
- "balanced",
995
- "spacious",
996
- "minorThird",
997
- "majorThird",
998
- "perfectFourth"
999
- ]);
1000
- const eyebrowTypographyStyleSchema = z.object({
1001
- width: fontWidthSchema.optional(),
1002
- family: z.string().min(1),
1003
- size: z.enum([
1004
- "sm",
1005
- "md",
1006
- "lg"
1007
- ]).optional(),
1008
- weight: z.enum([
1009
- "light",
1010
- "regular",
1011
- "medium",
1012
- "semibold",
1013
- "bold"
1014
- ]).optional(),
1015
- letterSpacing: z.enum([
1016
- "tight",
1017
- "normal",
1018
- "loose",
1019
- "wide"
1020
- ]).optional(),
1021
- case: z.enum(["uppercase", "normal"]).optional()
1022
- });
1023
- const typographySchema = z.object({
1024
- body: bodyTypographyStyleSchema,
1025
- smallHeading: z.object({
1026
- family: z.string().min(1),
1027
- weight: z.enum([
1028
- "regular",
1029
- "medium",
1030
- "semibold",
1031
- "bold"
1032
- ])
1033
- }).optional(),
1034
- headings: z.object({
1035
- default: headingTypographyStyleSchema,
1036
- h1: headingTypographyOverridesSchema,
1037
- h2: headingTypographyOverridesSchema,
1038
- h3: headingTypographyOverridesSchema,
1039
- h4: headingTypographyOverridesSchema.optional(),
1040
- h5: headingTypographyOverridesSchema.optional(),
1041
- h6: headingTypographyOverridesSchema.optional()
1042
- }),
1043
- scale: typographyScaleSchema,
1044
- proseLinkStyle: proseLinkStyleSchema.optional(),
1045
- eyebrow: eyebrowTypographyStyleSchema.optional()
1046
- }).superRefine((typography, ctx) => {
1047
- [
1048
- {
1049
- style: typography.body,
1050
- family: typography.body.family,
1051
- path: ["body", "width"]
1052
- },
1053
- {
1054
- style: typography.headings.default,
1055
- family: typography.headings.default.family,
1056
- path: [
1057
- "headings",
1058
- "default",
1059
- "width"
1060
- ]
1061
- },
1062
- ...[
1063
- "h1",
1064
- "h2",
1065
- "h3",
1066
- "h4",
1067
- "h5",
1068
- "h6"
1069
- ].map((level) => ({
1070
- style: typography.headings[level],
1071
- family: typography.headings.default.family,
1072
- path: [
1073
- "headings",
1074
- level,
1075
- "width"
1076
- ]
1077
- })),
1078
- {
1079
- style: typography.eyebrow,
1080
- family: typography.eyebrow?.family ?? "",
1081
- path: ["eyebrow", "width"]
1082
- }
1083
- ].forEach(({ style, family, path }) => {
1084
- if (style?.width == null) return;
1085
- const range = getFontWidthRange(family);
1086
- if (!range || style.width < range.min || style.width > range.max) ctx.addIssue({
1087
- code: "custom",
1088
- path,
1089
- message: range ? `Font width must be between ${range.min}% and ${range.max}% for ${family}.` : `Font width is not declared for ${family}.`
1090
- });
1091
- });
1092
- });
1093
- const skinTokensSchema = z.partialRecord(z.enum([
1094
- "radius",
1095
- "rule",
1096
- "mark-length",
1097
- "mark-weight",
1098
- "plate",
1099
- "gutter",
1100
- "copy-gap",
1101
- "stack-gap",
1102
- "shadow-offset",
1103
- "rotation",
1104
- "wrap",
1105
- "margin",
1106
- "rail",
1107
- "main"
1108
- ]), z.string()).superRefine((tokens, context) => {
1109
- Object.entries(tokens).forEach(([name, value]) => {
1110
- if (!(name === "rail" || name === "main" ? /^(?:[1-9]|1[0-2])$/.test(value) : /^-?(?:0|\d+(?:\.\d+)?(?:px|rem|em|deg|%))$/.test(value))) context.addIssue({
1111
- code: "custom",
1112
- path: [name],
1113
- message: "Invalid skin measurement"
1114
- });
1115
- });
1116
- });
1117
- function skinTokenCssVars(tokens) {
1118
- return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
1119
- }
1120
- const skinMarksSchema = z.enum(["primary"]);
1121
- /** The booking bar's paint and shape as applied from an arrangement style (issue 1659); the plain bar when absent. */
1122
- const skinBookingBarSchema = z.object({
1123
- token: z.string().refine((value) => {
1124
- const parts = parseColorTokenParts(value);
1125
- return parts.kind === "token" && parts.opacityPercent === null && parts.token === value && isThemeColorToken(value);
1126
- }, "Expected a plain Theme V2 colour token, without spaces or opacity"),
1127
- shape: z.enum(["edge-to-edge", "field"])
1128
- });
1129
- const themeLookMetadataSchema = z.object({
1130
- name: z.string().min(1).max(30),
1131
- description: z.string().min(1).max(400),
1132
- rationale: z.string().min(1).max(400),
1133
- siteStyleId: z.string().min(1).transform(asSiteStyleId).optional(),
1134
- skin: z.string().min(1).optional(),
1135
- skinTokens: skinTokensSchema.optional(),
1136
- fontLoading: fontLoadingSchema.optional(),
1137
- /** Which palette colour an arrangement style derives its graphic marks from (D9); accent when absent. */
1138
- skinMarks: skinMarksSchema.optional(),
1139
- skinBookingBar: skinBookingBarSchema.optional()
1140
- });
1141
- //#endregion
1142
- //#region ../theme-core/src/palette/colourSeeds.ts
1143
- /** Owner colours in priority order, validated once at the input boundary. */
1144
- const colourSeedsSchema = z.union([z.tuple([hexColorSchema]), z.tuple([hexColorSchema, hexColorSchema])]).refine((seeds) => seeds.length === 1 || seeds[0] !== seeds[1], { message: "Choose distinct colours" });
1145
- //#endregion
1146
- //#region ../theme-core/src/palette/schema.ts
1147
- const colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
1148
- const paletteColorSchema = z.object({
1149
- name: z.string().min(1),
1150
- hex: colourHexString
1151
- });
1152
- const paletteMetaSchema = z.object({
1153
- mode: z.enum(["light", "dark"]),
1154
- seeds: colourSeedsSchema.optional()
1155
- });
1156
- const paletteSchema = z.object({
1157
- colors: z.array(paletteColorSchema),
1158
- meta: paletteMetaSchema
1159
- }).transform((palette, ctx) => {
1160
- const colors = paletteColorsFromEntries(palette.colors);
1161
- if (!colors.ok) {
1162
- ctx.addIssue({
1163
- code: "custom",
1164
- message: `Invalid complete palette: ${colors.error.kind}`
1165
- });
1166
- return z.NEVER;
1167
- }
1168
- return {
1169
- colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
1170
- name: String(name),
1171
- hex: String(hex)
1172
- })),
1173
- meta: palette.meta
1174
- };
1175
- });
1176
- //#endregion
1177
- //#region ../theme-core/src/accordions/types.ts
6
+ //#region ../site-contracts/src/theme/accordions.ts
1178
7
  /**
1179
8
  * Accordion icon styles for expand/collapse indicators
1180
9
  */
@@ -1281,75 +110,8 @@ const accordionSystemSchema = z.object({
1281
110
  }).optional(),
1282
111
  content: z.object({ textColorToken: themeColorTokenSchema })
1283
112
  });
1284
- /**
1285
- * Icon configuration mapping icon styles to Lucide icons and behavior
1286
- * Used by both CSS generation (for rotation) and component rendering (for icon selection)
1287
- */
1288
- const ICON_CONFIG = {
1289
- "plus-minus": {
1290
- closedIcon: "Plus",
1291
- openIcon: "Minus",
1292
- rotation: 0
1293
- },
1294
- "chevron": {
1295
- closedIcon: "ChevronDown",
1296
- rotation: 180
1297
- },
1298
- "caret": {
1299
- closedIcon: "ChevronDown",
1300
- rotation: 180
1301
- },
1302
- "arrow": {
1303
- closedIcon: "ArrowDown",
1304
- rotation: 180
1305
- },
1306
- "circle-plus-minus": {
1307
- closedIcon: "CirclePlus",
1308
- openIcon: "CircleMinus",
1309
- rotation: 0
1310
- }
1311
- };
1312
- /**
1313
- * Icon size mapping (px values for CSS and Lucide React)
1314
- */
1315
- const ICON_SIZE_PX = {
1316
- sm: "16px",
1317
- md: "20px",
1318
- lg: "24px"
1319
- };
1320
- /**
1321
- * Spacing map for accordion content padding
1322
- */
1323
- const ACCORDION_SPACING_MAP = {
1324
- none: "0",
1325
- compact: "0.75rem",
1326
- cozy: "1rem",
1327
- medium: "1.25rem",
1328
- comfortable: "1.5rem",
1329
- spacious: "2rem"
1330
- };
1331
- /**
1332
- * Question (trigger) font-size by scale step. Kept as self-contained clamps
1333
- * rather than the heading-scale CSS vars so question size stays predictable
1334
- * even when a theme configures very large headings.
1335
- */
1336
- const ACCORDION_TRIGGER_FONT_SCALE = {
1337
- body: "clamp(0.95rem, var(--fs-body), 1.0625rem)",
1338
- md: "clamp(1.0625rem, 0.98rem + 0.45vw, 1.3rem)",
1339
- lg: "clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem)"
1340
- };
1341
- const ACCORDION_TRIGGER_LETTER_SPACING = {
1342
- normal: "0",
1343
- tight: "-0.01em",
1344
- wide: "0.04em"
1345
- };
1346
- const ACCORDION_OPEN_ACCENT_THICKNESS = {
1347
- thin: "2px",
1348
- medium: "3px",
1349
- thick: "4px"
1350
- };
1351
113
  //#endregion
1352
- //#region ../theme-core/src/inputs/types.ts
114
+ //#region ../site-contracts/src/theme/inputs.ts
1353
115
  /**
1354
116
  * Input styling configuration for a theme
1355
117
  *
@@ -1451,47 +213,137 @@ const inputSystemSchema = z.object({
1451
213
  opacity: z.number().min(.3).max(.7)
1452
214
  })
1453
215
  });
1454
- /**
1455
- * Spacing map for input padding
1456
- */
1457
- const INPUT_SPACING_MAP = {
1458
- compact: "0.5rem 0.75rem",
1459
- cozy: "0.625rem 0.875rem",
1460
- medium: "0.75rem 1rem",
1461
- comfortable: "0.875rem 1.25rem"
1462
- };
1463
- /**
1464
- * Font size map for inputs
1465
- */
1466
- const INPUT_FONT_SIZE_MAP = {
1467
- sm: "0.875rem",
1468
- base: "1rem",
1469
- lg: "1.125rem"
1470
- };
1471
- /**
1472
- * Label font size map
1473
- */
1474
- const LABEL_FONT_SIZE_MAP = {
1475
- "2xs": "0.625rem",
1476
- xs: "0.75rem",
1477
- sm: "0.875rem",
1478
- base: "1rem"
1479
- };
1480
- /**
1481
- * Font weight map
1482
- */
1483
- const FONT_WEIGHT_MAP = {
1484
- regular: "400",
1485
- medium: "500",
1486
- semibold: "600",
1487
- bold: "700",
1488
- black: "800"
1489
- };
1490
216
  //#endregion
1491
- //#region ../theme-core/src/gradients/types.ts
1492
- /**
1493
- * Gradient configuration types and schemas
1494
- */
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
1495
347
  /**
1496
348
  * Gradient color stop
1497
349
  */
@@ -1533,14 +385,271 @@ const gradientsSchema = z.object({
1533
385
  hero: z.string().min(1).nullable().optional(),
1534
386
  background: z.string().min(1).nullable().optional()
1535
387
  });
1536
- //#endregion
1537
- //#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
+ });
1538
639
  /**
1539
- * CSS At-Rule Validation Schemas
1540
- *
1541
- * Zod schemas for validating CSS at-rules.
1542
- * Blocks @import for security.
640
+ * Shared shadow schema for themed components.
641
+ * Softness is inherited from global theme, not configurable per-component.
1543
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
1544
653
  /** Valid keyframe offset values - requires % for numeric values */
1545
654
  const KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
1546
655
  /** Valid animation name (CSS identifier) */
@@ -1639,301 +748,7 @@ const customCssAtRuleSchema = z.discriminatedUnion("type", [
1639
748
  */
1640
749
  const customCssAtRulesSchema = z.array(customCssAtRuleSchema).optional();
1641
750
  //#endregion
1642
- //#region ../theme-core/src/shared/componentStyles.ts
1643
- /**
1644
- * Shared Component Style Schemas
1645
- *
1646
- * Reusable schemas for border and shadow styling that can be shared across
1647
- * themed components (header, buttons, cards, accordions, inputs).
1648
- *
1649
- * Design decisions:
1650
- * - Shadow elevation uses CSS-aligned names (none/sm/md/lg/xl/2xl)
1651
- * - Shadow softness is controlled globally, not per-component
1652
- * - Border position is component-specific, not in shared schema
1653
- */
1654
- /**
1655
- * Shared border schema for themed components.
1656
- * Position is excluded - each component determines its own border position.
1657
- */
1658
- const componentBorderSchema = z.object({
1659
- width: z.enum([
1660
- "none",
1661
- "hairline",
1662
- "thin",
1663
- "medium",
1664
- "thick"
1665
- ]).default("none"),
1666
- style: z.enum(["solid", "dashed"]).default("solid"),
1667
- colorToken: themeColorTokenSchema.optional()
1668
- });
1669
- /**
1670
- * Shared shadow schema for themed components.
1671
- * Softness is inherited from global theme, not configurable per-component.
1672
- */
1673
- const componentShadowSchema = z.object({ elevation: z.enum([
1674
- "none",
1675
- "sm",
1676
- "md",
1677
- "lg",
1678
- "xl",
1679
- "2xl"
1680
- ]).default("sm") });
1681
- /**
1682
- * Get border width in pixels for CSS generation.
1683
- *
1684
- * Width mapping:
1685
- * - none: 0
1686
- * - hairline: 1px
1687
- * - thin: 2px
1688
- * - medium: 3px
1689
- * - thick: 4px
1690
- */
1691
- function getComponentBorderWidthPx(width) {
1692
- return {
1693
- none: "0",
1694
- hairline: "1px",
1695
- thin: "2px",
1696
- medium: "3px",
1697
- thick: "4px"
1698
- }[width];
1699
- }
1700
- /**
1701
- * Get CSS variable reference for shadow elevation.
1702
- * Returns null for 'none' elevation.
1703
- *
1704
- * Maps directly to CSS variables generated by the theme:
1705
- * - sm: var(--shadow-sm)
1706
- * - md: var(--shadow-md)
1707
- * - lg: var(--shadow-lg)
1708
- * - xl: var(--shadow-xl)
1709
- * - 2xl: var(--shadow-2xl)
1710
- */
1711
- function getComponentShadowVar(elevation) {
1712
- if (elevation === "none") return null;
1713
- return `var(--shadow-${elevation})`;
1714
- }
1715
- //#endregion
1716
- //#region ../theme-core/src/header/legacyHeaderVariant.ts
1717
- /**
1718
- * The header variants the system actually renders.
1719
- *
1720
- * Each one has a layout row in the site-header block and a paint target in
1721
- * `paintTargets.ts`. This is the canonical list: the block transform's variant
1722
- * class allowlist and the AI theme generator's enum both derive from it, so
1723
- * they cannot drift.
1724
- */
1725
- const headerVariantValues = [
1726
- "classic",
1727
- "centered",
1728
- "floating"
1729
- ];
1730
- z.enum(headerVariantValues);
1731
- /**
1732
- * Header variant spellings that were once authorable but no longer name a
1733
- * layout of their own, and the variant they read as now.
1734
- *
1735
- * `transparent` was an overlay header with no CSS of its own: everything it
1736
- * did (transparent root background, overlay content flow) is what `floating`
1737
- * already does, and it had zero persisted usage in production or locally when
1738
- * it was retired. It survives here as a one-boundary alias so a theme authored
1739
- * against the old vocabulary still parses.
1740
- *
1741
- * This matters because the theme schema is strict and has no per-field
1742
- * `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
1743
- * *whole* theme, which silently swaps the site's theme for
1744
- * `modernMinimalTheme`. Aliasing here keeps that from happening.
1745
- */
1746
- const legacyHeaderVariants = { transparent: "floating" };
1747
- const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
1748
- /**
1749
- * The header variant boundary for themes that go through `themeSchema`:
1750
- * canonical variants pass through, legacy spellings normalize to the variant
1751
- * they meant, everything else fails the parse.
1752
- *
1753
- * Deliberately an enum plus a transform rather than a `z.preprocess`, so the
1754
- * schema's *input* type stays an accurate union (the legacy spelling is still
1755
- * accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
1756
- * `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
1757
- * would leak straight into a public type.
1758
- *
1759
- * Persisted runtime themes are admitted through `parseThemeForPersistence`
1760
- * before reaching consumers, so legacy spellings normalize at that boundary.
1761
- */
1762
- const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
1763
- const BREAKPOINT_LG = 1024;
1764
- const BREAKPOINT_XL = 1280;
1765
- const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
1766
- function mqUp(px) {
1767
- return `(min-width: ${px}px)`;
1768
- }
1769
- function mqDown(px) {
1770
- return `(max-width: ${px}px)`;
1771
- }
1772
- function mqBetween(minPx, maxPx) {
1773
- return `${mqUp(minPx)} and ${mqDown(maxPx)}`;
1774
- }
1775
- const MQ_SM_UP = mqUp(640);
1776
- const MQ_MD_UP = mqUp(768);
1777
- const MQ_LG_UP = mqUp(BREAKPOINT_LG);
1778
- mqUp(BREAKPOINT_XL);
1779
- const MQ_SM_DOWN = mqDown(639);
1780
- const MQ_MD_DOWN = mqDown(767);
1781
- mqDown(BREAKPOINT_LG_DOWN);
1782
- const MQ_TABLET_ONLY = mqBetween(640, BREAKPOINT_LG_DOWN);
1783
- mqDown(640);
1784
- mqDown(768);
1785
- //#endregion
1786
- //#region ../theme-core/src/header/paintTargets.ts
1787
- /** Resolve the element that owns the visible header surface for each layout. */
1788
- function getHeaderPaintTargets(variant, themeId, state = "base") {
1789
- const scope = `:where([data-theme-scope="${themeId}"])`;
1790
- const scrolledRoot = state === "scrolled" ? ".header-root.header-scrolled " : "";
1791
- if (variant === "floating") {
1792
- if (state === "scrolled") {
1793
- const desktopOwner = `${scope} ${scrolledRoot}.header-floating-container`;
1794
- const mobileOwner = `${scope} ${scrolledRoot}.header-mobile-bar`;
1795
- return [{
1796
- kind: "viewport-band",
1797
- clipSelector: `${scope}:has(.header-root.header-scrolled)`,
1798
- ownerSelector: desktopOwner,
1799
- selector: `${desktopOwner}::before`,
1800
- mediaQuery: MQ_MD_UP,
1801
- extent: {
1802
- top: {
1803
- customProperty: "--rb-header-floating-top-gap",
1804
- value: "1rem",
1805
- ownerProperty: "top"
1806
- },
1807
- bottom: {
1808
- customProperty: "--rb-header-floating-bottom-extension",
1809
- value: "0.75rem"
1810
- }
1811
- },
1812
- ownerNeedsPositioning: false
1813
- }, {
1814
- kind: "viewport-band",
1815
- clipSelector: `${scope}:has(.header-root.header-scrolled)`,
1816
- ownerSelector: mobileOwner,
1817
- selector: `${mobileOwner}::before`,
1818
- mediaQuery: MQ_MD_DOWN,
1819
- extent: {
1820
- top: {
1821
- customProperty: "--rb-header-floating-top-gap",
1822
- value: "0.75rem",
1823
- ownerProperty: "margin-top"
1824
- },
1825
- bottom: {
1826
- customProperty: "--rb-header-floating-bottom-extension",
1827
- value: "0.75rem"
1828
- }
1829
- },
1830
- ownerNeedsPositioning: true
1831
- }];
1832
- }
1833
- return [{
1834
- kind: "element-box",
1835
- selector: `${scope} ${scrolledRoot}.header-floating-container`,
1836
- mediaQuery: MQ_MD_UP
1837
- }, {
1838
- kind: "element-box",
1839
- selector: `${scope} ${scrolledRoot}.header-mobile-bar`,
1840
- mediaQuery: MQ_MD_DOWN
1841
- }];
1842
- }
1843
- return [{
1844
- kind: "element-box",
1845
- selector: `${scope} .header-root${state === "scrolled" ? ".header-scrolled" : ""}::before`,
1846
- pseudoElement: "inset"
1847
- }];
1848
- }
1849
- function renderHeaderPaintTargetRules(targets, rules) {
1850
- return targets.map((target) => {
1851
- const block = renderHeaderPaintTargetRule(target, rules);
1852
- return target.mediaQuery ? `@media ${target.mediaQuery} {\n${block}\n}` : block;
1853
- }).join("\n");
1854
- }
1855
- function renderHeaderPaintTargetRule(target, rules) {
1856
- switch (target.kind) {
1857
- case "element-box": {
1858
- const pseudoElementSetup = target.pseudoElement === "inset" ? [
1859
- "content: \"\";",
1860
- "position: absolute;",
1861
- "inset: 0;",
1862
- "pointer-events: none;",
1863
- "border-radius: inherit;",
1864
- "z-index: -1;"
1865
- ] : [];
1866
- return `${target.pseudoElement === "inset" ? headerPaintOwnerInks(target.selector.replace(/::before$/, ""), rules) : ""}${target.selector} {\n ${[...pseudoElementSetup, ...rules].join("\n ")}\n}`;
1867
- }
1868
- case "viewport-band": return renderViewportBandPaint(target, rules);
1869
- }
1870
- }
1871
- function headerInkRules(rules) {
1872
- return rules.filter((rule) => Object.values(SURFACE_INK_CSS_VARS).some((variable) => rule.startsWith(`${variable}:`)));
1873
- }
1874
- function headerPaintOwnerInks(selector, rules) {
1875
- const inks = headerInkRules(rules);
1876
- return inks.length === 0 ? "" : `${selector} {\n ${inks.join("\n ")}\n}\n`;
1877
- }
1878
- /** Viewport paint stays on its pseudo-element; inherited ink belongs to the content owner. */
1879
- function renderViewportBandPaint(target, rules) {
1880
- const { top, bottom } = target.extent;
1881
- const ownerRules = [
1882
- `${top.customProperty}: ${top.value};`,
1883
- `${bottom.customProperty}: ${bottom.value};`,
1884
- `${top.ownerProperty}: var(${top.customProperty});`,
1885
- ...target.ownerNeedsPositioning ? ["position: relative;"] : [],
1886
- "isolation: isolate;",
1887
- "background: none;",
1888
- "backdrop-filter: none;",
1889
- "-webkit-backdrop-filter: none;",
1890
- "border: 0;",
1891
- "box-shadow: none;",
1892
- ...headerInkRules(rules)
1893
- ];
1894
- const bandRules = [
1895
- "content: \"\";",
1896
- "position: absolute;",
1897
- `top: calc(-1 * var(${top.customProperty}));`,
1898
- `bottom: calc(-1 * var(${bottom.customProperty}));`,
1899
- "left: 50%;",
1900
- "width: 100vw;",
1901
- "transform: translateX(-50%);",
1902
- "pointer-events: none;",
1903
- "border-radius: 0;",
1904
- "z-index: -1;",
1905
- ...rules
1906
- ];
1907
- return `${target.clipSelector} {\n overflow-x: clip;\n}\n${target.ownerSelector} {\n ${ownerRules.join("\n ")}\n}\n${target.selector} {\n ${bandRules.join("\n ")}\n}`;
1908
- }
1909
- //#endregion
1910
- //#region ../theme-core/src/header/scrollTreatment.ts
1911
- const headerScrollTreatmentSchema = z.discriminatedUnion("kind", [z.object({
1912
- kind: z.literal("contrast-glass"),
1913
- backgroundTone: z.enum(["light", "dark"])
1914
- })]).optional();
1915
- const CONTRAST_GLASS_BLUR = "blur(12px)";
1916
- function generateMobileOverlayBackdropFilterFix(themeId, variant) {
1917
- const root = `:where([data-theme-scope="${themeId}"]) .header-root:has([data-nav-mobile-overlay][aria-hidden="false"])`;
1918
- return `\n${(variant === "floating" ? [`${root} .header-mobile-bar`, `${root} .header-mobile-bar::before`] : [`${root}::before`]).join(",\n")} {\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n}\n`;
1919
- }
1920
- function generateHeaderScrollTreatmentStyles(treatment, themeId, variant, surfaceRules = []) {
1921
- if (!treatment) return "";
1922
- switch (treatment.kind) {
1923
- case "contrast-glass": {
1924
- const backgroundChannels = treatment.backgroundTone === "dark" ? "0 0 0" : "255 255 255";
1925
- return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
1926
- `background-color: rgb(${backgroundChannels} / 0.60);`,
1927
- `backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
1928
- `-webkit-backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
1929
- ...surfaceRules,
1930
- ...surfaceInkDeclarations({ kind: "reset" }).map((rule) => rule.replace(";", " !important;"))
1931
- ]);
1932
- }
1933
- }
1934
- }
1935
- //#endregion
1936
- //#region ../theme-core/src/header/containerSchema.ts
751
+ //#region ../site-contracts/src/theme/headerContainer.ts
1937
752
  const headerContainerSchema = z.object({
1938
753
  rounded: z.enum([
1939
754
  "none",
@@ -1955,7 +770,149 @@ const headerContainerSchema = z.object({
1955
770
  opacity: z.number().min(0).max(1).default(.12)
1956
771
  }).optional();
1957
772
  //#endregion
1958
- //#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
1959
916
  const axesSchema = z.object({
1960
917
  tone: z.enum([
1961
918
  "minimal",
@@ -2515,9 +1472,54 @@ const themeSchema = z.object({
2515
1472
  */
2516
1473
  styleGroups: z.record(z.string(), z.array(z.string())).optional()
2517
1474
  });
2518
- z.object({
2519
- message: z.string().min(1),
2520
- themes: z.array(themeSchema).length(3)
2521
- });
2522
1475
  //#endregion
2523
- export { asSiteStyleId as $, NAV_LINK_BORDER_RADIUS_MAP as A, boxBackgroundSchema as B, ICON_SIZE_PX as C, cardVariantRoleValues as D, cardRoleValues as E, navLinkHoverColorCandidate as F, themeV2CompilerOwnedFieldNames as G, pageDesignEditorBackgroundOverrideOwner as H, navLinkOwnsHoverForeground as I, asBoundaryOptionId as J, arrangementModes as K, navLinkOwnsUnderline as L, NAV_LINK_PADDING_MAP as M, NAV_LINK_PADDING_X_MAP as N, normalizeCardRole as O, NAV_LINK_TEXT_SIZE_MAP as P, asPageFlowPresetId as Q, navEffectPolicy as R, ICON_CONFIG as S, cardRoleSchema as T, siteChromeBackgroundOverrideOwner as U, runtimeBoxBackgroundSchema as V, stripStaleTransitionStyleGroup as W, asDesignSystemTemplateId as X, asDesignBlockId as Y, asLayoutVariantKey as Z, LABEL_FONT_SIZE_MAP as _, testimonialsCompositionTreatmentValues as _t, renderHeaderPaintTargetRules as a, eyebrowTreatmentValues as at, ACCORDION_TRIGGER_FONT_SCALE as b, visibleHeadingDecorationFamilyValues as bt, MQ_SM_DOWN as c, headingDecorationColorTokenValues as ct, headerVariantValues as d, makeBoundaryId as dt, assertNever as et, getComponentBorderWidthPx as f, noHeadingDecoration as ft, INPUT_SPACING_MAP as g, requireNonEmptyReadonlyArray as gt, INPUT_FONT_SIZE_MAP as h, plainFrame as ht, getHeaderPaintTargets as i, eventListTreatmentValues as it, NAV_LINK_LETTER_SPACING_MAP as j, surfaceCardRoleValues as k, MQ_SM_UP as l, introCompositionTreatmentValues as lt, FONT_WEIGHT_MAP as m, panelFrame as mt, generateHeaderScrollTreatmentStyles as n, defineExactCatalog as nt, MQ_LG_UP as o, featureCardCompositionTreatmentValues as ot, getComponentShadowVar as p, offeringsPreviewCompositionTreatmentValues as pt, asAppearancePresetId as q, generateMobileOverlayBackdropFilterFix as r, defineFrameCapability as rt, MQ_MD_DOWN as s, flushPanelFrame as st, themeSchema as t, defineBlockDesignCapability as tt, MQ_TABLET_ONLY as u, isArrangementMode as ut, ACCORDION_OPEN_ACCENT_THICKNESS as v, tileTreatmentValues as vt, skinTokenCssVars as w, ACCORDION_TRIGGER_LETTER_SPACING as x, ACCORDION_SPACING_MAP as y, toNonEmptyReadonlyArray as yt, boxBackgroundOverlaySchema as z };
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 };