@riverbankcms/sdk 0.181.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-CVCasDPz.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
  4. package/dist/_dts/{Page-Dtj2Ui3S.d.ts → Page-CEqZJZEE.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D1f_60WW.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
  6. package/dist/_dts/{client-Chr9pNVW.d.ts → client-B_B_amKD.d.ts} +2 -3
  7. package/dist/_dts/{content-types-kjccgopX.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
  8. package/dist/_dts/{contracts-BodaiS00.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-BS6kaJFp.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
  10. package/dist/_dts/{index-Brl6_I2j.d.ts → index-BOpUh8kO.d.ts} +1 -1
  11. package/dist/_dts/{index-CJkefwYh.d.ts → index-Bizdaxji.d.ts} +2 -2
  12. package/dist/_dts/{index-Diqt0PvG.d.ts → index-BxCmCit0.d.ts} +1 -1
  13. package/dist/_dts/{index-DG0OvBs0.d.ts → index-CjAkEWAp.d.ts} +4 -4
  14. package/dist/_dts/{index-D1WpKwQe.d.ts → index-iuFrbIjt.d.ts} +1 -1
  15. package/dist/_dts/{index-Dy50xUMK.d.ts → index-liuhlOX7.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-BgxshKrA.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
  17. package/dist/_dts/{request-CA0izds5.d.ts → request-Gn0O1blj.d.ts} +25042 -23761
  18. package/dist/_dts/{resolveBlockData-ChQmwEd3.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-BvGyvblj.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-BgFbJQhU.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
  56. package/dist/_dts/{types-CgS3xLk8.d.ts → types-BoITy0rA.d.ts} +41 -4
  57. package/dist/_dts/{types-CQrsP1x_.d.ts → types-DBNuMtSk.d.ts} +16 -5
  58. package/dist/_dts/{types-R65DKjPn.d.ts → types-DHMcuoeQ.d.ts} +7 -7
  59. package/dist/_dts/{validation-6LTIbuBA.d.ts → validation-BIPO-XlE.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-DqZPz6oW.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-uWfR2kaG.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-CyNIKw6k.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-BGCX3zwG.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +27 -10
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-DFLPyuqe.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
  67. package/dist/client/{EventCalendar.client-zDL4-t-B.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-uciDKLID.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
  70. package/dist/client/{EventItem-CwzrjcRw.mjs → EventItem-Fr2qi2C2.mjs} +33 -186
  71. package/dist/client/{EventListWeekNavigation-ChvcnPma.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
  72. package/dist/client/{EventListing.client-DA57Qoyx.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DZ0qMFF4.mjs → EventListing.view-COuEJzbO.mjs} +8 -8
  74. package/dist/client/{EventRegistrationPayment-DSqCJL8E.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +41 -195
  75. package/dist/client/{Page-C7mygH_f.mjs → Page-CgbQZP5g.mjs} +2947 -1018
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-B4z-e4Wq.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
  78. package/dist/client/{StepIndicator-Dn_DY4oY.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
  79. package/dist/client/{StepIndicator-atfDU82W.mjs → StepIndicator-DyXoI3ob.mjs} +221 -20
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
  81. package/dist/client/{accessibleSurfaces-n6kS6Hct.mjs → accessibleSurfaces-wj4Rloo5.mjs} +1214 -724
  82. package/dist/client/{accordion-CsW8U3ff.mjs → accordion-BVXfjnh-.mjs} +1 -1
  83. package/dist/client/{booking-form.client-cBWM392H.mjs → booking-form.client-DycPGtke.mjs} +191 -71
  84. package/dist/client/{bookingForm-DgySpp6C.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BpGVdLFD.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
  87. package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
  88. package/dist/client/{carousel-DJoleFV3.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-EO5o6uPH.mjs → cart-BuEp_cj4.mjs} +3 -3
  91. package/dist/client/{cart.client-D_gPw45z.mjs → cart.client-CAO39uDG.mjs} +1 -1
  92. package/dist/client/{checkout-NVfZW0kR.mjs → checkout-BoxzT64s.mjs} +3 -3
  93. package/dist/client/{checkout.client-DD3JuqOy.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-z2gXvlGw.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
  95. package/dist/client/client.mjs +466 -94
  96. package/dist/client/{constants-CoOkvw__.mjs → constants-C_8AxMdm.mjs} +1 -1
  97. package/dist/client/{context-CRhn9qzS.mjs → context-D1L0pe__.mjs} +23 -5
  98. package/dist/client/{dateFormatting-BnWB4L1s.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-CWDGSTBu.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-tdP_-Z9o.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
  101. package/dist/client/{event-registration.client-D7YYKySQ.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
  102. package/dist/client/{eventCalendar-CsAfu5d0.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
  103. package/dist/client/{eventCombined-VXJB5CoS.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
  104. package/dist/client/{eventListing-B3KIZNfY.mjs → eventListing-aTLifOX7.mjs} +4 -4
  105. package/dist/client/{eventRegistration-BP-dEk1c.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
  106. package/dist/client/{form-DM8Zbxbv.mjs → form-Dikmc2AO.mjs} +3 -3
  107. package/dist/client/{form.client-e2z_Tlgk.mjs → form.client-zHaQK5I9.mjs} +5 -5
  108. package/dist/client/{form.parts-Ctljy1a3.mjs → form.parts-BLl9n8TH.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-DWIsqQru.mjs → gifting-CufPM38H.mjs} +4 -4
  111. package/dist/client/{gifting.client-QsSWF0uA.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-DAkRkwb-.mjs → headerSection-BIaBpmk3.mjs} +2 -2
  115. package/dist/client/{noop-Dl4mZ-rr.mjs → islands-DJDLGQEm.mjs} +16008 -8676
  116. package/dist/client/{newsletter-form.client-WYja9-WN.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-RuM86VAv.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +384 -326
  118. package/dist/client/{newsletter-form.parts-2petDnWv.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
  119. package/dist/client/{newsletterForm-BUbXdA_e.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +291 -101
  121. package/dist/client/{portalOrders-COGn4BKG.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-D72yvtDh.mjs → portalRoutes-DTHlWg_F.mjs} +33 -7
  123. package/dist/client/{product-detail.client-pOAryevt.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
  124. package/dist/client/{product-list.client-CcUpUiud.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
  125. package/dist/client/{productDetail-BZJCfqat.mjs → productDetail-DhZAwo60.mjs} +3 -3
  126. package/dist/client/{productList-CiRs3mNb.mjs → productList-BiVpbZK2.mjs} +3 -3
  127. package/dist/client/{propsDecoder--uHW4tFM.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
  128. package/dist/client/{registry.server-CDNNd8wC.mjs → registry.server-C3OBRg7x.mjs} +2305 -873
  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-CQGE_wHV.mjs → richText-coerce-ms477Z08.mjs} +2 -2
  133. package/dist/client/{routeIslandApiConfig-BtCg87-N.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-Ds9cmBUf.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
  135. package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
  136. package/dist/client/{shop-commerce-D8evQnMT.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
  137. package/dist/client/{shop-commerce-store-C9PcsSTj.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
  138. package/dist/client/{shop-discount-apply.state-D5CtGfJI.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
  139. package/dist/client/{shop-Rx_gEMK8.mjs → shop-xt4dQ3HH.mjs} +3 -3
  140. package/dist/client/{shop.client-D4lzQ9oY.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
  141. package/dist/client/{shopShared-BVbq7Nm-.mjs → shopShared-DS8t6749.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/{src-ZSqRK3dD.mjs → src-Do_s2lqH.mjs} +16 -19
  144. package/dist/client/{timetableModel-BQJrSK0K.mjs → timetableModel-Dy3nNfTG.mjs} +13 -17
  145. package/dist/client/{useAvailableSlots-Dm3lKJKR.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
  146. package/dist/client/{useDiscountCodeUi-klgfGn7f.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
  147. package/dist/client/{useEventPagination-Jnjt7_ly.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
  148. package/dist/client/{view-CC_yQLSA.mjs → view-4gnPcpWJ.mjs} +24 -9
  149. package/dist/client/{wizardSteps-BliJOzEX.mjs → wizardSteps-DDvL3iza.mjs} +375 -186
  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-BhL0uADo.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
  154. package/dist/preview-next/client/{PreviewEditorSidebar-Ct8eIm0i.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3871 -1947
  155. package/dist/preview-next/client/{PreviewEditorUI-BS32G4V9.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
  156. package/dist/preview-next/client/{PreviewShell-RL0WfZXD.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-MK_gHeGy.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +51 -20
  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-CQyS8pcq.mjs → previewAssistantSlot-CqH91EwA.mjs} +20687 -8562
  161. package/dist/preview-next/client/{previewChromeRoot-BSxp3Mfu.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-DKnTzy74.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
  164. package/dist/preview-next/client/{siteStyleAccess-BlmbvbLN.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
  165. package/dist/preview-next/client/{useAutosaveStatus-D-7GwZOQ.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
  166. package/dist/preview-next/client/{useOpenBlockForSetup-BNZtGM5g.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-R3PcMmax.mjs → route-contract-Ch0X99vE.mjs} +183 -18
  172. package/dist/server/{Block.shared-CniF9tSu.mjs → Block.shared-B2FmczLO.mjs} +5 -5
  173. package/dist/server/{ThemeScopeCore-BQWsnGT6.mjs → ThemeScopeCore-DtAyv9qA.mjs} +51 -29
  174. package/dist/server/{accessibleSurfaces-WPzUAHp4.mjs → accessibleSurfaces-BtPqb76u.mjs} +509 -389
  175. package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
  176. package/dist/server/{bindings-DxojjtK3.mjs → bindings-B_9JuU66.mjs} +7 -7
  177. package/dist/server/{client-CDndhbYO.mjs → client-DC7cjiSw.mjs} +489 -93
  178. package/dist/server/config-validation.mjs +1 -1
  179. package/dist/server/config.mjs +2 -2
  180. package/dist/server/{constants-VyF5nEhL.mjs → constants-d6nPNJpe.mjs} +33 -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/{resolveButtonColourStates-B0O1IM16.mjs → expandPalette-DxPrNOAB.mjs} +950 -316
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-BKstMBmX.mjs → loadContent-hb27HYic.mjs} +11 -10
  186. package/dist/server/{loadPage-IgNnZaqr.mjs → loadPage-JToD8wDD.mjs} +3 -3
  187. package/dist/server/{lookMediaFrame-TFjgNG61.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-quBYlSKD.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-CCaAPpIa.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +3 -3
  194. package/dist/server/{pageRenderPlan-B7iULvKe.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +242 -336
  195. package/dist/server/{pageRuntimeSupport-BytMroxn.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
  196. package/dist/server/{pageShared-Dcs_XTIO.mjs → pageShared-m80Xu2pd.mjs} +1292 -877
  197. package/dist/server/{parseThemeForPersistence-Bihl4W5K.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
  198. package/dist/server/{portal-CMW_b9mG.mjs → portal-B2wCQno_.mjs} +1 -1
  199. package/dist/server/portal.mjs +2 -2
  200. package/dist/server/{prebuild-agaH-vZV.mjs → prebuild-BWIkFaXq.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-DwpRjqw4.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
  203. package/dist/server/{registry-DM9dHfDC.mjs → registry-KtsOsAzY.mjs} +21703 -10936
  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-CinHGf8l.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-BBBhOtdE.mjs → servicePageContent-ChEZDRwU.mjs} +38 -15
  213. package/dist/server/theme-bridge.mjs +34 -9
  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-DG5jX3jH.mjs → validation-Cvi-1TZZ.mjs} +13 -9
  220. package/dist/server/{version-CipbxPHL.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 +2568 -154
  223. package/package.json +1 -1
  224. package/dist/client/gifting.parts-CedLgwa_.mjs +0 -86
  225. package/dist/client/runtimeResponse-DL_ARBpa.mjs +0 -3
  226. package/dist/client/types-BEaKfam_.mjs +0 -778
@@ -1,8 +1,8 @@
1
- import { n as parseSurfaceTree } from "./accessibleSurfaces-WPzUAHp4.mjs";
1
+ import { n as parseSurfaceTree } from "./accessibleSurfaces-BtPqb76u.mjs";
2
2
  import { i as rethrowClientFrameworkSignal, l as isSupportedLoaderEndpoint, o as encodePublicProductCategorySelector, r as findFrameworkSignal, t as materializeEntriesMedia } from "./responseMedia-IfH65QAH.mjs";
3
3
  import { f as parseSiteId, t as publicMapLocationParamsSchema } from "./mapLocation-MDDSubTp.mjs";
4
4
  import { a as ApiEnvelopeError, c as unwrapResponse, i as ApiRequestError, l as CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS, n as attachResilienceStatusToError, o as extractApiEnvelopeErrorDetails, s as isApiError, t as RiverbankApiError, u as defineEndpointDefinitions } from "./error-f4g44bKx.mjs";
5
- import { t as SDK_VERSION } from "./version-CipbxPHL.mjs";
5
+ import { t as SDK_VERSION } from "./version-B-icAIV1.mjs";
6
6
  import { z } from "zod";
7
7
  /**
8
8
  * How long a rendered page may hold availability it read through the batch
@@ -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,68 @@ 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),
859
+ bookShortfallAsOwed: z.boolean().default(false)
787
860
  }).strict()]);
788
861
  const arrangementEndSchema = z.discriminatedUnion("kind", [
789
862
  z.object({ kind: z.literal("open") }).strict(),
@@ -807,10 +880,9 @@ const arrangementPaymentSchema = z.discriminatedUnion("kind", [
807
880
  sendOffsetMinutes: z.number().int().min(1).max(525600)
808
881
  }).strict()
809
882
  ]);
810
- const arrangementScheduleSchema = z.object({
883
+ z.object({
811
884
  effectiveFrom: localDate,
812
- cadence: arrangementCadenceSchema,
813
- localStart: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/)
885
+ pattern: arrangementPatternSchema
814
886
  }).strict();
815
887
  const recordedReturn = { recordedReturn: z.literal("staff_confirmed").optional() };
816
888
  const operation = {
@@ -826,7 +898,7 @@ const createClientArrangementSchema = z.object({
826
898
  holdsTime: z.boolean(),
827
899
  end: arrangementEndSchema,
828
900
  payment: arrangementPaymentSchema,
829
- schedule: arrangementScheduleSchema,
901
+ schedule: arrangementSetUpScheduleSchema,
830
902
  bookAhead: z.number().int().min(0).max(52),
831
903
  bookShortfallAsOwed: z.boolean().default(false)
832
904
  }).strict();
@@ -845,7 +917,7 @@ const arrangementAwaySchema = z.object({
845
917
  }).strict().refine((value) => value.backOn > value.from, "Choose a return date after the first day away.");
846
918
  const arrangementChangeFromSchema = z.object({
847
919
  ...operation,
848
- schedule: arrangementScheduleSchema
920
+ command: arrangementScheduleCommandSchema
849
921
  }).strict();
850
922
  const arrangementOneWeekSchema = z.object({
851
923
  ...operation,
@@ -854,14 +926,27 @@ const arrangementOneWeekSchema = z.object({
854
926
  endAt: z.iso.datetime({ offset: true }),
855
927
  bookShortfallAsOwed: z.boolean().default(false)
856
928
  }).strict().refine((value) => Date.parse(value.endAt) > Date.parse(value.startAt), "Choose an end after the start.");
857
- const arrangementEndRequestSchema = z.object({
929
+ /**
930
+ * Ending all of it, or one day: that day stops after `lastDate`, its bookings after then are
931
+ * cancelled, and the other days carry on.
932
+ */
933
+ const arrangementEndRequestSchema = z.discriminatedUnion("scope", [z.object({
858
934
  ...operation,
859
935
  ...recordedReturn,
936
+ scope: z.literal("all"),
860
937
  lastDate: localDate
861
- }).strict();
938
+ }).strict(), z.object({
939
+ ...operation,
940
+ ...recordedReturn,
941
+ scope: z.literal("day"),
942
+ slotId: z.string().uuid(),
943
+ lastDate: localDate
944
+ }).strict()]);
862
945
  /** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
946
+ /** `confirmation` is the preview's, when booked sessions change with the service. */
863
947
  const arrangementEditSchema = z.object({
864
948
  ...operation,
949
+ confirmation: z.string().optional(),
865
950
  expectedUpdatedAt: z.string().min(1),
866
951
  serviceId: z.string().uuid(),
867
952
  holdsTime: z.boolean(),
@@ -981,6 +1066,19 @@ z.intersection(z.object({ occurrenceDate: localDate }), z.union([
981
1066
  })
982
1067
  ])
983
1068
  }),
1069
+ z.object({
1070
+ outcome: z.literal("service_changed"),
1071
+ appointmentId: z.string(),
1072
+ startAt: z.string(),
1073
+ endAt: z.string(),
1074
+ previousEndAt: z.string(),
1075
+ price: z.discriminatedUnion("kind", [z.object({
1076
+ kind: z.literal("restated"),
1077
+ fromCents: z.number().int(),
1078
+ toCents: z.number().int(),
1079
+ currency: z.string()
1080
+ }), z.object({ kind: z.literal("kept") })])
1081
+ }),
984
1082
  z.object({
985
1083
  outcome: z.literal("cancelled"),
986
1084
  appointmentId: z.string(),
@@ -3404,6 +3502,59 @@ const GIFTING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3404
3502
  "server:internal_error"
3405
3503
  ]
3406
3504
  },
3505
+ getGiftRefund: {
3506
+ path: "/sites/{siteId}/gifting/refunds/{orderItemId}",
3507
+ method: "GET",
3508
+ auth: "user",
3509
+ responseKind: "json",
3510
+ errors: [
3511
+ "auth:forbidden",
3512
+ "resource:conflict",
3513
+ "server:internal_error"
3514
+ ]
3515
+ },
3516
+ refundGift: {
3517
+ path: "/sites/{siteId}/gifting/refunds/{orderItemId}",
3518
+ method: "POST",
3519
+ auth: "user",
3520
+ responseKind: "json",
3521
+ tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
3522
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
3523
+ errors: [
3524
+ "auth:forbidden",
3525
+ "resource:conflict",
3526
+ "server:internal_error"
3527
+ ]
3528
+ },
3529
+ cancelGift: {
3530
+ path: "/sites/{siteId}/gifting/gifts/{giftId}/cancel",
3531
+ method: "POST",
3532
+ tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
3533
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
3534
+ auth: "user",
3535
+ responseKind: "json",
3536
+ errors: [
3537
+ "auth:forbidden",
3538
+ "resource:not_found",
3539
+ "resource:conflict",
3540
+ "server:internal_error"
3541
+ ]
3542
+ },
3543
+ changeGiftExpiry: {
3544
+ path: "/sites/{siteId}/gifting/gifts/{giftId}/expiry",
3545
+ method: "POST",
3546
+ tags: ["site-{siteId}", "gifting-gifts-{siteId}"],
3547
+ auth: "user",
3548
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
3549
+ responseKind: "json",
3550
+ errors: [
3551
+ "validation:invalid_input",
3552
+ "auth:forbidden",
3553
+ "resource:not_found",
3554
+ "resource:conflict",
3555
+ "server:internal_error"
3556
+ ]
3557
+ },
3407
3558
  updateGiftingSettings: {
3408
3559
  path: "/sites/{siteId}/gifting/settings",
3409
3560
  method: "PATCH",
@@ -5906,6 +6057,22 @@ const API_ENDPOINTS$1 = {
5906
6057
  auth: "user",
5907
6058
  responseKind: "json"
5908
6059
  },
6060
+ getRegisteredDomainContact: {
6061
+ errors: [
6062
+ "resource:not_found",
6063
+ "auth:forbidden",
6064
+ "validation:invalid_input"
6065
+ ],
6066
+ path: "/domains/{domainId}/registrar/contact",
6067
+ method: "GET",
6068
+ auth: "user",
6069
+ tags: [
6070
+ "domains",
6071
+ "domain-{domainId}",
6072
+ "domain-registrar"
6073
+ ],
6074
+ responseKind: "json"
6075
+ },
5909
6076
  updateRegisteredDomainContact: {
5910
6077
  path: "/domains/{domainId}/registrar/contact",
5911
6078
  method: "POST",
@@ -5990,6 +6157,18 @@ const API_ENDPOINTS$1 = {
5990
6157
  auth: "user",
5991
6158
  responseKind: "json"
5992
6159
  },
6160
+ retryDomainEmailSending: {
6161
+ errors: [],
6162
+ path: "/sites/{siteId}/domains/{domainId}/email/retry",
6163
+ method: "POST",
6164
+ tags: [
6165
+ "domains",
6166
+ "domain-{domainId}",
6167
+ "domain-dns"
6168
+ ],
6169
+ auth: "user",
6170
+ responseKind: "json"
6171
+ },
5993
6172
  retryDomainResend: {
5994
6173
  path: "/domains/{domainId}/resend",
5995
6174
  method: "POST",
@@ -9740,7 +9919,11 @@ const API_ENDPOINTS$1 = {
9740
9919
  method: "GET",
9741
9920
  auth: "public",
9742
9921
  responseKind: "json",
9743
- errors: ["resource:not_found", "server:internal_error"]
9922
+ errors: [
9923
+ "resource:not_found",
9924
+ "resource:gone",
9925
+ "server:internal_error"
9926
+ ]
9744
9927
  },
9745
9928
  portalGetBooking: {
9746
9929
  path: "/portal/bookings/{kind}/{bookingId}",
@@ -10201,6 +10384,9 @@ function resolveApiBaseUrl() {
10201
10384
  }
10202
10385
  //#endregion
10203
10386
  //#region ../api/src/pageReadResponseCache.ts
10387
+ function pageReadPolicy(siteId, policy) {
10388
+ return policy === "retry" ? buildPageReadRetryPolicy(siteId) : buildPageReadCachePolicy(siteId, policy);
10389
+ }
10204
10390
  function isRecord(value) {
10205
10391
  return typeof value === "object" && value !== null && !Array.isArray(value);
10206
10392
  }
@@ -10211,8 +10397,20 @@ function isResolvedPage(page) {
10211
10397
  "system_service"
10212
10398
  ].includes(String(page.result.kind));
10213
10399
  }
10400
+ /**
10401
+ * The key `serializeSurfaceTree` (theme-core) wraps a response in when it carries surface revisions. This package
10402
+ * can't depend on theme-core, so the SDK's tests check the two stay equal.
10403
+ */
10404
+ const SURFACE_TRANSPORT_ENVELOPE_KEY = "$surfaceTransport";
10405
+ /** A revision-transport body keeps the page's own fields under the envelope's `value`. */
10406
+ function withoutSurfaceTransport(data) {
10407
+ const envelope = data[SURFACE_TRANSPORT_ENVELOPE_KEY];
10408
+ if (envelope === void 0) return data;
10409
+ return isRecord(envelope) && Array.isArray(envelope.revisions) && envelope.revisions.length > 0 && isRecord(envelope.value) ? envelope.value : null;
10410
+ }
10214
10411
  function envelopePage(body) {
10215
- const data = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10412
+ const raw = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10413
+ const data = raw ? withoutSurfaceTransport(raw) : null;
10216
10414
  return data?.type === "content" && isRecord(data.content) ? data.content : data;
10217
10415
  }
10218
10416
  function parseBody(body) {
@@ -10229,40 +10427,44 @@ function admit(snapshot) {
10229
10427
  if (snapshot.status === 200 && isResolvedPage(page)) {
10230
10428
  if (header(snapshot, "x-riverbank-page-storage") === "no-store") return {
10231
10429
  kind: "pass-through",
10232
- dependencies: "availability"
10430
+ policy: "retry"
10233
10431
  };
10234
10432
  return {
10235
10433
  kind: "store",
10236
- dependencies: page.dependencies
10434
+ policy: page.dependencies
10237
10435
  };
10238
10436
  }
10437
+ if (snapshot.status === 200) return {
10438
+ kind: "pass-through",
10439
+ policy: "retry"
10440
+ };
10239
10441
  return {
10240
10442
  kind: "pass-through",
10241
- dependencies: snapshot.status === 200 || header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10443
+ policy: header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10242
10444
  };
10243
10445
  }
10244
10446
  /**
10245
10447
  * One cache entry per request, judged by the policy it is looked up with. Content is looked up first, so a
10246
10448
  * plain page costs one lookup and never registers the availability policy. A page whose snapshot depends on
10247
- * availability is looked up again under that policy, which checks its tags and 60-second budget. A snapshot
10449
+ * availability (or must be retried soon) is looked up again under that policy, which checks its tags and budget. A snapshot
10248
10450
  * past its own budget is never served: the live read replaces it.
10249
10451
  */
10250
10452
  function planPageRead(state, now, budgetSeconds) {
10251
10453
  const subject = state.live ?? state.cached;
10252
10454
  if (!subject) return {
10253
10455
  kind: "lookup",
10254
- dependencies: "content"
10456
+ policy: "content"
10255
10457
  };
10256
- const { dependencies } = admit(subject);
10257
- if (!state.lookedUp.includes(dependencies)) return {
10458
+ const { policy } = admit(subject);
10459
+ if (!state.lookedUp.includes(policy)) return {
10258
10460
  kind: "lookup",
10259
- dependencies
10461
+ policy
10260
10462
  };
10261
10463
  if (state.live) return {
10262
10464
  kind: "serve",
10263
10465
  snapshot: state.live
10264
10466
  };
10265
- return now - subject.cachedAt < budgetSeconds(dependencies) * 1e3 ? {
10467
+ return now - subject.cachedAt < budgetSeconds(policy) * 1e3 ? {
10266
10468
  kind: "serve",
10267
10469
  snapshot: subject
10268
10470
  } : { kind: "read-live" };
@@ -10273,12 +10475,21 @@ function planPageRead(state, now, budgetSeconds) {
10273
10475
  */
10274
10476
  var PassThroughResponse = class extends Error {
10275
10477
  constructor(snapshot) {
10276
- super("Page read must not be stored");
10478
+ super("Read must not be stored");
10277
10479
  this.snapshot = snapshot;
10278
10480
  }
10279
10481
  };
10280
- async function lookup(input, dependencies) {
10281
- const { tags } = buildPageReadCachePolicy(input.siteId, dependencies);
10482
+ /**
10483
+ * Names this cache's entries. Next keys an entry by these parts plus the callback's source text, and neither
10484
+ * changes when the response contract does, so a contract change bumps this name: otherwise a deploy keeps
10485
+ * serving responses the previous release cached, in the old shape, for up to their whole budget.
10486
+ *
10487
+ * - v4: a resolved page carries its own mailing-list support (`mailingList`); the hosted frontend no longer
10488
+ * asks the site read for it, so a v3 response would leave the page's newsletter forms without their lists.
10489
+ */
10490
+ const PAGE_READ_RESPONSE_CACHE_NAME = "page-read-envelope-v4";
10491
+ async function lookup(input, policy) {
10492
+ const { tags } = pageReadPolicy(input.siteId, policy);
10282
10493
  const load = async () => {
10283
10494
  const snapshot = await input.live();
10284
10495
  if (admit(snapshot).kind === "pass-through") throw new PassThroughResponse(snapshot);
@@ -10286,8 +10497,8 @@ async function lookup(input, dependencies) {
10286
10497
  };
10287
10498
  try {
10288
10499
  return {
10289
- cached: await input.cache(load, ["page-read-envelope-v3", input.key], {
10290
- revalidate: input.budgetSeconds(dependencies),
10500
+ cached: await input.cache(load, [PAGE_READ_RESPONSE_CACHE_NAME, input.key], {
10501
+ revalidate: input.budgetSeconds(policy),
10291
10502
  tags
10292
10503
  })(),
10293
10504
  live: null
@@ -10309,9 +10520,9 @@ async function runPlan(input, state) {
10309
10520
  live: await input.live()
10310
10521
  });
10311
10522
  case "lookup": {
10312
- const found = await lookup(input, step.dependencies);
10523
+ const found = await lookup(input, step.policy);
10313
10524
  return runPlan(input, {
10314
- lookedUp: [...state.lookedUp, step.dependencies],
10525
+ lookedUp: [...state.lookedUp, step.policy],
10315
10526
  cached: found.cached ?? state.cached,
10316
10527
  live: state.live ?? found.live
10317
10528
  });
@@ -10343,9 +10554,9 @@ async function frameworkCacheKey(request) {
10343
10554
  async function cachePageReadResponse(input) {
10344
10555
  if (!input.cache || input.maxAge !== void 0 && input.maxAge <= 0) return input.read();
10345
10556
  const maxAge = input.maxAge;
10346
- const budgetSeconds = (dependencies) => {
10347
- const policy = buildPageReadCachePolicy(input.siteId, dependencies).revalidate;
10348
- return maxAge === void 0 ? policy : Math.min(policy, maxAge);
10557
+ const budgetSeconds = (policy) => {
10558
+ const revalidate = pageReadPolicy(input.siteId, policy).revalidate;
10559
+ return maxAge === void 0 ? revalidate : Math.min(revalidate, maxAge);
10349
10560
  };
10350
10561
  const key = await frameworkCacheKey(input.key);
10351
10562
  const result = await runPlan({
@@ -10364,15 +10575,53 @@ async function cachePageReadResponse(input) {
10364
10575
  headers: result.headers
10365
10576
  });
10366
10577
  }
10578
+ /**
10579
+ * Names the site read's entries, for the same reason as `PAGE_READ_RESPONSE_CACHE_NAME`. A site read only
10580
+ * enters this cache when the host can answer it from its durable copy; otherwise it stays in Next's fetch cache.
10581
+ */
10582
+ const SITE_READ_RESPONSE_CACHE_NAME = "site-read-envelope-v1";
10583
+ /**
10584
+ * A site read through the framework cache, with the fetch cache's lifetime and tags, so its fill can come from
10585
+ * the host's durable copy. As in Next's fetch cache, only a 200 is kept: an incomplete site (207) or a failure
10586
+ * passes through and the next read asks again.
10587
+ */
10588
+ async function cacheSiteReadResponse(input) {
10589
+ const live = sharedRead(input.read);
10590
+ const load = async () => {
10591
+ const snapshot = await live();
10592
+ if (snapshot.status !== 200) throw new PassThroughResponse(snapshot);
10593
+ return snapshot;
10594
+ };
10595
+ const key = await frameworkCacheKey(input.key);
10596
+ const found = await input.cache(load, [SITE_READ_RESPONSE_CACHE_NAME, key], {
10597
+ revalidate: input.policy.revalidate,
10598
+ tags: input.policy.tags
10599
+ })().catch((error) => {
10600
+ if (error instanceof PassThroughResponse) return error.snapshot;
10601
+ throw error;
10602
+ });
10603
+ const snapshot = Date.now() - found.cachedAt < input.policy.revalidate * 1e3 ? found : await live();
10604
+ return new Response(snapshot.body, {
10605
+ status: snapshot.status,
10606
+ headers: snapshot.headers
10607
+ });
10608
+ }
10367
10609
  /** Result adapters use this when the SDK served a page without the HTTP transport (memory, durable or prebuild fallback). */
10368
10610
  async function observePageReadPolicy(cache, siteId, payload) {
10369
10611
  if (!cache) return;
10370
- const dependency = pageReadDependencies(payload);
10612
+ const policy = observedPageReadPolicy(pageReadDependencies(payload));
10371
10613
  await cache(async () => true, [
10372
- "page-read-policy-v2",
10614
+ "page-read-policy-v3",
10373
10615
  siteId,
10374
- dependency
10375
- ], buildPageReadCachePolicy(siteId, dependency))();
10616
+ policy
10617
+ ], pageReadPolicy(siteId, policy))();
10618
+ }
10619
+ /**
10620
+ * A page served without the tagged transport (memory, durable or prebuild) may predate a write's purge, so an
10621
+ * availability page only earns the retry window, not the rendered-availability backstop a purge would end.
10622
+ */
10623
+ function observedPageReadPolicy(dependency) {
10624
+ return dependency === "availability" ? "retry" : "content";
10376
10625
  }
10377
10626
  //#endregion
10378
10627
  //#region ../api/src/common/operationId.ts
@@ -10671,19 +10920,88 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
10671
10920
  function isPublishedPageRead(endpoint, params, options) {
10672
10921
  return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
10673
10922
  }
10923
+ /** The dashboard's reading of a boolean query flag, so a host never treats `force=1` as unforced. */
10924
+ const isTruthyRequestParam = (value) => value === true || value === "true" || value === 1 || value === "1";
10925
+ /** Forced reads skip every cache, and an id-only lookup is a different response the durable cache never holds. */
10926
+ function isFullSiteRead(params) {
10927
+ return !isTruthyRequestParam(params.force) && (params.scope === void 0 || params.scope === "full");
10928
+ }
10929
+ /** A published, full site read with a lifetime: the host's durable copy may answer it, under the fetch's policy. */
10930
+ function publishedSiteReadPolicy(endpoint, params, plan) {
10931
+ const next = plan.init.cache === "no-store" ? void 0 : plan.init.next;
10932
+ const revalidate = typeof next?.revalidate === "number" && next.revalidate > 0 ? next.revalidate : null;
10933
+ return endpoint === "getSite" && revalidate !== null && isFullSiteRead(params) ? {
10934
+ revalidate,
10935
+ tags: next?.tags ?? []
10936
+ } : null;
10937
+ }
10938
+ /** The dashboard's success envelope around a durable copy, so admission and parsing treat it like a live response. */
10939
+ function freshPublishedResponse(data) {
10940
+ return new Response(JSON.stringify(buildSuccessEnvelope(data, void 0)), {
10941
+ status: 200,
10942
+ headers: {
10943
+ "content-type": "application/json",
10944
+ "x-riverbank-cache": "frontend-hit"
10945
+ }
10946
+ });
10947
+ }
10948
+ /** The cache fill's read: the host's fresh durable copy when it has one, otherwise the dashboard. */
10949
+ function freshPublishedFirst(read, request, live) {
10950
+ if (!read) return live;
10951
+ return async () => {
10952
+ const found = await read(request).catch(() => null);
10953
+ return found ? freshPublishedResponse(found.data) : live();
10954
+ };
10955
+ }
10956
+ function publishedPageResponse(read) {
10957
+ const revalidate = read.plan.init.next?.revalidate;
10958
+ return cachePageReadResponse({
10959
+ cache: read.frameworkCache?.cache ?? null,
10960
+ key: read.key,
10961
+ siteId: typeof read.params.siteId === "string" ? read.params.siteId : "",
10962
+ maxAge: typeof revalidate === "number" ? revalidate : void 0,
10963
+ read: read.endpoint === "getContentByPath" ? freshPublishedFirst(read.frameworkCache?.readFreshPublished, {
10964
+ endpoint: "getContentByPath",
10965
+ params: read.params
10966
+ }, read.uncachedFetch) : read.uncachedFetch
10967
+ });
10968
+ }
10969
+ /** Without a durable reader, a site read stays in Next's fetch cache exactly as before. */
10970
+ function siteOrFetchResponse(read) {
10971
+ const durable = read.frameworkCache?.readFreshPublished;
10972
+ const policy = durable ? publishedSiteReadPolicy(read.endpoint, read.params, read.plan) : null;
10973
+ return read.frameworkCache && policy ? cacheSiteReadResponse({
10974
+ cache: read.frameworkCache.cache,
10975
+ key: read.key,
10976
+ policy,
10977
+ read: freshPublishedFirst(durable, {
10978
+ endpoint: "getSite",
10979
+ params: read.params
10980
+ }, read.uncachedFetch)
10981
+ }) : observedFetch(read.plan, read.endpoint, read.frameworkCache);
10982
+ }
10674
10983
  function executeApiRequest(plan, endpoint, params, options, frameworkCache) {
10675
- const inputParams = params;
10676
- const { next: fetchPolicy, ...uncachedInit } = plan.init;
10677
- return isPublishedPageRead(endpoint, inputParams, options) ? cachePageReadResponse({
10678
- cache: frameworkCache?.cache ?? null,
10984
+ const { next: _fetchPolicy, ...uncachedInit } = plan.init;
10985
+ const read = {
10986
+ plan,
10987
+ endpoint,
10988
+ params: params ?? {},
10989
+ frameworkCache,
10679
10990
  key: JSON.stringify([plan.url, [...new Headers(plan.init.headers).entries()]]),
10680
- siteId: typeof inputParams?.siteId === "string" ? inputParams.siteId : "",
10681
- maxAge: typeof fetchPolicy?.revalidate === "number" ? fetchPolicy.revalidate : void 0,
10682
- read: () => fetch(plan.url, {
10991
+ uncachedFetch: () => fetch(plan.url, {
10683
10992
  ...uncachedInit,
10684
10993
  cache: "no-store"
10685
10994
  })
10686
- }) : fetch(plan.url, plan.init);
10995
+ };
10996
+ return isPublishedPageRead(endpoint, params, options) ? publishedPageResponse(read) : siteOrFetchResponse(read);
10997
+ }
10998
+ function observedFetch(plan, endpoint, frameworkCache) {
10999
+ const revalidate = plan.init.next?.revalidate;
11000
+ if (typeof revalidate === "number" && plan.init.cache !== "no-store") frameworkCache?.observeFetchLifetime?.({
11001
+ endpoint: String(endpoint),
11002
+ revalidate
11003
+ });
11004
+ return fetch(plan.url, plan.init);
10687
11005
  }
10688
11006
  const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
10689
11007
  endpoint: z.string(),
@@ -11041,32 +11359,77 @@ var CircuitBreaker = class {
11041
11359
  }
11042
11360
  }
11043
11361
  };
11362
+ /** The SDK's read deadline when the caller sets none. */
11363
+ const DEFAULT_READ_DEADLINE_MS = 8e3;
11364
+ function createReadTimeoutError(timeoutMs) {
11365
+ return Object.assign(/* @__PURE__ */ new Error(`Request timed out after ${timeoutMs}ms`), { name: "AbortError" });
11366
+ }
11367
+ /**
11368
+ * One attempt, ended at the read's deadline even when the fetch ignores its signal.
11369
+ *
11370
+ * The signal alone isn't enough: Next drops it when it refreshes stale fetch data
11371
+ * (as an ISR regeneration does), and the read would then wait as long as the
11372
+ * origin takes. The signal is still aborted so a fetch that honours it stops.
11373
+ */
11374
+ function raceReadDeadline(fetcher, remainingMs, timeoutError) {
11375
+ const controller = new AbortController();
11376
+ return new Promise((resolve, reject) => {
11377
+ const timeoutId = setTimeout(() => {
11378
+ controller.abort();
11379
+ reject(timeoutError());
11380
+ }, remainingMs);
11381
+ fetcher(controller.signal).then((value) => {
11382
+ clearTimeout(timeoutId);
11383
+ resolve(value);
11384
+ }, (error) => {
11385
+ clearTimeout(timeoutId);
11386
+ reject(error);
11387
+ });
11388
+ });
11389
+ }
11390
+ function decideRetry(input) {
11391
+ if (input.attempt >= input.maxAttempts) return { kind: "give_up" };
11392
+ if (!shouldRetryError(input.error, input.config.retryOn)) return { kind: "give_up" };
11393
+ const delayMs = getRetryDelay(input.error, input.attempt, input.config);
11394
+ return delayMs < input.remainingMs ? {
11395
+ kind: "retry",
11396
+ delayMs
11397
+ } : { kind: "give_up" };
11398
+ }
11044
11399
  /**
11045
- * Fetch with timeout and retry logic
11400
+ * Fetch with one deadline and retry logic
11401
+ *
11402
+ * `requestTimeoutMs` bounds the whole read, so retries share what the first
11403
+ * attempt left rather than each getting a fresh budget. A timeout is never
11404
+ * retried: the deadline has passed.
11046
11405
  *
11047
11406
  * @param fetcher - Function that performs the fetch, receives AbortSignal for timeout
11048
11407
  * @param config - Retry configuration
11049
11408
  * @returns Result from successful fetch
11050
- * @throws Last error after all retries exhausted
11409
+ * @throws The last attempt's error, or a timeout once the deadline passes
11051
11410
  */
11052
- async function fetchWithTimeoutAndRetry(fetcher, config) {
11411
+ function fetchWithTimeoutAndRetry(fetcher, config) {
11053
11412
  const maxAttempts = config.maxAttempts ?? DEFAULT_RETRY_CONFIG.maxAttempts;
11054
11413
  const requestTimeoutMs = config.requestTimeoutMs ?? 8e3;
11055
- let lastError;
11056
- for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
11057
- const controller = new AbortController();
11058
- const timeoutId = setTimeout(() => controller.abort(), requestTimeoutMs);
11414
+ const deadline = Date.now() + requestTimeoutMs;
11415
+ const timeoutError = () => createReadTimeoutError(requestTimeoutMs);
11416
+ const attemptFrom = async (attempt) => {
11059
11417
  try {
11060
- return await fetcher(controller.signal);
11061
- } finally {
11062
- clearTimeout(timeoutId);
11418
+ return await raceReadDeadline(fetcher, Math.max(0, deadline - Date.now()), timeoutError);
11419
+ } catch (error) {
11420
+ const decision = decideRetry({
11421
+ error,
11422
+ attempt,
11423
+ maxAttempts,
11424
+ remainingMs: deadline - Date.now(),
11425
+ config
11426
+ });
11427
+ if (decision.kind === "give_up") throw error;
11428
+ await sleep(decision.delayMs);
11429
+ return attemptFrom(attempt + 1);
11063
11430
  }
11064
- } catch (error) {
11065
- lastError = error;
11066
- if (!shouldRetryError(error, config.retryOn)) throw error;
11067
- if (attempt < maxAttempts) await sleep(getRetryDelay(error, attempt, config));
11068
- }
11069
- throw lastError;
11431
+ };
11432
+ return attemptFrom(1);
11070
11433
  }
11071
11434
  /**
11072
11435
  * Check if an error is an AbortError (from AbortController.abort() or timeout)
@@ -11475,13 +11838,14 @@ function publicSiteReadDefinition(definition) {
11475
11838
  * entries written in the old shape until publish or a live success rewrites
11476
11839
  * them.
11477
11840
  *
11841
+ * - 6: resolved page reads carry their own mailing-list projection (`mailingList`).
11478
11842
  * - 5: page reads carry the admitted destination envelope and availability dependencies.
11479
11843
  * - 4: owned surface inputs use the shared revision transport envelope (#1627).
11480
11844
  * - 3: hidden business-source maps and private locations are removed before public projection (#1611).
11481
11845
  * - 2: pages carry intent-only `runtimeJoins` in place of compiled
11482
11846
  * `runtimeBoundaries` (issue 1422).
11483
11847
  */
11484
- const DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION = 5;
11848
+ const DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION = 6;
11485
11849
  function toNonEmptyString(value) {
11486
11850
  if (value === null || value === void 0) return null;
11487
11851
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") return null;
@@ -11493,6 +11857,24 @@ function normalizeRuntimePublicPath(value) {
11493
11857
  const collapsed = (withoutQuery.startsWith("/") ? withoutQuery : `/${withoutQuery}`).replace(/\/{2,}/g, "/");
11494
11858
  return (collapsed.length > 1 ? collapsed.replace(/\/+$/g, "") : collapsed) || "/";
11495
11859
  }
11860
+ /** The site read's variant: `null` is the site-wide read; a path adds that page's runtime support. */
11861
+ function decideSiteReadPath(currentPath) {
11862
+ return toNonEmptyString(currentPath) === null ? null : normalizeRuntimePublicPath(currentPath);
11863
+ }
11864
+ const SITE_TERMS_READ_PATH = "/terms";
11865
+ /** Only the terms page reads the site's terms history. */
11866
+ function siteReadIncludesTermsHistory(path) {
11867
+ return path === SITE_TERMS_READ_PATH;
11868
+ }
11869
+ /**
11870
+ * The path to send on a site read when page content takes its mailing-list support from the page
11871
+ * read (the hosted frontend): none, except the terms page, which needs terms history. Callers that
11872
+ * send every path (deployed SDK sites) keep a site read per page with that page's support.
11873
+ */
11874
+ function siteWideReadPath(currentPath) {
11875
+ const path = decideSiteReadPath(currentPath);
11876
+ return siteReadIncludesTermsHistory(path) ? path : null;
11877
+ }
11496
11878
  function normalizeRuntimeHostname(value) {
11497
11879
  const trimmed = value.trim().toLowerCase();
11498
11880
  return (/^[a-z][a-z0-9+.-]*:\/\//.test(trimmed) ? new URL(trimmed) : new URL(`http://${trimmed}`)).hostname.replace(/\.$/, "");
@@ -11528,9 +11910,10 @@ function deriveGetSiteKey(params) {
11528
11910
  ]
11529
11911
  }
11530
11912
  };
11913
+ const path = decideSiteReadPath(params.currentPath);
11531
11914
  const normalizedParams = {
11532
11915
  ...identity,
11533
- ...toNonEmptyString(params.currentPath) === null ? {} : { currentPath: normalizeRuntimePublicPath(params.currentPath) }
11916
+ ...path === null ? {} : { currentPath: path }
11534
11917
  };
11535
11918
  return {
11536
11919
  ok: true,
@@ -11567,6 +11950,15 @@ function deriveDurableRuntimeCacheKey(input) {
11567
11950
  case "getContentByPath": return deriveGetContentByPathKey(input.params);
11568
11951
  }
11569
11952
  }
11953
+ /**
11954
+ * Keys normalise a path, but builds read the path as sent: `/about/` is a 404 and `/terms/` skips
11955
+ * terms history. A variant must neither fill the canonical row nor be answered from it, so the
11956
+ * dashboard's writer and every reader (dashboard and hosted frontend) ask this first.
11957
+ */
11958
+ function readsCanonicalPath(input) {
11959
+ const path = input.endpoint === "getSite" ? input.params.currentPath : input.params.path;
11960
+ return !path || normalizeRuntimePublicPath(path) === path;
11961
+ }
11570
11962
  function isPublishedRuntimeCacheKeyEndpoint(value) {
11571
11963
  return value === "getSite" || value === "getContentByPath";
11572
11964
  }
@@ -12127,7 +12519,7 @@ function withDefaultHeaders(apiClient, defaultHeaders) {
12127
12519
  });
12128
12520
  }
12129
12521
  const DEFAULT_BROWSER_TIMEOUT_MS = 5e3;
12130
- const DEFAULT_SERVER_TIMEOUT_MS = 8e3;
12522
+ const DEFAULT_SERVER_TIMEOUT_MS = DEFAULT_READ_DEADLINE_MS;
12131
12523
  const MAX_GET_ENTRIES_BY_IDENTIFIERS_REFS = 50;
12132
12524
  function isDurableRuntimeCacheTier(cacheTier) {
12133
12525
  return cacheTier === "durable-fresh" || cacheTier === "durable-stale";
@@ -12152,7 +12544,7 @@ function publishedCacheLifetime(plan, payload) {
12152
12544
  freshTtlSec: plan.freshTtlSec,
12153
12545
  staleTtlSec: plan.staleTtlSec
12154
12546
  };
12155
- const ttl = buildPageReadCachePolicy(plan.siteId ?? "", "availability").revalidate;
12547
+ const ttl = 60;
12156
12548
  return {
12157
12549
  freshTtlSec: ttl,
12158
12550
  staleTtlSec: ttl
@@ -12164,11 +12556,10 @@ function reusableDurablePayload(plan, payload, freshness) {
12164
12556
  function memoryWritePolicy(pageRead, data, tags, cacheTTL) {
12165
12557
  if (!pageRead) return { tags };
12166
12558
  const dependency = pageReadDependencies(data);
12167
- const policy = buildPageReadCachePolicy(pageRead.siteId, dependency);
12168
12559
  return {
12169
- tags: policy.tags,
12560
+ tags: buildPageReadCachePolicy(pageRead.siteId, dependency).tags,
12170
12561
  ...dependency === "availability" ? {
12171
- ttl: Math.min(cacheTTL, policy.revalidate * 1e3),
12562
+ ttl: Math.min(cacheTTL, 60 * 1e3),
12172
12563
  staleTtl: 0
12173
12564
  } : {}
12174
12565
  };
@@ -12488,7 +12879,7 @@ function createRiverbankClientWithDeps(deps, config) {
12488
12879
  const result = await reader({
12489
12880
  cacheKey: plan.cacheKey,
12490
12881
  endpoint: plan.endpoint,
12491
- payloadSchemaVersion: 5
12882
+ payloadSchemaVersion: 6
12492
12883
  });
12493
12884
  if (result.kind === "miss") return {
12494
12885
  kind: "miss",
@@ -12537,7 +12928,7 @@ function createRiverbankClientWithDeps(deps, config) {
12537
12928
  payload,
12538
12929
  siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
12539
12930
  ...publishedCacheLifetime(plan, payload),
12540
- payloadSchemaVersion: 5,
12931
+ payloadSchemaVersion: 6,
12541
12932
  writeReason: "live_success"
12542
12933
  });
12543
12934
  } catch {}
@@ -12551,6 +12942,11 @@ function createRiverbankClientWithDeps(deps, config) {
12551
12942
  error: input.error
12552
12943
  })) : null;
12553
12944
  }
12945
+ /** Every fallback leaves through here, so the caller's hook sees each one. */
12946
+ async function serveFallback(fallback) {
12947
+ await config.resilience?.beforeFallbackServed?.(fallback.resilience);
12948
+ return fallback;
12949
+ }
12554
12950
  async function resilientFetch(cacheKey, fetcher, options) {
12555
12951
  const requestId = generateRequestId();
12556
12952
  const startTime = Date.now();
@@ -12570,21 +12966,21 @@ function createRiverbankClientWithDeps(deps, config) {
12570
12966
  if (resilienceEnabled && circuitBreaker.isOpen()) {
12571
12967
  if (allowFallbacks && !isPreview && staleIfError) {
12572
12968
  const stale = cache.getStale(cacheKey);
12573
- if (stale) return emitStatus("stale", stale.value, statusDetails({
12969
+ if (stale) return serveFallback(emitStatus("stale", stale.value, statusDetails({
12574
12970
  staleAgeSec: stale.staleAgeSec,
12575
12971
  cacheTier: "memory-stale",
12576
12972
  error: {
12577
12973
  code: "circuit_open",
12578
12974
  message: "Circuit breaker is open"
12579
12975
  }
12580
- }));
12976
+ })));
12581
12977
  }
12582
12978
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, {
12583
12979
  code: "circuit_open",
12584
12980
  message: "Circuit breaker is open"
12585
12981
  }) : null;
12586
12982
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
12587
- if (durableFallback?.kind === "hit") return durableFallback.result;
12983
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
12588
12984
  const prebuild = tryPrebuildFallback({
12589
12985
  allowed: allowFallbacks,
12590
12986
  preview: isPreview,
@@ -12596,7 +12992,7 @@ function createRiverbankClientWithDeps(deps, config) {
12596
12992
  message: "Circuit breaker is open"
12597
12993
  }
12598
12994
  });
12599
- if (prebuild) return prebuild;
12995
+ if (prebuild) return serveFallback(prebuild);
12600
12996
  const circuitState = circuitBreaker.getState();
12601
12997
  emitStatus("error", null, statusDetails({
12602
12998
  durableCache,
@@ -12644,17 +13040,17 @@ function createRiverbankClientWithDeps(deps, config) {
12644
13040
  const stale = cache.getStale(cacheKey);
12645
13041
  if (stale) {
12646
13042
  const errorInfo = getRiverbankErrorInfo(error);
12647
- return emitStatus("stale", stale.value, statusDetails({
13043
+ return serveFallback(emitStatus("stale", stale.value, statusDetails({
12648
13044
  staleAgeSec: stale.staleAgeSec,
12649
13045
  cacheTier: "memory-stale",
12650
13046
  error: errorInfo
12651
- }));
13047
+ })));
12652
13048
  }
12653
13049
  }
12654
13050
  const errorInfo = getRiverbankErrorInfo(error);
12655
13051
  const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(options.publishedRuntimeCache, statusDetails, errorInfo) : null;
12656
13052
  const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
12657
- if (durableFallback?.kind === "hit") return durableFallback.result;
13053
+ if (durableFallback?.kind === "hit") return serveFallback(durableFallback.result);
12658
13054
  const prebuild = tryPrebuildFallback({
12659
13055
  allowed: allowFallbacks,
12660
13056
  preview: isPreview,
@@ -12663,7 +13059,7 @@ function createRiverbankClientWithDeps(deps, config) {
12663
13059
  durableCache,
12664
13060
  error: errorInfo
12665
13061
  });
12666
- if (prebuild) return prebuild;
13062
+ if (prebuild) return serveFallback(prebuild);
12667
13063
  throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({
12668
13064
  error: errorInfo,
12669
13065
  durableCache
@@ -13073,4 +13469,4 @@ function createRiverbankClientWithDeps(deps, config) {
13073
13469
  };
13074
13470
  }
13075
13471
  //#endregion
13076
- export { DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION as a, parsePublishedRuntimeCacheKey as c, API_ENDPOINTS as d, buildEndpointURL as f, createBearerAPIClient as h, resolveRuntimeCachePolicy as i, parsePublishedRuntimeCacheKeyDetails as l, CircuitOpenError as m, classifyPublishedRuntimeCacheFreshness as n, isPublishedRuntimeCacheKeyEndpoint as o, sdkRequestOptions as p, derivePublishedRuntimeCacheKey as r, normalizeRuntimePublicPath as s, createRiverbankClient as t, parsePublishedRuntimeCachePayloadSchemaVersion as u };
13472
+ export { sdkRequestOptions as _, DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION as a, normalizeRuntimePublicPath as c, parsePublishedRuntimeCachePayloadSchemaVersion as d, readsCanonicalPath as f, buildEndpointURL as g, API_ENDPOINTS as h, resolveRuntimeCachePolicy as i, parsePublishedRuntimeCacheKey as l, siteWideReadPath as m, classifyPublishedRuntimeCacheFreshness as n, decideSiteReadPath as o, siteReadIncludesTermsHistory as p, derivePublishedRuntimeCacheKey as r, isPublishedRuntimeCacheKeyEndpoint as s, createRiverbankClient as t, parsePublishedRuntimeCacheKeyDetails as u, CircuitOpenError as v, createBearerAPIClient as y };