@riverbankcms/sdk 0.182.0 → 0.184.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 (231) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +83 -4
  3. package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
  4. package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
  6. package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
  7. package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
  8. package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
  10. package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
  11. package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
  12. package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
  13. package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
  14. package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
  15. package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
  16. package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
  17. package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
  18. package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.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 +10 -2
  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 +126 -2
  55. package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
  56. package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
  57. package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
  58. package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
  59. package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
  62. package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
  67. package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
  70. package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
  71. package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
  72. package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
  74. package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
  75. package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
  78. package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
  79. package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
  81. package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
  82. package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
  83. package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
  84. package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
  87. package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
  88. package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
  90. package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
  91. package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
  92. package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
  93. package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
  95. package/dist/client/client.mjs +460 -119
  96. package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
  97. package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
  98. package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
  101. package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
  102. package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
  103. package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
  104. package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
  105. package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
  106. package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
  107. package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
  108. package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
  111. package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
  112. package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
  113. package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
  114. package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
  115. package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
  116. package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
  118. package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
  119. package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +51 -35
  121. package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
  123. package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
  124. package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
  125. package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
  126. package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
  127. package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
  128. package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
  129. package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
  130. package/dist/client/rendering/client.mjs +32 -28
  131. package/dist/client/rendering/islands.mjs +1 -1
  132. package/dist/client/rendering.mjs +5 -5
  133. package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
  134. package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
  135. package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
  136. package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
  137. package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
  138. package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
  139. package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
  140. package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
  141. package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
  142. package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
  143. package/dist/client/spam-protection.mjs +1 -1
  144. package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
  145. package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
  146. package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
  147. package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
  148. package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
  149. package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
  150. package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
  151. package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
  152. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
  153. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
  154. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
  155. package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
  156. package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
  157. package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
  158. package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
  159. package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
  160. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
  161. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
  162. package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
  163. package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
  164. package/dist/preview-next/client/runtime.mjs +3 -3
  165. package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
  166. package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
  167. package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
  168. package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
  169. package/dist/preview-next/container-responsive.css +469 -2
  170. package/dist/preview-next/editor-chrome.css +23 -2
  171. package/dist/preview-next/keepAlive.mjs +1 -1
  172. package/dist/preview-next/middleware.mjs +1 -1
  173. package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
  174. package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
  175. package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
  176. package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
  177. package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
  178. package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
  179. package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
  180. package/dist/server/config-validation.mjs +1 -1
  181. package/dist/server/config.mjs +2 -2
  182. package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
  183. package/dist/server/data/resolveBlockData.mjs +1 -1
  184. package/dist/server/index.mjs +4 -4
  185. package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
  186. package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
  187. package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +9 -9
  192. package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +18 -5
  194. package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
  195. package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
  196. package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
  197. package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
  198. package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
  199. package/dist/server/portal.mjs +3 -3
  200. package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
  203. package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
  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 +10 -10
  209. package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
  210. package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
  211. package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
  212. package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
  213. package/dist/server/server.mjs +3 -3
  214. package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
  215. package/dist/server/theme-bridge.mjs +5 -4
  216. package/dist/server/theme.mjs +2 -2
  217. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
  218. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
  219. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  220. package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
  221. package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
  222. package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
  223. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  224. package/dist/styles/index.css +2987 -168
  225. package/package.json +1 -1
  226. package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
  227. package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
  228. package/dist/client/types-BEaKfam_.mjs +0 -778
  229. package/dist/server/customCss-C9kgPHvr.mjs +0 -247
  230. package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
  231. package/dist/server/media-gvfIw3z8.mjs +0 -216
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { Cc as parseSiteId } from "./wizardSteps-B952ify5.mjs";
3
- import { A as materializeEntriesMedia, C as siteBlockRenderContext, F as attachResilienceStatusToError, M as rethrowClientFrameworkSignal, P as RiverbankApiError, R as requireSdkTheme, S as projectRenderablePageOutline, _ as loadContentFromContentResponse, _t as isSupportedLoaderEndpoint, b as buildSiteRenderSupport, gt as encodePublicProductCategorySelector, j as findFrameworkSignal, k as prefetchBlockDataWithFailures, m as isPageContent, t as Page, w as resolveSiteCustomBlocks, x as collectMediaAssetSidecar, y as buildRenderablePageOutline } from "./Page-sV6BJkXX.mjs";
4
- import { Qn as publicMapLocationParamsSchema } from "./registry.server-DzvtVVD0.mjs";
2
+ import { Tc as parseSiteId } from "./wizardSteps-B3gsXNnb.mjs";
3
+ import { A as materializeEntriesMedia, C as siteBlockRenderContext, F as attachResilienceStatusToError, M as rethrowClientFrameworkSignal, P as RiverbankApiError, R as requireSdkTheme, S as projectRenderablePageOutline, _ as loadContentFromContentResponse, _t as isSupportedLoaderEndpoint, b as buildSiteRenderSupport, gt as encodePublicProductCategorySelector, j as findFrameworkSignal, k as prefetchBlockDataWithFailures, m as isPageContent, t as Page, w as resolveSiteCustomBlocks, x as collectMediaAssetSidecar, y as buildRenderablePageOutline } from "./Page-DB5KODiu.mjs";
4
+ import { cr as publicMapLocationParamsSchema } from "./registry.server-CI63JVHW.mjs";
5
5
  import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
6
- import { t as restoreRuntimeResponse } from "./runtimeResponse-DAPVRToN.mjs";
6
+ import { t as restoreRuntimeResponse } from "./runtimeResponse-_iW9oEYc.mjs";
7
7
  import { useEffect, useState } from "react";
8
8
  import { z } from "zod";
