@riverbankcms/sdk 0.167.0 → 0.168.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-Dgb-ptph.d.ts → BlocksIslandsHydrator-CiD_VVGM.d.ts} +1 -1
  2. package/dist/_dts/{Page-Bs3WxFgr.d.ts → Page-Bj6VJRS5.d.ts} +7 -6
  3. package/dist/_dts/{SdkPreviewMode-DtUCsaHY.d.ts → SdkPreviewMode-ChpsnwDX.d.ts} +2 -2
  4. package/dist/_dts/{client-CwsI23pj.d.ts → client-C8mfUxrJ.d.ts} +65 -35
  5. package/dist/_dts/{content-types-CAeP_-cV.d.ts → content-types-_vXZyR4H.d.ts} +2 -2
  6. package/dist/_dts/{contracts-BXHCiF-b.d.ts → contracts-CJFfrVKU.d.ts} +5 -4
  7. package/dist/_dts/{footerPageOutline-Bb2gbppW.d.ts → footerPageOutline-CMegb23G.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-DaBBDx7M.d.ts → generatePageMetadata-D9YdAIMh.d.ts} +2 -2
  9. package/dist/_dts/{index-CS6b1B-c.d.ts → index-BQXaZ7aY.d.ts} +4 -4
  10. package/dist/_dts/{index-5_jf52sZ.d.ts → index-Bpr-wT5k.d.ts} +2 -2
  11. package/dist/_dts/{index-DeHDwMfu.d.ts → index-C7_Rz8EY.d.ts} +3 -3
  12. package/dist/_dts/{index-D7EbliE3.d.ts → index-Cx2BQlHL.d.ts} +3 -3
  13. package/dist/_dts/{index-C20yUyob.d.ts → index-Dgz6yhsy.d.ts} +1 -1
  14. package/dist/_dts/index-Vh8B9FSa.d.ts +14 -0
  15. package/dist/_dts/{index-bDln38Hm.d.ts → index-vR3p9Bu-.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-CTqcL7CS.d.ts → loadContent-dhWSgLeS.d.ts} +7 -7
  17. package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
  18. package/dist/_dts/{index-ChpjHK0U.d.ts → request-BrYhNV9Z.d.ts} +80718 -47665
  19. package/dist/_dts/{resolveBlockData-C3s9WMPs.d.ts → resolveBlockData-BfSHm8Ms.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-JPwgRxwh.d.ts → resolvePageContent-gZJ4i1wN.d.ts} +2 -2
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  28. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  29. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -5
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  54. package/dist/_dts/{types-CwtTcaQP.d.ts → types-BB33-Spd.d.ts} +3 -3
  55. package/dist/_dts/{types-D-WElMCy.d.ts → types-BVFXYtRg.d.ts} +7 -7
  56. package/dist/_dts/{types-BlaCuPLr.d.ts → types-FOsJ-KYb.d.ts} +4 -2
  57. package/dist/_dts/{validation-Y5wD9fGK.d.ts → validation-DckTc6TQ.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DFqkx158.mjs → BlocksIslandsHydrator-DcwEaliO.mjs} +21 -21
  59. package/dist/client/BookingMailingListNote-Dsugoe-n.mjs +946 -0
  60. package/dist/client/BookingQuestionFields-Bhh0cvsl.mjs +359 -0
  61. package/dist/client/{CalendarNavigationChevron-DQwJ7BPx.mjs → CalendarNavigationChevron-CNe3ZjdC.mjs} +7 -7
  62. package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
  63. package/dist/client/{DemoBookingPortalAccess-DdkY86qI.mjs → DemoBookingPortalAccess-BeiZxEUJ.mjs} +7 -7
  64. package/dist/client/{EventCalendar.client-DAeQPV76.mjs → EventCalendar.client-BL943-tl.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-Bus9R0bj.mjs → EventCombined.client-BFVxECTp.mjs} +8 -8
  66. package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
  67. package/dist/client/{EventItem-DPBLjGwj.mjs → EventItem-BIc4gjiD.mjs} +37 -15
  68. package/dist/client/{EventListWeekNavigation-D6cwU82_.mjs → EventListWeekNavigation-a0QEIEf0.mjs} +1 -1
  69. package/dist/client/{EventListing.client-Bogi_SnJ.mjs → EventListing.client-CEFTC3jH.mjs} +3 -3
  70. package/dist/client/{EventListing.view-CEumpN7i.mjs → EventListing.view-Bt2sBBms.mjs} +34 -16
  71. package/dist/client/{EventRegistrationPayment-CIQw6vNy.mjs → EventRegistrationPayment-D9YBNb_E.mjs} +250 -40
  72. package/dist/client/{LocationMapActions-BVO-qx4q.mjs → LocationMapActions-gqzt5gkW.mjs} +2 -2
  73. package/dist/client/{MapDrawingSvg-CcGaFawl.mjs → MapDrawingSvg-13JQI7_z.mjs} +1 -1
  74. package/dist/client/{Page-D4_H_u9V.mjs → Page-D_M2Vxz3.mjs} +4471 -1601
  75. package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
  76. package/dist/client/{StepIndicator-Dptantmg.mjs → StepIndicator-CaN8snZ8.mjs} +3 -3
  77. package/dist/client/{TabBarFragment-BxEGsKUx.mjs → TabBarFragment-DkVKtK5a.mjs} +1 -1
  78. package/dist/client/{ThemedButton-8jUc02mZ.mjs → ThemedButton-BdnEwA38.mjs} +2 -5
  79. package/dist/client/accessibleSurfaces-chpD4C2c.mjs +4278 -0
  80. package/dist/client/{accordion--EUHmEGa.mjs → accordion-DE7OG--d.mjs} +1 -1
  81. package/dist/client/{booking-form.client-BCXwOnhc.mjs → booking-form.client-CS1PPjw7.mjs} +842 -374
  82. package/dist/client/{bookingForm-sHHcdism.mjs → bookingForm-DE2CwIU9.mjs} +5 -4
  83. package/dist/client/{src-DjnxOjXG.mjs → bookingQuestionValues-BjcyCru5.mjs} +88 -1
  84. package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
  85. package/dist/client/bookings.mjs +18 -13
  86. package/dist/client/{carousel-Cp9xPBFZ.mjs → carousel-DZyUdnFh.mjs} +3 -3
  87. package/dist/client/{carousel.client-BO7sCEpH.mjs → carousel.client-BD4DXMtI.mjs} +62 -16
  88. package/dist/client/{carousel.shared-DBnWEJzo.mjs → carousel.shared-BFQ3kBEw.mjs} +6 -3
  89. package/dist/client/{cart-CCZZC-Lq.mjs → cart-D7HkkNwe.mjs} +3 -3
  90. package/dist/client/{cart.client-B7JfA19I.mjs → cart.client-H4sv2TpD.mjs} +1 -1
  91. package/dist/client/{checkout-CipmYL4A.mjs → checkout-2qVyG-Sh.mjs} +3 -3
  92. package/dist/client/{checkout.client-DraalWdH.mjs → checkout.client-DAjrBZ74.mjs} +1 -1
  93. package/dist/client/client.mjs +240 -63
  94. package/dist/client/{context-Cv3QHjAF.mjs → context-DXmIbXCK.mjs} +297 -3
  95. package/dist/client/{cta-P2vJVTEn.mjs → cta-DP_IBnq3.mjs} +2 -2
  96. package/dist/client/{dateFormatting-D8D47VT4.mjs → dateFormatting-CwrkFZTr.mjs} +1 -1
  97. package/dist/client/{demoPortalMagicLink-CXWZoV-d.mjs → demoPortalMagicLink-DQXK-Fh6.mjs} +1 -1
  98. package/dist/client/{enhanceHeaderSection-BkAro1DJ.mjs → enhanceHeaderSection-DheQj7rg.mjs} +3 -3
  99. package/dist/client/{event-details.client-dLmyuPap.mjs → event-details.client-C5UufcRp.mjs} +1 -1
  100. package/dist/client/{event-registration.client-BEhC2_-Y.mjs → event-registration.client-CMGg63IU.mjs} +72 -235
  101. package/dist/client/{eventCalendar-FBMS2Cpb.mjs → eventCalendar-DlD0GCEy.mjs} +4 -4
  102. package/dist/client/{eventCombined-BrBhUvGe.mjs → eventCombined-DoSi8p_l.mjs} +4 -4
  103. package/dist/client/{eventDetails-C7WUrbZ2.mjs → eventDetails-DzuQYgmO.mjs} +2 -2
  104. package/dist/client/{eventListing-Bih-BgQM.mjs → eventListing-CkiMjl0g.mjs} +4 -4
  105. package/dist/client/{eventRegistration-DfTlqGbl.mjs → eventRegistration-CjS3Zpjp.mjs} +4 -4
  106. package/dist/client/{form-Bw1uuiUs.mjs → form-DgQqm7T2.mjs} +3 -3
  107. package/dist/client/{form.client-pZ-9gN33.mjs → form.client-BI9Dcsq5.mjs} +5 -5
  108. package/dist/client/{form.parts-PXlu6XQO.mjs → form.parts-DevF0L_A.mjs} +3 -3
  109. package/dist/client/{formatDate-DI3DP48e.mjs → formatDate-DDyURjoe.mjs} +1 -1
  110. package/dist/client/gifting/client.mjs +3 -3
  111. package/dist/client/{headerSection-BpJYUMd6.mjs → headerSection-DYIG6Pwb.mjs} +2 -2
  112. package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
  113. package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-CSoP0cGR.mjs → newsletter-form.client-BWp7Y1e1.mjs} +6 -6
  115. package/dist/client/{newsletter-form.parts-DDbX_Sj0.mjs → newsletter-form.parts-Dg8s9NwJ.mjs} +2 -2
  116. package/dist/client/{newsletterForm-vCxYRar_.mjs → newsletterForm-DnPraMzx.mjs} +3 -3
  117. package/dist/client/{noop-ByVtIWf4.mjs → noop-ByFRHYQ2.mjs} +437 -496
  118. package/dist/client/portal/client.mjs +76 -229
  119. package/dist/client/{product-detail.client-7Pi6avM-.mjs → product-detail.client-BFAgHrdg.mjs} +1 -1
  120. package/dist/client/{product-list.client-DEad-Pma.mjs → product-list.client-DVrs_DyY.mjs} +1 -1
  121. package/dist/client/{productDetail-G1SMXG13.mjs → productDetail-D4rvl6Xg.mjs} +3 -3
  122. package/dist/client/{productList-B21TGdpT.mjs → productList-B8o5AOMX.mjs} +3 -3
  123. package/dist/client/{propsDecoder-B3vIBkex.mjs → propsDecoder-hhotPP6P.mjs} +5 -4
  124. package/dist/client/{registry.server-B8aQhJpO.mjs → registry.server-Ch3EpupA.mjs} +2213 -2433
  125. package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
  126. package/dist/client/rendering/client.mjs +30 -30
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +10 -9
  129. package/dist/client/{richText-coerce-DHkBtO0G.mjs → richText-coerce-C3LabQ1O.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-DbHX4JOS.mjs → routeIslandApiConfig-CQGlxId8.mjs} +1 -1
  131. package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
  132. package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
  133. package/dist/client/{shop-commerce-B2UmrQg_.mjs → shop-commerce-VDbVaKY-.mjs} +12 -12
  134. package/dist/client/{shop-commerce-store-B7n-Z7nY.mjs → shop-commerce-store-DqdgJ8Zw.mjs} +1 -1
  135. package/dist/client/{shop-mqyoOvOK.mjs → shop-rRXplPGZ.mjs} +3 -3
  136. package/dist/client/{shop.client-BH-BBnA9.mjs → shop.client-DdwvMvaK.mjs} +13 -13
  137. package/dist/client/{shop.interactive-mdM3UMWG.mjs → shop.interactive-C8OvFY06.mjs} +141 -66
  138. package/dist/client/{shopShared-CXF5wxdg.mjs → shopShared-BeuJiGPU.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
  141. package/dist/client/{timetableModel-CrC80EOG.mjs → timetableModel-Cko9LRKy.mjs} +11 -11
  142. package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
  143. package/dist/client/{useAvailableSlots-C4LOaI_Z.mjs → useAvailableSlots-M6QIEiWf.mjs} +3 -3
  144. package/dist/client/{useDiscountApply-6Q0nToVA.mjs → useDiscountApply-BJSnyO0f.mjs} +3 -3
  145. package/dist/client/{useDiscountCodeUi-CM-DTX5X.mjs → useDiscountCodeUi-D3XnOSCi.mjs} +1 -1
  146. package/dist/client/{useEventPagination-Bcs89BR5.mjs → useEventPagination-PhTIoFVX.mjs} +7 -7
  147. package/dist/client/{view-BN-fxyfq.mjs → view-448wvvEY.mjs} +11 -7
  148. package/dist/client/{view-Dh2tGoS0.mjs → view-L_mkgtnk.mjs} +4 -4
  149. package/dist/client/{site-styles-D56hT2u1.mjs → wizardSteps-CFulHWnT.mjs} +19660 -18565
  150. package/dist/preview-next/client/{ArrangementLookControls-D4VjPs-r.mjs → ArrangementLookControls-BpvnOGlN.mjs} +26 -17
  151. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
  152. package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
  153. package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
  154. package/dist/preview-next/client/{PreviewEditorSidebar-Ckr2zk_L.mjs → PreviewEditorSidebar-C0OtdWu_.mjs} +128 -21
  155. package/dist/preview-next/client/{PreviewEditorUI-KOZgw_gS.mjs → PreviewEditorUI-Csc5vH5k.mjs} +6 -6
  156. package/dist/preview-next/client/{PreviewShell-CyO2V4kB.mjs → PreviewShell-BOLH_pm-.mjs} +199 -155
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-DW3uKvNF.mjs → SdkPreviewModeRuntime-CKodLReY.mjs} +31 -32
  158. package/dist/preview-next/client/{SiteChromeCustomizeButton-CU9VD-7O.mjs → SiteChromeCustomizeButton-BeEZpeKn.mjs} +3780 -3436
  159. package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
  160. package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
  161. package/dist/preview-next/client/{previewAssistantSlot-DBi-WybM.mjs → previewAssistantSlot-BBdN5kfY.mjs} +18697 -15557
  162. package/dist/preview-next/client/{previewChromeSurface-BhkUJst9.mjs → previewChromeSurface-VZtGwPuH.mjs} +1 -1
  163. package/dist/preview-next/client/runtime.mjs +3 -3
  164. package/dist/preview-next/client/{sdk-runtime-BjCb6lOn.mjs → sdk-runtime-kiZkMcuR.mjs} +2 -2
  165. package/dist/preview-next/client/{useAutosaveStatus-CKxTaC3j.mjs → useAutosaveStatus-BiIHEeE0.mjs} +2 -2
  166. package/dist/preview-next/client/{useBlockCustomizeControls-B7MLTjBX.mjs → useBlockCustomizeControls-BuFLIpmX.mjs} +2 -2
  167. package/dist/preview-next/client/{useOpenBlockForSetup-BTUc0g9X.mjs → useOpenBlockForSetup-DlxYgmh_.mjs} +1 -1
  168. package/dist/preview-next/keepAlive.mjs +1 -1
  169. package/dist/preview-next/middleware.mjs +1 -1
  170. package/dist/preview-next/{route-contract-Bv3nkdpV.mjs → route-contract-C0sCvCYL.mjs} +165 -0
  171. package/dist/server/{Block.shared-4fMqzltx.mjs → Block.shared-Dnhc0Wu5.mjs} +5 -5
  172. package/dist/server/{ThemeScopeCore-C72VC_lR.mjs → ThemeScopeCore-NAQ_zsFu.mjs} +461 -128
  173. package/dist/server/{accessibleSurfaces-B_Y_dA20.mjs → accessibleSurfaces-108nxyGc.mjs} +319 -131
  174. package/dist/server/{bindings-ConMYJ2U.mjs → bindings-DLoZYUxG.mjs} +2 -2
  175. package/dist/server/{client-Cot-H5fQ.mjs → client-Bc8jI8zN.mjs} +261 -61
  176. package/dist/server/config-validation.mjs +1 -1
  177. package/dist/server/config.mjs +1 -1
  178. package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
  179. package/dist/server/data/resolveBlockData.mjs +1 -1
  180. package/dist/server/headerVariant-BwR9NV4b.mjs +463 -0
  181. package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
  182. package/dist/server/index.mjs +3 -3
  183. package/dist/server/{loadContent-BkaWYEwt.mjs → loadContent-D61gpqHB.mjs} +4 -5
  184. package/dist/server/{loadPage-kviUdH8c.mjs → loadPage-B4ZYpIcd.mjs} +2 -2
  185. package/dist/server/manifest.mjs +1 -1
  186. package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
  187. package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
  188. package/dist/server/next.mjs +6 -6
  189. package/dist/server/{opaqueSurface-BTnS09GS.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
  190. package/dist/server/{overrideResolution-itXZCXs7.mjs → overrideResolution-CDReKy2P.mjs} +1 -1
  191. package/dist/server/page-converter.mjs +3 -3
  192. package/dist/server/{pageRenderPlan-CDyn7iLy.mjs → pageRenderPlan-ByVTA7-4.mjs} +255 -158
  193. package/dist/server/{pageRuntimeSupport-DZ6cLxrM.mjs → pageRuntimeSupport-Dzz_Dze6.mjs} +291 -5
  194. package/dist/server/{pageShared-Q_Vij87H.mjs → pageShared-Dk5Ku6hs.mjs} +1285 -897
  195. package/dist/server/{schema-DEizlyi4.mjs → parseThemeForPersistence-pJPGfMrf.mjs} +593 -1592
  196. package/dist/server/{prebuild-DOG4MkOy.mjs → prebuild-CW4M0WEZ.mjs} +1 -1
  197. package/dist/server/prebuild.mjs +1 -1
  198. package/dist/server/{prefetchBlockData-DlprLLsc.mjs → prefetchBlockData-Bvx0SiIM.mjs} +5 -4
  199. package/dist/server/{registry-BPFcpn6k.mjs → registry-Bh0Y25zH.mjs} +4399 -4065
  200. package/dist/server/rendering/components/pageShared.mjs +1 -1
  201. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  202. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  203. package/dist/server/rendering/server.mjs +3 -3
  204. package/dist/server/rendering.mjs +8 -8
  205. package/dist/server/{resolveBlockData-BHvfGD4y.mjs → resolveBlockData-CnHHst9r.mjs} +1 -1
  206. package/dist/server/{resolveButtonColourStates-OXFRGn5M.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +399 -518
  207. package/dist/server/{responseMedia-D8J3VAFs.mjs → responseMedia-t6gs0cB7.mjs} +2 -2
  208. package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
  209. package/dist/server/server.mjs +3 -3
  210. package/dist/server/theme-bridge.mjs +2 -3
  211. package/dist/server/theme.mjs +1 -2
  212. package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
  213. package/dist/server/{validation-bl6WcAi_.mjs → validation-D2bHWSxJ.mjs} +57 -8
  214. package/dist/server/{version-BLXZ31S-.mjs → version-DkM1eAxG.mjs} +1 -1
  215. package/dist/styles/index.css +340 -68
  216. package/package.json +4 -3
  217. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  218. package/dist/_dts/index-RugyUnqR.d.ts +0 -31535
  219. package/dist/client/BookingMailingListNote-CCVXX1LN.mjs +0 -331
  220. package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
  221. package/dist/client/site-styles-CMCUxsIM.mjs +0 -3
  222. package/dist/client/useBookingNowIso-BDmWkYUW.mjs +0 -58
  223. package/dist/client/wizardSteps-DtkhwKXK.mjs +0 -6933
  224. package/dist/server/parseThemeForPersistence-CDrF51tJ.mjs +0 -52
@@ -1,16 +1,15 @@
1
- import { At as textColorValue, Ct as backgroundColorStyle, Dt as rgbColorValue, Et as mergeStyles, I as expandPalette, Mt as parseThemeColorToken, O as createStandardButtonSurfacePolicy, St as surfaceInkStyle, Tt as cssVarValue, _ as generateShadowValue$1, _t as surfaceForegroundInputFromResolved, a as formatButtonColourContractError, at as hexToRgb, g as FONT_SIZE_MAP, gt as surfaceForegroundDeclarations, j as unsafeAsOpaqueButtonColourToken, kt as textColorStyle, m as DEFAULT_BUTTON_SIZES, n as compileButtonColourStates, p as BORDER_WIDTH_MAP, r as BUTTON_CONTRAST_POLICY, v as DEFAULT_VARIANT_ALIAS_ID, w as buttonSizeNameSchema, xt as surfaceInkDeclarations, yt as surfaceForegroundValue } from "./resolveButtonColourStates-OXFRGn5M.mjs";
2
- import { A as CalendarIcon, C as createEditorPresentationPageReader, D as CardListItems, E as CardListCollection, F as formatEventDuration, H as defaultThemeTokens, I as resolveEventCardBooking, L as resolveEventCta, M as buildMonthDay, N as resolveMonthSelectedDay, O as EventItem, P as formatEventTeacherLine, R as resolveEventLinkProps, S as EventListingFrameView, T as EmptyState, V as buildThemeTokens, _ as EVENT_REGISTRATION_ANCHOR_ID, a as renderedJoinLayout, b as derivePreviewRunSchedule, d as defaultTransforms, g as EventHeader, h as resolveRouteTarget, i as joinSlotKey, j as MapPinIcon, k as eventCategoryBadge, l as resolveLinkedEntryInlineFieldEligibility, m as resolvePageRouteTarget, o as retargetJoinsAcrossOmissions, p as resolveEntryRouteTarget, r as composePageJoins, s as buildLinkedContentEditTarget, t as createPageRenderPlanReader, v as eventCardListContent, w as createPresentationPageReader, x as MonthLookView, y as deriveEventScheduleSummary, z as parseStoredVariant } from "./pageRenderPlan-CDyn7iLy.mjs";
3
- import { $ as MediaNodeServer, $a as sameMailingListPlacementTargeting, $i as selectItemSurfacePresentation, $t as formatEventCompactDateRail, A as buildOfferingsCatalogueListing, Aa as transitionCatalogueEntries, An as bookingConsentCarrierSchema, Ar as ctaCopyFragment, At as offeringsListingFor, B as buildEventCollectionHydration, Ba as chosenString, Br as resolveCardRoleForBoxStyles, Bt as buildEventListWeek, C as buildShopInteractiveIslandProps, Ca as headerNeedsPhotoShade, Ci as parseInlineTextFromUnknown, Cn as getEventAvailability, Co as publicEventPricingDisplay, Cr as faqHeadingFragment, Ct as resolveEventRegistrationScopedEvents, D as passCardListContent, Dn as groupPublicEventsByRun, Do as formatCurrencyAmount, Dr as formCopyFragment, Dt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, E as membershipClassesLabel, En as blockSiteTermsSchema, Eo as resolvePricingOptionsPriceDisplay, Er as formEmbedFragment, Fr as bodyCopyFragment, Ft as ThemedButton, Ga as CANCELLED_SESSION_STATUS, Gn as resolveDateRuntimeContext, Gt as formatEventPriceDisplay, H as eventCollectionDisplaySchemaShape, Ha as loadedReadinessFact, Hn as teamMemberBiography, Ir as defineFragment, It as ThemedButtonLink, J as listingEventCardProps, Ja as resolveWholeSeriesBookingPhase, Jt as eventDateOptions, Ka as nextLiveRunSessionStartMs, Kr as resolveBackgroundColorValue, Kt as buildCalendarViewport, L as eventListingBlockDefinition, Ln as composeHeaderSectionWrapperClassName, Lt as ThemedDownloadLink, M as eventCalendarBlockDefinition, Mn as FEATURE_CARD_ICON_TREATMENTS, Mr as ctaRowFragment, Mt as resolveOfferingsPreviewGroups, N as buildEventCalendarInteractiveIslandProps, Ni as parseFieldDefinitions, Nn as resolveFeatureCardGeneratedIconSizePx, Nr as isBlockButtonRole, Nt as resolveOfferingsRenderInput, O as offeringsPreviewBlockDefinition, Oa as boundaryRuntimeMetricsForDecorativeTransition, On as publicEventsArraySchema, Or as testimonialsCarouselFragment, Ot as buildOfferingsPreviewListing, P as buildEventCalendarListingDisplay, Pn as shouldReserveFeatureCardIconZone, Pr as heroCopyFragment, Pt as ThemedAuthoredButton, Qa as parseMailingListPlacementTargeting, Qt as formatEventClockLabel, R as buildEventListingInteractiveIslandProps, Ri as bindingSchema, Rn as markEditableSurfaceForwarding, Rr as boxStyleClassNames, Rt as getIconComponent, S as buildProductListInteractiveIslandProps, Sa as generateDefaultCardSystem, Si as isInlineTextEmpty, Sn as formatTotalCapacity, So as publicEventPricingCurrency, Sr as faqAccordionFragment, St as normalizeEventRegistrationPageSurfaceSubject, T as membershipCardListContent, Tn as isEventFull, To as resolveExactOrFreePriceDisplay, Tr as singleButtonFragment, U as eventCollectionHydrationSchema, Ua as pageTemplateFromEntry, Un as teamMemberCardBiography, Ut as formatEventPrice, V as buildEventCollectionListingDisplay, Va as admitReadinessFacts, Vi as PUBLIC_DOWNLOAD_MEDIA_TYPES, Vn as parseTeamMemberSpecialties, Vt as eventListWeekDays, W as eventCollectionSourceSchemaShape, Wa as unavailableReadinessFact, Wn as readRuntimeNow, Wt as formatEventPriceAmount, Xa as parseMailingListRuntimeContext, Xn as staticHeaderChromeRuntime, Xt as formatCalendarTitle, Ya as buildMailingListSignupBlockSourceRef, Zt as formatDate, _ as productListBlockDefinition, _a as buildTextContrastShadow, _i as FileSpreadsheetIcon, _n as resolveRuntimeEventDestination, _o as resolveBookingBusinessTimeZone, _r as clsx, _t as previewStageSchema, a as normalizeLocationMapSource, ai as when, an as groupEventsByDate, ao as mapDrawingSchema, ar as defineInteractiveIslandMetaKeys, b as buildCheckoutInteractiveIslandProps, ba as generateInteractiveChildInheritanceCSS, bi as PlusIcon, bn as canJoinEventWaitlistOnAnyMode, bo as formatBookingPriceDisplay, br as headingFragment, ca as resolveEffectiveArrangement, ci as parseBlockIconValue, cn as getLocalMinuteOfDay, cr as defineProgressiveBlockRuntime, ct as buildResolveImageUrlContext, d as newsletterBlockSubmissionMessage, di as ChevronDownIcon, dn as getDayOfWeek, do as toScheduledBookingDateTime, dr as listLookSlot, dt as getCardOrientation, en as formatEventDateParts, eo as decideLocationSourcePermission, et as RichText, f as giftingBlockDefinition, fa as requireCuratedSiteStyle, fi as CircleMinusIcon, fn as getOrderedDayNames, fr as lookListPresentationSchemaShape, ft as getContainerClass, g as productDetailBlockDefinition, ga as generateFooterCss, gi as FileAudioIcon, gn as isToday, go as parseLocalScheduleTime, gr as Grid, gt as bookingNowSchema, h as cartBlockDefinition, ha as AFFORDANCE_SUPPRESS_CLASS, hi as FileArchiveIcon, hn as isSameCalendarDay, ht as buildEventRegistrationInteractiveIslandProps, i as normalizeLocationMapProps, ia as arrangementLookHooks, ii as el, in as formatTime, ir as createInteractiveIslandCodec, j as offeringsCatalogueShape, jn as blockBookingPaymentTermsSchema, jr as heroCtaRowFragment, jt as resolveOfferingsPreviewGroupCta, k as publicRouteCandidatesSchema, ka as anglePolygonCss, kn as blockBookingConsentSchema, ko as TokenResolver, kr as testimonialsHeadingFragment, kt as normalizeOfferingsPreviewItemLimit, l as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, li as resolveBlockIconRenderValue, ln as addDays, lr as listItemPresentation, lt as getCurrentResolveImageUrlContext, m as checkoutBlockDefinition, ma as themeButtonSelector, mi as ClockIcon, mn as getWeekCalendarDays, mr as itemRole, mt as eventRegistrationBlockDefinition, na as readOpeningToneProjection, nn as formatEventNextDateFact, no as normalizeLocationAddressText, nr as buildFormInteractiveIslandProps, nt as MediaPlaceholder, o as resolveLocationMapLocation, oa as arrangementManifestFromVariants, oi as sanitizeHref, on as resolveEventTimeZone, oo as formatDate$1, or as createZodCodec, p as buildGiftingInteractiveIslandProps, pa as parseThemeButtonVariantId, pi as CirclePlusIcon, pn as getWeekCalendarDayTuple, po as getBookingLocalDateKey, pr as resolvedItemSurfaceProps, q as catalogueEventCardProps, qa as orderedLiveRunSessions, qr as ctaButton, r as normalizeBlockContent, ri as runTransforms, rn as formatEventTimeRange, rr as buildInteractiveIslandProps, s as newsletterSignupBlockDefinition, si as buildGeneratedBlockIconRenderAssetLookupFromUnknown, sn as getLocalDateKey, sr as defineClientOwnedBlockRuntime, st as resolvePublicMediaUrl, t as getBlockDefinition, ta as effectiveHeaderNavLinkStyle, tn as formatEventHourLabel, tr as formBlockDefinition, tt as ImagePresets, u as buildNewsletterFormInteractiveIslandProps, ui as ArrowDownIcon, un as formatDateKey, uo as formatBookingCompactEnglishTime, ur as listLookControl, ut as setContextResolveImageUrlContext, v as shopBlockDefinition, va as generateNavLinkCSS, vi as FileTextIcon, vo as toBookingTimeZone, w as shopProductPresentation, wa as headerRootPaint, wn as getEventAvailabilityStatus, wo as publicEventPricingType, wr as blogFeaturedPostFragment, x as buildProductDetailInteractiveIslandProps, xa as resolveCardRole, xi as inlineTextToPlainText, xn as formatEventRemainingPlaces, xo as isPublicEventPricingOptionDisplayable, xr as cardFragment, y as buildCartInteractiveIslandProps, ya as generateEffectsCSS, yi as MinusIcon, yn as browserReadAuthoritySchema, yo as toUtcIsoDateTimeString, yr as richTextFragment, z as buildEventCollectionDisplay, zn as splitPositioningClasses, zr as normalizeBoxStylesBorder, zt as SpinnerNode } from "./registry-BPFcpn6k.mjs";
4
- import { A as inkReference, C as mapButtonVisualAppearances, D as HOVER_TEXT_THRESHOLD, E as surfaceInkPublication, N as resolveConcreteColorHex, O as certifyPaint, P as resolveOpaqueSurfaceHex, _ as buttonTypographyDeclarations, a as serializeSurfaceTree, c as compositeHex, d as actionVariableFallback, g as buttonStateAppearanceDeclarations, h as buttonShadow, i as resolveSurface, k as contrastThresholdByPolicy, m as buttonRadius, n as parseSurfaceTree, p as buttonBorder, v as materializeRuntimeButtonAppearance, w as resolveSurfaceForeground, y as paddingDeclarations } from "./accessibleSurfaces-B_Y_dA20.mjs";
5
- import { n as opaqueSurfaceDeclarations, t as opaqueSurfaceContextFromTheme } from "./opaqueSurface-BTnS09GS.mjs";
6
- import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-DnlczCMA.mjs";
1
+ import { $ as SURFACE_INK_CSS_VARS, A as expandPalette, Et as parseThemeColorToken, W as hexToRgb, _ as unsafeAsOpaqueButtonColourToken, ct as backgroundColorStyle, d as DEFAULT_VARIANT_ALIAS_ID, dt as mergeStyles, ft as rgbColorValue, h as createStandardButtonSurfacePolicy, ht as textColorValue, i as formatButtonColourContractError, it as surfaceForegroundValue, l as FONT_SIZE_MAP, m as buttonSizeNameSchema, mt as textColorStyle, n as compileButtonColourStates, nt as surfaceForegroundInputFromResolved, o as BORDER_WIDTH_MAP, ot as surfaceInkDeclarations, r as BUTTON_CONTRAST_POLICY, s as DEFAULT_BUTTON_SIZES, st as surfaceInkStyle, tt as surfaceForegroundDeclarations, u as generateShadowValue$1, ut as cssVarValue } from "./resolveButtonColourStates-Cn6j8Ee0.mjs";
2
+ import { A as CalendarIcon, C as createEditorPresentationPageReader, D as CardListItems, E as CardListCollection, F as formatEventDuration, H as defaultThemeTokens, I as resolveEventCardBooking, L as resolveEventCta, M as buildMonthDay, N as resolveMonthSelectedDay, O as EventItem, P as formatEventTeacherLine, R as resolveEventLinkProps, S as EventListingFrameView, T as EmptyState, V as buildThemeTokens, _ as EVENT_REGISTRATION_ANCHOR_ID, a as renderedJoinLayout, b as derivePreviewRunSchedule, d as defaultTransforms, g as EventHeader, h as resolveRouteTarget, i as joinSlotKey, j as MapPinIcon, k as eventCategoryBadge, l as resolveLinkedEntryInlineFieldEligibility, m as resolvePageRouteTarget, o as retargetJoinsAcrossOmissions, p as resolveEntryRouteTarget, r as composePageJoins, s as buildLinkedContentEditTarget, t as createPageRenderPlanReader, v as eventCardListContent, w as createPresentationPageReader, x as MonthLookView, y as deriveEventScheduleSummary, z as parseStoredVariant } from "./pageRenderPlan-ByVTA7-4.mjs";
3
+ import { $ as RichText, $a as parseMailingListRuntimeContext, $i as resolveCardRole, $t as formatEventHourLabel, A as buildOfferingsCatalogueListing, Aa as bindingSchema, An as beforeBookingQuestionsPresentationSchema, Ao as resolvePricingOptionsPriceDisplay, Ar as testimonialsHeadingFragment, At as resolveOfferingsPreviewGroups, B as buildEventCollectionHydration, Bi as selectItemSurfacePresentation, Bn as parseTeamMemberSpecialties, Br as normalizeBoxStylesBorder, C as buildShopInteractiveIslandProps, Ca as featureCardCompositionTreatmentValues, Ci as isInlineTextEmpty, Cn as isEventFull, Co as toUtcIsoDateTimeString, Cr as faqAccordionFragment, D as passCardListContent, Dn as blockBookingPaymentTermsSchema, Do as publicEventPricingDisplay, Dr as formEmbedFragment, Dt as normalizeOfferingsPreviewItemLimit, E as membershipClassesLabel, Ea as testimonialsCompositionTreatmentValues, En as publicEventsArraySchema, Eo as publicEventPricingCurrency, Er as singleButtonFragment, Et as buildOfferingsPreviewListing, Fi as parseThemeButtonVariantId, Fr as heroCopyFragment, Ft as ThemedDownloadLink, Ga as pageTemplateFromEntry, Gi as arrangementLookHooks, H as eventCollectionDisplaySchemaShape, Ha as chosenString, Hi as effectiveHeaderNavLinkStyle, Hn as teamMemberCardBiography, Ht as formatEventPriceAmount, Ii as themeButtonSelector, In as composeHeaderSectionWrapperClassName, Ir as bodyCopyFragment, It as getIconComponent, Ja as CANCELLED_SESSION_STATUS, Ji as resolveEffectiveArrangement, Jr as ctaButton, Jt as formatCalendarTitle, K as catalogueEventCardProps, Ka as unavailableReadinessFact, Ki as arrangementManifestFromVariants, Kt as eventDateOptions, L as eventListingBlockDefinition, Li as AFFORDANCE_SUPPRESS_CLASS, Ln as markEditableSurfaceForwarding, Lr as defineFragment, Lt as SpinnerNode, M as eventCalendarBlockDefinition, Mn as resolveFeatureCardGeneratedIconSizePx, Mr as heroCtaRowFragment, Mt as ThemedAuthoredButton, N as buildEventCalendarInteractiveIslandProps, Ni as isObjectRecord, Nn as shouldReserveFeatureCardIconZone, Nr as ctaRowFragment, Nt as ThemedButton, O as offeringsPreviewBlockDefinition, Oi as parseFieldDefinitions, On as blockBookingConsentSchema, Oo as publicEventPricingType, Or as formCopyFragment, Ot as offeringsListingFor, P as buildEventCalendarListingDisplay, Pi as isRecord$4, Po as TokenResolver, Pr as isBlockButtonRole, Pt as ThemedButtonLink, Q as MediaNodeServer, Qa as buildMailingListSignupBlockSourceRef, Qi as requireCuratedSiteStyle, Qt as formatEventDateParts, R as buildEventListingInteractiveIslandProps, Rn as splitPositioningClasses, Rt as buildEventListWeek, S as buildProductListInteractiveIslandProps, Si as inlineTextToPlainText, Sn as getEventAvailabilityStatus, So as toBookingTimeZone, Sr as cardFragment, T as membershipCardListContent, Ta as offeringsPreviewCompositionTreatmentValues, Tn as groupPublicEventsByRun, To as isPublicEventPricingOptionDisplayable, Tr as blogFeaturedPostFragment, Tt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, U as eventCollectionHydrationSchema, Ua as admitReadinessFacts, Ui as readOpeningToneProjection, Un as readRuntimeNow, Ut as formatEventPriceDisplay, V as buildEventCollectionListingDisplay, Vn as teamMemberBiography, Vr as resolveCardRoleForBoxStyles, Vt as formatEventPrice, W as eventCollectionSourceSchemaShape, Wa as loadedReadinessFact, Wn as resolveDateRuntimeContext, Wt as buildCalendarViewport, Xa as orderedLiveRunSessions, Xt as formatEventClockLabel, Ya as nextLiveRunSessionStartMs, Yn as staticHeaderChromeRuntime, Yt as formatDate, Za as resolveWholeSeriesBookingPhase, Zt as formatEventCompactDateRail, _ as productListBlockDefinition, _i as FileAudioIcon, _n as browserReadAuthoritySchema, _o as getBookingLocalDateKey, _r as Grid, a as normalizeLocationMapSource, aa as generateInteractiveChildInheritanceCSS, ai as el, an as getLocalDateKey, ao as normalizeLocationAddressText, ar as createInteractiveIslandCodec, b as buildCheckoutInteractiveIslandProps, bi as MinusIcon, bn as formatTotalCapacity, bo as parseLocalScheduleTime, br as richTextFragment, bt as normalizeEventRegistrationPageSurfaceSubject, ci as buildGeneratedBlockIconRenderAssetLookupFromUnknown, cn as formatDateKey, cr as defineClientOwnedBlockRuntime, ct as getCurrentResolveImageUrlContext, d as newsletterBlockSubmissionMessage, da as boundaryRuntimeMetricsForDecorativeTransition, di as ArrowDownIcon, dn as getWeekCalendarDayTuple, dr as listLookControl, dt as getContainerClass, ea as generateDefaultCardSystem, en as formatEventNextDateFact, et as ImagePresets, f as giftingBlockDefinition, fa as anglePolygonCss, fi as ChevronDownIcon, fn as getWeekCalendarDays, fr as listLookSlot, g as productDetailBlockDefinition, gi as FileArchiveIcon, gt as previewStageSchema, h as cartBlockDefinition, hi as ClockIcon, hn as resolveRuntimeEventDestination, ho as toScheduledBookingDateTime, hr as itemRole, ht as bookingNowSchema, i as normalizeLocationMapProps, ia as generateEffectsCSS, ii as runTransforms, in as resolveEventTimeZone, ir as buildInteractiveIslandProps, j as offeringsCatalogueShape, ji as PUBLIC_DOWNLOAD_MEDIA_TYPES, jn as FEATURE_CARD_ICON_TREATMENTS, jo as formatCurrencyAmount, jr as ctaCopyFragment, jt as resolveOfferingsRenderInput, k as publicRouteCandidatesSchema, kn as bookingConsentCarrierSchema, ko as resolveExactOrFreePriceDisplay, kr as testimonialsCarouselFragment, kt as resolveOfferingsPreviewGroupCta, l as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, li as parseBlockIconValue, ln as getDayOfWeek, lo as mapDrawingSchema, lr as defineProgressiveBlockRuntime, lt as setContextResolveImageUrlContext, m as checkoutBlockDefinition, mi as CirclePlusIcon, mn as isToday, mo as formatBookingCompactEnglishTime, mr as resolvedItemSurfaceProps, mt as buildEventRegistrationInteractiveIslandProps, na as buildTextContrastShadow, nn as formatTime, no as sameMailingListPlacementTargeting, nr as formBlockDefinition, o as resolveLocationMapLocation, oa as headerNeedsPhotoShade, oi as when, on as getLocalMinuteOfDay, or as defineInteractiveIslandMetaKeys, ot as resolvePublicMediaUrl, p as buildGiftingInteractiveIslandProps, pa as transitionCatalogueEntries, pi as CircleMinusIcon, pn as isSameCalendarDay, pr as lookListPresentationSchemaShape, pt as eventRegistrationBlockDefinition, q as listingEventCardProps, qr as resolveBackgroundColorValue, r as normalizeBlockContent, ra as generateNavLinkCSS, rn as groupEventsByDate, ro as decideLocationSourcePermission, rr as buildFormInteractiveIslandProps, s as newsletterSignupBlockDefinition, sa as headerRootPaint, si as sanitizeHref, sn as addDays, sr as createZodCodec, st as buildResolveImageUrlContext, t as getBlockDefinition, ta as generateFooterCss, tn as formatEventTimeRange, to as parseMailingListPlacementTargeting, tt as MediaPlaceholder, u as buildNewsletterFormInteractiveIslandProps, ui as resolveBlockIconRenderValue, un as getOrderedDayNames, uo as formatDate$1, ur as listItemPresentation, ut as getCardOrientation, v as shopBlockDefinition, vi as FileSpreadsheetIcon, vn as canJoinEventWaitlistOnAnyMode, vr as clsx, w as shopProductPresentation, wa as introCompositionTreatmentValues, wi as parseInlineTextFromUnknown, wn as blockSiteTermsSchema, wo as formatBookingPriceDisplay, wr as faqHeadingFragment, x as buildProductDetailInteractiveIslandProps, xi as PlusIcon, xn as getEventAvailability, xo as resolveBookingBusinessTimeZone, xr as headingFragment, xt as resolveEventRegistrationScopedEvents, y as buildCartInteractiveIslandProps, yi as FileTextIcon, yn as formatEventRemainingPlaces, z as buildEventCollectionDisplay, zr as boxStyleClassNames, zt as eventListWeekDays } from "./registry-Bh0Y25zH.mjs";
4
+ import { A as ownedThemeSnapshot, B as resolveConcreteColorHex, F as HOVER_TEXT_THRESHOLD, I as certifyPaint, L as contrastThresholdByPolicy, N as surfaceInkPublication, R as inkReference, V as resolveOpaqueSurfaceHex, _ as buttonStateAppearanceDeclarations, a as resolveSurface, b as paddingDeclarations, f as actionVariableFallback, g as buttonShadow, h as buttonRadius, j as resolveSurfaceForeground, k as freezeOwnedThemeValue, l as compositeHex, m as buttonBorder, n as parseSurfaceTree, o as serializeSurfaceTree, v as buttonTypographyDeclarations, w as mapButtonVisualAppearances, y as materializeRuntimeButtonAppearance } from "./accessibleSurfaces-108nxyGc.mjs";
5
+ import { b as siteChromeBackgroundOverrideOwner, i as boxBackgroundSchema, m as surfaceCardRoleValues } from "./headerVariant-BwR9NV4b.mjs";
6
+ import { t as parseThemeForPersistence } from "./parseThemeForPersistence-pJPGfMrf.mjs";
7
+ import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-Brn9FW5s.mjs";
7
8
  import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
8
- import { c as readSdkPreviewPublishedPlacement, h as validateManifestDraft, m as compileManifestContentContract } from "./pageRuntimeSupport-DZ6cLxrM.mjs";
9
- import { B as boxBackgroundSchema, C as ICON_SIZE_PX, S as ICON_CONFIG, U as siteChromeBackgroundOverrideOwner, _ as LABEL_FONT_SIZE_MAP, _t as testimonialsCompositionTreatmentValues, a as renderHeaderPaintTargetRules, b as ACCORDION_TRIGGER_FONT_SCALE, c as MQ_SM_DOWN, f as getComponentBorderWidthPx, g as INPUT_SPACING_MAP, h as INPUT_FONT_SIZE_MAP, i as getHeaderPaintTargets, k as surfaceCardRoleValues, l as MQ_SM_UP, lt as introCompositionTreatmentValues, m as FONT_WEIGHT_MAP, n as generateHeaderScrollTreatmentStyles, o as MQ_LG_UP, ot as featureCardCompositionTreatmentValues, p as getComponentShadowVar, pt as offeringsPreviewCompositionTreatmentValues, r as generateMobileOverlayBackdropFilterFix, s as MQ_MD_DOWN, u as MQ_TABLET_ONLY, v as ACCORDION_OPEN_ACCENT_THICKNESS, w as skinTokenCssVars, x as ACCORDION_TRIGGER_LETTER_SPACING, y as ACCORDION_SPACING_MAP } from "./schema-DEizlyi4.mjs";
10
- import { C as generateShadowCssVars, D as renderCssDeclarations, E as resolvedButtonFocusDeclarations, O as cardBorderDeclarations, S as generateOpaquePanelCss, T as resolvedButtonColourDeclarations, _ as INPUT_GROUP_ERROR_SELECTOR, a as escapeStyleContent, b as generateInputGroupCss, c as generateAllBlockVarsCss, d as generateTypographyCss, f as generateProgressCss, g as getResponsiveScopeSpec, h as THEME_RESPONSIVE_CONTAINER_NAME, i as compileCustomCssRules, k as cardDecorationPseudoRules, l as generateBlockCustomVarsCss, m as DEFAULT_THEME_RESPONSIVE_MODE, n as containerResponsiveThemeCss, o as prefixSelector, p as generateStatusCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as THEME_RADIUS_CSS_VARS, v as INPUT_GROUP_FOCUS_SELECTOR, w as RESOLVED_BUTTON_DISABLED_DECLARATIONS, x as generateCheckableCss, y as INPUT_GROUP_SELECTOR } from "./ThemeScopeCore-C72VC_lR.mjs";
11
- import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CDrF51tJ.mjs";
12
- import { a as parseBlockCustomCssRules, o as parseCustomCssRules } from "./validation-CDd6m8Ry.mjs";
13
- import { a as isObjectRecord, o as isRecord$4, t as RichTextDocSchema } from "./richTextSchema-Euhuj-7V.mjs";
9
+ import { C as MQ_SM_DOWN, S as MQ_MD_UP, T as MQ_TABLET_ONLY, b as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as validateManifestDraft, m as compileManifestContentContract, w as MQ_SM_UP, x as MQ_MD_DOWN } from "./pageRuntimeSupport-Dzz_Dze6.mjs";
10
+ import { n as RichTextDocSchema } from "./richTextSchema-DQ2NBP0n.mjs";
11
+ import { n as opaqueSurfaceDeclarations, t as opaqueSurfaceContextFromTheme } from "./opaqueSurface-BawlEAd_.mjs";
12
+ import { A as cardBorderDeclarations, C as generateCheckableCss, D as resolvedButtonFocusDeclarations, E as resolvedButtonColourDeclarations, O as generateShadowCssVars, S as generateInputGroupCss, T as RESOLVED_BUTTON_DISABLED_DECLARATIONS, _ as THEME_RESPONSIVE_CONTAINER_NAME, a as escapeStyleContent, b as INPUT_GROUP_FOCUS_SELECTOR, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as THEME_RADIUS_CSS_VARS, g as DEFAULT_THEME_RESPONSIVE_MODE, h as generateStatusCss, i as compileCustomCssRules, j as cardDecorationPseudoRules, k as renderCssDeclarations, l as parseCustomCssRules, m as generateProgressCss, n as containerResponsiveThemeCss, o as prefixSelector, p as generateTypographyCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as getResponsiveScopeSpec, w as generateOpaquePanelCss, x as INPUT_GROUP_SELECTOR, y as INPUT_GROUP_ERROR_SELECTOR } from "./ThemeScopeCore-NAQ_zsFu.mjs";
14
13
  import { t as getAtPath } from "./src-Cxucn-1P.mjs";
15
14
  import { z } from "zod";
16
15
  import * as React$1 from "react";
@@ -206,9 +205,13 @@ function resolveCornerRadiiCss(cornerRadii, fallback) {
206
205
  return `${at(cornerRadii.topLeft)} ${at(cornerRadii.topRight)} ${at(cornerRadii.bottomRight)} ${at(cornerRadii.bottomLeft)}`;
207
206
  }
208
207
  function generateCardCss(options) {
209
- const { themeId, theme, cardSystem: providedCardSystem, solvedInks } = options;
208
+ const { themeId, cardSystem: providedCardSystem, solvedInks } = options;
209
+ const theme = {
210
+ ...options.theme,
211
+ buttons: ownedThemeSnapshot(options.theme.buttons)
212
+ };
210
213
  const tokens = new TokenResolver(theme);
211
- const palette = expandPalette(theme.palette);
214
+ const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
212
215
  const cardSystem = providedCardSystem ?? generateDefaultCardSystem(theme);
213
216
  const source = providedCardSystem ? "site-style" : "generated-baseline";
214
217
  const aliasGroups = resolveRoleAliasGroups(theme, providedCardSystem ?? null);
@@ -364,925 +367,999 @@ function resolveContentPadding(variant) {
364
367
  return typeof spacing === "string" ? paddingFor(spacing) : `${paddingFor(spacing.block)} ${paddingFor(spacing.inline)}`;
365
368
  }
366
369
  //#endregion
367
- //#region ../theme-core/src/buttons/generateDefaultButtonSystem.ts
368
- /**
369
- * Map border width to border width class
370
- */
371
- const BORDER_WIDTH_TO_CLASS_MAP = {
372
- none: "border-0",
373
- hairline: "border",
374
- thin: "border",
375
- thick: "border-4"
376
- };
377
- const VALID_CORNER_STYLES = [
378
- "square",
379
- "rounded",
380
- "pill"
381
- ];
370
+ //#region ../theme-core/src/site-styles/siteChromeNavPreferences.ts
382
371
  /**
383
- * Narrow a Theme's corners value to the CornerStyle union expected by the button system.
384
- * Falls back to 'rounded' (the historically-safe default) for unknown values.
372
+ * Applies the user's nav font-role/size overrides on top of a style-resolved
373
+ * nav link style. This is where the precedence contract lands:
374
+ *
375
+ * - The nav typography TREATMENT (case/tracking identity: plain / heading /
376
+ * quiet-caps / brand-caps) is ALWAYS owned by the active header style and is
377
+ * baked into `style` before this call (see `applyNavTypography` in
378
+ * headerLayoutStyles.ts).
379
+ * - Each treatment resolves through a DEFAULT font role: `heading` resolves
380
+ * through the heading role; `plain` / `quiet-caps` / `brand-caps` resolve
381
+ * through the body role.
382
+ * - The user's `navFontRole` (surfaced here as `preferences.typography`) only
383
+ * overrides which font ROLE the treatment resolves through. It never changes
384
+ * the treatment. `'inherit'` keeps the treatment's default role.
385
385
  */
386
- function narrowCornerStyle(corners) {
387
- return VALID_CORNER_STYLES.includes(corners) ? corners : "rounded";
386
+ function mergeHeaderNavTypographyPreference(style, preferences) {
387
+ return preferences.typography === "inherit" && preferences.fontSize === "inherit" ? style : {
388
+ ...style,
389
+ ...preferences.typography === "inherit" ? {} : { typography: preferences.typography },
390
+ ...preferences.fontSize === "inherit" ? {} : { textSize: preferences.fontSize }
391
+ };
392
+ }
393
+ function readHeaderNavFontSizePreference(value) {
394
+ return value === "sm" || value === "base" || value === "lg" || value === "xl" ? value : "inherit";
388
395
  }
396
+ //#endregion
397
+ //#region ../theme-core/src/styles/skinTokens.ts
398
+ function skinTokenCssVars(tokens) {
399
+ return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
400
+ }
401
+ //#endregion
402
+ //#region ../theme-core/src/accordions/defaults.ts
389
403
  /**
390
- * Generate default button system from theme settings.
391
- *
392
- * Creates 4 sized canonical variants when theme.buttons is not defined:
393
- * 1. Primary - solid primary treatment
394
- * 2. Secondary - solid neutral treatment
395
- * 3. Outline - surface treatment with a border
396
- * 4. Ghost - surface treatment without a border
397
- *
398
- * All four are sized variants — they inherit padding/fontSize from the theme's
399
- * `sizes` config (or the system defaults) so they're consistent at any size.
400
- *
401
- * Variants use theme settings for:
402
- * - Border radius (via global.cornerStyle / theme.corners)
403
- * - Border width for outline (from theme.border.width)
404
- *
405
- * Buttons are flat by default: the generated system declares no `global.shadow`,
406
- * so the theme's general shadow ramp (used for cards/surfaces) no longer nudges
407
- * every site's buttons into a drop shadow. A shadow appears only when a button
408
- * personality explicitly asks for one.
404
+ * Generate default accordion system based on theme configuration
409
405
  *
410
- * @param theme - Theme configuration
411
- * @returns ButtonSystem with 4 default sized variants
406
+ * Creates a single accordion style that harmonizes with the theme's
407
+ * visual language (spacing, borders, shadows, colors).
412
408
  */
413
- function generateDefaultButtonSystem(theme) {
414
- const borderWidthClass = BORDER_WIDTH_TO_CLASS_MAP[theme.border.width] || "border-2";
415
- const variants = [
416
- {
417
- id: "primary",
418
- name: "Primary",
419
- enabled: true,
420
- priority: 1,
421
- background: {
422
- type: "solid",
423
- colorToken: unsafeAsOpaqueButtonColourToken("primary")
424
- }
425
- },
426
- {
427
- id: "secondary",
428
- name: "Secondary",
429
- enabled: true,
430
- priority: 2,
431
- background: {
432
- type: "solid",
433
- colorToken: unsafeAsOpaqueButtonColourToken("neutral-700")
434
- }
409
+ function generateDefaultAccordionSystem(theme) {
410
+ const overrides = theme.siteStyleId ? requireCuratedSiteStyle(theme.siteStyleId).themeOverrides?.accordions : void 0;
411
+ if (overrides) return overrides;
412
+ const { axes, space } = theme;
413
+ return {
414
+ background: {
415
+ type: "solid",
416
+ colorToken: "surface"
435
417
  },
436
- {
437
- id: "outline",
438
- name: "Outline",
439
- enabled: true,
440
- priority: 3,
441
- background: {
442
- type: "surface",
443
- role: "link"
444
- },
445
- shadow: {
446
- elevation: "none",
447
- softness: null,
448
- position: "bottom"
449
- },
450
- border: { widthClass: borderWidthClass }
418
+ spacing: space === "comfortable" ? "comfortable" : space === "dense" ? "compact" : "medium",
419
+ corners: null,
420
+ border: defaultAccordionBorder(theme),
421
+ shadow: defaultAccordionShadow(theme),
422
+ icon: {
423
+ style: axes.tone === "bold" ? "plus-minus" : "chevron",
424
+ position: "right",
425
+ size: axes.density === "compact" ? "sm" : "md"
451
426
  },
452
- {
453
- id: "ghost",
454
- name: "Ghost",
455
- enabled: true,
456
- priority: 3,
457
- background: {
458
- type: "surface",
459
- role: "link"
460
- },
461
- shadow: {
462
- elevation: "none",
463
- softness: null,
464
- position: "bottom"
465
- }
466
- }
467
- ];
468
- return {
469
- global: {
470
- cornerStyle: narrowCornerStyle(theme.corners),
471
- textTransform: "none",
472
- fontWeight: 500,
473
- hoverTransform: "none",
474
- hoverColor: "none"
427
+ trigger: {
428
+ textColorToken: "text",
429
+ fontWeight: axes.tone === "bold" ? "bold" : axes.tone === "minimal" ? "medium" : "semibold"
475
430
  },
476
- variants: [...variants],
477
- surfacePolicy: createStandardButtonSurfacePolicy()
431
+ hover: generateHoverEffects(axes),
432
+ content: { textColorToken: "neutral-700" }
478
433
  };
479
434
  }
480
- //#endregion
481
- //#region ../theme-core/src/buttons/affordanceIcons.ts
435
+ function defaultAccordionBorder({ axes, border }) {
436
+ return axes.conversionBias === "high" || border.width !== "none" ? {
437
+ widthClass: border.width === "thick" ? "border-2" : "border",
438
+ colorToken: "border"
439
+ } : null;
440
+ }
441
+ function defaultAccordionShadow({ axes, shadow }) {
442
+ return axes.conversionBias === "high" || shadow.elevation !== "none" ? {
443
+ elevation: shadow.elevation === "none" ? "low" : shadow.elevation,
444
+ softness: shadow.softness === "crisp" || shadow.softness === null ? "soft" : shadow.softness,
445
+ position: shadow.position
446
+ } : null;
447
+ }
482
448
  /**
483
- * Affordance icon path data for CSS-emitted button affordances.
484
- *
485
- * A button variant may declare a trailing `affordance` icon (see
486
- * `ButtonVariantAffordance`). The generated button CSS renders that icon as a
487
- * masked `::after` pseudo-element, so the theme supplies it to every
488
- * button of the variant without per-node authoring.
489
- *
490
- * Icons live in the `@riverbankcms/blocks` registry, but the button CSS is
491
- * generated here in theme-core, so this module carries a small, curated copy of
492
- * the *affordance-eligible* icon path data (arrows/chevrons — the action-oriented
493
- * subset). The `d` values below are duplicated verbatim from the matching entries
494
- * in `blocks/src/system/icons/svg.tsx`; ids match the registry ids exactly so a
495
- * node-level `trailingIcon` and a theme-owned `affordance` share one id space.
449
+ * Generate hover effects based on theme characteristics
496
450
  *
497
- * Keep this set intentionally tiny. It is not the full CTA icon set — only the
498
- * shapes that read as a trailing affordance.
499
- */
500
- /** Registry icon id → the SVG path `d` fragments composing that icon. */
501
- const AFFORDANCE_ICON_PATHS = {
502
- ArrowRight: ["M5 12h14", "m13 6 6 6-6 6"],
503
- ArrowLeft: ["M19 12H5", "m11 6-6 6 6 6"],
504
- ChevronRight: ["m9 18 6-6-6-6"],
505
- ChevronLeft: ["m15 18-6-6 6-6"],
506
- ChevronDown: ["m6 9 6 6 6-6"],
507
- ArrowUpRight: ["M7 17 17 7", "M7 7h10v10"]
508
- };
509
- /**
510
- * Build a `data:image/svg+xml,...` URL for an affordance icon, suitable for use
511
- * as a CSS `mask-image`. The stroke is painted solid black so the mask's alpha
512
- * traces the icon outline; the visible colour is supplied separately by the
513
- * `::after` rule's `background-color`. Returns `null` for unknown ids.
451
+ * Strategy:
452
+ * - Minimal/calm themes: subtle text color change only
453
+ * - Bold/vibrant themes: background + text color
454
+ * - High conversion themes: background + shadow elevation
514
455
  */
515
- function affordanceIconMaskUrl(iconId) {
516
- const paths = AFFORDANCE_ICON_PATHS[iconId];
517
- if (!paths || paths.length === 0) return null;
518
- return `data:image/svg+xml,${`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>${paths.map((d) => `<path d='${d}'/>`).join("")}</svg>`.replace(/"/g, "'").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ")}`;
519
- }
520
- //#endregion
521
- //#region ../theme-core/src/buttons/generateButtonCss.ts
522
- const BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
523
- function rule$1(selector, declarations) {
456
+ function generateHoverEffects(axes) {
457
+ const { tone, energy, conversionBias } = axes;
458
+ if (tone === "minimal" && energy === "calm") return { textColorToken: "primary" };
459
+ if (tone === "bold" || conversionBias === "high") return {
460
+ backgroundColorToken: "primary/10",
461
+ textColorToken: "primary"
462
+ };
463
+ if (energy === "vibrant") return {
464
+ backgroundColorToken: "primary/5",
465
+ textColorToken: "primary"
466
+ };
524
467
  return {
525
- selectors: typeof selector === "string" ? [selector] : selector,
526
- declarations
468
+ backgroundColorToken: "primary/5",
469
+ textColorToken: "primary"
527
470
  };
528
471
  }
529
- function renderChunk(chunk) {
530
- if ("raw" in chunk) return chunk.raw;
531
- return `${chunk.selectors.join(",\n")} {\n${chunk.declarations.map(([prop, value]) => ` ${prop}: ${value};`).join("\n")}\n}`;
472
+ //#endregion
473
+ //#region ../theme-core/src/accordions/accordionInks.ts
474
+ const TEXT = contrastThresholdByPolicy["body-aa"];
475
+ /** The CSS colour for a certified ink: a palette variable, or the black/white literal. */
476
+ function accordionInkCss(ink) {
477
+ return rgbColorValue(inkReference(ink));
532
478
  }
533
- /** Layout/interaction styles common to every button. */
534
- const STRUCTURAL_DECLARATIONS = [
535
- ["cursor", "pointer"],
536
- ["transition", "all 200ms ease-in-out"],
537
- ["display", "inline-flex"],
538
- ["align-items", "center"],
539
- ["justify-content", "center"],
540
- ["outline", "none"]
541
- ];
542
- /**
543
- * Generate complete CSS for a button system.
544
- *
545
- * Pipeline:
546
- * 1. Resolve effective sizes (theme.sizes ∪ defaults)
547
- * 2. For each enabled variant, produce a list of `CssChunk`s (typed rules
548
- * + opaque effect CSS)
549
- * 3. Emit a `.default` alias from the highest-priority variant
550
- * 4. Serialise the whole list to a CSS string
551
- *
552
- * Padding/fontSize at size S resolve in order:
553
- * variant.sizes?.[S] → theme.buttons.sizes?.[S] → DEFAULT_BUTTON_SIZES[S]
554
- *
555
- * 2-class selector specificity (`.{id}.btn-{S}`) carries the size override;
556
- * no `!important` required.
557
- */
558
- function generateButtonCss(options) {
559
- const { themeId, theme, buttonSystem: providedButtonSystem } = options;
560
- const tokens = new TokenResolver(theme);
479
+ /** The foreground contract certified on an accordion's own background, or null when it has none. */
480
+ function resolveAccordionSurfaceForeground(theme, system) {
481
+ if (!system.background) return null;
482
+ return resolveSurfaceForeground({
483
+ type: "color",
484
+ color: system.background.colorToken,
485
+ textColor: system.content.textColorToken,
486
+ headingColor: system.trigger.textColorToken
487
+ }, expandPalette(theme.palette), { linkHover: theme.typography.proseLinkStyle?.hoverColorToken });
488
+ }
489
+ function resolveAccordionInks(theme, system) {
561
490
  const palette = expandPalette(theme.palette);
562
- const buttonSystem = providedButtonSystem ?? generateDefaultButtonSystem(theme);
563
- const themeSizes = {
564
- ...DEFAULT_BUTTON_SIZES,
565
- ...buttonSystem.sizes ?? {}
491
+ const surface = resolveAccordionSurfaceForeground(theme, system);
492
+ const backdrops = accordionBackdrops(system, palette, surface?.kind === "known" && surface.provenance.kind === "measured" ? surface.provenance.backdropHex : null);
493
+ const trigger = interactionInks("accordion trigger", system.trigger.textColorToken, TEXT, {
494
+ hover: system.hover.textColorToken,
495
+ open: system.openState?.triggerColorToken
496
+ }, backdrops, palette);
497
+ const icon = system.icon.colorToken ? interactionInks("accordion icon", system.icon.colorToken, 3, {}, backdrops, palette) : null;
498
+ const content = stateInk({
499
+ place: "accordion content",
500
+ backdrop: backdrops.open
501
+ }, system.content.textColorToken, TEXT, true, palette);
502
+ const parts = [
503
+ trigger,
504
+ certified([content]),
505
+ ...icon ? [icon] : []
506
+ ];
507
+ return {
508
+ surface,
509
+ trigger: trigger.inks,
510
+ content: content.ink,
511
+ ...icon ? { icon: icon.inks } : {},
512
+ paints: parts.flatMap(({ paints }) => paints),
513
+ unmeasured: parts.flatMap(({ unmeasured }) => unmeasured)
566
514
  };
567
- const enabledVariants = buttonSystem.variants.filter((v) => v.enabled).map((variant) => materializeRuntimeButtonAppearance(variant, buttonSystem.global, theme, themeSizes));
568
- const aliasSource = resolveAliasSource(enabledVariants);
569
- return (aliasSource ? [...enabledVariants, {
570
- ...aliasSource,
571
- id: DEFAULT_VARIANT_ALIAS_ID,
572
- name: "Default"
573
- }] : enabledVariants).flatMap((variant) => compiledVariantChunks(compileRuntimeVariant(variant, buttonSystem.global, palette), {
574
- themeId,
575
- theme,
576
- tokens,
577
- themeSizes
578
- })).map(renderChunk).join("\n\n");
579
515
  }
580
- function compiledVariantChunks(compiled, context) {
581
- return [...compiled.fallbackError ? [{ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` }] : [], ...variantChunks(compiled.variant, compiled.global, context.themeSizes, context.themeId, context.tokens, context.theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects)];
582
- }
583
- function compileRuntimeVariant(variant, global, palette) {
584
- const result = compileButtonColourStates({
585
- variant,
586
- global,
587
- palette
588
- });
589
- if (result.ok) return {
590
- variant,
591
- global,
592
- colours: result.states,
593
- focusIndicator: result.focusIndicator,
594
- nonColourEffects: result.nonColourEffects
516
+ function accordionBackdrops(system, palette, root) {
517
+ const over = (token, under) => token ? resolveOpaqueSurfaceHex(token, palette, under) : under;
518
+ const hoverFill = system.hover.backgroundColorToken;
519
+ const openFill = system.openState?.backgroundColorToken;
520
+ const open = over(openFill, root);
521
+ return {
522
+ root,
523
+ hover: over(hoverFill, root),
524
+ open,
525
+ openHover: over(hoverFill, open),
526
+ fills: {
527
+ hover: Boolean(hoverFill),
528
+ open: Boolean(openFill)
529
+ }
595
530
  };
596
- const fallbackVariant = {
597
- ...variant,
598
- visualStates: variant.visualStates ? mapButtonVisualAppearances(variant.visualStates, (state) => ({
599
- ...state,
600
- background: {
601
- type: "surface",
602
- role: "link"
603
- },
604
- effects: [],
605
- contextualHover: void 0
606
- })) : void 0,
607
- background: {
608
- type: "surface",
609
- role: "link"
531
+ }
532
+ /**
533
+ * A trigger's text or icon at rest, hovered, open, and open and hovered. A state
534
+ * is only measured when it paints a fill or a colour of its own.
535
+ */
536
+ function interactionInks(place, token, threshold, declared, backdrops, palette) {
537
+ const resting = stateInk({
538
+ place,
539
+ backdrop: backdrops.root
540
+ }, token, threshold, true, palette);
541
+ const hoverThreshold = Math.min(threshold, HOVER_TEXT_THRESHOLD);
542
+ const state = (name, required) => backdrops.fills[name] || declared[name] !== void 0 ? stateInk({
543
+ place: `${place} ${name}`,
544
+ backdrop: backdrops[name]
545
+ }, declared[name] ?? resting.ink, required, declared[name] !== void 0, palette) : null;
546
+ const hover = state("hover", hoverThreshold);
547
+ const open = state("open", threshold);
548
+ const openHover = hover && open ? openHoverInk(place, resting, hover, open, backdrops.openHover, hoverThreshold, palette) : null;
549
+ return {
550
+ inks: {
551
+ resting: resting.ink,
552
+ ...emitted("hover", hover),
553
+ ...emitted("open", open),
554
+ ...emitted("openHover", openHover)
610
555
  },
611
- hoverBackgroundToken: void 0,
612
- contextualHover: void 0,
613
- effects: void 0
556
+ ...certified([
557
+ resting,
558
+ hover,
559
+ open,
560
+ openHover
561
+ ])
614
562
  };
615
- const fallbackGlobal = {
616
- ...global,
617
- hoverColor: "none",
618
- hoverColorToken: void 0
563
+ }
564
+ /**
565
+ * Open and hovered, the open rule wins over the hover rule, which wins over the
566
+ * resting colour; the pair is only measured when it isn't one already measured.
567
+ */
568
+ function openHoverInk(place, resting, hover, open, backdrop, threshold, palette) {
569
+ const shown = [open, hover].find(({ emit }) => emit)?.ink ?? resting.ink;
570
+ return [hover, open].some(({ ink, paint }) => ink === shown && paint?.backdrop === backdrop) ? null : stateInk({
571
+ place: `${place} open hover`,
572
+ backdrop
573
+ }, shown, threshold, false, palette);
574
+ }
575
+ /** A colour certified on the backdrop it shows; it needs its own rule when declared or when it fell back. */
576
+ function stateInk({ place, backdrop }, ink, threshold, declared, palette) {
577
+ if (!backdrop) return {
578
+ ink,
579
+ emit: declared,
580
+ unmeasured: place
619
581
  };
582
+ const paint = certifyPaint(place, ink, threshold, backdrop, { palette });
620
583
  return {
621
- variant: fallbackVariant,
622
- global: fallbackGlobal,
623
- ...runtimeFallbackColours(compileButtonColourStates({
624
- variant: fallbackVariant,
625
- global: fallbackGlobal,
626
- palette
627
- })),
628
- fallbackError: result.error
584
+ ink: paint.ink,
585
+ emit: declared || paint.fallback,
586
+ paint
629
587
  };
630
588
  }
631
- function runtimeFallbackColours(fallback) {
632
- if (fallback.ok) return {
633
- colours: fallback.states,
634
- focusIndicator: fallback.focusIndicator,
635
- nonColourEffects: fallback.nonColourEffects
636
- };
637
- const colour = {
638
- kind: "surface",
639
- role: "link",
640
- backgroundCss: "transparent",
641
- foregroundCss: surfaceForegroundValue("link")
589
+ function emitted(key, state) {
590
+ return state?.emit ? { [key]: state.ink } : {};
591
+ }
592
+ function certified(states) {
593
+ const shown = states.filter((state) => state !== null);
594
+ return {
595
+ paints: shown.flatMap(({ paint }) => paint ? [paint] : []),
596
+ unmeasured: shown.flatMap(({ unmeasured }) => unmeasured ? [unmeasured] : [])
642
597
  };
598
+ }
599
+ //#endregion
600
+ //#region ../theme-core/src/header/dropdownSurface.ts
601
+ /** How strongly a menu link's hover and active fills tint the menu, as a percentage. */
602
+ const DROPDOWN_LINK_FILL_OPACITY = {
603
+ hover: 12,
604
+ active: 18
605
+ };
606
+ const LINK_STATES = Object.keys(DROPDOWN_LINK_FILL_OPACITY);
607
+ function resolveHeaderDropdownForeground(header, theme) {
608
+ const style = contextualDropdownStyle(header);
609
+ const backgroundToken = style?.background ?? "surface";
610
+ const candidate = dropdownTextCandidate(style, header);
611
+ const palette = expandPalette(theme.palette);
612
+ const foreground = resolveSurfaceForeground({
613
+ type: "color",
614
+ color: backgroundToken,
615
+ textColor: candidate
616
+ }, palette);
617
+ const text = foreground.kind === "known" ? foreground.roles.text : candidate;
618
+ const fill = style?.hoverBackground === void 0 ? text : style.hoverBackground;
619
+ const menu = foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
643
620
  return {
644
- colours: {
645
- base: colour,
646
- hover: colour,
647
- focus: colour,
648
- active: colour,
649
- disabled: colour
650
- },
651
- focusIndicator: {
652
- kind: "surface-role",
653
- colorCss: colour.foregroundCss,
654
- minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
655
- },
656
- nonColourEffects: {}
621
+ style,
622
+ backgroundToken,
623
+ candidate,
624
+ foreground,
625
+ textToken: inkReference(text),
626
+ linkFill: fill === null ? null : inkReference(fill),
627
+ ...linkInks(style, text, fill, menu, palette)
657
628
  };
658
629
  }
659
- /** Pick the highest-priority variant whose role we'll alias to `.default`. */
660
- function resolveAliasSource(enabled) {
661
- if (enabled.some((v) => v.id === "default")) return null;
662
- return enabled.slice().sort((a, b) => a.priority - b.priority)[0] ?? null;
630
+ /** A translucent menu keeps its declared hover text, unmeasured; an opaque one certifies each state. */
631
+ function linkInks(style, text, fill, menu, palette) {
632
+ const declared = style?.hoverTextColor || void 0;
633
+ return isTranslucent(style) ? {
634
+ linkText: declared ? { hover: declared } : {},
635
+ linkPaints: [],
636
+ linkUnmeasured: LINK_STATES.map(linkPlace)
637
+ } : certifyLinkText(declared ?? text, declared !== void 0, fill, menu, palette);
663
638
  }
664
- function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colours, focusIndicator, nonColourEffects) {
665
- const out = [];
666
- const variantId = parseButtonVariantIdForCss(variant.id);
667
- const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
668
- out.push(variantBaseRule(variant, selector, tokens, colours.base));
669
- out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
670
- for (const state of [
671
- "hover",
672
- "focus",
673
- "active"
674
- ]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens));
675
- const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
676
- if (effects) out.push({ raw: effects });
677
- out.push(...variantStateTransformRules(variant, selector));
678
- out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator));
679
- const affordance = variantAffordanceRule(variant, selector);
680
- if (affordance) out.push(affordance);
681
- out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens));
682
- out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
683
- out.push(...variantStateSizeRules(variant, variantId, themeId));
684
- return out;
639
+ const linkPlace = (state) => `header menu link ${state}`;
640
+ function isTranslucent(style) {
641
+ return style?.surfaceTreatment?.kind === "frosted" && style.surfaceTreatment.opacity < 1;
685
642
  }
686
- /**
687
- * Emit the optional trailing affordance icon as a masked `::after`.
688
- *
689
- * Only variants that declare `affordance` with a known icon id produce a rule —
690
- * every other variant is byte-identical to before. The `:not(.rb-affordance-off)`
691
- * guard lets a `button` node that renders its own trailing icon suppress this
692
- * one. The mask uses `currentColor`, so the icon always shares the canonical
693
- * button foreground.
694
- */
695
- function variantAffordanceRule(variant, selector) {
696
- const affordance = variant.affordance;
697
- if (!affordance) return null;
698
- const maskUrl = affordanceIconMaskUrl(affordance.iconId);
699
- if (!maskUrl) return null;
700
- const mask = `url("${maskUrl}") no-repeat center / contain`;
701
- return rule$1(`${selector}:not(.${AFFORDANCE_SUPPRESS_CLASS})::after`, [
702
- ["content", "\"\""],
703
- ["display", "inline-block"],
704
- ["width", "1em"],
705
- ["height", "1em"],
706
- ["margin-inline-start", "0.5em"],
707
- ["flex", "0 0 auto"],
708
- ["background-color", "currentColor"],
709
- ["-webkit-mask", mask],
710
- ["mask", mask]
711
- ]);
643
+ /** Each state's text certified on the menu tinted by its fill; nothing is measured when the menu or the fill can't be. */
644
+ function certifyLinkText(ink, declared, fill, menu, palette) {
645
+ const fillHex = fill === null || !menu ? null : resolveOpaqueSurfaceHex(fill, palette, menu);
646
+ const tinted = (state) => fill === null ? menu : fillHex && menu ? compositeHex(fillHex, DROPDOWN_LINK_FILL_OPACITY[state] / 100, menu) : null;
647
+ const states = LINK_STATES.map((state) => {
648
+ const backdrop = tinted(state);
649
+ const required = state === "hover" ? HOVER_TEXT_THRESHOLD : contrastThresholdByPolicy["body-aa"];
650
+ return {
651
+ state,
652
+ paint: backdrop ? certifyPaint(linkPlace(state), ink, required, backdrop, { palette }) : null
653
+ };
654
+ });
655
+ return {
656
+ linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state, inkReference(paint?.ink ?? ink)]] : [])),
657
+ linkPaints: states.flatMap(({ paint }) => paint ? [paint] : []),
658
+ linkUnmeasured: states.flatMap(({ state, paint }) => paint ? [] : [linkPlace(state)])
659
+ };
712
660
  }
713
- function parseButtonVariantIdForCss(value) {
714
- const variantId = parseThemeButtonVariantId(value);
715
- if (!variantId) throw new Error("Button variant id must be a non-empty string");
716
- return variantId;
661
+ /** Reuse the header's decided opening tone; unknown openings retain opaque paint. */
662
+ function contextualDropdownStyle(header) {
663
+ const style = header.dropdownStyle;
664
+ const treatment = style?.surfaceTreatment;
665
+ if (!style || treatment?.kind !== "frosted" || treatment.tone !== "opening") return style;
666
+ const tone = readOpeningToneProjection(header);
667
+ if (!tone) return {
668
+ ...style,
669
+ surfaceTreatment: { kind: "solid" }
670
+ };
671
+ const textColor = tone === "dark" ? "neutral-50" : "neutral-950";
672
+ return {
673
+ ...style,
674
+ background: tone === "dark" ? "neutral-950" : "neutral-50",
675
+ textColor,
676
+ hoverBackground: textColor,
677
+ borderColor: null
678
+ };
717
679
  }
718
- function variantBaseRule(variant, selector, tokens, colour) {
719
- const appearance = variant.visualStates?.base;
720
- if (!appearance) throw new Error("Button appearance must be materialized before CSS emission");
721
- const border = buttonBorder(appearance.border, tokens);
722
- return rule$1(selector, [
723
- ...buttonTypographyDeclarations(appearance.typography),
724
- ...STRUCTURAL_DECLARATIONS,
725
- ["border-radius", buttonRadius(appearance.borderRadius)],
726
- ["box-shadow", buttonShadow(appearance.shadow, tokens)],
727
- ...resolvedButtonColourDeclarations(colour, {
728
- role: variant.id,
729
- state: "base"
730
- }),
731
- ["outline", actionVariableFallback(variant.id, "base", "outline", buttonRingDefaults(variant).outline)],
732
- ["outline-offset", actionVariableFallback(variant.id, "base", "outline-offset", buttonRingDefaults(variant).offset)],
733
- ...border === null ? [] : [["border", border]]
734
- ]);
680
+ /** Menu text wins; only an absent preference falls back to the header's ink. */
681
+ function dropdownTextCandidate(style, header) {
682
+ return style?.textColor ?? ((header.navColor ?? header.textColor)?.trim() || "text");
735
683
  }
684
+ //#endregion
685
+ //#region ../theme-core/src/runtime/fontFamily.ts
736
686
  /**
737
- * Resolve a colour for a button that does not own its own background.
687
+ * Font Family Formatting Utilities
738
688
  *
739
- * The surface contract is populated by section/card/modal treatments. The
740
- * token fallback keeps buttons usable in contexts that do not provide that
741
- * contract (and preserves the existing theme behaviour there).
689
+ * Handles parsing and formatting font family strings for CSS output.
690
+ * Supports font stacks, proper quoting, and generic CSS families.
742
691
  */
743
- function variantStateColourRule(variant, variantId, themeId, state, colour, tokens) {
744
- const baseSelector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
745
- return rule$1(state === "hover" ? [`${baseSelector}:hover`, `${baseSelector}[data-force-hover="true"]`] : `${baseSelector}:${state}`, [...resolvedButtonColourDeclarations(colour, {
746
- role: variantId,
747
- state
748
- }), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens) : []]);
749
- }
750
- function variantFocusVisibleRule(variantId, themeId, focusIndicator) {
751
- return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator, variantId));
752
- }
753
- function variantEffectsCss(variant, effects, themeId, tokens, theme) {
754
- if (!effects) return "";
755
- const background = variant.visualStates?.base.background ?? variant.background;
756
- const elementConfig = {
757
- background: background.type === "surface" ? { type: "transparent" } : background,
758
- shadow: variant.visualStates?.base.shadow ?? variant.shadow
759
- };
760
- return generateEffectsCSS({
761
- themeId,
762
- variantId: variant.id,
763
- effects,
764
- elementConfig,
765
- tokens,
766
- theme
767
- });
692
+ /** CSS generic font families that should never be quoted */
693
+ const GENERIC_CSS_FAMILIES = [
694
+ "serif",
695
+ "sans-serif",
696
+ "monospace",
697
+ "cursive",
698
+ "fantasy",
699
+ "system-ui"
700
+ ];
701
+ /**
702
+ * Check if a font name is a generic CSS family (e.g., "sans-serif", "monospace")
703
+ */
704
+ function isGenericFamily(font) {
705
+ return GENERIC_CSS_FAMILIES.includes(font.toLowerCase());
768
706
  }
769
- function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
770
- const base = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
771
- const disabledSelectors = [
772
- base,
773
- `${base}:hover`,
774
- `${base}:active`,
775
- `${base}:focus`
776
- ];
777
- const pseudoSelectors = [`${base}::before`, `${base}::after`];
778
- return [rule$1(disabledSelectors, [
779
- ...resolvedButtonColourDeclarations(colour, {
780
- role: variantId,
781
- state: "disabled"
782
- }),
783
- ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, true) : [],
784
- ...RESOLVED_BUTTON_DISABLED_DECLARATIONS
785
- ]), rule$1(pseudoSelectors, [
786
- ["opacity", "0"],
787
- ["animation", "none"],
788
- ["pointer-events", "none"]
789
- ])];
707
+ /**
708
+ * Quote a font name if it contains spaces, unless it's a generic CSS family.
709
+ * Strips existing quotes before processing.
710
+ *
711
+ * @returns The formatted font name, or null if empty
712
+ */
713
+ function quoteFontIfNeeded(rawFont) {
714
+ const font = rawFont.trim().replace(/^["']|["']$/g, "");
715
+ if (!font) return null;
716
+ if (isGenericFamily(font)) return font;
717
+ return /\s/.test(font) ? `"${font}"` : font;
790
718
  }
791
- /** Explicit rest transforms follow hover effects so :active can return to rest. */
792
- function variantStateTransformRules(variant, selector) {
793
- return [
794
- "hover",
795
- "focus",
796
- "active"
797
- ].flatMap((state) => {
798
- const transform = variant.visualStates?.[state].transform;
799
- return transform ? [rule$1(`${selector}:${state}`, [["transform", transform]])] : [];
800
- });
719
+ /**
720
+ * Format a font family string for CSS output.
721
+ *
722
+ * Handles:
723
+ * - Single font names (quoted if needed)
724
+ * - Font stacks (comma-separated, each font quoted individually if needed)
725
+ * - Generic CSS families (never quoted)
726
+ * - Appends fallback if not already present
727
+ *
728
+ * @param family - Font family string (e.g., "Open Sans" or "Open Sans, Helvetica, sans-serif")
729
+ * @param fallback - Fallback font family (default: "sans-serif")
730
+ * @returns CSS-ready font-family value
731
+ *
732
+ * @example
733
+ * formatFontFamily("Open Sans") // '"Open Sans", sans-serif'
734
+ * formatFontFamily("Inter") // 'Inter, sans-serif'
735
+ * formatFontFamily("Open Sans, Helvetica, sans-serif") // '"Open Sans", Helvetica, sans-serif'
736
+ * formatFontFamily("") // 'sans-serif'
737
+ */
738
+ function formatFontFamily(family, fallback = "sans-serif") {
739
+ const trimmed = (family || "").trim();
740
+ if (!trimmed) return fallback;
741
+ const fonts = trimmed.split(",").map(quoteFontIfNeeded).filter((f) => f !== null);
742
+ if (!fonts.some((f) => f === fallback || f === `"${fallback}"`)) fonts.push(fallback);
743
+ return fonts.join(", ");
801
744
  }
802
- function variantSizeRules(variant, variantId, themeSizes, themeId) {
803
- const border = variant.visualStates?.base.border ?? variant.border;
804
- const borderWidth = border && border !== "none" ? BORDER_WIDTH_MAP[border.widthClass] || "1px" : "0px";
805
- return BUTTON_SIZE_NAMES.map((sizeName) => {
806
- const config = resolveSizeConfig(variant, sizeName, themeSizes);
807
- return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, sizeName)}`, [
808
- ...paddingDeclarations(config.padding, borderWidth),
809
- ...config.fontSize ? [["font-size", FONT_SIZE_MAP[config.fontSize] || "1rem"]] : [],
810
- ...config.borderRadius ? [["border-radius", buttonRadius(config.borderRadius)]] : []
811
- ]);
745
+ //#endregion
746
+ //#region ../theme-core/src/palette/generateCssVars.ts
747
+ /**
748
+ * Generates CSS variables for a palette
749
+ *
750
+ * @param palette - The palette to generate CSS variables for
751
+ * @returns
752
+ */
753
+ function generateCssVars(palette) {
754
+ const cssVars = {};
755
+ Object.entries(palette).forEach(([key, value]) => {
756
+ if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
757
+ const { r, g, b } = hexToRgb(value);
758
+ cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
812
759
  });
760
+ return cssVars;
813
761
  }
814
- function variantStateSizeRules(variant, variantId, themeId) {
815
- const states = variant.visualStates;
816
- if (!states) return [];
817
- const width = (border) => border === "none" ? "0px" : BORDER_WIDTH_MAP[border.widthClass] || "1px";
818
- return [
819
- "hover",
820
- "focus",
821
- "active",
822
- "disabled"
823
- ].flatMap((state) => BUTTON_SIZE_NAMES.flatMap((size) => {
824
- const base = states.base.sizes[size];
825
- const target = states[state].sizes[size];
826
- const declarations = stateSizeDeclarations(base, target, width(states.base.border), width(states[state].border), states.base.borderRadius, states[state].borderRadius);
827
- if (declarations.length === 0) return [];
828
- const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, size)}`;
829
- return [rule$1(state === "hover" ? [`${selector}:hover`, `${selector}[data-force-hover="true"]`] : `${selector}:${state}`, declarations)];
830
- }));
831
- }
832
- /** Size radius overrides remain owned by each state, just like padding and type. */
833
- function stateSizeDeclarations(base, target, baseWidth, targetWidth, baseRadius, targetRadius) {
834
- const originalRadius = buttonRadius(base.borderRadius ?? baseRadius);
835
- const radius = buttonRadius(target.borderRadius ?? targetRadius);
836
- const radiusChanges = originalRadius === radius ? [] : [["border-radius", radius]];
837
- if (base.padding === target.padding && base.fontSize === target.fontSize && baseWidth === targetWidth) return radiusChanges;
838
- return [
839
- ...paddingDeclarations(target.padding, targetWidth),
840
- ...target.fontSize ? [["font-size", FONT_SIZE_MAP[target.fontSize] || "1rem"]] : [],
841
- ...radiusChanges
842
- ];
843
- }
844
- /** Layout contexts do not change a recipe: grouped actions share its ordinary box. */
845
- function generateButtonActionLayoutCss(options) {
846
- const system = options.buttonSystem ?? generateDefaultButtonSystem(options.theme);
847
- const themeSizes = {
848
- ...DEFAULT_BUTTON_SIZES,
849
- ...system.sizes
850
- };
851
- const primary = system.variants.find((variant) => variant.enabled && variant.id === "primary") ?? system.variants.filter((variant) => variant.enabled).sort((a, b) => a.priority - b.priority)[0];
852
- if (!primary) return "";
853
- const appearance = materializeRuntimeButtonAppearance(primary, system.global, options.theme, themeSizes).visualStates.base;
854
- const prefix = `:where([data-theme-scope="${options.themeId}"]) .cta-row:has(> :nth-child(2))`;
855
- return BUTTON_SIZE_NAMES.map((size) => {
856
- const config = appearance.sizes[size];
857
- const fontSize = config.fontSize ?? appearance.typography.fontSize;
858
- return rule$1([`${prefix} .rb-item-text-link.btn-${size}`, ...primary.id !== "ghost" && system.variants.some((variant) => variant.enabled && variant.id === "ghost") ? [`${prefix} .ghost.btn-${size}`] : []], [
859
- ...paddingDeclarations(config.padding, "0px"),
860
- ["display", "inline-flex"],
861
- ["align-items", "center"],
862
- ...fontSize ? [["font-size", FONT_SIZE_MAP[fontSize] || "1rem"]] : []
863
- ]);
864
- }).map(renderChunk).join("\n");
865
- }
762
+ //#endregion
763
+ //#region ../theme-core/src/buttons/generateDefaultButtonSystem.ts
866
764
  /**
867
- * Resolve the size config for a variant at a given size.
868
- *
869
- * Falls through: variant override → theme.sizes → DEFAULT_BUTTON_SIZES.
765
+ * Map border width to border width class
870
766
  */
871
- function resolveSizeConfig(variant, sizeName, themeSizes) {
872
- if (variant.visualStates) return variant.visualStates.base.sizes[sizeName];
873
- const variantOverride = variant.sizes?.[sizeName];
874
- const themeDefault = themeSizes[sizeName];
875
- return {
876
- padding: variantOverride?.padding ?? themeDefault.padding,
877
- fontSize: variantOverride?.fontSize ?? themeDefault.fontSize
878
- };
767
+ const BORDER_WIDTH_TO_CLASS_MAP = {
768
+ none: "border-0",
769
+ hairline: "border",
770
+ thin: "border",
771
+ thick: "border-4"
772
+ };
773
+ const VALID_CORNER_STYLES = [
774
+ "square",
775
+ "rounded",
776
+ "pill"
777
+ ];
778
+ /**
779
+ * Narrow a Theme's corners value to the CornerStyle union expected by the button system.
780
+ * Falls back to 'rounded' (the historically-safe default) for unknown values.
781
+ */
782
+ function narrowCornerStyle(corners) {
783
+ return VALID_CORNER_STYLES.includes(corners) ? corners : "rounded";
879
784
  }
880
785
  /**
881
- * Emit padding declarations for a variant at one size, accounting for border
882
- * compensation so bordered and borderless variants render at identical outer
883
- * dimensions.
786
+ * Generate default button system from theme settings.
884
787
  *
885
- * The schema (`paddingShorthandSchema`) guarantees exactly two tokens so the
886
- * destructure is total.
788
+ * Creates 4 sized canonical variants when theme.buttons is not defined:
789
+ * 1. Primary - solid primary treatment
790
+ * 2. Secondary - solid neutral treatment
791
+ * 3. Outline - surface treatment with a border
792
+ * 4. Ghost - surface treatment without a border
793
+ *
794
+ * All four are sized variants — they inherit padding/fontSize from the theme's
795
+ * `sizes` config (or the system defaults) so they're consistent at any size.
796
+ *
797
+ * Variants use theme settings for:
798
+ * - Border radius (via global.cornerStyle / theme.corners)
799
+ * - Border width for outline (from theme.border.width)
800
+ *
801
+ * Buttons are flat by default: the generated system declares no `global.shadow`,
802
+ * so the theme's general shadow ramp (used for cards/surfaces) no longer nudges
803
+ * every site's buttons into a drop shadow. A shadow appears only when a button
804
+ * personality explicitly asks for one.
805
+ *
806
+ * @param theme - Theme configuration
807
+ * @returns ButtonSystem with 4 default sized variants
887
808
  */
888
- function buttonRingDefaults(variant) {
889
- const border = variant.visualStates?.base.border ?? variant.border;
890
- return border && border !== "none" && border.ring ? {
891
- outline: "1px solid var(--rb-surface-mark-color, var(--rb-surface-link-color, currentColor))",
892
- offset: "3px"
893
- } : {
894
- outline: "none",
895
- offset: "0px"
809
+ function generateDefaultButtonSystem(theme) {
810
+ const borderWidthClass = BORDER_WIDTH_TO_CLASS_MAP[theme.border.width] || "border-2";
811
+ const variants = [
812
+ {
813
+ id: "primary",
814
+ name: "Primary",
815
+ enabled: true,
816
+ priority: 1,
817
+ background: {
818
+ type: "solid",
819
+ colorToken: unsafeAsOpaqueButtonColourToken("primary")
820
+ }
821
+ },
822
+ {
823
+ id: "secondary",
824
+ name: "Secondary",
825
+ enabled: true,
826
+ priority: 2,
827
+ background: {
828
+ type: "solid",
829
+ colorToken: unsafeAsOpaqueButtonColourToken("neutral-700")
830
+ }
831
+ },
832
+ {
833
+ id: "outline",
834
+ name: "Outline",
835
+ enabled: true,
836
+ priority: 3,
837
+ background: {
838
+ type: "surface",
839
+ role: "link"
840
+ },
841
+ shadow: {
842
+ elevation: "none",
843
+ softness: null,
844
+ position: "bottom"
845
+ },
846
+ border: { widthClass: borderWidthClass }
847
+ },
848
+ {
849
+ id: "ghost",
850
+ name: "Ghost",
851
+ enabled: true,
852
+ priority: 3,
853
+ background: {
854
+ type: "surface",
855
+ role: "link"
856
+ },
857
+ shadow: {
858
+ elevation: "none",
859
+ softness: null,
860
+ position: "bottom"
861
+ }
862
+ }
863
+ ];
864
+ return {
865
+ global: {
866
+ cornerStyle: narrowCornerStyle(theme.corners),
867
+ textTransform: "none",
868
+ fontWeight: 500,
869
+ hoverTransform: "none",
870
+ hoverColor: "none"
871
+ },
872
+ variants: [...variants],
873
+ surfacePolicy: createStandardButtonSurfacePolicy()
896
874
  };
897
875
  }
898
876
  //#endregion
899
- //#region ../theme-core/src/site-styles/siteChromeNavPreferences.ts
877
+ //#region ../theme-core/src/buttons/affordanceIcons.ts
900
878
  /**
901
- * Applies the user's nav font-role/size overrides on top of a style-resolved
902
- * nav link style. This is where the precedence contract lands:
879
+ * Affordance icon path data for CSS-emitted button affordances.
903
880
  *
904
- * - The nav typography TREATMENT (case/tracking identity: plain / heading /
905
- * quiet-caps / brand-caps) is ALWAYS owned by the active header style and is
906
- * baked into `style` before this call (see `applyNavTypography` in
907
- * headerLayoutStyles.ts).
908
- * - Each treatment resolves through a DEFAULT font role: `heading` resolves
909
- * through the heading role; `plain` / `quiet-caps` / `brand-caps` resolve
910
- * through the body role.
911
- * - The user's `navFontRole` (surfaced here as `preferences.typography`) only
912
- * overrides which font ROLE the treatment resolves through. It never changes
913
- * the treatment. `'inherit'` keeps the treatment's default role.
881
+ * A button variant may declare a trailing `affordance` icon (see
882
+ * `ButtonVariantAffordance`). The generated button CSS renders that icon as a
883
+ * masked `::after` pseudo-element, so the theme supplies it to every
884
+ * button of the variant without per-node authoring.
885
+ *
886
+ * Icons live in the `@riverbankcms/blocks` registry, but the button CSS is
887
+ * generated here in theme-core, so this module carries a small, curated copy of
888
+ * the *affordance-eligible* icon path data (arrows/chevrons — the action-oriented
889
+ * subset). The `d` values below are duplicated verbatim from the matching entries
890
+ * in `blocks/src/system/icons/svg.tsx`; ids match the registry ids exactly so a
891
+ * node-level `trailingIcon` and a theme-owned `affordance` share one id space.
892
+ *
893
+ * Keep this set intentionally tiny. It is not the full CTA icon set — only the
894
+ * shapes that read as a trailing affordance.
914
895
  */
915
- function mergeHeaderNavTypographyPreference(style, preferences) {
916
- return preferences.typography === "inherit" && preferences.fontSize === "inherit" ? style : {
917
- ...style,
918
- ...preferences.typography === "inherit" ? {} : { typography: preferences.typography },
919
- ...preferences.fontSize === "inherit" ? {} : { textSize: preferences.fontSize }
920
- };
921
- }
922
- function readHeaderNavFontSizePreference(value) {
923
- return value === "sm" || value === "base" || value === "lg" || value === "xl" ? value : "inherit";
896
+ /** Registry icon id → the SVG path `d` fragments composing that icon. */
897
+ const AFFORDANCE_ICON_PATHS = {
898
+ ArrowRight: ["M5 12h14", "m13 6 6 6-6 6"],
899
+ ArrowLeft: ["M19 12H5", "m11 6-6 6 6 6"],
900
+ ChevronRight: ["m9 18 6-6-6-6"],
901
+ ChevronLeft: ["m15 18-6-6 6-6"],
902
+ ChevronDown: ["m6 9 6 6 6-6"],
903
+ ArrowUpRight: ["M7 17 17 7", "M7 7h10v10"]
904
+ };
905
+ /**
906
+ * Build a `data:image/svg+xml,...` URL for an affordance icon, suitable for use
907
+ * as a CSS `mask-image`. The stroke is painted solid black so the mask's alpha
908
+ * traces the icon outline; the visible colour is supplied separately by the
909
+ * `::after` rule's `background-color`. Returns `null` for unknown ids.
910
+ */
911
+ function affordanceIconMaskUrl(iconId) {
912
+ const paths = AFFORDANCE_ICON_PATHS[iconId];
913
+ if (!paths || paths.length === 0) return null;
914
+ return `data:image/svg+xml,${`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>${paths.map((d) => `<path d='${d}'/>`).join("")}</svg>`.replace(/"/g, "'").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ")}`;
924
915
  }
925
916
  //#endregion
926
- //#region ../theme-core/src/accordions/defaults.ts
927
- /**
928
- * Generate default accordion system based on theme configuration
929
- *
930
- * Creates a single accordion style that harmonizes with the theme's
931
- * visual language (spacing, borders, shadows, colors).
932
- */
933
- function generateDefaultAccordionSystem(theme) {
934
- const overrides = theme.siteStyleId ? requireCuratedSiteStyle(theme.siteStyleId).themeOverrides?.accordions : void 0;
935
- if (overrides) return overrides;
936
- const { axes, space } = theme;
917
+ //#region ../theme-core/src/buttons/generateButtonCss.ts
918
+ const BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
919
+ function rule$1(selector, declarations) {
937
920
  return {
938
- background: {
939
- type: "solid",
940
- colorToken: "surface"
941
- },
942
- spacing: space === "comfortable" ? "comfortable" : space === "dense" ? "compact" : "medium",
943
- corners: null,
944
- border: defaultAccordionBorder(theme),
945
- shadow: defaultAccordionShadow(theme),
946
- icon: {
947
- style: axes.tone === "bold" ? "plus-minus" : "chevron",
948
- position: "right",
949
- size: axes.density === "compact" ? "sm" : "md"
950
- },
951
- trigger: {
952
- textColorToken: "text",
953
- fontWeight: axes.tone === "bold" ? "bold" : axes.tone === "minimal" ? "medium" : "semibold"
954
- },
955
- hover: generateHoverEffects(axes),
956
- content: { textColorToken: "neutral-700" }
921
+ selectors: typeof selector === "string" ? [selector] : selector,
922
+ declarations
957
923
  };
958
924
  }
959
- function defaultAccordionBorder({ axes, border }) {
960
- return axes.conversionBias === "high" || border.width !== "none" ? {
961
- widthClass: border.width === "thick" ? "border-2" : "border",
962
- colorToken: "border"
963
- } : null;
964
- }
965
- function defaultAccordionShadow({ axes, shadow }) {
966
- return axes.conversionBias === "high" || shadow.elevation !== "none" ? {
967
- elevation: shadow.elevation === "none" ? "low" : shadow.elevation,
968
- softness: shadow.softness === "crisp" || shadow.softness === null ? "soft" : shadow.softness,
969
- position: shadow.position
970
- } : null;
925
+ function renderChunk(chunk) {
926
+ if ("raw" in chunk) return chunk.raw;
927
+ return `${chunk.selectors.join(",\n")} {\n${chunk.declarations.map(([prop, value]) => ` ${prop}: ${value};`).join("\n")}\n}`;
971
928
  }
929
+ /** Layout/interaction styles common to every button. */
930
+ const STRUCTURAL_DECLARATIONS = [
931
+ ["cursor", "pointer"],
932
+ ["transition", "all 200ms ease-in-out"],
933
+ ["display", "inline-flex"],
934
+ ["align-items", "center"],
935
+ ["justify-content", "center"],
936
+ ["outline", "none"]
937
+ ];
972
938
  /**
973
- * Generate hover effects based on theme characteristics
939
+ * Generate complete CSS for a button system.
974
940
  *
975
- * Strategy:
976
- * - Minimal/calm themes: subtle text color change only
977
- * - Bold/vibrant themes: background + text color
978
- * - High conversion themes: background + shadow elevation
941
+ * Pipeline:
942
+ * 1. Resolve effective sizes (theme.sizes ∪ defaults)
943
+ * 2. For each enabled variant, produce a list of `CssChunk`s (typed rules
944
+ * + opaque effect CSS)
945
+ * 3. Emit a `.default` alias from the highest-priority variant
946
+ * 4. Serialise the whole list to a CSS string
947
+ *
948
+ * Padding/fontSize at size S resolve in order:
949
+ * variant.sizes?.[S] → theme.buttons.sizes?.[S] → DEFAULT_BUTTON_SIZES[S]
950
+ *
951
+ * 2-class selector specificity (`.{id}.btn-{S}`) carries the size override;
952
+ * no `!important` required.
979
953
  */
980
- function generateHoverEffects(axes) {
981
- const { tone, energy, conversionBias } = axes;
982
- if (tone === "minimal" && energy === "calm") return { textColorToken: "primary" };
983
- if (tone === "bold" || conversionBias === "high") return {
984
- backgroundColorToken: "primary/10",
985
- textColorToken: "primary"
986
- };
987
- if (energy === "vibrant") return {
988
- backgroundColorToken: "primary/5",
989
- textColorToken: "primary"
990
- };
991
- return {
992
- backgroundColorToken: "primary/5",
993
- textColorToken: "primary"
954
+ function generateButtonCss(options) {
955
+ const { themeId, theme, buttonSystem: providedButtonSystem } = options;
956
+ const tokens = new TokenResolver(theme);
957
+ const palette = expandPalette(theme.palette);
958
+ const buttonSystem = providedButtonSystem ?? generateDefaultButtonSystem(theme);
959
+ const themeSizes = {
960
+ ...DEFAULT_BUTTON_SIZES,
961
+ ...buttonSystem.sizes ?? {}
994
962
  };
963
+ const enabledVariants = buttonSystem.variants.filter((v) => v.enabled).map((variant) => materializeRuntimeButtonAppearance(variant, buttonSystem.global, theme, themeSizes));
964
+ const aliasSource = resolveAliasSource(enabledVariants);
965
+ return (aliasSource ? [...enabledVariants, {
966
+ ...aliasSource,
967
+ id: DEFAULT_VARIANT_ALIAS_ID,
968
+ name: "Default"
969
+ }] : enabledVariants).flatMap((variant) => compiledVariantChunks(compileRuntimeVariant(variant, buttonSystem.global, palette), {
970
+ themeId,
971
+ theme,
972
+ tokens,
973
+ themeSizes
974
+ })).map(renderChunk).join("\n\n");
995
975
  }
996
- //#endregion
997
- //#region ../theme-core/src/accordions/accordionInks.ts
998
- const TEXT = contrastThresholdByPolicy["body-aa"];
999
- /** The CSS colour for a certified ink: a palette variable, or the black/white literal. */
1000
- function accordionInkCss(ink) {
1001
- return rgbColorValue(inkReference(ink));
1002
- }
1003
- /** The foreground contract certified on an accordion's own background, or null when it has none. */
1004
- function resolveAccordionSurfaceForeground(theme, system) {
1005
- if (!system.background) return null;
1006
- return resolveSurfaceForeground({
1007
- type: "color",
1008
- color: system.background.colorToken,
1009
- textColor: system.content.textColorToken,
1010
- headingColor: system.trigger.textColorToken
1011
- }, expandPalette(theme.palette), { linkHover: theme.typography.proseLinkStyle?.hoverColorToken });
976
+ function compiledVariantChunks(compiled, context) {
977
+ return [...compiled.fallbackError ? [{ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` }] : [], ...variantChunks(compiled.variant, compiled.global, context.themeSizes, context.themeId, context.tokens, context.theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects)];
1012
978
  }
1013
- function resolveAccordionInks(theme, system) {
1014
- const palette = expandPalette(theme.palette);
1015
- const surface = resolveAccordionSurfaceForeground(theme, system);
1016
- const backdrops = accordionBackdrops(system, palette, surface?.kind === "known" && surface.provenance.kind === "measured" ? surface.provenance.backdropHex : null);
1017
- const trigger = interactionInks("accordion trigger", system.trigger.textColorToken, TEXT, {
1018
- hover: system.hover.textColorToken,
1019
- open: system.openState?.triggerColorToken
1020
- }, backdrops, palette);
1021
- const icon = system.icon.colorToken ? interactionInks("accordion icon", system.icon.colorToken, 3, {}, backdrops, palette) : null;
1022
- const content = stateInk({
1023
- place: "accordion content",
1024
- backdrop: backdrops.open
1025
- }, system.content.textColorToken, TEXT, true, palette);
1026
- const parts = [
1027
- trigger,
1028
- certified([content]),
1029
- ...icon ? [icon] : []
1030
- ];
1031
- return {
1032
- surface,
1033
- trigger: trigger.inks,
1034
- content: content.ink,
1035
- ...icon ? { icon: icon.inks } : {},
1036
- paints: parts.flatMap(({ paints }) => paints),
1037
- unmeasured: parts.flatMap(({ unmeasured }) => unmeasured)
979
+ function compileRuntimeVariant(variant, global, palette) {
980
+ const result = compileButtonColourStates({
981
+ variant,
982
+ global,
983
+ palette
984
+ });
985
+ if (result.ok) return {
986
+ variant,
987
+ global,
988
+ colours: result.states,
989
+ focusIndicator: result.focusIndicator,
990
+ nonColourEffects: result.nonColourEffects
991
+ };
992
+ const fallbackVariant = {
993
+ ...variant,
994
+ visualStates: variant.visualStates ? mapButtonVisualAppearances(variant.visualStates, (state) => ({
995
+ ...state,
996
+ background: {
997
+ type: "surface",
998
+ role: "link"
999
+ },
1000
+ effects: [],
1001
+ contextualHover: void 0
1002
+ })) : void 0,
1003
+ background: {
1004
+ type: "surface",
1005
+ role: "link"
1006
+ },
1007
+ hoverBackgroundToken: void 0,
1008
+ contextualHover: void 0,
1009
+ effects: void 0
1010
+ };
1011
+ const fallbackGlobal = {
1012
+ ...global,
1013
+ hoverColor: "none",
1014
+ hoverColorToken: void 0
1038
1015
  };
1039
- }
1040
- function accordionBackdrops(system, palette, root) {
1041
- const over = (token, under) => token ? resolveOpaqueSurfaceHex(token, palette, under) : under;
1042
- const hoverFill = system.hover.backgroundColorToken;
1043
- const openFill = system.openState?.backgroundColorToken;
1044
- const open = over(openFill, root);
1045
1016
  return {
1046
- root,
1047
- hover: over(hoverFill, root),
1048
- open,
1049
- openHover: over(hoverFill, open),
1050
- fills: {
1051
- hover: Boolean(hoverFill),
1052
- open: Boolean(openFill)
1053
- }
1017
+ variant: fallbackVariant,
1018
+ global: fallbackGlobal,
1019
+ ...runtimeFallbackColours(compileButtonColourStates({
1020
+ variant: fallbackVariant,
1021
+ global: fallbackGlobal,
1022
+ palette
1023
+ })),
1024
+ fallbackError: result.error
1054
1025
  };
1055
1026
  }
1056
- /**
1057
- * A trigger's text or icon at rest, hovered, open, and open and hovered. A state
1058
- * is only measured when it paints a fill or a colour of its own.
1059
- */
1060
- function interactionInks(place, token, threshold, declared, backdrops, palette) {
1061
- const resting = stateInk({
1062
- place,
1063
- backdrop: backdrops.root
1064
- }, token, threshold, true, palette);
1065
- const hoverThreshold = Math.min(threshold, HOVER_TEXT_THRESHOLD);
1066
- const state = (name, required) => backdrops.fills[name] || declared[name] !== void 0 ? stateInk({
1067
- place: `${place} ${name}`,
1068
- backdrop: backdrops[name]
1069
- }, declared[name] ?? resting.ink, required, declared[name] !== void 0, palette) : null;
1070
- const hover = state("hover", hoverThreshold);
1071
- const open = state("open", threshold);
1072
- const openHover = hover && open ? openHoverInk(place, resting, hover, open, backdrops.openHover, hoverThreshold, palette) : null;
1027
+ function runtimeFallbackColours(fallback) {
1028
+ if (fallback.ok) return {
1029
+ colours: fallback.states,
1030
+ focusIndicator: fallback.focusIndicator,
1031
+ nonColourEffects: fallback.nonColourEffects
1032
+ };
1033
+ const colour = {
1034
+ kind: "surface",
1035
+ role: "link",
1036
+ backgroundCss: "transparent",
1037
+ foregroundCss: surfaceForegroundValue("link")
1038
+ };
1073
1039
  return {
1074
- inks: {
1075
- resting: resting.ink,
1076
- ...emitted("hover", hover),
1077
- ...emitted("open", open),
1078
- ...emitted("openHover", openHover)
1040
+ colours: {
1041
+ base: colour,
1042
+ hover: colour,
1043
+ focus: colour,
1044
+ active: colour,
1045
+ disabled: colour
1046
+ },
1047
+ focusIndicator: {
1048
+ kind: "surface-role",
1049
+ colorCss: colour.foregroundCss,
1050
+ minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
1079
1051
  },
1080
- ...certified([
1081
- resting,
1082
- hover,
1083
- open,
1084
- openHover
1085
- ])
1052
+ nonColourEffects: {}
1086
1053
  };
1087
1054
  }
1055
+ /** Pick the highest-priority variant whose role we'll alias to `.default`. */
1056
+ function resolveAliasSource(enabled) {
1057
+ if (enabled.some((v) => v.id === "default")) return null;
1058
+ return enabled.slice().sort((a, b) => a.priority - b.priority)[0] ?? null;
1059
+ }
1060
+ function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colours, focusIndicator, nonColourEffects) {
1061
+ const out = [];
1062
+ const variantId = parseButtonVariantIdForCss(variant.id);
1063
+ const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
1064
+ out.push(variantBaseRule(variant, selector, tokens, colours.base));
1065
+ out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
1066
+ for (const state of [
1067
+ "hover",
1068
+ "focus",
1069
+ "active"
1070
+ ]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens));
1071
+ const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
1072
+ if (effects) out.push({ raw: effects });
1073
+ out.push(...variantStateTransformRules(variant, selector));
1074
+ out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator));
1075
+ const affordance = variantAffordanceRule(variant, selector);
1076
+ if (affordance) out.push(affordance);
1077
+ out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens));
1078
+ out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
1079
+ out.push(...variantStateSizeRules(variant, variantId, themeId));
1080
+ return out;
1081
+ }
1088
1082
  /**
1089
- * Open and hovered, the open rule wins over the hover rule, which wins over the
1090
- * resting colour; the pair is only measured when it isn't one already measured.
1083
+ * Emit the optional trailing affordance icon as a masked `::after`.
1084
+ *
1085
+ * Only variants that declare `affordance` with a known icon id produce a rule —
1086
+ * every other variant is byte-identical to before. The `:not(.rb-affordance-off)`
1087
+ * guard lets a `button` node that renders its own trailing icon suppress this
1088
+ * one. The mask uses `currentColor`, so the icon always shares the canonical
1089
+ * button foreground.
1091
1090
  */
1092
- function openHoverInk(place, resting, hover, open, backdrop, threshold, palette) {
1093
- const shown = [open, hover].find(({ emit }) => emit)?.ink ?? resting.ink;
1094
- return [hover, open].some(({ ink, paint }) => ink === shown && paint?.backdrop === backdrop) ? null : stateInk({
1095
- place: `${place} open hover`,
1096
- backdrop
1097
- }, shown, threshold, false, palette);
1091
+ function variantAffordanceRule(variant, selector) {
1092
+ const affordance = variant.affordance;
1093
+ if (!affordance) return null;
1094
+ const maskUrl = affordanceIconMaskUrl(affordance.iconId);
1095
+ if (!maskUrl) return null;
1096
+ const mask = `url("${maskUrl}") no-repeat center / contain`;
1097
+ return rule$1(`${selector}:not(.${AFFORDANCE_SUPPRESS_CLASS})::after`, [
1098
+ ["content", "\"\""],
1099
+ ["display", "inline-block"],
1100
+ ["width", "1em"],
1101
+ ["height", "1em"],
1102
+ ["margin-inline-start", "0.5em"],
1103
+ ["flex", "0 0 auto"],
1104
+ ["background-color", "currentColor"],
1105
+ ["-webkit-mask", mask],
1106
+ ["mask", mask]
1107
+ ]);
1098
1108
  }
1099
- /** A colour certified on the backdrop it shows; it needs its own rule when declared or when it fell back. */
1100
- function stateInk({ place, backdrop }, ink, threshold, declared, palette) {
1101
- if (!backdrop) return {
1102
- ink,
1103
- emit: declared,
1104
- unmeasured: place
1105
- };
1106
- const paint = certifyPaint(place, ink, threshold, backdrop, { palette });
1107
- return {
1108
- ink: paint.ink,
1109
- emit: declared || paint.fallback,
1110
- paint
1111
- };
1109
+ function parseButtonVariantIdForCss(value) {
1110
+ const variantId = parseThemeButtonVariantId(value);
1111
+ if (!variantId) throw new Error("Button variant id must be a non-empty string");
1112
+ return variantId;
1112
1113
  }
1113
- function emitted(key, state) {
1114
- return state?.emit ? { [key]: state.ink } : {};
1114
+ function variantBaseRule(variant, selector, tokens, colour) {
1115
+ const appearance = variant.visualStates?.base;
1116
+ if (!appearance) throw new Error("Button appearance must be materialized before CSS emission");
1117
+ const border = buttonBorder(appearance.border, tokens);
1118
+ return rule$1(selector, [
1119
+ ...buttonTypographyDeclarations(appearance.typography),
1120
+ ...STRUCTURAL_DECLARATIONS,
1121
+ ["border-radius", buttonRadius(appearance.borderRadius)],
1122
+ ["box-shadow", buttonShadow(appearance.shadow, tokens)],
1123
+ ...resolvedButtonColourDeclarations(colour, {
1124
+ role: variant.id,
1125
+ state: "base"
1126
+ }),
1127
+ ["outline", actionVariableFallback(variant.id, "base", "outline", buttonRingDefaults(variant).outline)],
1128
+ ["outline-offset", actionVariableFallback(variant.id, "base", "outline-offset", buttonRingDefaults(variant).offset)],
1129
+ ...border === null ? [] : [["border", border]]
1130
+ ]);
1115
1131
  }
1116
- function certified(states) {
1117
- const shown = states.filter((state) => state !== null);
1118
- return {
1119
- paints: shown.flatMap(({ paint }) => paint ? [paint] : []),
1120
- unmeasured: shown.flatMap(({ unmeasured }) => unmeasured ? [unmeasured] : [])
1121
- };
1132
+ /**
1133
+ * Resolve a colour for a button that does not own its own background.
1134
+ *
1135
+ * The surface contract is populated by section/card/modal treatments. The
1136
+ * token fallback keeps buttons usable in contexts that do not provide that
1137
+ * contract (and preserves the existing theme behaviour there).
1138
+ */
1139
+ function variantStateColourRule(variant, variantId, themeId, state, colour, tokens) {
1140
+ const baseSelector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
1141
+ return rule$1(state === "hover" ? [`${baseSelector}:hover`, `${baseSelector}[data-force-hover="true"]`] : `${baseSelector}:${state}`, [...resolvedButtonColourDeclarations(colour, {
1142
+ role: variantId,
1143
+ state
1144
+ }), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens) : []]);
1122
1145
  }
1123
- //#endregion
1124
- //#region ../theme-core/src/header/dropdownSurface.ts
1125
- /** How strongly a menu link's hover and active fills tint the menu, as a percentage. */
1126
- const DROPDOWN_LINK_FILL_OPACITY = {
1127
- hover: 12,
1128
- active: 18
1129
- };
1130
- const LINK_STATES = Object.keys(DROPDOWN_LINK_FILL_OPACITY);
1131
- function resolveHeaderDropdownForeground(header, theme) {
1132
- const style = contextualDropdownStyle(header);
1133
- const backgroundToken = style?.background ?? "surface";
1134
- const candidate = dropdownTextCandidate(style, header);
1135
- const palette = expandPalette(theme.palette);
1136
- const foreground = resolveSurfaceForeground({
1137
- type: "color",
1138
- color: backgroundToken,
1139
- textColor: candidate
1140
- }, palette);
1141
- const text = foreground.kind === "known" ? foreground.roles.text : candidate;
1142
- const fill = style?.hoverBackground === void 0 ? text : style.hoverBackground;
1143
- const menu = foreground.kind === "known" && foreground.provenance.kind === "measured" ? foreground.provenance.backdropHex : null;
1144
- return {
1145
- style,
1146
- backgroundToken,
1147
- candidate,
1148
- foreground,
1149
- textToken: inkReference(text),
1150
- linkFill: fill === null ? null : inkReference(fill),
1151
- ...linkInks(style, text, fill, menu, palette)
1146
+ function variantFocusVisibleRule(variantId, themeId, focusIndicator) {
1147
+ return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator, variantId));
1148
+ }
1149
+ function variantEffectsCss(variant, effects, themeId, tokens, theme) {
1150
+ if (!effects) return "";
1151
+ const background = variant.visualStates?.base.background ?? variant.background;
1152
+ const elementConfig = {
1153
+ background: background.type === "surface" ? { type: "transparent" } : background,
1154
+ shadow: variant.visualStates?.base.shadow ?? variant.shadow
1152
1155
  };
1156
+ return generateEffectsCSS({
1157
+ themeId,
1158
+ variantId: variant.id,
1159
+ effects,
1160
+ elementConfig,
1161
+ tokens,
1162
+ theme
1163
+ });
1153
1164
  }
1154
- /** A translucent menu keeps its declared hover text, unmeasured; an opaque one certifies each state. */
1155
- function linkInks(style, text, fill, menu, palette) {
1156
- const declared = style?.hoverTextColor || void 0;
1157
- return isTranslucent(style) ? {
1158
- linkText: declared ? { hover: declared } : {},
1159
- linkPaints: [],
1160
- linkUnmeasured: LINK_STATES.map(linkPlace)
1161
- } : certifyLinkText(declared ?? text, declared !== void 0, fill, menu, palette);
1165
+ function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
1166
+ const base = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
1167
+ const disabledSelectors = [
1168
+ base,
1169
+ `${base}:hover`,
1170
+ `${base}:active`,
1171
+ `${base}:focus`
1172
+ ];
1173
+ const pseudoSelectors = [`${base}::before`, `${base}::after`];
1174
+ return [rule$1(disabledSelectors, [
1175
+ ...resolvedButtonColourDeclarations(colour, {
1176
+ role: variantId,
1177
+ state: "disabled"
1178
+ }),
1179
+ ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, true) : [],
1180
+ ...RESOLVED_BUTTON_DISABLED_DECLARATIONS
1181
+ ]), rule$1(pseudoSelectors, [
1182
+ ["opacity", "0"],
1183
+ ["animation", "none"],
1184
+ ["pointer-events", "none"]
1185
+ ])];
1162
1186
  }
1163
- const linkPlace = (state) => `header menu link ${state}`;
1164
- function isTranslucent(style) {
1165
- return style?.surfaceTreatment?.kind === "frosted" && style.surfaceTreatment.opacity < 1;
1187
+ /** Explicit rest transforms follow hover effects so :active can return to rest. */
1188
+ function variantStateTransformRules(variant, selector) {
1189
+ return [
1190
+ "hover",
1191
+ "focus",
1192
+ "active"
1193
+ ].flatMap((state) => {
1194
+ const transform = variant.visualStates?.[state].transform;
1195
+ return transform ? [rule$1(`${selector}:${state}`, [["transform", transform]])] : [];
1196
+ });
1166
1197
  }
1167
- /** Each state's text certified on the menu tinted by its fill; nothing is measured when the menu or the fill can't be. */
1168
- function certifyLinkText(ink, declared, fill, menu, palette) {
1169
- const fillHex = fill === null || !menu ? null : resolveOpaqueSurfaceHex(fill, palette, menu);
1170
- const tinted = (state) => fill === null ? menu : fillHex && menu ? compositeHex(fillHex, DROPDOWN_LINK_FILL_OPACITY[state] / 100, menu) : null;
1171
- const states = LINK_STATES.map((state) => {
1172
- const backdrop = tinted(state);
1173
- const required = state === "hover" ? HOVER_TEXT_THRESHOLD : contrastThresholdByPolicy["body-aa"];
1174
- return {
1175
- state,
1176
- paint: backdrop ? certifyPaint(linkPlace(state), ink, required, backdrop, { palette }) : null
1177
- };
1198
+ function variantSizeRules(variant, variantId, themeSizes, themeId) {
1199
+ const border = variant.visualStates?.base.border ?? variant.border;
1200
+ const borderWidth = border && border !== "none" ? BORDER_WIDTH_MAP[border.widthClass] || "1px" : "0px";
1201
+ return BUTTON_SIZE_NAMES.map((sizeName) => {
1202
+ const config = resolveSizeConfig(variant, sizeName, themeSizes);
1203
+ return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, sizeName)}`, [
1204
+ ...paddingDeclarations(config.padding, borderWidth),
1205
+ ...config.fontSize ? [["font-size", FONT_SIZE_MAP[config.fontSize] || "1rem"]] : [],
1206
+ ...config.borderRadius ? [["border-radius", buttonRadius(config.borderRadius)]] : []
1207
+ ]);
1178
1208
  });
1179
- return {
1180
- linkText: Object.fromEntries(states.flatMap(({ state, paint }) => declared || paint?.fallback ? [[state, inkReference(paint?.ink ?? ink)]] : [])),
1181
- linkPaints: states.flatMap(({ paint }) => paint ? [paint] : []),
1182
- linkUnmeasured: states.flatMap(({ state, paint }) => paint ? [] : [linkPlace(state)])
1183
- };
1184
1209
  }
1185
- /** Reuse the header's decided opening tone; unknown openings retain opaque paint. */
1186
- function contextualDropdownStyle(header) {
1187
- const style = header.dropdownStyle;
1188
- const treatment = style?.surfaceTreatment;
1189
- if (!style || treatment?.kind !== "frosted" || treatment.tone !== "opening") return style;
1190
- const tone = readOpeningToneProjection(header);
1191
- if (!tone) return {
1192
- ...style,
1193
- surfaceTreatment: { kind: "solid" }
1210
+ function variantStateSizeRules(variant, variantId, themeId) {
1211
+ const states = variant.visualStates;
1212
+ if (!states) return [];
1213
+ const width = (border) => border === "none" ? "0px" : BORDER_WIDTH_MAP[border.widthClass] || "1px";
1214
+ return [
1215
+ "hover",
1216
+ "focus",
1217
+ "active",
1218
+ "disabled"
1219
+ ].flatMap((state) => BUTTON_SIZE_NAMES.flatMap((size) => {
1220
+ const base = states.base.sizes[size];
1221
+ const target = states[state].sizes[size];
1222
+ const declarations = stateSizeDeclarations(base, target, width(states.base.border), width(states[state].border), states.base.borderRadius, states[state].borderRadius);
1223
+ if (declarations.length === 0) return [];
1224
+ const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, size)}`;
1225
+ return [rule$1(state === "hover" ? [`${selector}:hover`, `${selector}[data-force-hover="true"]`] : `${selector}:${state}`, declarations)];
1226
+ }));
1227
+ }
1228
+ /** Size radius overrides remain owned by each state, just like padding and type. */
1229
+ function stateSizeDeclarations(base, target, baseWidth, targetWidth, baseRadius, targetRadius) {
1230
+ const originalRadius = buttonRadius(base.borderRadius ?? baseRadius);
1231
+ const radius = buttonRadius(target.borderRadius ?? targetRadius);
1232
+ const radiusChanges = originalRadius === radius ? [] : [["border-radius", radius]];
1233
+ if (base.padding === target.padding && base.fontSize === target.fontSize && baseWidth === targetWidth) return radiusChanges;
1234
+ return [
1235
+ ...paddingDeclarations(target.padding, targetWidth),
1236
+ ...target.fontSize ? [["font-size", FONT_SIZE_MAP[target.fontSize] || "1rem"]] : [],
1237
+ ...radiusChanges
1238
+ ];
1239
+ }
1240
+ /** Layout contexts do not change a recipe: grouped actions share its ordinary box. */
1241
+ function generateButtonActionLayoutCss(options) {
1242
+ const system = options.buttonSystem ?? generateDefaultButtonSystem(options.theme);
1243
+ const themeSizes = {
1244
+ ...DEFAULT_BUTTON_SIZES,
1245
+ ...system.sizes
1194
1246
  };
1195
- const textColor = tone === "dark" ? "neutral-50" : "neutral-950";
1247
+ const primary = system.variants.find((variant) => variant.enabled && variant.id === "primary") ?? system.variants.filter((variant) => variant.enabled).sort((a, b) => a.priority - b.priority)[0];
1248
+ if (!primary) return "";
1249
+ const appearance = materializeRuntimeButtonAppearance(primary, system.global, options.theme, themeSizes).visualStates.base;
1250
+ const prefix = `:where([data-theme-scope="${options.themeId}"]) .cta-row:has(> :nth-child(2))`;
1251
+ return BUTTON_SIZE_NAMES.map((size) => {
1252
+ const config = appearance.sizes[size];
1253
+ const fontSize = config.fontSize ?? appearance.typography.fontSize;
1254
+ return rule$1([`${prefix} .rb-item-text-link.btn-${size}`, ...primary.id !== "ghost" && system.variants.some((variant) => variant.enabled && variant.id === "ghost") ? [`${prefix} .ghost.btn-${size}`] : []], [
1255
+ ...paddingDeclarations(config.padding, "0px"),
1256
+ ["display", "inline-flex"],
1257
+ ["align-items", "center"],
1258
+ ...fontSize ? [["font-size", FONT_SIZE_MAP[fontSize] || "1rem"]] : []
1259
+ ]);
1260
+ }).map(renderChunk).join("\n");
1261
+ }
1262
+ /**
1263
+ * Resolve the size config for a variant at a given size.
1264
+ *
1265
+ * Falls through: variant override → theme.sizes → DEFAULT_BUTTON_SIZES.
1266
+ */
1267
+ function resolveSizeConfig(variant, sizeName, themeSizes) {
1268
+ if (variant.visualStates) return variant.visualStates.base.sizes[sizeName];
1269
+ const variantOverride = variant.sizes?.[sizeName];
1270
+ const themeDefault = themeSizes[sizeName];
1196
1271
  return {
1197
- ...style,
1198
- background: tone === "dark" ? "neutral-950" : "neutral-50",
1199
- textColor,
1200
- hoverBackground: textColor,
1201
- borderColor: null
1272
+ padding: variantOverride?.padding ?? themeDefault.padding,
1273
+ fontSize: variantOverride?.fontSize ?? themeDefault.fontSize
1202
1274
  };
1203
1275
  }
1204
- /** Menu text wins; only an absent preference falls back to the header's ink. */
1205
- function dropdownTextCandidate(style, header) {
1206
- return style?.textColor ?? ((header.navColor ?? header.textColor)?.trim() || "text");
1207
- }
1208
- //#endregion
1209
- //#region ../theme-core/src/runtime/fontFamily.ts
1210
1276
  /**
1211
- * Font Family Formatting Utilities
1277
+ * Emit padding declarations for a variant at one size, accounting for border
1278
+ * compensation so bordered and borderless variants render at identical outer
1279
+ * dimensions.
1212
1280
  *
1213
- * Handles parsing and formatting font family strings for CSS output.
1214
- * Supports font stacks, proper quoting, and generic CSS families.
1281
+ * The schema (`paddingShorthandSchema`) guarantees exactly two tokens so the
1282
+ * destructure is total.
1215
1283
  */
1216
- /** CSS generic font families that should never be quoted */
1217
- const GENERIC_CSS_FAMILIES = [
1218
- "serif",
1219
- "sans-serif",
1220
- "monospace",
1221
- "cursive",
1222
- "fantasy",
1223
- "system-ui"
1224
- ];
1284
+ function buttonRingDefaults(variant) {
1285
+ const border = variant.visualStates?.base.border ?? variant.border;
1286
+ return border && border !== "none" && border.ring ? {
1287
+ outline: "1px solid var(--rb-surface-mark-color, var(--rb-surface-link-color, currentColor))",
1288
+ offset: "3px"
1289
+ } : {
1290
+ outline: "none",
1291
+ offset: "0px"
1292
+ };
1293
+ }
1294
+ //#endregion
1295
+ //#region ../theme-core/src/accordions/types.ts
1225
1296
  /**
1226
- * Check if a font name is a generic CSS family (e.g., "sans-serif", "monospace")
1297
+ * Icon configuration mapping icon styles to Lucide icons and behavior
1298
+ * Used by both CSS generation (for rotation) and component rendering (for icon selection)
1227
1299
  */
1228
- function isGenericFamily(font) {
1229
- return GENERIC_CSS_FAMILIES.includes(font.toLowerCase());
1230
- }
1300
+ const ICON_CONFIG = {
1301
+ "plus-minus": {
1302
+ closedIcon: "Plus",
1303
+ openIcon: "Minus",
1304
+ rotation: 0
1305
+ },
1306
+ "chevron": {
1307
+ closedIcon: "ChevronDown",
1308
+ rotation: 180
1309
+ },
1310
+ "caret": {
1311
+ closedIcon: "ChevronDown",
1312
+ rotation: 180
1313
+ },
1314
+ "arrow": {
1315
+ closedIcon: "ArrowDown",
1316
+ rotation: 180
1317
+ },
1318
+ "circle-plus-minus": {
1319
+ closedIcon: "CirclePlus",
1320
+ openIcon: "CircleMinus",
1321
+ rotation: 0
1322
+ }
1323
+ };
1231
1324
  /**
1232
- * Quote a font name if it contains spaces, unless it's a generic CSS family.
1233
- * Strips existing quotes before processing.
1234
- *
1235
- * @returns The formatted font name, or null if empty
1325
+ * Icon size mapping (px values for CSS and Lucide React)
1236
1326
  */
1237
- function quoteFontIfNeeded(rawFont) {
1238
- const font = rawFont.trim().replace(/^["']|["']$/g, "");
1239
- if (!font) return null;
1240
- if (isGenericFamily(font)) return font;
1241
- return /\s/.test(font) ? `"${font}"` : font;
1242
- }
1327
+ const ICON_SIZE_PX = {
1328
+ sm: "16px",
1329
+ md: "20px",
1330
+ lg: "24px"
1331
+ };
1243
1332
  /**
1244
- * Format a font family string for CSS output.
1245
- *
1246
- * Handles:
1247
- * - Single font names (quoted if needed)
1248
- * - Font stacks (comma-separated, each font quoted individually if needed)
1249
- * - Generic CSS families (never quoted)
1250
- * - Appends fallback if not already present
1251
- *
1252
- * @param family - Font family string (e.g., "Open Sans" or "Open Sans, Helvetica, sans-serif")
1253
- * @param fallback - Fallback font family (default: "sans-serif")
1254
- * @returns CSS-ready font-family value
1255
- *
1256
- * @example
1257
- * formatFontFamily("Open Sans") // '"Open Sans", sans-serif'
1258
- * formatFontFamily("Inter") // 'Inter, sans-serif'
1259
- * formatFontFamily("Open Sans, Helvetica, sans-serif") // '"Open Sans", Helvetica, sans-serif'
1260
- * formatFontFamily("") // 'sans-serif'
1333
+ * Spacing map for accordion content padding
1261
1334
  */
1262
- function formatFontFamily(family, fallback = "sans-serif") {
1263
- const trimmed = (family || "").trim();
1264
- if (!trimmed) return fallback;
1265
- const fonts = trimmed.split(",").map(quoteFontIfNeeded).filter((f) => f !== null);
1266
- if (!fonts.some((f) => f === fallback || f === `"${fallback}"`)) fonts.push(fallback);
1267
- return fonts.join(", ");
1268
- }
1269
- //#endregion
1270
- //#region ../theme-core/src/palette/generateCssVars.ts
1335
+ const ACCORDION_SPACING_MAP = {
1336
+ none: "0",
1337
+ compact: "0.75rem",
1338
+ cozy: "1rem",
1339
+ medium: "1.25rem",
1340
+ comfortable: "1.5rem",
1341
+ spacious: "2rem"
1342
+ };
1271
1343
  /**
1272
- * Generates CSS variables for a palette
1273
- *
1274
- * @param palette - The palette to generate CSS variables for
1275
- * @returns
1344
+ * Question (trigger) font-size by scale step. Kept as self-contained clamps
1345
+ * rather than the heading-scale CSS vars so question size stays predictable
1346
+ * even when a theme configures very large headings.
1276
1347
  */
1277
- function generateCssVars(palette) {
1278
- const cssVars = {};
1279
- Object.entries(palette).forEach(([key, value]) => {
1280
- if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
1281
- const { r, g, b } = hexToRgb(value);
1282
- cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
1283
- });
1284
- return cssVars;
1285
- }
1348
+ const ACCORDION_TRIGGER_FONT_SCALE = {
1349
+ body: "clamp(0.95rem, var(--fs-body), 1.0625rem)",
1350
+ md: "clamp(1.0625rem, 0.98rem + 0.45vw, 1.3rem)",
1351
+ lg: "clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem)"
1352
+ };
1353
+ const ACCORDION_TRIGGER_LETTER_SPACING = {
1354
+ normal: "0",
1355
+ tight: "-0.01em",
1356
+ wide: "0.04em"
1357
+ };
1358
+ const ACCORDION_OPEN_ACCENT_THICKNESS = {
1359
+ thin: "2px",
1360
+ medium: "3px",
1361
+ thick: "4px"
1362
+ };
1286
1363
  //#endregion
1287
1364
  //#region ../theme-core/src/styles/border.ts
1288
1365
  /**
@@ -1517,6 +1594,44 @@ function accordionPaintInks(theme, color, policy) {
1517
1594
  }, palette), policy ?? "withhold")).map((rule) => rule.replace(/;$/, ""));
1518
1595
  }
1519
1596
  //#endregion
1597
+ //#region ../theme-core/src/inputs/types.ts
1598
+ /**
1599
+ * Spacing map for input padding
1600
+ */
1601
+ const INPUT_SPACING_MAP = {
1602
+ compact: "0.5rem 0.75rem",
1603
+ cozy: "0.625rem 0.875rem",
1604
+ medium: "0.75rem 1rem",
1605
+ comfortable: "0.875rem 1.25rem"
1606
+ };
1607
+ /**
1608
+ * Font size map for inputs
1609
+ */
1610
+ const INPUT_FONT_SIZE_MAP = {
1611
+ sm: "0.875rem",
1612
+ base: "1rem",
1613
+ lg: "1.125rem"
1614
+ };
1615
+ /**
1616
+ * Label font size map
1617
+ */
1618
+ const LABEL_FONT_SIZE_MAP = {
1619
+ "2xs": "0.625rem",
1620
+ xs: "0.75rem",
1621
+ sm: "0.875rem",
1622
+ base: "1rem"
1623
+ };
1624
+ /**
1625
+ * Font weight map
1626
+ */
1627
+ const FONT_WEIGHT_MAP = {
1628
+ regular: "400",
1629
+ medium: "500",
1630
+ semibold: "600",
1631
+ bold: "700",
1632
+ black: "800"
1633
+ };
1634
+ //#endregion
1520
1635
  //#region ../theme-core/src/inputs/generateInputCss.ts
1521
1636
  /**
1522
1637
  * Corner radius map (reused from other systems)
@@ -1752,6 +1867,42 @@ function generateDefaultInputSystem(theme) {
1752
1867
  };
1753
1868
  }
1754
1869
  //#endregion
1870
+ //#region ../theme-core/src/shared/componentStyles.ts
1871
+ /**
1872
+ * Get border width in pixels for CSS generation.
1873
+ *
1874
+ * Width mapping:
1875
+ * - none: 0
1876
+ * - hairline: 1px
1877
+ * - thin: 2px
1878
+ * - medium: 3px
1879
+ * - thick: 4px
1880
+ */
1881
+ function getComponentBorderWidthPx(width) {
1882
+ return {
1883
+ none: "0",
1884
+ hairline: "1px",
1885
+ thin: "2px",
1886
+ medium: "3px",
1887
+ thick: "4px"
1888
+ }[width];
1889
+ }
1890
+ /**
1891
+ * Get CSS variable reference for shadow elevation.
1892
+ * Returns null for 'none' elevation.
1893
+ *
1894
+ * Maps directly to CSS variables generated by the theme:
1895
+ * - sm: var(--shadow-sm)
1896
+ * - md: var(--shadow-md)
1897
+ * - lg: var(--shadow-lg)
1898
+ * - xl: var(--shadow-xl)
1899
+ * - 2xl: var(--shadow-2xl)
1900
+ */
1901
+ function getComponentShadowVar(elevation) {
1902
+ if (elevation === "none") return null;
1903
+ return `var(--shadow-${elevation})`;
1904
+ }
1905
+ //#endregion
1755
1906
  //#region ../theme-core/src/responsive/mediaQuery.ts
1756
1907
  /**
1757
1908
  * Convert familiar viewport media queries to container queries when safe.
@@ -1846,6 +1997,152 @@ const NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES = [
1846
1997
  `transform: translateX(var(--nav-dropdown-shift-x, 0px));`
1847
1998
  ];
1848
1999
  //#endregion
2000
+ //#region ../theme-core/src/header/paintTargets.ts
2001
+ /** Resolve the element that owns the visible header surface for each layout. */
2002
+ function getHeaderPaintTargets(variant, themeId, state = "base") {
2003
+ const scope = `:where([data-theme-scope="${themeId}"])`;
2004
+ const scrolledRoot = state === "scrolled" ? ".header-root.header-scrolled " : "";
2005
+ if (variant === "floating") {
2006
+ if (state === "scrolled") {
2007
+ const desktopOwner = `${scope} ${scrolledRoot}.header-floating-container`;
2008
+ const mobileOwner = `${scope} ${scrolledRoot}.header-mobile-bar`;
2009
+ return [{
2010
+ kind: "viewport-band",
2011
+ clipSelector: `${scope}:has(.header-root.header-scrolled)`,
2012
+ ownerSelector: desktopOwner,
2013
+ selector: `${desktopOwner}::before`,
2014
+ mediaQuery: MQ_MD_UP,
2015
+ extent: {
2016
+ top: {
2017
+ customProperty: "--rb-header-floating-top-gap",
2018
+ value: "1rem",
2019
+ ownerProperty: "top"
2020
+ },
2021
+ bottom: {
2022
+ customProperty: "--rb-header-floating-bottom-extension",
2023
+ value: "0.75rem"
2024
+ }
2025
+ },
2026
+ ownerNeedsPositioning: false
2027
+ }, {
2028
+ kind: "viewport-band",
2029
+ clipSelector: `${scope}:has(.header-root.header-scrolled)`,
2030
+ ownerSelector: mobileOwner,
2031
+ selector: `${mobileOwner}::before`,
2032
+ mediaQuery: MQ_MD_DOWN,
2033
+ extent: {
2034
+ top: {
2035
+ customProperty: "--rb-header-floating-top-gap",
2036
+ value: "0.75rem",
2037
+ ownerProperty: "margin-top"
2038
+ },
2039
+ bottom: {
2040
+ customProperty: "--rb-header-floating-bottom-extension",
2041
+ value: "0.75rem"
2042
+ }
2043
+ },
2044
+ ownerNeedsPositioning: true
2045
+ }];
2046
+ }
2047
+ return [{
2048
+ kind: "element-box",
2049
+ selector: `${scope} ${scrolledRoot}.header-floating-container`,
2050
+ mediaQuery: MQ_MD_UP
2051
+ }, {
2052
+ kind: "element-box",
2053
+ selector: `${scope} ${scrolledRoot}.header-mobile-bar`,
2054
+ mediaQuery: MQ_MD_DOWN
2055
+ }];
2056
+ }
2057
+ return [{
2058
+ kind: "element-box",
2059
+ selector: `${scope} .header-root${state === "scrolled" ? ".header-scrolled" : ""}::before`,
2060
+ pseudoElement: "inset"
2061
+ }];
2062
+ }
2063
+ function renderHeaderPaintTargetRules(targets, rules) {
2064
+ return targets.map((target) => {
2065
+ const block = renderHeaderPaintTargetRule(target, rules);
2066
+ return target.mediaQuery ? `@media ${target.mediaQuery} {\n${block}\n}` : block;
2067
+ }).join("\n");
2068
+ }
2069
+ function renderHeaderPaintTargetRule(target, rules) {
2070
+ switch (target.kind) {
2071
+ case "element-box": {
2072
+ const pseudoElementSetup = target.pseudoElement === "inset" ? [
2073
+ "content: \"\";",
2074
+ "position: absolute;",
2075
+ "inset: 0;",
2076
+ "pointer-events: none;",
2077
+ "border-radius: inherit;",
2078
+ "z-index: -1;"
2079
+ ] : [];
2080
+ return `${target.pseudoElement === "inset" ? headerPaintOwnerInks(target.selector.replace(/::before$/, ""), rules) : ""}${target.selector} {\n ${[...pseudoElementSetup, ...rules].join("\n ")}\n}`;
2081
+ }
2082
+ case "viewport-band": return renderViewportBandPaint(target, rules);
2083
+ }
2084
+ }
2085
+ function headerInkRules(rules) {
2086
+ return rules.filter((rule) => Object.values(SURFACE_INK_CSS_VARS).some((variable) => rule.startsWith(`${variable}:`)));
2087
+ }
2088
+ function headerPaintOwnerInks(selector, rules) {
2089
+ const inks = headerInkRules(rules);
2090
+ return inks.length === 0 ? "" : `${selector} {\n ${inks.join("\n ")}\n}\n`;
2091
+ }
2092
+ /** Viewport paint stays on its pseudo-element; inherited ink belongs to the content owner. */
2093
+ function renderViewportBandPaint(target, rules) {
2094
+ const { top, bottom } = target.extent;
2095
+ const ownerRules = [
2096
+ `${top.customProperty}: ${top.value};`,
2097
+ `${bottom.customProperty}: ${bottom.value};`,
2098
+ `${top.ownerProperty}: var(${top.customProperty});`,
2099
+ ...target.ownerNeedsPositioning ? ["position: relative;"] : [],
2100
+ "isolation: isolate;",
2101
+ "background: none;",
2102
+ "backdrop-filter: none;",
2103
+ "-webkit-backdrop-filter: none;",
2104
+ "border: 0;",
2105
+ "box-shadow: none;",
2106
+ ...headerInkRules(rules)
2107
+ ];
2108
+ const bandRules = [
2109
+ "content: \"\";",
2110
+ "position: absolute;",
2111
+ `top: calc(-1 * var(${top.customProperty}));`,
2112
+ `bottom: calc(-1 * var(${bottom.customProperty}));`,
2113
+ "left: 50%;",
2114
+ "width: 100vw;",
2115
+ "transform: translateX(-50%);",
2116
+ "pointer-events: none;",
2117
+ "border-radius: 0;",
2118
+ "z-index: -1;",
2119
+ ...rules
2120
+ ];
2121
+ return `${target.clipSelector} {\n overflow-x: clip;\n}\n${target.ownerSelector} {\n ${ownerRules.join("\n ")}\n}\n${target.selector} {\n ${bandRules.join("\n ")}\n}`;
2122
+ }
2123
+ //#endregion
2124
+ //#region ../theme-core/src/header/scrollTreatment.ts
2125
+ const CONTRAST_GLASS_BLUR = "blur(12px)";
2126
+ function generateMobileOverlayBackdropFilterFix(themeId, variant) {
2127
+ const root = `:where([data-theme-scope="${themeId}"]) .header-root:has([data-nav-mobile-overlay][aria-hidden="false"])`;
2128
+ return `\n${(variant === "floating" ? [`${root} .header-mobile-bar`, `${root} .header-mobile-bar::before`] : [`${root}::before`]).join(",\n")} {\n backdrop-filter: none !important;\n -webkit-backdrop-filter: none !important;\n}\n`;
2129
+ }
2130
+ function generateHeaderScrollTreatmentStyles(treatment, themeId, variant, surfaceRules = []) {
2131
+ if (!treatment) return "";
2132
+ switch (treatment.kind) {
2133
+ case "contrast-glass": {
2134
+ const backgroundChannels = treatment.backgroundTone === "dark" ? "0 0 0" : "255 255 255";
2135
+ return renderHeaderPaintTargetRules(getHeaderPaintTargets(variant, themeId, "scrolled"), [
2136
+ `background-color: rgb(${backgroundChannels} / 0.60);`,
2137
+ `backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
2138
+ `-webkit-backdrop-filter: ${CONTRAST_GLASS_BLUR};`,
2139
+ ...surfaceRules,
2140
+ ...surfaceInkDeclarations({ kind: "reset" }).map((rule) => rule.replace(";", " !important;"))
2141
+ ]);
2142
+ }
2143
+ }
2144
+ }
2145
+ //#endregion
1849
2146
  //#region ../theme-core/src/header/surfaceRules.ts
1850
2147
  /** Compile the at-rest surface independently of scroll treatment and paint geometry. */
1851
2148
  function buildHeaderSurfaceRules(header, tokens) {
@@ -2411,6 +2708,7 @@ const waveMaskSvgPaths = {
2411
2708
  classic: "M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z",
2412
2709
  balanced: "M0 72V42C120 24 240 24 360 42C480 60 600 60 720 42C840 24 960 24 1080 42C1200 60 1320 60 1440 42V72H0Z",
2413
2710
  gentle: "M0 72V43C180 32 300 32 480 43C660 54 780 54 960 43C1140 32 1260 32 1440 43V72H0Z",
2711
+ echo: "M0 72V44C180 34 320 29 500 40C680 51 800 55 970 45C1140 35 1270 31 1440 40V72H0Z",
2414
2712
  bold: "M0 72V44C90 14 270 14 360 44C450 74 630 74 720 44C810 14 990 14 1080 44C1170 74 1350 74 1440 44V72H0Z",
2415
2713
  drift: "M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z"
2416
2714
  };
@@ -2474,7 +2772,17 @@ function placementCss(boundary) {
2474
2772
  }
2475
2773
  function treatmentCss(boundary, entry) {
2476
2774
  const selected = `${boundary}[data-boundary-treatment='${entry.intent}']`;
2477
- return [rule(selected, [`--boundary-height: ${boundaryRuntimeMetricsForDecorativeTransition(entry.intent).heightCss};`]), rule(`${selected}::after`, shapeDeclarations(entry))];
2775
+ return [
2776
+ rule(selected, [`--boundary-height: ${boundaryRuntimeMetricsForDecorativeTransition(entry.intent).heightCss};`]),
2777
+ rule(`${selected}::after`, shapeDeclarations(entry)),
2778
+ ...entry.shape.kind === "wave" && entry.shape.echo ? [rule(`${selected}[data-boundary-placement='previous']::before`, [
2779
+ ...shapeDeclarations(entry),
2780
+ "content: '';",
2781
+ "bottom: 0;",
2782
+ "transform: translateY(-12%) scaleX(-1);",
2783
+ "opacity: 0.5;"
2784
+ ])] : []
2785
+ ];
2478
2786
  }
2479
2787
  function shapeDeclarations(entry) {
2480
2788
  switch (entry.shape.kind) {
@@ -5070,6 +5378,8 @@ function carouselShape(count, _arrangement) {
5070
5378
  return count <= 1 ? "static" : "carousel";
5071
5379
  }
5072
5380
  function arrangementCarouselSettings(props) {
5381
+ const autoAdvance = props.arrangement === "track" && props.autoAdvance === true;
5382
+ const indicator = autoAdvance ? "dots" : props.indicator;
5073
5383
  return {
5074
5384
  slidesToShow: props.arrangement === "slides" ? 1 : {
5075
5385
  mobile: 1,
@@ -5078,11 +5388,12 @@ function arrangementCarouselSettings(props) {
5078
5388
  },
5079
5389
  transition: "slide",
5080
5390
  showControls: true,
5081
- showDots: props.indicator === "dots",
5391
+ showDots: indicator === "dots",
5082
5392
  arrowVisibility: "always",
5083
- autoplay: false,
5393
+ autoplay: autoAdvance,
5084
5394
  autoplayDelay: 5e3,
5085
- loop: false
5395
+ loop: autoAdvance,
5396
+ indicator
5086
5397
  };
5087
5398
  }
5088
5399
  /** One owner for the region semantics on server, standalone client and SDK root. */
@@ -6065,7 +6376,7 @@ function IslandPropsScript({ value }) {
6065
6376
  * Avoid "fake" navigation controls here; users can scroll horizontally.
6066
6377
  */
6067
6378
  const CarouselNodeSSR = (props) => {
6068
- const settings = carouselSsrSettings(props);
6379
+ const { indicator, ...settings } = carouselSsrSettings(props);
6069
6380
  const slides = props.mode === "arrangement" ? props.slides : carouselContents(props).map((content) => ({
6070
6381
  title: "",
6071
6382
  content
@@ -6086,28 +6397,38 @@ const CarouselNodeSSR = (props) => {
6086
6397
  "data-show-controls": controlsEnabled ? "true" : "false",
6087
6398
  ...getIslandRootProps("carousel", props.blockId),
6088
6399
  children: [
6089
- /* @__PURE__ */ jsx(IslandPropsScript, { value: props.mode === "arrangement" ? {
6090
- ...settings,
6091
- mode: props.mode,
6092
- arrangement: props.arrangement,
6093
- labels: props.labels,
6094
- indicator: props.indicator,
6095
- slides: props.slides.map(({ title }) => ({ title })),
6096
- cardList: props.cardList
6097
- } : settings }),
6400
+ /* @__PURE__ */ jsx(IslandPropsScript, { value: carouselIslandValue(props, settings, indicator) }),
6098
6401
  /* @__PURE__ */ jsx(CarouselSsrFrame, {
6099
6402
  slides,
6100
6403
  transition: settings.transition,
6101
6404
  arrangement: props.arrangement
6102
6405
  }),
6103
6406
  props.mode === "arrangement" ? /* @__PURE__ */ jsx(CarouselSsrControls, {
6104
- props,
6105
- count: slides.length
6407
+ props: {
6408
+ ...props,
6409
+ indicator: indicator ?? props.indicator
6410
+ },
6411
+ count: slides.length,
6412
+ renderDots: settings.autoplay === true
6106
6413
  }) : null
6107
6414
  ]
6108
6415
  });
6109
6416
  };
6110
- function CarouselSsrControls({ props, count }) {
6417
+ /** What the client needs to hydrate as the server rendered; auto-advance is carried only when on. */
6418
+ function carouselIslandValue(props, settings, indicator) {
6419
+ if (props.mode !== "arrangement") return settings;
6420
+ return {
6421
+ ...settings,
6422
+ mode: props.mode,
6423
+ arrangement: props.arrangement,
6424
+ labels: props.labels,
6425
+ indicator,
6426
+ slides: props.slides.map(({ title }) => ({ title })),
6427
+ cardList: props.cardList,
6428
+ ...settings.autoplay ? { autoAdvance: true } : {}
6429
+ };
6430
+ }
6431
+ function CarouselSsrControls({ props, count, renderDots }) {
6111
6432
  return /* @__PURE__ */ jsxs("div", {
6112
6433
  "data-slot": "controls",
6113
6434
  hidden: true,
@@ -6119,6 +6440,21 @@ function CarouselSsrControls({ props, count }) {
6119
6440
  "aria-disabled": "true",
6120
6441
  children: "←"
6121
6442
  }),
6443
+ renderDots && props.indicator === "dots" ? /* @__PURE__ */ jsx("div", {
6444
+ className: "carousel-dots",
6445
+ role: "group",
6446
+ "aria-label": "Carousel navigation",
6447
+ "data-control": "dots",
6448
+ children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx("button", {
6449
+ type: "button",
6450
+ className: "carousel-dot",
6451
+ "data-control": "dot",
6452
+ "data-current": String(index === 0),
6453
+ "data-active": String(index === 0),
6454
+ "aria-current": index === 0 ? "true" : void 0,
6455
+ "aria-label": `Show ${props.labels.item} ${index + 1} of ${count}`
6456
+ }, index))
6457
+ }) : null,
6122
6458
  /* @__PURE__ */ jsx("button", {
6123
6459
  type: "button",
6124
6460
  "data-slot": "control",
@@ -6145,7 +6481,8 @@ function carouselSsrSettings(props) {
6145
6481
  arrowVisibility,
6146
6482
  autoplay,
6147
6483
  autoplayDelay,
6148
- loop
6484
+ loop,
6485
+ indicator: void 0
6149
6486
  };
6150
6487
  }
6151
6488
  function CarouselSsrFrame(props) {
@@ -6383,6 +6720,52 @@ function HeaderControlNode({ className, children, "aria-label": label, "aria-exp
6383
6720
  });
6384
6721
  }
6385
6722
  //#endregion
6723
+ //#region ../blocks/src/system/runtime/nodes/events/shared/ListGroup.tsx
6724
+ function listGroupPresentation(presentation) {
6725
+ return {
6726
+ lookSlots: presentation.lookSlots,
6727
+ surfacePresentation: presentation.surfacePresentation
6728
+ };
6729
+ }
6730
+ /**
6731
+ * Whether each group sits on its own panel, side by side ("A column per type").
6732
+ * Every renderer of grouped offerings frames its groups from this one answer.
6733
+ */
6734
+ function listGroupFrames(presentation) {
6735
+ const panels = presentation.cardArrangement === "type-columns";
6736
+ return {
6737
+ list: panels ? listLookSlot(presentation, "list") : {},
6738
+ panel: panels ? listLookSlot(presentation, "panel") : {}
6739
+ };
6740
+ }
6741
+ /**
6742
+ * One category inside a list section: an offering type, a service category.
6743
+ * Its heading is a subheading, so arranged markup marks the group with
6744
+ * `data-list-group`: the shared sheet sizes the heading below the section's,
6745
+ * and styles that decorate section headings leave it alone. A group whose
6746
+ * title is null shows only its intro, so a lone category under a section
6747
+ * heading doesn't name the same thing twice.
6748
+ */
6749
+ function ListGroup({ presentation, title, intro, Heading, sectionProps, children }) {
6750
+ const arranged = presentation.lookSlots !== void 0;
6751
+ const parts = /* @__PURE__ */ jsxs(Fragment, { children: [title !== null ? /* @__PURE__ */ jsx(Heading, {
6752
+ ...listLookSlot(presentation, "heading"),
6753
+ children: title
6754
+ }) : null, intro ? /* @__PURE__ */ jsx("p", {
6755
+ ...listLookSlot(presentation, "intro"),
6756
+ children: intro
6757
+ }) : null] });
6758
+ const head = title === null && !intro ? null : arranged ? /* @__PURE__ */ jsx("header", {
6759
+ ...listLookSlot(presentation, "head"),
6760
+ children: parts
6761
+ }) : parts;
6762
+ return /* @__PURE__ */ jsxs("section", {
6763
+ ...sectionProps,
6764
+ ...arranged ? { "data-list-group": "" } : {},
6765
+ children: [head, children]
6766
+ });
6767
+ }
6768
+ //#endregion
6386
6769
  //#region ../blocks/src/system/runtime/nodes/appointment-services.tsx
6387
6770
  const publicVenueSchema = z.object({
6388
6771
  name: z.string(),
@@ -6686,6 +7069,7 @@ function AppointmentServicesNode({ Carousel, preparedView, sectionHeading, categ
6686
7069
  const hasSectionHeading = Boolean(sectionHeading);
6687
7070
  if (presentation.lookSlots && (view.kind === "items" || view.kind === "groups")) return /* @__PURE__ */ jsx(AppointmentCardLists, {
6688
7071
  sectionHeading: appointmentSectionHeading(sectionHeading),
7072
+ categoryChosen: readCategoryFilter(categoryId) !== null,
6689
7073
  Carousel,
6690
7074
  view,
6691
7075
  presentation,
@@ -6751,7 +7135,7 @@ function appointmentCardContent(row) {
6751
7135
  }
6752
7136
  };
6753
7137
  }
6754
- function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading, sectionHeading }) {
7138
+ function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading, sectionHeading, categoryChosen }) {
6755
7139
  if (view.kind === "items") return /* @__PURE__ */ jsx(CardListItems, {
6756
7140
  Carousel,
6757
7141
  carouselLabels: {
@@ -6763,23 +7147,21 @@ function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading,
6763
7147
  Title: hasSectionHeading ? "h3" : "h2"
6764
7148
  });
6765
7149
  const Heading = hasSectionHeading ? "h3" : "h2";
7150
+ const lone = hasSectionHeading && !categoryChosen && view.groups.length === 1;
6766
7151
  return /* @__PURE__ */ jsx("div", {
6767
7152
  className: "rb-flex rb-flex-col rb-gap-10",
6768
- children: view.groups.map((group) => /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsxs("header", {
6769
- ...listLookSlot(presentation, "head"),
6770
- children: [/* @__PURE__ */ jsx(Heading, {
6771
- ...listLookSlot(presentation, "heading"),
6772
- children: group.heading
6773
- }), group.intro ? /* @__PURE__ */ jsx("p", {
6774
- ...listLookSlot(presentation, "intro"),
6775
- children: group.intro
6776
- }) : null]
6777
- }), /* @__PURE__ */ jsx(CardListItems, {
6778
- Carousel,
6779
- items: group.rows.map(appointmentCardContent),
6780
- presentation,
6781
- Title: hasSectionHeading ? "h4" : "h3"
6782
- })] }, group.key))
7153
+ children: view.groups.map((group) => /* @__PURE__ */ jsx(ListGroup, {
7154
+ presentation: listGroupPresentation(presentation),
7155
+ title: lone ? null : group.heading,
7156
+ intro: group.intro,
7157
+ Heading,
7158
+ children: /* @__PURE__ */ jsx(CardListItems, {
7159
+ Carousel,
7160
+ items: group.rows.map(appointmentCardContent),
7161
+ presentation,
7162
+ Title: lone || !hasSectionHeading ? "h3" : "h4"
7163
+ })
7164
+ }, group.key))
6783
7165
  });
6784
7166
  }
6785
7167
  /** Undated services merge in category order for the same arrangements as offerings. */
@@ -7023,7 +7405,7 @@ function normalizeBookingSettings(value) {
7023
7405
  };
7024
7406
  }
7025
7407
  function isBookingFormService(value) {
7026
- return isRecord$3(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.asksSiteTerms === void 0 || typeof value.asksSiteTerms === "boolean") && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
7408
+ return isRecord$3(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.asksSiteTerms === void 0 || typeof value.asksSiteTerms === "boolean") && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success) && (value.bookingQuestions === void 0 || beforeBookingQuestionsPresentationSchema.safeParse(value.bookingQuestions).success);
7027
7409
  }
7028
7410
  function readNonEmptyString(value) {
7029
7411
  if (typeof value !== "string") return null;
@@ -7155,6 +7537,7 @@ const bookingServiceSchema = z.object({
7155
7537
  paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
7156
7538
  asksSiteTerms: z.boolean().optional(),
7157
7539
  consent: blockBookingConsentSchema.optional(),
7540
+ bookingQuestions: beforeBookingQuestionsPresentationSchema.optional(),
7158
7541
  categoryId: z.string().nullable().optional()
7159
7542
  });
7160
7543
  const bookingServiceCategorySchema = z.object({
@@ -7199,6 +7582,7 @@ const bookingSourceSchema = z.object({
7199
7582
  siteId: z.string().optional(),
7200
7583
  apiBaseUrl: z.string().optional(),
7201
7584
  portalToken: z.string().nullable().optional(),
7585
+ readAuthority: browserReadAuthoritySchema.optional(),
7202
7586
  formId: z.string().optional(),
7203
7587
  serviceId: z.string().nullable().optional(),
7204
7588
  resourceId: z.string().nullable().optional(),
@@ -7249,9 +7633,10 @@ const bookingRenderSchema = z.object({
7249
7633
  const bookingFormIslandMetaCodec = createZodCodec(z.object({
7250
7634
  siteId: z.string().optional(),
7251
7635
  apiBaseUrl: z.string().optional(),
7252
- portalToken: z.string().nullable().optional()
7636
+ portalToken: z.string().nullable().optional(),
7637
+ readAuthority: browserReadAuthoritySchema.optional()
7253
7638
  }));
7254
- const bookingFormIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken");
7639
+ const bookingFormIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "readAuthority");
7255
7640
  function buildBookingFormDisplay(source, form = normalizeBookingFormConfig(source.form)) {
7256
7641
  return {
7257
7642
  kind: "booking-form",
@@ -7304,7 +7689,8 @@ createInteractiveIslandCodec({
7304
7689
  selectMeta: (value) => ({
7305
7690
  siteId: value.siteId,
7306
7691
  apiBaseUrl: value.apiBaseUrl,
7307
- portalToken: value.portalToken
7692
+ portalToken: value.portalToken,
7693
+ readAuthority: value.readAuthority
7308
7694
  })
7309
7695
  });
7310
7696
  function buildBookingFormInteractiveIslandProps(props) {
@@ -7314,7 +7700,8 @@ function buildBookingFormInteractiveIslandProps(props) {
7314
7700
  meta: {
7315
7701
  siteId: props.siteId,
7316
7702
  apiBaseUrl: props.apiBaseUrl,
7317
- portalToken: props.portalToken
7703
+ portalToken: props.portalToken,
7704
+ readAuthority: props.readAuthority
7318
7705
  },
7319
7706
  source: props
7320
7707
  });
@@ -8498,6 +8885,7 @@ function renderOfferingsCatalogueGroups({ props, groups, shape }) {
8498
8885
  const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
8499
8886
  const quickDateEvents = shape === "single" ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
8500
8887
  const populated = groups.flatMap(catalogueGroupItems);
8888
+ const frames = listGroupFrames(props);
8501
8889
  return /* @__PURE__ */ jsxs("div", {
8502
8890
  className: "offerings-preview rb-flex rb-flex-col rb-gap-6",
8503
8891
  "data-block": "offerings-preview",
@@ -8516,18 +8904,22 @@ function renderOfferingsCatalogueGroups({ props, groups, shape }) {
8516
8904
  props.children,
8517
8905
  /* @__PURE__ */ jsx("div", {
8518
8906
  className: "offerings-catalogue rb-flex rb-flex-col rb-gap-8",
8519
- children: populated.map(({ group, items }) => /* @__PURE__ */ jsxs("section", {
8520
- className: "rb-flex rb-flex-col rb-gap-5",
8521
- "data-offering-source": group.sourceKey,
8522
- children: [shape === "single" ? null : /* @__PURE__ */ jsx("h3", {
8523
- ...listLookSlot(props, "heading"),
8524
- children: group.title
8525
- }), renderCatalogueItems({
8907
+ ...frames.list,
8908
+ children: populated.map(({ group, items }) => /* @__PURE__ */ jsx(ListGroup, {
8909
+ presentation: listGroupPresentation(props),
8910
+ title: shape === "single" ? null : group.title,
8911
+ Heading: "h3",
8912
+ sectionProps: {
8913
+ ...frames.panel,
8914
+ className: "rb-flex rb-flex-col rb-gap-5",
8915
+ "data-offering-source": group.sourceKey
8916
+ },
8917
+ children: renderCatalogueItems({
8526
8918
  props,
8527
8919
  items,
8528
8920
  shape,
8529
8921
  groupTitle: group.title
8530
- })]
8922
+ })
8531
8923
  }, group.sourceKey))
8532
8924
  })
8533
8925
  ]
@@ -9133,34 +9525,30 @@ function RunWithoutLiveDates({ group, path }) {
9133
9525
  }
9134
9526
  function renderOfferingCardGroups(props) {
9135
9527
  const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
9528
+ const frames = listGroupFrames(props);
9136
9529
  return /* @__PURE__ */ jsx("div", {
9137
9530
  className: "rb-flex rb-flex-col rb-gap-10",
9531
+ ...frames.list,
9138
9532
  children: props.states.map((state) => {
9139
9533
  const cta = resolveOfferingsPreviewGroupCta({
9140
9534
  group: state.group,
9141
9535
  routes: props.routeCandidates?.routes ?? []
9142
9536
  });
9143
- return /* @__PURE__ */ jsxs("section", {
9144
- "data-offering-source": state.group.sourceKey,
9145
- children: [
9146
- /* @__PURE__ */ jsxs("header", {
9147
- ...listLookSlot(props, "head"),
9148
- children: [/* @__PURE__ */ jsx("h3", {
9149
- ...listLookSlot(props, "heading"),
9150
- children: state.group.title
9151
- }), state.group.intro ? /* @__PURE__ */ jsx("p", {
9152
- ...listLookSlot(props, "intro"),
9153
- children: state.group.intro
9154
- }) : null]
9155
- }),
9156
- offeringGroupCards(state, props, datesBySeries),
9157
- cta ? /* @__PURE__ */ jsx("a", {
9158
- ...listLookSlot(props, "more"),
9159
- className: "rb-item-text-link",
9160
- href: cta.href,
9161
- children: cta.label
9162
- }) : null
9163
- ]
9537
+ return /* @__PURE__ */ jsxs(ListGroup, {
9538
+ presentation: listGroupPresentation(props),
9539
+ title: state.group.title,
9540
+ intro: state.group.intro,
9541
+ Heading: "h3",
9542
+ sectionProps: {
9543
+ ...frames.panel,
9544
+ "data-offering-source": state.group.sourceKey
9545
+ },
9546
+ children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
9547
+ ...listLookSlot(props, "more"),
9548
+ className: "rb-item-text-link",
9549
+ href: cta.href,
9550
+ children: cta.label
9551
+ }) : null]
9164
9552
  }, state.group.sourceKey);
9165
9553
  })
9166
9554
  });