@riverbankcms/sdk 0.158.0 → 0.160.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 (196) hide show
  1. package/README.md +25 -6
  2. package/dist/_dts/{BlocksIslandsHydrator-BgNBtEai.d.ts → BlocksIslandsHydrator-CoqeotCL.d.ts} +1 -1
  3. package/dist/_dts/{Page-DpCo8zXD.d.ts → Page-C0ENVLCF.d.ts} +13 -6
  4. package/dist/_dts/{SdkPreviewMode-Bv2TMscG.d.ts → SdkPreviewMode-jZK0A49V.d.ts} +54 -126
  5. package/dist/_dts/{client-B960v2gW.d.ts → client-uMMuPq9V.d.ts} +23 -1
  6. package/dist/_dts/{content-types-CN0Wy8V6.d.ts → content-types-D6nXGqdQ.d.ts} +18 -18
  7. package/dist/_dts/{contracts-BFUrby76.d.ts → contracts-Bnmj1nxu.d.ts} +6 -5
  8. package/dist/_dts/{footerPageOutline-CmoqleLS.d.ts → footerPageOutline-CeLjFX8b.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-Dkvivc3R.d.ts → generatePageMetadata-nyU8q02J.d.ts} +5 -2
  10. package/dist/_dts/{index-DPfI2t5A.d.ts → index-BaaGBY1v.d.ts} +2 -2
  11. package/dist/_dts/{index-DCNu_8it.d.ts → index-Bg64CkV-.d.ts} +4 -4
  12. package/dist/_dts/index-Blwl7yl6.d.ts +13 -0
  13. package/dist/_dts/{index-DaS_z6ir.d.ts → index-C5xslEBn.d.ts} +2 -2
  14. package/dist/_dts/{index-DpgkhY-a.d.ts → index-CEaKil7G.d.ts} +2 -2
  15. package/dist/_dts/{index-Ba6RmuxX.d.ts → index-DahMwisK.d.ts} +3 -3
  16. package/dist/_dts/index-lkpjIg5i.d.ts +66 -0
  17. package/dist/_dts/{index-DfkFWUxt.d.ts → index-nVoi_74l.d.ts} +2 -2
  18. package/dist/_dts/{loadContent-DvvKF4nB.d.ts → loadContent-CYLmzvLq.d.ts} +16 -7
  19. package/dist/_dts/{resolvePageContent-D0lGwVD6.d.ts → resolvePageContent-DqnxChOs.d.ts} +2 -2
  20. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  21. package/dist/_dts/{hosted-booking-appearance-BIbit60h.d.ts → schema-D0bNcPWK.d.ts} +6921 -6768
  22. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client.d.ts +12 -6
  25. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  26. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/index.d.ts +8 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +8 -2
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  32. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  35. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  36. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  37. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  38. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  40. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  41. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  42. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  44. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  45. package/dist/_dts/sdk/src/server.d.ts +5 -5
  46. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  47. package/dist/_dts/{types-BJrRUaY7.d.ts → types-CFrYuXYP.d.ts} +2 -2
  48. package/dist/_dts/{navigation-n-eTVTIQ.d.ts → types-D8czmbQF.d.ts} +15430 -16836
  49. package/dist/_dts/{types-BY7PgnDi.d.ts → types-DSgmJ15W.d.ts} +7 -7
  50. package/dist/_dts/{types-maEnXL6Z.d.ts → types-Dm-KW7nj.d.ts} +10 -13
  51. package/dist/_dts/{validation-BjuVrMrs.d.ts → validation-Bmb4WnHg.d.ts} +4 -4
  52. package/dist/client/{BlocksIslandsHydrator-WRLS96Ev.mjs → BlocksIslandsHydrator-DZRKi6tT.mjs} +17 -17
  53. package/dist/client/{BookingMailingListNote-eovghMPa.mjs → BookingMailingListNote-C00sLLdL.mjs} +2 -2
  54. package/dist/client/{CalendarNavigationChevron-CIcMQRc1.mjs → CalendarNavigationChevron-CHSi9b3E.mjs} +6 -6
  55. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-Bhm6RAUL.mjs} +1 -1
  56. package/dist/client/{DemoBookingPortalAccess-CdnFgDyQ.mjs → DemoBookingPortalAccess-CaN-7ui7.mjs} +6 -6
  57. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-ClxN5_xZ.mjs} +1 -1
  58. package/dist/client/{EventCalendar.client-Dc-ZLxKo.mjs → EventCalendar.client-BncvSa1n.mjs} +10 -9
  59. package/dist/client/{EventCombined.client-C93XqRIv.mjs → EventCombined.client-DluBxVVu.mjs} +8 -8
  60. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-BiJrMtfp.mjs} +1 -1
  61. package/dist/client/{EventItem-DnCTygqk.mjs → EventItem-CXhnT9pF.mjs} +11 -6
  62. package/dist/client/{EventListWeekNavigation-9h97heuQ.mjs → EventListWeekNavigation-V-dtoDlD.mjs} +1 -1
  63. package/dist/client/{EventListing.client-DFKlQvvs.mjs → EventListing.client-DPO6SZbx.mjs} +3 -3
  64. package/dist/client/{EventListing.view-pAuTDyrP.mjs → EventListing.view-B-Yi5JZS.mjs} +7 -7
  65. package/dist/client/{EventRegistrationPayment-rgKlBvhP.mjs → EventRegistrationPayment-Dc3Fnlnw.mjs} +189 -176
  66. package/dist/client/{LeafletStaticMap-3XiWSgy0.mjs → LeafletStaticMap-ClZCCzAm.mjs} +1 -1
  67. package/dist/client/{Page-BmpeAwID.mjs → Page-7PkzO04N.mjs} +1949 -2074
  68. package/dist/client/{StepIndicator-qEq6X5zP.mjs → StepIndicator-DiD6euZ8.mjs} +3 -3
  69. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-BHd8GN8y.mjs} +1 -1
  70. package/dist/client/{ThemedButton-DVBC_pS9.mjs → ThemedButton-C22C9cCF.mjs} +174 -93
  71. package/dist/client/{accordion-DeObOasQ.mjs → accordion-2m27DsIk.mjs} +1 -1
  72. package/dist/client/{booking-form.client-DfWeF0lj.mjs → booking-form.client-BddWV5w1.mjs} +12 -12
  73. package/dist/client/{bookingForm-TnzIBHx2.mjs → bookingForm-bcdXQjmw.mjs} +4 -4
  74. package/dist/client/bookings.mjs +6 -6
  75. package/dist/client/{carousel-kkFnbr5Z.mjs → carousel-D7nj9I0y.mjs} +2 -2
  76. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-AffDJo_s.mjs} +1 -1
  77. package/dist/client/{cart-BAXNbFux.mjs → cart-PN6yCw1H.mjs} +3 -3
  78. package/dist/client/{cart.client-BczxUF70.mjs → cart.client-D4t1f0cJ.mjs} +1 -1
  79. package/dist/client/{checkout-C5NRhPeP.mjs → checkout-CsTwXVSb.mjs} +3 -3
  80. package/dist/client/{checkout.client-BuDk3Td9.mjs → checkout.client-BhQE3zY7.mjs} +1 -1
  81. package/dist/client/client.mjs +25 -13
  82. package/dist/client/{context-CVsgML69.mjs → context-BLAvalAa.mjs} +1 -1
  83. package/dist/client/{cta-BWnUuJce.mjs → cta-CUXhX_D7.mjs} +2 -1
  84. package/dist/client/dateFormatting-BHIHxNuo.mjs +61 -0
  85. package/dist/client/{demoPortalMagicLink-CUlwvmxf.mjs → demoPortalMagicLink-R-awbk_0.mjs} +1 -1
  86. package/dist/client/{enhanceHeaderSection-Cw8nnFj-.mjs → enhanceHeaderSection-9Q93uvTo.mjs} +3 -3
  87. package/dist/client/{event-details.client-Bl0E_6Vi.mjs → event-details.client-BS1WtG-a.mjs} +2 -2
  88. package/dist/client/{event-registration.client-DmfLg_LC.mjs → event-registration.client-BXndwsET.mjs} +35 -21
  89. package/dist/client/{eventCalendar-D1Dwb9VA.mjs → eventCalendar-HyoOt1Qz.mjs} +4 -4
  90. package/dist/client/{eventCombined-DfsqY1qR.mjs → eventCombined-sdG5oEaH.mjs} +4 -4
  91. package/dist/client/{eventDetails-BmugDVoa.mjs → eventDetails-FFAknE4w.mjs} +2 -2
  92. package/dist/client/{eventListing-BPAGJi3C.mjs → eventListing-CGK6urk3.mjs} +4 -4
  93. package/dist/client/{eventRegistration-DBlz_x6u.mjs → eventRegistration-VhrvCs4l.mjs} +4 -4
  94. package/dist/client/{form-DVu3ZMjx.mjs → form-C-B5O_ko.mjs} +3 -3
  95. package/dist/client/{form.client-QZUyABIY.mjs → form.client-DoZVcl8d.mjs} +5 -5
  96. package/dist/client/{form.parts-Bs0F3v08.mjs → form.parts-mttKpgif.mjs} +3 -3
  97. package/dist/client/{formatDate-BD9D3dgo.mjs → formatDate-xUSCknEO.mjs} +1 -1
  98. package/dist/client/gifting/client.mjs +3 -3
  99. package/dist/client/{headerSection-BQwWW4Yy.mjs → headerSection-BHUEXsaI.mjs} +2 -2
  100. package/dist/client/{location-map.client-upKuwABk.mjs → location-map.client-Cylb_MHw.mjs} +2 -2
  101. package/dist/client/{location-map.view-RuBCD10O.mjs → location-map.view-Cx4Bl7ij.mjs} +69 -6
  102. package/dist/client/{locationMap-1sCbsk0V.mjs → locationMap-QnKJi-nZ.mjs} +2 -2
  103. package/dist/client/{newsletter-form.client-DBTU3oNv.mjs → newsletter-form.client-D_n0rftg.mjs} +8 -8
  104. package/dist/client/{newsletter-form.parts-C9I9JBhe.mjs → newsletter-form.parts-DKHye4IE.mjs} +2 -2
  105. package/dist/client/{newsletterForm-DTPtTxxG.mjs → newsletterForm-tEaYelzx.mjs} +3 -3
  106. package/dist/client/{noop-DMFt3KdC.mjs → noop-B610YKEx.mjs} +12 -5
  107. package/dist/client/portal/client.mjs +4562 -174
  108. package/dist/client/{product-detail.client-BX7M5o6p.mjs → product-detail.client-DUf5x5Jt.mjs} +1 -1
  109. package/dist/client/{product-list.client-i32QNY4c.mjs → product-list.client-Cqp1BPTV.mjs} +1 -1
  110. package/dist/client/{productDetail-DWjE9zm7.mjs → productDetail-B8bBiogP.mjs} +3 -3
  111. package/dist/client/{productList-DZH9_brv.mjs → productList-BKN4D-1z.mjs} +3 -3
  112. package/dist/client/{propsDecoder-CTzHkEkh.mjs → propsDecoder-2nNZh2Oe.mjs} +3 -3
  113. package/dist/client/{registry.server-vJ5FlscU.mjs → registry.server-BAm4RPNJ.mjs} +856 -872
  114. package/dist/client/rendering/client.mjs +27 -26
  115. package/dist/client/rendering/islands.mjs +1 -1
  116. package/dist/client/rendering.mjs +47 -28
  117. package/dist/client/{richText-coerce-DXAmC72p.mjs → richText-coerce-Cv-qomNB.mjs} +1 -1
  118. package/dist/client/{routeIslandApiConfig-CmC7ygin.mjs → routeIslandApiConfig-C5u8MbAA.mjs} +1 -1
  119. package/dist/client/{shop-C7eL3B37.mjs → shop-DZNC0VKk.mjs} +3 -3
  120. package/dist/client/{shop-commerce-D8oRN0QJ.mjs → shop-commerce-DdX4LSa3.mjs} +12 -12
  121. package/dist/client/{shop-commerce-store-CRnQ4M18.mjs → shop-commerce-store-BJtrZov9.mjs} +1 -1
  122. package/dist/client/{shop.client-X6d6KVmA.mjs → shop.client-DmDd-igg.mjs} +16 -15
  123. package/dist/client/{shop.interactive-DBMeM8VD.mjs → shop.interactive-5SnnDHz3.mjs} +402 -35
  124. package/dist/client/{shopShared-Y182kN_s.mjs → shopShared-CPqUlAh9.mjs} +2 -2
  125. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  126. package/dist/client/timetableModel-C19rcHEw.mjs +960 -0
  127. package/dist/client/{useAvailableSlots-BDV6MHgJ.mjs → useAvailableSlots-BjbJXotk.mjs} +3 -3
  128. package/dist/client/{useBookingNowIso-DgJEv3ZY.mjs → useBookingNowIso-CMgfL7YJ.mjs} +1 -1
  129. package/dist/client/{useDiscountApply-BTu9EeT7.mjs → useDiscountApply-KG8jB7WC.mjs} +2 -2
  130. package/dist/client/{useDiscountCodeUi-BfZxdxI-.mjs → useDiscountCodeUi-DK2w_i0a.mjs} +1 -1
  131. package/dist/client/{useEventPagination-pnvdHGeQ.mjs → useEventPagination-DW6MCirb.mjs} +11 -10
  132. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  133. package/dist/client/{view-hJr_L4QC2.mjs → view-CkUn3Y0Y.mjs} +4 -4
  134. package/dist/client/{view-BPEa6Okm.mjs → view-CseyBW07.mjs} +15 -70
  135. package/dist/client/{wizardSteps-HdyGoIG3.mjs → wizardSteps-zgq10lN1.mjs} +262 -65
  136. package/dist/preview-next/before-render.mjs +1 -1
  137. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-lUHBrzHv.mjs} +1 -1
  138. package/dist/preview-next/client/{PreviewEditorSidebar-CXRUbqMp.mjs → PreviewEditorSidebar-DWyUGCAG.mjs} +1217 -107
  139. package/dist/preview-next/client/{PreviewEditorUI-CxjEV0Fm.mjs → PreviewEditorUI-Wq0b3Daw.mjs} +52 -79
  140. package/dist/preview-next/client/{SdkPreviewModeRuntime-XdQSGGj_.mjs → SdkPreviewModeRuntime-BtZPcwYV.mjs} +1 -1
  141. package/dist/preview-next/client/{SdkPreviewModeRuntime-BxI12BBS.mjs → SdkPreviewModeRuntime-wSI_R361.mjs} +720 -2035
  142. package/dist/preview-next/client/{SiteChromeCustomizeContext-CfRQRwpH.mjs → SiteChromeCustomizeContext-Hc4pYnNe.mjs} +14365 -8155
  143. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-DzeycIlD.mjs} +204 -93
  144. package/dist/preview-next/client/{previewChromeSurface-CH7hd5n7.mjs → previewChromeSurface-Corq4AG7.mjs} +3 -8
  145. package/dist/preview-next/client/runtime.mjs +3 -3
  146. package/dist/preview-next/client/{sdk-runtime-C6xEU1LI.mjs → sdk-runtime-CWymRWhK.mjs} +1 -1
  147. package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +1359 -0
  148. package/dist/preview-next/client/{spinner-BTf1CZmy.mjs → spinner-C4If5Y-O.mjs} +1 -1
  149. package/dist/preview-next/editor-base.css +62 -0
  150. package/dist/preview-next/editor-chrome.css +85 -0
  151. package/dist/preview-next/keepAlive.mjs +1 -1
  152. package/dist/preview-next/middleware.mjs +1 -1
  153. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-8csADeIT.mjs} +149 -112
  154. package/dist/server/{Block.shared-DLoilC2J.mjs → Block.shared-D1_gonwM.mjs} +6 -6
  155. package/dist/server/{bindings-C7DKLVx_.mjs → bindings-CFmJg5lm.mjs} +2 -2
  156. package/dist/server/{client-CU4wlMLE.mjs → client-DPsi0Dai.mjs} +9 -7
  157. package/dist/server/config-template-validation.mjs +50 -10
  158. package/dist/server/config-validation.mjs +1 -1
  159. package/dist/server/config.mjs +2 -2
  160. package/dist/server/{generatePageMetadata-CPvssVOp.mjs → generatePageMetadata-DB_lbrZ7.mjs} +28 -2
  161. package/dist/server/index.mjs +2 -2
  162. package/dist/server/{loadContent-DmQ4BiiQ.mjs → loadContent-RMCcuVU_.mjs} +33 -20
  163. package/dist/server/loadPage-DUPP51C-.mjs +2 -0
  164. package/dist/server/{loadPage-BBkDQA57.mjs → loadPage-DhDGzj7t.mjs} +8 -5
  165. package/dist/server/manifest.mjs +1 -1
  166. package/dist/server/metadata.mjs +2 -2
  167. package/dist/server/next.mjs +13 -12
  168. package/dist/server/{overrideResolution-ByeAbLSO.mjs → overrideResolution-OxY5FMuy.mjs} +1 -1
  169. package/dist/server/{overrides-BcA6ZPWf.mjs → overrides-Bz_A6sB9.mjs} +586 -518
  170. package/dist/server/page-converter.mjs +8 -10
  171. package/dist/server/{prebuild-8T-m7XjB.mjs → prebuild-B_1vrSru.mjs} +1 -1
  172. package/dist/server/prebuild.mjs +1 -1
  173. package/dist/server/{prefetchBlockData-Bjya-X9t.mjs → prefetchBlockData-B7ukYXXR.mjs} +841 -887
  174. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-Djbpc81A.mjs} +166 -129
  175. package/dist/server/{blocks-jlIm0PWc.mjs → registry-eFjKtEhF.mjs} +2349 -1716
  176. package/dist/server/rendering/server.mjs +4 -4
  177. package/dist/server/rendering.mjs +7 -7
  178. package/dist/server/{resolveBlockData-D0ow8PRJ.mjs → resolveBlockData-DYvEa9c5.mjs} +6 -3
  179. package/dist/server/routing.mjs +1 -1
  180. package/dist/server/{schema-Bs735S27.mjs → schema-C3dJ5UkL.mjs} +148 -88
  181. package/dist/server/server.mjs +3 -3
  182. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → siteChromeOverlayClearance-DALIAMwo.mjs} +108 -11
  183. package/dist/server/{src-B935_bzN.mjs → src-C5Mu-z0F.mjs} +268 -189
  184. package/dist/server/theme-bridge.mjs +1 -1
  185. package/dist/server/theme.mjs +1 -1
  186. package/dist/server/{themeAdmission-D2-BnmDO.mjs → themeAdmission-ruoyXb_0.mjs} +9 -7
  187. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  188. package/dist/server/{validation-Cm41pDUB.mjs → validation-B-Xar8QS.mjs} +22 -63
  189. package/dist/server/{version-Bo9C3McI.mjs → version-Bg7VHK3i.mjs} +1 -1
  190. package/dist/styles/index.css +78 -0
  191. package/package.json +8 -3
  192. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  193. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  194. package/dist/client/timetableModel-D7PwpaBY.mjs +0 -480
  195. package/dist/preview-next/client/siteStyleAccess-CRXaC2oL.mjs +0 -1326
  196. package/dist/server/loadPage-ZrcfjG3X.mjs +0 -2
