@riverbankcms/sdk 0.160.0 → 0.162.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 (209) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-CoqeotCL.d.ts → BlocksIslandsHydrator-PZUoA872.d.ts} +1 -1
  2. package/dist/_dts/{Page-C0ENVLCF.d.ts → Page-CdQS6C7i.d.ts} +211 -9
  3. package/dist/_dts/{SdkPreviewMode-jZK0A49V.d.ts → SdkPreviewMode-CNGO-5f1.d.ts} +59 -92
  4. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  5. package/dist/_dts/{client-uMMuPq9V.d.ts → client-DGa53rjL.d.ts} +11 -3
  6. package/dist/_dts/{content-types-D6nXGqdQ.d.ts → content-types-K9R7P-KF.d.ts} +2 -2
  7. package/dist/_dts/{contracts-Bnmj1nxu.d.ts → contracts-CyBaPaIq.d.ts} +17 -5
  8. package/dist/_dts/{footerPageOutline-CeLjFX8b.d.ts → footerPageOutline-B6jmKmon.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-nyU8q02J.d.ts → generatePageMetadata-iemoR3AN.d.ts} +2 -2
  10. package/dist/_dts/{index-BaaGBY1v.d.ts → index-8CN0Nd-Z.d.ts} +2 -2
  11. package/dist/_dts/{index-nVoi_74l.d.ts → index-BtnsA14K.d.ts} +10 -20
  12. package/dist/_dts/{index-lkpjIg5i.d.ts → index-C39F9KaB.d.ts} +13 -2
  13. package/dist/_dts/{index-C5xslEBn.d.ts → index-DEu85xBt.d.ts} +1 -1
  14. package/dist/_dts/{schema-D0bNcPWK.d.ts → index-DI2yaSPY.d.ts} +22873 -19918
  15. package/dist/_dts/{types-D8czmbQF.d.ts → index-Dbd0Sn0G.d.ts} +4356 -1827
  16. package/dist/_dts/{index-CEaKil7G.d.ts → index-Du1IRglc.d.ts} +2 -2
  17. package/dist/_dts/{index-DahMwisK.d.ts → index-Jlcq6w69.d.ts} +3 -3
  18. package/dist/_dts/{index-Bg64CkV-.d.ts → index-Wm62sXf2.d.ts} +4 -4
  19. package/dist/_dts/{loadContent-CYLmzvLq.d.ts → loadContent-BPfAAZDW.d.ts} +13 -10
  20. package/dist/_dts/{resolvePageContent-DqnxChOs.d.ts → resolvePageContent-DWbrtKf8.d.ts} +2 -2
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/index.d.ts +8 -8
  28. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  29. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  30. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  31. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  32. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  33. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  35. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  36. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  37. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  38. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  43. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  45. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  46. package/dist/_dts/sdk/src/server.d.ts +5 -5
  47. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  48. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  49. package/dist/_dts/{types-DSgmJ15W.d.ts → types-CVv2H4AT.d.ts} +7 -7
  50. package/dist/_dts/{types-CFrYuXYP.d.ts → types-CfNG5koF.d.ts} +4 -2
  51. package/dist/_dts/{types-Dm-KW7nj.d.ts → types-ClZ-BQL_.d.ts} +3 -3
  52. package/dist/_dts/{validation-Bmb4WnHg.d.ts → validation-BJ6Lf_Dr.d.ts} +4 -4
  53. package/dist/client/{BlocksIslandsHydrator-DZRKi6tT.mjs → BlocksIslandsHydrator-COqlgWYU.mjs} +23 -21
  54. package/dist/client/{BookingMailingListNote-C00sLLdL.mjs → BookingMailingListNote-CFYPDEHH.mjs} +1 -1
  55. package/dist/client/{CalendarNavigationChevron-CHSi9b3E.mjs → CalendarNavigationChevron-COBVxgHb.mjs} +6 -6
  56. package/dist/client/{CheckboxChoice-Bhm6RAUL.mjs → CheckboxChoice-C7X9dJ8A.mjs} +1 -1
  57. package/dist/client/{DemoBookingPortalAccess-CaN-7ui7.mjs → DemoBookingPortalAccess-CvT0E9AR.mjs} +26 -10
  58. package/dist/client/{DemoPortalSignInLink-ClxN5_xZ.mjs → DemoPortalSignInLink-EBOBN5dT.mjs} +1 -1
  59. package/dist/client/{EventCalendar.client-BncvSa1n.mjs → EventCalendar.client-U6pKcntV.mjs} +16 -17
  60. package/dist/client/{EventCombined.client-DluBxVVu.mjs → EventCombined.client-CNzwEHws.mjs} +8 -8
  61. package/dist/client/{EventEmbeddedCheckoutStep-BiJrMtfp.mjs → EventEmbeddedCheckoutStep-B9yAWV_k.mjs} +1 -1
  62. package/dist/client/{EventItem-CXhnT9pF.mjs → EventItem-M5rpaHxi.mjs} +4 -4
  63. package/dist/client/{EventListWeekNavigation-V-dtoDlD.mjs → EventListWeekNavigation-D4ieBLDY.mjs} +1 -1
  64. package/dist/client/{EventListing.client-DPO6SZbx.mjs → EventListing.client-B8F40Rmn.mjs} +3 -3
  65. package/dist/client/{EventListing.view-B-Yi5JZS.mjs → EventListing.view-k4lhuCn5.mjs} +15 -6
  66. package/dist/client/{EventRegistrationPayment-Dc3Fnlnw.mjs → EventRegistrationPayment-C3g8_Hqb.mjs} +25 -13
  67. package/dist/client/LocationMapActions-CAjt7qVo.mjs +62 -0
  68. package/dist/client/MapDrawingSvg-_aIK2ojv.mjs +200 -0
  69. package/dist/client/{Page-7PkzO04N.mjs → Page-DJBIQBOw.mjs} +2555 -536
  70. package/dist/client/{StepIndicator-DiD6euZ8.mjs → StepIndicator-CFacB1z6.mjs} +2 -2
  71. package/dist/client/{TabBarFragment-BHd8GN8y.mjs → TabBarFragment-BLsfQskO.mjs} +1 -1
  72. package/dist/client/ThemedButton-BWsDgjMC.mjs +2243 -0
  73. package/dist/client/{accordion-2m27DsIk.mjs → accordion-CtO2XF7M.mjs} +1 -1
  74. package/dist/client/{booking-form.client-BddWV5w1.mjs → booking-form.client-RICCQ0h2.mjs} +137 -60
  75. package/dist/client/{bookingForm-bcdXQjmw.mjs → bookingForm-SvjLPx8i.mjs} +4 -4
  76. package/dist/client/bookings.mjs +5 -5
  77. package/dist/client/{carousel-D7nj9I0y.mjs → carousel-BR-zCD3O.mjs} +2 -2
  78. package/dist/client/{carousel.client-AffDJo_s.mjs → carousel.client-CEWtoZd3.mjs} +1 -1
  79. package/dist/client/{cart-PN6yCw1H.mjs → cart-C6YpKbZZ.mjs} +3 -3
  80. package/dist/client/{cart.client-D4t1f0cJ.mjs → cart.client-dC938WrX.mjs} +1 -1
  81. package/dist/client/{checkout-CsTwXVSb.mjs → checkout-Dy9RlREI.mjs} +3 -3
  82. package/dist/client/{checkout.client-BhQE3zY7.mjs → checkout.client-CefG0d2F.mjs} +1 -1
  83. package/dist/client/client.mjs +37 -71
  84. package/dist/client/{context-BLAvalAa.mjs → context-BFwxgZpB.mjs} +28 -1
  85. package/dist/client/{cta-CUXhX_D7.mjs → cta-DtA42Xio.mjs} +1 -1
  86. package/dist/client/{dateFormatting-BHIHxNuo.mjs → dateFormatting-yP1B7F0O.mjs} +39 -2
  87. package/dist/client/{demoPortalMagicLink-R-awbk_0.mjs → demoPortalMagicLink-WOiT5Ryi.mjs} +1 -1
  88. package/dist/client/{enhanceHeaderSection-9Q93uvTo.mjs → enhanceHeaderSection-Dh8c_Lq-.mjs} +3 -3
  89. package/dist/client/{event-details.client-BS1WtG-a.mjs → event-details.client-BFgsLqTj.mjs} +3 -17
  90. package/dist/client/{event-registration.client-BXndwsET.mjs → event-registration.client-BaXZ1-Ky.mjs} +16 -16
  91. package/dist/client/{eventCalendar-HyoOt1Qz.mjs → eventCalendar-COLwF80U.mjs} +4 -4
  92. package/dist/client/{eventCombined-sdG5oEaH.mjs → eventCombined-D3Ltwu03.mjs} +4 -4
  93. package/dist/client/{eventDetails-FFAknE4w.mjs → eventDetails-CBrkimXu.mjs} +2 -2
  94. package/dist/client/{eventListing-CGK6urk3.mjs → eventListing-CedKVA1S.mjs} +4 -4
  95. package/dist/client/{eventRegistration-VhrvCs4l.mjs → eventRegistration-DkQQfR1b.mjs} +4 -4
  96. package/dist/client/{form-C-B5O_ko.mjs → form-XFy9uXSJ.mjs} +3 -3
  97. package/dist/client/{form.client-DoZVcl8d.mjs → form.client-B0iancFK.mjs} +4 -4
  98. package/dist/client/{form.parts-mttKpgif.mjs → form.parts-DMbolu9Y.mjs} +3 -3
  99. package/dist/client/{formatDate-xUSCknEO.mjs → formatDate-Jm5MQOCA.mjs} +1 -1
  100. package/dist/client/gifting/client.mjs +3 -3
  101. package/dist/client/{headerSection-BHUEXsaI.mjs → headerSection-WjlECjtV.mjs} +2 -2
  102. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BkoW_PEn.mjs} +1 -1
  103. package/dist/client/{mediaContext-DThoeEBU.mjs → mediaContext-CNzWmoA4.mjs} +1 -1
  104. package/dist/client/{newsletter-form.client-D_n0rftg.mjs → newsletter-form.client-D-XwJTjN.mjs} +5 -5
  105. package/dist/client/{newsletter-form.parts-DKHye4IE.mjs → newsletter-form.parts-H92f30y0.mjs} +2 -2
  106. package/dist/client/{newsletterForm-tEaYelzx.mjs → newsletterForm-DMuxzu6I.mjs} +3 -3
  107. package/dist/client/{noop-B610YKEx.mjs → noop-B3RNPVrt.mjs} +313 -3
  108. package/dist/client/portal/client.mjs +1116 -85
  109. package/dist/client/{product-detail.client-DUf5x5Jt.mjs → product-detail.client-B3HuuykE.mjs} +1 -1
  110. package/dist/client/{product-list.client-Cqp1BPTV.mjs → product-list.client-CzsDrHQO.mjs} +1 -1
  111. package/dist/client/{productDetail-B8bBiogP.mjs → productDetail-CbBUVWgd.mjs} +3 -3
  112. package/dist/client/{productList-BKN4D-1z.mjs → productList-vqOKH2mh.mjs} +3 -3
  113. package/dist/client/{propsDecoder-2nNZh2Oe.mjs → propsDecoder-CkSUep5a.mjs} +4 -28
  114. package/dist/client/{registry.server-BAm4RPNJ.mjs → registry.server-cZ24QwtW.mjs} +607 -210
  115. package/dist/client/rendering/client.mjs +28 -28
  116. package/dist/client/rendering/islands.mjs +1 -1
  117. package/dist/client/rendering.mjs +18 -9
  118. package/dist/client/{richText-coerce-Cv-qomNB.mjs → richText-coerce-DDcCKvBJ.mjs} +1 -1
  119. package/dist/client/{routeIslandApiConfig-C5u8MbAA.mjs → routeIslandApiConfig-DYBioANh.mjs} +1 -1
  120. package/dist/client/{ThemedButton-C22C9cCF.mjs → schema-DNHLlze-.mjs} +7307 -8363
  121. package/dist/client/{shop-DZNC0VKk.mjs → shop-CF0dhnfH.mjs} +3 -3
  122. package/dist/client/{shop-commerce-DdX4LSa3.mjs → shop-commerce-DQznNBEo.mjs} +11 -11
  123. package/dist/client/{shop-commerce-store-BJtrZov9.mjs → shop-commerce-store-Ba8zPlIg.mjs} +1 -1
  124. package/dist/client/{shop.client-DmDd-igg.mjs → shop.client-DqfYoqWH.mjs} +12 -12
  125. package/dist/client/{shop.interactive-5SnnDHz3.mjs → shop.interactive-CreQ0I7i.mjs} +38 -183
  126. package/dist/client/{shopShared-CPqUlAh9.mjs → shopShared-D-yh-P7g.mjs} +2 -2
  127. package/dist/client/site-styles-B9HgmY07.mjs +11619 -0
  128. package/dist/client/{timetableModel-C19rcHEw.mjs → timetableModel-DCdVErTJ.mjs} +149 -8
  129. package/dist/client/{useAvailableSlots-BjbJXotk.mjs → useAvailableSlots-Cvgdp2DH.mjs} +8 -11
  130. package/dist/client/{useBookingNowIso-CMgfL7YJ.mjs → useBookingNowIso-DrTnGNzD.mjs} +1 -1
  131. package/dist/client/{useDiscountApply-KG8jB7WC.mjs → useDiscountApply-CULjnXGl.mjs} +2 -2
  132. package/dist/client/{useDiscountCodeUi-DK2w_i0a.mjs → useDiscountCodeUi-Gn_m7e0o.mjs} +1 -1
  133. package/dist/client/{useEventPagination-DW6MCirb.mjs → useEventPagination-CsysCF22.mjs} +8 -21
  134. package/dist/client/{view-CseyBW07.mjs → view-BpBjo9Te.mjs} +71 -59
  135. package/dist/client/{view-CkUn3Y0Y.mjs → view-DMyTchi7.mjs} +4 -4
  136. package/dist/client/wizardSteps-BO2OmMO9.mjs +6604 -0
  137. package/dist/preview-next/before-render.mjs +7 -6
  138. package/dist/preview-next/chrome.css +2 -0
  139. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-lUHBrzHv.mjs → EventEmbeddedCheckoutStep-DLsSmZbO.mjs} +2 -1
  140. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  141. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  142. package/dist/preview-next/client/{PreviewEditorSidebar-DWyUGCAG.mjs → PreviewEditorSidebar-ChrW9VEo.mjs} +269 -1100
  143. package/dist/preview-next/client/{PreviewEditorUI-Wq0b3Daw.mjs → PreviewEditorUI-VaHvYtrA.mjs} +10 -190
  144. package/dist/preview-next/client/{SdkPreviewModeRuntime-BtZPcwYV.mjs → SdkPreviewModeRuntime-Bz7jR6nl.mjs} +1 -1
  145. package/dist/preview-next/client/{SdkPreviewModeRuntime-wSI_R361.mjs → SdkPreviewModeRuntime-DWwktlWs.mjs} +639 -536
  146. package/dist/preview-next/client/{ThemedButton-DzeycIlD.mjs → ThemedButton-CHKOWXxl.mjs} +1706 -692
  147. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  148. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-Hc4pYnNe.mjs → previewAuthStore-C0VUwEHz.mjs} +81363 -136296
  150. package/dist/preview-next/client/{previewChromeSurface-Corq4AG7.mjs → previewChromeSurface-Dhyx2YrS.mjs} +1 -1
  151. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  152. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  153. package/dist/preview-next/client/runtime.mjs +3 -3
  154. package/dist/preview-next/client/{sdk-runtime-CWymRWhK.mjs → sdk-runtime-C2GWOCyj.mjs} +1 -1
  155. package/dist/preview-next/client/siteStyleAccess-DHyzUpv4.mjs +12833 -0
  156. package/dist/preview-next/client/{spinner-C4If5Y-O.mjs → spinner-BeR2S8oG.mjs} +2 -1
  157. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  158. package/dist/preview-next/editor-base.css +2 -2
  159. package/dist/preview-next/keepAlive.mjs +3 -3
  160. package/dist/preview-next/middleware.mjs +7 -3
  161. package/dist/preview-next/{refresh-contract-CvmNqZ1Q.mjs → refresh-contract-uQ6BXgLJ.mjs} +5 -0
  162. package/dist/preview-next/{route-contract-8csADeIT.mjs → route-contract-CkrFDMrl.mjs} +434 -203
  163. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  164. package/dist/preview-next/session.mjs +1 -1
  165. package/dist/server/{Block.shared-D1_gonwM.mjs → Block.shared-DxvNGDig.mjs} +4 -4
  166. package/dist/server/{bindings-CFmJg5lm.mjs → bindings-BuhKvYkE.mjs} +2 -1
  167. package/dist/server/{client-DPsi0Dai.mjs → client-BobW6DOz.mjs} +39 -72
  168. package/dist/server/config-validation.mjs +1 -1
  169. package/dist/server/config.mjs +2 -2
  170. package/dist/server/{siteChromeOverlayClearance-DALIAMwo.mjs → effectiveNavLinkStyle-B-MKSt0p.mjs} +2060 -1680
  171. package/dist/server/index.mjs +3 -3
  172. package/dist/server/{loadContent-RMCcuVU_.mjs → loadContent-CCG_3mbY.mjs} +14 -5
  173. package/dist/server/loadPage-Bk9HDh9K.mjs +2 -0
  174. package/dist/server/{loadPage-DhDGzj7t.mjs → loadPage-jntGoMrf.mjs} +3 -2
  175. package/dist/server/next.mjs +9 -9
  176. package/dist/server/{overrideResolution-OxY5FMuy.mjs → overrideResolution-BBOlgn4Z.mjs} +1 -1
  177. package/dist/server/{overrides-Bz_A6sB9.mjs → overrides-DByQwIyW.mjs} +803 -412
  178. package/dist/server/page-converter.mjs +1 -1
  179. package/dist/server/{prebuild-B_1vrSru.mjs → prebuild-DrwcTk2t.mjs} +1 -1
  180. package/dist/server/prebuild.mjs +1 -1
  181. package/dist/server/{prefetchBlockData-B7ukYXXR.mjs → prefetchBlockData-LfgxSJYE.mjs} +156 -89
  182. package/dist/server/{publicProducts-Djbpc81A.mjs → publicProducts-8A3T5v4M.mjs} +685 -166
  183. package/dist/server/{registry-eFjKtEhF.mjs → registry-Digv02oV.mjs} +780 -1052
  184. package/dist/server/rendering/server.mjs +4 -4
  185. package/dist/server/rendering.mjs +8 -8
  186. package/dist/server/{resolveBlockData-DYvEa9c5.mjs → resolveBlockData-C23t8-77.mjs} +1 -1
  187. package/dist/server/routing.mjs +1 -1
  188. package/dist/server/{schema-C3dJ5UkL.mjs → schema-BiqpDRwB.mjs} +4805 -3561
  189. package/dist/server/server.mjs +3 -3
  190. package/dist/server/site-styles-DrkprQPL.mjs +755 -0
  191. package/dist/server/siteChromeOverlayClearance-BmKKkkbh.mjs +750 -0
  192. package/dist/server/{src-C5Mu-z0F.mjs → src-08GY1njw.mjs} +1060 -44
  193. package/dist/server/theme-bridge.mjs +1 -1
  194. package/dist/server/theme.mjs +1 -1
  195. package/dist/server/{themeAdmission-ruoyXb_0.mjs → themeAdmission-CSd_Vusz.mjs} +151 -53
  196. package/dist/server/{validation-B-Xar8QS.mjs → validation-DdUTkBOZ.mjs} +2 -2
  197. package/dist/server/{version-Bg7VHK3i.mjs → version-DdIOqIDe.mjs} +1 -1
  198. package/dist/styles/index.css +1029 -41
  199. package/package.json +1 -1
  200. package/dist/_dts/index-Blwl7yl6.d.ts +0 -13
  201. package/dist/client/LeafletStaticMap-ClZCCzAm.mjs +0 -135
  202. package/dist/client/location-map.client-Cylb_MHw.mjs +0 -28
  203. package/dist/client/location-map.view-Cx4Bl7ij.mjs +0 -345
  204. package/dist/client/locationMap-QnKJi-nZ.mjs +0 -15
  205. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  206. package/dist/client/wizardSteps-zgq10lN1.mjs +0 -17181
  207. package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +0 -1359
  208. package/dist/server/loadPage-DUPP51C-.mjs +0 -2
  209. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -0,0 +1,750 @@
1
+ import { Gn as surfaceForegroundValue, Hn as surfaceForegroundDeclarations, Ht as assertNever, Sn as rgbColorValue, U as renderCssDeclarations, Un as surfaceForegroundInputFromResolved, _n as TokenResolver, _t as siteChromeBackgroundOverrideOwner, a as generateMobileOverlayBackdropFilterFix, h as getComponentShadowVar, i as generateHeaderScrollTreatmentStyles, l as MQ_MD_DOWN, m as getComponentBorderWidthPx, mn as resolveSurfaceForeground, o as getHeaderPaintTargets, qn as expandPalette, s as renderHeaderPaintTargetRules } from "./schema-BiqpDRwB.mjs";
2
+ import { M as generateNavLinkCSS, P as headerRootPaint, j as buildTextContrastShadow, l as mergeHeaderNavTypographyPreference, t as effectiveHeaderNavLinkStyle, u as readHeaderNavFontSizePreference } from "./effectiveNavLinkStyle-B-MKSt0p.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 };