@riverbankcms/sdk 0.182.0 → 0.183.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 (226) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +49 -3
  3. package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
  4. package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-CEqZJZEE.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
  6. package/dist/_dts/{client-D6T430bk.d.ts → client-B_B_amKD.d.ts} +2 -1
  7. package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
  8. package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
  10. package/dist/_dts/{index-CEyYMhLJ.d.ts → index-BOpUh8kO.d.ts} +1 -1
  11. package/dist/_dts/{index-DIU-wL1M.d.ts → index-Bizdaxji.d.ts} +2 -2
  12. package/dist/_dts/{index-Cqxis-nv.d.ts → index-BxCmCit0.d.ts} +1 -1
  13. package/dist/_dts/{index-CQrb3Ccc.d.ts → index-CjAkEWAp.d.ts} +4 -4
  14. package/dist/_dts/{index-DqPKdeTk.d.ts → index-iuFrbIjt.d.ts} +1 -1
  15. package/dist/_dts/{index-CciRW_w1.d.ts → index-liuhlOX7.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
  17. package/dist/_dts/{request-DEwxUSw8.d.ts → request-Gn0O1blj.d.ts} +24912 -23733
  18. package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-xzJ3c9Na.d.ts} +1 -1
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  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 +3 -3
  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/portal/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +91 -2
  55. package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
  56. package/dist/_dts/{types-B3RjeBLV.d.ts → types-BoITy0rA.d.ts} +41 -4
  57. package/dist/_dts/{types-BvUSGQrw.d.ts → types-DBNuMtSk.d.ts} +16 -5
  58. package/dist/_dts/{types-CkRFtBqd.d.ts → types-DHMcuoeQ.d.ts} +7 -7
  59. package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-BIPO-XlE.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +25 -8
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
  67. package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
  70. package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-Fr2qi2C2.mjs} +29 -14
  71. package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
  72. package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-COuEJzbO.mjs} +6 -6
  74. package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +21 -42
  75. package/dist/client/{Page-sV6BJkXX.mjs → Page-CgbQZP5g.mjs} +2786 -927
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
  78. package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
  79. package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DyXoI3ob.mjs} +7 -7
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
  81. package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-wj4Rloo5.mjs} +336 -119
  82. package/dist/client/{accordion-6cuswD_s.mjs → accordion-BVXfjnh-.mjs} +1 -1
  83. package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-DycPGtke.mjs} +191 -71
  84. package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
  87. package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
  88. package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DyCLMP8s.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DffP_Nv0.mjs} +1 -1
  90. package/dist/client/{cart-BYOe7MCh.mjs → cart-BuEp_cj4.mjs} +3 -3
  91. package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-CAO39uDG.mjs} +1 -1
  92. package/dist/client/{checkout-Dwd7Di77.mjs → checkout-BoxzT64s.mjs} +3 -3
  93. package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
  95. package/dist/client/client.mjs +446 -93
  96. package/dist/client/{constants-DdxFG3Ic.mjs → constants-C_8AxMdm.mjs} +1 -1
  97. package/dist/client/{context-Hi1RuYEM.mjs → context-D1L0pe__.mjs} +2 -2
  98. package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
  101. package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
  102. package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
  103. package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
  104. package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-aTLifOX7.mjs} +4 -4
  105. package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
  106. package/dist/client/{form-DWnlEVSK.mjs → form-Dikmc2AO.mjs} +3 -3
  107. package/dist/client/{form.client-D7zmeqNI.mjs → form.client-zHaQK5I9.mjs} +5 -5
  108. package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-BLl9n8TH.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-Cn0jidP5.mjs → gifting-CufPM38H.mjs} +4 -4
  111. package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--N1GaSY8.mjs} +155 -84
  112. package/dist/client/gifting.interactive-D9MK4HkV.mjs +157 -0
  113. package/dist/client/gifting.parts-CRtiRzo-.mjs +119 -0
  114. package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-BIaBpmk3.mjs} +2 -2
  115. package/dist/client/{noop-jesvJXEE.mjs → islands-DJDLGQEm.mjs} +14007 -6685
  116. package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +226 -195
  118. package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
  119. package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +31 -27
  121. package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DTHlWg_F.mjs} +22 -7
  123. package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
  124. package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
  125. package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-DhZAwo60.mjs} +3 -3
  126. package/dist/client/{productList-BuLemmod.mjs → productList-BiVpbZK2.mjs} +3 -3
  127. package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
  128. package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-C3OBRg7x.mjs} +2027 -781
  129. package/dist/client/rendering/client.mjs +29 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +5 -5
  132. package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-ms477Z08.mjs} +2 -2
  133. package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
  135. package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
  136. package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
  137. package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
  138. package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
  139. package/dist/client/{shop-GuMqnDL-.mjs → shop-xt4dQ3HH.mjs} +3 -3
  140. package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
  141. package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-DS8t6749.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
  144. package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-Dy3nNfTG.mjs} +11 -8
  145. package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
  146. package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
  147. package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
  148. package/dist/client/{view-DOyZc-DF.mjs → view-4gnPcpWJ.mjs} +24 -9
  149. package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-DDvL3iza.mjs} +76 -159
  150. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CLqSRUpt.mjs} +1 -1
  151. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-CIdAg-Tm.mjs} +1 -1
  152. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-Bm85jX35.mjs} +2 -2
  153. package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
  154. package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3864 -1943
  155. package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
  156. package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +12 -8
  158. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-ORNN4x-3.mjs} +782 -16
  159. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-eAi3tDAr.mjs} +11 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-CqH91EwA.mjs} +17988 -6757
  161. package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
  164. package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
  165. package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
  166. package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-BaWUF9D7.mjs} +2007 -448
  167. package/dist/preview-next/container-responsive.css +320 -0
  168. package/dist/preview-next/editor-chrome.css +23 -2
  169. package/dist/preview-next/keepAlive.mjs +1 -1
  170. package/dist/preview-next/middleware.mjs +1 -1
  171. package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-Ch0X99vE.mjs} +163 -17
  172. package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-B2FmczLO.mjs} +5 -5
  173. package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DtAyv9qA.mjs} +17 -7
  174. package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-BtPqb76u.mjs} +418 -31
  175. package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
  176. package/dist/server/{bindings-DMJH4bvo.mjs → bindings-B_9JuU66.mjs} +7 -7
  177. package/dist/server/{client-DrwlRNAH.mjs → client-DC7cjiSw.mjs} +469 -92
  178. package/dist/server/config-validation.mjs +1 -1
  179. package/dist/server/config.mjs +2 -2
  180. package/dist/server/{constants-CeMywaiD.mjs → constants-d6nPNJpe.mjs} +22 -6
  181. package/dist/server/{customCss-C9kgPHvr.mjs → customCss-rtIfEYwQ.mjs} +1 -18
  182. package/dist/server/data/resolveBlockData.mjs +1 -1
  183. package/dist/server/{expandPalette-ehuW8r2g.mjs → expandPalette-DxPrNOAB.mjs} +182 -90
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-D0prFflT.mjs → loadContent-hb27HYic.mjs} +11 -10
  186. package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-JToD8wDD.mjs} +3 -3
  187. package/dist/server/{lookMediaFrame-H0fi4bJk.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-wrcuWmgp.mjs → navigation-B2WhGofA.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +8 -8
  192. package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +3 -3
  194. package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +86 -97
  195. package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
  196. package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-m80Xu2pd.mjs} +429 -247
  197. package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
  198. package/dist/server/{portal-pG_uhsI2.mjs → portal-B2wCQno_.mjs} +1 -1
  199. package/dist/server/portal.mjs +2 -2
  200. package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-BWIkFaXq.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
  203. package/dist/server/{registry-Cc88-23f.mjs → registry-KtsOsAzY.mjs} +20113 -9774
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +9 -9
  209. package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-sjIDJYl7.mjs} +1 -1
  210. package/dist/server/{schema-CwfxQjc4.mjs → schema-BBEqquBM.mjs} +44 -28
  211. package/dist/server/server.mjs +3 -3
  212. package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-ChEZDRwU.mjs} +37 -14
  213. package/dist/server/theme-bridge.mjs +3 -3
  214. package/dist/server/theme.mjs +2 -2
  215. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-DKCIBeb1.mjs} +2 -2
  216. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-DybHErxH.mjs} +4 -4
  217. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  218. package/dist/server/{types-BKaBZFjD.mjs → types-vyz09w64.mjs} +479 -8
  219. package/dist/server/{validation-BovmbS8N.mjs → validation-Cvi-1TZZ.mjs} +13 -9
  220. package/dist/server/{version-hws4hgyX.mjs → version-B-icAIV1.mjs} +1 -1
  221. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  222. package/dist/styles/index.css +2482 -108
  223. package/package.json +1 -1
  224. package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
  225. package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
  226. package/dist/client/types-BEaKfam_.mjs +0 -778
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as stableJsonStringify } from "./stable-json-D0XAEIXc.mjs";
3
- import { C as paletteModeSchema, O as VARIANT_ROLES, T as parseThemeColorToken, _ as hexColorSchema, c as buttonEffectApplicationSchema, h as PALETTE_TOKEN_NAMES, m as parseOpaqueButtonColourToken, n as STANDARD_BUTTON_SURFACE_POLICY, p as opaqueButtonColourTokenSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, v as isThemeColorToken, w as parseColorTokenParts, x as paletteColorsFromEntries, y as normalizePaletteHex } from "./types-BEaKfam_.mjs";
3
+ import { A as normalizePaletteHex, C as parseOpaqueButtonColourToken, E as PALETTE_TOKEN_NAMES, F as parseColorTokenParts, I as parseThemeColorToken, M as paletteColorsFromEntries, O as hexColorSchema, P as paletteModeSchema, S as opaqueButtonColourTokenSchema, T as isFreeButtonRadius, _ as buttonEffectApplicationSchema, c as STANDARD_BUTTON_SURFACE_POLICY, d as createStandardButtonSurfacePolicy, g as actionVariablePrefix, h as actionVariableName, i as buttonShadowLayersValue, k as isThemeColorToken, p as unsafeAsOpaqueButtonColourToken, y as buttonSystemSchema, z as VARIANT_ROLES } from "./buttonParts-CJEtVOUy.mjs";
4
4
  import { t as SURFACE_TRANSPORT_KEY } from "./surfaceTransportMarker-BuwkYxsI.mjs";