@@ -1,7 +1,7 @@
1
- import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations, y as MissingBlockOverrideError } from "../overrides-BcA6ZPWf.mjs";
2
- import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "../themeAdmission-D2-BnmDO.mjs";
3
- import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, r as Layout, t as BlockContent } from "../Block.shared-DLoilC2J.mjs";
4
- import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-ByeAbLSO.mjs";
1
+ import { n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations, y as MissingBlockOverrideError } from "../overrides-Bz_A6sB9.mjs";
2
+ import { n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE } from "../themeAdmission-ruoyXb_0.mjs";
3
+ import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, r as Layout, t as BlockContent } from "../Block.shared-D1_gonwM.mjs";
4
+ import { i as Page, n as collectUsedBlockKindsFromPageOutline, r as resolveBlockOverridesForPage, t as buildPageBlockKindIndex } from "../overrideResolution-OxY5FMuy.mjs";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/rendering/components/Block.server.tsx
7
7
  /**
@@ -1,11 +1,11 @@
1
1
  import { a as mediaSchema, f as resolveManagedMediaReference, h as parseMediaIdentifier, l as buildRenderableMediaAssetIndex, m as parseCanonicalMediaIdentifier, o as persistableMediaSchema, p as mediaIdentifierSchema, s as runtimeMediaSchema, u as renderableMediaAssetSchema } from "./media-CcHwZkdJ.mjs";
2
- import { C as toBlocksMediaAssets, S as toBlocksImageResolveContextInput, _ as ThemeScope, b as PageRenderer, d as toPageHydrationBootstrapConfig, n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations, u as PageContent, v as EditorPageRenderer, w as buildThemeRuntime, x as toBlocksPageRendererDataContext, y as MissingBlockOverrideError } from "./overrides-BcA6ZPWf.mjs";
3
- import { $ as resolveImageSourceSetWithContext$1, Di as projectRepeaterGridLayoutForRendering$1, Ei as projectRepeaterGridLayout$1, Q as computeMediaTransformStyle, Y as RichText$2, et as resolveImageUrl$1, gi as parseFieldDefinition, ot as sanitizeHref, rt as buildResolveImageUrlContext, tt as resolveImageUrlWithContext$1 } from "./blocks-jlIm0PWc.mjs";
4
- import { _ as admitLayoutGridForPlan, n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE, v as deriveFieldValidationPlan } from "./themeAdmission-D2-BnmDO.mjs";
5
- import { x as resolveAuthoredLinkHref } from "./prefetchBlockData-Bjya-X9t.mjs";
6
- import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-DLoilC2J.mjs";
7
- import { t as loadPage } from "./loadPage-BBkDQA57.mjs";
8
- import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-DmQ4BiiQ.mjs";
2
+ import { C as toBlocksMediaAssets, S as toBlocksImageResolveContextInput, _ as ThemeScope, b as PageRenderer, d as toPageHydrationBootstrapConfig, n as defineBlockOverrides, r as defineLazyBlockOverride, t as defineBlockOverrideRegistrations, u as PageContent, v as EditorPageRenderer, w as buildThemeRuntime, x as toBlocksPageRendererDataContext, y as MissingBlockOverrideError } from "./overrides-Bz_A6sB9.mjs";
3
+ import { Ci as parseFieldDefinition, Ni as projectRepeaterGridLayout$1, Pi as projectRepeaterGridLayoutForRendering$1, Q as RichText$2, it as resolveImageUrlWithContext$1, lt as sanitizeHref, nt as resolveImageSourceSetWithContext$1, ot as buildResolveImageUrlContext, rt as resolveImageUrl$1, tt as computeMediaTransformStyle } from "./registry-eFjKtEhF.mjs";
4
+ import { _ as admitLayoutGridForPlan, n as MissingSdkThemeError, t as MISSING_SDK_THEME_ERROR_CODE, v as deriveFieldValidationPlan } from "./themeAdmission-ruoyXb_0.mjs";
5
+ import { x as resolveAuthoredLinkHref } from "./prefetchBlockData-B7ukYXXR.mjs";
6
+ import { a as buildFooterRenderablePageOutline, i as UnsupportedOverrideOnlyLayoutChromeError, n as toBlockHydrationBootstrapConfig, r as Layout, t as BlockContent } from "./Block.shared-D1_gonwM.mjs";
7
+ import { t as loadPage } from "./loadPage-DhDGzj7t.mjs";
8
+ import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-RMCcuVU_.mjs";
9
9
  import "./bindings-Dgt_0goJ.mjs";
10
10
  import { BlocksIslandsHydrator } from "#sdk-rendering-client";
11
11
  import "react";
@@ -1,4 +1,4 @@
1
- import { n as prefetchBlockData } from "./prefetchBlockData-Bjya-X9t.mjs";
1
+ import { n as prefetchBlockDataWithFailures } from "./prefetchBlockData-B7ukYXXR.mjs";
2
2
  import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-CdI7NvAW.mjs";
3
3
  //#region src/data/defineOwnDataProperty.ts
4
4
  /** Define a string key as ordinary data without invoking legacy prototype setters. */