9
9
  /**
@@ -186,6 +186,13 @@ const PAGE_JOURNAL_ENDPOINT_DEFINITIONS = {
186
186
  responseKind: "json",
187
187
  errors: ["validation:invalid_input", "server:internal_error"]
188
188
  },
189
+ getEditorSiteFacts: {
190
+ path: "/sites/{siteId}/editor/site-facts",
191
+ method: "GET",
192
+ auth: "user",
193
+ responseKind: "json",
194
+ errors: ["server:internal_error"]
195
+ },
189
196
  replayThemeJournalChange: {
190
197
  path: "/sites/{siteId}/theme/journal",
191
198
  method: "POST",
@@ -673,20 +680,38 @@ function buildFetchPolicy(siteId, reads, freshnessSeconds) {
673
680
  function buildPublicReadBatchFetchPolicy(siteId, reads) {
674
681
  return buildFetchPolicy(siteId, reads, publicReadBatchFreshnessSeconds);
675
682
  }
676
- /** A page may depend on admission even when an ordinary CMS page won precedence. */
683
+ function availabilityPageReadTags(siteId) {
684
+ return normalizeRevalidateTags([
685
+ ...buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
686
+ ...buildPublicReadFetchTags("listPublicEvents", { siteId }),
687
+ ...buildPublicReadFetchTags("getPublicBookingService", { siteId })
688
+ ]);
689
+ }
690
+ /**
691
+ * The tags and framework lifetime a complete page read registers. A page may depend on admission even when an
692
+ * ordinary CMS page won precedence. Booking and event writes purge an availability page by its tags, so its
693
+ * lifetime is only the rendered-availability backstop for a failed purge. Caches that no write reaches (the
694
+ * SDK's in-process map and durable runtime rows) keep `PUBLIC_AVAILABILITY_FRESHNESS_SECONDS` instead.
695
+ */
677
696
  function buildPageReadCachePolicy(siteId, dependencies) {
678
697
  return dependencies === "availability" ? {
679
- tags: normalizeRevalidateTags([
680
- ...buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
681
- ...buildPublicReadFetchTags("listPublicEvents", { siteId }),
682
- ...buildPublicReadFetchTags("getPublicBookingService", { siteId })
683
- ]),
684
- revalidate: 60
698
+ tags: availabilityPageReadTags(siteId),
699
+ revalidate: PUBLIC_RENDERED_AVAILABILITY_FRESHNESS_SECONDS
685
700
  } : {
686
701
  tags: buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
687
702
  revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS
688
703
  };
689
704
  }
705
+ /**
706
+ * What an incomplete or malformed page read registers, so the rendered route is rebuilt within a minute
707
+ * instead of keeping a broken page for a backstop's length. It carries every page tag, so a write still purges it.
708
+ */
709
+ function buildPageReadRetryPolicy(siteId) {
710
+ return {
711
+ tags: availabilityPageReadTags(siteId),
712
+ revalidate: 60
713
+ };
714
+ }
690
715
  function pageReadDependencies(payload) {
691
716
  return typeof payload === "object" && payload !== null && "dependencies" in payload && payload.dependencies === "content" ? "content" : "availability";
692
717
  }
@@ -770,20 +795,67 @@ const weekday = z.union([
770
795
  z.literal(5),
771
796
  z.literal(6)
772
797
  ]);
