@riverbankcms/sdk 0.159.0 → 0.161.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 (218) hide show
  1. package/README.md +4 -4
  2. package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  3. package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
  4. package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
  5. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  6. package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  7. package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
  8. package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
  9. package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  11. package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
  12. package/dist/_dts/index-BVkP8f70.d.ts +66 -0
  13. package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  14. package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
  15. package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
  16. package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  17. package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
  18. package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
  19. package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
  20. package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  21. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  22. package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
  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 +13 -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/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  42. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  45. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  47. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  48. package/dist/_dts/sdk/src/server.d.ts +5 -5
  49. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  50. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  51. package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
  52. package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
  53. package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
  54. package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  55. package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
  56. package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  57. package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
  58. package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  59. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  60. package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
  61. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
  63. package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  64. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  65. package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
  66. package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  67. package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  68. package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
  69. package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
  70. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  71. package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
  72. package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
  73. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  74. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  75. package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
  76. package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
  77. package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  78. package/dist/client/bookings.mjs +6 -6
  79. package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
  80. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  81. package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
  82. package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  83. package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
  84. package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  85. package/dist/client/client.mjs +28 -15
  86. package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
  87. package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
  88. package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  89. package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  90. package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  91. package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
  92. package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
  93. package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  94. package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  95. package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  96. package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  97. package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  98. package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
  99. package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
  100. package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  101. package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  102. package/dist/client/gifting/client.mjs +3 -3
  103. package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  104. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  105. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  106. package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
  107. package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  108. package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  109. package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
  110. package/dist/client/portal/client.mjs +4560 -115
  111. package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  112. package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  113. package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  114. package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
  115. package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  116. package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
  117. package/dist/client/rendering/client.mjs +28 -28
  118. package/dist/client/rendering/islands.mjs +1 -1
  119. package/dist/client/rendering.mjs +57 -32
  120. package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  121. package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  122. package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
  123. package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
  124. package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  126. package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
  127. package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
  128. package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  129. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  130. package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
  131. package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
  132. package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  133. package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
  134. package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  135. package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
  136. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  137. package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
  138. package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
  139. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  140. package/dist/preview-next/before-render.mjs +5 -4
  141. package/dist/preview-next/chrome.css +2 -0
  142. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  143. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  144. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  145. package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
  146. package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
  148. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
  150. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
  151. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  152. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  153. package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
  154. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  155. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  156. package/dist/preview-next/client/runtime.mjs +3 -3
  157. package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  158. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  159. package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  160. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  161. package/dist/preview-next/editor-base.css +64 -2
  162. package/dist/preview-next/editor-chrome.css +85 -0
  163. package/dist/preview-next/keepAlive.mjs +2 -2
  164. package/dist/preview-next/middleware.mjs +7 -3
  165. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
  166. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  167. package/dist/preview-next/session.mjs +1 -1
  168. package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
  169. package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
  170. package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
  171. package/dist/server/config-template-validation.mjs +50 -10
  172. package/dist/server/config-validation.mjs +1 -1
  173. package/dist/server/config.mjs +2 -2
  174. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
  175. package/dist/server/index.mjs +3 -3
  176. package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
  177. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  178. package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
  179. package/dist/server/manifest.mjs +1 -1
  180. package/dist/server/next.mjs +9 -9
  181. package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  182. package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
  183. package/dist/server/page-converter.mjs +8 -10
  184. package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
  185. package/dist/server/prebuild.mjs +1 -1
  186. package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
  187. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
  188. package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
  189. package/dist/server/rendering/server.mjs +4 -4
  190. package/dist/server/rendering.mjs +8 -8
  191. package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
  192. package/dist/server/routing.mjs +1 -1
  193. package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  196. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  197. package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
  198. package/dist/server/theme-bridge.mjs +1 -1
  199. package/dist/server/theme.mjs +1 -1
  200. package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  201. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  202. package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
  203. package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
  204. package/dist/styles/index.css +235 -0
  205. package/package.json +8 -3
  206. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  207. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  208. package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
  209. package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
  210. package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
  211. package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
  212. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  213. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  214. package/dist/client/timetableModel-D09jPdue.mjs +0 -480
  215. package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
  216. package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
  217. package/dist/server/loadPage-jade28Xh.mjs +0 -2
  218. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -0,0 +1,750 @@