@@ -416,7 +416,7 @@ function toHostDataLoaderWarning(failure) {
416
416
  }
417
417
  }
418
418
  const DEFAULT_RESOLVE_BLOCK_DATA_DEPS = {
419
- prefetchBlockData,
419
+ prefetchBlockData: prefetchBlockDataWithFailures,
420
420
  executeCodeLoaders,
421
421
  mergeLoaderResults,
422
422
  warn: warnHostDataLoaderFailure
@@ -463,7 +463,10 @@ async function resolveBlockDataWithDeps(deps, input) {
463
463
  searchParams: input.policy.searchParams
464
464
  }, input.policy.overrides);
465
465
  for (const failure of hostResult.failures) deps.warn(toHostDataLoaderWarning(failure));
466
- return deps.mergeLoaderResults(configData, hostResult.data);
466
+ return {
467
+ ...configData,
468
+ resolvedData: deps.mergeLoaderResults(configData.resolvedData, hostResult.data)
469
+ };
467
470
  }
468
471
  //#endregion
469
472
  export { normalizeDataLoaderSearchParams as i, createBlockDataLoadPolicy as n, resolveBlockDataWithDeps as r, DEFAULT_RESOLVE_BLOCK_DATA_DEPS as t };
@@ -69,7 +69,7 @@ async function checkRedirectForPath(params) {
69
69
  //#endregion
70
70
  //#region src/routing/resolveRoute.ts
71
71
  const defaultResolveRouteDeps = { loadPage: async (params) => {
72
- const { loadPage } = await import("./loadPage-ZrcfjG3X.mjs");
72
+ const { loadPage } = await import("./loadPage-DUPP51C-.mjs");
73
73
  return loadPage(params);
74
74
  } };
75
75
  /**
@@ -491,11 +491,33 @@ function relativeLuminance(r, g, b) {
491
491
  const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
492
492
  return .2126 * R + .7152 * G + .0722 * B;
493
493
  }
494
- function contrastRatio(hex1, hex2) {
495
- const { r: r1, g: g1, b: b1 } = hexToRgb(hex1);
496
- const { r: r2, g: g2, b: b2 } = hexToRgb(hex2);
497
- const L1 = relativeLuminance(r1, g1, b1);
498
- const L2 = relativeLuminance(r2, g2, b2);
494
+ function preparePaletteColourIndex(palette) {
495
+ const colours = [.../* @__PURE__ */ new Set([
496
+ ...Object.values(palette),
497
+ "#000000",
498
+ "#ffffff",
499
+ "#FFFFFF"
500
+ ])];
501
+ return Object.freeze(Object.fromEntries(colours.flatMap(colourIndexEntry)));
502
+ }
503
+ /** An unused unsupported colour must not turn preparation into an eager validation failure. */
504
+ function colourIndexEntry(hex) {
505
+ try {
506
+ return [[hex, colourLuminance(hex)]];
507
+ } catch {
508
+ return [];
509
+ }
510
+ }
511
+ function colourLuminance(hex) {
512
+ const { r, g, b } = hexToRgb(hex);
513
+ return relativeLuminance(r, g, b);
514
+ }
515
+ function indexedLuminance(hex, index) {
516
+ return (index && Object.prototype.hasOwnProperty.call(index, hex) ? index[hex] : void 0) ?? colourLuminance(hex);
517
+ }
518
+ function contrastRatio(hex1, hex2, index) {
519
+ const L1 = indexedLuminance(hex1, index);
520
+ const L2 = indexedLuminance(hex2, index);
499
521
  const [hi, lo] = L1 >= L2 ? [L1, L2] : [L2, L1];
500
522
  return (hi + .05) / (lo + .05);
501
523
  }