773
- const arrangementCadenceSchema = z.discriminatedUnion("kind", [z.object({
798
+ const localStart = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
799
+ const everyWeeks = z.union([z.literal(1), z.literal(2)]);
800
+ const nth = z.union([
801
+ z.literal(1),
802
+ z.literal(2),
803
+ z.literal(3),
804
+ z.literal(4),
805
+ z.literal("last")
806
+ ]);
807
+ /** A recurring day in an arrangement's week, with the id it keeps in every segment. */
808
+ const arrangementSlotSchema = z.object({
809
+ id: z.string().uuid(),
810
+ weekday,
811
+ localStart
812
+ }).strict();
813
+ /** A saved pattern: weekly (several days, counted in weeks from a Monday anchor) or monthly (one day). */
814
+ const arrangementPatternSchema = z.discriminatedUnion("kind", [z.object({
774
815
  kind: z.literal("weekly"),
775
- everyWeeks: z.union([z.literal(1), z.literal(2)]),
776
- weekday
816
+ everyWeeks,
817
+ anchorMonday: localDate,
818
+ slots: z.array(arrangementSlotSchema).min(1).max(7).readonly()
777
819
  }).strict(), z.object({
778
820
  kind: z.literal("monthly"),
821
+ nth,
822
+ slot: arrangementSlotSchema
823
+ }).strict()]);
824
+ const slotTime = z.object({
825
+ weekday,
826
+ localStart
827
+ }).strict();
828
+ const differentDays = (days) => new Set(days.map((day) => day.weekday)).size === days.length;
829
+ /** What setup asks for: the days and times, with no ids or anchor. The server mints those. */
830
+ const arrangementSetUpScheduleSchema = z.object({
831
+ effectiveFrom: localDate,
832
+ pattern: z.discriminatedUnion("kind", [z.object({
833
+ kind: z.literal("weekly"),
834
+ everyWeeks,
835
+ days: z.array(slotTime).min(1).max(7).refine(differentDays, "Each day can only be picked once.")
836
+ }).strict(), z.object({
837
+ kind: z.literal("monthly"),
838
+ nth,
839
+ day: slotTime
840
+ }).strict()])
841
+ }).strict();
842
+ /**
843
+ * A change to the schedule from a date. `move` changes one day's weekday or time. `add` adds a
844
+ * day (weekly patterns only); the server mints its id from the operation, and it books the new
845
+ * day's next `bookAhead` sessions the way setup does.
846
+ */
847
+ const arrangementScheduleCommandSchema = z.discriminatedUnion("kind", [z.object({
848
+ kind: z.literal("move"),
849
+ slotId: z.string().uuid(),
850
+ weekday,
851
+ localStart,
852
+ effectiveFrom: localDate
853
+ }).strict(), z.object({
854
+ kind: z.literal("add"),
779
855
  weekday,
780
- nth: z.union([
781
- z.literal(1),
782
- z.literal(2),
783
- z.literal(3),
784
- z.literal(4),
785
- z.literal("last")
786
- ])
856
+ localStart,
857
+ effectiveFrom: localDate,
858
+ bookAhead: z.number().int().min(0).max(52)
787
859
  }).strict()]);
788
860
  const arrangementEndSchema = z.discriminatedUnion("kind", [
789
861
  z.object({ kind: z.literal("open") }).strict(),
@@ -796,21 +868,17 @@ const arrangementEndSchema = z.discriminatedUnion("kind", [
796
868
  sessions: z.number().int().min(1).max(1e4)
797
869
  }).strict()
798
870
  ]);
799
- const arrangementPaymentSchema = z.discriminatedUnion("kind", [
800
- z.object({
801
- kind: z.literal("package"),
802
- customerPassId: z.string().uuid()
803
- }).strict(),
804
- z.object({ kind: z.literal("owed") }).strict(),
805
- z.object({
806
- kind: z.literal("payment_link"),
807
- sendOffsetMinutes: z.number().int().min(1).max(525600)
808
- }).strict()
809
- ]);
810
- const arrangementScheduleSchema = z.object({
871
+ /**
872
+ * How a session no package covers gets chased. What pays for each session isn't chosen: it uses a
873
+ * package the client holds that covers it, soonest-expiring first.
874
+ */
875
+ const arrangementOwedFollowUpSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("direct") }).strict(), z.object({
876
+ kind: z.literal("payment_link"),
877
+ sendOffsetMinutes: z.number().int().min(1).max(525600)
878
+ }).strict()]);
879
+ z.object({
811
880
  effectiveFrom: localDate,
812
- cadence: arrangementCadenceSchema,
813
- localStart: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/)
881
+ pattern: arrangementPatternSchema
814
882
  }).strict();
815
883
  const recordedReturn = { recordedReturn: z.literal("staff_confirmed").optional() };
816
884
  const operation = {
@@ -825,17 +893,15 @@ const createClientArrangementSchema = z.object({
825
893
  timezone: z.string().min(1),
826
894
  holdsTime: z.boolean(),
827
895
  end: arrangementEndSchema,
828
- payment: arrangementPaymentSchema,
829
- schedule: arrangementScheduleSchema,
830
- bookAhead: z.number().int().min(0).max(52),
831
- bookShortfallAsOwed: z.boolean().default(false)
896
+ owedFollowUp: arrangementOwedFollowUpSchema,
897
+ schedule: arrangementSetUpScheduleSchema,
898
+ bookAhead: z.number().int().min(0).max(52)
832
899
  }).strict();
833
900
  /** The UI selects the next N dates from get.dates, then retains this body for retry. */
834
901
  const bookNextArrangementSchema = z.object({
835
902
  ...operation,
836
903
  confirmation: z.string().optional(),
837
- occurrenceDates: z.array(localDate).min(1).max(52).refine((values) => new Set(values).size === values.length, "Choose each date once."),
838
- bookShortfallAsOwed: z.boolean().default(false)
904
+ occurrenceDates: z.array(localDate).min(1).max(52).refine((values) => new Set(values).size === values.length, "Choose each date once.")
839
905
  }).strict();
840
906
  const arrangementAwaySchema = z.object({
841
907
  ...operation,
@@ -845,27 +911,38 @@ const arrangementAwaySchema = z.object({
845
911
  }).strict().refine((value) => value.backOn > value.from, "Choose a return date after the first day away.");
846
912
  const arrangementChangeFromSchema = z.object({
847
913
  ...operation,
848
- schedule: arrangementScheduleSchema
914
+ command: arrangementScheduleCommandSchema
849
915
  }).strict();
850
916
  const arrangementOneWeekSchema = z.object({
851
917
  ...operation,
852
918
  occurrenceDate: localDate,
853
- startAt: z.iso.datetime({ offset: true }),
854
- endAt: z.iso.datetime({ offset: true }),
855
- bookShortfallAsOwed: z.boolean().default(false)
856
- }).strict().refine((value) => Date.parse(value.endAt) > Date.parse(value.startAt), "Choose an end after the start.");
857
- const arrangementEndRequestSchema = z.object({
919
+ startAt: z.iso.datetime({ offset: true })
920
+ }).strict();
921
+ /**
922
+ * Ending all of it, or one day: that day stops after `lastDate`, its bookings after then are
923
+ * cancelled, and the other days carry on.
924
+ */
925
+ const arrangementEndRequestSchema = z.discriminatedUnion("scope", [z.object({
858
926
  ...operation,
859
927
  ...recordedReturn,
928
+ scope: z.literal("all"),
860
929
  lastDate: localDate
861
- }).strict();
930
+ }).strict(), z.object({
931
+ ...operation,
932
+ ...recordedReturn,
933
+ scope: z.literal("day"),
934
+ slotId: z.string().uuid(),
935
+ lastDate: localDate
936
+ }).strict()]);
862
937
  /** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
938
+ /** `confirmation` is the preview's, when booked sessions change with the service. */
863
939
  const arrangementEditSchema = z.object({
864
940
  ...operation,
941
+ confirmation: z.string().optional(),
865
942
  expectedUpdatedAt: z.string().min(1),
866
943
  serviceId: z.string().uuid(),
867
944
  holdsTime: z.boolean(),
868
- payment: arrangementPaymentSchema
945
+ owedFollowUp: arrangementOwedFollowUpSchema
869
946
  }).strict();
870
947
  z.discriminatedUnion("kind", [
871
948
  z.object({
@@ -981,6 +1058,19 @@ z.intersection(z.object({ occurrenceDate: localDate }), z.union([
981
1058
  })
982
1059
  ])
983
1060
  }),
1061
+ z.object({
1062
+ outcome: z.literal("service_changed"),
1063
+ appointmentId: z.string(),
1064
+ startAt: z.string(),
1065
+ endAt: z.string(),
1066
+ previousEndAt: z.string(),
1067
+ price: z.discriminatedUnion("kind", [z.object({
1068
+ kind: z.literal("restated"),
1069
+ fromCents: z.number().int(),
1070
+ toCents: z.number().int(),
1071
+ currency: z.string()
1072
+ }), z.object({ kind: z.literal("kept") })])
1073
+ }),
984
1074
  z.object({
985
1075
  outcome: z.literal("cancelled"),
986
1076
  appointmentId: z.string(),
@@ -1004,11 +1094,7 @@ z.intersection(z.object({ occurrenceDate: localDate }), z.union([
1004
1094
  outcome: z.literal("refused"),
1005
1095
  appointmentId: z.string().optional()
1006
1096
  }), z.discriminatedUnion("code", [
1007
- z.object({ code: z.enum([
1008
- "package_shortfall",
1009
- "not_available",
1010
- "client_not_found"
1011
- ]) }),
1097
+ z.object({ code: z.enum(["not_available", "client_not_found"]) }),
1012
1098
  z.object({
1013
1099
  code: z.literal("clash"),
1014
1100
  customerFirstName: z.string().nullable(),
@@ -3404,6 +3490,44 @@ const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3404
3490
  "server:internal_error"
3405
3491
  ]
3406
3492
  },
3493
+ getGiftRefund: {
3494
+ path: "/sites/{siteId}/gifting/refunds/{orderItemId}",
3495
+ method: "GET",
3496
+ auth: "user",
3497
+ responseKind: "json",
3498
+ errors: [
3499
+ "auth:forbidden",
3500
+ "resource:conflict",
3501
+ "server:internal_error"
3502
+ ]
3503
+ },
3504
+ refundGift: {
3505
+ path: "/sites/{siteId}/gifting/refunds/{orderItemId}",
3506
+ method: "POST",
3507
+ auth: "user",
3508
+ responseKind: "json",
3509
+ tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
3510
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
3511
+ errors: [
3512
+ "auth:forbidden",
3513
+ "resource:conflict",
3514
+ "server:internal_error"
3515
+ ]
3516
+ },
3517
+ cancelGift: {
3518
+ path: "/sites/{siteId}/gifting/gifts/{giftId}/cancel",
3519
+ method: "POST",
3520
+ tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
3521
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
3522
+ auth: "user",
3523
+ responseKind: "json",
3524
+ errors: [
3525
+ "auth:forbidden",
3526
+ "resource:not_found",
3527
+ "resource:conflict",
3528
+ "server:internal_error"
3529
+ ]
3530
+ },
3407
3531
  changeGiftExpiry: {
3408
3532
  path: "/sites/{siteId}/gifting/gifts/{giftId}/expiry",
3409
3533
  method: "POST",
@@ -5967,6 +6091,22 @@ const API_ENDPOINTS$1 = {
5967
6091
  auth: "user",
5968
6092
  responseKind: "json"
5969
6093
  },
6094
+ getRegisteredDomainContact: {
6095
+ errors: [
6096
+ "resource:not_found",
6097
+ "auth:forbidden",
6098
+ "validation:invalid_input"
6099
+ ],
6100
+ path: "/domains/{domainId}/registrar/contact",
6101
+ method: "GET",
6102
+ auth: "user",
6103
+ tags: [
6104
+ "domains",
6105
+ "domain-{domainId}",
6106
+ "domain-registrar"
6107
+ ],
6108
+ responseKind: "json"
6109
+ },
5970
6110
  updateRegisteredDomainContact: {
5971
6111
  path: "/domains/{domainId}/registrar/contact",
5972
6112
  method: "POST",
@@ -6051,6 +6191,18 @@ const API_ENDPOINTS$1 = {
6051
6191
  auth: "user",
6052
6192
  responseKind: "json"
6053
6193
  },
6194
+ retryDomainEmailSending: {
6195
+ errors: [],
6196
+ path: "/sites/{siteId}/domains/{domainId}/email/retry",
6197
+ method: "POST",
6198
+ tags: [
6199
+ "domains",
6200
+ "domain-{domainId}",
6201
+ "domain-dns"
6202
+ ],
6203
+ auth: "user",
6204
+ responseKind: "json"
6205
+ },
6054
6206
  retryDomainResend: {
6055
6207
  path: "/domains/{domainId}/resend",
6056
6208
  method: "POST",
@@ -10407,6 +10559,9 @@ function resolveApiBaseUrl() {
10407
10559
  }
10408
10560
  //#endregion
10409
10561
  //#region ../api/src/pageReadResponseCache.ts
10562
+ function pageReadPolicy(siteId, policy) {
10563
+ return policy === "retry" ? buildPageReadRetryPolicy(siteId) : buildPageReadCachePolicy(siteId, policy);
10564
+ }
10410
10565
  function isRecord(value) {
10411
10566
  return typeof value === "object" && value !== null && !Array.isArray(value);
10412
10567
  }
@@ -10417,8 +10572,20 @@ function isResolvedPage(page) {
10417
10572
  "system_service"
10418
10573
  ].includes(String(page.result.kind));
10419
10574
  }
10575
+ /**
10576
+ * The key `serializeSurfaceTree` (theme-core) wraps a response in when it carries surface revisions. This package
10577
+ * can't depend on theme-core, so the SDK's tests check the two stay equal.
10578
+ */
10579
+ const SURFACE_TRANSPORT_ENVELOPE_KEY = "$surfaceTransport";
10580
+ /** A revision-transport body keeps the page's own fields under the envelope's `value`. */
10581
+ function withoutSurfaceTransport(data) {
10582
+ const envelope = data[SURFACE_TRANSPORT_ENVELOPE_KEY];
10583
+ if (envelope === void 0) return data;
10584
+ return isRecord(envelope) && Array.isArray(envelope.revisions) && envelope.revisions.length > 0 && isRecord(envelope.value) ? envelope.value : null;
10585
+ }
10420
10586
  function envelopePage(body) {
10421
- const data = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10587
+ const raw = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10588
+ const data = raw ? withoutSurfaceTransport(raw) : null;
10422
10589
  return data?.type === "content" && isRecord(data.content) ? data.content : data;
10423
10590
  }
10424
10591
  function parseBody(body) {
@@ -10435,40 +10602,44 @@ function admit(snapshot) {
10435
10602
  if (snapshot.status === 200 && isResolvedPage(page)) {
10436
10603
  if (header(snapshot, "x-riverbank-page-storage") === "no-store") return {
10437
10604
  kind: "pass-through",
10438
- dependencies: "availability"
10605
+ policy: "retry"
10439
10606
  };
10440
10607
  return {
10441
10608
  kind: "store",
10442
- dependencies: page.dependencies
10609
+ policy: page.dependencies
10443
10610
  };
10444
10611
  }
10612
+ if (snapshot.status === 200) return {
10613
+ kind: "pass-through",
10614
+ policy: "retry"
10615
+ };
10445
10616
  return {
10446
10617
  kind: "pass-through",
10447
- dependencies: snapshot.status === 200 || header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10618
+ policy: header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10448
10619
  };
10449
10620
  }
10450
10621
  /**
10451
10622
  * One cache entry per request, judged by the policy it is looked up with. Content is looked up first, so a
10452
10623
  * plain page costs one lookup and never registers the availability policy. A page whose snapshot depends on
10453
- * availability is looked up again under that policy, which checks its tags and 60-second budget. A snapshot
10624
+ * availability (or must be retried soon) is looked up again under that policy, which checks its tags and budget. A snapshot
10454
10625
  * past its own budget is never served: the live read replaces it.
10455
10626
  */
10456
10627
  function planPageRead(state, now, budgetSeconds) {
10457
10628
  const subject = state.live ?? state.cached;
10458
10629
  if (!subject) return {
10459
10630
  kind: "lookup",
10460
- dependencies: "content"
10631
+ policy: "content"
10461
10632
  };
10462
- const { dependencies } = admit(subject);
10463
- if (!state.lookedUp.includes(dependencies)) return {
10633
+ const { policy } = admit(subject);
10634
+ if (!state.lookedUp.includes(policy)) return {
10464
10635
  kind: "lookup",
10465
- dependencies
10636
+ policy
10466
10637
  };
10467
10638
  if (state.live) return {
10468
10639
  kind: "serve",
10469
10640
  snapshot: state.live
10470
10641
  };
10471
- return now - subject.cachedAt < budgetSeconds(dependencies) * 1e3 ? {
10642
+ return now - subject.cachedAt < budgetSeconds(policy) * 1e3 ? {
10472
10643
  kind: "serve",
10473
10644
  snapshot: subject
10474
10645
  } : { kind: "read-live" };
@@ -10479,12 +10650,21 @@ function planPageRead(state, now, budgetSeconds) {
10479
10650
  */
10480
10651
  var PassThroughResponse = class extends Error {
10481
10652
  constructor(snapshot) {
10482
- super("Page read must not be stored");
10653
+ super("Read must not be stored");
10483
10654
  this.snapshot = snapshot;
10484
10655
  }
10485
10656
  };
10486
- async function lookup(input, dependencies) {
10487
- const { tags } = buildPageReadCachePolicy(input.siteId, dependencies);
10657
+ /**
10658
+ * Names this cache's entries. Next keys an entry by these parts plus the callback's source text, and neither
10659
+ * changes when the response contract does, so a contract change bumps this name: otherwise a deploy keeps
10660
+ * serving responses the previous release cached, in the old shape, for up to their whole budget.
10661
+ *
10662
+ * - v4: a resolved page carries its own mailing-list support (`mailingList`); the hosted frontend no longer
10663
+ * asks the site read for it, so a v3 response would leave the page's newsletter forms without their lists.
10664
+ */
10665
+ const PAGE_READ_RESPONSE_CACHE_NAME = "page-read-envelope-v4";
10666
+ async function lookup(input, policy) {
10667
+ const { tags } = pageReadPolicy(input.siteId, policy);
10488
10668
  const load = async () => {
10489
10669
  const snapshot = await input.live();
10490
10670
  if (admit(snapshot).kind === "pass-through") throw new PassThroughResponse(snapshot);
@@ -10492,8 +10672,8 @@ async function lookup(input, dependencies) {
10492
10672
  };
10493
10673
  try {
10494
10674
  return {
10495
- cached: await input.cache(load, ["page-read-envelope-v3", input.key], {
10496
- revalidate: input.budgetSeconds(dependencies),
10675
+ cached: await input.cache(load, [PAGE_READ_RESPONSE_CACHE_NAME, input.key], {
10676
+ revalidate: input.budgetSeconds(policy),
10497
10677
  tags
10498
10678
  })(),
10499
10679
  live: null
@@ -10515,9 +10695,9 @@ async function runPlan(input, state) {
10515
10695
  live: await input.live()
10516
10696
  });
10517
10697
  case "lookup": {
10518
- const found = await lookup(input, step.dependencies);
10698
+ const found = await lookup(input, step.policy);
10519
10699
  return runPlan(input, {
10520
- lookedUp: [...state.lookedUp, step.dependencies],
10700
+ lookedUp: [...state.lookedUp, step.policy],
10521
10701
  cached: found.cached ?? state.cached,
10522
10702
  live: state.live ?? found.live
10523
10703
  });
@@ -10549,9 +10729,9 @@ async function frameworkCacheKey(request) {
10549
10729
  async function cachePageReadResponse(input) {
10550
10730
  if (!input.cache || input.maxAge !== void 0 && input.maxAge <= 0) return input.read();
10551
10731
  const maxAge = input.maxAge;
10552
- const budgetSeconds = (dependencies) => {
10553
- const policy = buildPageReadCachePolicy(input.siteId, dependencies).revalidate;
10554
- return maxAge === void 0 ? policy : Math.min(policy, maxAge);
10732
+ const budgetSeconds = (policy) => {
10733
+ const revalidate = pageReadPolicy(input.siteId, policy).revalidate;
10734
+ return maxAge === void 0 ? revalidate : Math.min(revalidate, maxAge);
10555
10735
  };
10556
10736
  const key = await frameworkCacheKey(input.key);
10557
10737
  const result = await runPlan({
@@ -10570,15 +10750,53 @@ async function cachePageReadResponse(input) {
10570
10750
  headers: result.headers
10571
10751
  });
10572
10752
  }
10753
+ /**
10754
+ * Names the site read's entries, for the same reason as `PAGE_READ_RESPONSE_CACHE_NAME`. A site read only
10755
+ * enters this cache when the host can answer it from its durable copy; otherwise it stays in Next's fetch cache.
10756
+ */
10757
+ const SITE_READ_RESPONSE_CACHE_NAME = "site-read-envelope-v1";
10758
+ /**
10759
+ * A site read through the framework cache, with the fetch cache's lifetime and tags, so its fill can come from
10760
+ * the host's durable copy. As in Next's fetch cache, only a 200 is kept: an incomplete site (207) or a failure
10761
+ * passes through and the next read asks again.
10762
+ */
10763
+ async function cacheSiteReadResponse(input) {
10764
+ const live = sharedRead(input.read);
10765
+ const load = async () => {
10766
+ const snapshot = await live();
10767
+ if (snapshot.status !== 200) throw new PassThroughResponse(snapshot);
10768
+ return snapshot;
10769
+ };
10770
+ const key = await frameworkCacheKey(input.key);
10771
+ const found = await input.cache(load, [SITE_READ_RESPONSE_CACHE_NAME, key], {
10772
+ revalidate: input.policy.revalidate,
10773
+ tags: input.policy.tags
10774
+ })().catch((error) => {
10775
+ if (error instanceof PassThroughResponse) return error.snapshot;
10776
+ throw error;
10777
+ });
10778
+ const snapshot = Date.now() - found.cachedAt < input.policy.revalidate * 1e3 ? found : await live();
10779
+ return new Response(snapshot.body, {
10780
+ status: snapshot.status,
10781
+ headers: snapshot.headers
10782
+ });
10783
+ }
10573
10784
  /** Result adapters use this when the SDK served a page without the HTTP transport (memory, durable or prebuild fallback). */
10574
10785
  async function observePageReadPolicy(cache, siteId, payload) {
10575
10786
  if (!cache) return;
10576
- const dependency = pageReadDependencies(payload);
10787
+ const policy = observedPageReadPolicy(pageReadDependencies(payload));
10577
10788
  await cache(async () => true, [
10578
- "page-read-policy-v2",
10789
+ "page-read-policy-v3",
10579
10790
  siteId,
10580
- dependency
10581
- ], buildPageReadCachePolicy(siteId, dependency))();
10791
+ policy
10792
+ ], pageReadPolicy(siteId, policy))();
10793
+ }
10794
+ /**
10795
+ * A page served without the tagged transport (memory, durable or prebuild) may predate a write's purge, so an
10796
+ * availability page only earns the retry window, not the rendered-availability backstop a purge would end.
10797
+ */
10798
+ function observedPageReadPolicy(dependency) {
10799
+ return dependency === "availability" ? "retry" : "content";
10582
10800
  }
10583
10801
  //#endregion
10584
10802
  //#region ../api/src/common/operationId.ts
@@ -10873,19 +11091,88 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
10873
11091
  function isPublishedPageRead(endpoint, params, options) {
10874
11092
  return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
10875
11093
  }
11094
+ /** The dashboard's reading of a boolean query flag, so a host never treats `force=1` as unforced. */
11095
+ const isTruthyRequestParam = (value) => value === true || value === "true" || value === 1 || value === "1";
11096
+ /** Forced reads skip every cache, and an id-only lookup is a different response the durable cache never holds. */
11097
+ function isFullSiteRead(params) {
11098
+ return !isTruthyRequestParam(params.force) && (params.scope === void 0 || params.scope === "full");
11099
+ }
11100
+ /** A published, full site read with a lifetime: the host's durable copy may answer it, under the fetch's policy. */
11101
+ function publishedSiteReadPolicy(endpoint, params, plan) {
11102
+ const next = plan.init.cache === "no-store" ? void 0 : plan.init.next;
11103
+ const revalidate = typeof next?.revalidate === "number" && next.revalidate > 0 ? next.revalidate : null;
11104
+ return endpoint === "getSite" && revalidate !== null && isFullSiteRead(params) ? {
11105
+ revalidate,
11106
+ tags: next?.tags ?? []
11107
+ } : null;
11108
+ }
11109
+ /** The dashboard's success envelope around a durable copy, so admission and parsing treat it like a live response. */
11110
+ function freshPublishedResponse(data) {
11111
+ return new Response(JSON.stringify(buildSuccessEnvelope(data, void 0)), {
11112
+ status: 200,
11113
+ headers: {
11114
+ "content-type": "application/json",
11115
+ "x-riverbank-cache": "frontend-hit"
11116
+ }
11117
+ });
11118
+ }
11119
+ /** The cache fill's read: the host's fresh durable copy when it has one, otherwise the dashboard. */
11120
+ function freshPublishedFirst(read, request, live) {
11121
+ if (!read) return live;
11122
+ return async () => {
11123
+ const found = await read(request).catch(() => null);
11124
+ return found ? freshPublishedResponse(found.data) : live();
11125
+ };
11126
+ }
11127
+ function publishedPageResponse(read) {
11128
+ const revalidate = read.plan.init.next?.revalidate;
11129
+ return cachePageReadResponse({
11130
+ cache: read.frameworkCache?.cache ?? null,
11131
+ key: read.key,
11132
+ siteId: typeof read.params.siteId === "string" ? read.params.siteId : "",
11133
+ maxAge: typeof revalidate === "number" ? revalidate : void 0,
11134
+ read: read.endpoint === "getContentByPath" ? freshPublishedFirst(read.frameworkCache?.readFreshPublished, {
11135
+ endpoint: "getContentByPath",
11136
+ params: read.params
11137
+ }, read.uncachedFetch) : read.uncachedFetch
11138
+ });
11139
+ }
11140
+ /** Without a durable reader, a site read stays in Next's fetch cache exactly as before. */
11141
+ function siteOrFetchResponse(read) {
11142
+ const durable = read.frameworkCache?.readFreshPublished;
11143
+ const policy = durable ? publishedSiteReadPolicy(read.endpoint, read.params, read.plan) : null;
11144
+ return read.frameworkCache && policy ? cacheSiteReadResponse({
11145
+ cache: read.frameworkCache.cache,
11146
+ key: read.key,
11147
+ policy,
11148
+ read: freshPublishedFirst(durable, {
11149
+ endpoint: "getSite",
11150
+ params: read.params
11151
+ }, read.uncachedFetch)
11152
+ }) : observedFetch(read.plan, read.endpoint, read.frameworkCache);
11153
+ }
10876
11154
  function executeApiRequest(plan, endpoint, params, options, frameworkCache) {
10877
- const inputParams = params;
10878
- const { next: fetchPolicy, ...uncachedInit } = plan.init;
10879
- return isPublishedPageRead(endpoint, inputParams, options) ? cachePageReadResponse({
10880
- cache: frameworkCache?.cache ?? null,
11155
+ const { next: _fetchPolicy, ...uncachedInit } = plan.init;
11156
+ const read = {
11157
+ plan,
11158
+ endpoint,
11159
+ params: params ?? {},
11160
+ frameworkCache,
10881
11161
  key: JSON.stringify([plan.url, [...new Headers(plan.init.headers).entries()]]),
10882
- siteId: typeof inputParams?.siteId === "string" ? inputParams.siteId : "",
10883
- maxAge: typeof fetchPolicy?.revalidate === "number" ? fetchPolicy.revalidate : void 0,
10884
- read: () => fetch(plan.url, {
11162
+ uncachedFetch: () => fetch(plan.url, {
10885
11163
  ...uncachedInit,
10886
11164
  cache: "no-store"
10887
11165
  })
10888
- }) : fetch(plan.url, plan.init);
11166
+ };
11167
+ return isPublishedPageRead(endpoint, params, options) ? publishedPageResponse(read) : siteOrFetchResponse(read);
11168
+ }
11169
+ function observedFetch(plan, endpoint, frameworkCache) {
11170
+ const revalidate = plan.init.next?.revalidate;
11171
+ if (typeof revalidate === "number" && plan.init.cache !== "no-store") frameworkCache?.observeFetchLifetime?.({
11172
+ endpoint: String(endpoint),
11173
+ revalidate
11174
+ });
11175
+ return fetch(plan.url, plan.init);
10889
11176
  }
10890
11177
  const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
10891
11178
  endpoint: z.string(),
@@ -11667,7 +11954,7 @@ var SimpleCache = class {
11667
11954
  //#endregion
11668
11955
  //#region src/request-options.ts
11669
11956
  /** Every API client the SDK creates sends its version as `x-sdk-version`. */
11670
- const sdkRequestOptions = { sdkVersion: "0.182.0" };
11957
+ const sdkRequestOptions = { sdkVersion: "0.184.0" };
11671
11958
  //#endregion
11672
11959
  //#region src/public-api/runtime.ts
11673
11960
  const PUBLIC_ENDPOINT_NAMES = [
@@ -11854,6 +12141,10 @@ function normalizeRuntimePublicPath(value) {
11854
12141
  const collapsed = (withoutQuery.startsWith("/") ? withoutQuery : `/${withoutQuery}`).replace(/\/{2,}/g, "/");
11855
12142
  return (collapsed.length > 1 ? collapsed.replace(/\/+$/g, "") : collapsed) || "/";
11856
12143
  }
12144
+ /** The site read's variant: `null` is the site-wide read; a path adds that page's runtime support. */
12145
+ function decideSiteReadPath(currentPath) {
12146
+ return toNonEmptyString(currentPath) === null ? null : normalizeRuntimePublicPath(currentPath);
12147
+ }
11857
12148
  function normalizeRuntimeHostname(value) {
11858
12149
  const trimmed = value.trim().toLowerCase();
11859
12150
  return (/^[a-z][a-z0-9+.-]*:\/\//.test(trimmed) ? new URL(trimmed) : new URL(`http://${trimmed}`)).hostname.replace(/\.$/, "");
@@ -11889,9 +12180,10 @@ function deriveGetSiteKey(params) {
11889
12180
  ]
11890
12181
  }
11891
12182
  };
12183
+ const path = decideSiteReadPath(params.currentPath);
11892
12184
  const normalizedParams = {
11893
12185
  ...identity,
11894
- ...toNonEmptyString(params.currentPath) === null ? {} : { currentPath: normalizeRuntimePublicPath(params.currentPath) }
12186
+ ...path === null ? {} : { currentPath: path }
11895
12187
  };
11896
12188
  return {
11897
12189
  ok: true,
@@ -12528,32 +12820,77 @@ var CircuitBreaker = class {
12528
12820
  }
12529
12821
  }
12530
12822
  };
12823
+ /** The SDK's read deadline when the caller sets none. */
12824
+ const DEFAULT_READ_DEADLINE_MS = 8e3;
12825
+ function createReadTimeoutError(timeoutMs) {
12826
+ return Object.assign(/* @__PURE__ */ new Error(`Request timed out after ${timeoutMs}ms`), { name: "AbortError" });
12827
+ }
12828
+ /**
12829
+ * One attempt, ended at the read's deadline even when the fetch ignores its signal.
12830
+ *
12831
+ * The signal alone isn't enough: Next drops it when it refreshes stale fetch data
12832
+ * (as an ISR regeneration does), and the read would then wait as long as the
12833
+ * origin takes. The signal is still aborted so a fetch that honours it stops.
12834
+ */
12835
+ function raceReadDeadline(fetcher, remainingMs, timeoutError) {
12836
+ const controller = new AbortController();
12837
+ return new Promise((resolve, reject) => {
12838
+ const timeoutId = setTimeout(() => {
12839
+ controller.abort();
12840
+ reject(timeoutError());
12841
+ }, remainingMs);
12842
+ fetcher(controller.signal).then((value) => {
12843
+ clearTimeout(timeoutId);
12844
+ resolve(value);
12845
+ }, (error) => {
12846
+ clearTimeout(timeoutId);
12847
+ reject(error);
12848
+ });
12849
+ });
12850
+ }
12851
+ function decideRetry(input) {
12852
+ if (input.attempt >= input.maxAttempts) return { kind: "give_up" };
12853
+ if (!shouldRetryError(input.error, input.config.retryOn)) return { kind: "give_up" };
12854
+ const delayMs = getRetryDelay(input.error, input.attempt, input.config);
12855
+ return delayMs < input.remainingMs ? {
12856
+ kind: "retry",
12857
+ delayMs
12858
+ } : { kind: "give_up" };
12859
+ }
12531
12860
  /**
12532
- * Fetch with timeout and retry logic
12861
+ * Fetch with one deadline and retry logic
12862
+ *
12863
+ * `requestTimeoutMs` bounds the whole read, so retries share what the first
12864
+ * attempt left rather than each getting a fresh budget. A timeout is never
12865
+ * retried: the deadline has passed.
12533
12866
  *
12534
12867
  * @param fetcher - Function that performs the fetch, receives AbortSignal for timeout
12535
12868
  * @param config - Retry configuration
12536
12869
  * @returns Result from successful fetch
12537
- * @throws Last error after all retries exhausted
12870
+ * @throws The last attempt's error, or a timeout once the deadline passes
12538
12871
  */
12539
- async function fetchWithTimeoutAndRetry(fetcher, config) {
12872
+ function fetchWithTimeoutAndRetry(fetcher, config) {
12540
12873
  const maxAttempts = config.maxAttempts ?? DEFAULT_RETRY_CONFIG.maxAttempts;
12541
12874
  const requestTimeoutMs = config.requestTimeoutMs ?? 8e3;
12542
- let lastError;
12543
- for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
12544
- const controller = new AbortController();
12545
- const timeoutId = setTimeout(() => controller.abort(), requestTimeoutMs);
12875
+ const deadline = Date.now() + requestTimeoutMs;
12876
+ const timeoutError = () => createReadTimeoutError(requestTimeoutMs);
12877
+ const attemptFrom = async (attempt) => {
12546
12878
  try {
12547
- return await fetcher(controller.signal);
12548
- } finally {
12549
- clearTimeout(timeoutId);
12879
+ return await raceReadDeadline(fetcher, Math.max(0, deadline - Date.now()), timeoutError);
12880
+ } catch (error) {
12881
+ const decision = decideRetry({
12882
+ error,
12883
+ attempt,
12884
+ maxAttempts,
12885
+ remainingMs: deadline - Date.now(),
12886
+ config
12887
+ });
12888
+ if (decision.kind === "give_up") throw error;
12889
+ await sleep(decision.delayMs);
12890
+ return attemptFrom(attempt + 1);
12550
12891
  }
12551
- } catch (error) {
12552
- lastError = error;
12553
- if (!shouldRetryError(error, config.retryOn)) throw error;
12554
- if (attempt < maxAttempts) await sleep(getRetryDelay(error, attempt, config));
12555
- }
12556
- throw lastError;
12892
+ };
12893
+ return attemptFrom(1);
12557
12894
  }
12558
12895
  /**
12559
12896
  * Check if an error is an AbortError (from AbortController.abort() or timeout)
@@ -12656,7 +12993,7 @@ function withDefaultHeaders(apiClient, defaultHeaders) {
12656
12993
  });
12657
12994
  }
12658
12995
  const DEFAULT_BROWSER_TIMEOUT_MS = 5e3;
12659
- const DEFAULT_SERVER_TIMEOUT_MS = 8e3;
12996
+ const DEFAULT_SERVER_TIMEOUT_MS = DEFAULT_READ_DEADLINE_MS;
12660
12997
  const MAX_GET_ENTRIES_BY_IDENTIFIERS_REFS = 50;
12661
12998
  function isDurableRuntimeCacheTier(cacheTier) {
12662
12999
  return cacheTier === "durable-fresh" || cacheTier === "durable-stale";
@@ -12681,7 +13018,7 @@ function publishedCacheLifetime(plan, payload) {
12681
13018
  freshTtlSec: plan.freshTtlSec,
12682
13019
  staleTtlSec: plan.staleTtlSec
12683
13020
  };
12684
- const ttl = buildPageReadCachePolicy(plan.siteId ?? "", "availability").revalidate;
13021
+ const ttl = 60;
12685
13022
  return {
12686
13023
  freshTtlSec: ttl,
12687
13024
  staleTtlSec: ttl
@@ -12693,11 +13030,10 @@ function reusableDurablePayload(plan, payload, freshness) {
12693
13030
  function memoryWritePolicy(pageRead, data, tags, cacheTTL) {
12694
13031
  if (!pageRead) return { tags };
12695
13032
  const dependency = pageReadDependencies(data);
12696
- const policy = buildPageReadCachePolicy(pageRead.siteId, dependency);
12697
13033
  return {
12698
- tags: policy.tags,
13034
+ tags: buildPageReadCachePolicy(pageRead.siteId, dependency).tags,
12699
13035
  ...dependency === "availability" ? {
12700
- ttl: Math.min(cacheTTL, policy.revalidate * 1e3),
13036
+ ttl: Math.min(cacheTTL, 60 * 1e3),
12701
13037
  staleTtl: 0
12702
13038
  } : {}
12703
13039
  };
@@ -13017,7 +13353,7 @@ function createRiverbankClientWithDeps(deps, config) {
13017
13353
  const result = await reader({
13018
13354
  cacheKey: plan.cacheKey,
13019
13355
  endpoint: plan.endpoint,
13020
- payloadSchemaVersion: 5
13356
+ payloadSchemaVersion: 10
13021
13357
  });
13022
13358
  if (result.kind === "miss") return {
13023
13359
  kind: "miss",
@@ -13066,7 +13402,7 @@ function createRiverbankClientWithDeps(deps, config) {
13066
13402
  payload,
13067
13403
  siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
13068
13404
  ...publishedCacheLifetime(plan, payload),
13069
- payloadSchemaVersion: 5,
13405
+ payloadSchemaVersion: 10,
13070
13406
  writeReason: "live_success"
13071
13407
  });
13072
13408
  } catch {}
@@ -13080,6 +13416,11 @@ function createRiverbankClientWithDeps(deps, config) {
13080
13416
  error: input.error
13081
13417
  })) : null;
13082
13418
  }
13419
+ /** Every fallback leaves through here, so the caller's hook sees each one. */
13420
+ async function serveFallback(fallback) {
13421
+ await config.resilience?.beforeFallbackServed?.(fallback.resilience);
13422
+ return fallback;
13423
+ }
13083
13424
  async function resilientFetch(cacheKey, fetcher, options) {
13084
13425
  const requestId = generateRequestId();
13085
13426
  const startTime = Date.now();
@@ -13099,21 +13440,21 @@ function createRiverbankClientWithDeps(deps, config) {
13099
13440
  if (resilienceEnabled && circuitBreaker.isOpen()) {
13100
13441
  if (allowFallbacks && !isPreview && staleIfError) {
13101
13442
  const stale = cache.getStale(cacheKey);
13102
- if (stale) return emitStatus("stale", stale.value, statusDetails({
13443
+ if (stale) return serveFallback(emitStatus("stale", stale.value, statusDetails({
13103
13444
  staleAgeSec: stale.staleAgeSec,
13104
13445
  cacheTier: "memory-stale",
13105
13446
  error: {
13106
13447
  code: "circuit_open",
13107
13448
  message: "Circuit breaker is open"
13108
13449
  }
13109
- }));
13450
+ })));
13110
13451
  }
13111
13452
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, {
13112
13453
  code: "circuit_open",
13113
13454
  message: "Circuit breaker is open"
13114
13455
  }) : null;
13115
13456
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
13116
- if (durableFallback?.kind === "hit") return durableFallback.result;
13457
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
13117
13458
  const prebuild = tryPrebuildFallback({
13118
13459
  allowed: allowFallbacks,
13119
13460
  preview: isPreview,
@@ -13125,7 +13466,7 @@ function createRiverbankClientWithDeps(deps, config) {
13125
13466
  message: "Circuit breaker is open"
13126
13467
  }
13127
13468
  });
13128
- if (prebuild) return prebuild;
13469
+ if (prebuild) return serveFallback(prebuild);
13129
13470
  const circuitState = circuitBreaker.getState();
13130
13471
  emitStatus("error", null, statusDetails({
13131
13472
  durableCache,
@@ -13173,17 +13514,17 @@ function createRiverbankClientWithDeps(deps, config) {
13173
13514
  const stale = cache.getStale(cacheKey);
13174
13515
  if (stale) {
13175
13516
  const errorInfo = getRiverbankErrorInfo(error);
13176
- return emitStatus("stale", stale.value, statusDetails({
13517
+ return serveFallback(emitStatus("stale", stale.value, statusDetails({
13177
13518
  staleAgeSec: stale.staleAgeSec,
13178
13519
  cacheTier: "memory-stale",
13179
13520
  error: errorInfo
13180
- }));
13521
+ })));
13181
13522
  }
13182
13523
  }
13183
13524
  const errorInfo = getRiverbankErrorInfo(error);
13184
13525
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, errorInfo) : null;
13185
13526
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
13186
- if (durableFallback?.kind === "hit") return durableFallback.result;
13527
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
13187
13528
  const prebuild = tryPrebuildFallback({
13188
13529
  allowed: allowFallbacks,
13189
13530
  preview: isPreview,
@@ -13192,7 +13533,7 @@ function createRiverbankClientWithDeps(deps, config) {
13192
13533
  durableCache,
13193
13534
  error: errorInfo
13194
13535
  });
13195
- if (prebuild) return prebuild;
13536
+ if (prebuild) return serveFallback(prebuild);
13196
13537
  throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({
13197
13538
  error: errorInfo,
13198
13539
  durableCache