5
5
  import { z } from "zod";
6
6
  //#region ../theme-core/src/palette/utils/colorConversion.ts
@@ -2027,7 +2027,11 @@ function resolveOnColorForThemeToken(token) {
2027
2027
  //#region ../theme-core/src/buttons/styles/domain.ts
2028
2028
  const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
2029
2029
  function defineButtonStyleRecipe(recipe) {
2030
- return recipe;
2030
+ const defined = {
2031
+ ...recipe,
2032
+ resolve: (parameters) => resolveButtonStyleRecipe(defined, parameters)
2033
+ };
2034
+ return defined;
2031
2035
  }
2032
2036
  function mapButtonVisualAppearances(states, transform) {
2033
2037
  return {
@@ -2049,6 +2053,98 @@ function mapButtonRoleAppearances(roles, transform) {
2049
2053
  accent: role("accent")
2050
2054
  };
2051
2055
  }
2056
+ function materializeButtonRoles(definitions) {
2057
+ return {
2058
+ primary: materializeCompleteRole("primary", definitions.primary),
2059
+ secondary: materializeCompleteRole("secondary", definitions.secondary),
2060
+ outline: materializeCompleteRole("outline", definitions.outline),
2061
+ ghost: materializeCompleteRole("ghost", definitions.ghost),
2062
+ accent: materializeCompleteRole("accent", definitions.accent)
2063
+ };
2064
+ }
2065
+ function resolveButtonStyleRecipe(recipe, parameters) {
2066
+ const parsedParameters = z.safeParse(recipe.parameterSchema, parameters);
2067
+ if (!parsedParameters.success) return {
2068
+ kind: "error",
2069
+ error: {
2070
+ kind: "invalid-parameters",
2071
+ styleId: recipe.id,
2072
+ issues: parsedParameters.error.issues.map((issue) => issue.message)
2073
+ }
2074
+ };
2075
+ const definition = recipe.defineSystem(parsedParameters.data);
2076
+ const roles = materializeButtonRoles(definition.roles);
2077
+ const buttonSystem = {
2078
+ global: buttonFamilyProjection(roles.primary),
2079
+ sizes: roles.primary.visualStates?.base.sizes,
2080
+ variants: PUBLIC_BUTTON_ROLES.map((role) => roles[role]),
2081
+ surfacePolicy: definition.surfacePolicy ?? createStandardButtonSurfacePolicy()
2082
+ };
2083
+ const parsedButtonSystem = z.safeParse(buttonSystemSchema, buttonSystem);
2084
+ if (!parsedButtonSystem.success) return {
2085
+ kind: "error",
2086
+ error: {
2087
+ kind: "invalid-button-system",
2088
+ styleId: recipe.id,
2089
+ issues: parsedButtonSystem.error.issues.map((issue) => issue.message)
2090
+ }
2091
+ };
2092
+ return {
2093
+ kind: "resolved",
2094
+ buttonSystem: parsedButtonSystem.data
2095
+ };
2096
+ }
2097
+ /** Historical family metadata remains a projection; recipes never read it. */
2098
+ function buttonFamilyProjection(primary) {
2099
+ const base = primary.visualStates.base;
2100
+ const type = base.typography;
2101
+ return {
2102
+ cornerStyle: base.borderRadius === "rounded-none" ? "square" : base.borderRadius === "rounded-full" ? "pill" : "rounded",
2103
+ shadow: base.shadow.elevation,
2104
+ fontWeight: type.fontWeight,
2105
+ textTransform: type.textTransform,
2106
+ typography: type.typography,
2107
+ ...type.fontSize === null ? {} : { fontSize: type.fontSize },
2108
+ ...type.letterSpacing === null || type.letterSpacing === "heading" ? {} : { letterSpacing: type.letterSpacing },
2109
+ ...type.italic ? { italic: true } : {},
2110
+ hoverTransform: "none",
2111
+ hoverColor: "none"
2112
+ };
2113
+ }
2114
+ function materializeCompleteRole(role, appearance) {
2115
+ return {
2116
+ visualStates: appearance.states,
2117
+ background: appearance.states.base.background,
2118
+ borderRadius: appearance.states.base.borderRadius,
2119
+ ...appearance.states.base.border === "none" ? {} : { border: appearance.states.base.border },
2120
+ shadow: appearance.states.base.shadow,
2121
+ sizes: appearance.states.base.sizes,
2122
+ effects: Object.fromEntries([
2123
+ "base",
2124
+ "hover",
2125
+ "focus",
2126
+ "active"
2127
+ ].flatMap((state) => {
2128
+ const effects = appearance.states[state].effects;
2129
+ return effects.length === 0 ? [] : [[state, effects]];
2130
+ })),
2131
+ ...appearance.states.hover.contextualHover ? { contextualHover: appearance.states.hover.contextualHover } : {},
2132
+ ...appearance.affordance ? { affordance: appearance.affordance } : {},
2133
+ ...appearance.keyframes ? { keyframes: appearance.keyframes } : {},
2134
+ id: role,
2135
+ name: roleName(role),
2136
+ enabled: true,
2137
+ priority: rolePriority(role)
2138
+ };
2139
+ }
2140
+ function roleName(role) {
2141
+ return role.charAt(0).toUpperCase() + role.slice(1);
2142
+ }
2143
+ function rolePriority(role) {
2144
+ if (role === "primary") return 1;
2145
+ if (role === "secondary") return 2;
2146
+ return 3;
2147
+ }
2052
2148
  //#endregion
2053
2149
  //#region ../theme-core/src/buttons/constants.ts
2054
2150
  /**
@@ -2302,12 +2398,18 @@ function buttonTypographyDeclarations(type) {
2302
2398
  ...type.textTransform === "none" ? [] : [["text-transform", type.textTransform]]
2303
2399
  ];
2304
2400
  }
2401
+ /** A Tailwind radius token, or a free radius (`46% 54% 58% 42% / 52% 44% 56% 48%`) passed through as written. */
2305
2402
  function buttonRadius(radius) {
2306
- return BORDER_RADIUS_MAP[radius] ?? BORDER_RADIUS_MAP.rounded ?? "0.375rem";
2403
+ return BORDER_RADIUS_MAP[radius] ?? (isFreeButtonRadius(radius) ? radius : BORDER_RADIUS_MAP.rounded ?? "0.375rem");
2307
2404
  }
2308
2405
  function buttonShadow(shadow, tokens) {
2309
2406
  return generateShadowValue(shadow.elevation, shadow.softness, shadow.position, shadow.colorToken ? tokens.getColor(shadow.colorToken) : void 0);
2310
2407
  }
2408
+ /** A state's whole box-shadow: its declared layers when it has them, otherwise its one shadow. */
2409
+ function buttonStateShadow(state, tokens, paint) {
2410
+ if (state.shadow === "focus-indicator") return null;
2411
+ return state.shadowLayers ? buttonShadowLayersValue(state.shadowLayers, paint) : buttonShadow(state.shadow, tokens);
2412
+ }
2311
2413
  function buttonBorder(border, tokens) {
2312
2414
  return border === "none" ? null : `${BORDER_WIDTH_MAP[border.widthClass] || "1px"} solid ${border.boundaryInk ? tokens.getColor(border.boundaryInk) : "currentColor"}`;
2313
2415
  }
@@ -2322,15 +2424,15 @@ function buttonTypographyChanges(base, state) {
2322
2424
  return [...declared, ...resets].filter(([property, value]) => original.get(property) !== value);
2323
2425
  }
2324
2426
  /** Emit only changed declarations; identical states keep historical CSS bytes. */
2325
- function buttonStateAppearanceDeclarations(base, state, tokens, disabled = false) {
2427
+ function buttonStateAppearanceDeclarations(base, state, tokens, paint, disabled = false) {
2326
2428
  const border = buttonBorder(state.border, tokens);
2327
2429
  const radius = buttonRadius(state.borderRadius);
2328
- const shadow = !disabled && state.shadow !== "focus-indicator" ? buttonShadow(state.shadow, tokens) : null;
2430
+ const shadow = disabled ? null : buttonStateShadow(state, tokens, paint);
2329
2431
  return [
2330
2432
  ...buttonTypographyChanges(base.typography, state.typography),
2331
2433
  ...buttonRadius(base.borderRadius) === radius ? [] : [["border-radius", radius]],
2332
2434
  ...buttonBorder(base.border, tokens) === border ? [] : [["border", border ?? "none"]],
2333
- ...shadow === null || base.shadow === "focus-indicator" || buttonShadow(base.shadow, tokens) === shadow ? [] : [["box-shadow", shadow]]
2435
+ ...shadow === null || buttonStateShadow(base, tokens, paint) === shadow ? [] : [["box-shadow", shadow]]
2334
2436
  ];
2335
2437
  }
2336
2438
  /** Surface paint is a context for the recipe, checked by the same colour owner. */
@@ -2724,15 +2826,42 @@ function unknownEffect(input, effect) {
2724
2826
  }
2725
2827
  //#endregion
2726
2828
  //#region ../theme-core/src/buttons/contextualHover.ts
2829
+ /**
2830
+ * The smallest OKLab move that reads as a hover. Neighbouring steps of a
2831
+ * palette scale are about 0.06 to 0.08 apart.
2832
+ */
2833
+ const MINIMUM_VISIBLE_STEP = .04;
2834
+ /**
2835
+ * The contrast at which a fill reads as a fill rather than a shadow on its
2836
+ * ground. It applies when the recipe names the ink to fill with
2837
+ * (`preferredToken`): those buttons rest as an outline and fill only on hover,
2838
+ * so the fill has to read against the ground on its own. A button edge can keep
2839
+ * a darker fill distinct, but it then looks like a hole in the panel.
2840
+ */
2841
+ const FILL_CLEARS_GROUND = 1.5;
2842
+ /** Two label inks closer than this read as the same ink (a near-black for black); a light label against a dark one is far above it. */
2843
+ const SAME_LABEL_INK = 3;
2844
+ /** A step a filled button can change its label for: one or two neighbouring shades of its scale. */
2845
+ const NEAR_STEP = .2;
2846
+ /**
2847
+ * The ends of a scale are often close to neutral black or white. A shade below
2848
+ * the dark end or above the light end (OKLab lightness) that has under this
2849
+ * share of the seed's chroma reads as grey, black or white, not as the button.
2850
+ */
2851
+ const HUELESS_DARK_END = .2;
2852
+ const HUELESS_LIGHT_END = .94;
2853
+ const HUE_KEPT_SHARE = .5;
2854
+ /** The recipe's own hover ink wins when it holds; otherwise the shade shift decides. */
2727
2855
  function resolveContextualHoverPreference(input) {
2728
2856
  const preferred = input.instruction.preferredToken;
2729
- if (preferred && isSafeCandidate(preferred, input.palette, input.surface, input.colourIndex, input.border)) return {
2857
+ if (preferred && preferredInkHolds(preferred, input)) return {
2730
2858
  kind: "resolved",
2731
2859
  token: preferred,
2732
2860
  repair: null
2733
2861
  };
2734
2862
  const contextual = resolveContextualHover(input);
2735
- return contextual.kind === "resolved" ? {
2863
+ if (contextual.kind === "unavailable") return contextual;
2864
+ return {
2736
2865
  kind: "resolved",
2737
2866
  token: contextual.token,
2738
2867
  repair: preferred ? {
@@ -2740,112 +2869,154 @@ function resolveContextualHoverPreference(input) {
2740
2869
  preferredToken: preferred,
2741
2870
  contextualToken: contextual.token
2742
2871
  } : null
2743
- } : contextual;
2872
+ };
2744
2873
  }
2745
2874
  /**
2746
- * Resolves semantic shade movement from real palette steps. The persisted
2747
- * instruction owns the colour family and deterministic unknown-surface
2748
- * fallback; a proven surface may select the opposite direction when it gives
2749
- * the button stronger separation while retaining the shared contrast contract.
2875
+ * Chooses the hover fill from the seed's own shade family, so the hue stays.
2876
+ *
2877
+ * A hover should read as the same button, stronger. The choice is made on the
2878
+ * colours themselves, not on shade numbers (a brand colour is rarely the 500
2879
+ * step of its scale). Hard limits come first: the label stays readable, the
2880
+ * hover stands apart from a known surface, and a button that rests filled
2881
+ * stays recognisably itself. `HOVER_PREFERENCE` then ranks what's left.
2882
+ *
2883
+ * The ground is the proven surface, or the palette's page colour when the
2884
+ * surface is unknown. With neither, the instruction's fallback direction
2885
+ * stands in for "stronger".
2750
2886
  */
2751
2887
  function resolveContextualHover(input) {
2752
- const candidates = shadeCandidates(input.instruction.seedToken, input.palette);
2753
- if (candidates.length === 0) return {
2888
+ const shades = shadeCandidates(input);
2889
+ if (shades.length === 0) return {
2754
2890
  kind: "unavailable",
2755
2891
  reason: "no-distinct-shade"
2756
2892
  };
2757
- const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette, input.colourIndex));
2758
- if (textSafe.length === 0) return {
2893
+ const readable = shades.filter((shade) => labelReadable(shade.hex, shade.labelInk, input.colourIndex));
2894
+ if (readable.length === 0) return {
2759
2895
  kind: "unavailable",
2760
2896
  reason: "no-text-safe-candidate"
2761
2897
  };
2762
- if (!input.surface) {
2763
- const selected = textSafe.find((candidate) => candidate.direction === input.instruction.fallbackDirection) ?? textSafe[0];
2764
- return selected ? {
2765
- kind: "resolved",
2766
- token: selected.token,
2767
- direction: selected.direction,
2768
- evidence: "fallback-direction"
2769
- } : {
2770
- kind: "unavailable",
2771
- reason: "no-text-safe-candidate"
2772
- };
2773
- }
2774
- const selected = selectSurfaceSafeHover(textSafe, {
2775
- palette: input.palette,
2776
- surface: input.surface,
2777
- colourIndex: input.colourIndex,
2778
- fallbackDirection: input.instruction.fallbackDirection,
2779
- border: input.border
2780
- });
2781
- return selected ? {
2898
+ const restLabel = seedFilledRestLabel(input.rest, input.instruction.seedToken);
2899
+ const selected = pickHover(readable.filter((shade) => standsApartFromSurface(shade.hex, shade.labelInk, input) && (restLabel === void 0 || staysTheSameFilledButton(shade, restLabel))));
2900
+ const surfaceKnown = input.surface !== void 0;
2901
+ if (!selected) return {
2902
+ kind: "unavailable",
2903
+ reason: surfaceKnown ? "no-surface-safe-candidate" : "no-text-safe-candidate"
2904
+ };
2905
+ return {
2782
2906
  kind: "resolved",
2783
2907
  token: selected.token,
2784
2908
  direction: selected.direction,
2785
- evidence: "known-surface"
2786
- } : {
2787
- kind: "unavailable",
2788
- reason: "no-surface-safe-candidate"
2909
+ evidence: surfaceKnown ? "known-surface" : "fallback-direction"
2789
2910
  };
2790
2911
  }
2791
- /** Rank the proven-surface candidates without mixing selection with fallback policy. */
2792
- function selectSurfaceSafeHover(candidates, input) {
2793
- return candidates.flatMap((candidate) => {
2794
- const separation = buttonSurfaceSeparation(input.palette[candidate.token] ?? "", input.surface, {
2795
- border: input.border,
2796
- palette: input.palette,
2797
- labelInk: input.palette[solidForegroundToken(candidate.token)] ?? ""
2798
- });
2799
- return separation.distinct ? [{
2800
- ...candidate,
2801
- surfaceDistance: separation.deltaE
2802
- }] : [];
2803
- }).sort((left, right) => {
2804
- const distanceDifference = left.distance - right.distance;
2805
- if (distanceDifference !== 0) return distanceDifference;
2806
- const contrastDifference = (right.surfaceDistance ?? 0) - (left.surfaceDistance ?? 0);
2807
- if (contrastDifference !== 0) return contrastDifference;
2808
- if (left.direction === right.direction) return left.token.localeCompare(right.token);
2809
- return left.direction === input.fallbackDirection ? -1 : 1;
2810
- })[0];
2811
- }
2812
- function shadeCandidates(seedToken, palette) {
2813
- const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
2814
- const family = match?.[1] ?? String(seedToken);
2815
- const currentShade = match?.[2] ? Number(match[2]) : 500;
2816
- const seedHex = palette[seedToken];
2817
- const shades = Object.keys(palette).flatMap((token) => {
2818
- const shade = token.match(new RegExp(`^${escapeRegExp(family)}-(\\d{2,3})$`));
2819
- return shade?.[1] ? [Number(shade[1])] : [];
2820
- }).filter((shade) => Number.isFinite(shade)).sort((left, right) => left - right);
2821
- const lower = [...shades].filter((shade) => shade < currentShade).sort((left, right) => right - left);
2822
- const higher = shades.filter((shade) => shade > currentShade);
2823
- return [...lower.map((shade) => candidate(family, shade, currentShade, "lighter", seedHex, palette)), ...higher.map((shade) => candidate(family, shade, currentShade, "darker", seedHex, palette))].filter((value) => value !== null);
2824
- }
2825
- function candidate(family, shade, currentShade, direction, seedHex, palette) {
2826
- const token = parseOpaqueButtonColourToken(`${family}-${shade}`);
2827
- if (token === null) return null;
2828
- const candidateHex = palette[token];
2829
- if (!candidateHex || candidateHex === seedHex) return null;
2912
+ const visible = (shade) => shade.distance >= MINIMUM_VISIBLE_STEP;
2913
+ /**
2914
+ * Where the hover is looked for, in order. The first group with a shade wins,
2915
+ * and within it the nearest visible step (or, with none visible, the furthest).
2916
+ *
2917
+ * 1. Stronger, keeping the hue, and clearing the ground when the recipe names a fill ink.
2918
+ * 2. Stronger, keeping the hue.
2919
+ * 3. The other way, keeping the hue: a visible hover beats a hue-less or invisible one.
2920
+ * 4. Any stronger shade.
2921
+ * 5. Any shade the other way.
2922
+ */
2923
+ const HOVER_PREFERENCE = [
2924
+ (shade) => shade.stronger && shade.keepsHue && visible(shade) && shade.fillClearsGround,
2925
+ (shade) => shade.stronger && shade.keepsHue && visible(shade),
2926
+ (shade) => !shade.stronger && shade.keepsHue && visible(shade),
2927
+ (shade) => shade.stronger,
2928
+ () => true
2929
+ ];
2930
+ function pickHover(allowed) {
2931
+ for (const inGroup of HOVER_PREFERENCE) {
2932
+ const group = allowed.filter(inGroup);
2933
+ if (group.length > 0) return nearestVisibleStep(group);
2934
+ }
2935
+ }
2936
+ function nearestVisibleStep(shades) {
2937
+ const byDistance = [...shades].sort((left, right) => left.distance - right.distance || left.token.localeCompare(right.token));
2938
+ return byDistance.find(visible) ?? byDistance[byDistance.length - 1];
2939
+ }
2940
+ /** The label ink of a button that rests filled with the seed; undefined when it rests some other way (it fills only on hover). */
2941
+ function seedFilledRestLabel(rest, seed) {
2942
+ return rest.kind === "solid" && rest.colorToken === seed ? rest.labelInk : void 0;
2943
+ }
2944
+ /**
2945
+ * A button that rests filled with the seed should still read as itself on
2946
+ * hover. A shade that needs the other label ink is only allowed a near step
2947
+ * away (a jump across the scale with the label flipped looks like another
2948
+ * button), and a shade the other way has to keep the hue. A button that fills
2949
+ * only on hover changes its label anyway, so this doesn't apply to it.
2950
+ */
2951
+ function staysTheSameFilledButton(shade, restLabel) {
2952
+ return (contrastRatio(shade.labelInk, restLabel) < SAME_LABEL_INK || shade.distance <= NEAR_STEP) && (shade.stronger || shade.keepsHue);
2953
+ }
2954
+ function labelReadable(hex, labelInk, colourIndex) {
2955
+ return labelInk !== void 0 && contrastRatio(hex, labelInk, colourIndex) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
2956
+ }
2957
+ /** On a proven surface, the fill stands apart from it by colour or by a declared edge. */
2958
+ function standsApartFromSurface(hex, labelInk, input) {
2959
+ return input.surface === void 0 || buttonSurfaceSeparation(hex, input.surface, {
2960
+ border: input.border,
2961
+ palette: input.palette,
2962
+ labelInk
2963
+ }).distinct;
2964
+ }
2965
+ /** The recipe's own hover ink holds when its label reads and, on a proven surface, it stands apart and clears the surface as a fill. */
2966
+ function preferredInkHolds(token, input) {
2967
+ const hex = input.palette[token];
2968
+ const labelInk = input.palette[solidForegroundToken(token)];
2969
+ if (hex === void 0 || !labelReadable(hex, labelInk, input.colourIndex)) return false;
2970
+ return input.surface === void 0 || standsApartFromSurface(hex, labelInk, input) && contrastRatio(hex, input.surface.backgroundHex, input.colourIndex) >= FILL_CLEARS_GROUND;
2971
+ }
2972
+ /** The other steps of the seed's scale (`primary-100` … `primary-950`), measured against the seed and the ground. */
2973
+ function shadeCandidates(input) {
2974
+ const { instruction, palette, colourIndex } = input;
2975
+ const seedHex = palette[instruction.seedToken];
2976
+ if (seedHex === void 0) return [];
2977
+ const family = String(instruction.seedToken).match(/^(.*?)(?:-\d{2,3})?$/)?.[1] ?? String(instruction.seedToken);
2978
+ const step = new RegExp(`^${escapeRegExp(family)}-\\d{2,3}$`);
2979
+ const ground = input.surface?.backgroundHex ?? palette.background;
2980
+ const seed = {
2981
+ hex: seedHex,
2982
+ lightness: contrastRatio(seedHex, "#000000"),
2983
+ chroma: oklab(seedHex).chroma,
2984
+ ground: ground === void 0 ? void 0 : {
2985
+ contrast: (hex) => contrastRatio(hex, ground, colourIndex),
2986
+ restContrast: contrastRatio(seedHex, ground, colourIndex)
2987
+ }
2988
+ };
2989
+ return Object.keys(palette).flatMap((name) => {
2990
+ const token = step.test(name) ? parseOpaqueButtonColourToken(name) : null;
2991
+ const hex = token === null ? void 0 : palette[token];
2992
+ return token === null || hex === void 0 || hex === seedHex ? [] : [describeShade(token, hex, seed, input)];
2993
+ });
2994
+ }
2995
+ function describeShade(token, hex, seed, input) {
2996
+ const { instruction, palette } = input;
2997
+ const direction = contrastRatio(hex, "#000000") > seed.lightness ? "lighter" : "darker";
2998
+ const groundContrast = seed.ground?.contrast(hex);
2830
2999
  return {
2831
3000
  token,
3001
+ hex,
2832
3002
  direction,
2833
- distance: Math.abs(shade - currentShade),
2834
- surfaceDistance: null
3003
+ labelInk: palette[solidForegroundToken(token)],
3004
+ distance: hexOklabDistance(seed.hex, hex),
3005
+ stronger: seed.ground === void 0 ? direction === instruction.fallbackDirection : seed.ground.contrast(hex) >= seed.ground.restContrast,
3006
+ keepsHue: keepsHue(oklab(hex), seed.chroma),
3007
+ fillClearsGround: instruction.preferredToken !== void 0 && groundContrast !== void 0 && groundContrast >= FILL_CLEARS_GROUND
2835
3008
  };
2836
3009
  }
2837
- function hasSafeTextContrast(token, palette, colourIndex) {
2838
- const background = palette[token];
2839
- const foreground = palette[solidForegroundToken(token)];
2840
- return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground, colourIndex) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
3010
+ function keepsHue(shade, seedChroma) {
3011
+ return !(shade.lightness < HUELESS_DARK_END || shade.lightness > HUELESS_LIGHT_END) || shade.chroma >= seedChroma * HUE_KEPT_SHARE;
2841
3012
  }
2842
- function isSafeCandidate(token, palette, surface, colourIndex, border) {
2843
- if (!hasSafeTextContrast(token, palette, colourIndex)) return false;
2844
- return surface ? buttonSurfaceSeparation(palette[token] ?? "", surface, {
2845
- border,
2846
- palette,
2847
- labelInk: palette[solidForegroundToken(token)] ?? ""
2848
- }).distinct : true;
3013
+ function oklab(hex) {
3014
+ const { r, g, b } = hexToRgb(hex);
3015
+ const lab = srgbToOklab(r, g, b);
3016
+ return {
3017
+ lightness: lab.L,
3018
+ chroma: Math.hypot(lab.a, lab.b)
3019
+ };
2849
3020
  }
2850
3021
  function escapeRegExp(value) {
2851
3022
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -2859,7 +3030,8 @@ function resolveButtonHoverTreatment(input) {
2859
3030
  palette: input.palette,
2860
3031
  colourIndex: input.colourIndex,
2861
3032
  surface: input.surface,
2862
- border: input.variant.border
3033
+ border: input.variant.border,
3034
+ rest: input.rest
2863
3035
  });
2864
3036
  if (contextual.kind === "resolved") return {
2865
3037
  treatment: {
@@ -2909,6 +3081,11 @@ function compileButtonColourStates(input) {
2909
3081
  variant: input.variant,
2910
3082
  global: input.global,
2911
3083
  fallback: base.treatment,
3084
+ rest: restingFill({
3085
+ ...input,
3086
+ variantId: input.variant.id,
3087
+ state: "base"
3088
+ }, base.treatment),
2912
3089
  palette: input.palette,
2913
3090
  surface: input.surface,
2914
3091
  colourIndex: input.colourIndex
@@ -2933,7 +3110,12 @@ function compileDeclaredVisualStates(input, states) {
2933
3110
  hoverColor: "none",
2934
3111
  hoverColorToken: void 0
2935
3112
  },
2936
- fallback: states.hover.background
3113
+ fallback: states.hover.background,
3114
+ rest: restingFill({
3115
+ ...input,
3116
+ variantId: input.variant.id,
3117
+ state: "base"
3118
+ }, states.base.background)
2937
3119
  });
2938
3120
  const colours = collectStateColours(mapVisualStates((state) => compileDeclaredVisualState(input, states, state, state === "hover" ? hover.treatment : states[state].background)));
2939
3121
  return colours.ok ? {
@@ -3094,6 +3276,18 @@ function resolveSolid(input, backgroundToken, preferredForeground) {
3094
3276
  function resolveSolidButtonColour(input, backgroundToken, preferredForeground) {
3095
3277
  return resolveSolid(input, backgroundToken, preferredForeground);
3096
3278
  }
3279
+ /** A solid rest fill with the label ink resolveSolidInk gives it, so a contextual hover compares against the ink visitors see. */
3280
+ function restingFill(input, treatment) {
3281
+ if (treatment.type !== "solid") return { kind: "not-solid" };
3282
+ const hex = input.palette[treatment.colorToken];
3283
+ if (hex === void 0) return { kind: "not-solid" };
3284
+ const ink = resolveSolidInk(input, treatment.colorToken, hex, treatment.foregroundToken);
3285
+ return {
3286
+ kind: "solid",
3287
+ colorToken: treatment.colorToken,
3288
+ labelInk: ink.foregroundHex
3289
+ };
3290
+ }
3097
3291
  /** Preserve checked on-colours (a requested label colour first); a solid state's last resort is the palette ink for its actual fill. */
3098
3292
  function resolveSolidInk(input, backgroundToken, backgroundHex, preferredForeground) {
3099
3293
  if (preferredForeground !== void 0) {
@@ -3408,7 +3602,7 @@ function resolveFallbackButtonRole(input, requested, fallbacks, rejected) {
3408
3602
  kind: "repaired",
3409
3603
  requestedRole: input.role,
3410
3604
  candidate: candidate.name,
3411
- states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
3605
+ states: surfaceFallbackStates(fallback, compiled.states, input.surface),
3412
3606
  focusIndicator: compiled.focusIndicator,
3413
3607
  boundary: candidate.boundary,
3414
3608
  rejectedCandidates: rejected
@@ -3459,26 +3653,39 @@ function resetActionVariables(role) {
3459
3653
  ]) styles[actionVariableName(role, state, property)] = "initial";
3460
3654
  return styles;
3461
3655
  }
3462
- function withSurfaceInversion(states, surface) {
3463
- const inverted = {
3464
- kind: "known-solid",
3465
- backgroundCss: surface.foregroundCss,
3466
- foregroundCss: surface.backgroundCss
3467
- };
3468
- return {
3656
+ /**
3657
+ * Both surface fallbacks paint with the surface's own checked pair. The outline
3658
+ * fills with the ground's ink on hover. The solid is filled with it from the
3659
+ * start, and on hover either stays so or takes the ground's colour, as an
3660
+ * opaque paint so a part can draw with it.
3661
+ */
3662
+ function surfaceFallbackStates(fallback, states, surface) {
3663
+ const inverted = surfaceInkFill(surface);
3664
+ if (fallback.kind === "surface-outline") return {
3469
3665
  ...states,
3470
3666
  hover: inverted,
3471
3667
  active: inverted
3472
3668
  };
3473
- }
3474
- function actionVariableName(role, state, property) {
3475
- return `--rb-action-${role}-${state}-${property}`;
3476
- }
3477
- function actionVariableFallback(role, state, property, fallback) {
3478
- return `var(${actionVariableName(role, state, property)}, ${fallback})`;
3479
- }
3480
- function actionVariablePrefix(role, state) {
3481
- return `--rb-action-${role}-${state}`;
3669
+ if (fallback.kind !== "surface-solid") return states;
3670
+ if (fallback.hover === "steady") return {
3671
+ base: inverted,
3672
+ hover: inverted,
3673
+ focus: inverted,
3674
+ active: inverted,
3675
+ disabled: inverted
3676
+ };
3677
+ const ground = {
3678
+ kind: "known-solid",
3679
+ backgroundCss: surface.backgroundCss,
3680
+ foregroundCss: surface.foregroundCss
3681
+ };
3682
+ return {
3683
+ base: inverted,
3684
+ hover: ground,
3685
+ focus: inverted,
3686
+ active: ground,
3687
+ disabled: inverted
3688
+ };
3482
3689
  }
3483
3690
  function compileCandidate(variant, context) {
3484
3691
  return compileButtonColourStates({
@@ -3489,6 +3696,13 @@ function compileCandidate(variant, context) {
3489
3696
  colourIndex: context.colourIndex
3490
3697
  });
3491
3698
  }
3699
+ function surfaceInkFill(surface) {
3700
+ return {
3701
+ kind: "known-solid",
3702
+ backgroundCss: surface.foregroundCss,
3703
+ foregroundCss: surface.backgroundCss
3704
+ };
3705
+ }
3492
3706
  function candidateVariant(fallback, requested, system) {
3493
3707
  if (fallback.kind === "variant") {
3494
3708
  const variant = findVariant(system, fallback.role);
@@ -3500,7 +3714,7 @@ function candidateVariant(fallback, requested, system) {
3500
3714
  }
3501
3715
  const width = BORDER_WIDTH_MAP.border ?? "1px";
3502
3716
  return {
3503
- name: "surface-outline",
3717
+ name: fallback.kind,
3504
3718
  variant: {
3505
3719
  ...requested,
3506
3720
  visualStates: void 0,
@@ -3508,12 +3722,15 @@ function candidateVariant(fallback, requested, system) {
3508
3722
  type: "surface",
3509
3723
  role: "link"
3510
3724
  },
3511
- border: { widthClass: "border" },
3725
+ border: fallback.kind === "surface-solid" && fallback.hover === "swap" ? {
3726
+ widthClass: "border",
3727
+ marksBoundary: true
3728
+ } : { widthClass: "border" },
3512
3729
  hoverBackgroundToken: void 0,
3513
3730
  contextualHover: void 0,
3514
3731
  effects: void 0
3515
3732
  },
3516
- boundary: {
3733
+ boundary: fallback.kind === "surface-solid" && requested.border?.ring ? boundaryForVariant(requested) : {
3517
3734
  width,
3518
3735
  color: "currentColor"
3519
3736
  }
@@ -4031,14 +4248,14 @@ function ownSurfaceRevision(context) {
4031
4248
  revisionOwners.set(palette, revisions);
4032
4249
  return revision;
4033
4250
  }
4034
- /** Local computation keeps its colour index; transport references only the owning revision inputs. */
4251
+ /** Keep the derived colour index for local computation, but never repeat it on the wire. */
4035
4252
  function surfaceTransportContext(context) {
4036
4253
  const revision = ownSurfaceRevision(context);
4037
- const result = Object.freeze({
4254
+ const result = Object.freeze(Object.defineProperty({
4038
4255
  ...revision,
4039
4256
  colourIndex: context.colourIndex,
4040
4257
  solvedInks: context.solvedInks
4041
- });
4258
+ }, "colourIndex", { enumerable: false }));
4042
4259
  const preparedSurfaces = matchingPreparedSurfaceIndex(preparedSurfaceIndexFor(context), result);
4043
4260
  surfaceRevisionOwners.set(result, {
4044
4261
  revision,
@@ -4746,4 +4963,4 @@ function mapSurfaceTreeChildren(value, map) {
4746
4963
  return isSurfaceTreeRecord(value) ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, map(item)])) : value;
4747
4964
  }
4748
4965
  //#endregion
4749
- export { resolveSurfaceForeground as $, PUBLIC_BUTTON_ROLES as A, _classPrivateFieldSet2 as At, cssVarValue as B, _classPrivateFieldInitSpec as Bt, materializeRuntimeButtonAppearance as C, resolveConcreteColorHex as Ct, ELEVATION_OFFSET as D, paletteInkRoles as Dt, DEFAULT_BUTTON_SIZES as E, paletteInk as Et, resolveOnColorForThemeToken as F, contrastRatio as Ft, callsCssLoadingFunction as G, oklchToHexGamut as Gt, rgbColorValue as H, hexToRgb as Ht, resolveThemeColorReferenceValue as I, hexLuminance as It, expandPalette as J, staysInsideDeclaration as K, rgbToHex as Kt, resolveTokenOrCssColorValue as L, luminanceInterval as Lt, mapButtonRoleAppearances as M, paletteValueKeySchema as Mt, mapButtonVisualAppearances as N, requirePaletteColorsFromEntries as Nt, FONT_SIZE_MAP as O, paletteInkToken as Ot, isCssColorLiteral as P, ORDINARY_TEXT_MIN_CONTRAST_RATIO as Pt, scrimTone as Q, backgroundColorStyle as R, preparePaletteColourIndex as Rt, buttonTypographyDeclarations as S, ownedThemeSnapshot as St, BORDER_WIDTH_MAP as T, neutralInk as Tt, textColorStyle as U, oklabToOklch as Ut, mergeStyles as V, featuresFromHex as Vt, textColorValue as W, oklabToSrgb as Wt, gradientScrimSamples as X, compositeHex as Y, minimumScrimOpacity as Z, formatButtonColourContractError as _, surfaceForegroundValueWithOpacity as _t, requireResolvedSurface as a, HOVER_TEXT_THRESHOLD as at, buttonShadow as b, surfaceInkValue as bt, surfaceButtonRequest as c, inkReference as ct, toAccessibleColorSurfaceIntent as d, SURFACE_FOREGROUND_CSS_VARS as dt, safeTokenOr as et, actionVariableFallback as f, SURFACE_INK_CSS_VARS as ft, BUTTON_CONTRAST_POLICY as g, surfaceForegroundValue as gt, resolveSolidButtonColour as h, surfaceForegroundStyle as ht, prepareThemeSurfaceRevision as i, pickBlackOrWhiteTextColor as it, defineButtonStyleRecipe as j, paletteValueKey as jt, generateShadowValue as k, _classPrivateFieldGet2 as kt, surfaceDecorationColors as l, planForegroundHover as lt, compileButtonColourStates as m, surfaceForegroundInputFromResolved as mt, parseSurfaceTree as n, CONTROL_EDGE_SEED_TOKEN as nt, resolveSurface as o, certifyPaint as ot, contextualButtonSurfaceResetStyles as p, surfaceForegroundDeclarations as pt, SURFACE_SECONDARY_TEXT_TINT_ALPHA as q, srgbToOklab as qt, prepareSurfaceIndex as r, solveSurfaceInks as rt, serializeSurfaceTree as s, contrastThresholdByPolicy as st, parseResolvedSurface as t, surfaceInkPublication as tt, surfaceTransportContext as u, DEFAULT_SURFACE_TEXT_COLOR as ut, buttonBorder as v, surfaceInkDeclarations as vt, paddingDeclarations as w, resolveOpaqueSurfaceHex as wt, buttonStateAppearanceDeclarations as x, freezeOwnedThemeValue as xt, buttonRadius as y, surfaceInkStyle as yt, borderColorStyle as z, solidPaint as zt };
4966
+ export { safeTokenOr as $, defineButtonStyleRecipe as A, paletteValueKey as At, mergeStyles as B, featuresFromHex as Bt, paddingDeclarations as C, resolveOpaqueSurfaceHex as Ct, FONT_SIZE_MAP as D, paletteInkToken as Dt, ELEVATION_OFFSET as E, paletteInkRoles as Et, resolveThemeColorReferenceValue as F, hexLuminance as Ft, staysInsideDeclaration as G, rgbToHex as Gt, textColorStyle as H, oklabToOklch as Ht, resolveTokenOrCssColorValue as I, luminanceInterval as It, compositeHex as J, SURFACE_SECONDARY_TEXT_TINT_ALPHA as K, srgbToOklab as Kt, backgroundColorStyle as L, preparePaletteColourIndex as Lt, mapButtonVisualAppearances as M, requirePaletteColorsFromEntries as Mt, isCssColorLiteral as N, ORDINARY_TEXT_MIN_CONTRAST_RATIO as Nt, generateShadowValue as O, _classPrivateFieldGet2 as Ot, resolveOnColorForThemeToken as P, contrastRatio as Pt, resolveSurfaceForeground as Q, borderColorStyle as R, solidPaint as Rt, materializeRuntimeButtonAppearance as S, resolveConcreteColorHex as St, DEFAULT_BUTTON_SIZES as T, paletteInk as Tt, textColorValue as U, oklabToSrgb as Ut, rgbColorValue as V, hexToRgb as Vt, callsCssLoadingFunction as W, oklchToHexGamut as Wt, minimumScrimOpacity as X, gradientScrimSamples as Y, scrimTone as Z, buttonBorder as _, surfaceInkDeclarations as _t, requireResolvedSurface as a, certifyPaint as at, buttonStateShadow as b, freezeOwnedThemeValue as bt, surfaceButtonRequest as c, planForegroundHover as ct, toAccessibleColorSurfaceIntent as d, SURFACE_INK_CSS_VARS as dt, surfaceInkPublication as et, contextualButtonSurfaceResetStyles as f, surfaceForegroundDeclarations as ft, formatButtonColourContractError as g, surfaceForegroundValueWithOpacity as gt, BUTTON_CONTRAST_POLICY as h, surfaceForegroundValue as ht, prepareThemeSurfaceRevision as i, HOVER_TEXT_THRESHOLD as it, mapButtonRoleAppearances as j, paletteValueKeySchema as jt, PUBLIC_BUTTON_ROLES as k, _classPrivateFieldSet2 as kt, surfaceDecorationColors as l, DEFAULT_SURFACE_TEXT_COLOR as lt, resolveSolidButtonColour as m, surfaceForegroundStyle as mt, parseSurfaceTree as n, solveSurfaceInks as nt, resolveSurface as o, contrastThresholdByPolicy as ot, compileButtonColourStates as p, surfaceForegroundInputFromResolved as pt, expandPalette as q, prepareSurfaceIndex as r, pickBlackOrWhiteTextColor as rt, serializeSurfaceTree as s, inkReference as st, parseResolvedSurface as t, CONTROL_EDGE_SEED_TOKEN as tt, surfaceTransportContext as u, SURFACE_FOREGROUND_CSS_VARS as ut, buttonRadius as v, surfaceInkStyle as vt, BORDER_WIDTH_MAP as w, neutralInk as wt, buttonTypographyDeclarations as x, ownedThemeSnapshot as xt, buttonStateAppearanceDeclarations as y, surfaceInkValue as yt, cssVarValue as z, _classPrivateFieldInitSpec as zt };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-0Unsqn3R.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DFYqKnLy.mjs";
3
3
  //#region src/rendering/islands/enhancers/accordion.ts
4
4
  const decode = defineIslandPropsDecoder("accordion");
5
5
  function parseDefaultValues(value) {