@riverbankcms/sdk 0.167.0 → 0.169.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 (235) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-Dgb-ptph.d.ts → BlocksIslandsHydrator-DpROiz12.d.ts} +1 -1
  2. package/dist/_dts/{Page-Bs3WxFgr.d.ts → Page-DHBBDRC_.d.ts} +7 -6
  3. package/dist/_dts/{SdkPreviewMode-DtUCsaHY.d.ts → SdkPreviewMode-CG7Qib7u.d.ts} +2 -2
  4. package/dist/_dts/{client-CwsI23pj.d.ts → client-MURxFla9.d.ts} +90 -418
  5. package/dist/_dts/{content-types-CAeP_-cV.d.ts → content-types-ClBGjxBV.d.ts} +2 -2
  6. package/dist/_dts/{contracts-BXHCiF-b.d.ts → contracts-CHNvzh0y.d.ts} +6 -4
  7. package/dist/_dts/{footerPageOutline-Bb2gbppW.d.ts → footerPageOutline-DQM934Fm.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-DaBBDx7M.d.ts → generatePageMetadata-ConZaEqB.d.ts} +2 -2
  9. package/dist/_dts/{index-CS6b1B-c.d.ts → index-BaDqRekr.d.ts} +4 -4
  10. package/dist/_dts/{index-bDln38Hm.d.ts → index-CVB5wgbz.d.ts} +2 -2
  11. package/dist/_dts/{index-D7EbliE3.d.ts → index-CiR_oPYT.d.ts} +3 -3
  12. package/dist/_dts/{index-5_jf52sZ.d.ts → index-CovKPftP.d.ts} +2 -2
  13. package/dist/_dts/{index-C20yUyob.d.ts → index-DCw8LO4M.d.ts} +1 -1
  14. package/dist/_dts/index-DDaX-K2D.d.ts +14 -0
  15. package/dist/_dts/{index-DeHDwMfu.d.ts → index-rfAssXq0.d.ts} +3 -3
  16. package/dist/_dts/{loadContent-CTqcL7CS.d.ts → loadContent-CRLKVVDP.d.ts} +7 -7
  17. package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +1 -0
  18. package/dist/_dts/{index-ChpjHK0U.d.ts → request-DeVetKBr.d.ts} +81273 -46979
  19. package/dist/_dts/{resolveBlockData-C3s9WMPs.d.ts → resolveBlockData-C5KYFeig.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-JPwgRxwh.d.ts → resolvePageContent-D8MZWyNO.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-BlaCuPLr.d.ts → types-B4MBlP_B.d.ts} +4 -2
  55. package/dist/_dts/{types-D-WElMCy.d.ts → types-Fj31kIi2.d.ts} +7 -7
  56. package/dist/_dts/{types-CwtTcaQP.d.ts → types-OwqfS8Gn.d.ts} +3 -3
  57. package/dist/_dts/{validation-Y5wD9fGK.d.ts → validation-B1Fa8o_b.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DFqkx158.mjs → BlocksIslandsHydrator-qq4Vhs7k.mjs} +21 -21
  59. package/dist/client/BookingMailingListNote-y3qWjnOo.mjs +957 -0
  60. package/dist/client/BookingQuestionFields-DjLjd0vc.mjs +359 -0
  61. package/dist/client/{CalendarNavigationChevron-DQwJ7BPx.mjs → CalendarNavigationChevron-VM7C2fdh.mjs} +8 -8
  62. package/dist/client/{CheckboxChoice-CZ-anOqV.mjs → CheckboxChoice-W_uiRgDK.mjs} +1 -1
  63. package/dist/client/{DemoBookingPortalAccess-DdkY86qI.mjs → DemoBookingPortalAccess-C2QCj_Ta.mjs} +68 -12
  64. package/dist/client/{EventCalendar.client-DAeQPV76.mjs → EventCalendar.client-DDjz7tuX.mjs} +10 -10
  65. package/dist/client/{EventCombined.client-Bus9R0bj.mjs → EventCombined.client-CeYbNsch.mjs} +9 -9
  66. package/dist/client/{EventEmbeddedCheckoutStep-D_14yqAU.mjs → EventEmbeddedCheckoutStep-Cf-HRHtb.mjs} +1 -1
  67. package/dist/client/{EventItem-DPBLjGwj.mjs → EventItem-B5J0IeF4.mjs} +37 -15
  68. package/dist/client/{EventListWeekNavigation-D6cwU82_.mjs → EventListWeekNavigation-eH04D8-V.mjs} +1 -1
  69. package/dist/client/{EventListing.client-Bogi_SnJ.mjs → EventListing.client-slpvrTrM.mjs} +3 -3
  70. package/dist/client/{EventListing.view-CEumpN7i.mjs → EventListing.view-BYBaElec.mjs} +34 -16
  71. package/dist/client/{EventRegistrationPayment-CIQw6vNy.mjs → EventRegistrationPayment-Do7Q0wRG.mjs} +362 -90
  72. package/dist/client/{LocationMapActions-BVO-qx4q.mjs → LocationMapActions-BFp2uQQQ.mjs} +2 -2
  73. package/dist/client/{MapDrawingSvg-CcGaFawl.mjs → MapDrawingSvg-DDWfmgpA.mjs} +1 -1
  74. package/dist/client/{Page-D4_H_u9V.mjs → Page-Dv9eIOGr.mjs} +4475 -1600
  75. package/dist/client/{ProtectedSubmitButton-8DuDw2ag.mjs → ProtectedSubmitButton-C3H26pN9.mjs} +1 -1
  76. package/dist/client/{StepIndicator-Dptantmg.mjs → StepIndicator-BZNUd0-v.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-BCtVxnDZ.mjs} +1 -1
  81. package/dist/client/{booking-form.client-BCXwOnhc.mjs → booking-form.client-Cr5G-HHO.mjs} +1323 -567
  82. package/dist/client/{bookingForm-sHHcdism.mjs → bookingForm-B1Fc62Sl.mjs} +9 -5
  83. package/dist/client/bookingQuestions-BHq83mzS.mjs +13 -0
  84. package/dist/client/{bookingRoute-Bqlyu5Vb.mjs → bookingRoute-D6DlxYx6.mjs} +6 -2
  85. package/dist/client/bookings.mjs +28 -20
  86. package/dist/client/{carousel-Cp9xPBFZ.mjs → carousel-DW-HgjvT.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-D1zWe4R7.mjs} +3 -3
  90. package/dist/client/{cart.client-B7JfA19I.mjs → cart.client-CIfbTLHS.mjs} +1 -1
  91. package/dist/client/{checkout-CipmYL4A.mjs → checkout-fDCNZ3IT.mjs} +3 -3
  92. package/dist/client/{checkout.client-DraalWdH.mjs → checkout.client-C4l2KjtV.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-CYj06rX1.mjs → checkoutUrls-cWL6I-Vz.mjs} +3 -2
  94. package/dist/client/client.mjs +287 -63
  95. package/dist/client/{context-Cv3QHjAF.mjs → context-DQnTyApV.mjs} +320 -4
  96. package/dist/client/creditProducts-CMOmhWm2.mjs +364 -0
  97. package/dist/client/{cta-P2vJVTEn.mjs → cta-Bj5WHgcv.mjs} +2 -2
  98. package/dist/client/{dateFormatting-D8D47VT4.mjs → dateFormatting-Bv6kjUW3.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-CXWZoV-d.mjs → demoPortalMagicLink-3uVu3WgG.mjs} +1 -1
  100. package/dist/client/{site-styles-D56hT2u1.mjs → display-CT8KMSpH.mjs} +19832 -17912
  101. package/dist/client/{enhanceHeaderSection-BkAro1DJ.mjs → enhanceHeaderSection-B27KFGDv.mjs} +4 -3
  102. package/dist/client/{event-details.client-dLmyuPap.mjs → event-details.client-CL4Lqz2c.mjs} +1 -1
  103. package/dist/client/{event-registration.client-BEhC2_-Y.mjs → event-registration.client-Dj3Kyp5X.mjs} +118 -241
  104. package/dist/client/{eventCalendar-FBMS2Cpb.mjs → eventCalendar-DGsdSF8J.mjs} +4 -4
  105. package/dist/client/{eventCombined-BrBhUvGe.mjs → eventCombined-DFSVDJ3D.mjs} +4 -4
  106. package/dist/client/{eventDetails-C7WUrbZ2.mjs → eventDetails-DzMskXYA.mjs} +2 -2
  107. package/dist/client/{eventListing-Bih-BgQM.mjs → eventListing-CpFFcAUr.mjs} +4 -4
  108. package/dist/client/{eventRegistration-DfTlqGbl.mjs → eventRegistration-BipMUOCw.mjs} +8 -5
  109. package/dist/client/{form-Bw1uuiUs.mjs → form-57k2JQnm.mjs} +3 -3
  110. package/dist/client/{form.client-pZ-9gN33.mjs → form.client-CCl6CpRJ.mjs} +5 -5
  111. package/dist/client/{form.parts-PXlu6XQO.mjs → form.parts-BOJ1yDDf.mjs} +3 -3
  112. package/dist/client/{formatDate-DI3DP48e.mjs → formatDate-BGlhrmhF.mjs} +1 -1
  113. package/dist/client/gifting/client.mjs +3 -3
  114. package/dist/client/{headerSection-BpJYUMd6.mjs → headerSection-q_bEzfhW.mjs} +2 -2
  115. package/dist/client/{mediaAssets-DpPauppt.mjs → mediaAssets-B99AP7ai.mjs} +1 -1
  116. package/dist/client/{mediaContext-BLo4NtjP.mjs → mediaContext-Fusweriw.mjs} +1 -1
  117. package/dist/client/{newsletter-form.client-CSoP0cGR.mjs → newsletter-form.client-CiqKAmPs.mjs} +6 -6
  118. package/dist/client/{newsletter-form.parts-DDbX_Sj0.mjs → newsletter-form.parts-x1RzAMNO.mjs} +2 -2
  119. package/dist/client/{newsletterForm-vCxYRar_.mjs → newsletterForm-Cn7h4zFe.mjs} +3 -3
  120. package/dist/client/{noop-ByVtIWf4.mjs → noop-B_f7RqLD.mjs} +544 -494
  121. package/dist/client/portal/client.mjs +86 -231
  122. package/dist/client/{product-detail.client-7Pi6avM-.mjs → product-detail.client-rWUvpVvZ.mjs} +1 -1
  123. package/dist/client/{product-list.client-DEad-Pma.mjs → product-list.client-J0wDOmKv.mjs} +1 -1
  124. package/dist/client/{productDetail-G1SMXG13.mjs → productDetail-LtCkMrJ0.mjs} +3 -3
  125. package/dist/client/{productList-B21TGdpT.mjs → productList-C0MLeh-v.mjs} +3 -3
  126. package/dist/client/{propsDecoder-B3vIBkex.mjs → propsDecoder-CAmEkJ6Y.mjs} +5 -4
  127. package/dist/client/{registry.server-B8aQhJpO.mjs → registry.server-Bf2YX_4v.mjs} +2218 -2435
  128. package/dist/client/{surfaceTransportMarker-BXepAVF6.mjs → renderableMediaAssetAdmission-BlfqYLJW.mjs} +1 -18
  129. package/dist/client/rendering/client.mjs +30 -30
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +10 -9
  132. package/dist/client/{richText-coerce-DHkBtO0G.mjs → richText-coerce-BTurYEao.mjs} +1 -1
  133. package/dist/client/{routeIslandApiConfig-DbHX4JOS.mjs → routeIslandApiConfig-UdAlnZGQ.mjs} +1 -1
  134. package/dist/client/runtimeResponse-BP-L6exS.mjs +3 -0
  135. package/dist/client/runtimeResponse-Dg4XFsuM.mjs +9 -0
  136. package/dist/client/{shop-mqyoOvOK.mjs → shop-Dkn6EasY.mjs} +3 -3
  137. package/dist/client/{shop-commerce-B2UmrQg_.mjs → shop-commerce-bo0Z6kwf.mjs} +13 -13
  138. package/dist/client/{shop-commerce-store-B7n-Z7nY.mjs → shop-commerce-store-Ckxa4_jI.mjs} +1 -1
  139. package/dist/client/{shop.client-BH-BBnA9.mjs → shop.client-B_GqU6_U.mjs} +111 -32
  140. package/dist/client/{shop.interactive-mdM3UMWG.mjs → shop.interactive-C6L_Ig5F.mjs} +87 -528
  141. package/dist/client/{shopShared-CXF5wxdg.mjs → shopShared-CO1Y8lFd.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/src-BozhJ43Z.mjs +3 -0
  144. package/dist/client/{src-1PJxc8KO.mjs → src-xrjaKaCj.mjs} +6 -8
  145. package/dist/client/surfaceTransportMarker-BuwkYxsI.mjs +19 -0
  146. package/dist/client/{timetableModel-CrC80EOG.mjs → timetableModel-D62jfOxZ.mjs} +12 -12
  147. package/dist/client/{types-sF-IrGQr.mjs → types-5fOsPIpL.mjs} +248 -111
  148. package/dist/client/{useAvailableSlots-C4LOaI_Z.mjs → useAvailableSlots-CStfVmyY.mjs} +3 -3
  149. package/dist/client/{useDiscountApply-6Q0nToVA.mjs → useDiscountApply-Ca2pHUDu.mjs} +6 -4
  150. package/dist/client/{useDiscountCodeUi-CM-DTX5X.mjs → useDiscountCodeUi-AEifktGO.mjs} +1 -1
  151. package/dist/client/{useEventPagination-Bcs89BR5.mjs → useEventPagination-uxnUWI2v.mjs} +7 -7
  152. package/dist/client/{view-BN-fxyfq.mjs → view-B6KSxQMO.mjs} +11 -7
  153. package/dist/client/{view-Dh2tGoS0.mjs → view-SVnWic7i.mjs} +3 -4
  154. package/dist/preview-next/client/{ArrangementLookControls-D4VjPs-r.mjs → ArrangementLookControls-kbdqYkWM.mjs} +26 -17
  155. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-C_h1cMYm.mjs → EventEmbeddedCheckoutStep-8-qtHjpb.mjs} +1 -1
  156. package/dist/preview-next/client/{LocationPickerEnvironment-D56RD3e_.mjs → LocationPickerEnvironment-CZQ4vkRe.mjs} +1 -1
  157. package/dist/preview-next/client/{MapLibreEditMap-DFnyCckr.mjs → MapLibreEditMap-CP4w7T_0.mjs} +2 -2
  158. package/dist/preview-next/client/{PreviewEditorSidebar-Ckr2zk_L.mjs → PreviewEditorSidebar-DI_LhsMQ.mjs} +212 -55
  159. package/dist/preview-next/client/{PreviewEditorUI-KOZgw_gS.mjs → PreviewEditorUI-yyD-ZREP.mjs} +6 -6
  160. package/dist/preview-next/client/{PreviewShell-CyO2V4kB.mjs → PreviewShell-YauP65Gi.mjs} +199 -155
  161. package/dist/preview-next/client/{SdkPreviewModeRuntime-DW3uKvNF.mjs → SdkPreviewModeRuntime-Bl7jQMI1.mjs} +32 -32
  162. package/dist/preview-next/client/{SiteChromeCustomizeButton-CU9VD-7O.mjs → SiteChromeCustomizeButton-CQFRP9aM.mjs} +4772 -3687
  163. package/dist/preview-next/client/{ThemedButton-C0dgGJ5k.mjs → ThemedButton-BQU45t-E.mjs} +260 -121
  164. package/dist/preview-next/client/{lucide-react-CPBCf6QT.mjs → lucide-react-DkZ8fO-G.mjs} +1 -1
  165. package/dist/preview-next/client/{previewAssistantSlot-DBi-WybM.mjs → previewAssistantSlot-DSR0IdAw.mjs} +16547 -13046
  166. package/dist/preview-next/client/{previewChromeSurface-BhkUJst9.mjs → previewChromeSurface-uSnVzeNs.mjs} +1 -1
  167. package/dist/preview-next/client/runtime.mjs +3 -3
  168. package/dist/preview-next/client/{sdk-runtime-BjCb6lOn.mjs → sdk-runtime-6Q0RVJTQ.mjs} +2 -2
  169. package/dist/preview-next/client/{src-DY8JCJdE.mjs → src-DzXUmsyK.mjs} +6 -8
  170. package/dist/preview-next/client/src-LUhVXBEQ.mjs +3 -0
  171. package/dist/preview-next/client/{useAutosaveStatus-CKxTaC3j.mjs → useAutosaveStatus-Cdx3kAGm.mjs} +2 -2
  172. package/dist/preview-next/client/{useBlockCustomizeControls-B7MLTjBX.mjs → useBlockCustomizeControls-ZrWdhcB6.mjs} +2 -2
  173. package/dist/preview-next/client/{useOpenBlockForSetup-BTUc0g9X.mjs → useOpenBlockForSetup-CK-GWb9k.mjs} +1 -1
  174. package/dist/preview-next/keepAlive.mjs +1 -1
  175. package/dist/preview-next/middleware.mjs +1 -1
  176. package/dist/preview-next/{route-contract-Bv3nkdpV.mjs → route-contract-BU1m9SV3.mjs} +212 -0
  177. package/dist/server/{Block.shared-4fMqzltx.mjs → Block.shared-4vx7wzxj.mjs} +5 -5
  178. package/dist/server/{ThemeScopeCore-C72VC_lR.mjs → ThemeScopeCore-C3HLgqBF.mjs} +463 -127
  179. package/dist/server/{accessibleSurfaces-B_Y_dA20.mjs → accessibleSurfaces-108nxyGc.mjs} +319 -131
  180. package/dist/server/{bindings-ConMYJ2U.mjs → bindings-TAQbo2P5.mjs} +2 -2
  181. package/dist/server/{booking-form.reserved-fields-BWRF7509.mjs → booking-form.reserved-fields-Cqp13TKc.mjs} +1 -0
  182. package/dist/server/{client-Cot-H5fQ.mjs → client-DzCxEl3L.mjs} +308 -61
  183. package/dist/server/config-validation.mjs +1 -1
  184. package/dist/server/config.mjs +1 -1
  185. package/dist/server/{validation-CDd6m8Ry.mjs → customCss-QymcmOZ-.mjs} +12 -55
  186. package/dist/server/data/resolveBlockData.mjs +1 -1
  187. package/dist/server/headerVariant-8O5MvxIU.mjs +464 -0
  188. package/dist/server/{identity-Bn9OQiT1.mjs → identity-20XHqyuO.mjs} +1 -1
  189. package/dist/server/index.mjs +3 -3
  190. package/dist/server/{loadContent-BkaWYEwt.mjs → loadContent-BO1M9Hdf.mjs} +4 -5
  191. package/dist/server/{loadPage-kviUdH8c.mjs → loadPage-BvWzmZcD.mjs} +2 -2
  192. package/dist/server/manifest.mjs +1 -1
  193. package/dist/server/{media-DnlczCMA.mjs → media-Brn9FW5s.mjs} +15 -1
  194. package/dist/server/{mode-Cv_TG9gP.mjs → mode-bkFS8glh.mjs} +4 -2
  195. package/dist/server/next.mjs +6 -6
  196. package/dist/server/{opaqueSurface-BTnS09GS.mjs → opaqueSurface-BawlEAd_.mjs} +6 -6
  197. package/dist/server/{overrideResolution-itXZCXs7.mjs → overrideResolution-fxuB1zZg.mjs} +1 -1
  198. package/dist/server/page-converter.mjs +3 -3
  199. package/dist/server/{pageRenderPlan-CDyn7iLy.mjs → pageRenderPlan-DzduDSqY.mjs} +255 -158
  200. package/dist/server/{pageRuntimeSupport-DZ6cLxrM.mjs → pageRuntimeSupport-BU8pwTNx.mjs} +291 -5
  201. package/dist/server/{pageShared-Q_Vij87H.mjs → pageShared-CSOJ8p8E.mjs} +1303 -907
  202. package/dist/server/{schema-DEizlyi4.mjs → parseThemeForPersistence-BebSeE17.mjs} +593 -1592
  203. package/dist/server/{prebuild-DOG4MkOy.mjs → prebuild-C5ZYo7wA.mjs} +1 -1
  204. package/dist/server/prebuild.mjs +1 -1
  205. package/dist/server/{prefetchBlockData-DlprLLsc.mjs → prefetchBlockData-BvbxqeKn.mjs} +5 -4
  206. package/dist/server/{registry-BPFcpn6k.mjs → registry-Fv-7D8o2.mjs} +4595 -4045
  207. package/dist/server/rendering/components/pageShared.mjs +1 -1
  208. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  209. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  210. package/dist/server/rendering/server.mjs +3 -3
  211. package/dist/server/rendering.mjs +8 -8
  212. package/dist/server/{resolveBlockData-BHvfGD4y.mjs → resolveBlockData-xPgkvoWS.mjs} +1 -1
  213. package/dist/server/{resolveButtonColourStates-OXFRGn5M.mjs → resolveButtonColourStates-Cn6j8Ee0.mjs} +399 -518
  214. package/dist/server/{responseMedia-D8J3VAFs.mjs → responseMedia-t6gs0cB7.mjs} +2 -2
  215. package/dist/server/{richTextSchema-Euhuj-7V.mjs → richTextSchema-DQ2NBP0n.mjs} +5 -16
  216. package/dist/server/server.mjs +3 -3
  217. package/dist/server/theme-bridge.mjs +2 -3
  218. package/dist/server/theme.mjs +1 -2
  219. package/dist/server/{three-pass-converter-_j2UE2tR.mjs → three-pass-converter-CQWdnfjV.mjs} +1 -1
  220. package/dist/server/{validation-bl6WcAi_.mjs → validation-DddhgNdb.mjs} +58 -9
  221. package/dist/server/{version-BLXZ31S-.mjs → version-D_W2mt8w.mjs} +1 -1
  222. package/dist/styles/index.css +342 -67
  223. package/package.json +4 -3
  224. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  225. package/dist/_dts/index-RugyUnqR.d.ts +0 -31535
  226. package/dist/client/BookingMailingListNote-CCVXX1LN.mjs +0 -331
  227. package/dist/client/DemoPortalSignInLink-B9YrzZt2.mjs +0 -19
  228. package/dist/client/creditProducts-BOWi1QLp.mjs +0 -62
  229. package/dist/client/site-styles-CMCUxsIM.mjs +0 -3
  230. package/dist/client/src-CdRISvQp.mjs +0 -3
  231. package/dist/client/src-DjnxOjXG.mjs +0 -217
  232. package/dist/client/useBookingNowIso-BDmWkYUW.mjs +0 -58
  233. package/dist/client/wizardSteps-DtkhwKXK.mjs +0 -6933
  234. package/dist/preview-next/client/src-BP8771hw.mjs +0 -3
  235. 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-DzduDSqY.mjs";
3
+ import { $ as RichText, $a as buildMailingListSignupBlockSourceRef, $i as requireCuratedSiteStyle, $t as formatEventHourLabel, A as buildOfferingsCatalogueListing, An as bookingConsentCarrierSchema, Ao as resolveExactOrFreePriceDisplay, Ar as testimonialsCarouselFragment, At as resolveOfferingsPreviewGroups, B as buildEventCollectionHydration, Br as boxStyleClassNames, C as buildShopInteractiveIslandProps, Ci as inlineTextToPlainText, Cn as isEventFull, Co as toBookingTimeZone, Cr as cardFragment, D as passCardListContent, Da as testimonialsCompositionTreatmentValues, Dn as publicEventsArraySchema, Do as publicEventPricingCurrency, Dr as singleButtonFragment, Dt as normalizeOfferingsPreviewItemLimit, E as membershipClassesLabel, Ea as offeringsPreviewCompositionTreatmentValues, En as groupPublicEventsByRun, Eo as isPublicEventPricingOptionDisplayable, Er as blogFeaturedPostFragment, Et as buildOfferingsPreviewListing, Fi as isRecord$4, Fo as TokenResolver, Fr as isBlockButtonRole, Ft as ThemedDownloadLink, Ga as loadedReadinessFact, Gn as resolveDateRuntimeContext, H as eventCollectionDisplaySchemaShape, Hn as teamMemberBiography, Hr as resolveCardRoleForBoxStyles, Ht as formatEventPriceAmount, Ii as parseThemeButtonVariantId, Ir as heroCopyFragment, It as getIconComponent, Jr as resolveBackgroundColorValue, Jt as formatCalendarTitle, K as catalogueEventCardProps, Ka as pageTemplateFromEntry, Ki as arrangementLookHooks, Kt as eventDateOptions, L as eventListingBlockDefinition, Li as themeButtonSelector, Ln as composeHeaderSectionWrapperClassName, Lr as bodyCopyFragment, Lt as SpinnerNode, M as eventCalendarBlockDefinition, Mi as PUBLIC_DOWNLOAD_MEDIA_TYPES, Mn as FEATURE_CARD_ICON_TREATMENTS, Mo as formatCurrencyAmount, Mr as ctaCopyFragment, Mt as ThemedAuthoredButton, N as buildEventCalendarInteractiveIslandProps, Nn as resolveFeatureCardGeneratedIconSizePx, Nr as heroCtaRowFragment, Nt as ThemedButton, O as offeringsPreviewBlockDefinition, On as blockBookingPaymentTermsSchema, Oo as publicEventPricingDisplay, Or as formEmbedFragment, Ot as offeringsListingFor, P as buildEventCalendarListingDisplay, Pi as isObjectRecord, Pn as shouldReserveFeatureCardIconZone, Pr as ctaRowFragment, Pt as ThemedButtonLink, Q as MediaNodeServer, Qa as resolveWholeSeriesBookingPhase, Qt as formatEventDateParts, R as buildEventListingInteractiveIslandProps, Ri as AFFORDANCE_SUPPRESS_CLASS, Rn as markEditableSurfaceForwarding, Rr as defineFragment, Rt as buildEventListWeek, S as buildProductListInteractiveIslandProps, Si as PlusIcon, Sn as getEventAvailabilityStatus, So as resolveBookingBusinessTimeZone, Sr as headingFragment, T as membershipCardListContent, Ta as introCompositionTreatmentValues, Ti as parseInlineTextFromUnknown, Tn as pageNavigationSchema, To as formatBookingPriceDisplay, Tr as faqHeadingFragment, Tt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, U as eventCollectionHydrationSchema, Ua as chosenString, Ui as effectiveHeaderNavLinkStyle, Un as teamMemberCardBiography, Ut as formatEventPriceDisplay, V as buildEventCollectionListingDisplay, Vi as selectItemSurfacePresentation, Vn as parseTeamMemberSpecialties, Vr as normalizeBoxStylesBorder, Vt as formatEventPrice, W as eventCollectionSourceSchemaShape, Wa as admitReadinessFacts, Wi as readOpeningToneProjection, Wn as readRuntimeNow, Wt as buildCalendarViewport, Xa as nextLiveRunSessionStartMs, Xn as staticHeaderChromeRuntime, Xt as formatEventClockLabel, Ya as CANCELLED_SESSION_STATUS, Yi as resolveEffectiveArrangement, Yr as ctaButton, Yt as formatDate, Za as orderedLiveRunSessions, Zt as formatEventCompactDateRail, _ as productListBlockDefinition, _i as FileArchiveIcon, _n as browserReadAuthoritySchema, a as normalizeLocationMapSource, aa as generateEffectsCSS, ai as runTransforms, an as getLocalDateKey, ar as buildInteractiveIslandProps, b as buildCheckoutInteractiveIslandProps, bi as FileTextIcon, bn as formatTotalCapacity, bt as normalizeEventRegistrationPageSurfaceSubject, ca as headerRootPaint, ci as sanitizeHref, cn as formatDateKey, cr as createZodCodec, ct as getCurrentResolveImageUrlContext, d as newsletterBlockSubmissionMessage, di as resolveBlockIconRenderValue, dn as getWeekCalendarDayTuple, do as formatDate$1, dr as listItemPresentation, dt as getContainerClass, ea as resolveCardRole, en as formatEventNextDateFact, eo as parseMailingListRuntimeContext, et as ImagePresets, f as giftingBlockDefinition, fa as boundaryRuntimeMetricsForDecorativeTransition, fi as ArrowDownIcon, fn as getWeekCalendarDays, fr as listLookControl, g as productDetailBlockDefinition, gi as ClockIcon, go as toScheduledBookingDateTime, gr as itemRole, gt as previewStageSchema, h as cartBlockDefinition, hi as CirclePlusIcon, hn as resolveRuntimeEventDestination, ho as formatBookingCompactEnglishTime, hr as resolvedItemSurfaceProps, ht as bookingNowSchema, i as normalizeLocationMapProps, ia as generateNavLinkCSS, in as resolveEventTimeZone, io as decideLocationSourcePermission, ir as buildFormInteractiveIslandProps, j as offeringsCatalogueShape, ja as bindingSchema, jn as beforeBookingQuestionsPresentationSchema, jo as resolvePricingOptionsPriceDisplay, jr as testimonialsHeadingFragment, jt as resolveOfferingsRenderInput, k as publicRouteCandidatesSchema, ki as parseFieldDefinitions, kn as blockBookingConsentSchema, ko as publicEventPricingType, kr as formCopyFragment, kt as resolveOfferingsPreviewGroupCta, l as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, li as buildGeneratedBlockIconRenderAssetLookupFromUnknown, ln as getDayOfWeek, lr as defineClientOwnedBlockRuntime, lt as setContextResolveImageUrlContext, m as checkoutBlockDefinition, ma as transitionCatalogueEntries, mi as CircleMinusIcon, mn as isToday, mr as lookListPresentationSchemaShape, mt as buildEventRegistrationInteractiveIslandProps, na as generateFooterCss, nn as formatTime, no as parseMailingListPlacementTargeting, o as resolveLocationMapLocation, oa as generateInteractiveChildInheritanceCSS, oi as el, on as getLocalMinuteOfDay, oo as normalizeLocationAddressText, or as createInteractiveIslandCodec, ot as resolvePublicMediaUrl, p as buildGiftingInteractiveIslandProps, pa as anglePolygonCss, pi as ChevronDownIcon, pn as isSameCalendarDay, pr as listLookSlot, pt as eventRegistrationBlockDefinition, q as listingEventCardProps, qa as unavailableReadinessFact, qi as arrangementManifestFromVariants, r as normalizeBlockContent, ra as buildTextContrastShadow, rn as groupEventsByDate, ro as sameMailingListPlacementTargeting, rr as formBlockDefinition, s as newsletterSignupBlockDefinition, sa as headerNeedsPhotoShade, si as when, sn as addDays, sr as defineInteractiveIslandMetaKeys, st as buildResolveImageUrlContext, t as getBlockDefinition, ta as generateDefaultCardSystem, tn as formatEventTimeRange, tt as MediaPlaceholder, u as buildNewsletterFormInteractiveIslandProps, ui as parseBlockIconValue, un as getOrderedDayNames, uo as mapDrawingSchema, ur as defineProgressiveBlockRuntime, ut as getCardOrientation, v as shopBlockDefinition, vi as FileAudioIcon, vn as canJoinEventWaitlistOnAnyMode, vo as getBookingLocalDateKey, vr as Grid, w as shopProductPresentation, wa as featureCardCompositionTreatmentValues, wi as isInlineTextEmpty, wn as blockSiteTermsSchema, wo as toUtcIsoDateTimeString, wr as faqAccordionFragment, x as buildProductDetailInteractiveIslandProps, xi as MinusIcon, xn as getEventAvailability, xo as parseLocalScheduleTime, xr as richTextFragment, xt as resolveEventRegistrationScopedEvents, y as buildCartInteractiveIslandProps, yi as FileSpreadsheetIcon, yn as formatEventRemainingPlaces, yr as clsx, z as buildEventCollectionDisplay, zn as splitPositioningClasses, zt as eventListWeekDays } from "./registry-Fv-7D8o2.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-8O5MvxIU.mjs";
6
+ import { t as parseThemeForPersistence } from "./parseThemeForPersistence-BebSeE17.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-BU8pwTNx.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-C3HLgqBF.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) {
@@ -3684,7 +3992,8 @@ const DEFAULT_BOUNDS = {
3684
3992
  maxEndHour: 23,
3685
3993
  defaultStartHour: 6,
3686
3994
  defaultEndHour: 21,
3687
- minHeightPercent: 2.5
3995
+ minHeightPercent: 2.5,
3996
+ marginMinutes: 0
3688
3997
  };
3689
3998
  function buildTimetableModel$1(input) {
3690
3999
  const bounds = resolveBounds(input.bounds);
@@ -3864,11 +4173,8 @@ function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercen
3864
4173
  }
3865
4174
  function resolveBounds(bounds) {
3866
4175
  return {
3867
- minStartHour: bounds?.minStartHour ?? DEFAULT_BOUNDS.minStartHour,
3868
- maxEndHour: bounds?.maxEndHour ?? DEFAULT_BOUNDS.maxEndHour,
3869
- defaultStartHour: bounds?.defaultStartHour ?? DEFAULT_BOUNDS.defaultStartHour,
3870
- defaultEndHour: bounds?.defaultEndHour ?? DEFAULT_BOUNDS.defaultEndHour,
3871
- minHeightPercent: bounds?.minHeightPercent ?? DEFAULT_BOUNDS.minHeightPercent
4176
+ ...DEFAULT_BOUNDS,
4177
+ ...bounds
3872
4178
  };
3873
4179
  }
3874
4180
  function resolveHourRange(segments, bounds) {
@@ -3878,8 +4184,8 @@ function resolveHourRange(segments, bounds) {
3878
4184
  };
3879
4185
  const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
3880
4186
  const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
3881
- const startHour = Math.max(bounds.minStartHour, Math.floor(earliestStart / 60));
3882
- const endHour = Math.min(bounds.maxEndHour, Math.ceil(latestEnd / 60));
4187
+ const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
4188
+ const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
3883
4189
  return {
3884
4190
  startHour,
3885
4191
  endHour: Math.max(startHour + 1, endHour)
@@ -3995,9 +4301,11 @@ const BOOK_TARGET_PARAMS = {
3995
4301
  service: "service",
3996
4302
  resource: "resource",
3997
4303
  occurrence: "occurrence",
3998
- event: "event"
4304
+ event: "event",
4305
+ category: "category"
3999
4306
  };
4000
4307
  function resolveDedicatedBookingTarget(pathname) {
4308
+ if (pathname === "/embed" || pathname.startsWith("/embed/")) return { kind: "embed" };
4001
4309
  const internalPublishedMatch = pathname.match(/^\/internal-sites\/([^/]+)\/([^/]+)\/published(?:\/.*)?$/);
4002
4310
  if (internalPublishedMatch) {
4003
4311
  const hostKey = internalPublishedMatch[1];
@@ -4013,7 +4321,7 @@ function resolveDedicatedBookingTarget(pathname) {
4013
4321
  function resolveDedicatedBookingPath(pathname) {
4014
4322
  const target = resolveDedicatedBookingTarget(pathname);
4015
4323
  if (target.kind === "internal_published_preview") return `/internal-sites/${target.hostKey}/${target.siteIdentifier}/published/book`;
4016
- return "/book";
4324
+ return target.kind === "embed" ? "/embed/book" : "/book";
4017
4325
  }
4018
4326
  function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser" }) {
4019
4327
  const bookingPath = resolveDedicatedBookingPath(pathname);
@@ -4035,6 +4343,8 @@ function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser"
4035
4343
  const queryString = params.toString();
4036
4344
  return queryString ? `${bookingPath}?${queryString}` : bookingPath;
4037
4345
  }
4346
+ const EMBED_SEGMENT = "[a-z0-9][a-z0-9-]*";
4347
+ new RegExp(`^/(?:events/${EMBED_SEGMENT}(?:/${EMBED_SEGMENT})?|services/${EMBED_SEGMENT})$`, "i");
4038
4348
  //#endregion
4039
4349
  //#region ../theme-core/src/themeScopeUtils.ts
4040
4350
  /**
@@ -5070,6 +5380,8 @@ function carouselShape(count, _arrangement) {
5070
5380
  return count <= 1 ? "static" : "carousel";
5071
5381
  }
5072
5382
  function arrangementCarouselSettings(props) {
5383
+ const autoAdvance = props.arrangement === "track" && props.autoAdvance === true;
5384
+ const indicator = autoAdvance ? "dots" : props.indicator;
5073
5385
  return {
5074
5386
  slidesToShow: props.arrangement === "slides" ? 1 : {
5075
5387
  mobile: 1,
@@ -5078,11 +5390,12 @@ function arrangementCarouselSettings(props) {
5078
5390
  },
5079
5391
  transition: "slide",
5080
5392
  showControls: true,
5081
- showDots: props.indicator === "dots",
5393
+ showDots: indicator === "dots",
5082
5394
  arrowVisibility: "always",
5083
- autoplay: false,
5395
+ autoplay: autoAdvance,
5084
5396
  autoplayDelay: 5e3,
5085
- loop: false
5397
+ loop: autoAdvance,
5398
+ indicator
5086
5399
  };
5087
5400
  }
5088
5401
  /** One owner for the region semantics on server, standalone client and SDK root. */
@@ -6065,7 +6378,7 @@ function IslandPropsScript({ value }) {
6065
6378
  * Avoid "fake" navigation controls here; users can scroll horizontally.
6066
6379
  */
6067
6380
  const CarouselNodeSSR = (props) => {
6068
- const settings = carouselSsrSettings(props);
6381
+ const { indicator, ...settings } = carouselSsrSettings(props);
6069
6382
  const slides = props.mode === "arrangement" ? props.slides : carouselContents(props).map((content) => ({
6070
6383
  title: "",
6071
6384
  content
@@ -6086,28 +6399,38 @@ const CarouselNodeSSR = (props) => {
6086
6399
  "data-show-controls": controlsEnabled ? "true" : "false",
6087
6400
  ...getIslandRootProps("carousel", props.blockId),
6088
6401
  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 }),
6402
+ /* @__PURE__ */ jsx(IslandPropsScript, { value: carouselIslandValue(props, settings, indicator) }),
6098
6403
  /* @__PURE__ */ jsx(CarouselSsrFrame, {
6099
6404
  slides,
6100
6405
  transition: settings.transition,
6101
6406
  arrangement: props.arrangement
6102
6407
  }),
6103
6408
  props.mode === "arrangement" ? /* @__PURE__ */ jsx(CarouselSsrControls, {
6104
- props,
6105
- count: slides.length
6409
+ props: {
6410
+ ...props,
6411
+ indicator: indicator ?? props.indicator
6412
+ },
6413
+ count: slides.length,
6414
+ renderDots: settings.autoplay === true
6106
6415
  }) : null
6107
6416
  ]
6108
6417
  });
6109
6418
  };
6110
- function CarouselSsrControls({ props, count }) {
6419
+ /** What the client needs to hydrate as the server rendered; auto-advance is carried only when on. */
6420
+ function carouselIslandValue(props, settings, indicator) {
6421
+ if (props.mode !== "arrangement") return settings;
6422
+ return {
6423
+ ...settings,
6424
+ mode: props.mode,
6425
+ arrangement: props.arrangement,
6426
+ labels: props.labels,
6427
+ indicator,
6428
+ slides: props.slides.map(({ title }) => ({ title })),
6429
+ cardList: props.cardList,
6430
+ ...settings.autoplay ? { autoAdvance: true } : {}
6431
+ };
6432
+ }
6433
+ function CarouselSsrControls({ props, count, renderDots }) {
6111
6434
  return /* @__PURE__ */ jsxs("div", {
6112
6435
  "data-slot": "controls",
6113
6436
  hidden: true,
@@ -6119,6 +6442,21 @@ function CarouselSsrControls({ props, count }) {
6119
6442
  "aria-disabled": "true",
6120
6443
  children: "←"
6121
6444
  }),
6445
+ renderDots && props.indicator === "dots" ? /* @__PURE__ */ jsx("div", {
6446
+ className: "carousel-dots",
6447
+ role: "group",
6448
+ "aria-label": "Carousel navigation",
6449
+ "data-control": "dots",
6450
+ children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx("button", {
6451
+ type: "button",
6452
+ className: "carousel-dot",
6453
+ "data-control": "dot",
6454
+ "data-current": String(index === 0),
6455
+ "data-active": String(index === 0),
6456
+ "aria-current": index === 0 ? "true" : void 0,
6457
+ "aria-label": `Show ${props.labels.item} ${index + 1} of ${count}`
6458
+ }, index))
6459
+ }) : null,
6122
6460
  /* @__PURE__ */ jsx("button", {
6123
6461
  type: "button",
6124
6462
  "data-slot": "control",
@@ -6145,7 +6483,8 @@ function carouselSsrSettings(props) {
6145
6483
  arrowVisibility,
6146
6484
  autoplay,
6147
6485
  autoplayDelay,
6148
- loop
6486
+ loop,
6487
+ indicator: void 0
6149
6488
  };
6150
6489
  }
6151
6490
  function CarouselSsrFrame(props) {
@@ -6383,6 +6722,52 @@ function HeaderControlNode({ className, children, "aria-label": label, "aria-exp
6383
6722
  });
6384
6723
  }
6385
6724
  //#endregion
6725
+ //#region ../blocks/src/system/runtime/nodes/events/shared/ListGroup.tsx
6726
+ function listGroupPresentation(presentation) {
6727
+ return {
6728
+ lookSlots: presentation.lookSlots,
6729
+ surfacePresentation: presentation.surfacePresentation
6730
+ };
6731
+ }
6732
+ /**
6733
+ * Whether each group sits on its own panel, side by side ("A column per type").
6734
+ * Every renderer of grouped offerings frames its groups from this one answer.
6735
+ */
6736
+ function listGroupFrames(presentation) {
6737
+ const panels = presentation.cardArrangement === "type-columns";
6738
+ return {
6739
+ list: panels ? listLookSlot(presentation, "list") : {},
6740
+ panel: panels ? listLookSlot(presentation, "panel") : {}
6741
+ };
6742
+ }
6743
+ /**
6744
+ * One category inside a list section: an offering type, a service category.
6745
+ * Its heading is a subheading, so arranged markup marks the group with
6746
+ * `data-list-group`: the shared sheet sizes the heading below the section's,
6747
+ * and styles that decorate section headings leave it alone. A group whose
6748
+ * title is null shows only its intro, so a lone category under a section
6749
+ * heading doesn't name the same thing twice.
6750
+ */
6751
+ function ListGroup({ presentation, title, intro, Heading, sectionProps, children }) {
6752
+ const arranged = presentation.lookSlots !== void 0;
6753
+ const parts = /* @__PURE__ */ jsxs(Fragment, { children: [title !== null ? /* @__PURE__ */ jsx(Heading, {
6754
+ ...listLookSlot(presentation, "heading"),
6755
+ children: title
6756
+ }) : null, intro ? /* @__PURE__ */ jsx("p", {
6757
+ ...listLookSlot(presentation, "intro"),
6758
+ children: intro
6759
+ }) : null] });
6760
+ const head = title === null && !intro ? null : arranged ? /* @__PURE__ */ jsx("header", {
6761
+ ...listLookSlot(presentation, "head"),
6762
+ children: parts
6763
+ }) : parts;
6764
+ return /* @__PURE__ */ jsxs("section", {
6765
+ ...sectionProps,
6766
+ ...arranged ? { "data-list-group": "" } : {},
6767
+ children: [head, children]
6768
+ });
6769
+ }
6770
+ //#endregion
6386
6771
  //#region ../blocks/src/system/runtime/nodes/appointment-services.tsx
6387
6772
  const publicVenueSchema = z.object({
6388
6773
  name: z.string(),
@@ -6428,6 +6813,7 @@ const publicAppointmentServiceSchema = z.object({
6428
6813
  pricing: publicPricingSchema.optional(),
6429
6814
  priceAmount: z.number().nullable(),
6430
6815
  priceCurrency: z.string().nullable(),
6816
+ onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
6431
6817
  location: publicLocationSchema,
6432
6818
  categoryId: z.string().nullable().optional().transform((value) => value ?? null)
6433
6819
  });
@@ -6484,6 +6870,7 @@ function formatVenue(venue) {
6484
6870
  return venue.area ? `${venue.name}, ${venue.area}` : venue.name;
6485
6871
  }
6486
6872
  function formatAppointmentPrice(service) {
6873
+ if (service.onlinePaymentMode === "package_only") return "Book with a package";
6487
6874
  const pricing = service.pricing;
6488
6875
  if (pricing) {
6489
6876
  const display = (() => {
@@ -6686,6 +7073,7 @@ function AppointmentServicesNode({ Carousel, preparedView, sectionHeading, categ
6686
7073
  const hasSectionHeading = Boolean(sectionHeading);
6687
7074
  if (presentation.lookSlots && (view.kind === "items" || view.kind === "groups")) return /* @__PURE__ */ jsx(AppointmentCardLists, {
6688
7075
  sectionHeading: appointmentSectionHeading(sectionHeading),
7076
+ categoryChosen: readCategoryFilter(categoryId) !== null,
6689
7077
  Carousel,
6690
7078
  view,
6691
7079
  presentation,
@@ -6751,7 +7139,7 @@ function appointmentCardContent(row) {
6751
7139
  }
6752
7140
  };
6753
7141
  }
6754
- function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading, sectionHeading }) {
7142
+ function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading, sectionHeading, categoryChosen }) {
6755
7143
  if (view.kind === "items") return /* @__PURE__ */ jsx(CardListItems, {
6756
7144
  Carousel,
6757
7145
  carouselLabels: {
@@ -6763,23 +7151,21 @@ function AppointmentCardLists({ Carousel, view, presentation, hasSectionHeading,
6763
7151
  Title: hasSectionHeading ? "h3" : "h2"
6764
7152
  });
6765
7153
  const Heading = hasSectionHeading ? "h3" : "h2";
7154
+ const lone = hasSectionHeading && !categoryChosen && view.groups.length === 1;
6766
7155
  return /* @__PURE__ */ jsx("div", {
6767
7156
  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))
7157
+ children: view.groups.map((group) => /* @__PURE__ */ jsx(ListGroup, {
7158
+ presentation: listGroupPresentation(presentation),
7159
+ title: lone ? null : group.heading,
7160
+ intro: group.intro,
7161
+ Heading,
7162
+ children: /* @__PURE__ */ jsx(CardListItems, {
7163
+ Carousel,
7164
+ items: group.rows.map(appointmentCardContent),
7165
+ presentation,
7166
+ Title: lone || !hasSectionHeading ? "h3" : "h4"
7167
+ })
7168
+ }, group.key))
6783
7169
  });
6784
7170
  }
6785
7171
  /** Undated services merge in category order for the same arrangements as offerings. */
@@ -7023,7 +7409,7 @@ function normalizeBookingSettings(value) {
7023
7409
  };
7024
7410
  }
7025
7411
  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);
7412
+ 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
7413
  }
7028
7414
  function readNonEmptyString(value) {
7029
7415
  if (typeof value !== "string") return null;
@@ -7155,6 +7541,7 @@ const bookingServiceSchema = z.object({
7155
7541
  paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
7156
7542
  asksSiteTerms: z.boolean().optional(),
7157
7543
  consent: blockBookingConsentSchema.optional(),
7544
+ bookingQuestions: beforeBookingQuestionsPresentationSchema.optional(),
7158
7545
  categoryId: z.string().nullable().optional()
7159
7546
  });
7160
7547
  const bookingServiceCategorySchema = z.object({
@@ -7195,10 +7582,12 @@ const bookingSourceSchema = z.object({
7195
7582
  demoEmailSuppressed: z.boolean().optional(),
7196
7583
  mailingList: bookingMailingListContextSchema.optional(),
7197
7584
  siteTerms: blockSiteTermsSchema.optional(),
7585
+ pageNavigation: pageNavigationSchema.optional(),
7198
7586
  siteName: z.string().optional(),
7199
7587
  siteId: z.string().optional(),
7200
7588
  apiBaseUrl: z.string().optional(),
7201
7589
  portalToken: z.string().nullable().optional(),
7590
+ readAuthority: browserReadAuthoritySchema.optional(),
7202
7591
  formId: z.string().optional(),
7203
7592
  serviceId: z.string().nullable().optional(),
7204
7593
  resourceId: z.string().nullable().optional(),
@@ -7228,6 +7617,7 @@ const bookingHydrationSchema = z.object({
7228
7617
  demoEmailSuppressed: z.boolean().optional(),
7229
7618
  mailingList: bookingMailingListContextSchema.optional(),
7230
7619
  siteTerms: blockSiteTermsSchema.optional(),
7620
+ pageNavigation: pageNavigationSchema.optional(),
7231
7621
  siteName: z.string().optional(),
7232
7622
  formId: z.string().nullable(),
7233
7623
  serviceId: z.string().nullable(),
@@ -7249,9 +7639,10 @@ const bookingRenderSchema = z.object({
7249
7639
  const bookingFormIslandMetaCodec = createZodCodec(z.object({
7250
7640
  siteId: z.string().optional(),
7251
7641
  apiBaseUrl: z.string().optional(),
7252
- portalToken: z.string().nullable().optional()
7642
+ portalToken: z.string().nullable().optional(),
7643
+ readAuthority: browserReadAuthoritySchema.optional()
7253
7644
  }));
7254
- const bookingFormIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken");
7645
+ const bookingFormIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "readAuthority");
7255
7646
  function buildBookingFormDisplay(source, form = normalizeBookingFormConfig(source.form)) {
7256
7647
  return {
7257
7648
  kind: "booking-form",
@@ -7279,6 +7670,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
7279
7670
  demoEmailSuppressed: source.demoEmailSuppressed,
7280
7671
  mailingList: source.mailingList,
7281
7672
  siteTerms: source.siteTerms,
7673
+ pageNavigation: source.pageNavigation,
7282
7674
  siteName: source.siteName,
7283
7675
  formId: form?.id ?? source.formId ?? null,
7284
7676
  serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
@@ -7304,7 +7696,8 @@ createInteractiveIslandCodec({
7304
7696
  selectMeta: (value) => ({
7305
7697
  siteId: value.siteId,
7306
7698
  apiBaseUrl: value.apiBaseUrl,
7307
- portalToken: value.portalToken
7699
+ portalToken: value.portalToken,
7700
+ readAuthority: value.readAuthority
7308
7701
  })
7309
7702
  });
7310
7703
  function buildBookingFormInteractiveIslandProps(props) {
@@ -7314,7 +7707,8 @@ function buildBookingFormInteractiveIslandProps(props) {
7314
7707
  meta: {
7315
7708
  siteId: props.siteId,
7316
7709
  apiBaseUrl: props.apiBaseUrl,
7317
- portalToken: props.portalToken
7710
+ portalToken: props.portalToken,
7711
+ readAuthority: props.readAuthority
7318
7712
  },
7319
7713
  source: props
7320
7714
  });
@@ -8498,6 +8892,7 @@ function renderOfferingsCatalogueGroups({ props, groups, shape }) {
8498
8892
  const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
8499
8893
  const quickDateEvents = shape === "single" ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
8500
8894
  const populated = groups.flatMap(catalogueGroupItems);
8895
+ const frames = listGroupFrames(props);
8501
8896
  return /* @__PURE__ */ jsxs("div", {
8502
8897
  className: "offerings-preview rb-flex rb-flex-col rb-gap-6",
8503
8898
  "data-block": "offerings-preview",
@@ -8516,18 +8911,22 @@ function renderOfferingsCatalogueGroups({ props, groups, shape }) {
8516
8911
  props.children,
8517
8912
  /* @__PURE__ */ jsx("div", {
8518
8913
  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({
8914
+ ...frames.list,
8915
+ children: populated.map(({ group, items }) => /* @__PURE__ */ jsx(ListGroup, {
8916
+ presentation: listGroupPresentation(props),
8917
+ title: shape === "single" ? null : group.title,
8918
+ Heading: "h3",
8919
+ sectionProps: {
8920
+ ...frames.panel,
8921
+ className: "rb-flex rb-flex-col rb-gap-5",
8922
+ "data-offering-source": group.sourceKey
8923
+ },
8924
+ children: renderCatalogueItems({
8526
8925
  props,
8527
8926
  items,
8528
8927
  shape,
8529
8928
  groupTitle: group.title
8530
- })]
8929
+ })
8531
8930
  }, group.sourceKey))
8532
8931
  })
8533
8932
  ]
@@ -9133,34 +9532,30 @@ function RunWithoutLiveDates({ group, path }) {
9133
9532
  }
9134
9533
  function renderOfferingCardGroups(props) {
9135
9534
  const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
9535
+ const frames = listGroupFrames(props);
9136
9536
  return /* @__PURE__ */ jsx("div", {
9137
9537
  className: "rb-flex rb-flex-col rb-gap-10",
9538
+ ...frames.list,
9138
9539
  children: props.states.map((state) => {
9139
9540
  const cta = resolveOfferingsPreviewGroupCta({
9140
9541
  group: state.group,
9141
9542
  routes: props.routeCandidates?.routes ?? []
9142
9543
  });
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
- ]
9544
+ return /* @__PURE__ */ jsxs(ListGroup, {
9545
+ presentation: listGroupPresentation(props),
9546
+ title: state.group.title,
9547
+ intro: state.group.intro,
9548
+ Heading: "h3",
9549
+ sectionProps: {
9550
+ ...frames.panel,
9551
+ "data-offering-source": state.group.sourceKey
9552
+ },
9553
+ children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
9554
+ ...listLookSlot(props, "more"),
9555
+ className: "rb-item-text-link",
9556
+ href: cta.href,
9557
+ children: cta.label
9558
+ }) : null]
9164
9559
  }, state.group.sourceKey);
9165
9560
  })
9166
9561
  });
@@ -13817,6 +14212,7 @@ function resolveDemoEmailSuppression(dataContext) {
13817
14212
  }
13818
14213
  function pageRuntimeContext(dataContext) {
13819
14214
  return {
14215
+ pageNavigation: dataContext?.pageNavigation,
13820
14216
  interactionContext: dataContext?.interactionContext,
13821
14217
  dateContext: pageDateRuntimeContext(dataContext),
13822
14218
  now: dataContext?.now,