1
+ import { Hn as surfaceForegroundInputFromResolved, Ht as assertNever, Kn as expandPalette, Vn as surfaceForegroundDeclarations, Wn as surfaceForegroundValue, a as generateMobileOverlayBackdropFilterFix, ct as siteChromeBackgroundOverrideOwner, gn as TokenResolver, h as getComponentShadowVar, i as generateHeaderScrollTreatmentStyles, l as MQ_MD_DOWN, m as getComponentBorderWidthPx, o as getHeaderPaintTargets, pn as resolveSurfaceForeground, s as renderHeaderPaintTargetRules, wt as renderCssDeclarations, xn as rgbColorValue } from "./schema-CD4peO7m.mjs";
2
+ import { A as buildTextContrastShadow, I as headerRootPaint, j as generateNavLinkCSS, l as mergeHeaderNavTypographyPreference, t as effectiveHeaderNavLinkStyle, u as readHeaderNavFontSizePreference } from "./effectiveNavLinkStyle-CGvGr3yD.mjs";
3
+ //#region ../theme-core/src/responsive/mediaQuery.ts
4
+ /**
5
+ * Convert familiar viewport media queries to container queries when safe.
6
+ * v1 supports simple width-based min/max clauses joined by `and`.
7
+ */
8
+ function convertMediaQueryToContainerQuery(query) {
9
+ const normalized = normalizeMediaQueryPrelude(query);
10
+ if (!normalized) return null;
11
+ if (normalized.includes(",")) return null;
12
+ if (/\bor\b/i.test(normalized)) return null;
13
+ const clauses = splitTopLevelAnd(normalized);
14
+ if (clauses.length === 0) return null;
15
+ const convertedClauses = clauses.map(convertWidthClause);
16
+ if (convertedClauses.some((clause) => clause === null)) return null;
17
+ return convertedClauses.join(" and ");
18
+ }
19
+ function normalizeMediaQueryPrelude(query) {
20
+ let normalized = query.trim();
21
+ if (!normalized) return "";
22
+ normalized = normalized.replace(/^only\s+/i, "").trim();
23
+ if (/^screen\b/i.test(normalized)) {
24
+ normalized = normalized.replace(/^screen\b/i, "").trim();
25
+ normalized = normalized.replace(/^and\b/i, "").trim();
26
+ }
27
+ if (/^all\b/i.test(normalized)) {
28
+ normalized = normalized.replace(/^all\b/i, "").trim();
29
+ normalized = normalized.replace(/^and\b/i, "").trim();
30
+ }
31
+ return normalized;
32
+ }
33
+ function splitTopLevelAnd(input) {
34
+ const parts = [];
35
+ let depth = 0;
36
+ let quote = null;
37
+ let current = "";
38
+ for (let i = 0; i < input.length; i++) {
39
+ const ch = input[i];
40
+ if (quote) {
41
+ current += ch;
42
+ if (ch === quote && input[i - 1] !== "\\") quote = null;
43
+ continue;
44
+ }
45
+ if (ch === "\"" || ch === "'") {
46
+ quote = ch;
47
+ current += ch;
48
+ continue;
49
+ }
50
+ if (ch === "(") {
51
+ depth++;
52
+ current += ch;
53
+ continue;
54
+ }
55
+ if (ch === ")") {
56
+ depth = Math.max(0, depth - 1);
57
+ current += ch;
58
+ continue;
59
+ }
60
+ if (depth === 0 && isAndBoundary(input, i)) {
61
+ const trimmed = current.trim();
62
+ if (trimmed) parts.push(trimmed);
63
+ current = "";
64
+ i += 2;
65
+ continue;
66
+ }
67
+ current += ch;
68
+ }
69
+ const trimmed = current.trim();
70
+ if (trimmed) parts.push(trimmed);
71
+ return parts;
72
+ }
73
+ function isAndBoundary(input, index) {
74
+ if (!input.slice(index, index + 3).match(/^and$/i)) return false;
75
+ const prev = input[index - 1] ?? " ";
76
+ const next = input[index + 3] ?? " ";
77
+ return /\s/.test(prev) && /\s/.test(next);
78
+ }
79
+ function convertWidthClause(clause) {
80
+ const match = clause.match(/^\(\s*(min|max)-width\s*:\s*([^\)]+?)\s*\)$/i);
81
+ if (!match) return null;
82
+ const kindRaw = match[1];
83
+ const valueRaw = match[2];
84
+ if (!kindRaw || !valueRaw) return null;
85
+ const kind = kindRaw.toLowerCase();
86
+ const value = valueRaw.trim();
87
+ if (!value) return null;
88
+ return `(${kind}-width: ${value})`;
89
+ }
90
+ //#endregion
91
+ //#region ../theme-core/src/responsiveMode.ts
92
+ const DEFAULT_THEME_RESPONSIVE_MODE = "viewport";
93
+ const THEME_RESPONSIVE_CONTAINER_NAME = "rb-site";
94
+ const THEME_RESPONSIVE_MODE_ATTR = "data-rb-responsive-mode";
95
+ function getResponsiveScopeSpec(mode = DEFAULT_THEME_RESPONSIVE_MODE) {
96
+ if (mode === "container") return {
97
+ kind: "container",
98
+ selector: `[${THEME_RESPONSIVE_MODE_ATTR}="container"]`,
99
+ containerName: THEME_RESPONSIVE_CONTAINER_NAME
100
+ };
101
+ return {
102
+ kind: "viewport",
103
+ selector: `[${THEME_RESPONSIVE_MODE_ATTR}="viewport"]`
104
+ };
105
+ }
106
+ function escapeRegExp(value) {
107
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
108
+ }
109
+ new RegExp(buildResponsiveScopeRulePatternSource(), "g");
110
+ new RegExp(buildResponsiveScopeRulePatternSource(), "y");
111
+ function buildResponsiveScopeRulePatternSource() {
112
+ return [
113
+ "@scope",
114
+ "\\(\\[",
115
+ escapeRegExp(THEME_RESPONSIVE_MODE_ATTR),
116
+ "=\"(?:viewport|container)\"\\]\\)",
117
+ "to",
118
+ "\\((?::scope )?\\[",
119
+ escapeRegExp(THEME_RESPONSIVE_MODE_ATTR),
120
+ "\\]\\)",
121
+ "\\{"
122
+ ].join("\\s*");
123
+ }
124
+ const NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
125
+ `min-width: 12rem;`,
126
+ `width: max-content;`,
127
+ `max-width: min(22rem, calc(100vw - 2rem));`,
128
+ `transform: translateX(var(--nav-dropdown-shift-x, 0px));`
129
+ ];
130
+ //#endregion
131
+ //#region ../theme-core/src/header/surfaceRules.ts
132
+ /** Compile the at-rest surface independently of scroll treatment and paint geometry. */
133
+ function buildHeaderSurfaceRules(header, tokens) {
134
+ const base = [];
135
+ const background = header.background;
136
+ if (background.type === "color") base.push(`background-color: ${tokens.getColor(background.color || "surface")};`);
137
+ else if (background.type === "gradient" && background.gradient) {
138
+ const stops = background.gradient.stops.map((stop) => tokens.getColor(stop.color)).join(", ");
139
+ base.push(`background-image: linear-gradient(${background.gradient.angle ?? 180}deg, ${stops});`);
140
+ }
141
+ const borderWidth = getComponentBorderWidthPx(header.border?.width ?? "none");
142
+ if (!header.border || borderWidth === "0") return {
143
+ base,
144
+ border: []
145
+ };
146
+ const color = rgbColorValue(header.border.colorToken?.trim() || "border");
147
+ const style = header.border.style === "dashed" ? "dashed" : "solid";
148
+ return {
149
+ base,
150
+ border: header.border.position === "both" ? [`border-top: ${borderWidth} ${style} ${color};`, `border-bottom: ${borderWidth} ${style} ${color};`] : [`border-${header.border.position}: ${borderWidth} ${style} ${color};`]
151
+ };
152
+ }
153
+ //#endregion
154
+ //#region ../theme-core/src/header/generateHeaderNavLinkStyles.ts
155
+ function generateHeaderNavLinkStyles(header, themeId, tokens, theme, contrastTreatment, navTextSize) {
156
+ const style = effectiveHeaderNavLinkStyle(header, contrastTreatment, navTextSize);
157
+ if (!style) {
158
+ console.warn(`[generateHeaderCss] Nav link preset not found: ${header.navStyle}`);
159
+ return "";
160
+ }
161
+ return generateNavLinkCSS({
162
+ themeId,
163
+ tokens,
164
+ theme,
165
+ style: mergeHeaderNavTypographyPreference(style, {
166
+ typography: header.navFontRole ?? "inherit",
167
+ fontSize: readHeaderNavFontSizePreference(header.navTextSize),
168
+ interactionPalette: header.interactionPalette ?? "recommended"
169
+ }),
170
+ className: "header-nav-link",
171
+ surfaceDependent: true,
172
+ surfaceRestingColor: header.background?.contentOwner === siteChromeBackgroundOverrideOwner
173
+ });
174
+ }
175
+ //#endregion
176
+ //#region ../theme-core/src/header/generateHeaderLogoStyles.ts
177
+ function generateHeaderLogoStyles(input) {
178
+ const { logo, themeId, tokens } = input;
179
+ return `\n${`:where([data-theme-scope="${themeId}"]) .header-logo-text`} {\n ${[
180
+ ...logoTextColorRules(input),
181
+ logo?.fontFamily === "body" ? "font-family: var(--font-body);" : "font-family: var(--font-heading);",
182
+ ...logoLetterSpacingRules(logo),
183
+ ...logoGradientRules(logo, tokens),
184
+ ...logoContrastRules(input)
185
+ ].join("\n ")}\n}\n${mobilePanelLogoColor(input)}`;
186
+ }
187
+ function mobilePanelLogoColor(input) {
188
+ if (input.logo?.gradient) return "";
189
+ const { themeId, tokens, textColor, fallbackTextColor } = input;
190
+ const fallback = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
191
+ return `\n${`:where([data-theme-scope="${themeId}"]) .nav-mobile-panel .header-logo-text`},\n${`:where(.nav-mobile-panel[data-theme-scope="${themeId}"]) .header-logo-text`} {\n color: ${surfaceForegroundValue("text", fallback)};\n}\n`;
192
+ }
193
+ function logoTextColorRules(input) {
194
+ const { logo, textColor, fallbackTextColor, tokens, useSurfaceTextColor } = input;
195
+ if (logo?.gradient || !textColor && !useSurfaceTextColor) return [];
196
+ const authoredColor = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
197
+ return [`color: ${useSurfaceTextColor ? surfaceForegroundValue("text", authoredColor) : authoredColor};`];
198
+ }
199
+ function logoLetterSpacingRules(logo) {
200
+ const spacing = logo?.letterSpacing;
201
+ if (!spacing || spacing === "normal") return [];
202
+ return [`letter-spacing: ${{
203
+ wide: "0.05em",
204
+ wider: "0.1em",
205
+ widest: "0.15em"
206
+ }[spacing]};`];
207
+ }
208
+ function logoGradientRules(logo, tokens) {
209
+ if (!logo?.gradient) return [];
210
+ return [
211
+ `background: linear-gradient(to right, ${tokens.getColor("primary")}, ${tokens.getColor("accent")});`,
212
+ "-webkit-background-clip: text;",
213
+ "-webkit-text-fill-color: transparent;",
214
+ "background-clip: text;",
215
+ "color: transparent;"
216
+ ];
217
+ }
218
+ function logoContrastRules(input) {
219
+ if (input.logo?.gradient || input.useSurfaceTextColor) return [];
220
+ const colorToken = input.textColor?.trim() || input.fallbackTextColor?.trim() || "text";
221
+ const shadow = buildTextContrastShadow({
222
+ theme: input.theme,
223
+ colorToken,
224
+ treatment: input.contrastTreatment
225
+ });
226
+ return shadow ? [`text-shadow: ${shadow};`] : [];
227
+ }
228
+ //#endregion
229
+ //#region ../theme-core/src/header/generateHeaderCss.ts
230
+ const HEADER_BLUR = "blur(12px)";
231
+ const FLOATING_BLUR = "blur(16px)";
232
+ /**
233
+ * Generate complete CSS for header system from theme config
234
+ *
235
+ * Similar to button system - generates theme-scoped CSS using [data-theme-scope] selector
236
+ */
237
+ function generateHeaderCss(options) {
238
+ const { themeId, theme, responsiveMode = DEFAULT_THEME_RESPONSIVE_MODE } = options;
239
+ const tokens = new TokenResolver(theme);
240
+ const header = theme.header;
241
+ const cssChunks = [];
242
+ const headerContrastTreatment = resolveHeaderContrastTreatment(header);
243
+ const headerNavTextSize = resolveHeaderNavTextSize(header);
244
+ cssChunks.push(generateHeaderRootStyles(header, themeId, tokens));
245
+ cssChunks.push(generateMobileOverlayBackdropFilterFix(themeId, header.variant));
246
+ cssChunks.push(generateHeaderLogoStyles({
247
+ logo: header.logo,
248
+ themeId,
249
+ tokens,
250
+ theme,
251
+ textColor: header.textColor,
252
+ fallbackTextColor: header.navLinkStyle?.colorToken,
253
+ contrastTreatment: headerContrastTreatment ?? void 0,
254
+ useSurfaceTextColor: header.background?.contentOwner === siteChromeBackgroundOverrideOwner
255
+ }));
256
+ cssChunks.push(generateLogoTextBehaviorStyles(header.logoText, themeId));
257
+ cssChunks.push(generateHeaderNavLinkStyles(header, themeId, tokens, theme, headerContrastTreatment, headerNavTextSize));
258
+ cssChunks.push(generateDropdownContainerStyles(header, themeId, tokens, theme));
259
+ cssChunks.push(generateDropdownLinkStyles(header, themeId, tokens, theme));
260
+ cssChunks.push(generateDropdownCaretStyles(themeId));
261
+ cssChunks.push(generateDropdownTriggerOverrides(header, themeId));
262
+ cssChunks.push(generateMobilePanelStyles(header, themeId, tokens, theme));
263
+ if (header.variant === "floating" && header.container) cssChunks.push(generateFloatingContainerStyles(header, themeId, tokens, responsiveMode));
264
+ cssChunks.push(generateNavContainerStyles(header, themeId, tokens));
265
+ cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens));
266
+ cssChunks.push(generateCtaGapStyles(header, themeId));
267
+ return cssChunks.filter(Boolean).join("\n\n");
268
+ }
269
+ function resolveHeaderContrastTreatment(header) {
270
+ if (header.navLinkStyle?.contrastTreatment) return header.navLinkStyle.contrastTreatment;
271
+ return isClearSplitHeaderShape(header) ? "soft-glow" : null;
272
+ }
273
+ function resolveHeaderNavTextSize(header) {
274
+ if (header.navLinkStyle?.textSize) return header.navLinkStyle.textSize;
275
+ return isClearSplitHeaderShape(header) ? "lg" : null;
276
+ }
277
+ function isClearSplitHeaderShape(header) {
278
+ const hasSharedFloatingSurface = Boolean(header.container);
279
+ return header.variant === "floating" && (header.navStyle ?? "minimal") === "minimal" && !hasSharedFloatingSurface;
280
+ }
281
+ function isDetachedFloatingHeaderShape(header) {
282
+ return header.variant === "floating" && !header.container;
283
+ }
284
+ /**
285
+ * Generate root header container styles
286
+ */
287
+ function generateHeaderRootStyles(header, themeId, tokens) {
288
+ const selector = `:where([data-theme-scope="${themeId}"]) .header-root`;
289
+ const rules = [];
290
+ const isContainedNav = headerRootPaint(header) === "contained-nav";
291
+ rules.push("position: relative;");
292
+ rules.push("isolation: isolate;");
293
+ const surfaceRules = isContainedNav ? {
294
+ base: [],
295
+ border: []
296
+ } : buildHeaderSurfaceRules(header, tokens);
297
+ const floatingSurfaceBorder = header.variant === "floating";
298
+ if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
299
+ const basePaintRules = floatingSurfaceBorder ? [...surfaceRules.base, ...surfaceRules.border] : surfaceRules.base;
300
+ const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
301
+ if (header.positioning === "sticky" || header.positioning === "fixed") {
302
+ const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
303
+ if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
304
+ }
305
+ const baseBlock = `\n${selector} {\n ${rules.join("\n ")}\n}\n`;
306
+ const overlayFix = `\n${`${selector}:has([data-nav-mobile-overlay][aria-hidden="false"])`} {\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n}\n`;
307
+ const scrollTreatmentStyles = generateHeaderScrollTreatmentStyles(header.scrollTreatment, themeId, header.variant, scrolledPaintRules);
308
+ if (isContainedNav || basePaintRules.length === 0) return `${baseBlock}\n${overlayFix}${scrollTreatmentStyles}`;
309
+ return `${baseBlock}\n${renderHeaderPaintTargetRules(getHeaderPaintTargets(header.variant, themeId), basePaintRules)}\n${overlayFix}${scrollTreatmentStyles}`;
310
+ }
311
+ function generateLogoTextBehaviorStyles(logoText, themeId) {
312
+ if (!logoText) return "";
313
+ const selector = `:where([data-theme-scope="${themeId}"]) .header-logo-text`;
314
+ const cssChunks = [];
315
+ const mobileRules = [];
316
+ if (logoText.mobileWrapLines === 1) {
317
+ mobileRules.push("display: block;");
318
+ mobileRules.push("white-space: nowrap;");
319
+ mobileRules.push("overflow: hidden;");
320
+ mobileRules.push("text-overflow: ellipsis;");
321
+ }
322
+ if (logoText.mobileWrapLines === 2) {
323
+ mobileRules.push("display: -webkit-box;");
324
+ mobileRules.push("-webkit-box-orient: vertical;");
325
+ mobileRules.push("-webkit-line-clamp: 2;");
326
+ mobileRules.push("white-space: normal;");
327
+ mobileRules.push("overflow: hidden;");
328
+ mobileRules.push("text-overflow: ellipsis;");
329
+ }
330
+ if (logoText.mobileMaxWidth) mobileRules.push(`max-width: ${{
331
+ xs: "8rem",
332
+ sm: "10rem",
333
+ md: "12rem"
334
+ }[logoText.mobileMaxWidth]};`);
335
+ if (mobileRules.length > 0) cssChunks.push(`@media ${MQ_MD_DOWN} {\n ${selector} {\n ${mobileRules.join("\n ")}\n }\n}`);
336
+ if (logoText.hideOnShrink) {
337
+ const shrinkSelector = `:where([data-theme-scope="${themeId}"]) .rb-header-shrink.header-scrolled .header-logo-text`;
338
+ cssChunks.push(`\n${shrinkSelector} {\n display: none;\n}\n`);
339
+ }
340
+ return cssChunks.join("\n\n");
341
+ }
342
+ /**
343
+ * Generate dropdown menu container styles
344
+ */
345
+ function generateDropdownContainerStyles(header, themeId, tokens, theme) {
346
+ const selector = `:where([data-theme-scope="${themeId}"]) .nav-dropdown-menu`;
347
+ const rules = [];
348
+ const dropdownStyle = header.dropdownStyle;
349
+ rules.push(...NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES);
350
+ const surface = resolveDropdownSurface(header, theme);
351
+ rules.push(`background-color: ${tokens.getColor(surface.backgroundToken)};`);
352
+ rules.push(...surface.declarations(tokens));
353
+ const borderToken = dropdownStyle?.borderColor;
354
+ if (borderToken === null) rules.push(`border: none;`);
355
+ else rules.push(`border: 1px solid ${tokens.getColor(borderToken ?? "border")};`);
356
+ const shadowVar = getComponentShadowVar(dropdownStyle?.shadow ?? "md");
357
+ if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
358
+ const borderRadius = dropdownStyle?.borderRadius ?? "md";
359
+ rules.push(`border-radius: ${{
360
+ none: "0",
361
+ sm: "0.25rem",
362
+ md: "0.5rem",
363
+ lg: "0.75rem"
364
+ }[borderRadius]};`);
365
+ rules.push(`padding: 0.5rem 0;`);
366
+ return `\n${selector} {\n ${rules.join("\n ")}\n}\n`;
367
+ }
368
+ function generateDropdownLinkStyles(header, themeId, tokens, theme) {
369
+ const configuredDropdownStyle = header.dropdownStyle;
370
+ const textColorToken = resolveDropdownSurface(header, theme).textToken;
371
+ const hoverBgToken = configuredDropdownStyle?.hoverBackground ?? textColorToken;
372
+ const hoverEffects = {
373
+ hover: hoverBgToken === null ? [] : [{
374
+ effectId: "background-on-hover-alpha",
375
+ options: {
376
+ colorToken: hoverBgToken,
377
+ opacity: 12
378
+ }
379
+ }],
380
+ active: hoverBgToken === null ? [] : [{
381
+ effectId: "background-on-hover-alpha",
382
+ options: {
383
+ colorToken: hoverBgToken,
384
+ opacity: 18
385
+ }
386
+ }]
387
+ };
388
+ if (configuredDropdownStyle?.hoverTextColor) {
389
+ hoverEffects.hover?.push({
390
+ effectId: "text-color-change",
391
+ options: { hoverColorToken: configuredDropdownStyle.hoverTextColor }
392
+ });
393
+ hoverEffects.active?.push({
394
+ effectId: "text-color-change",
395
+ options: { hoverColorToken: configuredDropdownStyle.hoverTextColor }
396
+ });
397
+ }
398
+ const baseCSS = generateNavLinkCSS({
399
+ themeId,
400
+ tokens,
401
+ theme,
402
+ style: {
403
+ name: "Dropdown",
404
+ typography: "body",
405
+ fontWeight: configuredDropdownStyle?.fontWeight ?? header.navWeight ?? "medium",
406
+ textTransform: configuredDropdownStyle?.textTransform ?? "none",
407
+ italic: false,
408
+ colorToken: textColorToken,
409
+ padding: "compact",
410
+ borderRadius: "sm",
411
+ effects: hoverEffects
412
+ },
413
+ className: "nav-dropdown-link"
414
+ });
415
+ const additionalRules = [];
416
+ const letterSpacing = configuredDropdownStyle?.letterSpacing ?? "normal";
417
+ if (letterSpacing !== "normal") additionalRules.push(`letter-spacing: ${{
418
+ normal: "0em",
419
+ wide: "0.05em",
420
+ wider: "0.1em"
421
+ }[letterSpacing]};`);
422
+ const textSize = configuredDropdownStyle?.textSize ?? "sm";
423
+ additionalRules.push(`font-size: ${{
424
+ xs: "0.75rem",
425
+ sm: "0.875rem",
426
+ base: "1rem",
427
+ lg: "1.125rem"
428
+ }[textSize]};`);
429
+ if (additionalRules.length > 0) return baseCSS + `\n${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-link`} {\n ${additionalRules.join("\n ")}\n}\n`;
430
+ return baseCSS;
431
+ }
432
+ function generateDropdownCaretStyles(themeId) {
433
+ return `
434
+ ${`:where([data-theme-scope="${themeId}"]) .nav-caret`} {
435
+ width: 0.45rem;
436
+ height: 0.45rem;
437
+ margin-left: 0.5rem;
438
+ border-right: 2px solid currentColor;
439
+ border-bottom: 2px solid currentColor;
440
+ transform: rotate(45deg) translateY(-1px);
441
+ transition: transform 150ms ease;
442
+ }
443
+
444
+ ${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-trigger[aria-expanded="true"] .nav-caret, :where([data-theme-scope="${themeId}"]) .nav-mobile-trigger[aria-expanded="true"] .nav-caret`} {
445
+ transform: rotate(-135deg) translateY(1px);
446
+ }
447
+ `.trim();
448
+ }
449
+ function generateDropdownTriggerOverrides(header, themeId) {
450
+ const navStyle = header.navStyle ?? "minimal";
451
+ if (navStyle !== "underline" && navStyle !== "underline-grow") return "";
452
+ return `
453
+ ${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-trigger.header-nav-link::after`} {
454
+ content: none;
455
+ }
456
+ `.trim();
457
+ }
458
+ /**
459
+ * The dropdown menu and mobile panel share one surface: `dropdownStyle`'s
460
+ * background, with the text candidate (the dropdown's own colour, then the
461
+ * header's nav colour) validated against it through the surface contract. The
462
+ * nav colour is chosen for the header bar, which can be dark or transparent,
463
+ * so it only carries over when it is legible on the menu too.
464
+ */
465
+ function resolveDropdownSurface(header, theme) {
466
+ const backgroundToken = header.dropdownStyle?.background ?? "surface";
467
+ const candidate = header.dropdownStyle?.textColor ?? ((header.navColor ?? header.textColor)?.trim() || "text");
468
+ const foreground = resolveSurfaceForeground({
469
+ type: "color",
470
+ color: backgroundToken,
471
+ textColor: candidate
472
+ }, expandPalette(theme.palette));
473
+ return {
474
+ backgroundToken,
475
+ textToken: foreground.kind === "known" ? foreground.roles.text : candidate,
476
+ declarations: (tokens) => foreground.kind === "known" ? surfaceForegroundDeclarations(surfaceForegroundInputFromResolved(foreground, (token) => tokens.getColor(token))) : [`color: ${tokens.getColor(candidate)};`]
477
+ };
478
+ }
479
+ /**
480
+ * Generate mobile navigation panel styles
481
+ * Uses the same dropdownStyle settings as the desktop dropdown menus
482
+ */
483
+ function generateMobilePanelStyles(header, themeId, tokens, theme) {
484
+ const selector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-panel`;
485
+ const selfSelector = `:where(.nav-mobile-panel[data-theme-scope="${themeId}"])`;
486
+ const surface = resolveDropdownSurface(header, theme);
487
+ const body = renderCssDeclarations([`background-color: ${tokens.getColor(surface.backgroundToken)};`, ...surface.declarations(tokens)]);
488
+ return `\n${selector} {\n ${body}\n}\n\n${selfSelector} {\n ${body}\n}\n`;
489
+ }
490
+ /**
491
+ * Generate nav container styles (pill/glass)
492
+ */
493
+ function generateNavContainerStyles(header, themeId, tokens) {
494
+ const navContainer = header.navContainer;
495
+ const navContainerType = navContainer?.type ?? "none";
496
+ if (!navContainer || navContainerType === "none") return "";
497
+ const selector = `:where([data-theme-scope="${themeId}"]) .header-nav-row`;
498
+ const rules = [];
499
+ if (navContainerType === "pill" || navContainerType === "glass") {
500
+ rules.push("padding: 0.5rem 0.75rem;");
501
+ rules.push("border-radius: 9999px;");
502
+ rules.push("display: inline-flex;");
503
+ rules.push("align-items: center;");
504
+ rules.push("gap: 1.5rem;");
505
+ if (isDetachedFloatingHeaderShape(header)) rules.push("align-self: flex-start;");
506
+ }
507
+ if (navContainerType === "glass") {
508
+ const opacity = resolveFloatingGlassOpacity(header, navContainer.opacity, .15);
509
+ const background = navContainer.tint ? buildTint(tokens.getColor(navContainer.tint), opacity) : buildRgbWhite(opacity);
510
+ rules.push(`background-color: ${background};`);
511
+ rules.push(`backdrop-filter: ${HEADER_BLUR};`);
512
+ rules.push(`-webkit-backdrop-filter: ${HEADER_BLUR};`);
513
+ rules.push("border: 1px solid rgba(255, 255, 255, 0.2);");
514
+ rules.push("box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);");
515
+ } else if (navContainerType === "pill") {
516
+ const opacity = clampOpacity(navContainer.opacity, .15);
517
+ if (navContainer.tint) rules.push(`background-color: ${buildTint(tokens.getColor(navContainer.tint), opacity)};`);
518
+ else rules.push(`background-color: ${tokens.getColor("surface")};`);
519
+ rules.push(`border: 1px solid ${tokens.getColor("border")};`);
520
+ }
521
+ if (rules.length > 0) return `${selector} { ${rules.join(" ")} }`;
522
+ return "";
523
+ }
524
+ /**
525
+ * Generate floating container styles
526
+ */
527
+ function generateFloatingContainerStyles(header, themeId, tokens, responsiveMode) {
528
+ const container = header.container;
529
+ if (!container) return "";
530
+ const selector = `:where([data-theme-scope="${themeId}"]) .header-floating-container`;
531
+ const rules = [];
532
+ const opacity = container.tint === "surface" ? resolveFloatingGlassOpacity(header, container.opacity, .12) : clampOpacity(container.opacity, .12);
533
+ if (container.tint) rules.push(`background-color: ${buildTint(tokens.getColor(container.tint), opacity)};`);
534
+ else rules.push(`background-color: ${buildRgbWhite(opacity)};`);
535
+ rules.push(`backdrop-filter: ${FLOATING_BLUR};`);
536
+ rules.push(`-webkit-backdrop-filter: ${FLOATING_BLUR};`);
537
+ if (container.border) rules.push(`border: 1px solid rgb(255 255 255 / 0.2);`);
538
+ rules.push(`border-radius: ${{
539
+ none: "0",
540
+ sm: "0.375rem",
541
+ md: "0.5rem",
542
+ lg: "0.75rem",
543
+ xl: "1rem",
544
+ "2xl": "1.5rem"
545
+ }[container.rounded]};`);
546
+ if (container.shadow) rules.push(`box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);`);
547
+ rules.push(`padding: ${{
548
+ sm: "1rem 1.5rem",
549
+ md: "1.5rem 2rem",
550
+ lg: "2rem 2.5rem"
551
+ }[container.padding]};`);
552
+ return `\n${selector} {\n ${rules.join("\n ")}\n}\n${generateFrameMobileSheetStyles(container, themeId, rules, responsiveMode)}`;
553
+ }
554
+ /** The frame owner explicitly opts into an inset sheet on phones. */
555
+ function generateFrameMobileSheetStyles(container, themeId, rules, responsiveMode) {
556
+ if (container.mobileSheet !== "inset") return "";
557
+ return `
558
+ ${phoneAtRule(responsiveMode)} {
559
+ :where([data-theme-scope="${themeId}"]) .header-mobile-bar {
560
+ ${rules.join("\n ")}
561
+ box-sizing: border-box; margin: 12px; width: calc(100% - 24px); min-height: 60px; padding: 10px 16px; align-items: center;
562
+ }
563
+ }`;
564
+ }
565
+ /** The phone breakpoint as a viewport media query, or the site container query in container mode. */
566
+ function phoneAtRule(responsiveMode) {
567
+ const containerQuery = responsiveMode === "container" ? convertMediaQueryToContainerQuery(MQ_MD_DOWN) : null;
568
+ return containerQuery ? `@container ${THEME_RESPONSIVE_CONTAINER_NAME} ${containerQuery}` : `@media ${MQ_MD_DOWN}`;
569
+ }
570
+ /**
571
+ * CTA gap value map — controls left margin on the desktop CTA button
572
+ */
573
+ const HEADER_CTA_GAP_MAP = {
574
+ none: "0",
575
+ tight: "0.5rem",
576
+ compact: "1rem",
577
+ default: "1.5rem",
578
+ relaxed: "2rem",
579
+ spacious: "3rem"
580
+ };
581
+ /**
582
+ * The inverted CTA treatment is contextual to branded header surfaces. It
583
+ * cannot be represented by the generic secondary button role alone because
584
+ * that role is transparent and inherits the surrounding surface foreground.
585
+ * Keep the shared button's structure/effects while making the header own the
586
+ * palette relationship for both desktop and mobile CTAs.
587
+ */
588
+ function generateHeaderCtaTreatmentStyles(header, themeId, tokens) {
589
+ if (header.ctaTreatment !== "inverted") return "";
590
+ const desktopSelector = `:where([data-theme-scope="${themeId}"]) .header-cta`;
591
+ const mobileSelector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-cta`;
592
+ const selectors = `${desktopSelector},\n${mobileSelector}`;
593
+ const hoverSelectors = [
594
+ `${desktopSelector}:hover`,
595
+ `${desktopSelector}[data-force-hover="true"]`,
596
+ `${mobileSelector}:hover`,
597
+ `${mobileSelector}[data-force-hover="true"]`
598
+ ].join(",\n");
599
+ const focusSelectors = [`${desktopSelector}:focus-visible`, `${mobileSelector}:focus-visible`].join(",\n");
600
+ return `
601
+ ${selectors} {
602
+ background-color: ${tokens.getColor("background")};
603
+ background-image: none;
604
+ color: ${tokens.getColor("onBackground")};
605
+ border-color: currentColor;
606
+ }
607
+
608
+ ${hoverSelectors} {
609
+ background-color: ${tokens.getColor("surface")};
610
+ background-image: none;
611
+ color: ${tokens.getColor("onSurface")};
612
+ }
613
+
614
+ ${focusSelectors} {
615
+ outline: 2px solid ${tokens.getColor("onBackground")};
616
+ outline-offset: 2px;
617
+ box-shadow: 0 0 0 4px ${tokens.getColor("background")};
618
+ }
619
+ `;
620
+ }
621
+ /**
622
+ * Generate CTA button gap styles (left margin between nav links and CTA)
623
+ */
624
+ function generateCtaGapStyles(header, themeId) {
625
+ if (!header.ctaGap) return "";
626
+ const value = HEADER_CTA_GAP_MAP[header.ctaGap];
627
+ if (!value) return "";
628
+ return `\n${`:where([data-theme-scope="${themeId}"]) .header-cta`} {\n margin-left: ${value};\n}\n`;
629
+ }
630
+ function clampOpacity(value, fallback) {
631
+ if (typeof value !== "number" || Number.isNaN(value)) return fallback;
632
+ return Math.min(Math.max(value, 0), 1);
633
+ }
634
+ function resolveFloatingGlassOpacity(header, value, fallback) {
635
+ const opacity = clampOpacity(value, fallback);
636
+ return header.variant === "floating" ? Math.max(opacity, .4) : opacity;
637
+ }
638
+ function buildTint(color, opacity) {
639
+ return applyAlpha(color, opacity);
640
+ }
641
+ function buildRgbWhite(opacity) {
642
+ return `rgb(255 255 255 / ${clampOpacity(opacity, 1)})`;
643
+ }
644
+ function applyAlpha(color, opacity) {
645
+ const clamped = clampOpacity(opacity, 1);
646
+ if (color.startsWith("rgb(") && color.endsWith(")")) {
647
+ const inner = color.slice(4, -1).trim();
648
+ return `rgb(${inner.includes("/") ? (inner.split("/")[0] ?? inner).trim() : inner} / ${clamped})`;
649
+ }
650
+ return color;
651
+ }
652
+ //#endregion
653
+ //#region ../theme-core/src/siteChromePlacement.ts
654
+ const SITE_CHROME_PLACEMENT_CLASSES = [
655
+ "rb-sticky",
656
+ "rb-fixed",
657
+ "rb-absolute",
658
+ "rb-relative",
659
+ "rb-top-0",
660
+ "rb-left-0",
661
+ "rb-right-0",
662
+ "rb-bottom-0",
663
+ "rb-z-40",
664
+ "rb-z-50"
665
+ ];
666
+ const HEADER_POSITIONINGS = [
667
+ "static",
668
+ "sticky",
669
+ "fixed"
670
+ ];
671
+ function parseHeaderPositioning(value) {
672
+ return isHeaderPositioning(value) ? value : "static";
673
+ }
674
+ function isHeaderPositioning(value) {
675
+ return typeof value === "string" && HEADER_POSITIONINGS.includes(value);
676
+ }
677
+ function planSiteChromePlacement(positioning) {
678
+ switch (positioning) {
679
+ case "static": return {
680
+ kind: "static",
681
+ headerRootClassName: null,
682
+ standaloneShellClassName: null
683
+ };
684
+ case "sticky": return {
685
+ kind: "sticky",
686
+ headerRootClassName: "rb-sticky rb-top-0",
687
+ standaloneShellClassName: "sticky top-0 z-40 w-full"
688
+ };
689
+ case "fixed": return {
690
+ kind: "fixed",
691
+ headerRootClassName: "rb-fixed rb-top-0 rb-left-0 rb-right-0",
692
+ standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
693
+ };
694
+ default: return assertNever(positioning);
695
+ }
696
+ }
697
+ function splitSiteChromePlacementClasses(className) {
698
+ if (!className) return {
699
+ wrapperClasses: "",
700
+ sectionClasses: ""
701
+ };
702
+ const placementClasses = new Set(SITE_CHROME_PLACEMENT_CLASSES);
703
+ const wrapperParts = [];
704
+ const sectionParts = [];
705
+ for (const cls of className.split(/\s+/).filter(Boolean)) if (placementClasses.has(cls)) wrapperParts.push(cls);
706
+ else sectionParts.push(cls);
707
+ return {
708
+ wrapperClasses: wrapperParts.join(" "),
709
+ sectionClasses: sectionParts.join(" ")
710
+ };
711
+ }
712
+ //#endregion
713
+ //#region ../theme-core/src/responsiveDisplay.ts
714
+ const BASE_DISPLAY_CLASSES = {
715
+ block: "rb-block",
716
+ flex: "rb-flex",
717
+ "inline-block": "rb-inline-block",
718
+ "inline-flex": "rb-inline-flex",
719
+ grid: "rb-grid"
720
+ };
721
+ const LARGE_DISPLAY_CLASSES = {
722
+ block: "rb-lg-block",
723
+ flex: "rb-lg-flex",
724
+ "inline-block": "rb-lg-inline-block",
725
+ "inline-flex": "rb-lg-inline-flex",
726
+ grid: "rb-lg-grid"
727
+ };
728
+ /**
729
+ * Build a class pair for content that should render below the large breakpoint.
730
+ *
731
+ * The base display class is always included so callers cannot accidentally
732
+ * express "mobile-only" visibility without a display mode for the visible state.
733
+ */
734
+ function mobileOnlyDisplay(display) {
735
+ return `${BASE_DISPLAY_CLASSES[display]} rb-lg-hidden`;
736
+ }
737
+ /**
738
+ * Build a class pair for content that should render from the large breakpoint up.
739
+ *
740
+ * The hidden base class ensures the element stays out of the mobile layout until
741
+ * the large-breakpoint display class takes over.
742
+ */
743
+ function desktopOnlyDisplay(display) {
744
+ return `rb-hidden ${LARGE_DISPLAY_CLASSES[display]}`;
745
+ }
746
+ //#endregion
747
+ //#region ../theme-core/src/siteChromeOverlayClearance.ts
748
+ const SITE_CHROME_VISIBLE_HEADER_ATTR = "data-site-chrome-visible-header";
749
+ //#endregion
750
+ export { planSiteChromePlacement as a, DEFAULT_THEME_RESPONSIVE_MODE as c, convertMediaQueryToContainerQuery as d, parseHeaderPositioning as i, THEME_RESPONSIVE_CONTAINER_NAME as l, desktopOnlyDisplay as n, splitSiteChromePlacementClasses as o, mobileOnlyDisplay as r, generateHeaderCss as s, SITE_CHROME_VISIBLE_HEADER_ATTR as t, getResponsiveScopeSpec as u };