@@ -1485,6 +1507,7 @@ function defineButtonStyleRecipe(recipe) {
1485
1507
  }
1486
1508
  function mapButtonVisualAppearances(states, transform) {
1487
1509
  return {
1510
+ ...states,
1488
1511
  base: transform(states.base, "base"),
1489
1512
  hover: transform(states.hover, "hover"),
1490
1513
  focus: transform(states.focus, "focus"),
@@ -2304,7 +2327,7 @@ function formatButtonColourContractError(error) {
2304
2327
  }
2305
2328
  }
2306
2329
  function validateButtonSurfaceContrast(input) {
2307
- const ratio = contrastRatio(input.buttonPaint, input.surfaceHex);
2330
+ const ratio = contrastRatio(input.buttonPaint, input.surfaceHex, input.colourIndex);
2308
2331
  return ratio >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio ? { ok: true } : {
2309
2332
  ok: false,
2310
2333
  error: {
@@ -2319,7 +2342,7 @@ function validateButtonSurfaceContrast(input) {
2319
2342
  };
2320
2343
  }
2321
2344
  function validateButtonTextContrast(input) {
2322
- const ratio = contrastRatio(input.backgroundHex, input.foregroundHex);
2345
+ const ratio = contrastRatio(input.backgroundHex, input.foregroundHex, input.colourIndex);
2323
2346
  return ratio >= BUTTON_CONTRAST_POLICY.textMinimumRatio ? { ok: true } : {
2324
2347
  ok: false,
2325
2348
  error: {
@@ -2341,7 +2364,7 @@ function solidForegroundToken(backgroundToken) {
2341
2364
  //#region ../theme-core/src/buttons/contextualHover.ts
2342
2365
  function resolveContextualHoverPreference(input) {
2343
2366
  const preferred = input.instruction.preferredToken;
2344
- if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
2367
+ if (preferred && isSafeCandidate(preferred, input.palette, input.surface, input.colourIndex)) return {
2345
2368
  kind: "resolved",
2346
2369
  token: preferred,
2347
2370
  repair: null
@@ -2369,7 +2392,7 @@ function resolveContextualHover(input) {
2369
2392
  kind: "unavailable",
2370
2393
  reason: "no-distinct-shade"
2371
2394
  };
2372
- const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
2395
+ const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette, input.colourIndex));
2373
2396
  if (textSafe.length === 0) return {
2374
2397
  kind: "unavailable",
2375
2398
  reason: "no-text-safe-candidate"
@@ -2386,17 +2409,12 @@ function resolveContextualHover(input) {
2386
2409
  reason: "no-text-safe-candidate"
2387
2410
  };
2388
2411
  }
2389
- const selected = textSafe.map((candidate) => ({
2390
- ...candidate,
2391
- surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface?.backgroundHex ?? "")
2392
- })).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
2393
- const distanceDifference = left.distance - right.distance;
2394
- if (distanceDifference !== 0) return distanceDifference;
2395
- const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
2396
- if (contrastDifference !== 0) return contrastDifference;
2397
- if (left.direction === right.direction) return left.token.localeCompare(right.token);
2398
- return left.direction === input.instruction.fallbackDirection ? -1 : 1;
2399
- })[0];
2412
+ const selected = selectSurfaceSafeHover(textSafe, {
2413
+ palette: input.palette,
2414
+ surface: input.surface,
2415
+ colourIndex: input.colourIndex,
2416
+ fallbackDirection: input.instruction.fallbackDirection
2417
+ });
2400
2418
  return selected ? {
2401
2419
  kind: "resolved",
2402
2420
  token: selected.token,
@@ -2407,6 +2425,20 @@ function resolveContextualHover(input) {
2407
2425
  reason: "no-surface-safe-candidate"
2408
2426
  };
2409
2427
  }
2428
+ /** Rank the proven-surface candidates without mixing selection with fallback policy. */
2429
+ function selectSurfaceSafeHover(candidates, input) {
2430
+ return candidates.map((candidate) => ({
2431
+ ...candidate,
2432
+ surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface.backgroundHex, input.colourIndex)
2433
+ })).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
2434
+ const distanceDifference = left.distance - right.distance;
2435
+ if (distanceDifference !== 0) return distanceDifference;
2436
+ const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
2437
+ if (contrastDifference !== 0) return contrastDifference;
2438
+ if (left.direction === right.direction) return left.token.localeCompare(right.token);
2439
+ return left.direction === input.fallbackDirection ? -1 : 1;
2440
+ })[0];
2441
+ }
2410
2442
  function shadeCandidates(seedToken, palette) {
2411
2443
  const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
2412
2444
  const family = match?.[1] ?? String(seedToken);
@@ -2432,14 +2464,14 @@ function candidate(family, shade, currentShade, direction, seedHex, palette) {
2432
2464
  surfaceContrast: null
2433
2465
  };
2434
2466
  }
2435
- function hasSafeTextContrast(token, palette) {
2467
+ function hasSafeTextContrast(token, palette, colourIndex) {
2436
2468
  const background = palette[token];
2437
2469
  const foreground = palette[solidForegroundToken(token)];
2438
- return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
2470
+ return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground, colourIndex) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
2439
2471
  }
2440
- function isSafeCandidate(token, palette, surface) {
2441
- if (!hasSafeTextContrast(token, palette)) return false;
2442
- return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
2472
+ function isSafeCandidate(token, palette, surface, colourIndex) {
2473
+ if (!hasSafeTextContrast(token, palette, colourIndex)) return false;
2474
+ return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex, colourIndex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
2443
2475
  }
2444
2476
  function escapeRegExp(value) {
2445
2477
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -2451,6 +2483,7 @@ function resolveButtonHoverTreatment(input) {
2451
2483
  const contextual = resolveContextualHoverPreference({
2452
2484
  instruction: input.variant.contextualHover,
2453
2485
  palette: input.palette,
2486
+ colourIndex: input.colourIndex,
2454
2487
  surface: input.surface
2455
2488
  });
2456
2489
  if (contextual.kind === "resolved") return {
@@ -2502,7 +2535,8 @@ function compileButtonColourStates(input) {
2502
2535
  global: input.global,
2503
2536
  fallback: base.treatment,
2504
2537
  palette: input.palette,
2505
- surface: input.surface
2538
+ surface: input.surface,
2539
+ colourIndex: input.colourIndex
2506
2540
  });
2507
2541
  const edge = buttonEdge(input.variant);
2508
2542
  const colours = collectStateColours(mapVisualStates((state) => compileVisualState(input, state, state === "hover" ? hover.treatment : base.treatment, edge, base.nonColourEffects)));
@@ -2560,6 +2594,7 @@ function compileDeclaredVisualState(input, states, state, treatment) {
2560
2594
  treatment: transition.treatment,
2561
2595
  palette: input.palette,
2562
2596
  surface: input.surface,
2597
+ colourIndex: input.colourIndex,
2563
2598
  edge
2564
2599
  });
2565
2600
  return resolved.ok ? {
@@ -2586,6 +2621,7 @@ function compileVisualState(input, state, treatment, edge, baseEffects) {
2586
2621
  treatment: transition.treatment,
2587
2622
  palette: input.palette,
2588
2623
  surface: input.surface,
2624
+ colourIndex: input.colourIndex,
2589
2625
  edge
2590
2626
  });
2591
2627
  return resolved.ok ? {
@@ -2804,11 +2840,11 @@ function interpolateHex(startHex, endHex, position) {
2804
2840
  * Derive only what the rendered section can honestly prove about its backing.
2805
2841
  * Images, gradients, alpha/composite layers and arbitrary CSS remain unknown.
2806
2842
  */
2807
- function deriveButtonSurfaceContext(input, palette, fallbackToken) {
2843
+ function deriveButtonSurfaceContext(input, palette, fallbackToken, colourIndex) {
2808
2844
  const background = deriveKnownBackground(input, palette, fallbackToken);
2809
2845
  if (background.kind === "unknown") return background;
2810
2846
  const explicitForeground = resolveKnownColour(input.kind === "solid" || input.kind === "inherit" ? input.foreground ?? "" : "", palette);
2811
- const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex) >= 4.5 ? explicitForeground : safestBlackOrWhite(background.colour.hex);
2847
+ const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex, colourIndex) >= 4.5 ? explicitForeground : safestBlackOrWhite(background.colour.hex, colourIndex);
2812
2848
  return {
2813
2849
  kind: "known-solid",
2814
2850
  source: background.source,
@@ -2891,7 +2927,7 @@ function resolveSurfaceButtonContext(input) {
2891
2927
  kind: "inherit",
2892
2928
  styles: {}
2893
2929
  };
2894
- const context = deriveButtonSurfaceContext(input.surface, input.palette, input.fallbackToken);
2930
+ const context = deriveButtonSurfaceContext(input.surface, input.palette, input.fallbackToken, input.colourIndex);
2895
2931
  if (context.kind !== "known-solid") return context.reason === "missing-background" ? {
2896
2932
  kind: "inherit",
2897
2933
  styles: {}
@@ -2904,6 +2940,7 @@ function resolveSurfaceButtonContext(input) {
2904
2940
  styles: knownSurfaceButtonContextStyles({
2905
2941
  surface: context.surface,
2906
2942
  palette: input.palette,
2943
+ colourIndex: input.colourIndex,
2907
2944
  buttonSystem: surfaceButtonSystem(input.buttonSystem, input.primaryToken)
2908
2945
  })
2909
2946
  };
@@ -2914,6 +2951,7 @@ function knownSurfaceButtonContextStyles(input) {
2914
2951
  role,
2915
2952
  buttonSystem: input.buttonSystem,
2916
2953
  palette: input.palette,
2954
+ colourIndex: input.colourIndex,
2917
2955
  surface: input.surface
2918
2956
  })))));
2919
2957
  }
@@ -2924,57 +2962,53 @@ function resolveContextualButtonRole(input) {
2924
2962
  requestedRole: input.role,
2925
2963
  rejectedCandidates: []
2926
2964
  };
2927
- const rejected = [];
2928
- const preferred = compileCandidate(requested, input.buttonSystem, input.palette, input.surface);
2929
- if (preferred.ok) {
2930
- if (preferred.contextualHoverRepair) return {
2931
- kind: "repaired",
2932
- requestedRole: input.role,
2933
- candidate: "contextual-hover",
2934
- states: preferred.states,
2935
- focusIndicator: preferred.focusIndicator,
2936
- boundary: boundaryForVariant(requested),
2937
- rejectedCandidates: []
2938
- };
2939
- return {
2940
- kind: "preferred",
2941
- requestedRole: input.role,
2942
- states: preferred.states,
2943
- focusIndicator: preferred.focusIndicator,
2944
- boundary: boundaryForVariant(requested)
2945
- };
2946
- }
2947
- rejected.push({
2965
+ const preferred = compileCandidate(requested, input);
2966
+ if (preferred.ok) return preferredButtonResolution(requested, preferred, input.role);
2967
+ return resolveFallbackButtonRole(input, requested, (input.buttonSystem.surfacePolicy ?? STANDARD_BUTTON_SURFACE_POLICY)[input.role], [{
2948
2968
  candidate: "preferred",
2949
2969
  error: preferred.error
2950
- });
2951
- const policy = input.buttonSystem.surfacePolicy ?? STANDARD_BUTTON_SURFACE_POLICY;
2952
- for (const fallback of policy[input.role]) {
2953
- const candidate = candidateVariant(fallback, requested, input.buttonSystem);
2954
- if (!candidate) continue;
2955
- const compiled = compileCandidate(candidate.variant, input.buttonSystem, input.palette, input.surface);
2956
- if (!compiled.ok) {
2957
- rejected.push({
2958
- candidate: candidate.name,
2959
- error: compiled.error
2960
- });
2961
- continue;
2962
- }
2963
- return {
2964
- kind: "repaired",
2965
- requestedRole: input.role,
2966
- candidate: candidate.name,
2967
- states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
2968
- focusIndicator: compiled.focusIndicator,
2969
- boundary: candidate.boundary,
2970
- rejectedCandidates: rejected
2971
- };
2972
- }
2973
- return {
2970
+ }]);
2971
+ }
2972
+ function preferredButtonResolution(requested, compiled, role) {
2973
+ const appearance = {
2974
+ requestedRole: role,
2975
+ states: compiled.states,
2976
+ focusIndicator: compiled.focusIndicator,
2977
+ boundary: boundaryForVariant(requested)
2978
+ };
2979
+ return compiled.contextualHoverRepair ? {
2980
+ ...appearance,
2981
+ kind: "repaired",
2982
+ candidate: "contextual-hover",
2983
+ rejectedCandidates: []
2984
+ } : {
2985
+ ...appearance,
2986
+ kind: "preferred"
2987
+ };
2988
+ }
2989
+ /** Ordered, lazy fallback selection; the rejected evidence belongs to this decision. */
2990
+ function resolveFallbackButtonRole(input, requested, fallbacks, rejected) {
2991
+ const [fallback, ...remaining] = fallbacks;
2992
+ if (!fallback) return {
2974
2993
  kind: "unresolved",
2975
2994
  requestedRole: input.role,
2976
2995
  rejectedCandidates: rejected
2977
2996
  };
2997
+ const candidate = candidateVariant(fallback, requested, input.buttonSystem);
2998
+ if (!candidate) return resolveFallbackButtonRole(input, requested, remaining, rejected);
2999
+ const compiled = compileCandidate(candidate.variant, input);
3000
+ return compiled.ok ? {
3001
+ kind: "repaired",
3002
+ requestedRole: input.role,
3003
+ candidate: candidate.name,
3004
+ states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
3005
+ focusIndicator: compiled.focusIndicator,
3006
+ boundary: candidate.boundary,
3007
+ rejectedCandidates: rejected
3008
+ } : resolveFallbackButtonRole(input, requested, remaining, [...rejected, {
3009
+ candidate: candidate.name,
3010
+ error: compiled.error
3011
+ }]);
2978
3012
  }
2979
3013
  function contextualButtonSurfaceStyles(resolution) {
2980
3014
  if (resolution.kind === "unresolved") return resetActionVariables(resolution.requestedRole);
@@ -3039,12 +3073,13 @@ function actionVariableFallback(role, state, property, fallback) {
3039
3073
  function actionVariablePrefix(role, state) {
3040
3074
  return `--rb-action-${role}-${state}`;
3041
3075
  }
3042
- function compileCandidate(variant, system, palette, surface) {
3076
+ function compileCandidate(variant, context) {
3043
3077
  return compileButtonColourStates({
3044
3078
  variant,
3045
- global: system.global,
3046
- palette,
3047
- surface
3079
+ global: context.buttonSystem.global,
3080
+ palette: context.palette,
3081
+ surface: context.surface,
3082
+ colourIndex: context.colourIndex
3048
3083
  });
3049
3084
  }
3050
3085
  function candidateVariant(fallback, requested, system) {
@@ -3164,8 +3199,8 @@ function normalizeOpaqueHex(value) {
3164
3199
  if (!match?.[1]) return null;
3165
3200
  return `#${(match[1].length === 3 ? match[1].split("").map((digit) => `${digit}${digit}`).join("") : match[1]).toLowerCase()}`;
3166
3201
  }
3167
- function safestBlackOrWhite(backgroundHex) {
3168
- return contrastRatio(backgroundHex, "#000000") >= contrastRatio(backgroundHex, "#ffffff") ? {
3202
+ function safestBlackOrWhite(backgroundHex, colourIndex) {
3203
+ return contrastRatio(backgroundHex, "#000000", colourIndex) >= contrastRatio(backgroundHex, "#ffffff", colourIndex) ? {
3169
3204
  hex: "#000000",
3170
3205
  css: "#000000",
3171
3206
  source: "literal-css"
@@ -3191,8 +3226,10 @@ function contextualBoundaryStyles(boundary) {
3191
3226
  //#endregion
3192
3227
  //#region ../theme-core/src/surfaces/opaqueSurface.ts
3193
3228
  function opaqueSurfaceContextFromTheme(theme) {
3229
+ const palette = expandPalette(theme.palette);
3194
3230
  return {
3195
- palette: expandPalette(theme.palette),
3231
+ palette,
3232
+ colourIndex: preparePaletteColourIndex(palette),
3196
3233
  buttonSystem: theme.buttons,
3197
3234
  linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken
3198
3235
  };
@@ -3989,8 +4026,28 @@ function terminalFallbackSurface(input) {
3989
4026
  };
3990
4027
  }
3991
4028
  function resolveSurface(spec, context) {
4029
+ return spec.kind === "section" ? resolveSectionSurface(spec.background, context) : preparedSurfaceValue(spec, context) ?? resolveSurfaceSpec(spec, context);
4030
+ }
4031
+ function preparedSurfaceValue(spec, context) {
4032
+ const index = context.preparedSurfaces;
4033
+ if (!index || index.palette !== context.palette || index.buttonSystem !== context.buttonSystem || index.colourIndex !== context.colourIndex) return void 0;
4034
+ return index.values[surfaceResolutionKey(spec, context)];
4035
+ }
4036
+ function surfaceResolutionKey(spec, context) {
4037
+ const declaration = spec.kind === "tint" ? {
4038
+ ...spec,
4039
+ opacity: String(spec.opacity)
4040
+ } : spec;
4041
+ return JSON.stringify([
4042
+ declaration,
4043
+ context.linkHoverToken,
4044
+ context.foreground,
4045
+ context.compositeBase,
4046
+ context.buttonContext
4047
+ ]);
4048
+ }
4049
+ function resolveSurfaceSpec(spec, context) {
3992
4050
  switch (spec.kind) {
3993
- case "section": return resolveSectionSurface(spec.background, context);
3994
4051
  case "recipe": return resolveRecipeSurface(spec.intent, context);
3995
4052
  case "paint": return spec.paint.kind === "transparent" ? { kind: "inherit" } : resolveOwnedSurface(spec.paint, context);
3996
4053
  case "token": return resolveOwnedSurface({
@@ -4069,7 +4126,7 @@ function resolveOwnedSurface(paint, context) {
4069
4126
  decorations: surfaceDecorationColors(resolved, context.palette),
4070
4127
  hoverDecoration: resolved.kind === "known" ? resolved.hoverDecoration : "underline",
4071
4128
  buttonContext: resolveSurfaceButtons(paint, resolved, context),
4072
- contrast: surfaceContrast(resolved, context.palette)
4129
+ contrast: surfaceContrast(resolved, context.palette, context.colourIndex)
4073
4130
  };
4074
4131
  }
4075
4132
  /** Unprovable legacy paint retains its declared foreground instead of inventing one. */
@@ -4094,15 +4151,16 @@ function resolveSurfaceButtons(paint, foreground, context) {
4094
4151
  foreground: foreground.kind === "known" ? foreground.roles.link : void 0
4095
4152
  } : { kind: "gradient" },
4096
4153
  palette: context.palette,
4154
+ colourIndex: context.colourIndex,
4097
4155
  buttonSystem: context.buttonSystem,
4098
4156
  primaryToken: context.buttonContext?.primary ?? (paint.kind === "solid" ? context.buttonSystem?.surfaceContexts?.[paint.token]?.primary : void 0),
4099
4157
  withoutButtonSystem: "reset"
4100
4158
  });
4101
4159
  }
4102
- function surfaceContrast(foreground, palette) {
4160
+ function surfaceContrast(foreground, palette, colourIndex) {
4103
4161
  if (foreground.kind !== "known" || foreground.provenance.kind !== "measured") return { kind: "unmeasured" };
4104
4162
  const backdrop = foreground.provenance.backdropHex;
4105
- const ratio = (token) => contrastRatio(resolveConcreteColorHex(token, palette) ?? backdrop, backdrop);
4163
+ const ratio = (token) => contrastRatio(resolveConcreteColorHex(token, palette) ?? backdrop, backdrop, colourIndex);
4106
4164
  return {
4107
4165
  kind: "measured",
4108
4166
  ratios: {
@@ -4132,6 +4190,7 @@ function resolveSectionSurface(background, context) {
4132
4190
  foreground: foreground.kind === "known" ? foreground.roles.link : void 0
4133
4191
  } : background.type === "gradient" ? { kind: "gradient" } : { kind: "image" },
4134
4192
  palette: context.palette,
4193
+ colourIndex: context.colourIndex,
4135
4194
  buttonSystem: context.buttonSystem,
4136
4195
  primaryToken: sectionPrimaryButtonToken(background, context),
4137
4196
  fallbackToken: context.compositeBase,
@@ -4151,10 +4210,11 @@ function surfaceDecorationColors(foreground, palette) {
4151
4210
  }
4152
4211
  /** Composite the declared palette tint before checking every foreground role. */
4153
4212
  function resolveTintSurface(spec, context) {
4154
- const base = resolveOwnedSurface({
4155
- kind: "solid",
4213
+ const base = resolveSurface({
4214
+ kind: "token",
4156
4215
  token: spec.base
4157
4216
  }, context);
4217
+ if (base.kind !== "owned") throw new Error(`Cannot derive tint on ${spec.base}`);
4158
4218
  const source = spec.source === "text" ? base.foreground.text : base.decorations?.mark;
4159
4219
  const token = source ? resolveOpaqueSurfaceHex(`${source}/${spec.opacity}`, context.palette, spec.base) : null;
4160
4220
  const hex = source ? resolveConcreteColorHex(source, context.palette) : null;
@@ -6793,7 +6853,7 @@ const EFFECT_PRESETS = [
6793
6853
  customizableOption: {
6794
6854
  name: "solidOnHover",
6795
6855
  type: "select",
6796
- label: "Hover Behavior",
6856
+ label: "Hover behaviour",
6797
6857
  default: "false",
6798
6858
  options: ["false", "true"]
6799
6859
  },
@@ -1,4 +1,4 @@
1
- import { t as loadPage } from "./loadPage-BBkDQA57.mjs";
2
- import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-DmQ4BiiQ.mjs";
3
- import { t as createRiverbankClient } from "./client-CU4wlMLE.mjs";
1
+ import { t as loadPage } from "./loadPage-DhDGzj7t.mjs";
2
+ import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-RMCcuVU_.mjs";
3
+ import { t as createRiverbankClient } from "./client-DPsi0Dai.mjs";
4
4
  export { createRiverbankClient, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage };